#! /bin/sh
# From configure.in 2.8.7rel.2.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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

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"
  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 bash ksh sh5; 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 :
  # 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
	export CONFIG_SHELL
	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+"$@"}
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 about your system,
$0: including any error possibly output before this
$0: message. Then install a modern shell, or manually run
$0: the script 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_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; }

  # 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 -p'.
    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
      as_ln_s='cp -p'
  elif ln conf$$.file conf$$ 2>/dev/null; then
    as_ln_s=ln
  else
    as_ln_s='cp -p'
  fi
else
  as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null

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

if test -x / >/dev/null 2>&1; then
  as_test_x='test -x'
else
  if ls -dL / >/dev/null 2>&1; then
    as_ls_L_option=L
  else
    as_ls_L_option=
  fi
  as_test_x='
    eval sh -c '\''
      if test -d "$1"; then
	test -d "$1/.";
      else
	case $1 in #(
	-*)set "./$1";;
	esac;
	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
	???[sx]*):;;*)false;;esac;fi
    '\'' sh
  '
fi
as_executable_p=$as_test_x

# 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=
PACKAGE_TARNAME=
PACKAGE_VERSION=
PACKAGE_STRING=
PACKAGE_BUGREPORT=
PACKAGE_URL=

ac_unique_file="userdefs.h"
ac_default_prefix=/usr/local
# 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_header_list=
ac_subst_vars='LTLIBOBJS
SRCDIR_CLEAN
CONFIG_SHELL
XCURSES_CONFIG
X_EXTRA_LIBS
X_LIBS
X_PRE_LIBS
X_CFLAGS
XMKMF
COMPRESS_EXT
COMPRESS_PROG
INSTALL
ZIP
ZCAT
UUDECODE
RM
COMPRESS
TAR_PIPE_OPTIONS
TAR_FILE_OPTIONS
TAR_DOWN_OPTIONS
TAR_UP_OPTIONS
TAR
BZIP2
UNZIP
UNCOMPRESS
GZIP
MV
RLOGIN
TN3270
TELNET
SETFONT
EXTRA_OBJS
LIBOBJS
CHARSET_DEFS
MIME_LIBDIR
LYNXDOC_MAKE
LYNXCFG_MAKE
LYNX_CFG_FILE
INSTALL_LSS
LYNX_LSS_FILE
NCURSES_CONFIG
PKG_CONFIG
NLS_DATADIR
INTLDIR_CPPFLAGS
GT_NO
GT_YES
INTLDIR_MAKE
SUB_MAKEFILE
MSG_DIR_MAKE
INTL_LIBTOOL_SUFFIX_PREFIX
MKINSTALLDIRS
GENCAT
INSTOBJEXT
DATADIRNAME
POSUB
POFILES
INTLOBJS
INTLLIBS
GMOFILES
CATOBJEXT
CATALOGS
USE_INCLUDED_LIBINTL
BUILD_INCLUDED_LIBINTL
INTLBISON
XGETTEXT
GMSGFMT
MSGFMT
USE_NLS
LIBICONV
GLIBC21
ALLOCA
MSGINIT
EXTRA_CPPFLAGS
EXTRA_CFLAGS
DONT_ECHO_CC
ECHO_CC
SHOW_CC
RULE_CC
ECHO_LD
ECHO_LT
ARFLAGS
AR
RANLIB
BUILD_OBJEXT
BUILD_EXEEXT
BUILD_LIBS
BUILD_LDFLAGS
BUILD_CPPFLAGS
BUILD_CFLAGS
BUILD_CPP
BUILD_CC
PROG_EXT
EGREP
GREP
LINT
YFLAGS
YACC
INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
SET_MAKE
LN_S
CPP
OBJEXT
EXEEXT
ac_ct_CC
CPPFLAGS
LDFLAGS
CFLAGS
CC
DESTDIR
VERSION
PACKAGE
target_os
target_vendor
target_cpu
target
host_os
host_vendor
host_cpu
host
build_os
build_vendor
build_cpu
build
CONFIG_H
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_system_type
with_destdir
with_build_cc
with_build_cpp
with_build_cflags
with_build_cppflags
with_build_ldflags
with_build_libs
enable_echo
enable_find_leaks
enable_debug
enable_trace
enable_vertrace
enable_warnings
with_dbmalloc
with_dmalloc
enable_largefile
with_libiconv_prefix
enable_nls
with_included_gettext
enable_included_msgs
with_nls_datadir
enable_full_paths
with_nss_compat
with_ssl
with_gnutls
enable_gnutls_compat
with_socks
with_socks5
with_pkg_config
enable_ipv6
with_screen
with_curses_dir
enable_widec
enable_color_style
with_lss_file
with_cfg_file
enable_htmlized_cfg
enable_local_docs
with_mime_libdir
enable_locale_charset
with_charsets
enable_bibp_urls
enable_config_info
enable_forms_options
enable_menu_options
enable_addrlist_page
enable_ascii_ctypes
enable_charset_choice
enable_cjk
enable_japanese_utf8
enable_default_colors
enable_kbd_layout
enable_nested_tables
enable_progressbar
enable_scrollbar
enable_sessions
enable_session_cache
enable_alt_bindings
enable_extended_dtd
enable_file_upload
enable_justify_elts
enable_partial
enable_persistent_cookies
enable_prettysrc
enable_read_eta
enable_source_cache
enable_externs
enable_font_switch
enable_cgi_links
enable_change_exec
enable_exec_links
enable_exec_scripts
enable_internal_links
enable_nsl_fork
enable_syslog
enable_underlines
enable_gzip_help
with_bzlib
with_zlib
enable_finger
enable_gopher
enable_news
enable_ftp
enable_dired
enable_dired_dearchive
enable_dired_override
enable_dired_permit
enable_dired_xpermit
enable_dired_tar
enable_dired_uudecode
enable_dired_zip
enable_dired_gzip
enable_long_list
enable_parent_dir_refs
with_x
with_Xaw3d
with_neXtaw
with_XawPlus
'
      ac_precious_vars='build_alias
host_alias
target_alias
CC
CFLAGS
LDFLAGS
LIBS
CPPFLAGS
CPP
YACC
YFLAGS
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}'
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
    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used" >&2
  elif test "x$build_alias" != "x$host_alias"; then
    cross_compiling=yes
  fi
fi

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

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


ac_pwd=`pwd` && test -n "$ac_pwd" &&
ac_ls_di=`ls -di .` &&
ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
  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
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 this package to adapt to many kinds of systems.

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

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

Defaults for the options are specified in brackets.

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

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/PACKAGE]
  --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]
  --target=TARGET   configure for building compilers for TARGET [HOST]
_ACEOF
fi

if test -n "$ac_init_help"; then

  cat <<\_ACEOF

Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --disable-echo          display "compiling" commands
  --enable-find-leaks     logic for testing memory leaks
  --enable-debug          compile w/ debugging (if \$CFLAGS is set, add -g there, too)
  --disable-trace         disable logic for trace code
  --enable-vertrace       verbose trace code
  --enable-warnings       GCC compiler warnings
  --disable-largefile     omit support for large files
  --enable-nls            use Native Language Support
  --disable-included-msgs use included messages, for i18n support
  --disable-full-paths    control whether full utility pathnames are used
  --enable-gnutls-compat  link with gnutls-openssl compat
  --enable-ipv6           use ipv6 (with ipv4) support
  --enable-widec          enable wide-curses features
  --disable-color-style   use color style (ncurses/curses)
  --enable-htmlized-cfg   build htmlized lynx.cfg
  --enable-local-docs     link local doc-directory to help-page
  --enable-locale-charset use locale-charset selection logic
  --disable-bibp-urls     disable support for bibp: URLs
  --disable-config-info   disable browsable configuration-info
  --disable-forms-options disable forms-based options
  --disable-menu-options  disable old-style option menu
  --enable-addrlist-page  use experimental address-list page
  --enable-ascii-ctypes   use experimental ascii case-conversion
  --enable-charset-choice use experimental charset-selection logic
  --enable-cjk            use experimental CJK logic
  --enable-japanese-utf8  use experimental Japanese UTF-8 logic
  --enable-default-colors enable use of default-colors (ncurses/slang)
  --enable-kbd-layout     use experimental keyboard-layout support
  --enable-nested-tables  use experimental nested-table support
  --enable-progressbar    use experimental progress-bar
  --enable-scrollbar      use experimental scrollbar, with mouse
  --enable-sessions       use experimental sessions code
  --enable-session-cache  use experimental session-caching code
  --disable-alt-bindings  disable alternative line-edit bindings
  --disable-extended-dtd  disable extended HTML DTD logic
  --disable-file-upload   use file-upload support
  --disable-justify-elts  use element-justification logic
  --disable-partial       use partial-display logic
  --disable-persistent-cookies  disable persistent-cookie support
  --disable-prettysrc     colorize HTML source
  --disable-read-eta      read-progress message shows ETA
  --disable-source-cache  cache HTML source for parse mode changes
  --enable-externs        use external commands
  --enable-font-switch    use Linux setfont for character-translation
  --enable-cgi-links      support cgi links w/o a http daemon
  --enable-change-exec    allow users to change exec options
  --enable-exec-links     allow lynx to execute programs accessed via a link
  --enable-exec-scripts   allow lynx to execute programs inferred from a link
  --enable-internal-links handle following links to same doc differently
  --enable-nsl-fork       fork NSL requests, allowing them to be aborted
  --enable-syslog         log URL requests via syslog
  --enable-underlines     underline links rather than using boldface
  --enable-gzip-help      install gzip'ed help files
  --disable-finger        disable FINGER logic
  --disable-gopher        disable GOPHER logic
  --disable-news          disable NEWS logic
  --disable-ftp           disable FTP logic
  --disable-dired          disable optional directory-editor, DirEd
  --disable-dired-dearchive disable dearchiving commands
  --disable-dired-override disable DirEd override keymap
  --disable-dired-permit  disable chmod/attrib commands
  --disable-dired-xpermit disable chmod/attrib commands
  --disable-dired-tar     disable "tar" command
  --disable-dired-uudecode disable "uudecode" command
  --disable-dired-zip     disable "zip", "unzip"  commands
  --disable-dired-gzip    disable "gzip", "gunzip" commands
  --disable-long-list     disable long "ls -l" directory listings
  --disable-parent-dir-refs
                          disable "Up-to" links in directory listings

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-system-type=XXX  test: override derived host system-type
  --with-destdir=XXX      set DESTDIR destination for install (default: $DESTDIR)
  --with-build-cc=XXX     the build C compiler ($BUILD_CC)
  --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
  --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
  --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
  --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
  --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
  --with-dbmalloc         test: use Conor Cahill's dbmalloc library
  --with-dmalloc          test: use Gray Watson's dmalloc library
  --with-libiconv-prefix=DIR
                          search for libiconv in DIR/include and DIR/lib
  --with-included-gettext use the GNU gettext library included here
  --with-nls-datadir=DIR  NLS data, parent of locale (default: PREFIX/DATADIR)
  --with-nss-compat{=path}       link with nss_compat library if available
  --with-ssl{=path}       link with ssl library if available
  --with-gnutls{=path}    link with gnutls support
  --with-socks{=path}     link with socks library if available
  --with-socks5{=path}    link with socks5 library if available
  --with-pkg-config{=path} enable/disable use of pkg-config
  --with-screen=XXX       select screen type (XXX is curses (default),
                          ncurses, ncursesw, pdcurses or slang)
  --with-curses-dir=DIR   directory in which (n)curses is installed
  --with-lss-file{=path}  specify the default style-sheet file
                          (default: SYSCONFDIR/lynx.lss)
  --with-cfg-file{=path}  specify the default configuration file
                          (default: SYSCONFDIR/lynx.cfg)
  --with-mime-libdir=DIR  MIME data, mime.types and mailcap (default: /etc)
  --with-charsets=list    limit charsets to given list of MIME names
  --with-bzlib            use libbz2 for decompression of some bzip2 files
  --with-zlib             use zlib for decompression of some gzip files
  --with-x                use the X Window System
  --with-Xaw3d            link with Xaw 3d library
  --with-neXtaw           link with neXT Athena library
  --with-XawPlus          link with Athena-Plus library

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
  YACC        The `Yet Another Compiler Compiler' implementation to use.
              Defaults to the first program found out of: `bison -y', `byacc',
              `yacc'.
  YFLAGS      The list of arguments that will be passed by default to $YACC.
              This script will default YFLAGS to the empty string to avoid a
              default value of `-d' given by some make applications.
  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 the package provider.
_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
    ac_builddir=.

case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
  ac_dir_suffix=/`$as_echo "$ac_dir" | 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

    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
configure
generated by GNU Autoconf 2.68

Copyright (C) 2010 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_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;}
    ;;
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_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 ||
	 $as_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_c_check_type LINENO TYPE VAR INCLUDES
# -------------------------------------------
# Tests whether TYPE exists after having included INCLUDES, setting cache
# variable VAR accordingly.
ac_fn_c_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_c_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_c_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_c_check_type

# 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_c_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_c_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 0;
}
_ACEOF
if ac_fn_c_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 0;
}
_ACEOF
if ac_fn_c_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 0;
}
_ACEOF
if ac_fn_c_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 0;
}
_ACEOF
if ac_fn_c_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 0;
}
_ACEOF
if ac_fn_c_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_c_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_c_compute_int
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 $as_me, which was
generated by GNU Autoconf 2.68.  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.

cat >>confdefs.h <<_ACEOF
#define PACKAGE_NAME "$PACKAGE_NAME"
_ACEOF

cat >>confdefs.h <<_ACEOF
#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
_ACEOF

cat >>confdefs.h <<_ACEOF
#define PACKAGE_VERSION "$PACKAGE_VERSION"
_ACEOF

cat >>confdefs.h <<_ACEOF
#define PACKAGE_STRING "$PACKAGE_STRING"
_ACEOF

cat >>confdefs.h <<_ACEOF
#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
_ACEOF

cat >>confdefs.h <<_ACEOF
#define PACKAGE_URL "$PACKAGE_URL"
_ACEOF


# 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

as_fn_append ac_header_list " stdlib.h"
as_fn_append ac_header_list " unistd.h"
as_fn_append ac_header_list " sys/param.h"
# 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



# autoconf 2.5x defaults to no cache file; we need the cache file's information
# for building the config page.  But start with it empty to avoid confusion by
# people who don't do a "make distclean" after applying patches.
cache_file=config.cache
rm -f config.cache; touch config.cache

CONFIG_H=lynx_cfg.h
ac_config_headers="$ac_config_headers $CONFIG_H:config.hin"



ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
  if test -f "$ac_dir/install-sh"; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install-sh -c"
    break
  elif test -f "$ac_dir/install.sh"; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install.sh -c"
    break
  elif test -f "$ac_dir/shtool"; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/shtool install -c"
    break
  fi
done
if test -z "$ac_aux_dir"; then
  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$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


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
$as_echo_n "checking target system type... " >&6; }
if ${ac_cv_target+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test "x$target_alias" = x; then
  ac_cv_target=$ac_cv_host
else
  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
$as_echo "$ac_cv_target" >&6; }
case $ac_cv_target in
*-*-*) ;;
*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
esac
target=$ac_cv_target
ac_save_IFS=$IFS; IFS='-'
set x $ac_cv_target
shift
target_cpu=$1
target_vendor=$2
shift; shift
# Remember, the first character of IFS is used to create $*,
# except with old shells:
target_os=$*
IFS=$ac_save_IFS
case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac


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

if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then

	system_name="$host_os"
else
	system_name="`(uname -s -r) 2>/dev/null`"
	if test -z "$system_name" ; then
		system_name="`(hostname) 2>/dev/null`"
	fi
fi
test -n "$system_name" && cat >>confdefs.h <<_ACEOF
#define SYSTEM_NAME "$system_name"
_ACEOF

if ${cf_cv_system_name+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cf_cv_system_name="$system_name"
fi


test -z "$system_name" && system_name="$cf_cv_system_name"
test -n "$cf_cv_system_name" && { $as_echo "$as_me:${as_lineno-$LINENO}: result: Configuring for $cf_cv_system_name" >&5
$as_echo "Configuring for $cf_cv_system_name" >&6; }

if test ".$system_name" != ".$cf_cv_system_name" ; then
	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
$as_echo "Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6; }
	as_fn_error $? "\"Please remove config.cache and try again.\"" "$LINENO" 5
fi


# Check whether --with-system-type was given.
if test "${with_system_type+set}" = set; then :
  withval=$with_system_type; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: overriding system type $host_os to $withval" >&5
$as_echo "$as_me: WARNING: overriding system type $host_os to $withval" >&2;}
 host_os=$withval
fi


PACKAGE=lynx
# $Format: "VERSION=$ProjectVersion$"$
VERSION=2.8.7rel.2




{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DESTDIR" >&5
$as_echo_n "checking for DESTDIR... " >&6; }

# Check whether --with-destdir was given.
if test "${with_destdir+set}" = set; then :
  withval=$with_destdir;
else
  withval="${DESTDIR-$DESTDIR}"
fi
if test -n "$DESTDIR" ; then

if test "x$prefix" != xNONE; then
  cf_path_syntax="$prefix"
else
  cf_path_syntax="$ac_default_prefix"
fi

case ".$withval" in #(vi
.\$\(*\)*|.\'*\'*) #(vi
  ;;
..|./*|.\\*) #(vi
  ;;
.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
  ;;
.\${*prefix}*) #(vi
  eval withval="$withval"
  case ".$withval" in #(vi
  .NONE/*)
    withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
    ;;
  esac
  ;; #(vi
.no|.NONE/*)
  withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
  ;;
*)
  as_fn_error $? "expected a pathname, not \"$withval\"" "$LINENO" 5
  ;;
esac

fi
DESTDIR="$withval"

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




case $host_os in
openedition)
	: ${CFLAGS="-D_ALL_SOURCE -Wl,EDIT=NO"}
	: ${CC=c89}
	;;
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
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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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>
#include <sys/types.h>
#include <sys/stat.h>
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
static char *e (p, i)
     char **p;
     int i;
{
  return p[i];
}
static char *f (char * (*g) (char **, int), char **p, ...)
{
  char *s;
  va_list v;
  va_start (v,p);
  s = g (p, va_arg (v,int));
  va_end (v);
  return s;
}

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

/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
   inside strings and character constants.  */
#define FOO(x) 'x'
int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];

int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
int argc;
char **argv;
int
main ()
{
return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
  ;
  return 0;
}
_ACEOF
for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
  CC="$ac_save_CC $ac_arg"
  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=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
{ $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=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 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 $host_os in
mingw*)
LN_S="cp -p"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Override: No symbolic links in mingw." >&5
$as_echo "Override: No symbolic links in mingw." >&6; }
	;;
*)
	;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
set x ${MAKE-make}
ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat >conftest.make <<\_ACEOF
SHELL = /bin/sh
all:
	@echo '@@@%%%=$(MAKE)=@@@%%%'
_ACEOF
# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
case `${MAKE-make} -f conftest.make 2>/dev/null` in
  *@@@%%%=?*=@@@%%%*)
    eval ac_cv_prog_make_${ac_make}_set=yes;;
  *)
    eval ac_cv_prog_make_${ac_make}_set=no;;
esac
rm -f conftest.make
fi
if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
  SET_MAKE=
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
  SET_MAKE="MAKE=${MAKE-make}"
fi

# Find a good install program.  We prefer a C program (faster),
# so one script is as good as another.  But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# 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 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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'

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


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

for ac_prog in lint alint lclint tdlint
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_LINT+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$LINT"; then
  ac_cv_prog_LINT="$LINT" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_LINT="$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
LINT=$ac_cv_prog_LINT
if test -n "$LINT"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINT" >&5
$as_echo "$LINT" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$LINT" && break
done




{ $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"
      { test -f "$ac_path_GREP" && $as_test_x "$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"
      { test -f "$ac_path_EGREP" && $as_test_x "$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
"
if eval test \"x\$"$as_ac_Header"\" = 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" = xyes; 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



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
$as_echo_n "checking for library containing strerror... " >&6; }
if ${ac_cv_search_strerror+:} 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 strerror ();
int
main ()
{
return strerror ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' cposix; 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_strerror=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
  if ${ac_cv_search_strerror+:} false; then :
  break
fi
done
if ${ac_cv_search_strerror+:} false; then :

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

fi




case $cf_cv_system_name in
os2*)
    CFLAGS="$CFLAGS -Zmt"
    CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
    CXXFLAGS="$CXXFLAGS -Zmt"
    # autoconf's macro sets -Zexe and suffix both, which conflict:w
    LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
    ac_cv_exeext=.exe
    ;;
esac




PROG_EXT="$EXEEXT"

test -n "$PROG_EXT" && cat >>confdefs.h <<_ACEOF
#define PROG_EXT "$PROG_EXT"
_ACEOF




if test "$cross_compiling" = yes ; then

	# defaults that we might want to override
	: ${BUILD_CFLAGS:=''}
	: ${BUILD_CPPFLAGS:='#'}
	: ${BUILD_LDFLAGS:=''}
	: ${BUILD_LIBS:=''}
	: ${BUILD_EXEEXT:='$x'}
	: ${BUILD_OBJEXT:='o'}


# Check whether --with-build-cc was given.
if test "${with_build_cc+set}" = set; then :
  withval=$with_build_cc; BUILD_CC="$withval"
else
  for ac_prog in gcc cc cl
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_BUILD_CC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$BUILD_CC"; then
  ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_BUILD_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
BUILD_CC=$ac_cv_prog_BUILD_CC
if test -n "$BUILD_CC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
$as_echo "$BUILD_CC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$BUILD_CC" && break
done

fi

	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for native build C compiler" >&5
$as_echo_n "checking for native build C compiler... " >&6; }
	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
$as_echo "$BUILD_CC" >&6; }

	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for native build C preprocessor" >&5
$as_echo_n "checking for native build C preprocessor... " >&6; }

# Check whether --with-build-cpp was given.
if test "${with_build_cpp+set}" = set; then :
  withval=$with_build_cpp; BUILD_CPP="$withval"
else
  BUILD_CPP='${BUILD_CC} -E'
fi

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

	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for native build C flags" >&5
$as_echo_n "checking for native build C flags... " >&6; }

# Check whether --with-build-cflags was given.
if test "${with_build_cflags+set}" = set; then :
  withval=$with_build_cflags; BUILD_CFLAGS="$withval"
fi

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

	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for native build C preprocessor-flags" >&5
$as_echo_n "checking for native build C preprocessor-flags... " >&6; }

# Check whether --with-build-cppflags was given.
if test "${with_build_cppflags+set}" = set; then :
  withval=$with_build_cppflags; BUILD_CPPFLAGS="$withval"
fi

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

	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for native build linker-flags" >&5
$as_echo_n "checking for native build linker-flags... " >&6; }

# Check whether --with-build-ldflags was given.
if test "${with_build_ldflags+set}" = set; then :
  withval=$with_build_ldflags; BUILD_LDFLAGS="$withval"
fi

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

	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for native build linker-libraries" >&5
$as_echo_n "checking for native build linker-libraries... " >&6; }

# Check whether --with-build-libs was given.
if test "${with_build_libs+set}" = set; then :
  withval=$with_build_libs; BUILD_LIBS="$withval"
fi

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

	# this assumes we're on Unix.
	BUILD_EXEEXT=
	BUILD_OBJEXT=o

	: ${BUILD_CC:='${CC}'}

	if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
		as_fn_error $? "Cross-build requires two compilers.
Use --with-build-cc to specify the native compiler." "$LINENO" 5
	fi

else
	: ${BUILD_CC:='${CC}'}
	: ${BUILD_CPP:='${CPP}'}
	: ${BUILD_CFLAGS:='${CFLAGS}'}
	: ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
	: ${BUILD_LDFLAGS:='${LDFLAGS}'}
	: ${BUILD_LIBS:='${LIBS}'}
	: ${BUILD_EXEEXT:='$x'}
	: ${BUILD_OBJEXT:='o'}
fi












if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
{ $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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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



if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
{ $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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_AR="${ac_tool_prefix}ar"
    $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
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


fi
if test -z "$ac_cv_prog_AR"; then
  ac_ct_AR=$AR
  # 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_ac_ct_AR+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$ac_ct_AR"; then
  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_AR="ar"
    $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_AR=$ac_cv_prog_ac_ct_AR
if test -n "$ac_ct_AR"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
$as_echo "$ac_ct_AR" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_ct_AR" = x; then
    AR="ar"
  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
    AR=$ac_ct_AR
  fi
else
  AR="$ac_cv_prog_AR"
fi





{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for options to update archives" >&5
$as_echo_n "checking for options to update archives... " >&6; }
if ${cf_cv_ar_flags+:} false; then :
  $as_echo_n "(cached) " >&6
else

	cf_cv_ar_flags=unknown
	for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
	do
		rm -f conftest.$ac_cv_objext
		rm -f conftest.a

		cat >conftest.$ac_ext <<EOF
#line 4815 "configure"
int	testdata[3] = { 123, 456, 789 };
EOF
		if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } ; then
			$AR $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
			if test -f conftest.a ; then
				cf_cv_ar_flags=$cf_ar_flags
				break
			fi
		else
			test -n "$verbose" && echo "	cannot compile test-program" 1>&6

echo "${as_me-configure}:4831: testing cannot compile test-program ..." 1>&5


			break
		fi
	done
	rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext

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

test -z "$ARFLAGS" && ARFLAGS=$cf_cv_ar_flags
ARFLAGS=$cf_cv_ar_flags




Development Options:


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want to see long compiling messages" >&5
$as_echo_n "checking if you want to see long compiling messages... " >&6; }
# Check whether --enable-echo was given.
if test "${enable_echo+set}" = set; then :
  enableval=$enable_echo; test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then

    ECHO_LT='--silent'
    ECHO_LD='@echo linking $@;'
    RULE_CC='	@echo compiling $<'
    SHOW_CC='	@echo compiling $@'
    ECHO_CC='@'

  else

    ECHO_LT=''
    ECHO_LD=''
    RULE_CC='# compiling'
    SHOW_CC='# compiling'
    ECHO_CC=''

  fi
else
  enableval=yes

    ECHO_LT=''
    ECHO_LD=''
    RULE_CC='# compiling'
    SHOW_CC='# compiling'
    ECHO_CC=''


fi

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







# special case for WWW/*
if test -n "$ECHO_CC" ; then
	DONT_ECHO_CC="$SHOW_CC ;"
else
	DONT_ECHO_CC=''
fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want to check memory-leaks" >&5
$as_echo_n "checking if you want to check memory-leaks... " >&6; }
# Check whether --enable-find-leaks was given.
if test "${enable_find_leaks+set}" = set; then :
  enableval=$enable_find_leaks; test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    with_leak_checks=yes
  else
    with_leak_checks=no
  fi
else
  enableval=no
  with_leak_checks=no

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_leak_checks" >&5
$as_echo "$with_leak_checks" >&6; }
test "$with_leak_checks" = "yes" && $as_echo "#define LY_FIND_LEAKS 1" >>confdefs.h


# The comment about adding -g to $CFLAGS is unclear.  Autoconf tries to add
# a -g flag; we remove it if the user's $CFLAGS was not set and debugging is
# disabled.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want to enable debug-code" >&5
$as_echo_n "checking if you want to enable debug-code... " >&6; }
# Check whether --enable-debug was given.
if test "${enable_debug+set}" = set; then :
  enableval=$enable_debug; test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    with_debug=yes
  else
    with_debug=no
  fi
else
  enableval=no
  with_debug=no

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_debug" >&5
$as_echo "$with_debug" >&6; }
if test "$with_debug" = "yes" ; then
	case $host_os in
	ultrix*|osf*)
		test -z "$ORIGINAL_CFLAGS" &&
CFLAGS=`echo ${CFLAGS} | sed -e 's/-O[1-9]\? //' -e 's/-O[1-9]\?$//'`

		if test -z "$GCC" ; then
			CFLAGS="$CFLAGS -g3"
		fi
		;;
	esac
else
	case $host_os in
	osf*) #(vi
		test -z "$GCC" && CFLAGS="$CFLAGS -std1"
		test -z "$ORIGINAL_CFLAGS" && CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
		;;
	*)
		test -z "$ORIGINAL_CFLAGS" && CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
		;;
	esac
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want to enable lynx trace code *recommended* " >&5
$as_echo_n "checking if you want to enable lynx trace code *recommended* ... " >&6; }
# Check whether --enable-trace was given.
if test "${enable_trace+set}" = set; then :
  enableval=$enable_trace; test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    with_trace=$enableval
  else
    with_trace=yes
  fi
else
  enableval=yes
  with_trace=yes

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace" >&5
$as_echo "$with_trace" >&6; }
test $with_trace = no && $as_echo "#define NO_LYNX_TRACE 1" >>confdefs.h


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want verbose trace code" >&5
$as_echo_n "checking if you want verbose trace code... " >&6; }
# Check whether --enable-vertrace was given.
if test "${enable_vertrace+set}" = set; then :
  enableval=$enable_vertrace; test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    with_vertrace=yes
  else
    with_vertrace=no
  fi
else
  enableval=no
  with_vertrace=no

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_vertrace" >&5
$as_echo "$with_vertrace" >&6; }
test $with_vertrace = yes && $as_echo "#define LY_TRACELINE __LINE__" >>confdefs.h


if test -n "$GCC"
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want to turn on gcc warnings" >&5
$as_echo_n "checking if you want to turn on gcc warnings... " >&6; }
# Check whether --enable-warnings was given.
if test "${enable_warnings+set}" = set; then :
  enableval=$enable_warnings; test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    with_warnings=yes
  else
    with_warnings=no
  fi
else
  enableval=no
  with_warnings=no

fi

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

if test "$GCC" = yes
then
cat > conftest.i <<EOF
#ifndef GCC_PRINTF
#define GCC_PRINTF 0
#endif
#ifndef GCC_SCANF
#define GCC_SCANF 0
#endif
#ifndef GCC_NORETURN
#define GCC_NORETURN /* nothing */
#endif
#ifndef GCC_UNUSED
#define GCC_UNUSED /* nothing */
#endif
EOF
if test "$GCC" = yes
then
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC __attribute__ directives..." >&5
$as_echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
cat > conftest.$ac_ext <<EOF
#line 5054 "${as_me-configure}"
#include "confdefs.h"
#include "conftest.h"
#include "conftest.i"
#if	GCC_PRINTF
#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
#else
#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
#endif
#if	GCC_SCANF
#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
#else
#define GCC_SCANFLIKE(fmt,var)  /*nothing*/
#endif
extern void wow(char *,...) GCC_SCANFLIKE(1,2);
extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
extern void foo(void) GCC_NORETURN;
int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
EOF
	for cf_attribute in scanf printf unused noreturn
	do

cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

		cf_directive="__attribute__(($cf_attribute))"
		echo "checking for $CC $cf_directive" 1>&5
		case $cf_attribute in
		scanf|printf)
		cat >conftest.h <<EOF
#define GCC_$cf_ATTRIBUTE 1
EOF
			;;
		*)
		cat >conftest.h <<EOF
#define GCC_$cf_ATTRIBUTE $cf_directive
EOF
			;;
		esac
		if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
			test -n "$verbose" && { $as_echo "$as_me:${as_lineno-$LINENO}: result: ... $cf_attribute" >&5
$as_echo "... $cf_attribute" >&6; }
			cat conftest.h >>confdefs.h
		fi
	done
else
	fgrep define conftest.i >>confdefs.h
fi
rm -rf conftest*
fi



GCC_VERSION=none
if test "$GCC" = yes ; then
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $CC" >&5
$as_echo_n "checking version of $CC... " >&6; }
	GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
	test -z "$GCC_VERSION" && GCC_VERSION=unknown
	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCC_VERSION" >&5
$as_echo "$GCC_VERSION" >&6; }
fi




INTEL_COMPILER=no

if test "$GCC" = yes ; then
	case $host_os in
	linux*|gnu*)
		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if this is really Intel C compiler" >&5
$as_echo_n "checking if this is really Intel C compiler... " >&6; }
		cf_save_CFLAGS="$CFLAGS"
		CFLAGS="$CFLAGS -no-gcc"
		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

#ifdef __INTEL_COMPILER
#else
make an error
#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  INTEL_COMPILER=yes
cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"

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


cat > conftest.$ac_ext <<EOF
#line 5163 "${as_me-configure}"
int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
EOF

if test "$INTEL_COMPILER" = yes
then
# The "-wdXXX" options suppress warnings:
# remark #1419: external declaration in primary source file
# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
# remark #193: zero used for undefined preprocessing identifier
# remark #593: variable "curs_sb_left_arrow" was set but never used
# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
# remark #869: parameter "tw" was never referenced
# remark #981: operands are evaluated in unspecified order
# warning #279: controlling expression is constant

	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC warning options..." >&5
$as_echo "$as_me: checking for $CC warning options..." >&6;}
	cf_save_CFLAGS="$CFLAGS"
	EXTRA_CFLAGS="-Wall"
	for cf_opt in \
		wd1419 \
		wd1683 \
		wd1684 \
		wd193 \
		wd593 \
		wd279 \
		wd810 \
		wd869 \
		wd981
	do
		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
		if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
			test -n "$verbose" && { $as_echo "$as_me:${as_lineno-$LINENO}: result: ... -$cf_opt" >&5
$as_echo "... -$cf_opt" >&6; }
			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
		fi
	done
	CFLAGS="$cf_save_CFLAGS"

elif test "$GCC" = yes
then
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC warning options..." >&5
$as_echo "$as_me: checking for $CC warning options..." >&6;}
	cf_save_CFLAGS="$CFLAGS"
	EXTRA_CFLAGS="-W -Wall"
	cf_warn_CONST=""
	test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
	for cf_opt in \
		Wbad-function-cast \
		Wcast-align \
		Wcast-qual \
		Winline \
		Wmissing-declarations \
		Wmissing-prototypes \
		Wnested-externs \
		Wpointer-arith \
		Wshadow \
		Wstrict-prototypes \
		Wundef $cf_warn_CONST
	do
		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
		if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
			test -n "$verbose" && { $as_echo "$as_me:${as_lineno-$LINENO}: result: ... -$cf_opt" >&5
$as_echo "... -$cf_opt" >&6; }
			case $cf_opt in #(vi
			Wcast-qual) #(vi
				CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
				;;
			Winline) #(vi
				case $GCC_VERSION in
				[34].*)
					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6

echo "${as_me-configure}:5246: testing feature is broken in gcc $GCC_VERSION ..." 1>&5


					continue;;
				esac
				;;
			esac
			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
		fi
	done
	CFLAGS="$cf_save_CFLAGS"
fi
rm -f conftest*



fi
fi



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want to use dbmalloc for testing" >&5
$as_echo_n "checking if you want to use dbmalloc for testing... " >&6; }

# Check whether --with-dbmalloc was given.
if test "${with_dbmalloc+set}" = set; then :
  withval=$with_dbmalloc; $as_echo "#define USE_DBMALLOC 1" >>confdefs.h



	: ${with_cflags:=-g}
	: ${with_no_leaks:=yes}
	 with_dbmalloc=yes
else
  with_dbmalloc=
fi

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

case .$with_cflags in #(vi
.*-g*)
	case .$CFLAGS in #(vi
	.*-g*) #(vi
		;;
	*)

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in -g
do
case $cf_fix_cppflags in
no)
	case $cf_add_cflags in #(vi
	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
		case $cf_add_cflags in
		-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
			&& test -z "${cf_tst_cflags}" \
			&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then
				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then
				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		*$cf_add_cflags) #(vi
			;;
		*) #(vi
			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
			;;
		esac
		;;
	*)
		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
		;;
	esac
	;;
yes)
	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
	&& test -z "${cf_tst_cflags}" \
	&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	CFLAGS="$CFLAGS $cf_new_cflags"
fi

if test -n "$cf_new_cppflags" ; then

	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
fi

if test -n "$cf_new_extra_cppflags" ; then

	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
fi




		;;
	esac
	;;
esac


if test "$with_dbmalloc" = yes ; then
	ac_fn_c_check_header_mongrel "$LINENO" "dbmalloc.h" "ac_cv_header_dbmalloc_h" "$ac_includes_default"
if test "x$ac_cv_header_dbmalloc_h" = xyes; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for debug_malloc in -ldbmalloc" >&5
$as_echo_n "checking for debug_malloc in -ldbmalloc... " >&6; }
if ${ac_cv_lib_dbmalloc_debug_malloc+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldbmalloc  $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 debug_malloc ();
int
main ()
{
return debug_malloc ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_dbmalloc_debug_malloc=yes
else
  ac_cv_lib_dbmalloc_debug_malloc=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_dbmalloc_debug_malloc" >&5
$as_echo "$ac_cv_lib_dbmalloc_debug_malloc" >&6; }
if test "x$ac_cv_lib_dbmalloc_debug_malloc" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBDBMALLOC 1
_ACEOF

  LIBS="-ldbmalloc $LIBS"

fi

fi


fi



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want to use dmalloc for testing" >&5
$as_echo_n "checking if you want to use dmalloc for testing... " >&6; }

# Check whether --with-dmalloc was given.
if test "${with_dmalloc+set}" = set; then :
  withval=$with_dmalloc; $as_echo "#define USE_DMALLOC 1" >>confdefs.h



	: ${with_cflags:=-g}
	: ${with_no_leaks:=yes}
	 with_dmalloc=yes
else
  with_dmalloc=
fi

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

case .$with_cflags in #(vi
.*-g*)
	case .$CFLAGS in #(vi
	.*-g*) #(vi
		;;
	*)

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in -g
do
case $cf_fix_cppflags in
no)
	case $cf_add_cflags in #(vi
	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
		case $cf_add_cflags in
		-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
			&& test -z "${cf_tst_cflags}" \
			&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then
				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then
				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		*$cf_add_cflags) #(vi
			;;
		*) #(vi
			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
			;;
		esac
		;;
	*)
		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
		;;
	esac
	;;
yes)
	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
	&& test -z "${cf_tst_cflags}" \
	&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	CFLAGS="$CFLAGS $cf_new_cflags"
fi

if test -n "$cf_new_cppflags" ; then

	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
fi

if test -n "$cf_new_extra_cppflags" ; then

	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
fi




		;;
	esac
	;;
esac


if test "$with_dmalloc" = yes ; then
	ac_fn_c_check_header_mongrel "$LINENO" "dmalloc.h" "ac_cv_header_dmalloc_h" "$ac_includes_default"
if test "x$ac_cv_header_dmalloc_h" = xyes; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dmalloc_debug in -ldmalloc" >&5
$as_echo_n "checking for dmalloc_debug in -ldmalloc... " >&6; }
if ${ac_cv_lib_dmalloc_dmalloc_debug+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldmalloc  $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 dmalloc_debug ();
int
main ()
{
return dmalloc_debug ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_dmalloc_dmalloc_debug=yes
else
  ac_cv_lib_dmalloc_dmalloc_debug=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_dmalloc_dmalloc_debug" >&5
$as_echo "$ac_cv_lib_dmalloc_dmalloc_debug" >&6; }
if test "x$ac_cv_lib_dmalloc_dmalloc_debug" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBDMALLOC 1
_ACEOF

  LIBS="-ldmalloc $LIBS"

fi

fi


fi



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


{ $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 ()
{
/* FIXME: Include the comments suggested by Paul. */
#ifndef __cplusplus
  /* Ultrix mips cc rejects this.  */
  typedef int charset[2];
  const charset cs;
  /* 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.  */
    char *t;
    char const *s = 0 ? (char *) 0 : (char const *) 0;

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

  ;
  return 0;
}
_ACEOF
if ac_fn_c_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




case $cf_cv_system_name in
os2*)
    CFLAGS="$CFLAGS -Zmt"
    CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
    CXXFLAGS="$CXXFLAGS -Zmt"
    # autoconf's macro sets -Zexe and suffix both, which conflict:w
    LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
    ac_cv_exeext=.exe
    ;;
esac




PROG_EXT="$EXEEXT"

test -n "$PROG_EXT" && cat >>confdefs.h <<_ACEOF
#define PROG_EXT "$PROG_EXT"
_ACEOF


TRY_CFLAGS=
case $host_os in
aix4*)
	TRY_CFLAGS="$TRY_CFLAGS -DAIX4 -D_BSD=44 -D_AIX"
	LIBS="$LIBS -lbsd"
	;;
aix*)
	TRY_CFLAGS="$TRY_CFLAGS -D_ACS_COMPAT_CODE"
	LIBS="$LIBS -lbsd"
	;;
apollo*)
	TRY_CFLAGS="$TRY_CFLAGS -D_BUILTINS -W0,-opt,4"
	;;
bsdi*)
	TRY_CFLAGS="$TRY_CFLAGS -DBSDI"
	;;
clix*)
	# Tested on CLIX 3.1 (T.Dickey).  The original makefile entry
	# contributed by Alex Matulich (matuli_a@marlin.navsea.navy.mil) also
	# references -lmalloc and -lbsd.
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strcmp in -lc_s" >&5
$as_echo_n "checking for strcmp in -lc_s... " >&6; }
if ${ac_cv_lib_c_s_strcmp+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lc_s  $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 strcmp ();
int
main ()
{
return strcmp ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_c_s_strcmp=yes
else
  ac_cv_lib_c_s_strcmp=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_c_s_strcmp" >&5
$as_echo "$ac_cv_lib_c_s_strcmp" >&6; }
if test "x$ac_cv_lib_c_s_strcmp" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBC_S 1
_ACEOF

  LIBS="-lc_s $LIBS"

fi

	;;
convex*)
	TRY_CFLAGS="$TRY_CFLAGS -D__STDC__ -Dunix"
	;;
cygwin*)
	TRY_CFLAGS="$TRY_CFLAGS -DWIN_EX -D_WINDOWS_NSL"
	LIBS="$LIBS -luser32"
	;;
dgux*)
	TRY_CFLAGS="$TRY_CFLAGS -DDGUX"
	;;
hpux*)
	TRY_CFLAGS="$TRY_CFLAGS -DSNAKE -D_XOPEN_SOURCE_EXTENDED"
	test -z "$GCC" && TRY_CFLAGS="$TRY_CFLAGS -Wp,-H600000 -DSYS_HPUX"
	;;
isc*)
	# -DPOSIX_JC is necessary, else LYBookmark.c never finds out what a mode_t is.
	TRY_CFLAGS="$TRY_CFLAGS -DISC -DPOSIX_JC"
	LIBS="$LIBS -linet -lnsl_s -lcposix"
	;;
irix6.*) #(vi
	TRY_CFLAGS="$TRY_CFLAGS -DSYS_IRIX64"
	;;
irix*)
	# The original makefile used the $CFLAGS option -cckr for some form
	# of K&R compatibility.  However, this causes compilation warnings for
	# varargs on IRIX 5.2, and does not appear to be needed.
	;;
linux*)
	TRY_CFLAGS="$TRY_CFLAGS -DLINUX"
	;;
mingw*)
	# put these directly in CPPFLAGS since they will not work in lynx_cfg.h

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in \
		-DWIN32_LEAN_AND_MEAN \
		-DDOSPATH \
		-DNOSIGHUP \
		-DNOUSERS \
		-DWIN_EX \
		-D_CONSOLE \
		-D_MBCS \
		-D_WINDOWS \
		-D_WIN_CC \
		-D__WIN32__ \

do
case $cf_fix_cppflags in
no)
	case $cf_add_cflags in #(vi
	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
		case $cf_add_cflags in
		-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
			&& test -z "${cf_tst_cflags}" \
			&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then
				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then
				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		*$cf_add_cflags) #(vi
			;;
		*) #(vi
			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
			;;
		esac
		;;
	*)
		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
		;;
	esac
	;;
yes)
	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
	&& test -z "${cf_tst_cflags}" \
	&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	CFLAGS="$CFLAGS $cf_new_cflags"
fi

if test -n "$cf_new_cppflags" ; then

	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
fi

if test -n "$cf_new_extra_cppflags" ; then

	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
fi




	EXTRA_OBJS="$EXTRA_OBJS Xsystem\$o"
	;;
msdosdjgpp*)
	LIBS="$LIBS -lwatt"
	TRY_CFLAGS="$TRY_CFLAGS -DDOSPATH -DNOUSERS"
	;;
next*)
	TRY_CFLAGS="$TRY_CFLAGS -DNEXT"
	;;
openbsd* | ekkobsd* | mirbsd*)
	LIBS="$LIBS -lcompat"
	;;
osf4*)
	# The -Olimit flag (see below) is no longer available with
	# Digital C 5.2, which is bundled with Digital UNIX 4.0.
	TRY_CFLAGS="$TRY_CFLAGS -DDSYS5 -DSYS_TRU64"
	;;
osf*)
	# Increase the maximum size of functions that will be optimized.
	test -z "$GCC" && TRY_CFLAGS="$TRY_CFLAGS -O -Olimit 4000"
	TRY_CFLAGS="$TRY_CFLAGS -DDSYS5 -DSYS_TRU64"
	;;
sco3.2v5*)
	test $ac_cv_c_compiler_gnu != yes && TRY_CFLAGS="$TRY_CFLAGS -belf"
	;;
sco*)
	LIBS="$LIBS -lmalloc"
	# It's a little late to do much, but try to warn user if he's using
	# SCO's cc (which is reported to have broken const/volatile).
	case "$CC" in #(vi
	cc|*/cc)
		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You should consider using gcc or rcc if available" >&5
$as_echo "$as_me: WARNING: You should consider using gcc or rcc if available" >&2;}
		unset ac_cv_prog_CC
		for ac_prog in gcc rcc
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_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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_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
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
test -n "$CC" || CC="$CC"

		;;
	esac
	;;
sequent-ptx)
	TRY_CFLAGS="$TRY_CFLAGS -DSVR4_BSDSELECT -DNO_IOCTL -DUSE_FCNTL"
	;;
sequent-ptx2)
	TRY_CFLAGS="$TRY_CFLAGS -DSVR4_BSDSELECT"
	;;
sony-newsos*)
	TRY_CFLAGS="$TRY_CFLAGS -I/usr/sony/include"
	for ac_header in jcurses.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "jcurses.h" "ac_cv_header_jcurses_h" "$ac_includes_default"
if test "x$ac_cv_header_jcurses_h" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_JCURSES_H 1
_ACEOF

fi

done

	;;
svr4)
	TRY_CFLAGS="$TRY_CFLAGS -DSVR4_BSDSELECT -DSVR4"
	;;
sunos3*)
	TRY_CFLAGS="$TRY_CFLAGS -DSUN"
	;;
sunos4*)
	TRY_CFLAGS="$TRY_CFLAGS -DSUN -DSUN4"
	;;
ultrix*)
	# Increase the maximum size of functions that will be optimized.
	test -z "$GCC" && TRY_CFLAGS="$TRY_CFLAGS -O -Olimit 600 -G 7"
	TRY_CFLAGS="$TRY_CFLAGS -DULTRIX"
	for ac_header in cursesX.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "cursesX.h" "ac_cv_header_cursesX_h" "$ac_includes_default"
if test "x$ac_cv_header_cursesX_h" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_CURSESX_H 1
_ACEOF
 $as_echo "#define HAVE_CURSESX_H 1" >>confdefs.h

		 cf_cv_ncurses_header=cursesX.h
fi

done

	;;
esac

case $host_os in
mingw*)
	EXTRA_OBJS="$EXTRA_OBJS LYIcon\$o"
	;;
esac


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
if ${cf_cv_ansi_cc+:} false; then :
  $as_echo_n "(cached) " >&6
else

cf_cv_ansi_cc=no
cf_save_CFLAGS="$CFLAGS"
cf_save_CPPFLAGS="$CPPFLAGS"
# Don't try gcc -ansi; that turns off useful extensions and
# breaks some systems' header files.
# AIX			-qlanglvl=ansi
# Ultrix and OSF/1	-std1
# HP-UX			-Aa -D_HPUX_SOURCE
# SVR4			-Xc
# UnixWare 1.2		(cannot use -Xc, since ANSI/POSIX clashes)
for cf_arg in "-DCC_HAS_PROTOS" \
	"" \
	-qlanglvl=ansi \
	-std1 \
	-Ae \
	"-Aa -D_HPUX_SOURCE" \
	-Xc
do

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $cf_arg
do
case $cf_fix_cppflags in
no)
	case $cf_add_cflags in #(vi
	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
		case $cf_add_cflags in
		-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
			&& test -z "${cf_tst_cflags}" \
			&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then
				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then
				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		*$cf_add_cflags) #(vi
			;;
		*) #(vi
			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
			;;
		esac
		;;
	*)
		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
		;;
	esac
	;;
yes)
	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
	&& test -z "${cf_tst_cflags}" \
	&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	CFLAGS="$CFLAGS $cf_new_cflags"
fi

if test -n "$cf_new_cppflags" ; then

	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
fi

if test -n "$cf_new_extra_cppflags" ; then

	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
fi




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

#ifndef CC_HAS_PROTOS
#if !defined(__STDC__) || (__STDC__ != 1)
choke me
#endif
#endif

int
main ()
{

	int test (int i, double x);
	struct s1 {int (*f) (int a);};
	struct s2 {int (*f) (double a);};
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_ansi_cc="$cf_arg"; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
CFLAGS="$cf_save_CFLAGS"
CPPFLAGS="$cf_save_CPPFLAGS"

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

if test "$cf_cv_ansi_cc" != "no"; then
if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $cf_cv_ansi_cc
do
case $cf_fix_cppflags in
no)
	case $cf_add_cflags in #(vi
	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
		case $cf_add_cflags in
		-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
			&& test -z "${cf_tst_cflags}" \
			&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then
				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then
				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		*$cf_add_cflags) #(vi
			;;
		*) #(vi
			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
			;;
		esac
		;;
	*)
		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
		;;
	esac
	;;
yes)
	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
	&& test -z "${cf_tst_cflags}" \
	&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	CFLAGS="$CFLAGS $cf_new_cflags"
fi

if test -n "$cf_new_cppflags" ; then

	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
fi

if test -n "$cf_new_extra_cppflags" ; then

	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
fi




else
	$as_echo "#define CC_HAS_PROTOS 1" >>confdefs.h

fi
fi


if test "$cf_cv_ansi_cc" = "no"; then
	as_fn_error $? "Your compiler does not appear to recognize prototypes.
You have the following choices:
	a. adjust your compiler options
	b. get an up-to-date compiler
	c. use a wrapper such as unproto" "$LINENO" 5
fi



Basic Configuration Options:



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

if test "$enable_largefile" != no; then

  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
if ${ac_cv_sys_largefile_CC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_cv_sys_largefile_CC=no
     if test "$GCC" != yes; then
       ac_save_CC=$CC
       while :; do
	 # IRIX 6.2 and later do not support large files by default,
	 # so use the C compiler's -n32 option if that helps.
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
 /* Check that off_t can represent 2**63 - 1 correctly.
    We can't simply define LARGE_OFF_T to be 9223372036854775807,
    since some C++ compilers masquerading as C compilers
    incorrectly reject 9223372036854775807.  */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
		       && LARGE_OFF_T % 2147483647 == 1)
		      ? 1 : -1];
int
main ()
{

  ;
  return 0;
}
_ACEOF
	 if ac_fn_c_try_compile "$LINENO"; then :
  break
fi
rm -f core conftest.err conftest.$ac_objext
	 CC="$CC -n32"
	 if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_sys_largefile_CC=' -n32'; break
fi
rm -f core conftest.err conftest.$ac_objext
	 break
       done
       CC=$ac_save_CC
       rm -f conftest.$ac_ext
    fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
$as_echo "$ac_cv_sys_largefile_CC" >&6; }
  if test "$ac_cv_sys_largefile_CC" != no; then
    CC=$CC$ac_cv_sys_largefile_CC
  fi

  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
if ${ac_cv_sys_file_offset_bits+:} false; then :
  $as_echo_n "(cached) " >&6
else
  while :; do
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
 /* Check that off_t can represent 2**63 - 1 correctly.
    We can't simply define LARGE_OFF_T to be 9223372036854775807,
    since some C++ compilers masquerading as C compilers
    incorrectly reject 9223372036854775807.  */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
		       && LARGE_OFF_T % 2147483647 == 1)
		      ? 1 : -1];
int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_sys_file_offset_bits=no; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#define _FILE_OFFSET_BITS 64
#include <sys/types.h>
 /* Check that off_t can represent 2**63 - 1 correctly.
    We can't simply define LARGE_OFF_T to be 9223372036854775807,
    since some C++ compilers masquerading as C compilers
    incorrectly reject 9223372036854775807.  */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
		       && LARGE_OFF_T % 2147483647 == 1)
		      ? 1 : -1];
int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_sys_file_offset_bits=64; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  ac_cv_sys_file_offset_bits=unknown
  break
done
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
case $ac_cv_sys_file_offset_bits in #(
  no | unknown) ;;
  *)
cat >>confdefs.h <<_ACEOF
#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
_ACEOF
;;
esac
rm -rf conftest*
  if test $ac_cv_sys_file_offset_bits = unknown; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
if ${ac_cv_sys_large_files+:} false; then :
  $as_echo_n "(cached) " >&6
else
  while :; do
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
 /* Check that off_t can represent 2**63 - 1 correctly.
    We can't simply define LARGE_OFF_T to be 9223372036854775807,
    since some C++ compilers masquerading as C compilers
    incorrectly reject 9223372036854775807.  */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
		       && LARGE_OFF_T % 2147483647 == 1)
		      ? 1 : -1];
int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_sys_large_files=no; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#define _LARGE_FILES 1
#include <sys/types.h>
 /* Check that off_t can represent 2**63 - 1 correctly.
    We can't simply define LARGE_OFF_T to be 9223372036854775807,
    since some C++ compilers masquerading as C compilers
    incorrectly reject 9223372036854775807.  */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
		       && LARGE_OFF_T % 2147483647 == 1)
		      ? 1 : -1];
int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_sys_large_files=1; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  ac_cv_sys_large_files=unknown
  break
done
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
$as_echo "$ac_cv_sys_large_files" >&6; }
case $ac_cv_sys_large_files in #(
  no | unknown) ;;
  *)
cat >>confdefs.h <<_ACEOF
#define _LARGE_FILES $ac_cv_sys_large_files
_ACEOF
;;
esac
rm -rf conftest*
  fi
fi

    if test "$enable_largefile" != no ; then
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
if ${ac_cv_sys_largefile_source+:} false; then :
  $as_echo_n "(cached) " >&6
else
  while :; do
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h> /* for off_t */
     #include <stdio.h>
int
main ()
{
int (*fp) (FILE *, off_t, int) = fseeko;
     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_sys_largefile_source=no; break
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#define _LARGEFILE_SOURCE 1
#include <sys/types.h> /* for off_t */
     #include <stdio.h>
int
main ()
{
int (*fp) (FILE *, off_t, int) = fseeko;
     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_sys_largefile_source=1; break
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
  ac_cv_sys_largefile_source=unknown
  break
done
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
$as_echo "$ac_cv_sys_largefile_source" >&6; }
case $ac_cv_sys_largefile_source in #(
  no | unknown) ;;
  *)
cat >>confdefs.h <<_ACEOF
#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
_ACEOF
;;
esac
rm -rf conftest*

# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
# in glibc 2.1.3, but that breaks too many other things.
# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
if test $ac_cv_sys_largefile_source != unknown; then

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

fi


	# Normally we would collect these definitions in the config.h,
	# but (like _XOPEN_SOURCE), some environments rely on having these
	# defined before any of the system headers are included.  Another
	# case comes up with C++, e.g., on AIX the compiler compiles the
	# header files by themselves before looking at the body files it is
	# told to compile.  For ncurses, those header files do not include
	# the config.h
	test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
	test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
	test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "

	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use struct dirent64" >&5
$as_echo_n "checking whether to use struct dirent64... " >&6; }
if ${cf_cv_struct_dirent64+:} false; then :
  $as_echo_n "(cached) " >&6
else

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

#include <sys/types.h>
#include <dirent.h>

int
main ()
{

		/* if transitional largefile support is setup, this is true */
		extern struct dirent64 * readdir(DIR *);
		struct dirent64 *x = readdir((DIR *)0);
		struct dirent *y = readdir((DIR *)0);
		int z = x - y;

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

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_struct_dirent64" >&5
$as_echo "$cf_cv_struct_dirent64" >&6; }
	test "$cf_cv_struct_dirent64" = yes && $as_echo "#define HAVE_STRUCT_DIRENT64 1" >>confdefs.h

    fi




if test -z "$ALL_LINGUAS" ; then
	ALL_LINGUAS=`test -d $srcdir/po && cd $srcdir/po && echo *.po|sed -e 's/\.po//g' -e 's/*//'`

	case $cf_cv_system_name in
	os2*)	PATH_SEPARATOR=';'  ;;
	*)	PATH_SEPARATOR=':'  ;;
	esac



# Extract the first word of "msginit", so it can be a program name with args.

set dummy msginit; 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_MSGINIT+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case "$MSGINIT" in
  [\\/]*|?:[\\/]*)
  ac_cv_path_MSGINIT="$MSGINIT" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word$ac_exeext; then
      if $ac_dir/$ac_word --no-translator --version /dev/null >/dev/null 2>&1; then
	ac_cv_path_MSGINIT="$ac_dir/$ac_word$ac_exeext"
	break
      fi
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_MSGINIT" && ac_cv_path_MSGINIT=":"
  ;;
esac
fi
MSGINIT="$ac_cv_path_MSGINIT"
if test "$MSGINIT" != ":"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGINIT" >&5
$as_echo "$MSGINIT" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi

	if test "$MSGINIT" != ":" ; then
		test -n "$verbose" && echo "	adding en.po" 1>&6

echo "${as_me-configure}:6604: testing adding en.po ..." 1>&5


		ALL_LINGUAS="$ALL_LINGUAS en"
	fi
fi

if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
{ $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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
$as_echo_n "checking for inline... " >&6; }
if ${ac_cv_c_inline+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#ifndef __cplusplus
typedef int foo_t;
static $ac_kw foo_t static_foo () {return 0; }
$ac_kw foo_t foo () {return 0; }
#endif

_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_c_inline=$ac_kw
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  test "$ac_cv_c_inline" != no && break
done

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

case $ac_cv_c_inline in
  inline | yes) ;;
  *)
    case $ac_cv_c_inline in
      no) ac_val=;;
      *) ac_val=$ac_cv_c_inline;;
    esac
    cat >>confdefs.h <<_ACEOF
#ifndef __cplusplus
#define inline $ac_val
#endif
_ACEOF
    ;;
esac

ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
if test "x$ac_cv_type_off_t" = xyes; then :

else

cat >>confdefs.h <<_ACEOF
#define off_t long int
_ACEOF

fi

ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
if test "x$ac_cv_type_size_t" = xyes; then :

else

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

fi

# 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"
if eval test \"x\$"$as_ac_var"\" = 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 ()
{
  static char *addr = 0;
  auto char dummy;
  if (addr == 0)
    {
      addr = &dummy;
      return find_stack_direction ();
    }
  else
    return (&dummy > addr) ? 1 : -1;
}

int
main ()
{
  return find_stack_direction () < 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




  for ac_header in $ac_header_list
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
"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done








for ac_func in getpagesize
do :
  ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
if test "x$ac_cv_func_getpagesize" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_GETPAGESIZE 1
_ACEOF

fi
done

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
$as_echo_n "checking for working mmap... " >&6; }
if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test "$cross_compiling" = yes; then :
  ac_cv_func_mmap_fixed_mapped=no
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_includes_default
/* malloc might have been renamed as rpl_malloc. */
#undef malloc

/* Thanks to Mike Haertel and Jim Avera for this test.
   Here is a matrix of mmap possibilities:
	mmap private not fixed
	mmap private fixed at somewhere currently unmapped
	mmap private fixed at somewhere already mapped
	mmap shared not fixed
	mmap shared fixed at somewhere currently unmapped
	mmap shared fixed at somewhere already mapped
   For private mappings, we should verify that changes cannot be read()
   back from the file, nor mmap's back from the file at a different
   address.  (There have been systems where private was not correctly
   implemented like the infamous i386 svr4.0, and systems where the
   VM page cache was not coherent with the file system buffer cache
   like early versions of FreeBSD and possibly contemporary NetBSD.)
   For shared mappings, we should conversely verify that changes get
   propagated back to all the places they're supposed to be.

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

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

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

/* This mess was copied from the GNU getpagesize.h.  */
#ifndef HAVE_GETPAGESIZE
# ifdef _SC_PAGESIZE
#  define getpagesize() sysconf(_SC_PAGESIZE)
# else /* no _SC_PAGESIZE */
#  ifdef HAVE_SYS_PARAM_H
#   include <sys/param.h>
#   ifdef EXEC_PAGESIZE
#    define getpagesize() EXEC_PAGESIZE
#   else /* no EXEC_PAGESIZE */
#    ifdef NBPG
#     define getpagesize() NBPG * CLSIZE
#     ifndef CLSIZE
#      define CLSIZE 1
#     endif /* no CLSIZE */
#    else /* no NBPG */
#     ifdef NBPC
#      define getpagesize() NBPC
#     else /* no NBPC */
#      ifdef PAGESIZE
#       define getpagesize() PAGESIZE
#      endif /* PAGESIZE */
#     endif /* no NBPC */
#    endif /* no NBPG */
#   endif /* no EXEC_PAGESIZE */
#  else /* no HAVE_SYS_PARAM_H */
#   define getpagesize() 8192	/* punt totally */
#  endif /* no HAVE_SYS_PARAM_H */
# endif /* no _SC_PAGESIZE */

#endif /* no HAVE_GETPAGESIZE */

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

  pagesize = getpagesize ();

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

  /* Next, check that the tail of a page is zero-filled.  File must have
     non-zero length, otherwise we risk SIGBUS for entire page.  */
  fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
  if (fd2 < 0)
    return 4;
  cdata2 = "";
  if (write (fd2, cdata2, 1) != 1)
    return 5;
  data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
  if (data2 == MAP_FAILED)
    return 6;
  for (i = 0; i < pagesize; ++i)
    if (*(data2 + i))
      return 7;
  close (fd2);
  if (munmap (data2, pagesize))
    return 8;

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

  /* Finally, make sure that changes to the mapped area do not
     percolate back to the file as seen by read().  (This is a bug on
     some variants of i386 svr4.0.)  */
  for (i = 0; i < pagesize; ++i)
    *(data2 + i) = *(data2 + i) + 1;
  data3 = (char *) malloc (pagesize);
  if (!data3)
    return 12;
  if (read (fd, data3, pagesize) != pagesize)
    return 13;
  for (i = 0; i < pagesize; ++i)
    if (*(data + i) != *(data3 + i))
      return 14;
  close (fd);
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  ac_cv_func_mmap_fixed_mapped=yes
else
  ac_cv_func_mmap_fixed_mapped=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: $ac_cv_func_mmap_fixed_mapped" >&5
$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
if test $ac_cv_func_mmap_fixed_mapped = yes; then

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

fi
rm -f conftest.mmap conftest.txt


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

#include <features.h>
#ifdef __GNU_LIBRARY__
 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
  Lucky GNU user
 #endif
#endif

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



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

    GLIBC21="$ac_cv_gnu_library_2_1"



cf_makefile=makefile

test -z "$ALL_LINGUAS" && ALL_LINGUAS=`test -d $srcdir/po && cd $srcdir/po && echo *.po|sed -e 's/\.po//g' -e 's/*//'`

# Allow override of "config.h" definition:
: ${CONFIG_H=config.h}


if test -z "$VERSION" ; then
if test -f $srcdir/VERSION ; then
	VERSION=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
else
	VERSION=unknown
fi
fi



   for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
stdlib.h string.h unistd.h sys/param.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"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done

   for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
strdup strtoul tsearch __argz_count __argz_stringify __argz_next
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"
if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done





# Check whether --with-libiconv-prefix was given.
if test "${with_libiconv_prefix+set}" = set; then :
  withval=$with_libiconv_prefix;

  case "$withval" in #(vi
  no) #(vi
      ;;
  yes) #(vi
      ;;
  *)


for cf_searchpath in `echo "$withval" | tr $PATH_SEPARATOR ' '`; do
	if test -d $cf_searchpath/include; then

if test -n "$cf_searchpath/include" ; then
  for cf_add_incdir in $cf_searchpath/include
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:7305: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi

	elif test -d $cf_searchpath/../include ; then

if test -n "$cf_searchpath/../include" ; then
  for cf_add_incdir in $cf_searchpath/../include
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:7371: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi

	else
as_fn_error $? "cannot find libiconv under $withval" "$LINENO" 5
	fi
	if test -d $cf_searchpath/lib; then

if test -n "$cf_searchpath/lib" ; then
  for cf_add_libdir in $cf_searchpath/lib
  do
    if test $cf_add_libdir = /usr/lib ; then
      :
    elif test -d $cf_add_libdir
    then
      cf_have_libdir=no
      if test -n "$LDFLAGS$LIBS" ; then
        # a loop is needed to ensure we can add subdirs of existing dirs
        for cf_test_libdir in $LDFLAGS $LIBS ; do
          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
            cf_have_libdir=yes; break
          fi
        done
      fi
      if test "$cf_have_libdir" = no ; then
        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me-configure}:7411: testing adding $cf_add_libdir to library-path ..." 1>&5


        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
      fi
    fi
  done
fi

	elif test -d $cf_searchpath ; then

if test -n "$cf_searchpath" ; then
  for cf_add_libdir in $cf_searchpath
  do
    if test $cf_add_libdir = /usr/lib ; then
      :
    elif test -d $cf_add_libdir
    then
      cf_have_libdir=no
      if test -n "$LDFLAGS$LIBS" ; then
        # a loop is needed to ensure we can add subdirs of existing dirs
        for cf_test_libdir in $LDFLAGS $LIBS ; do
          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
            cf_have_libdir=yes; break
          fi
        done
      fi
      if test "$cf_have_libdir" = no ; then
        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me-configure}:7441: testing adding $cf_add_libdir to library-path ..." 1>&5


        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
      fi
    fi
  done
fi

	else
as_fn_error $? "cannot find libiconv under $withval" "$LINENO" 5
	fi
done

      ;;
  esac


fi


  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
$as_echo_n "checking for iconv... " >&6; }
if ${am_cv_func_iconv+:} false; then :
  $as_echo_n "(cached) " >&6
else



# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
# will be set on completion of the AC_TRY_LINK below.
cf_cv_header_path_iconv=
cf_cv_library_path_iconv=


echo "${as_me-configure}:7476: testing Starting FIND_LINKAGE(iconv,) ..." 1>&5


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_c_try_link "$LINENO"; then :
  cf_cv_find_linkage_iconv=yes
else

    cf_cv_find_linkage_iconv=no

    test -n "$verbose" && echo "	find linkage for iconv library" 1>&6

echo "${as_me-configure}:7505: testing find linkage for iconv library ..." 1>&5



echo "${as_me-configure}:7509: testing Searching for headers in FIND_LINKAGE(iconv,) ..." 1>&5


    cf_save_CPPFLAGS="$CPPFLAGS"
    cf_test_CPPFLAGS="$CPPFLAGS"


cf_header_path_list=""
if test -n "${CFLAGS}${CPPFLAGS}" ; then
	for cf_header_path in $CPPFLAGS $CFLAGS
	do
		case $cf_header_path in #(vi
		-I*)
			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`

test "$cf_header_path" != "NONE" && \
test -d "$cf_header_path" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
	test -d $cf_header_path/include/iconv &&       cf_search="$cf_search $cf_header_path/include/iconv"
	test -d $cf_header_path/include/iconv/include &&    cf_search="$cf_search $cf_header_path/include/iconv/include"
	test -d $cf_header_path/iconv/include &&       cf_search="$cf_search $cf_header_path/iconv/include"
	test -d $cf_header_path/iconv/include/iconv &&    cf_search="$cf_search $cf_header_path/iconv/include/iconv"
}

			cf_header_path_list="$cf_header_path_list $cf_search"
			;;
		esac
	done
fi

cf_search=""


test "/usr" != "$prefix" && \
test -d "/usr" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /usr"
	test -d /usr/include &&          cf_search="$cf_search /usr/include"
	test -d /usr/include/iconv &&       cf_search="$cf_search /usr/include/iconv"
	test -d /usr/include/iconv/include &&    cf_search="$cf_search /usr/include/iconv/include"
	test -d /usr/iconv/include &&       cf_search="$cf_search /usr/iconv/include"
	test -d /usr/iconv/include/iconv &&    cf_search="$cf_search /usr/iconv/include/iconv"
}


test "$prefix" != "NONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
	test -d $prefix/include/iconv &&       cf_search="$cf_search $prefix/include/iconv"
	test -d $prefix/include/iconv/include &&    cf_search="$cf_search $prefix/include/iconv/include"
	test -d $prefix/iconv/include &&       cf_search="$cf_search $prefix/iconv/include"
	test -d $prefix/iconv/include/iconv &&    cf_search="$cf_search $prefix/iconv/include/iconv"
}


test "/usr/local" != "$prefix" && \
test -d "/usr/local" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /usr/local"
	test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
	test -d /usr/local/include/iconv &&       cf_search="$cf_search /usr/local/include/iconv"
	test -d /usr/local/include/iconv/include &&    cf_search="$cf_search /usr/local/include/iconv/include"
	test -d /usr/local/iconv/include &&       cf_search="$cf_search /usr/local/iconv/include"
	test -d /usr/local/iconv/include/iconv &&    cf_search="$cf_search /usr/local/iconv/include/iconv"
}


test "/opt" != "$prefix" && \
test -d "/opt" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /opt"
	test -d /opt/include &&          cf_search="$cf_search /opt/include"
	test -d /opt/include/iconv &&       cf_search="$cf_search /opt/include/iconv"
	test -d /opt/include/iconv/include &&    cf_search="$cf_search /opt/include/iconv/include"
	test -d /opt/iconv/include &&       cf_search="$cf_search /opt/iconv/include"
	test -d /opt/iconv/include/iconv &&    cf_search="$cf_search /opt/iconv/include/iconv"
}


test "$HOME" != "$prefix" && \
test -d "$HOME" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under $HOME"
	test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
	test -d $HOME/include/iconv &&       cf_search="$cf_search $HOME/include/iconv"
	test -d $HOME/include/iconv/include &&    cf_search="$cf_search $HOME/include/iconv/include"
	test -d $HOME/iconv/include &&       cf_search="$cf_search $HOME/iconv/include"
	test -d $HOME/iconv/include/iconv &&    cf_search="$cf_search $HOME/iconv/include/iconv"
}



test "$includedir" != NONE && \
test "$includedir" != "/usr/include" && \
test -d "$includedir" && {
	test -d $includedir &&    cf_search="$cf_search $includedir"
	test -d $includedir/iconv && cf_search="$cf_search $includedir/iconv"
}

test "$oldincludedir" != NONE && \
test "$oldincludedir" != "/usr/include" && \
test -d "$oldincludedir" && {
	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
	test -d $oldincludedir/iconv && cf_search="$cf_search $oldincludedir/iconv"
}

cf_search="$cf_header_path_list $cf_search"

    for cf_cv_header_path_iconv in $cf_search
    do
      if test -d $cf_cv_header_path_iconv ; then
        test -n "$verbose" && echo "	... testing $cf_cv_header_path_iconv" 1>&6

echo "${as_me-configure}:7626: testing ... testing $cf_cv_header_path_iconv ..." 1>&5


        CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_iconv"
        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_c_try_compile "$LINENO"; then :

            test -n "$verbose" && echo "	... found iconv headers in $cf_cv_header_path_iconv" 1>&6

echo "${as_me-configure}:7652: testing ... found iconv headers in $cf_cv_header_path_iconv ..." 1>&5


            cf_cv_find_linkage_iconv=maybe
            cf_test_CPPFLAGS="$CPPFLAGS"
            break
else

            CPPFLAGS="$cf_save_CPPFLAGS"

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

    if test "$cf_cv_find_linkage_iconv" = maybe ; then


echo "${as_me-configure}:7670: testing Searching for iconv library in FIND_LINKAGE(iconv,) ..." 1>&5


      cf_save_LIBS="$LIBS"
      cf_save_LDFLAGS="$LDFLAGS"



      if test "$cf_cv_find_linkage_iconv" != yes ; then

cf_library_path_list=""
if test -n "${LDFLAGS}${LIBS}" ; then
	for cf_library_path in $LDFLAGS $LIBS
	do
		case $cf_library_path in #(vi
		-L*)
			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`

test "$cf_library_path" != "NONE" && \
test -d "$cf_library_path" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
	test -d $cf_library_path/lib/iconv &&       cf_search="$cf_search $cf_library_path/lib/iconv"
	test -d $cf_library_path/lib/iconv/lib &&    cf_search="$cf_search $cf_library_path/lib/iconv/lib"
	test -d $cf_library_path/iconv/lib &&       cf_search="$cf_search $cf_library_path/iconv/lib"
	test -d $cf_library_path/iconv/lib/iconv &&    cf_search="$cf_search $cf_library_path/iconv/lib/iconv"
}

			cf_library_path_list="$cf_library_path_list $cf_search"
			;;
		esac
	done
fi

cf_search=""


test "/usr" != "$prefix" && \
test -d "/usr" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /usr"
	test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
	test -d /usr/lib/iconv &&       cf_search="$cf_search /usr/lib/iconv"
	test -d /usr/lib/iconv/lib &&    cf_search="$cf_search /usr/lib/iconv/lib"
	test -d /usr/iconv/lib &&       cf_search="$cf_search /usr/iconv/lib"
	test -d /usr/iconv/lib/iconv &&    cf_search="$cf_search /usr/iconv/lib/iconv"
}


test "$prefix" != "NONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
	test -d $prefix/lib/iconv &&       cf_search="$cf_search $prefix/lib/iconv"
	test -d $prefix/lib/iconv/lib &&    cf_search="$cf_search $prefix/lib/iconv/lib"
	test -d $prefix/iconv/lib &&       cf_search="$cf_search $prefix/iconv/lib"
	test -d $prefix/iconv/lib/iconv &&    cf_search="$cf_search $prefix/iconv/lib/iconv"
}


test "/usr/local" != "$prefix" && \
test -d "/usr/local" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /usr/local"
	test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
	test -d /usr/local/lib/iconv &&       cf_search="$cf_search /usr/local/lib/iconv"
	test -d /usr/local/lib/iconv/lib &&    cf_search="$cf_search /usr/local/lib/iconv/lib"
	test -d /usr/local/iconv/lib &&       cf_search="$cf_search /usr/local/iconv/lib"
	test -d /usr/local/iconv/lib/iconv &&    cf_search="$cf_search /usr/local/iconv/lib/iconv"
}


test "/opt" != "$prefix" && \
test -d "/opt" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /opt"
	test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
	test -d /opt/lib/iconv &&       cf_search="$cf_search /opt/lib/iconv"
	test -d /opt/lib/iconv/lib &&    cf_search="$cf_search /opt/lib/iconv/lib"
	test -d /opt/iconv/lib &&       cf_search="$cf_search /opt/iconv/lib"
	test -d /opt/iconv/lib/iconv &&    cf_search="$cf_search /opt/iconv/lib/iconv"
}


test "$HOME" != "$prefix" && \
test -d "$HOME" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under $HOME"
	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
	test -d $HOME/lib/iconv &&       cf_search="$cf_search $HOME/lib/iconv"
	test -d $HOME/lib/iconv/lib &&    cf_search="$cf_search $HOME/lib/iconv/lib"
	test -d $HOME/iconv/lib &&       cf_search="$cf_search $HOME/iconv/lib"
	test -d $HOME/iconv/lib/iconv &&    cf_search="$cf_search $HOME/iconv/lib/iconv"
}



cf_search="$cf_library_path_list $cf_search"

        for cf_cv_library_path_iconv in $cf_search
        do
          if test -d $cf_cv_library_path_iconv ; then
            test -n "$verbose" && echo "	... testing $cf_cv_library_path_iconv" 1>&6

echo "${as_me-configure}:7776: testing ... testing $cf_cv_library_path_iconv ..." 1>&5


            CPPFLAGS="$cf_test_CPPFLAGS"
            LIBS="-liconv  $cf_save_LIBS"
            LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_iconv"
            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_c_try_link "$LINENO"; then :

                test -n "$verbose" && echo "	... found iconv library in $cf_cv_library_path_iconv" 1>&6

echo "${as_me-configure}:7804: testing ... found iconv library in $cf_cv_library_path_iconv ..." 1>&5


                cf_cv_find_linkage_iconv=yes
                cf_cv_library_file_iconv="-liconv"
                break
else

                CPPFLAGS="$cf_save_CPPFLAGS"
                LIBS="$cf_save_LIBS"
                LDFLAGS="$cf_save_LDFLAGS"

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
          fi
        done
        LIBS="$cf_save_LIBS"
        CPPFLAGS="$cf_save_CPPFLAGS"
        LDFLAGS="$cf_save_LDFLAGS"
      fi

    else
      cf_cv_find_linkage_iconv=no
    fi

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

if test "$cf_cv_find_linkage_iconv" = yes ; then
am_cv_func_iconv=yes
else
am_cv_func_iconv="no, consider installing GNU libiconv"
fi

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

  if test "$am_cv_func_iconv" = yes; then

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


    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the declaration of iconv() needs const." >&5
$as_echo_n "checking if the declaration of iconv() needs const.... " >&6; }
if ${am_cv_proto_iconv_const+:} 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

int
main ()
{

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

    if test "$am_cv_proto_iconv_const" = yes ; then
      am_cv_proto_iconv_arg1="const"
    else
      am_cv_proto_iconv_arg1=""
    fi


cat >>confdefs.h <<_ACEOF
#define ICONV_CONST $am_cv_proto_iconv_arg1
_ACEOF

  fi

  LIBICONV=
  if test "$cf_cv_find_linkage_iconv" = yes; then

if test -n "$cf_cv_header_path_iconv" ; then
  for cf_add_incdir in $cf_cv_header_path_iconv
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:7953: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi

    if test -n "$cf_cv_library_file_iconv" ; then
      LIBICONV="-liconv"

if test -n "$cf_cv_library_path_iconv" ; then
  for cf_add_libdir in $cf_cv_library_path_iconv
  do
    if test $cf_add_libdir = /usr/lib ; then
      :
    elif test -d $cf_add_libdir
    then
      cf_have_libdir=no
      if test -n "$LDFLAGS$LIBS" ; then
        # a loop is needed to ensure we can add subdirs of existing dirs
        for cf_test_libdir in $LDFLAGS $LIBS ; do
          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
            cf_have_libdir=yes; break
          fi
        done
      fi
      if test "$cf_have_libdir" = no ; then
        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me-configure}:7991: testing adding $cf_add_libdir to library-path ..." 1>&5


        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
      fi
    fi
  done
fi

    fi
  fi




  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
if ${am_cv_langinfo_codeset+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <langinfo.h>
int
main ()
{
char* cs = nl_langinfo(CODESET);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  am_cv_langinfo_codeset=yes
else
  am_cv_langinfo_codeset=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: $am_cv_langinfo_codeset" >&5
$as_echo "$am_cv_langinfo_codeset" >&6; }
  if test $am_cv_langinfo_codeset = yes; then

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

  fi

   if test $ac_cv_header_locale_h = yes; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
$as_echo_n "checking for LC_MESSAGES... " >&6; }
if ${am_cv_val_LC_MESSAGES+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <locale.h>
int
main ()
{
return LC_MESSAGES
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  am_cv_val_LC_MESSAGES=yes
else
  am_cv_val_LC_MESSAGES=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: $am_cv_val_LC_MESSAGES" >&5
$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
    if test $am_cv_val_LC_MESSAGES = yes; then

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

    fi
  fi
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
$as_echo_n "checking whether NLS is requested... " >&6; }

  # Check whether --enable-nls was given.
if test "${enable_nls+set}" = set; then :
  enableval=$enable_nls; USE_NLS=$enableval
else
  USE_NLS=no
fi

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


  BUILD_INCLUDED_LIBINTL=no
  USE_INCLUDED_LIBINTL=no
  INTLLIBS=

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

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

    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether included gettext is requested" >&5
$as_echo_n "checking whether included gettext is requested... " >&6; }

# Check whether --with-included-gettext was given.
if test "${with_included_gettext+set}" = set; then :
  withval=$with_included_gettext; nls_cv_force_use_gnu_gettext=$withval
else
  nls_cv_force_use_gnu_gettext=no
fi

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

    nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
    if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
                        CATOBJEXT=NONE

      cf_save_LIBS_1="$LIBS"
      LIBS="$LIBICONV $LIBS"
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libintl.h and gettext()" >&5
$as_echo_n "checking for libintl.h and gettext()... " >&6; }
if ${cf_cv_func_gettext+:} false; then :
  $as_echo_n "(cached) " >&6
else



# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
# will be set on completion of the AC_TRY_LINK below.
cf_cv_header_path_intl=
cf_cv_library_path_intl=


echo "${as_me-configure}:8127: testing Starting FIND_LINKAGE(intl,) ..." 1>&5


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

#include <libintl.h>
extern int _nl_msg_cat_cntr;

int
main ()
{

    bindtextdomain ("", "");
    return (int) gettext ("")

             + _nl_msg_cat_cntr

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_find_linkage_intl=yes
else

    cf_cv_find_linkage_intl=no

    test -n "$verbose" && echo "	find linkage for intl library" 1>&6

echo "${as_me-configure}:8157: testing find linkage for intl library ..." 1>&5



echo "${as_me-configure}:8161: testing Searching for headers in FIND_LINKAGE(intl,) ..." 1>&5


    cf_save_CPPFLAGS="$CPPFLAGS"
    cf_test_CPPFLAGS="$CPPFLAGS"


cf_header_path_list=""
if test -n "${CFLAGS}${CPPFLAGS}" ; then
	for cf_header_path in $CPPFLAGS $CFLAGS
	do
		case $cf_header_path in #(vi
		-I*)
			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`

test "$cf_header_path" != "NONE" && \
test -d "$cf_header_path" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
	test -d $cf_header_path/include/intl &&       cf_search="$cf_search $cf_header_path/include/intl"
	test -d $cf_header_path/include/intl/include &&    cf_search="$cf_search $cf_header_path/include/intl/include"
	test -d $cf_header_path/intl/include &&       cf_search="$cf_search $cf_header_path/intl/include"
	test -d $cf_header_path/intl/include/intl &&    cf_search="$cf_search $cf_header_path/intl/include/intl"
}

			cf_header_path_list="$cf_header_path_list $cf_search"
			;;
		esac
	done
fi

cf_search=""


test "/usr" != "$prefix" && \
test -d "/usr" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /usr"
	test -d /usr/include &&          cf_search="$cf_search /usr/include"
	test -d /usr/include/intl &&       cf_search="$cf_search /usr/include/intl"
	test -d /usr/include/intl/include &&    cf_search="$cf_search /usr/include/intl/include"
	test -d /usr/intl/include &&       cf_search="$cf_search /usr/intl/include"
	test -d /usr/intl/include/intl &&    cf_search="$cf_search /usr/intl/include/intl"
}


test "$prefix" != "NONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
	test -d $prefix/include/intl &&       cf_search="$cf_search $prefix/include/intl"
	test -d $prefix/include/intl/include &&    cf_search="$cf_search $prefix/include/intl/include"
	test -d $prefix/intl/include &&       cf_search="$cf_search $prefix/intl/include"
	test -d $prefix/intl/include/intl &&    cf_search="$cf_search $prefix/intl/include/intl"
}


test "/usr/local" != "$prefix" && \
test -d "/usr/local" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /usr/local"
	test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
	test -d /usr/local/include/intl &&       cf_search="$cf_search /usr/local/include/intl"
	test -d /usr/local/include/intl/include &&    cf_search="$cf_search /usr/local/include/intl/include"
	test -d /usr/local/intl/include &&       cf_search="$cf_search /usr/local/intl/include"
	test -d /usr/local/intl/include/intl &&    cf_search="$cf_search /usr/local/intl/include/intl"
}


test "/opt" != "$prefix" && \
test -d "/opt" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /opt"
	test -d /opt/include &&          cf_search="$cf_search /opt/include"
	test -d /opt/include/intl &&       cf_search="$cf_search /opt/include/intl"
	test -d /opt/include/intl/include &&    cf_search="$cf_search /opt/include/intl/include"
	test -d /opt/intl/include &&       cf_search="$cf_search /opt/intl/include"
	test -d /opt/intl/include/intl &&    cf_search="$cf_search /opt/intl/include/intl"
}


test "$HOME" != "$prefix" && \
test -d "$HOME" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under $HOME"
	test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
	test -d $HOME/include/intl &&       cf_search="$cf_search $HOME/include/intl"
	test -d $HOME/include/intl/include &&    cf_search="$cf_search $HOME/include/intl/include"
	test -d $HOME/intl/include &&       cf_search="$cf_search $HOME/intl/include"
	test -d $HOME/intl/include/intl &&    cf_search="$cf_search $HOME/intl/include/intl"
}



test "$includedir" != NONE && \
test "$includedir" != "/usr/include" && \
test -d "$includedir" && {
	test -d $includedir &&    cf_search="$cf_search $includedir"
	test -d $includedir/intl && cf_search="$cf_search $includedir/intl"
}

test "$oldincludedir" != NONE && \
test "$oldincludedir" != "/usr/include" && \
test -d "$oldincludedir" && {
	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
	test -d $oldincludedir/intl && cf_search="$cf_search $oldincludedir/intl"
}

cf_search="$cf_header_path_list $cf_search"

    for cf_cv_header_path_intl in $cf_search
    do
      if test -d $cf_cv_header_path_intl ; then
        test -n "$verbose" && echo "	... testing $cf_cv_header_path_intl" 1>&6

echo "${as_me-configure}:8278: testing ... testing $cf_cv_header_path_intl ..." 1>&5


        CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_intl"
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <libintl.h>
extern int _nl_msg_cat_cntr;

int
main ()
{

    bindtextdomain ("", "");
    return (int) gettext ("")

             + _nl_msg_cat_cntr

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

            test -n "$verbose" && echo "	... found intl headers in $cf_cv_header_path_intl" 1>&6

echo "${as_me-configure}:8305: testing ... found intl headers in $cf_cv_header_path_intl ..." 1>&5


            cf_cv_find_linkage_intl=maybe
            cf_test_CPPFLAGS="$CPPFLAGS"
            break
else

            CPPFLAGS="$cf_save_CPPFLAGS"

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

    if test "$cf_cv_find_linkage_intl" = maybe ; then


echo "${as_me-configure}:8323: testing Searching for intl library in FIND_LINKAGE(intl,) ..." 1>&5


      cf_save_LIBS="$LIBS"
      cf_save_LDFLAGS="$LDFLAGS"



      if test "$cf_cv_find_linkage_intl" != yes ; then

cf_library_path_list=""
if test -n "${LDFLAGS}${LIBS}" ; then
	for cf_library_path in $LDFLAGS $LIBS
	do
		case $cf_library_path in #(vi
		-L*)
			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`

test "$cf_library_path" != "NONE" && \
test -d "$cf_library_path" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
	test -d $cf_library_path/lib/intl &&       cf_search="$cf_search $cf_library_path/lib/intl"
	test -d $cf_library_path/lib/intl/lib &&    cf_search="$cf_search $cf_library_path/lib/intl/lib"
	test -d $cf_library_path/intl/lib &&       cf_search="$cf_search $cf_library_path/intl/lib"
	test -d $cf_library_path/intl/lib/intl &&    cf_search="$cf_search $cf_library_path/intl/lib/intl"
}

			cf_library_path_list="$cf_library_path_list $cf_search"
			;;
		esac
	done
fi

cf_search=""


test "/usr" != "$prefix" && \
test -d "/usr" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /usr"
	test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
	test -d /usr/lib/intl &&       cf_search="$cf_search /usr/lib/intl"
	test -d /usr/lib/intl/lib &&    cf_search="$cf_search /usr/lib/intl/lib"
	test -d /usr/intl/lib &&       cf_search="$cf_search /usr/intl/lib"
	test -d /usr/intl/lib/intl &&    cf_search="$cf_search /usr/intl/lib/intl"
}


test "$prefix" != "NONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
	test -d $prefix/lib/intl &&       cf_search="$cf_search $prefix/lib/intl"
	test -d $prefix/lib/intl/lib &&    cf_search="$cf_search $prefix/lib/intl/lib"
	test -d $prefix/intl/lib &&       cf_search="$cf_search $prefix/intl/lib"
	test -d $prefix/intl/lib/intl &&    cf_search="$cf_search $prefix/intl/lib/intl"
}


test "/usr/local" != "$prefix" && \
test -d "/usr/local" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /usr/local"
	test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
	test -d /usr/local/lib/intl &&       cf_search="$cf_search /usr/local/lib/intl"
	test -d /usr/local/lib/intl/lib &&    cf_search="$cf_search /usr/local/lib/intl/lib"
	test -d /usr/local/intl/lib &&       cf_search="$cf_search /usr/local/intl/lib"
	test -d /usr/local/intl/lib/intl &&    cf_search="$cf_search /usr/local/intl/lib/intl"
}


test "/opt" != "$prefix" && \
test -d "/opt" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /opt"
	test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
	test -d /opt/lib/intl &&       cf_search="$cf_search /opt/lib/intl"
	test -d /opt/lib/intl/lib &&    cf_search="$cf_search /opt/lib/intl/lib"
	test -d /opt/intl/lib &&       cf_search="$cf_search /opt/intl/lib"
	test -d /opt/intl/lib/intl &&    cf_search="$cf_search /opt/intl/lib/intl"
}


test "$HOME" != "$prefix" && \
test -d "$HOME" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under $HOME"
	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
	test -d $HOME/lib/intl &&       cf_search="$cf_search $HOME/lib/intl"
	test -d $HOME/lib/intl/lib &&    cf_search="$cf_search $HOME/lib/intl/lib"
	test -d $HOME/intl/lib &&       cf_search="$cf_search $HOME/intl/lib"
	test -d $HOME/intl/lib/intl &&    cf_search="$cf_search $HOME/intl/lib/intl"
}



cf_search="$cf_library_path_list $cf_search"

        for cf_cv_library_path_intl in $cf_search
        do
          if test -d $cf_cv_library_path_intl ; then
            test -n "$verbose" && echo "	... testing $cf_cv_library_path_intl" 1>&6

echo "${as_me-configure}:8429: testing ... testing $cf_cv_library_path_intl ..." 1>&5


            CPPFLAGS="$cf_test_CPPFLAGS"
            LIBS="-lintl  $cf_save_LIBS"
            LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_intl"
            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <libintl.h>
extern int _nl_msg_cat_cntr;

int
main ()
{

    bindtextdomain ("", "");
    return (int) gettext ("")

             + _nl_msg_cat_cntr

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

                test -n "$verbose" && echo "	... found intl library in $cf_cv_library_path_intl" 1>&6

echo "${as_me-configure}:8458: testing ... found intl library in $cf_cv_library_path_intl ..." 1>&5


                cf_cv_find_linkage_intl=yes
                cf_cv_library_file_intl="-lintl"
                break
else

                CPPFLAGS="$cf_save_CPPFLAGS"
                LIBS="$cf_save_LIBS"
                LDFLAGS="$cf_save_LDFLAGS"

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
          fi
        done
        LIBS="$cf_save_LIBS"
        CPPFLAGS="$cf_save_CPPFLAGS"
        LDFLAGS="$cf_save_LDFLAGS"
      fi

    else
      cf_cv_find_linkage_intl=no
    fi

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

if test "$cf_cv_find_linkage_intl" = yes ; then
cf_cv_func_gettext=yes
else
cf_cv_func_gettext=no
fi


fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_func_gettext" >&5
$as_echo "$cf_cv_func_gettext" >&6; }
      LIBS="$cf_save_LIBS_1"

      if test "$cf_cv_func_gettext" = yes ; then
        $as_echo "#define HAVE_LIBINTL_H 1" >>confdefs.h


                                        if test "$PACKAGE" != gettext; then

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



if test -n "$cf_cv_header_path_intl" ; then
  for cf_add_incdir in $cf_cv_header_path_intl
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:8558: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi


          if test -n "$cf_cv_library_file_intl" ; then
                                                INTLLIBS="$cf_cv_library_file_intl $LIBICONV"

if test -n "$cf_cv_library_path_intl" ; then
  for cf_add_libdir in $cf_cv_library_path_intl
  do
    if test $cf_add_libdir = /usr/lib ; then
      :
    elif test -d $cf_add_libdir
    then
      cf_have_libdir=no
      if test -n "$LDFLAGS$LIBS" ; then
        # a loop is needed to ensure we can add subdirs of existing dirs
        for cf_test_libdir in $LDFLAGS $LIBS ; do
          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
            cf_have_libdir=yes; break
          fi
        done
      fi
      if test "$cf_have_libdir" = no ; then
        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me-configure}:8597: testing adding $cf_add_libdir to library-path ..." 1>&5


        INTLLIBS="-L$cf_add_libdir $INTLLIBS"
      fi
    fi
  done
fi

          fi

          gt_save_LIBS="$LIBS"
          LIBS="$LIBS $INTLLIBS"
          for ac_func in dcgettext
do :
  ac_fn_c_check_func "$LINENO" "dcgettext" "ac_cv_func_dcgettext"
if test "x$ac_cv_func_dcgettext" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_DCGETTEXT 1
_ACEOF

fi
done

          LIBS="$gt_save_LIBS"

                    # Extract the first word of "msgfmt", so it can be a program name with args.

set dummy msgfmt; 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_MSGFMT+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case "$MSGFMT" in
  [\\/]*|?:[\\/]*)
  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word$ac_exeext; then
      if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
	ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exeext"
	break
      fi
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
  ;;
esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
if test "$MSGFMT" != ":"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
$as_echo "$MSGFMT" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi

          # Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; 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_GMSGFMT+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $GMSGFMT in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_GMSGFMT="$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_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
  ;;
esac
fi
GMSGFMT=$ac_cv_path_GMSGFMT
if test -n "$GMSGFMT"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
$as_echo "$GMSGFMT" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi



                    # Extract the first word of "xgettext", so it can be a program name with args.

set dummy xgettext; 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_XGETTEXT+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case "$XGETTEXT" in
  [\\/]*|?:[\\/]*)
  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word$ac_exeext; then
      if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
	ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exeext"
	break
      fi
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
  ;;
esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
if test "$XGETTEXT" != ":"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
$as_echo "$XGETTEXT" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


          CATOBJEXT=.gmo
        fi
      fi

      if test "$CATOBJEXT" = "NONE"; then
                        nls_cv_use_gnu_gettext=yes
      fi
    fi

    if test "$nls_cv_use_gnu_gettext" = "yes"; then
      if test ! -d $srcdir/intl ; then
        as_fn_error $? "no NLS library is packaged with this application" "$LINENO" 5
      fi
            INTLOBJS="\$(GETTOBJS)"
      # Extract the first word of "msgfmt", so it can be a program name with args.

set dummy msgfmt; 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_MSGFMT+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case "$MSGFMT" in
  [\\/]*|?:[\\/]*)
  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word$ac_exeext; then
      if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
	ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exeext"
	break
      fi
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
  ;;
esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
if test "$MSGFMT" != ":"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
$as_echo "$MSGFMT" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi

      # Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; 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_GMSGFMT+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $GMSGFMT in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_GMSGFMT="$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_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
  ;;
esac
fi
GMSGFMT=$ac_cv_path_GMSGFMT
if test -n "$GMSGFMT"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
$as_echo "$GMSGFMT" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


      # Extract the first word of "xgettext", so it can be a program name with args.

set dummy xgettext; 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_XGETTEXT+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case "$XGETTEXT" in
  [\\/]*|?:[\\/]*)
  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word$ac_exeext; then
      if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
	ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exeext"
	break
      fi
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
  ;;
esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
if test "$XGETTEXT" != ":"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
$as_echo "$XGETTEXT" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


      BUILD_INCLUDED_LIBINTL=yes
      USE_INCLUDED_LIBINTL=yes
      CATOBJEXT=.gmo
      INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
      LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
    fi

            if test "$GMSGFMT" != ":"; then
                  if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
        : ;
      else
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found msgfmt program is not GNU msgfmt; ignore it" >&5
$as_echo "found msgfmt program is not GNU msgfmt; ignore it" >&6; }
        GMSGFMT=":"
      fi
    fi

            if test "$XGETTEXT" != ":"; then
                      if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
        : ;
      else
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5
$as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
        XGETTEXT=":"
      fi
    fi

        POSUB=po
  fi

  ac_config_commands="$ac_config_commands default-1"


      if test "$PACKAGE" = gettext; then
    BUILD_INCLUDED_LIBINTL=yes
  fi

                      if test "$nls_cv_use_gnu_gettext" = "yes"; then
    for ac_prog in bison
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_INTLBISON+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$INTLBISON"; then
  ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_INTLBISON="$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
INTLBISON=$ac_cv_prog_INTLBISON
if test -n "$INTLBISON"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLBISON" >&5
$as_echo "$INTLBISON" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$INTLBISON" && break
done

    if test -z "$INTLBISON"; then
      ac_verc_fail=yes
    else
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of bison" >&5
$as_echo_n "checking version of bison... " >&6; }
      ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
      case $ac_prog_version in
        '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
        1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
           ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
        *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
      esac
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5
$as_echo "$ac_prog_version" >&6; }
    fi
    if test $ac_verc_fail = yes; then
      INTLBISON=:
    fi
  fi

        for lang in $ALL_LINGUAS; do
    GMOFILES="$GMOFILES $lang.gmo"
    POFILES="$POFILES $lang.po"
  done











    nls_cv_header_intl=
  nls_cv_header_libgt=

    DATADIRNAME=share


    INSTOBJEXT=.mo


    GENCAT=gencat



   if test "x$CATOBJEXT" != "x"; then
     if test "x$ALL_LINGUAS" = "x"; then
       LINGUAS=
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
$as_echo_n "checking for catalogs to be installed... " >&6; }
       NEW_LINGUAS=
       for presentlang in $ALL_LINGUAS; do
         useit=no
         for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
           # Use the presentlang catalog if desiredlang is
           #   a. equal to presentlang, or
           #   b. a variant of presentlang (because in this case,
           #      presentlang can be used as a fallback for messages
           #      which are not translated in the desiredlang catalog).
           case "$desiredlang" in
             "$presentlang"*) useit=yes;;
           esac
         done
         if test $useit = yes; then
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
         fi
       done
       LINGUAS=$NEW_LINGUAS
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
$as_echo "$LINGUAS" >&6; }
     fi

          if test -n "$LINGUAS"; then
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
     fi
   fi

                  MKINSTALLDIRS=
   if test -n "$ac_aux_dir"; then
     MKINSTALLDIRS="$ac_aux_dir/mkdirs.sh"
   fi
   if test -z "$MKINSTALLDIRS"; then
     MKINSTALLDIRS="\$(top_srcdir)/mkdirs.sh"
   fi
   if test -n "$GNUSYSTEM_AUX_DIR" ; then
     if test -e "${GNUSYSTEM_AUX_DIR}/mkinstalldirs"; then
       MKINSTALLDIRS="${GNUSYSTEM_AUX_DIR}/mkinstalldirs"
     fi
   fi


      INTL_LIBTOOL_SUFFIX_PREFIX=



INTLDIR_MAKE=
MSG_DIR_MAKE=
SUB_MAKEFILE=


cf_makefile=makefile

use_our_messages=no
if test "$USE_NLS" = yes ; then
if test -d $srcdir/po ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should use included message-library" >&5
$as_echo_n "checking if we should use included message-library... " >&6; }
	# Check whether --enable-included-msgs was given.
if test "${enable_included_msgs+set}" = set; then :
  enableval=$enable_included_msgs; use_our_messages=$enableval
else
  use_our_messages=yes
fi

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

MSG_DIR_MAKE="#"
if test "$use_our_messages" = yes
then
	SUB_MAKEFILE="$SUB_MAKEFILE po/$cf_makefile.in:$srcdir/po/$cf_makefile.inn"
	MSG_DIR_MAKE=
fi





if test "$USE_INCLUDED_LIBINTL" = yes ; then
        if test "$nls_cv_force_use_gnu_gettext" = yes ; then
		:
	elif test "$nls_cv_use_gnu_gettext" = yes ; then
		:
	else
		INTLDIR_MAKE="#"
	fi
	if test -z "$INTLDIR_MAKE"; then
		$as_echo "#define HAVE_LIBGETTEXT_H 1" >>confdefs.h

		for cf_makefile in \
			$srcdir/intl/Makefile.in \
			$srcdir/intl/makefile.in
		do
			if test -f "$cf_makefile" ; then
				SUB_MAKEFILE="$SUB_MAKEFILE `echo \"${cf_makefile}\"|sed -e 's,^'$srcdir/',,' -e 's/\.in$//'`:${cf_makefile}"
				break
			fi
		done
	fi
else
	INTLDIR_MAKE="#"
	if test "$USE_NLS" = yes ; then
		for ac_header in libintl.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
if test "x$ac_cv_header_libintl_h" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBINTL_H 1
_ACEOF

fi

done

	fi
fi

if test -z "$INTLDIR_MAKE" ; then
	CPPFLAGS="$CPPFLAGS -I../intl"
fi

if test "$BUILD_INCLUDED_LIBINTL" = yes ; then
	GT_YES="#"
	GT_NO=
else
	GT_YES=
	GT_NO="#"
fi







if test "$USE_INCLUDED_LIBINTL" = yes ; then
	if test "$nls_cv_force_use_gnu_gettext" = yes ; then
		$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h

	elif test "$nls_cv_use_gnu_gettext" = yes ; then
		$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h

	fi
	if test -n "$nls_cv_header_intl" ; then
		$as_echo "#define HAVE_LIBINTL_H 1" >>confdefs.h

	fi
fi


INTLDIR_CPPFLAGS="#"
if test -z "$INTLDIR_MAKE" ; then
	INTLDIR_CPPFLAGS=
fi




# Check whether --with-nls-datadir was given.
if test "${with_nls_datadir+set}" = set; then :
  withval=$with_nls_datadir;
else
  withval="${NLS_DATADIR-$prefix/$DATADIRNAME}"
fi
if test -n "$prefix/$DATADIRNAME" ; then

if test "x$prefix" != xNONE; then
  cf_path_syntax="$prefix"
else
  cf_path_syntax="$ac_default_prefix"
fi

case ".$withval" in #(vi
.\$\(*\)*|.\'*\'*) #(vi
  ;;
..|./*|.\\*) #(vi
  ;;
.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
  ;;
.\${*prefix}*) #(vi
  eval withval="$withval"
  case ".$withval" in #(vi
  .NONE/*)
    withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
    ;;
  esac
  ;; #(vi
.no|.NONE/*)
  withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
  ;;
*)
  as_fn_error $? "expected a pathname, not \"$withval\"" "$LINENO" 5
  ;;
esac

fi
NLS_DATADIR="$withval"


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want full utility pathnames" >&5
$as_echo_n "checking if you want full utility pathnames... " >&6; }
# Check whether --enable-full-paths was given.
if test "${enable_full_paths+set}" = set; then :
  enableval=$enable_full_paths; test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    with_full_paths=no
  else
    with_full_paths=yes
  fi
else
  enableval=yes
  with_full_paths=yes

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_full_paths" >&5
$as_echo "$with_full_paths" >&6; }
test $with_full_paths = no && $as_echo "#define USE_EXECVP 1" >>confdefs.h



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for system mailer" >&5
$as_echo_n "checking for system mailer... " >&6; }
if ${cf_cv_SYSTEM_MAIL+:} false; then :
  $as_echo_n "(cached) " >&6
else

	cf_cv_SYSTEM_MAIL=unknown
	for cv_path in /usr/mmdf/bin/submit \
	/usr/sbin/sendmail \
	/usr/lib/sendmail  \

	do
		if test -f $cv_path ; then
			cf_cv_SYSTEM_MAIL=$cv_path
			break
		fi
	done

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_SYSTEM_MAIL" >&5
$as_echo "$cf_cv_SYSTEM_MAIL" >&6; }
cat >>confdefs.h <<_ACEOF
#define SYSTEM_MAIL "$cf_cv_SYSTEM_MAIL"
_ACEOF



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking system mail flags" >&5
$as_echo_n "checking system mail flags... " >&6; }
if ${cf_cv_system_mail_flags+:} false; then :
  $as_echo_n "(cached) " >&6
else

	case $cf_cv_SYSTEM_MAIL in
	*/mmdf/*)
		cf_cv_system_mail_flags="-mlruxto,cc\\\\*"
        	;;
	*)
        	cf_cv_system_mail_flags="-t -oi"
	esac

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_system_mail_flags" >&5
$as_echo "$cf_cv_system_mail_flags" >&6; }
cat >>confdefs.h <<_ACEOF
#define SYSTEM_MAIL_FLAGS "$cf_cv_system_mail_flags"
_ACEOF


if test -n "$SYSTEM_MAIL" ; then
if test $with_full_paths = no ; then
	SYSTEM_MAIL=`basename $SYSTEM_MAIL`
fi
fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC -U and -D options work together" >&5
$as_echo_n "checking if $CC -U and -D options work together... " >&6; }
if ${cf_cv_cc_u_d_options+:} false; then :
  $as_echo_n "(cached) " >&6
else

	cf_save_CPPFLAGS="$CPPFLAGS"
	CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

#ifndef U_D_OPTIONS
make an undefined-error
#endif
#ifdef  D_U_OPTIONS
make a defined-error
#endif

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

	cf_cv_cc_u_d_options=yes
else

	cf_cv_cc_u_d_options=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
	CPPFLAGS="$cf_save_CPPFLAGS"

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





cf_XOPEN_SOURCE=600
cf_POSIX_C_SOURCE=199506L

case $host_os in #(vi
aix[456]*) #(vi
	CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
	;;
freebsd*|dragonfly*) #(vi
	# 5.x headers associate
	#	_XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
	#	_XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
	cf_POSIX_C_SOURCE=200112L
	cf_XOPEN_SOURCE=600
	CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
	;;
hpux*) #(vi
	CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
	;;
irix[56].*) #(vi
	CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
	;;
linux*|gnu*|mint*|k*bsd*-gnu) #(vi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we must define _GNU_SOURCE" >&5
$as_echo_n "checking if we must define _GNU_SOURCE... " >&6; }
if ${cf_cv_gnu_source+:} false; then :
  $as_echo_n "(cached) " >&6
else

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
int
main ()
{

#ifndef _XOPEN_SOURCE
make an error
#endif
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_gnu_source=no
else
  cf_save="$CPPFLAGS"
	 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
int
main ()
{

#ifdef _XOPEN_SOURCE
make an error
#endif
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_gnu_source=no
else
  cf_cv_gnu_source=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
	CPPFLAGS="$cf_save"

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

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_gnu_source" >&5
$as_echo "$cf_cv_gnu_source" >&6; }
test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"

	;;
mirbsd*) #(vi
	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
	;;
netbsd*) #(vi
	# setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
	;;
openbsd*) #(vi
	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
	;;
osf[45]*) #(vi
	CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
	;;
nto-qnx*) #(vi
	CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
	;;
sco*) #(vi
	# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
	;;
solaris*) #(vi
	CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
	;;
*)
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should define _XOPEN_SOURCE" >&5
$as_echo_n "checking if we should define _XOPEN_SOURCE... " >&6; }
if ${cf_cv_xopen_source+:} false; then :
  $as_echo_n "(cached) " >&6
else

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
int
main ()
{

#ifndef _XOPEN_SOURCE
make an error
#endif
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_xopen_source=no
else
  cf_save="$CPPFLAGS"
	 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
int
main ()
{

#ifdef _XOPEN_SOURCE
make an error
#endif
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_xopen_source=no
else
  cf_cv_xopen_source=$cf_XOPEN_SOURCE
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
	CPPFLAGS="$cf_save"

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

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

# remove _XOPEN_SOURCE symbol from $CFLAGS
CFLAGS=`echo "$CFLAGS" | \
	sed	-e 's/-[UD]_XOPEN_SOURCE\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]_XOPEN_SOURCE\(=[^ 	]*\)\?$//g'`


# remove _XOPEN_SOURCE symbol from $CPPFLAGS
CPPFLAGS=`echo "$CPPFLAGS" | \
	sed	-e 's/-[UD]_XOPEN_SOURCE\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]_XOPEN_SOURCE\(=[^ 	]*\)\?$//g'`

		test "$cf_cv_cc_u_d_options" = yes && \
			CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
		CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
	fi

cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE

cf_save_CFLAGS="$CFLAGS"
cf_save_CPPFLAGS="$CPPFLAGS"


# remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
	sed	-e 's/-[UD]_POSIX_C_SOURCE\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]_POSIX_C_SOURCE\(=[^ 	]*\)\?$//g'`


# remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
	sed	-e 's/-[UD]_POSIX_C_SOURCE\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]_POSIX_C_SOURCE\(=[^ 	]*\)\?$//g'`


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should define _POSIX_C_SOURCE" >&5
$as_echo_n "checking if we should define _POSIX_C_SOURCE... " >&6; }
if ${cf_cv_posix_c_source+:} false; then :
  $as_echo_n "(cached) " >&6
else


echo "${as_me-configure}:9526: testing if the symbol is already defined go no further ..." 1>&5

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
int
main ()
{

#ifndef _POSIX_C_SOURCE
make an error
#endif
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_posix_c_source=no
else
  cf_want_posix_source=no
	 case .$cf_POSIX_C_SOURCE in #(vi
	 .[12]??*) #(vi
		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
		;;
	 .2) #(vi
		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
		cf_want_posix_source=yes
		;;
	 .*)
		cf_want_posix_source=yes
		;;
	 esac
	 if test "$cf_want_posix_source" = yes ; then
		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
int
main ()
{

#ifdef _POSIX_SOURCE
make an error
#endif
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
	 fi

echo "${as_me-configure}:9581: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5

	 CFLAGS="$cf_trim_CFLAGS"
	 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"

echo "${as_me-configure}:9586: testing if the second compile does not leave our definition intact error ..." 1>&5

	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
int
main ()
{

#ifndef _POSIX_C_SOURCE
make an error
#endif
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_cv_posix_c_source=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
	 CFLAGS="$cf_save_CFLAGS"
	 CPPFLAGS="$cf_save_CPPFLAGS"

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

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

if test "$cf_cv_posix_c_source" != no ; then
	CFLAGS="$cf_trim_CFLAGS"
	CPPFLAGS="$cf_trim_CPPFLAGS"
	if test "$cf_cv_cc_u_d_options" = yes ; then
		cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
				sed -e 's/-D/-U/g' -e 's/=[^ 	]*//g'`
		CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
	fi
	CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
fi


	;;
esac


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if SIGWINCH is defined" >&5
$as_echo_n "checking if SIGWINCH is defined... " >&6; }
if ${cf_cv_define_sigwinch+:} false; then :
  $as_echo_n "(cached) " >&6
else

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

#include <sys/types.h>
#include <sys/signal.h>

int
main ()
{
int x = SIGWINCH
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_define_sigwinch=yes
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#undef _XOPEN_SOURCE
#undef _POSIX_SOURCE
#undef _POSIX_C_SOURCE
#include <sys/types.h>
#include <sys/signal.h>

int
main ()
{
int x = SIGWINCH
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_define_sigwinch=maybe
else
  cf_cv_define_sigwinch=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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_define_sigwinch" >&5
$as_echo "$cf_cv_define_sigwinch" >&6; }

if test "$cf_cv_define_sigwinch" = maybe ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for actual SIGWINCH definition" >&5
$as_echo_n "checking for actual SIGWINCH definition... " >&6; }
if ${cf_cv_fixup_sigwinch+:} false; then :
  $as_echo_n "(cached) " >&6
else

cf_cv_fixup_sigwinch=unknown
cf_sigwinch=32
while test $cf_sigwinch != 1
do
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#undef _XOPEN_SOURCE
#undef _POSIX_SOURCE
#undef _POSIX_C_SOURCE
#include <sys/types.h>
#include <sys/signal.h>

int
main ()
{

#if SIGWINCH != $cf_sigwinch
make an error
#endif
int x = SIGWINCH
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_fixup_sigwinch=$cf_sigwinch
	 break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

cf_sigwinch=`expr $cf_sigwinch - 1`
done

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

	if test "$cf_cv_fixup_sigwinch" != unknown ; then
		CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
	fi
fi


if test -n "$TRY_CFLAGS" ; then

test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6

echo "${as_me-configure}:9743: testing checking additions to CFLAGS ..." 1>&5


cf_check_cflags="$CFLAGS"
cf_check_cppflags="$CPPFLAGS"

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $TRY_CFLAGS
do
case $cf_fix_cppflags in
no)
	case $cf_add_cflags in #(vi
	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
		case $cf_add_cflags in
		-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
			&& test -z "${cf_tst_cflags}" \
			&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then
				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then
				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		*$cf_add_cflags) #(vi
			;;
		*) #(vi
			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
			;;
		esac
		;;
	*)
		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
		;;
	esac
	;;
yes)
	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
	&& test -z "${cf_tst_cflags}" \
	&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then
	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6

echo "${as_me-configure}:9805: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5


	CFLAGS="$CFLAGS $cf_new_cflags"
fi

if test -n "$cf_new_cppflags" ; then
	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6

echo "${as_me-configure}:9814: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5


	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
fi

if test -n "$cf_new_extra_cppflags" ; then
	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6

echo "${as_me-configure}:9823: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5


	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
fi




if test "$cf_check_cflags" != "$CFLAGS" ; then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello world");
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :

else
  test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6

echo "${as_me-configure}:9849: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5


	 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6

echo "${as_me-configure}:9855: testing but keeping change to \$CPPFLAGS ..." 1>&5


	 fi
	 CFLAGS="$cf_check_flags"
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi

fi


### Look for network libraries first, since some functions (such as gethostname)
### are used in a lot of places.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want NSS compatible SSL libraries" >&5
$as_echo_n "checking if you want NSS compatible SSL libraries... " >&6; }
if ${cf_cv_use_libnss_compat+:} false; then :
  $as_echo_n "(cached) " >&6
else


# Check whether --with-nss-compat was given.
if test "${with_nss_compat+set}" = set; then :
  withval=$with_nss_compat; cf_cv_use_libnss_compat=$withval
else
  cf_cv_use_libnss_compat=no
fi


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

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want ssl library" >&5
$as_echo_n "checking if you want ssl library... " >&6; }
if ${cf_cv_use_libssl+:} false; then :
  $as_echo_n "(cached) " >&6
else


# Check whether --with-ssl was given.
if test "${with_ssl+set}" = set; then :
  withval=$with_ssl; cf_cv_use_libssl=$withval
else
  cf_cv_use_libssl=no
fi


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

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want gnutls support" >&5
$as_echo_n "checking if you want gnutls support... " >&6; }
if ${cf_cv_use_libgnutls+:} false; then :
  $as_echo_n "(cached) " >&6
else


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


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

# this option is mainly for comparing with/without Lynx's wrapper for GNUTLS.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want gnutls-openssl compat" >&5
$as_echo_n "checking if you want gnutls-openssl compat... " >&6; }
if ${cf_cv_gnutls_compat+:} false; then :
  $as_echo_n "(cached) " >&6
else

# Check whether --enable-gnutls-compat was given.
if test "${enable_gnutls_compat+set}" = set; then :
  enableval=$enable_gnutls_compat; cf_cv_gnutls_compat=$withval
else
  cf_cv_gnutls_compat=no
fi


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

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want socks library" >&5
$as_echo_n "checking if you want socks library... " >&6; }
if ${cf_cv_use_libsocks+:} false; then :
  $as_echo_n "(cached) " >&6
else


# Check whether --with-socks was given.
if test "${with_socks+set}" = set; then :
  withval=$with_socks; cf_cv_use_libsocks=$withval
else
  cf_cv_use_libsocks=no
fi


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

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want socks5 library" >&5
$as_echo_n "checking if you want socks5 library... " >&6; }
if ${cf_cv_use_libsocks5+:} false; then :
  $as_echo_n "(cached) " >&6
else


# Check whether --with-socks5 was given.
if test "${with_socks5+set}" = set; then :
  withval=$with_socks5; cf_cv_use_libsocks5=$withval
else
  cf_cv_use_libsocks5=no
fi


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

if test "x$cf_cv_use_libsocks" != xno ; then


  case "$cf_cv_use_libsocks" in #(vi
  no) #(vi
      ;;
  yes) #(vi
      ;;
  *)


for cf_searchpath in `echo "$cf_cv_use_libsocks" | tr $PATH_SEPARATOR ' '`; do
	if test -d $cf_searchpath/include; then

if test -n "$cf_searchpath/include" ; then
  for cf_add_incdir in $cf_searchpath/include
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:10046: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi

	elif test -d $cf_searchpath/../include ; then

if test -n "$cf_searchpath/../include" ; then
  for cf_add_incdir in $cf_searchpath/../include
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:10112: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi

	else
as_fn_error $? "cannot find socks library under $cf_cv_use_libsocks" "$LINENO" 5
	fi
	if test -d $cf_searchpath/lib; then

if test -n "$cf_searchpath/lib" ; then
  for cf_add_libdir in $cf_searchpath/lib
  do
    if test $cf_add_libdir = /usr/lib ; then
      :
    elif test -d $cf_add_libdir
    then
      cf_have_libdir=no
      if test -n "$LDFLAGS$LIBS" ; then
        # a loop is needed to ensure we can add subdirs of existing dirs
        for cf_test_libdir in $LDFLAGS $LIBS ; do
          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
            cf_have_libdir=yes; break
          fi
        done
      fi
      if test "$cf_have_libdir" = no ; then
        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me-configure}:10152: testing adding $cf_add_libdir to library-path ..." 1>&5


        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
      fi
    fi
  done
fi

	elif test -d $cf_searchpath ; then

if test -n "$cf_searchpath" ; then
  for cf_add_libdir in $cf_searchpath
  do
    if test $cf_add_libdir = /usr/lib ; then
      :
    elif test -d $cf_add_libdir
    then
      cf_have_libdir=no
      if test -n "$LDFLAGS$LIBS" ; then
        # a loop is needed to ensure we can add subdirs of existing dirs
        for cf_test_libdir in $LDFLAGS $LIBS ; do
          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
            cf_have_libdir=yes; break
          fi
        done
      fi
      if test "$cf_have_libdir" = no ; then
        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me-configure}:10182: testing adding $cf_add_libdir to library-path ..." 1>&5


        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
      fi
    fi
  done
fi

	else
as_fn_error $? "cannot find socks library under $cf_cv_use_libsocks" "$LINENO" 5
	fi
done

      ;;
  esac



# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
# will be set on completion of the AC_TRY_LINK below.
cf_cv_header_path_socks=
cf_cv_library_path_socks=


echo "${as_me-configure}:10207: testing Starting FIND_LINKAGE(socks,) ..." 1>&5


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

#include <stdio.h>

int
main ()
{

      Raccept((char *)0)

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_find_linkage_socks=yes
else

    cf_cv_find_linkage_socks=no

    test -n "$verbose" && echo "	find linkage for socks library" 1>&6

echo "${as_me-configure}:10233: testing find linkage for socks library ..." 1>&5



echo "${as_me-configure}:10237: testing Searching for headers in FIND_LINKAGE(socks,) ..." 1>&5


    cf_save_CPPFLAGS="$CPPFLAGS"
    cf_test_CPPFLAGS="$CPPFLAGS"


cf_header_path_list=""
if test -n "${CFLAGS}${CPPFLAGS}" ; then
	for cf_header_path in $CPPFLAGS $CFLAGS
	do
		case $cf_header_path in #(vi
		-I*)
			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`

test "$cf_header_path" != "NONE" && \
test -d "$cf_header_path" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
	test -d $cf_header_path/include/socks &&       cf_search="$cf_search $cf_header_path/include/socks"
	test -d $cf_header_path/include/socks/include &&    cf_search="$cf_search $cf_header_path/include/socks/include"
	test -d $cf_header_path/socks/include &&       cf_search="$cf_search $cf_header_path/socks/include"
	test -d $cf_header_path/socks/include/socks &&    cf_search="$cf_search $cf_header_path/socks/include/socks"
}

			cf_header_path_list="$cf_header_path_list $cf_search"
			;;
		esac
	done
fi

cf_search=""


test "/usr" != "$prefix" && \
test -d "/usr" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /usr"
	test -d /usr/include &&          cf_search="$cf_search /usr/include"
	test -d /usr/include/socks &&       cf_search="$cf_search /usr/include/socks"
	test -d /usr/include/socks/include &&    cf_search="$cf_search /usr/include/socks/include"
	test -d /usr/socks/include &&       cf_search="$cf_search /usr/socks/include"
	test -d /usr/socks/include/socks &&    cf_search="$cf_search /usr/socks/include/socks"
}


test "$prefix" != "NONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
	test -d $prefix/include/socks &&       cf_search="$cf_search $prefix/include/socks"
	test -d $prefix/include/socks/include &&    cf_search="$cf_search $prefix/include/socks/include"
	test -d $prefix/socks/include &&       cf_search="$cf_search $prefix/socks/include"
	test -d $prefix/socks/include/socks &&    cf_search="$cf_search $prefix/socks/include/socks"
}


test "/usr/local" != "$prefix" && \
test -d "/usr/local" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /usr/local"
	test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
	test -d /usr/local/include/socks &&       cf_search="$cf_search /usr/local/include/socks"
	test -d /usr/local/include/socks/include &&    cf_search="$cf_search /usr/local/include/socks/include"
	test -d /usr/local/socks/include &&       cf_search="$cf_search /usr/local/socks/include"
	test -d /usr/local/socks/include/socks &&    cf_search="$cf_search /usr/local/socks/include/socks"
}


test "/opt" != "$prefix" && \
test -d "/opt" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /opt"
	test -d /opt/include &&          cf_search="$cf_search /opt/include"
	test -d /opt/include/socks &&       cf_search="$cf_search /opt/include/socks"
	test -d /opt/include/socks/include &&    cf_search="$cf_search /opt/include/socks/include"
	test -d /opt/socks/include &&       cf_search="$cf_search /opt/socks/include"
	test -d /opt/socks/include/socks &&    cf_search="$cf_search /opt/socks/include/socks"
}


test "$HOME" != "$prefix" && \
test -d "$HOME" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under $HOME"
	test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
	test -d $HOME/include/socks &&       cf_search="$cf_search $HOME/include/socks"
	test -d $HOME/include/socks/include &&    cf_search="$cf_search $HOME/include/socks/include"
	test -d $HOME/socks/include &&       cf_search="$cf_search $HOME/socks/include"
	test -d $HOME/socks/include/socks &&    cf_search="$cf_search $HOME/socks/include/socks"
}



test "$includedir" != NONE && \
test "$includedir" != "/usr/include" && \
test -d "$includedir" && {
	test -d $includedir &&    cf_search="$cf_search $includedir"
	test -d $includedir/socks && cf_search="$cf_search $includedir/socks"
}

test "$oldincludedir" != NONE && \
test "$oldincludedir" != "/usr/include" && \
test -d "$oldincludedir" && {
	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
	test -d $oldincludedir/socks && cf_search="$cf_search $oldincludedir/socks"
}

cf_search="$cf_header_path_list $cf_search"

    for cf_cv_header_path_socks in $cf_search
    do
      if test -d $cf_cv_header_path_socks ; then
        test -n "$verbose" && echo "	... testing $cf_cv_header_path_socks" 1>&6

echo "${as_me-configure}:10354: testing ... testing $cf_cv_header_path_socks ..." 1>&5


        CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_socks"
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdio.h>

int
main ()
{

      Raccept((char *)0)

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

            test -n "$verbose" && echo "	... found socks headers in $cf_cv_header_path_socks" 1>&6

echo "${as_me-configure}:10377: testing ... found socks headers in $cf_cv_header_path_socks ..." 1>&5


            cf_cv_find_linkage_socks=maybe
            cf_test_CPPFLAGS="$CPPFLAGS"
            break
else

            CPPFLAGS="$cf_save_CPPFLAGS"

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

    if test "$cf_cv_find_linkage_socks" = maybe ; then


echo "${as_me-configure}:10395: testing Searching for socks library in FIND_LINKAGE(socks,) ..." 1>&5


      cf_save_LIBS="$LIBS"
      cf_save_LDFLAGS="$LDFLAGS"



      if test "$cf_cv_find_linkage_socks" != yes ; then

cf_library_path_list=""
if test -n "${LDFLAGS}${LIBS}" ; then
	for cf_library_path in $LDFLAGS $LIBS
	do
		case $cf_library_path in #(vi
		-L*)
			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`

test "$cf_library_path" != "NONE" && \
test -d "$cf_library_path" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
	test -d $cf_library_path/lib/socks &&       cf_search="$cf_search $cf_library_path/lib/socks"
	test -d $cf_library_path/lib/socks/lib &&    cf_search="$cf_search $cf_library_path/lib/socks/lib"
	test -d $cf_library_path/socks/lib &&       cf_search="$cf_search $cf_library_path/socks/lib"
	test -d $cf_library_path/socks/lib/socks &&    cf_search="$cf_search $cf_library_path/socks/lib/socks"
}

			cf_library_path_list="$cf_library_path_list $cf_search"
			;;
		esac
	done
fi

cf_search=""


test "/usr" != "$prefix" && \
test -d "/usr" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /usr"
	test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
	test -d /usr/lib/socks &&       cf_search="$cf_search /usr/lib/socks"
	test -d /usr/lib/socks/lib &&    cf_search="$cf_search /usr/lib/socks/lib"
	test -d /usr/socks/lib &&       cf_search="$cf_search /usr/socks/lib"
	test -d /usr/socks/lib/socks &&    cf_search="$cf_search /usr/socks/lib/socks"
}


test "$prefix" != "NONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
	test -d $prefix/lib/socks &&       cf_search="$cf_search $prefix/lib/socks"
	test -d $prefix/lib/socks/lib &&    cf_search="$cf_search $prefix/lib/socks/lib"
	test -d $prefix/socks/lib &&       cf_search="$cf_search $prefix/socks/lib"
	test -d $prefix/socks/lib/socks &&    cf_search="$cf_search $prefix/socks/lib/socks"
}


test "/usr/local" != "$prefix" && \
test -d "/usr/local" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /usr/local"
	test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
	test -d /usr/local/lib/socks &&       cf_search="$cf_search /usr/local/lib/socks"
	test -d /usr/local/lib/socks/lib &&    cf_search="$cf_search /usr/local/lib/socks/lib"
	test -d /usr/local/socks/lib &&       cf_search="$cf_search /usr/local/socks/lib"
	test -d /usr/local/socks/lib/socks &&    cf_search="$cf_search /usr/local/socks/lib/socks"
}


test "/opt" != "$prefix" && \
test -d "/opt" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /opt"
	test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
	test -d /opt/lib/socks &&       cf_search="$cf_search /opt/lib/socks"
	test -d /opt/lib/socks/lib &&    cf_search="$cf_search /opt/lib/socks/lib"
	test -d /opt/socks/lib &&       cf_search="$cf_search /opt/socks/lib"
	test -d /opt/socks/lib/socks &&    cf_search="$cf_search /opt/socks/lib/socks"
}


test "$HOME" != "$prefix" && \
test -d "$HOME" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under $HOME"
	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
	test -d $HOME/lib/socks &&       cf_search="$cf_search $HOME/lib/socks"
	test -d $HOME/lib/socks/lib &&    cf_search="$cf_search $HOME/lib/socks/lib"
	test -d $HOME/socks/lib &&       cf_search="$cf_search $HOME/socks/lib"
	test -d $HOME/socks/lib/socks &&    cf_search="$cf_search $HOME/socks/lib/socks"
}



cf_search="$cf_library_path_list $cf_search"

        for cf_cv_library_path_socks in $cf_search
        do
          if test -d $cf_cv_library_path_socks ; then
            test -n "$verbose" && echo "	... testing $cf_cv_library_path_socks" 1>&6

echo "${as_me-configure}:10501: testing ... testing $cf_cv_library_path_socks ..." 1>&5


            CPPFLAGS="$cf_test_CPPFLAGS"
            LIBS="-lsocks  $cf_save_LIBS"
            LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_socks"
            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdio.h>

int
main ()
{

      Raccept((char *)0)

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

                test -n "$verbose" && echo "	... found socks library in $cf_cv_library_path_socks" 1>&6

echo "${as_me-configure}:10526: testing ... found socks library in $cf_cv_library_path_socks ..." 1>&5


                cf_cv_find_linkage_socks=yes
                cf_cv_library_file_socks="-lsocks"
                break
else

                CPPFLAGS="$cf_save_CPPFLAGS"
                LIBS="$cf_save_LIBS"
                LDFLAGS="$cf_save_LDFLAGS"

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
          fi
        done
        LIBS="$cf_save_LIBS"
        CPPFLAGS="$cf_save_CPPFLAGS"
        LDFLAGS="$cf_save_LDFLAGS"
      fi

    else
      cf_cv_find_linkage_socks=no
    fi

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

if test "$cf_cv_find_linkage_socks" = yes ; then
cf_cv_have_socks=yes
else
cf_cv_have_socks=no
fi


  if test "$cf_cv_have_socks" = yes ; then
    $as_echo "#define SOCKS 1" >>confdefs.h


    $as_echo "#define accept Raccept" >>confdefs.h

    $as_echo "#define bind Rbind" >>confdefs.h

    $as_echo "#define connect Rconnect" >>confdefs.h

    $as_echo "#define getpeername Rgetpeername" >>confdefs.h

    $as_echo "#define getsockname Rgetsockname" >>confdefs.h

    $as_echo "#define listen Rlisten" >>confdefs.h

    $as_echo "#define recvfrom Rrecvfrom" >>confdefs.h

    $as_echo "#define select Rselect" >>confdefs.h



if test -n "$cf_cv_header_path_socks" ; then
  for cf_add_incdir in $cf_cv_header_path_socks
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:10633: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi


if test -n "$cf_cv_library_path_socks" ; then
  for cf_add_libdir in $cf_cv_library_path_socks
  do
    if test $cf_add_libdir = /usr/lib ; then
      :
    elif test -d $cf_add_libdir
    then
      cf_have_libdir=no
      if test -n "$LDFLAGS$LIBS" ; then
        # a loop is needed to ensure we can add subdirs of existing dirs
        for cf_test_libdir in $LDFLAGS $LIBS ; do
          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
            cf_have_libdir=yes; break
          fi
        done
      fi
      if test "$cf_have_libdir" = no ; then
        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me-configure}:10669: testing adding $cf_add_libdir to library-path ..." 1>&5


        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
      fi
    fi
  done
fi

    LIBS="$LIBS -lsocks"
  else
    as_fn_error $? "cannot link with socks library" "$LINENO" 5
  fi

elif test "x$cf_cv_use_libsocks5" != xno ; then


  case "$cf_cv_use_libsocks5" in #(vi
  no) #(vi
      ;;
  yes) #(vi
      ;;
  *)


for cf_searchpath in `echo "$cf_cv_use_libsocks5" | tr $PATH_SEPARATOR ' '`; do
	if test -d $cf_searchpath/include; then

if test -n "$cf_searchpath/include" ; then
  for cf_add_incdir in $cf_searchpath/include
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:10745: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi

	elif test -d $cf_searchpath/../include ; then

if test -n "$cf_searchpath/../include" ; then
  for cf_add_incdir in $cf_searchpath/../include
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:10811: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi

	else
as_fn_error $? "cannot find socks5 library under $cf_cv_use_libsocks5" "$LINENO" 5
	fi
	if test -d $cf_searchpath/lib; then

if test -n "$cf_searchpath/lib" ; then
  for cf_add_libdir in $cf_searchpath/lib
  do
    if test $cf_add_libdir = /usr/lib ; then
      :
    elif test -d $cf_add_libdir
    then
      cf_have_libdir=no
      if test -n "$LDFLAGS$LIBS" ; then
        # a loop is needed to ensure we can add subdirs of existing dirs
        for cf_test_libdir in $LDFLAGS $LIBS ; do
          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
            cf_have_libdir=yes; break
          fi
        done
      fi
      if test "$cf_have_libdir" = no ; then
        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me-configure}:10851: testing adding $cf_add_libdir to library-path ..." 1>&5


        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
      fi
    fi
  done
fi

	elif test -d $cf_searchpath ; then

if test -n "$cf_searchpath" ; then
  for cf_add_libdir in $cf_searchpath
  do
    if test $cf_add_libdir = /usr/lib ; then
      :
    elif test -d $cf_add_libdir
    then
      cf_have_libdir=no
      if test -n "$LDFLAGS$LIBS" ; then
        # a loop is needed to ensure we can add subdirs of existing dirs
        for cf_test_libdir in $LDFLAGS $LIBS ; do
          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
            cf_have_libdir=yes; break
          fi
        done
      fi
      if test "$cf_have_libdir" = no ; then
        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me-configure}:10881: testing adding $cf_add_libdir to library-path ..." 1>&5


        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
      fi
    fi
  done
fi

	else
as_fn_error $? "cannot find socks5 library under $cf_cv_use_libsocks5" "$LINENO" 5
	fi
done

      ;;
  esac


LIBS="$LIBS -lsocks5"

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

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


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the socks library uses socks4 prefix" >&5
$as_echo_n "checking if the socks library uses socks4 prefix... " >&6; }
cf_use_socks4=error
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <socks.h>
int
main ()
{

	Rinit((char *)0)
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  $as_echo "#define USE_SOCKS4_PREFIX 1" >>confdefs.h

	 cf_use_socks4=yes
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <socks.h>
int
main ()
{
SOCKSinit((char *)0)
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_use_socks4=no
else
  as_fn_error $? "Cannot link with socks5 library" "$LINENO" 5
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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_use_socks4" >&5
$as_echo "$cf_use_socks4" >&6; }

if test "$cf_use_socks4" = "yes" ; then
	$as_echo "#define accept Raccept" >>confdefs.h

	$as_echo "#define bind Rbind" >>confdefs.h

	$as_echo "#define connect Rconnect" >>confdefs.h

	$as_echo "#define getpeername Rgetpeername" >>confdefs.h

	$as_echo "#define getsockname Rgetsockname" >>confdefs.h

	$as_echo "#define listen Rlisten" >>confdefs.h

	$as_echo "#define recvfrom Rrecvfrom" >>confdefs.h

	$as_echo "#define select Rselect" >>confdefs.h

else
	$as_echo "#define accept SOCKSaccept" >>confdefs.h

	$as_echo "#define getpeername SOCKSgetpeername" >>confdefs.h

	$as_echo "#define getsockname SOCKSgetsockname" >>confdefs.h

	$as_echo "#define recvfrom SOCKSrecvfrom" >>confdefs.h

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if socks5p.h is available" >&5
$as_echo_n "checking if socks5p.h is available... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#define INCLUDE_PROTOTYPES
#include <socks.h>
int
main ()
{

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

test "$cf_use_socks5p_h" = yes && $as_echo "#define INCLUDE_PROTOTYPES 1" >>confdefs.h


else

cf_test_netlibs=no

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for network libraries" >&5
$as_echo_n "checking for network libraries... " >&6; }

if ${cf_cv_netlibs+:} false; then :
  $as_echo_n "(cached) " >&6
else

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

cf_cv_netlibs=""
cf_test_netlibs=yes

case $host_os in #(vi
mingw32) # (vi
	for ac_header in windows.h winsock.h winsock2.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"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done


	if test "$ac_cv_header_winsock2_h" = "yes" ; then
		cf_winsock_lib="-lws2_32"
	elif test "$ac_cv_header_winsock_h" = "yes" ; then
		cf_winsock_lib="-lwsock32"
	fi

	cf_save_LIBS="$LIBS"
	LIBS="$cf_winsock_lib $LIBS"

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

#ifdef HAVE_WINDOWS_H
#undef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#else
#ifdef HAVE_WINSOCK_H
#include <winsock.h>
#endif
#endif
#endif

int
main ()
{

	char buffer[1024];
	gethostname(buffer, sizeof(buffer));
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_netlibs="$cf_winsock_lib $cf_cv_netlibs"
else
  as_fn_error $? "Cannot link against winsock library" "$LINENO" 5
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

	LIBS="$cf_save_LIBS"
	;;
*)
	for ac_func in gethostname
do :
  ac_fn_c_check_func "$LINENO" "gethostname" "ac_cv_func_gethostname"
if test "x$ac_cv_func_gethostname" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_GETHOSTNAME 1
_ACEOF

else


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostname in -lnsl" >&5
$as_echo_n "checking for gethostname in -lnsl... " >&6; }
if ${ac_cv_lib_nsl_gethostname+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lnsl $cf_cv_netlibs $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 gethostname ();
int
main ()
{
return gethostname ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_nsl_gethostname=yes
else
  ac_cv_lib_nsl_gethostname=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_gethostname" >&5
$as_echo "$ac_cv_lib_nsl_gethostname" >&6; }
if test "x$ac_cv_lib_nsl_gethostname" = xyes; then :


cf_tr_func=`echo "gethostname" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

	cat >>confdefs.h <<_ACEOF
#define HAVE_$cf_tr_func 1
_ACEOF

	ac_cv_func_gethostname=yes
	if test "$cf_used_lib_nsl" != yes ; then cf_used_lib_nsl=yes; cf_cv_netlibs="-lnsl $cf_cv_netlibs"; fi
else

	ac_cv_func_gethostname=unknown
	unset ac_cv_func_gethostname 2>/dev/null


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostname in -lsocket" >&5
$as_echo_n "checking for gethostname in -lsocket... " >&6; }
if ${ac_cv_lib_socket_gethostname+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket $cf_cv_netlibs $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 gethostname ();
int
main ()
{
return gethostname ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_socket_gethostname=yes
else
  ac_cv_lib_socket_gethostname=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_gethostname" >&5
$as_echo "$ac_cv_lib_socket_gethostname" >&6; }
if test "x$ac_cv_lib_socket_gethostname" = xyes; then :


cf_tr_func=`echo "gethostname" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

	cat >>confdefs.h <<_ACEOF
#define HAVE_$cf_tr_func 1
_ACEOF

	ac_cv_func_gethostname=yes
	if test "$cf_used_lib_socket" != yes ; then cf_used_lib_socket=yes; cf_cv_netlibs="-lsocket $cf_cv_netlibs"; fi
else

	ac_cv_func_gethostname=unknown
	unset ac_cv_func_gethostname 2>/dev/null

fi


fi


fi
done


	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -linet" >&5
$as_echo_n "checking for main in -linet... " >&6; }
if ${ac_cv_lib_inet_main+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-linet  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */


int
main ()
{
return main ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_inet_main=yes
else
  ac_cv_lib_inet_main=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_inet_main" >&5
$as_echo "$ac_cv_lib_inet_main" >&6; }
if test "x$ac_cv_lib_inet_main" = xyes; then :
  cf_cv_netlibs="-linet $cf_cv_netlibs"
fi


	if test "$ac_cv_func_lsocket" != no ; then
	for ac_func in socket
do :
  ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
if test "x$ac_cv_func_socket" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_SOCKET 1
_ACEOF

else


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
$as_echo_n "checking for socket in -lsocket... " >&6; }
if ${ac_cv_lib_socket_socket+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket $cf_cv_netlibs $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 socket ();
int
main ()
{
return socket ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_socket_socket=yes
else
  ac_cv_lib_socket_socket=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_socket" >&5
$as_echo "$ac_cv_lib_socket_socket" >&6; }
if test "x$ac_cv_lib_socket_socket" = xyes; then :


cf_tr_func=`echo "socket" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

	cat >>confdefs.h <<_ACEOF
#define HAVE_$cf_tr_func 1
_ACEOF

	ac_cv_func_socket=yes
	if test "$cf_used_lib_socket" != yes ; then cf_used_lib_socket=yes; cf_cv_netlibs="-lsocket $cf_cv_netlibs"; fi
else

	ac_cv_func_socket=unknown
	unset ac_cv_func_socket 2>/dev/null


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lbsd" >&5
$as_echo_n "checking for socket in -lbsd... " >&6; }
if ${ac_cv_lib_bsd_socket+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lbsd $cf_cv_netlibs $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 socket ();
int
main ()
{
return socket ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_bsd_socket=yes
else
  ac_cv_lib_bsd_socket=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_socket" >&5
$as_echo "$ac_cv_lib_bsd_socket" >&6; }
if test "x$ac_cv_lib_bsd_socket" = xyes; then :


cf_tr_func=`echo "socket" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

	cat >>confdefs.h <<_ACEOF
#define HAVE_$cf_tr_func 1
_ACEOF

	ac_cv_func_socket=yes
	if test "$cf_used_lib_bsd" != yes ; then cf_used_lib_bsd=yes; cf_cv_netlibs="-lbsd $cf_cv_netlibs"; fi
else

	ac_cv_func_socket=unknown
	unset ac_cv_func_socket 2>/dev/null

fi


fi


fi
done

	fi

	for ac_func in gethostbyname
do :
  ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
if test "x$ac_cv_func_gethostbyname" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_GETHOSTBYNAME 1
_ACEOF

else


{ $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 $cf_cv_netlibs $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_c_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" = xyes; then :


cf_tr_func=`echo "gethostbyname" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

	cat >>confdefs.h <<_ACEOF
#define HAVE_$cf_tr_func 1
_ACEOF

	ac_cv_func_gethostbyname=yes
	if test "$cf_used_lib_nsl" != yes ; then cf_used_lib_nsl=yes; cf_cv_netlibs="-lnsl $cf_cv_netlibs"; fi
else

	ac_cv_func_gethostbyname=unknown
	unset ac_cv_func_gethostbyname 2>/dev/null

fi


fi
done


	for ac_func in strcasecmp
do :
  ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
if test "x$ac_cv_func_strcasecmp" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_STRCASECMP 1
_ACEOF

else


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strcasecmp in -lresolv" >&5
$as_echo_n "checking for strcasecmp in -lresolv... " >&6; }
if ${ac_cv_lib_resolv_strcasecmp+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lresolv $cf_cv_netlibs $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 strcasecmp ();
int
main ()
{
return strcasecmp ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_resolv_strcasecmp=yes
else
  ac_cv_lib_resolv_strcasecmp=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_resolv_strcasecmp" >&5
$as_echo "$ac_cv_lib_resolv_strcasecmp" >&6; }
if test "x$ac_cv_lib_resolv_strcasecmp" = xyes; then :


cf_tr_func=`echo "strcasecmp" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

	cat >>confdefs.h <<_ACEOF
#define HAVE_$cf_tr_func 1
_ACEOF

	ac_cv_func_strcasecmp=yes
	if test "$cf_used_lib_resolv" != yes ; then cf_used_lib_resolv=yes; cf_cv_netlibs="-lresolv $cf_cv_netlibs"; fi
else

	ac_cv_func_strcasecmp=unknown
	unset ac_cv_func_strcasecmp 2>/dev/null

fi


fi
done

	;;
esac

fi


case $cf_cv_netlibs in #(vi
*ws2_32*)
	$as_echo "#define USE_WINSOCK2_H 1" >>confdefs.h

	;;
esac

LIBS="$LIBS $cf_cv_netlibs"
test $cf_test_netlibs = no && echo "$cf_cv_netlibs" >&6

fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton function" >&5
$as_echo_n "checking for inet_aton function... " >&6; }
if ${cf_cv_have_inet_aton+:} false; then :
  $as_echo_n "(cached) " >&6
else

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>

int
main ()
{
inet_aton(0, (struct in_addr *)0)
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_have_inet_aton=yes
else
  cf_cv_have_inet_aton=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: $cf_cv_have_inet_aton" >&5
$as_echo "$cf_cv_have_inet_aton" >&6; }
if test "$cf_cv_have_inet_aton" = yes ; then
    $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h

else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_addr function" >&5
$as_echo_n "checking for inet_addr function... " >&6; }
if ${cf_cv_have_inet_addr+:} false; then :
  $as_echo_n "(cached) " >&6
else

    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>

int
main ()
{
inet_addr(0)
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_have_inet_addr=yes
else
  cf_cv_have_inet_addr=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: $cf_cv_have_inet_addr" >&5
$as_echo "$cf_cv_have_inet_addr" >&6; }
    if test "$cf_cv_have_inet_addr" = no ; then
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library with inet_addr" >&5
$as_echo_n "checking for library with inet_addr... " >&6; }
if ${cf_cv_lib_inet_addr+:} false; then :
  $as_echo_n "(cached) " >&6
else

	    cf_save_LIBS="$LIBS"
	    for cf_inetlib in -lbind -lresolv
	    do
		LIBS="$cf_save_LIBS $cf_inetlib"
		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>

int
main ()
{
inet_addr(0)
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_lib_inet_addr=$cf_inetlib
else
  cf_cv_lib_inet_addr=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
		LIBS="$cf_save_LIBS"
		test "$cf_cv_lib_inet_addr" != no && break
	    done

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_lib_inet_addr" >&5
$as_echo "$cf_cv_lib_inet_addr" >&6; }
	if test "$cf_cv_lib_inet_addr" != no ; then
	    LIBS="$LIBS $cf_cv_lib_inet_addr"
	else
	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to find library for inet_addr function" >&5
$as_echo "$as_me: WARNING: Unable to find library for inet_addr function" >&2;}
	fi
    fi
fi



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want to use pkg-config" >&5
$as_echo_n "checking if you want to use pkg-config... " >&6; }

# Check whether --with-pkg-config was given.
if test "${with_pkg_config+set}" = set; then :
  withval=$with_pkg_config; cf_pkg_config=$withval
else
  cf_pkg_config=yes
fi

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

case $cf_pkg_config in #(vi
no) #(vi
	PKG_CONFIG=none
	;;
yes) #(vi
	# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-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_PKG_CONFIG+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PKG_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

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


	;;
*)
	PKG_CONFIG=$withval
	;;
esac

test -z "$PKG_CONFIG" && PKG_CONFIG=none
if test "$PKG_CONFIG" != none ; then

if test "x$prefix" != xNONE; then
  cf_path_syntax="$prefix"
else
  cf_path_syntax="$ac_default_prefix"
fi

case ".$PKG_CONFIG" in #(vi
.\$\(*\)*|.\'*\'*) #(vi
  ;;
..|./*|.\\*) #(vi
  ;;
.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
  ;;
.\${*prefix}*) #(vi
  eval PKG_CONFIG="$PKG_CONFIG"
  case ".$PKG_CONFIG" in #(vi
  .NONE/*)
    PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
    ;;
  esac
  ;; #(vi
.no|.NONE/*)
  PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
  ;;
*)
  as_fn_error $? "expected a pathname, not \"$PKG_CONFIG\"" "$LINENO" 5
  ;;
esac

fi




if test "x$cf_cv_use_libssl"  != xno ; then


	cf_cv_have_ssl=no

	# command-line option, etc., override default behavior

  case "$cf_cv_use_libssl" in #(vi
  no) #(vi
      ;;
  yes) #(vi
      ;;
  *)


for cf_searchpath in `echo "$cf_cv_use_libssl" | tr $PATH_SEPARATOR ' '`; do
	if test -d $cf_searchpath/include; then

if test -n "$cf_searchpath/include" ; then
  for cf_add_incdir in $cf_searchpath/include
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:11818: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi

	elif test -d $cf_searchpath/../include ; then

if test -n "$cf_searchpath/../include" ; then
  for cf_add_incdir in $cf_searchpath/../include
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:11884: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi

	else
as_fn_error $? "cannot find ssl library under $cf_cv_use_libssl" "$LINENO" 5
	fi
	if test -d $cf_searchpath/lib; then

if test -n "$cf_searchpath/lib" ; then
  for cf_add_libdir in $cf_searchpath/lib
  do
    if test $cf_add_libdir = /usr/lib ; then
      :
    elif test -d $cf_add_libdir
    then
      cf_have_libdir=no
      if test -n "$LDFLAGS$LIBS" ; then
        # a loop is needed to ensure we can add subdirs of existing dirs
        for cf_test_libdir in $LDFLAGS $LIBS ; do
          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
            cf_have_libdir=yes; break
          fi
        done
      fi
      if test "$cf_have_libdir" = no ; then
        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me-configure}:11924: testing adding $cf_add_libdir to library-path ..." 1>&5


        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
      fi
    fi
  done
fi

	elif test -d $cf_searchpath ; then

if test -n "$cf_searchpath" ; then
  for cf_add_libdir in $cf_searchpath
  do
    if test $cf_add_libdir = /usr/lib ; then
      :
    elif test -d $cf_add_libdir
    then
      cf_have_libdir=no
      if test -n "$LDFLAGS$LIBS" ; then
        # a loop is needed to ensure we can add subdirs of existing dirs
        for cf_test_libdir in $LDFLAGS $LIBS ; do
          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
            cf_have_libdir=yes; break
          fi
        done
      fi
      if test "$cf_have_libdir" = no ; then
        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me-configure}:11954: testing adding $cf_add_libdir to library-path ..." 1>&5


        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
      fi
    fi
  done
fi

	else
as_fn_error $? "cannot find ssl library under $cf_cv_use_libssl" "$LINENO" 5
	fi
done

      ;;
  esac


	if test "x$PKG_CONFIG" != xnone; then
		case $cf_cv_use_libssl in #(vi
		no) #(vi
			;;
		yes) # if no explicit directory given, try pkg-config
			if "$PKG_CONFIG" --exists openssl ; then
				cf_cv_have_ssl=yes

				cf_cflags_ssl=`$PKG_CONFIG --cflags openssl`
				cf_libs_ssl=`$PKG_CONFIG --libs openssl`

				if test -n "$cf_cflags_ssl" ; then
					case "$cf_cflags_ssl" in #(vi
					*-I*) #(vi
						cf_cv_header_path_ssl=`echo "$cf_cflags_ssl" | sed -e 's/^.*-I//' -e 's/ .*//'`
						;;
					*)
						cf_cv_header_path_ssl=/usr/include
						;;
					esac
					if test -d $cf_cv_header_path_ssl/openssl ; then
						cf_cv_header_path_ssl=$cf_cv_header_path_ssl/openssl
					fi

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $cf_cflags_ssl
do
case $cf_fix_cppflags in
no)
	case $cf_add_cflags in #(vi
	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
		case $cf_add_cflags in
		-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
			&& test -z "${cf_tst_cflags}" \
			&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then
				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then
				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		*$cf_add_cflags) #(vi
			;;
		*) #(vi
			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
			;;
		esac
		;;
	*)
		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
		;;
	esac
	;;
yes)
	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
	&& test -z "${cf_tst_cflags}" \
	&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	CFLAGS="$CFLAGS $cf_new_cflags"
fi

if test -n "$cf_new_cppflags" ; then

	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
fi

if test -n "$cf_new_extra_cppflags" ; then

	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
fi




				fi

				if test -n "$cf_libs_ssl" ; then
					case "x$cf_libs_ssl" in #(vi
					*-L*) #(vi
						cf_cv_library_path_ssl=`echo "$cf_libs_ssl" | sed -e 's/^.*-L//' -e 's/ .*//'`
						;;
					*)
						cf_cv_library_path_ssl=/usr/lib
						;;
					esac
					test -n "$verbose" && echo "	adding $cf_libs_ssl to LIBS" 1>&6

echo "${as_me-configure}:12080: testing adding $cf_libs_ssl to LIBS ..." 1>&5


					LIBS="$cf_libs_ssl $LIBS"
				fi
			fi
			;;
		esac
	fi

	if test "$cf_cv_have_ssl" != yes; then
		case $host_os in #(vi
		mingw*) #(vi
			cf_extra_ssl_libs="-lcrypto -lgdi32"
			;;
		*)
			# openssl 0.9.6 and up use dynamic loading for engines.
			cf_extra_ssl_libs="-lcrypto"
			case "x$LIBS" in #(vi
			*-ldl) #(vi
				;;
			*)
				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5
$as_echo_n "checking for dlsym in -ldl... " >&6; }
if ${ac_cv_lib_dl_dlsym+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl  $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 dlsym ();
int
main ()
{
return dlsym ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_dl_dlsym=yes
else
  ac_cv_lib_dl_dlsym=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_dl_dlsym" >&5
$as_echo "$ac_cv_lib_dl_dlsym" >&6; }
if test "x$ac_cv_lib_dl_dlsym" = xyes; then :
  cf_extra_ssl_libs="$cf_extra_ssl_libs -ldl"
fi

				;;
			esac
			;;
		esac



# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
# will be set on completion of the AC_TRY_LINK below.
cf_cv_header_path_ssl=
cf_cv_library_path_ssl=


echo "${as_me-configure}:12155: testing Starting FIND_LINKAGE(ssl,openssl) ..." 1>&5


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

#include <stdio.h>
#if defined(USE_OPENSSL_INCL)
#include <openssl/ssl.h>
#elif defined(USE_GNUTLS_FUNCS)
#include <gnutls/gnutls.h>
#elif defined(USE_GNUTLS_INCL)
#include <gnutls/openssl.h>
#else
#include <ssl.h>
#endif

int
main ()
{

#ifdef USE_GNUTLS_FUNCS
    gnutls_global_init();
#else
    SSL_shutdown((SSL *)0)
#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_find_linkage_ssl=yes
else

    cf_cv_find_linkage_ssl=no

    test -n "$verbose" && echo "	find linkage for ssl library" 1>&6

echo "${as_me-configure}:12194: testing find linkage for ssl library ..." 1>&5



echo "${as_me-configure}:12198: testing Searching for headers in FIND_LINKAGE(ssl,openssl) ..." 1>&5


    cf_save_CPPFLAGS="$CPPFLAGS"
    cf_test_CPPFLAGS="$CPPFLAGS"


cf_header_path_list=""
if test -n "${CFLAGS}${CPPFLAGS}" ; then
	for cf_header_path in $CPPFLAGS $CFLAGS
	do
		case $cf_header_path in #(vi
		-I*)
			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`

test "$cf_header_path" != "NONE" && \
test -d "$cf_header_path" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
	test -d $cf_header_path/include/openssl &&       cf_search="$cf_search $cf_header_path/include/openssl"
	test -d $cf_header_path/include/openssl/include &&    cf_search="$cf_search $cf_header_path/include/openssl/include"
	test -d $cf_header_path/openssl/include &&       cf_search="$cf_search $cf_header_path/openssl/include"
	test -d $cf_header_path/openssl/include/openssl &&    cf_search="$cf_search $cf_header_path/openssl/include/openssl"
}

			cf_header_path_list="$cf_header_path_list $cf_search"
			;;
		esac
	done
fi

cf_search=""


test "/usr" != "$prefix" && \
test -d "/usr" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /usr"
	test -d /usr/include &&          cf_search="$cf_search /usr/include"
	test -d /usr/include/openssl &&       cf_search="$cf_search /usr/include/openssl"
	test -d /usr/include/openssl/include &&    cf_search="$cf_search /usr/include/openssl/include"
	test -d /usr/openssl/include &&       cf_search="$cf_search /usr/openssl/include"
	test -d /usr/openssl/include/openssl &&    cf_search="$cf_search /usr/openssl/include/openssl"
}


test "$prefix" != "NONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
	test -d $prefix/include/openssl &&       cf_search="$cf_search $prefix/include/openssl"
	test -d $prefix/include/openssl/include &&    cf_search="$cf_search $prefix/include/openssl/include"
	test -d $prefix/openssl/include &&       cf_search="$cf_search $prefix/openssl/include"
	test -d $prefix/openssl/include/openssl &&    cf_search="$cf_search $prefix/openssl/include/openssl"
}


test "/usr/local" != "$prefix" && \
test -d "/usr/local" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /usr/local"
	test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
	test -d /usr/local/include/openssl &&       cf_search="$cf_search /usr/local/include/openssl"
	test -d /usr/local/include/openssl/include &&    cf_search="$cf_search /usr/local/include/openssl/include"
	test -d /usr/local/openssl/include &&       cf_search="$cf_search /usr/local/openssl/include"
	test -d /usr/local/openssl/include/openssl &&    cf_search="$cf_search /usr/local/openssl/include/openssl"
}


test "/opt" != "$prefix" && \
test -d "/opt" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /opt"
	test -d /opt/include &&          cf_search="$cf_search /opt/include"
	test -d /opt/include/openssl &&       cf_search="$cf_search /opt/include/openssl"
	test -d /opt/include/openssl/include &&    cf_search="$cf_search /opt/include/openssl/include"
	test -d /opt/openssl/include &&       cf_search="$cf_search /opt/openssl/include"
	test -d /opt/openssl/include/openssl &&    cf_search="$cf_search /opt/openssl/include/openssl"
}


test "$HOME" != "$prefix" && \
test -d "$HOME" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under $HOME"
	test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
	test -d $HOME/include/openssl &&       cf_search="$cf_search $HOME/include/openssl"
	test -d $HOME/include/openssl/include &&    cf_search="$cf_search $HOME/include/openssl/include"
	test -d $HOME/openssl/include &&       cf_search="$cf_search $HOME/openssl/include"
	test -d $HOME/openssl/include/openssl &&    cf_search="$cf_search $HOME/openssl/include/openssl"
}



test "$includedir" != NONE && \
test "$includedir" != "/usr/include" && \
test -d "$includedir" && {
	test -d $includedir &&    cf_search="$cf_search $includedir"
	test -d $includedir/openssl && cf_search="$cf_search $includedir/openssl"
}

test "$oldincludedir" != NONE && \
test "$oldincludedir" != "/usr/include" && \
test -d "$oldincludedir" && {
	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
	test -d $oldincludedir/openssl && cf_search="$cf_search $oldincludedir/openssl"
}

cf_search="$cf_header_path_list $cf_search"

    for cf_cv_header_path_ssl in $cf_search
    do
      if test -d $cf_cv_header_path_ssl ; then
        test -n "$verbose" && echo "	... testing $cf_cv_header_path_ssl" 1>&6

echo "${as_me-configure}:12315: testing ... testing $cf_cv_header_path_ssl ..." 1>&5


        CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_ssl"
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdio.h>
#if defined(USE_OPENSSL_INCL)
#include <openssl/ssl.h>
#elif defined(USE_GNUTLS_FUNCS)
#include <gnutls/gnutls.h>
#elif defined(USE_GNUTLS_INCL)
#include <gnutls/openssl.h>
#else
#include <ssl.h>
#endif

int
main ()
{

#ifdef USE_GNUTLS_FUNCS
    gnutls_global_init();
#else
    SSL_shutdown((SSL *)0)
#endif

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

            test -n "$verbose" && echo "	... found ssl headers in $cf_cv_header_path_ssl" 1>&6

echo "${as_me-configure}:12351: testing ... found ssl headers in $cf_cv_header_path_ssl ..." 1>&5


            cf_cv_find_linkage_ssl=maybe
            cf_test_CPPFLAGS="$CPPFLAGS"
            break
else

            CPPFLAGS="$cf_save_CPPFLAGS"

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

    if test "$cf_cv_find_linkage_ssl" = maybe ; then


echo "${as_me-configure}:12369: testing Searching for ssl library in FIND_LINKAGE(ssl,openssl) ..." 1>&5


      cf_save_LIBS="$LIBS"
      cf_save_LDFLAGS="$LDFLAGS"


        CPPFLAGS="$cf_test_CPPFLAGS"
        LIBS="-lssl $cf_extra_ssl_libs $cf_save_LIBS"
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdio.h>
#if defined(USE_OPENSSL_INCL)
#include <openssl/ssl.h>
#elif defined(USE_GNUTLS_FUNCS)
#include <gnutls/gnutls.h>
#elif defined(USE_GNUTLS_INCL)
#include <gnutls/openssl.h>
#else
#include <ssl.h>
#endif

int
main ()
{

#ifdef USE_GNUTLS_FUNCS
    gnutls_global_init();
#else
    SSL_shutdown((SSL *)0)
#endif

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

            test -n "$verbose" && echo "	... found ssl library in system" 1>&6

echo "${as_me-configure}:12410: testing ... found ssl library in system ..." 1>&5


            cf_cv_find_linkage_ssl=yes
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
            CPPFLAGS="$cf_save_CPPFLAGS"
            LIBS="$cf_save_LIBS"


      if test "$cf_cv_find_linkage_ssl" != yes ; then

cf_library_path_list=""
if test -n "${LDFLAGS}${LIBS}" ; then
	for cf_library_path in $LDFLAGS $LIBS
	do
		case $cf_library_path in #(vi
		-L*)
			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`

test "$cf_library_path" != "NONE" && \
test -d "$cf_library_path" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
	test -d $cf_library_path/lib/ssl &&       cf_search="$cf_search $cf_library_path/lib/ssl"
	test -d $cf_library_path/lib/ssl/lib &&    cf_search="$cf_search $cf_library_path/lib/ssl/lib"
	test -d $cf_library_path/ssl/lib &&       cf_search="$cf_search $cf_library_path/ssl/lib"
	test -d $cf_library_path/ssl/lib/ssl &&    cf_search="$cf_search $cf_library_path/ssl/lib/ssl"
}

			cf_library_path_list="$cf_library_path_list $cf_search"
			;;
		esac
	done
fi

cf_search=""


test "/usr" != "$prefix" && \
test -d "/usr" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /usr"
	test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
	test -d /usr/lib/ssl &&       cf_search="$cf_search /usr/lib/ssl"
	test -d /usr/lib/ssl/lib &&    cf_search="$cf_search /usr/lib/ssl/lib"
	test -d /usr/ssl/lib &&       cf_search="$cf_search /usr/ssl/lib"
	test -d /usr/ssl/lib/ssl &&    cf_search="$cf_search /usr/ssl/lib/ssl"
}


test "$prefix" != "NONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
	test -d $prefix/lib/ssl &&       cf_search="$cf_search $prefix/lib/ssl"
	test -d $prefix/lib/ssl/lib &&    cf_search="$cf_search $prefix/lib/ssl/lib"
	test -d $prefix/ssl/lib &&       cf_search="$cf_search $prefix/ssl/lib"
	test -d $prefix/ssl/lib/ssl &&    cf_search="$cf_search $prefix/ssl/lib/ssl"
}


test "/usr/local" != "$prefix" && \
test -d "/usr/local" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /usr/local"
	test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
	test -d /usr/local/lib/ssl &&       cf_search="$cf_search /usr/local/lib/ssl"
	test -d /usr/local/lib/ssl/lib &&    cf_search="$cf_search /usr/local/lib/ssl/lib"
	test -d /usr/local/ssl/lib &&       cf_search="$cf_search /usr/local/ssl/lib"
	test -d /usr/local/ssl/lib/ssl &&    cf_search="$cf_search /usr/local/ssl/lib/ssl"
}


test "/opt" != "$prefix" && \
test -d "/opt" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /opt"
	test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
	test -d /opt/lib/ssl &&       cf_search="$cf_search /opt/lib/ssl"
	test -d /opt/lib/ssl/lib &&    cf_search="$cf_search /opt/lib/ssl/lib"
	test -d /opt/ssl/lib &&       cf_search="$cf_search /opt/ssl/lib"
	test -d /opt/ssl/lib/ssl &&    cf_search="$cf_search /opt/ssl/lib/ssl"
}


test "$HOME" != "$prefix" && \
test -d "$HOME" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under $HOME"
	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
	test -d $HOME/lib/ssl &&       cf_search="$cf_search $HOME/lib/ssl"
	test -d $HOME/lib/ssl/lib &&    cf_search="$cf_search $HOME/lib/ssl/lib"
	test -d $HOME/ssl/lib &&       cf_search="$cf_search $HOME/ssl/lib"
	test -d $HOME/ssl/lib/ssl &&    cf_search="$cf_search $HOME/ssl/lib/ssl"
}



cf_search="$cf_library_path_list $cf_search"

        for cf_cv_library_path_ssl in $cf_search
        do
          if test -d $cf_cv_library_path_ssl ; then
            test -n "$verbose" && echo "	... testing $cf_cv_library_path_ssl" 1>&6

echo "${as_me-configure}:12519: testing ... testing $cf_cv_library_path_ssl ..." 1>&5


            CPPFLAGS="$cf_test_CPPFLAGS"
            LIBS="-lssl $cf_extra_ssl_libs $cf_save_LIBS"
            LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_ssl"
            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdio.h>
#if defined(USE_OPENSSL_INCL)
#include <openssl/ssl.h>
#elif defined(USE_GNUTLS_FUNCS)
#include <gnutls/gnutls.h>
#elif defined(USE_GNUTLS_INCL)
#include <gnutls/openssl.h>
#else
#include <ssl.h>
#endif

int
main ()
{

#ifdef USE_GNUTLS_FUNCS
    gnutls_global_init();
#else
    SSL_shutdown((SSL *)0)
#endif

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

                test -n "$verbose" && echo "	... found ssl library in $cf_cv_library_path_ssl" 1>&6

echo "${as_me-configure}:12557: testing ... found ssl library in $cf_cv_library_path_ssl ..." 1>&5


                cf_cv_find_linkage_ssl=yes
                cf_cv_library_file_ssl="-lssl"
                break
else

                CPPFLAGS="$cf_save_CPPFLAGS"
                LIBS="$cf_save_LIBS"
                LDFLAGS="$cf_save_LDFLAGS"

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
          fi
        done
        LIBS="$cf_save_LIBS"
        CPPFLAGS="$cf_save_CPPFLAGS"
        LDFLAGS="$cf_save_LDFLAGS"
      fi

    else
      cf_cv_find_linkage_ssl=no
    fi

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

if test "$cf_cv_find_linkage_ssl" = yes ; then
cf_cv_have_ssl=yes
else
cf_cv_have_ssl=no
fi


		if test "$cf_cv_have_ssl" = yes ; then
			if test -n "$cf_cv_library_path_ssl" ; then

if test -n "$cf_cv_library_path_ssl" ; then
  for cf_add_libdir in $cf_cv_library_path_ssl
  do
    if test $cf_add_libdir = /usr/lib ; then
      :
    elif test -d $cf_add_libdir
    then
      cf_have_libdir=no
      if test -n "$LDFLAGS$LIBS" ; then
        # a loop is needed to ensure we can add subdirs of existing dirs
        for cf_test_libdir in $LDFLAGS $LIBS ; do
          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
            cf_have_libdir=yes; break
          fi
        done
      fi
      if test "$cf_have_libdir" = no ; then
        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me-configure}:12616: testing adding $cf_add_libdir to library-path ..." 1>&5


        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
      fi
    fi
  done
fi

			fi
			LIBS="-lssl $cf_extra_ssl_libs $LIBS"
			if test -n "$cf_cv_header_path_ssl" ; then
				case $cf_cv_header_path_ssl in #(vi
				/usr/include/openssl) #(vi
					;;
				*)

if test -n "$cf_cv_header_path_ssl" ; then
  for cf_add_incdir in $cf_cv_header_path_ssl
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:12681: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi

					;;
				esac
			fi
		fi
	fi

	if test "$cf_cv_have_ssl" = yes ; then
		$as_echo "#define USE_SSL 1" >>confdefs.h

		if test -n "$cf_cv_header_path_ssl" ; then
			case $cf_cv_header_path_ssl in #(vi
			*/openssl)
				$as_echo "#define USE_OPENSSL_INCL 1" >>confdefs.h

				;;
			esac
		fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509 support" >&5
$as_echo_n "checking for X509 support... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdio.h>
#if defined(USE_OPENSSL_INCL)
#include <openssl/ssl.h>
#elif defined(USE_GNUTLS_FUNCS)
#include <gnutls/gnutls.h>
#elif defined(USE_GNUTLS_INCL)
#include <gnutls/openssl.h>
#else
#include <ssl.h>
#endif

#include <openssl/x509.h>
int
main ()
{
X509_verify_cert_error_string(X509_STORE_CTX_get_error(NULL))
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_x509_support=yes
else
  cf_x509_support=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_x509_support" >&5
$as_echo "$cf_x509_support" >&6; }

if test "$cf_x509_support" = yes ; then
	$as_echo "#define USE_X509_SUPPORT 1" >>confdefs.h

fi

	fi

elif test "x$cf_cv_use_libgnutls" != xno ; then
    if test "x$cf_cv_gnutls_compat" = xno ; then


	cf_cv_have_gnutls=no


  case "$cf_cv_use_libgnutls" in #(vi
  no) #(vi
      ;;
  yes) #(vi
      ;;
  *)


for cf_searchpath in `echo "$cf_cv_use_libgnutls" | tr $PATH_SEPARATOR ' '`; do
	if test -d $cf_searchpath/include; then

if test -n "$cf_searchpath/include" ; then
  for cf_add_incdir in $cf_searchpath/include
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:12823: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi

	elif test -d $cf_searchpath/../include ; then

if test -n "$cf_searchpath/../include" ; then
  for cf_add_incdir in $cf_searchpath/../include
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:12889: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi

	else
as_fn_error $? "cannot find ssl library under $cf_cv_use_libgnutls" "$LINENO" 5
	fi
	if test -d $cf_searchpath/lib; then

if test -n "$cf_searchpath/lib" ; then
  for cf_add_libdir in $cf_searchpath/lib
  do
    if test $cf_add_libdir = /usr/lib ; then
      :
    elif test -d $cf_add_libdir
    then
      cf_have_libdir=no
      if test -n "$LDFLAGS$LIBS" ; then
        # a loop is needed to ensure we can add subdirs of existing dirs
        for cf_test_libdir in $LDFLAGS $LIBS ; do
          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
            cf_have_libdir=yes; break
          fi
        done
      fi
      if test "$cf_have_libdir" = no ; then
        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me-configure}:12929: testing adding $cf_add_libdir to library-path ..." 1>&5


        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
      fi
    fi
  done
fi

	elif test -d $cf_searchpath ; then

if test -n "$cf_searchpath" ; then
  for cf_add_libdir in $cf_searchpath
  do
    if test $cf_add_libdir = /usr/lib ; then
      :
    elif test -d $cf_add_libdir
    then
      cf_have_libdir=no
      if test -n "$LDFLAGS$LIBS" ; then
        # a loop is needed to ensure we can add subdirs of existing dirs
        for cf_test_libdir in $LDFLAGS $LIBS ; do
          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
            cf_have_libdir=yes; break
          fi
        done
      fi
      if test "$cf_have_libdir" = no ; then
        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me-configure}:12959: testing adding $cf_add_libdir to library-path ..." 1>&5


        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
      fi
    fi
  done
fi

	else
as_fn_error $? "cannot find ssl library under $cf_cv_use_libgnutls" "$LINENO" 5
	fi
done

      ;;
  esac


	cf_pkg_gnutls=none
	if test "x$PKG_CONFIG" != xnone; then
		cf_pkg_gnutls=gnutls
		case $cf_cv_use_libgnutls in #(vi
		no) #(vi
			;;
		yes) # if no explicit directory given, try pkg-config
			test -n "$verbose" && echo "	checking pkg-config for $cf_pkg_gnutls" 1>&6

echo "${as_me-configure}:12986: testing checking pkg-config for $cf_pkg_gnutls ..." 1>&5


			if "$PKG_CONFIG" --exists $cf_pkg_gnutls ; then
				test -n "$verbose" && echo "	... found $cf_pkg_gnutls in pkg-config" 1>&6

echo "${as_me-configure}:12992: testing ... found $cf_pkg_gnutls in pkg-config ..." 1>&5


				cf_cv_have_gnutls=yes

				cf_cflags_ssl=`$PKG_CONFIG --cflags $cf_pkg_gnutls`
				cf_libs_ssl=`$PKG_CONFIG --libs $cf_pkg_gnutls`

				if test -n "$cf_cflags_ssl" ; then
					case "$cf_cflags_ssl" in #(vi
					*-I*) #(vi
						cf_cv_header_path_ssl=`echo "$cf_cflags_ssl" | sed -e 's/^.*-I//' -e 's/ .*//'`
						;;
					*)
						cf_cv_header_path_ssl=/usr/include
						;;
					esac
					if test -d $cf_cv_header_path_ssl/gnutls ; then
						cf_cv_header_path_ssl=$cf_cv_header_path_ssl/gnutls
					fi

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $cf_cflags_ssl
do
case $cf_fix_cppflags in
no)
	case $cf_add_cflags in #(vi
	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
		case $cf_add_cflags in
		-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
			&& test -z "${cf_tst_cflags}" \
			&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then
				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then
				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		*$cf_add_cflags) #(vi
			;;
		*) #(vi
			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
			;;
		esac
		;;
	*)
		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
		;;
	esac
	;;
yes)
	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
	&& test -z "${cf_tst_cflags}" \
	&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	CFLAGS="$CFLAGS $cf_new_cflags"
fi

if test -n "$cf_new_cppflags" ; then

	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
fi

if test -n "$cf_new_extra_cppflags" ; then

	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
fi




				fi

				if test -n "$cf_libs_ssl" ; then
					case "x$cf_libs_ssl" in #(vi
					*-L*) #(vi
						cf_cv_library_path_ssl=`echo "$cf_libs_ssl" | sed -e 's/^.*-L//' -e 's/ .*//'`
						;;
					*)
						cf_cv_library_path_ssl=/usr/lib
						;;
					esac
					test -n "$verbose" && echo "	adding $cf_libs_ssl to LIBS" 1>&6

echo "${as_me-configure}:13097: testing adding $cf_libs_ssl to LIBS ..." 1>&5


					LIBS="$cf_libs_ssl $LIBS"
				fi
			else
				test -n "$verbose" && echo "	... did not find $cf_pkg_gnutls in pkg-config" 1>&6

echo "${as_me-configure}:13105: testing ... did not find $cf_pkg_gnutls in pkg-config ..." 1>&5


				cf_pkg_gnutls=none
			fi
			;;
		esac
	fi

	if test "$cf_cv_have_gnutls" = no ; then
		$as_echo "#define USE_GNUTLS_FUNCS 1" >>confdefs.h

		cf_gnutls_CPPFLAGS=$CPPFLAGS



# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
# will be set on completion of the AC_TRY_LINK below.
cf_cv_header_path_gnutls=
cf_cv_library_path_gnutls=


echo "${as_me-configure}:13127: testing Starting FIND_LINKAGE(gnutls,) ..." 1>&5


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

#include <stdio.h>
#if defined(USE_OPENSSL_INCL)
#include <openssl/ssl.h>
#elif defined(USE_GNUTLS_FUNCS)
#include <gnutls/gnutls.h>
#elif defined(USE_GNUTLS_INCL)
#include <gnutls/openssl.h>
#else
#include <ssl.h>
#endif

int
main ()
{

#ifdef USE_GNUTLS_FUNCS
    gnutls_global_init();
#else
    SSL_shutdown((SSL *)0)
#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_find_linkage_gnutls=yes
else

    cf_cv_find_linkage_gnutls=no

    test -n "$verbose" && echo "	find linkage for gnutls library" 1>&6

echo "${as_me-configure}:13166: testing find linkage for gnutls library ..." 1>&5



echo "${as_me-configure}:13170: testing Searching for headers in FIND_LINKAGE(gnutls,) ..." 1>&5


    cf_save_CPPFLAGS="$CPPFLAGS"
    cf_test_CPPFLAGS="$CPPFLAGS"


cf_header_path_list=""
if test -n "${CFLAGS}${CPPFLAGS}" ; then
	for cf_header_path in $CPPFLAGS $CFLAGS
	do
		case $cf_header_path in #(vi
		-I*)
			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`

test "$cf_header_path" != "NONE" && \
test -d "$cf_header_path" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
	test -d $cf_header_path/include/gnutls &&       cf_search="$cf_search $cf_header_path/include/gnutls"
	test -d $cf_header_path/include/gnutls/include &&    cf_search="$cf_search $cf_header_path/include/gnutls/include"
	test -d $cf_header_path/gnutls/include &&       cf_search="$cf_search $cf_header_path/gnutls/include"
	test -d $cf_header_path/gnutls/include/gnutls &&    cf_search="$cf_search $cf_header_path/gnutls/include/gnutls"
}

			cf_header_path_list="$cf_header_path_list $cf_search"
			;;
		esac
	done
fi

cf_search=""


test "/usr" != "$prefix" && \
test -d "/usr" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /usr"
	test -d /usr/include &&          cf_search="$cf_search /usr/include"
	test -d /usr/include/gnutls &&       cf_search="$cf_search /usr/include/gnutls"
	test -d /usr/include/gnutls/include &&    cf_search="$cf_search /usr/include/gnutls/include"
	test -d /usr/gnutls/include &&       cf_search="$cf_search /usr/gnutls/include"
	test -d /usr/gnutls/include/gnutls &&    cf_search="$cf_search /usr/gnutls/include/gnutls"
}


test "$prefix" != "NONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
	test -d $prefix/include/gnutls &&       cf_search="$cf_search $prefix/include/gnutls"
	test -d $prefix/include/gnutls/include &&    cf_search="$cf_search $prefix/include/gnutls/include"
	test -d $prefix/gnutls/include &&       cf_search="$cf_search $prefix/gnutls/include"
	test -d $prefix/gnutls/include/gnutls &&    cf_search="$cf_search $prefix/gnutls/include/gnutls"
}


test "/usr/local" != "$prefix" && \
test -d "/usr/local" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /usr/local"
	test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
	test -d /usr/local/include/gnutls &&       cf_search="$cf_search /usr/local/include/gnutls"
	test -d /usr/local/include/gnutls/include &&    cf_search="$cf_search /usr/local/include/gnutls/include"
	test -d /usr/local/gnutls/include &&       cf_search="$cf_search /usr/local/gnutls/include"
	test -d /usr/local/gnutls/include/gnutls &&    cf_search="$cf_search /usr/local/gnutls/include/gnutls"
}


test "/opt" != "$prefix" && \
test -d "/opt" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /opt"
	test -d /opt/include &&          cf_search="$cf_search /opt/include"
	test -d /opt/include/gnutls &&       cf_search="$cf_search /opt/include/gnutls"
	test -d /opt/include/gnutls/include &&    cf_search="$cf_search /opt/include/gnutls/include"
	test -d /opt/gnutls/include &&       cf_search="$cf_search /opt/gnutls/include"
	test -d /opt/gnutls/include/gnutls &&    cf_search="$cf_search /opt/gnutls/include/gnutls"
}


test "$HOME" != "$prefix" && \
test -d "$HOME" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under $HOME"
	test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
	test -d $HOME/include/gnutls &&       cf_search="$cf_search $HOME/include/gnutls"
	test -d $HOME/include/gnutls/include &&    cf_search="$cf_search $HOME/include/gnutls/include"
	test -d $HOME/gnutls/include &&       cf_search="$cf_search $HOME/gnutls/include"
	test -d $HOME/gnutls/include/gnutls &&    cf_search="$cf_search $HOME/gnutls/include/gnutls"
}



test "$includedir" != NONE && \
test "$includedir" != "/usr/include" && \
test -d "$includedir" && {
	test -d $includedir &&    cf_search="$cf_search $includedir"
	test -d $includedir/gnutls && cf_search="$cf_search $includedir/gnutls"
}

test "$oldincludedir" != NONE && \
test "$oldincludedir" != "/usr/include" && \
test -d "$oldincludedir" && {
	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
	test -d $oldincludedir/gnutls && cf_search="$cf_search $oldincludedir/gnutls"
}

cf_search="$cf_header_path_list $cf_search"

    for cf_cv_header_path_gnutls in $cf_search
    do
      if test -d $cf_cv_header_path_gnutls ; then
        test -n "$verbose" && echo "	... testing $cf_cv_header_path_gnutls" 1>&6

echo "${as_me-configure}:13287: testing ... testing $cf_cv_header_path_gnutls ..." 1>&5


        CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_gnutls"
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdio.h>
#if defined(USE_OPENSSL_INCL)
#include <openssl/ssl.h>
#elif defined(USE_GNUTLS_FUNCS)
#include <gnutls/gnutls.h>
#elif defined(USE_GNUTLS_INCL)
#include <gnutls/openssl.h>
#else
#include <ssl.h>
#endif

int
main ()
{

#ifdef USE_GNUTLS_FUNCS
    gnutls_global_init();
#else
    SSL_shutdown((SSL *)0)
#endif

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

            test -n "$verbose" && echo "	... found gnutls headers in $cf_cv_header_path_gnutls" 1>&6

echo "${as_me-configure}:13323: testing ... found gnutls headers in $cf_cv_header_path_gnutls ..." 1>&5


            cf_cv_find_linkage_gnutls=maybe
            cf_test_CPPFLAGS="$CPPFLAGS"
            break
else

            CPPFLAGS="$cf_save_CPPFLAGS"

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

    if test "$cf_cv_find_linkage_gnutls" = maybe ; then


echo "${as_me-configure}:13341: testing Searching for gnutls library in FIND_LINKAGE(gnutls,) ..." 1>&5


      cf_save_LIBS="$LIBS"
      cf_save_LDFLAGS="$LDFLAGS"



      if test "$cf_cv_find_linkage_gnutls" != yes ; then

cf_library_path_list=""
if test -n "${LDFLAGS}${LIBS}" ; then
	for cf_library_path in $LDFLAGS $LIBS
	do
		case $cf_library_path in #(vi
		-L*)
			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`

test "$cf_library_path" != "NONE" && \
test -d "$cf_library_path" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
	test -d $cf_library_path/lib/gnutls &&       cf_search="$cf_search $cf_library_path/lib/gnutls"
	test -d $cf_library_path/lib/gnutls/lib &&    cf_search="$cf_search $cf_library_path/lib/gnutls/lib"
	test -d $cf_library_path/gnutls/lib &&       cf_search="$cf_search $cf_library_path/gnutls/lib"
	test -d $cf_library_path/gnutls/lib/gnutls &&    cf_search="$cf_search $cf_library_path/gnutls/lib/gnutls"
}

			cf_library_path_list="$cf_library_path_list $cf_search"
			;;
		esac
	done
fi

cf_search=""


test "/usr" != "$prefix" && \
test -d "/usr" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /usr"
	test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
	test -d /usr/lib/gnutls &&       cf_search="$cf_search /usr/lib/gnutls"
	test -d /usr/lib/gnutls/lib &&    cf_search="$cf_search /usr/lib/gnutls/lib"
	test -d /usr/gnutls/lib &&       cf_search="$cf_search /usr/gnutls/lib"
	test -d /usr/gnutls/lib/gnutls &&    cf_search="$cf_search /usr/gnutls/lib/gnutls"
}


test "$prefix" != "NONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
	test -d $prefix/lib/gnutls &&       cf_search="$cf_search $prefix/lib/gnutls"
	test -d $prefix/lib/gnutls/lib &&    cf_search="$cf_search $prefix/lib/gnutls/lib"
	test -d $prefix/gnutls/lib &&       cf_search="$cf_search $prefix/gnutls/lib"
	test -d $prefix/gnutls/lib/gnutls &&    cf_search="$cf_search $prefix/gnutls/lib/gnutls"
}


test "/usr/local" != "$prefix" && \
test -d "/usr/local" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /usr/local"
	test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
	test -d /usr/local/lib/gnutls &&       cf_search="$cf_search /usr/local/lib/gnutls"
	test -d /usr/local/lib/gnutls/lib &&    cf_search="$cf_search /usr/local/lib/gnutls/lib"
	test -d /usr/local/gnutls/lib &&       cf_search="$cf_search /usr/local/gnutls/lib"
	test -d /usr/local/gnutls/lib/gnutls &&    cf_search="$cf_search /usr/local/gnutls/lib/gnutls"
}


test "/opt" != "$prefix" && \
test -d "/opt" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /opt"
	test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
	test -d /opt/lib/gnutls &&       cf_search="$cf_search /opt/lib/gnutls"
	test -d /opt/lib/gnutls/lib &&    cf_search="$cf_search /opt/lib/gnutls/lib"
	test -d /opt/gnutls/lib &&       cf_search="$cf_search /opt/gnutls/lib"
	test -d /opt/gnutls/lib/gnutls &&    cf_search="$cf_search /opt/gnutls/lib/gnutls"
}


test "$HOME" != "$prefix" && \
test -d "$HOME" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under $HOME"
	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
	test -d $HOME/lib/gnutls &&       cf_search="$cf_search $HOME/lib/gnutls"
	test -d $HOME/lib/gnutls/lib &&    cf_search="$cf_search $HOME/lib/gnutls/lib"
	test -d $HOME/gnutls/lib &&       cf_search="$cf_search $HOME/gnutls/lib"
	test -d $HOME/gnutls/lib/gnutls &&    cf_search="$cf_search $HOME/gnutls/lib/gnutls"
}



cf_search="$cf_library_path_list $cf_search"

        for cf_cv_library_path_gnutls in $cf_search
        do
          if test -d $cf_cv_library_path_gnutls ; then
            test -n "$verbose" && echo "	... testing $cf_cv_library_path_gnutls" 1>&6

echo "${as_me-configure}:13447: testing ... testing $cf_cv_library_path_gnutls ..." 1>&5


            CPPFLAGS="$cf_test_CPPFLAGS"
            LIBS="-lgnutls -lgnutls -lcrypt $cf_save_LIBS"
            LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_gnutls"
            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdio.h>
#if defined(USE_OPENSSL_INCL)
#include <openssl/ssl.h>
#elif defined(USE_GNUTLS_FUNCS)
#include <gnutls/gnutls.h>
#elif defined(USE_GNUTLS_INCL)
#include <gnutls/openssl.h>
#else
#include <ssl.h>
#endif

int
main ()
{

#ifdef USE_GNUTLS_FUNCS
    gnutls_global_init();
#else
    SSL_shutdown((SSL *)0)
#endif

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

                test -n "$verbose" && echo "	... found gnutls library in $cf_cv_library_path_gnutls" 1>&6

echo "${as_me-configure}:13485: testing ... found gnutls library in $cf_cv_library_path_gnutls ..." 1>&5


                cf_cv_find_linkage_gnutls=yes
                cf_cv_library_file_gnutls="-lgnutls"
                break
else

                CPPFLAGS="$cf_save_CPPFLAGS"
                LIBS="$cf_save_LIBS"
                LDFLAGS="$cf_save_LDFLAGS"

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
          fi
        done
        LIBS="$cf_save_LIBS"
        CPPFLAGS="$cf_save_CPPFLAGS"
        LDFLAGS="$cf_save_LDFLAGS"
      fi

    else
      cf_cv_find_linkage_gnutls=no
    fi

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

if test "$cf_cv_find_linkage_gnutls" = yes ; then
cf_cv_have_gnutls=yes
else
cf_cv_have_gnutls=no
fi


		CPPFLAGS=$cf_gnutls_CPPFLAGS
	fi

	if test "$cf_cv_have_gnutls" = yes ; then
		if test -n "$cf_cv_header_path_gnutls" ; then
			$as_echo "#define USE_SSL 1" >>confdefs.h

            case $cf_cv_header_path_gnutls in
				/usr/include/gnutls)
				;;
			*)

if test -n "$cf_cv_header_path_gnutls" ; then
  for cf_add_incdir in $cf_cv_header_path_gnutls
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:13582: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi

				;;
			esac
		fi
		if test -n "$cf_cv_library_path_gnutls" ; then

if test -n "$cf_cv_library_path_gnutls" ; then
  for cf_add_libdir in $cf_cv_library_path_gnutls
  do
    if test $cf_add_libdir = /usr/lib ; then
      :
    elif test -d $cf_add_libdir
    then
      cf_have_libdir=no
      if test -n "$LDFLAGS$LIBS" ; then
        # a loop is needed to ensure we can add subdirs of existing dirs
        for cf_test_libdir in $LDFLAGS $LIBS ; do
          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
            cf_have_libdir=yes; break
          fi
        done
      fi
      if test "$cf_have_libdir" = no ; then
        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me-configure}:13622: testing adding $cf_add_libdir to library-path ..." 1>&5


        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
      fi
    fi
  done
fi

		fi
		LIBS="-lgnutls -lcrypt $LIBS"

		EXTRA_OBJS="$EXTRA_OBJS tidy_tls\$o"


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509 support" >&5
$as_echo_n "checking for X509 support... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdio.h>
#if defined(USE_OPENSSL_INCL)
#include <openssl/ssl.h>
#elif defined(USE_GNUTLS_FUNCS)
#include <gnutls/gnutls.h>
#elif defined(USE_GNUTLS_INCL)
#include <gnutls/openssl.h>
#else
#include <ssl.h>
#endif

#include <openssl/x509.h>
int
main ()
{
X509_verify_cert_error_string(X509_STORE_CTX_get_error(NULL))
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_x509_support=yes
else
  cf_x509_support=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_x509_support" >&5
$as_echo "$cf_x509_support" >&6; }

if test "$cf_x509_support" = yes ; then
	$as_echo "#define USE_X509_SUPPORT 1" >>confdefs.h

fi

	fi

    else


	cf_cv_have_gnutls=no


  case "$cf_cv_use_libgnutls" in #(vi
  no) #(vi
      ;;
  yes) #(vi
      ;;
  *)


for cf_searchpath in `echo "$cf_cv_use_libgnutls" | tr $PATH_SEPARATOR ' '`; do
	if test -d $cf_searchpath/include; then

if test -n "$cf_searchpath/include" ; then
  for cf_add_incdir in $cf_searchpath/include
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:13744: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi

	elif test -d $cf_searchpath/../include ; then

if test -n "$cf_searchpath/../include" ; then
  for cf_add_incdir in $cf_searchpath/../include
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:13810: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi

	else
as_fn_error $? "cannot find ssl library under $cf_cv_use_libgnutls" "$LINENO" 5
	fi
	if test -d $cf_searchpath/lib; then

if test -n "$cf_searchpath/lib" ; then
  for cf_add_libdir in $cf_searchpath/lib
  do
    if test $cf_add_libdir = /usr/lib ; then
      :
    elif test -d $cf_add_libdir
    then
      cf_have_libdir=no
      if test -n "$LDFLAGS$LIBS" ; then
        # a loop is needed to ensure we can add subdirs of existing dirs
        for cf_test_libdir in $LDFLAGS $LIBS ; do
          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
            cf_have_libdir=yes; break
          fi
        done
      fi
      if test "$cf_have_libdir" = no ; then
        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me-configure}:13850: testing adding $cf_add_libdir to library-path ..." 1>&5


        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
      fi
    fi
  done
fi

	elif test -d $cf_searchpath ; then

if test -n "$cf_searchpath" ; then
  for cf_add_libdir in $cf_searchpath
  do
    if test $cf_add_libdir = /usr/lib ; then
      :
    elif test -d $cf_add_libdir
    then
      cf_have_libdir=no
      if test -n "$LDFLAGS$LIBS" ; then
        # a loop is needed to ensure we can add subdirs of existing dirs
        for cf_test_libdir in $LDFLAGS $LIBS ; do
          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
            cf_have_libdir=yes; break
          fi
        done
      fi
      if test "$cf_have_libdir" = no ; then
        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me-configure}:13880: testing adding $cf_add_libdir to library-path ..." 1>&5


        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
      fi
    fi
  done
fi

	else
as_fn_error $? "cannot find ssl library under $cf_cv_use_libgnutls" "$LINENO" 5
	fi
done

      ;;
  esac


	cf_pkg_gnutls=none
	if test "x$PKG_CONFIG" != xnone; then
		cf_pkg_gnutls=gnutls-openssl
		case $cf_cv_use_libgnutls in #(vi
		no) #(vi
			;;
		yes) # if no explicit directory given, try pkg-config
			test -n "$verbose" && echo "	checking pkg-config for $cf_pkg_gnutls" 1>&6

echo "${as_me-configure}:13907: testing checking pkg-config for $cf_pkg_gnutls ..." 1>&5


			if "$PKG_CONFIG" --exists $cf_pkg_gnutls ; then
				test -n "$verbose" && echo "	... found $cf_pkg_gnutls in pkg-config" 1>&6

echo "${as_me-configure}:13913: testing ... found $cf_pkg_gnutls in pkg-config ..." 1>&5


				cf_cv_have_gnutls=yes

				cf_cflags_ssl=`$PKG_CONFIG --cflags $cf_pkg_gnutls`
				cf_libs_ssl=`$PKG_CONFIG --libs $cf_pkg_gnutls`

				if test -n "$cf_cflags_ssl" ; then
					case "$cf_cflags_ssl" in #(vi
					*-I*) #(vi
						cf_cv_header_path_ssl=`echo "$cf_cflags_ssl" | sed -e 's/^.*-I//' -e 's/ .*//'`
						;;
					*)
						cf_cv_header_path_ssl=/usr/include
						;;
					esac
					if test -d $cf_cv_header_path_ssl/gnutls ; then
						cf_cv_header_path_ssl=$cf_cv_header_path_ssl/gnutls
					fi

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $cf_cflags_ssl
do
case $cf_fix_cppflags in
no)
	case $cf_add_cflags in #(vi
	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
		case $cf_add_cflags in
		-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
			&& test -z "${cf_tst_cflags}" \
			&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then
				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then
				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		*$cf_add_cflags) #(vi
			;;
		*) #(vi
			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
			;;
		esac
		;;
	*)
		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
		;;
	esac
	;;
yes)
	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
	&& test -z "${cf_tst_cflags}" \
	&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	CFLAGS="$CFLAGS $cf_new_cflags"
fi

if test -n "$cf_new_cppflags" ; then

	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
fi

if test -n "$cf_new_extra_cppflags" ; then

	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
fi




				fi

				if test -n "$cf_libs_ssl" ; then
					case "x$cf_libs_ssl" in #(vi
					*-L*) #(vi
						cf_cv_library_path_ssl=`echo "$cf_libs_ssl" | sed -e 's/^.*-L//' -e 's/ .*//'`
						;;
					*)
						cf_cv_library_path_ssl=/usr/lib
						;;
					esac
					test -n "$verbose" && echo "	adding $cf_libs_ssl to LIBS" 1>&6

echo "${as_me-configure}:14018: testing adding $cf_libs_ssl to LIBS ..." 1>&5


					LIBS="$cf_libs_ssl $LIBS"
				fi
			else
				test -n "$verbose" && echo "	... did not find $cf_pkg_gnutls in pkg-config" 1>&6

echo "${as_me-configure}:14026: testing ... did not find $cf_pkg_gnutls in pkg-config ..." 1>&5


				cf_pkg_gnutls=none
			fi
			;;
		esac
	fi

	if test "$cf_cv_have_gnutls" = no ; then
		$as_echo "#define USE_GNUTLS_INCL 1" >>confdefs.h

		cf_gnutls_CPPFLAGS=$CPPFLAGS



# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
# will be set on completion of the AC_TRY_LINK below.
cf_cv_header_path_gnutls=
cf_cv_library_path_gnutls=


echo "${as_me-configure}:14048: testing Starting FIND_LINKAGE(gnutls,) ..." 1>&5


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

#include <stdio.h>
#if defined(USE_OPENSSL_INCL)
#include <openssl/ssl.h>
#elif defined(USE_GNUTLS_FUNCS)
#include <gnutls/gnutls.h>
#elif defined(USE_GNUTLS_INCL)
#include <gnutls/openssl.h>
#else
#include <ssl.h>
#endif

int
main ()
{

#ifdef USE_GNUTLS_FUNCS
    gnutls_global_init();
#else
    SSL_shutdown((SSL *)0)
#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_find_linkage_gnutls=yes
else

    cf_cv_find_linkage_gnutls=no

    test -n "$verbose" && echo "	find linkage for gnutls library" 1>&6

echo "${as_me-configure}:14087: testing find linkage for gnutls library ..." 1>&5



echo "${as_me-configure}:14091: testing Searching for headers in FIND_LINKAGE(gnutls,) ..." 1>&5


    cf_save_CPPFLAGS="$CPPFLAGS"
    cf_test_CPPFLAGS="$CPPFLAGS"


cf_header_path_list=""
if test -n "${CFLAGS}${CPPFLAGS}" ; then
	for cf_header_path in $CPPFLAGS $CFLAGS
	do
		case $cf_header_path in #(vi
		-I*)
			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`

test "$cf_header_path" != "NONE" && \
test -d "$cf_header_path" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
	test -d $cf_header_path/include/gnutls &&       cf_search="$cf_search $cf_header_path/include/gnutls"
	test -d $cf_header_path/include/gnutls/include &&    cf_search="$cf_search $cf_header_path/include/gnutls/include"
	test -d $cf_header_path/gnutls/include &&       cf_search="$cf_search $cf_header_path/gnutls/include"
	test -d $cf_header_path/gnutls/include/gnutls &&    cf_search="$cf_search $cf_header_path/gnutls/include/gnutls"
}

			cf_header_path_list="$cf_header_path_list $cf_search"
			;;
		esac
	done
fi

cf_search=""


test "/usr" != "$prefix" && \
test -d "/usr" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /usr"
	test -d /usr/include &&          cf_search="$cf_search /usr/include"
	test -d /usr/include/gnutls &&       cf_search="$cf_search /usr/include/gnutls"
	test -d /usr/include/gnutls/include &&    cf_search="$cf_search /usr/include/gnutls/include"
	test -d /usr/gnutls/include &&       cf_search="$cf_search /usr/gnutls/include"
	test -d /usr/gnutls/include/gnutls &&    cf_search="$cf_search /usr/gnutls/include/gnutls"
}


test "$prefix" != "NONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
	test -d $prefix/include/gnutls &&       cf_search="$cf_search $prefix/include/gnutls"
	test -d $prefix/include/gnutls/include &&    cf_search="$cf_search $prefix/include/gnutls/include"
	test -d $prefix/gnutls/include &&       cf_search="$cf_search $prefix/gnutls/include"
	test -d $prefix/gnutls/include/gnutls &&    cf_search="$cf_search $prefix/gnutls/include/gnutls"
}


test "/usr/local" != "$prefix" && \
test -d "/usr/local" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /usr/local"
	test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
	test -d /usr/local/include/gnutls &&       cf_search="$cf_search /usr/local/include/gnutls"
	test -d /usr/local/include/gnutls/include &&    cf_search="$cf_search /usr/local/include/gnutls/include"
	test -d /usr/local/gnutls/include &&       cf_search="$cf_search /usr/local/gnutls/include"
	test -d /usr/local/gnutls/include/gnutls &&    cf_search="$cf_search /usr/local/gnutls/include/gnutls"
}


test "/opt" != "$prefix" && \
test -d "/opt" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /opt"
	test -d /opt/include &&          cf_search="$cf_search /opt/include"
	test -d /opt/include/gnutls &&       cf_search="$cf_search /opt/include/gnutls"
	test -d /opt/include/gnutls/include &&    cf_search="$cf_search /opt/include/gnutls/include"
	test -d /opt/gnutls/include &&       cf_search="$cf_search /opt/gnutls/include"
	test -d /opt/gnutls/include/gnutls &&    cf_search="$cf_search /opt/gnutls/include/gnutls"
}


test "$HOME" != "$prefix" && \
test -d "$HOME" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under $HOME"
	test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
	test -d $HOME/include/gnutls &&       cf_search="$cf_search $HOME/include/gnutls"
	test -d $HOME/include/gnutls/include &&    cf_search="$cf_search $HOME/include/gnutls/include"
	test -d $HOME/gnutls/include &&       cf_search="$cf_search $HOME/gnutls/include"
	test -d $HOME/gnutls/include/gnutls &&    cf_search="$cf_search $HOME/gnutls/include/gnutls"
}



test "$includedir" != NONE && \
test "$includedir" != "/usr/include" && \
test -d "$includedir" && {
	test -d $includedir &&    cf_search="$cf_search $includedir"
	test -d $includedir/gnutls && cf_search="$cf_search $includedir/gnutls"
}

test "$oldincludedir" != NONE && \
test "$oldincludedir" != "/usr/include" && \
test -d "$oldincludedir" && {
	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
	test -d $oldincludedir/gnutls && cf_search="$cf_search $oldincludedir/gnutls"
}

cf_search="$cf_header_path_list $cf_search"

    for cf_cv_header_path_gnutls in $cf_search
    do
      if test -d $cf_cv_header_path_gnutls ; then
        test -n "$verbose" && echo "	... testing $cf_cv_header_path_gnutls" 1>&6

echo "${as_me-configure}:14208: testing ... testing $cf_cv_header_path_gnutls ..." 1>&5


        CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_gnutls"
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdio.h>
#if defined(USE_OPENSSL_INCL)
#include <openssl/ssl.h>
#elif defined(USE_GNUTLS_FUNCS)
#include <gnutls/gnutls.h>
#elif defined(USE_GNUTLS_INCL)
#include <gnutls/openssl.h>
#else
#include <ssl.h>
#endif

int
main ()
{

#ifdef USE_GNUTLS_FUNCS
    gnutls_global_init();
#else
    SSL_shutdown((SSL *)0)
#endif

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

            test -n "$verbose" && echo "	... found gnutls headers in $cf_cv_header_path_gnutls" 1>&6

echo "${as_me-configure}:14244: testing ... found gnutls headers in $cf_cv_header_path_gnutls ..." 1>&5


            cf_cv_find_linkage_gnutls=maybe
            cf_test_CPPFLAGS="$CPPFLAGS"
            break
else

            CPPFLAGS="$cf_save_CPPFLAGS"

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

    if test "$cf_cv_find_linkage_gnutls" = maybe ; then


echo "${as_me-configure}:14262: testing Searching for gnutls library in FIND_LINKAGE(gnutls,) ..." 1>&5


      cf_save_LIBS="$LIBS"
      cf_save_LDFLAGS="$LDFLAGS"



      if test "$cf_cv_find_linkage_gnutls" != yes ; then

cf_library_path_list=""
if test -n "${LDFLAGS}${LIBS}" ; then
	for cf_library_path in $LDFLAGS $LIBS
	do
		case $cf_library_path in #(vi
		-L*)
			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`

test "$cf_library_path" != "NONE" && \
test -d "$cf_library_path" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
	test -d $cf_library_path/lib/gnutls &&       cf_search="$cf_search $cf_library_path/lib/gnutls"
	test -d $cf_library_path/lib/gnutls/lib &&    cf_search="$cf_search $cf_library_path/lib/gnutls/lib"
	test -d $cf_library_path/gnutls/lib &&       cf_search="$cf_search $cf_library_path/gnutls/lib"
	test -d $cf_library_path/gnutls/lib/gnutls &&    cf_search="$cf_search $cf_library_path/gnutls/lib/gnutls"
}

			cf_library_path_list="$cf_library_path_list $cf_search"
			;;
		esac
	done
fi

cf_search=""


test "/usr" != "$prefix" && \
test -d "/usr" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /usr"
	test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
	test -d /usr/lib/gnutls &&       cf_search="$cf_search /usr/lib/gnutls"
	test -d /usr/lib/gnutls/lib &&    cf_search="$cf_search /usr/lib/gnutls/lib"
	test -d /usr/gnutls/lib &&       cf_search="$cf_search /usr/gnutls/lib"
	test -d /usr/gnutls/lib/gnutls &&    cf_search="$cf_search /usr/gnutls/lib/gnutls"
}


test "$prefix" != "NONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
	test -d $prefix/lib/gnutls &&       cf_search="$cf_search $prefix/lib/gnutls"
	test -d $prefix/lib/gnutls/lib &&    cf_search="$cf_search $prefix/lib/gnutls/lib"
	test -d $prefix/gnutls/lib &&       cf_search="$cf_search $prefix/gnutls/lib"
	test -d $prefix/gnutls/lib/gnutls &&    cf_search="$cf_search $prefix/gnutls/lib/gnutls"
}


test "/usr/local" != "$prefix" && \
test -d "/usr/local" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /usr/local"
	test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
	test -d /usr/local/lib/gnutls &&       cf_search="$cf_search /usr/local/lib/gnutls"
	test -d /usr/local/lib/gnutls/lib &&    cf_search="$cf_search /usr/local/lib/gnutls/lib"
	test -d /usr/local/gnutls/lib &&       cf_search="$cf_search /usr/local/gnutls/lib"
	test -d /usr/local/gnutls/lib/gnutls &&    cf_search="$cf_search /usr/local/gnutls/lib/gnutls"
}


test "/opt" != "$prefix" && \
test -d "/opt" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /opt"
	test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
	test -d /opt/lib/gnutls &&       cf_search="$cf_search /opt/lib/gnutls"
	test -d /opt/lib/gnutls/lib &&    cf_search="$cf_search /opt/lib/gnutls/lib"
	test -d /opt/gnutls/lib &&       cf_search="$cf_search /opt/gnutls/lib"
	test -d /opt/gnutls/lib/gnutls &&    cf_search="$cf_search /opt/gnutls/lib/gnutls"
}


test "$HOME" != "$prefix" && \
test -d "$HOME" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under $HOME"
	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
	test -d $HOME/lib/gnutls &&       cf_search="$cf_search $HOME/lib/gnutls"
	test -d $HOME/lib/gnutls/lib &&    cf_search="$cf_search $HOME/lib/gnutls/lib"
	test -d $HOME/gnutls/lib &&       cf_search="$cf_search $HOME/gnutls/lib"
	test -d $HOME/gnutls/lib/gnutls &&    cf_search="$cf_search $HOME/gnutls/lib/gnutls"
}



cf_search="$cf_library_path_list $cf_search"

        for cf_cv_library_path_gnutls in $cf_search
        do
          if test -d $cf_cv_library_path_gnutls ; then
            test -n "$verbose" && echo "	... testing $cf_cv_library_path_gnutls" 1>&6

echo "${as_me-configure}:14368: testing ... testing $cf_cv_library_path_gnutls ..." 1>&5


            CPPFLAGS="$cf_test_CPPFLAGS"
            LIBS="-lgnutls -lgnutls-openssl -lgnutls-extra -lgnutls -lcrypt $cf_save_LIBS"
            LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_gnutls"
            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdio.h>
#if defined(USE_OPENSSL_INCL)
#include <openssl/ssl.h>
#elif defined(USE_GNUTLS_FUNCS)
#include <gnutls/gnutls.h>
#elif defined(USE_GNUTLS_INCL)
#include <gnutls/openssl.h>
#else
#include <ssl.h>
#endif

int
main ()
{

#ifdef USE_GNUTLS_FUNCS
    gnutls_global_init();
#else
    SSL_shutdown((SSL *)0)
#endif

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

                test -n "$verbose" && echo "	... found gnutls library in $cf_cv_library_path_gnutls" 1>&6

echo "${as_me-configure}:14406: testing ... found gnutls library in $cf_cv_library_path_gnutls ..." 1>&5


                cf_cv_find_linkage_gnutls=yes
                cf_cv_library_file_gnutls="-lgnutls"
                break
else

                CPPFLAGS="$cf_save_CPPFLAGS"
                LIBS="$cf_save_LIBS"
                LDFLAGS="$cf_save_LDFLAGS"

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
          fi
        done
        LIBS="$cf_save_LIBS"
        CPPFLAGS="$cf_save_CPPFLAGS"
        LDFLAGS="$cf_save_LDFLAGS"
      fi

    else
      cf_cv_find_linkage_gnutls=no
    fi

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

if test "$cf_cv_find_linkage_gnutls" = yes ; then
cf_cv_have_gnutls=yes
else
cf_cv_have_gnutls=no
fi


		CPPFLAGS=$cf_gnutls_CPPFLAGS
	fi

	if test "$cf_cv_have_gnutls" = yes ; then
		if test -n "$cf_cv_header_path_gnutls" ; then
			$as_echo "#define USE_SSL 1" >>confdefs.h

            case $cf_cv_header_path_gnutls in
				/usr/include/gnutls)
				;;
			*)

if test -n "$cf_cv_header_path_gnutls" ; then
  for cf_add_incdir in $cf_cv_header_path_gnutls
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:14503: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi

				;;
			esac
		fi
		if test -n "$cf_cv_library_path_gnutls" ; then

if test -n "$cf_cv_library_path_gnutls" ; then
  for cf_add_libdir in $cf_cv_library_path_gnutls
  do
    if test $cf_add_libdir = /usr/lib ; then
      :
    elif test -d $cf_add_libdir
    then
      cf_have_libdir=no
      if test -n "$LDFLAGS$LIBS" ; then
        # a loop is needed to ensure we can add subdirs of existing dirs
        for cf_test_libdir in $LDFLAGS $LIBS ; do
          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
            cf_have_libdir=yes; break
          fi
        done
      fi
      if test "$cf_have_libdir" = no ; then
        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me-configure}:14543: testing adding $cf_add_libdir to library-path ..." 1>&5


        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
      fi
    fi
  done
fi

		fi
		LIBS="-lgnutls -lcrypt $LIBS"

		if test "$cf_pkg_gnutls" = none ; then
				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_connect in -lgnutls-openssl" >&5
$as_echo_n "checking for SSL_connect in -lgnutls-openssl... " >&6; }
if ${ac_cv_lib_gnutls_openssl_SSL_connect+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lgnutls-openssl  $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 SSL_connect ();
int
main ()
{
return SSL_connect ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_gnutls_openssl_SSL_connect=yes
else
  ac_cv_lib_gnutls_openssl_SSL_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_gnutls_openssl_SSL_connect" >&5
$as_echo "$ac_cv_lib_gnutls_openssl_SSL_connect" >&6; }
if test "x$ac_cv_lib_gnutls_openssl_SSL_connect" = xyes; then :
  LIBS="-lgnutls-openssl $LIBS"
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_connect in -lgnutls-extra" >&5
$as_echo_n "checking for SSL_connect in -lgnutls-extra... " >&6; }
if ${ac_cv_lib_gnutls_extra_SSL_connect+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lgnutls-extra  $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 SSL_connect ();
int
main ()
{
return SSL_connect ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_gnutls_extra_SSL_connect=yes
else
  ac_cv_lib_gnutls_extra_SSL_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_gnutls_extra_SSL_connect" >&5
$as_echo "$ac_cv_lib_gnutls_extra_SSL_connect" >&6; }
if test "x$ac_cv_lib_gnutls_extra_SSL_connect" = xyes; then :
  LIBS="-lgnutls-extra $LIBS"
else
  as_fn_error $? "cannot find gnutls openssl functions" "$LINENO" 5
fi

fi

			fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509 support" >&5
$as_echo_n "checking for X509 support... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdio.h>
#if defined(USE_OPENSSL_INCL)
#include <openssl/ssl.h>
#elif defined(USE_GNUTLS_FUNCS)
#include <gnutls/gnutls.h>
#elif defined(USE_GNUTLS_INCL)
#include <gnutls/openssl.h>
#else
#include <ssl.h>
#endif

#include <openssl/x509.h>
int
main ()
{
X509_verify_cert_error_string(X509_STORE_CTX_get_error(NULL))
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_x509_support=yes
else
  cf_x509_support=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_x509_support" >&5
$as_echo "$cf_x509_support" >&6; }

if test "$cf_x509_support" = yes ; then
	$as_echo "#define USE_X509_SUPPORT 1" >>confdefs.h

fi

	fi

    fi
elif test "x$cf_cv_use_libnss_compat"  != xno ; then

check=`pkg-config --version 2>/dev/null`
if test -n "$check" ; then
	cf_ssl_library=`pkg-config --libs nss`
	cf_ssl_cflags=`pkg-config --cflags nss`
else
	# Without pkg-config, we'll kludge in some defaults
	cf_ssl_library="-lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl"
	cf_ssl_cflags="-I/usr/include/nss3 -I/usr/include/nspr4"
fi
cf_ssl_library="-lnss_compat_ossl $cf_ssl_library"

case "$cf_cv_use_libnss_compat" in #(vi
no) #(vi
	cf_ssl_root=
	;;
yes) #(vi
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_get_version in -lnss_compat_ossl" >&5
$as_echo_n "checking for SSL_get_version in -lnss_compat_ossl... " >&6; }
if ${ac_cv_lib_nss_compat_ossl_SSL_get_version+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lnss_compat_ossl -lnss_compat_ossl $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 SSL_get_version ();
int
main ()
{
return SSL_get_version ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_nss_compat_ossl_SSL_get_version=yes
else
  ac_cv_lib_nss_compat_ossl_SSL_get_version=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_nss_compat_ossl_SSL_get_version" >&5
$as_echo "$ac_cv_lib_nss_compat_ossl_SSL_get_version" >&6; }
if test "x$ac_cv_lib_nss_compat_ossl_SSL_get_version" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBNSS_COMPAT_OSSL 1
_ACEOF

  LIBS="-lnss_compat_ossl $LIBS"

else

		cf_ssl_root=/usr/local/nss_compat_ossl
		if test -d $cf_ssl_root ; then
			test -n "$verbose" && echo "	assume it is in $cf_ssl_root" 1>&6

echo "${as_me-configure}:14752: testing assume it is in $cf_ssl_root ..." 1>&5


			cf_ssl_library="-L$cf_ssl_root/lib $cf_ssl_library"
		else
			as_fn_error $? "cannot find NSS compilant libraries" "$LINENO" 5
		fi

fi

	;;
*)
	if test -d $cf_cv_use_libnss_compat ; then
		if test -d $cf_cv_use_libnss_compat/include ; then
			cf_ssl_root=$cf_cv_use_libnss_compat
		elif test -d $cf_cv_use_libnss_compat/../include ; then
			cf_ssl_root=$cf_cv_use_libnss_compat/..
		else
			as_fn_error $? "cannot find NSS compilant library under $cf_cv_use_libnss_compat" "$LINENO" 5
		fi
		cf_ssl_library="-L$cf_ssl_root/lib $cf_ssl_library"
	else
		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expected a directory: $cf_cv_use_libnss_compat" >&5
$as_echo "$as_me: WARNING: expected a directory: $cf_cv_use_libnss_compat" >&2;}
	fi
	;;
esac
LIBS="$cf_ssl_library $LIBS"

cf_ssl_subincs=yes
if test -n "$cf_ssl_root" ; then
	if test -d $cf_ssl_root/include ; then
		cf_ssl_cflags="-I$cf_ssl_root/include  $cf_ssl_cflags"
		test -d $cf_ssl_root/include/nss_compat_ossl || cf_ssl_subincs=no
	fi
fi

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $cf_ssl_cflags
do
case $cf_fix_cppflags in
no)
	case $cf_add_cflags in #(vi
	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
		case $cf_add_cflags in
		-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
			&& test -z "${cf_tst_cflags}" \
			&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then
				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then
				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		*$cf_add_cflags) #(vi
			;;
		*) #(vi
			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
			;;
		esac
		;;
	*)
		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
		;;
	esac
	;;
yes)
	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
	&& test -z "${cf_tst_cflags}" \
	&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	CFLAGS="$CFLAGS $cf_new_cflags"
fi

if test -n "$cf_new_cppflags" ; then

	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
fi

if test -n "$cf_new_extra_cppflags" ; then

	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
fi





if test "$cf_ssl_subincs" = yes ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for NSS compilant include directory" >&5
$as_echo_n "checking for NSS compilant include directory... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdio.h>
#include <nss_compat_ossl/nss_compat_ossl.h>
int
main ()
{
SSL_shutdown((SSL *)0)
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_ssl_incl=yes
else
  cf_ssl_incl=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_ssl_incl" >&5
$as_echo "$cf_ssl_incl" >&6; }
test "$cf_ssl_incl" = yes && $as_echo "#define USE_NSS_COMPAT_INCL 1" >>confdefs.h

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can link to NSS compilant library" >&5
$as_echo_n "checking if we can link to NSS compilant library... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdio.h>
#ifdef USE_NSS_COMPAT_INCL
#include <nss_compat_ossl/nss_compat_ossl.h>
#else
#include <ssl.h>
#endif

int
main ()
{
SSL_shutdown((SSL *)0)
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_ssl_library=yes
else
  cf_ssl_library=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_ssl_library" >&5
$as_echo "$cf_ssl_library" >&6; }
if test "$cf_ssl_library" = yes ; then
	$as_echo "#define USE_SSL 1" >>confdefs.h

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

else
	as_fn_error $? "Cannot link with NSS compilant libraries" "$LINENO" 5
fi

fi

### check for ipv6 support
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable ipv6" >&5
$as_echo_n "checking whether to enable ipv6... " >&6; }
# Check whether --enable-ipv6 was given.
if test "${enable_ipv6+set}" = set; then :
  enableval=$enable_ipv6; test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    $as_echo "#define ENABLE_IPV6 1" >>confdefs.h

  fi
else
  enableval=no
fi

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


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
$as_echo_n "checking ipv6 stack type... " >&6; }
if ${cf_cv_ipv6type+:} false; then :
  $as_echo_n "(cached) " >&6
else

cf_cv_ipv6type=unknown
for i in solaris inria kame linux-glibc linux-libinet6 toshiba v6d zeta
do
	case $i in #(vi
	solaris) #(vi
		if test "SunOS" = "`uname -s`"
		then
		  if test -f /usr/include/netinet/ip6.h
		  then
			cf_cv_ipv6type=$i
		  fi
		fi
		;;
	inria) #(vi
				cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <netinet/in.h>
#ifdef IPV6_INRIA_VERSION
yes
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "yes" >/dev/null 2>&1; then :
  cf_cv_ipv6type=$i
fi
rm -f conftest*

		;;
	kame) #(vi
				cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <netinet/in.h>
#ifdef __KAME__
yes
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "yes" >/dev/null 2>&1; then :
  cf_cv_ipv6type=$i
fi
rm -f conftest*

		;;
	linux-glibc) #(vi
				cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <features.h>
#if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
yes
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "yes" >/dev/null 2>&1; then :
  cf_cv_ipv6type=$i
fi
rm -f conftest*

		;;
	linux-libinet6) #(vi
				if test -d /usr/inet6
		then
			cf_cv_ipv6type=$i
		elif test -f /usr/include/netinet/ip6.h
		then
			cf_cv_ipv6type=$i
		fi
		;;
	toshiba) #(vi
		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <sys/param.h>
#ifdef _TOSHIBA_INET6
yes
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "yes" >/dev/null 2>&1; then :
  cf_cv_ipv6type=$i
fi
rm -f conftest*

		;;
	v6d) #(vi
		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include </usr/local/v6/include/sys/v6config.h>
#ifdef __V6D__
yes
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "yes" >/dev/null 2>&1; then :
  cf_cv_ipv6type=$i
fi
rm -f conftest*

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

#include <sys/param.h>
#ifdef _ZETA_MINAMI_INET6
yes
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "yes" >/dev/null 2>&1; then :
  cf_cv_ipv6type=$i
fi
rm -f conftest*

		;;
	esac
	if test "$cf_cv_ipv6type" != "unknown"; then
		break
	fi
done

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




cf_ipv6lib=none
cf_ipv6dir=none

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 library if required" >&5
$as_echo_n "checking for IPv6 library if required... " >&6; }
case $cf_cv_ipv6type in #(vi
solaris) #(vi
	;;
inria) #(vi
	;;
kame) #(vi
		cf_ipv6lib=inet6
	cf_ipv6dir=v6
	;;
linux-glibc) #(vi
	;;
linux-libinet6) #(vi
		cf_ipv6lib=inet6
	cf_ipv6dir=inet6
	;;
toshiba) #(vi
	cf_ipv6lib=inet6
	cf_ipv6dir=v6
	;;
v6d) #(vi
	cf_ipv6lib=v6
	cf_ipv6dir=v6
	;;
zeta)
	cf_ipv6lib=inet6
	cf_ipv6dir=v6
	;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_ipv6lib" >&5
$as_echo "$cf_ipv6lib" >&6; }

if test "$cf_ipv6lib" != "none"; then

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

#include <sys/types.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/ip6.h>
int
main ()
{
getaddrinfo(0, 0, 0, 0)
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :

else


cf_header_path_list=""
if test -n "${CFLAGS}${CPPFLAGS}" ; then
	for cf_header_path in $CPPFLAGS $CFLAGS
	do
		case $cf_header_path in #(vi
		-I*)
			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`

test "$cf_header_path" != "NONE" && \
test -d "$cf_header_path" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
	test -d $cf_header_path/include/$cf_ipv6dir &&       cf_search="$cf_search $cf_header_path/include/$cf_ipv6dir"
	test -d $cf_header_path/include/$cf_ipv6dir/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ipv6dir/include"
	test -d $cf_header_path/$cf_ipv6dir/include &&       cf_search="$cf_search $cf_header_path/$cf_ipv6dir/include"
	test -d $cf_header_path/$cf_ipv6dir/include/$cf_ipv6dir &&    cf_search="$cf_search $cf_header_path/$cf_ipv6dir/include/$cf_ipv6dir"
}

			cf_header_path_list="$cf_header_path_list $cf_search"
			;;
		esac
	done
fi

cf_search=""


test "/usr" != "$prefix" && \
test -d "/usr" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /usr"
	test -d /usr/include &&          cf_search="$cf_search /usr/include"
	test -d /usr/include/$cf_ipv6dir &&       cf_search="$cf_search /usr/include/$cf_ipv6dir"
	test -d /usr/include/$cf_ipv6dir/include &&    cf_search="$cf_search /usr/include/$cf_ipv6dir/include"
	test -d /usr/$cf_ipv6dir/include &&       cf_search="$cf_search /usr/$cf_ipv6dir/include"
	test -d /usr/$cf_ipv6dir/include/$cf_ipv6dir &&    cf_search="$cf_search /usr/$cf_ipv6dir/include/$cf_ipv6dir"
}


test "$prefix" != "NONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
	test -d $prefix/include/$cf_ipv6dir &&       cf_search="$cf_search $prefix/include/$cf_ipv6dir"
	test -d $prefix/include/$cf_ipv6dir/include &&    cf_search="$cf_search $prefix/include/$cf_ipv6dir/include"
	test -d $prefix/$cf_ipv6dir/include &&       cf_search="$cf_search $prefix/$cf_ipv6dir/include"
	test -d $prefix/$cf_ipv6dir/include/$cf_ipv6dir &&    cf_search="$cf_search $prefix/$cf_ipv6dir/include/$cf_ipv6dir"
}


test "/usr/local" != "$prefix" && \
test -d "/usr/local" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /usr/local"
	test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
	test -d /usr/local/include/$cf_ipv6dir &&       cf_search="$cf_search /usr/local/include/$cf_ipv6dir"
	test -d /usr/local/include/$cf_ipv6dir/include &&    cf_search="$cf_search /usr/local/include/$cf_ipv6dir/include"
	test -d /usr/local/$cf_ipv6dir/include &&       cf_search="$cf_search /usr/local/$cf_ipv6dir/include"
	test -d /usr/local/$cf_ipv6dir/include/$cf_ipv6dir &&    cf_search="$cf_search /usr/local/$cf_ipv6dir/include/$cf_ipv6dir"
}


test "/opt" != "$prefix" && \
test -d "/opt" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /opt"
	test -d /opt/include &&          cf_search="$cf_search /opt/include"
	test -d /opt/include/$cf_ipv6dir &&       cf_search="$cf_search /opt/include/$cf_ipv6dir"
	test -d /opt/include/$cf_ipv6dir/include &&    cf_search="$cf_search /opt/include/$cf_ipv6dir/include"
	test -d /opt/$cf_ipv6dir/include &&       cf_search="$cf_search /opt/$cf_ipv6dir/include"
	test -d /opt/$cf_ipv6dir/include/$cf_ipv6dir &&    cf_search="$cf_search /opt/$cf_ipv6dir/include/$cf_ipv6dir"
}


test "$HOME" != "$prefix" && \
test -d "$HOME" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under $HOME"
	test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
	test -d $HOME/include/$cf_ipv6dir &&       cf_search="$cf_search $HOME/include/$cf_ipv6dir"
	test -d $HOME/include/$cf_ipv6dir/include &&    cf_search="$cf_search $HOME/include/$cf_ipv6dir/include"
	test -d $HOME/$cf_ipv6dir/include &&       cf_search="$cf_search $HOME/$cf_ipv6dir/include"
	test -d $HOME/$cf_ipv6dir/include/$cf_ipv6dir &&    cf_search="$cf_search $HOME/$cf_ipv6dir/include/$cf_ipv6dir"
}



test "$includedir" != NONE && \
test "$includedir" != "/usr/include" && \
test -d "$includedir" && {
	test -d $includedir &&    cf_search="$cf_search $includedir"
	test -d $includedir/$cf_ipv6dir && cf_search="$cf_search $includedir/$cf_ipv6dir"
}

test "$oldincludedir" != NONE && \
test "$oldincludedir" != "/usr/include" && \
test -d "$oldincludedir" && {
	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
	test -d $oldincludedir/$cf_ipv6dir && cf_search="$cf_search $oldincludedir/$cf_ipv6dir"
}

cf_search="$cf_header_path_list $cf_search"

	for cf_incdir in $cf_search
	do
		cf_header=$cf_incdir/netinet/ip6.h
		if test -f $cf_header
		then

if test -n "$cf_incdir" ; then
  for cf_add_incdir in $cf_incdir
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:15302: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi

			test -n "$verbose" && echo "	... found $cf_header" 1>&6
			break
		fi
		test -n "$verbose" && echo "	... tested $cf_header" 1>&6
	done

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


	eval 'cf_cv_have_lib_'$cf_ipv6lib'=no'
	cf_libdir=""
	ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
if test "x$ac_cv_func_getaddrinfo" = xyes; then :
  eval 'cf_cv_have_lib_'$cf_ipv6lib'=yes'
else

		cf_save_LIBS="$LIBS"
		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -l$cf_ipv6lib" >&5
$as_echo_n "checking for getaddrinfo in -l$cf_ipv6lib... " >&6; }
		LIBS="-l$cf_ipv6lib $LIBS"
		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <sys/types.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/ip6.h>
int
main ()
{
getaddrinfo(0, 0, 0, 0)
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
			 eval 'cf_cv_have_lib_'$cf_ipv6lib'=yes'

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

cf_library_path_list=""
if test -n "${LDFLAGS}${LIBS}" ; then
	for cf_library_path in $LDFLAGS $LIBS
	do
		case $cf_library_path in #(vi
		-L*)
			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`

test "$cf_library_path" != "NONE" && \
test -d "$cf_library_path" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
	test -d $cf_library_path/lib/$cf_ipv6dir &&       cf_search="$cf_search $cf_library_path/lib/$cf_ipv6dir"
	test -d $cf_library_path/lib/$cf_ipv6dir/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_ipv6dir/lib"
	test -d $cf_library_path/$cf_ipv6dir/lib &&       cf_search="$cf_search $cf_library_path/$cf_ipv6dir/lib"
	test -d $cf_library_path/$cf_ipv6dir/lib/$cf_ipv6dir &&    cf_search="$cf_search $cf_library_path/$cf_ipv6dir/lib/$cf_ipv6dir"
}

			cf_library_path_list="$cf_library_path_list $cf_search"
			;;
		esac
	done
fi

cf_search=""


test "/usr" != "$prefix" && \
test -d "/usr" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /usr"
	test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
	test -d /usr/lib/$cf_ipv6dir &&       cf_search="$cf_search /usr/lib/$cf_ipv6dir"
	test -d /usr/lib/$cf_ipv6dir/lib &&    cf_search="$cf_search /usr/lib/$cf_ipv6dir/lib"
	test -d /usr/$cf_ipv6dir/lib &&       cf_search="$cf_search /usr/$cf_ipv6dir/lib"
	test -d /usr/$cf_ipv6dir/lib/$cf_ipv6dir &&    cf_search="$cf_search /usr/$cf_ipv6dir/lib/$cf_ipv6dir"
}


test "$prefix" != "NONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
	test -d $prefix/lib/$cf_ipv6dir &&       cf_search="$cf_search $prefix/lib/$cf_ipv6dir"
	test -d $prefix/lib/$cf_ipv6dir/lib &&    cf_search="$cf_search $prefix/lib/$cf_ipv6dir/lib"
	test -d $prefix/$cf_ipv6dir/lib &&       cf_search="$cf_search $prefix/$cf_ipv6dir/lib"
	test -d $prefix/$cf_ipv6dir/lib/$cf_ipv6dir &&    cf_search="$cf_search $prefix/$cf_ipv6dir/lib/$cf_ipv6dir"
}


test "/usr/local" != "$prefix" && \
test -d "/usr/local" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /usr/local"
	test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
	test -d /usr/local/lib/$cf_ipv6dir &&       cf_search="$cf_search /usr/local/lib/$cf_ipv6dir"
	test -d /usr/local/lib/$cf_ipv6dir/lib &&    cf_search="$cf_search /usr/local/lib/$cf_ipv6dir/lib"
	test -d /usr/local/$cf_ipv6dir/lib &&       cf_search="$cf_search /usr/local/$cf_ipv6dir/lib"
	test -d /usr/local/$cf_ipv6dir/lib/$cf_ipv6dir &&    cf_search="$cf_search /usr/local/$cf_ipv6dir/lib/$cf_ipv6dir"
}


test "/opt" != "$prefix" && \
test -d "/opt" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /opt"
	test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
	test -d /opt/lib/$cf_ipv6dir &&       cf_search="$cf_search /opt/lib/$cf_ipv6dir"
	test -d /opt/lib/$cf_ipv6dir/lib &&    cf_search="$cf_search /opt/lib/$cf_ipv6dir/lib"
	test -d /opt/$cf_ipv6dir/lib &&       cf_search="$cf_search /opt/$cf_ipv6dir/lib"
	test -d /opt/$cf_ipv6dir/lib/$cf_ipv6dir &&    cf_search="$cf_search /opt/$cf_ipv6dir/lib/$cf_ipv6dir"
}


test "$HOME" != "$prefix" && \
test -d "$HOME" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under $HOME"
	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
	test -d $HOME/lib/$cf_ipv6dir &&       cf_search="$cf_search $HOME/lib/$cf_ipv6dir"
	test -d $HOME/lib/$cf_ipv6dir/lib &&    cf_search="$cf_search $HOME/lib/$cf_ipv6dir/lib"
	test -d $HOME/$cf_ipv6dir/lib &&       cf_search="$cf_search $HOME/$cf_ipv6dir/lib"
	test -d $HOME/$cf_ipv6dir/lib/$cf_ipv6dir &&    cf_search="$cf_search $HOME/$cf_ipv6dir/lib/$cf_ipv6dir"
}



cf_search="$cf_library_path_list $cf_search"

			for cf_libdir in $cf_search
			do
				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$cf_ipv6lib in $cf_libdir" >&5
$as_echo_n "checking for -l$cf_ipv6lib in $cf_libdir... " >&6; }
				LIBS="-L$cf_libdir -l$cf_ipv6lib $cf_save_LIBS"
				cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <sys/types.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/ip6.h>
int
main ()
{
getaddrinfo(0, 0, 0, 0)
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
			 		 eval 'cf_cv_have_lib_'$cf_ipv6lib'=yes'
					 break
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
					 LIBS="$cf_save_LIBS"
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
			done

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

fi

eval 'cf_found_library=$cf_cv_have_lib_'$cf_ipv6lib


	if test $cf_found_library = no ; then
		as_fn_error $? "No $cf_ipv6lib library found, cannot continue.  You must fetch lib$cf_ipv6lib.a
from an appropriate IPv6 kit and compile beforehand." "$LINENO" 5
	fi
fi




{ $as_echo "$as_me:${as_lineno-$LINENO}: checking working getaddrinfo" >&5
$as_echo_n "checking working getaddrinfo... " >&6; }
if ${cf_cv_getaddrinfo+:} false; then :
  $as_echo_n "(cached) " >&6
else

if test "$cross_compiling" = yes; then :
  cf_cv_getaddrinfo=unknown
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <sys/types.h>
#include <netdb.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>

#define expect(a,b) if (strcmp(a,b) != 0) goto bad

int main()
{
   int passive, gaierr, inet4 = 0, inet6 = 0;
   struct addrinfo hints, *ai, *aitop;
   char straddr[INET6_ADDRSTRLEN], strport[16];

   for (passive = 0; passive <= 1; passive++) {
     memset(&hints, 0, sizeof(hints));
     hints.ai_family = AF_UNSPEC;
     hints.ai_flags = passive ? AI_PASSIVE : 0;
     hints.ai_socktype = SOCK_STREAM;
     if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
       (void)gai_strerror(gaierr);
       goto bad;
     }
     for (ai = aitop; ai; ai = ai->ai_next) {
       if (ai->ai_addr == NULL ||
           ai->ai_addrlen == 0 ||
           getnameinfo(ai->ai_addr, ai->ai_addrlen,
                       straddr, sizeof(straddr), strport, sizeof(strport),
                       NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
         goto bad;
       }
       switch (ai->ai_family) {
       case AF_INET:
         expect(strport, "54321");
         if (passive) {
           expect(straddr, "0.0.0.0");
         } else {
           expect(straddr, "127.0.0.1");
         }
         inet4++;
         break;
       case AF_INET6:
         expect(strport, "54321");
         if (passive) {
           expect(straddr, "::");
         } else {
           expect(straddr, "::1");
         }
         inet6++;
         break;
       case AF_UNSPEC:
         goto bad;
         break;
       default:
         /* another family support? */
         break;
       }
     }
   }

   if (!(inet4 == 0 || inet4 == 2))
     goto bad;
   if (!(inet6 == 0 || inet6 == 2))
     goto bad;

   if (aitop)
     freeaddrinfo(aitop);
   ${cf_cv_main_return-return}(0);

  bad:
   if (aitop)
     freeaddrinfo(aitop);
   ${cf_cv_main_return-return}(1);
}

_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  cf_cv_getaddrinfo=yes
else
  cf_cv_getaddrinfo=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: $cf_cv_getaddrinfo" >&5
$as_echo "$cf_cv_getaddrinfo" >&6; }
if test "$cf_cv_getaddrinfo" = yes ; then
	$as_echo "#define HAVE_GAI_STRERROR 1" >>confdefs.h

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

fi


if test "$cf_cv_getaddrinfo" != "yes"; then
	if test "$cf_cv_ipv6type" != "linux"; then
		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You must get working getaddrinfo() function,
or you can specify \"--disable-ipv6\"" >&5
$as_echo "$as_me: WARNING: You must get working getaddrinfo() function,
or you can specify \"--disable-ipv6\"" >&2;}
	else
		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The getaddrinfo() implementation on your system seems be buggy.
You should upgrade your system library to the newest version
of GNU C library (aka glibc)." >&5
$as_echo "$as_me: WARNING: The getaddrinfo() implementation on your system seems be buggy.
You should upgrade your system library to the newest version
of GNU C library (aka glibc)." >&2;}
	fi
fi


fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for screen type" >&5
$as_echo_n "checking for screen type... " >&6; }
if ${cf_cv_screen+:} false; then :
  $as_echo_n "(cached) " >&6
else


# Check whether --with-screen was given.
if test "${with_screen+set}" = set; then :
  withval=$with_screen;
case $withval in
curses|ncurses|ncursesw|pdcurses|slang)
	cf_cv_screen=$withval
	;;
*)	as_fn_error $? "Unexpected value" "$LINENO" 5
	;;
esac
else
  cf_cv_screen=curses
fi

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

case $cf_cv_screen in
curses|ncurses*)


# Check whether --with-curses-dir was given.
if test "${with_curses_dir+set}" = set; then :
  withval=$with_curses_dir;
if test "x$prefix" != xNONE; then
  cf_path_syntax="$prefix"
else
  cf_path_syntax="$ac_default_prefix"
fi

case ".$withval" in #(vi
.\$\(*\)*|.\'*\'*) #(vi
  ;;
..|./*|.\\*) #(vi
  ;;
.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
  ;;
.\${*prefix}*) #(vi
  eval withval="$withval"
  case ".$withval" in #(vi
  .NONE/*)
    withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
    ;;
  esac
  ;; #(vi
.no|.NONE/*)
  withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
  ;;
*)
  as_fn_error $? "expected a pathname, not \"$withval\"" "$LINENO" 5
  ;;
esac

	 cf_cv_curses_dir=$withval
else
  cf_cv_curses_dir=no
fi


	;;
esac

cf_wide_curses=no
dft_color_style=yes
case $cf_cv_screen in
curses)



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra include directories" >&5
$as_echo_n "checking for extra include directories... " >&6; }
if ${cf_cv_curses_incdir+:} false; then :
  $as_echo_n "(cached) " >&6
else

cf_cv_curses_incdir=no
case $host_os in #(vi
hpux10.*) #(vi
	test -d /usr/include/curses_colr && \
	cf_cv_curses_incdir="-I/usr/include/curses_colr"
	;;
sunos3*|sunos4*)
	test -d /usr/5lib && \
	test -d /usr/5include && \
	cf_cv_curses_incdir="-I/usr/5include"
	;;
esac

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_curses_incdir" >&5
$as_echo "$cf_cv_curses_incdir" >&6; }
test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have identified curses headers" >&5
$as_echo_n "checking if we have identified curses headers... " >&6; }
if ${cf_cv_ncurses_header+:} false; then :
  $as_echo_n "(cached) " >&6
else

cf_cv_ncurses_header=none
for cf_header in \
	curses.h \
	ncurses.h \
	ncurses/curses.h \
	ncurses/ncurses.h
do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <${cf_header}>
int
main ()
{
initscr(); tgoto("?", 0,0)
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_ncurses_header=$cf_header; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done

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

if test "$cf_cv_ncurses_header" = none ; then
	as_fn_error $? "No curses header-files found" "$LINENO" 5
fi

# cheat, to get the right #define's for HAVE_NCURSES_H, etc.
for ac_header in $cf_cv_ncurses_header
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"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for terminfo header" >&5
$as_echo_n "checking for terminfo header... " >&6; }
if ${cf_cv_term_header+:} false; then :
  $as_echo_n "(cached) " >&6
else

case ${cf_cv_ncurses_header} in #(vi
*/ncurses.h|*/ncursesw.h) #(vi
	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
	;;
*)
	cf_term_header=term.h
	;;
esac

for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
#include <${cf_cv_ncurses_header-curses.h}>
#include <$cf_test>

int
main ()
{
int x = auto_left_margin
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

	cf_cv_term_header="$cf_test"
else

	cf_cv_term_header=unknown

fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
	test "$cf_cv_term_header" != unknown && break
done

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

# Set definitions to allow ifdef'ing to accommodate subdirectories

case $cf_cv_term_header in # (vi
*term.h)
	$as_echo "#define HAVE_TERM_H 1" >>confdefs.h

	;;
esac

case $cf_cv_term_header in # (vi
ncurses/term.h) #(vi
	$as_echo "#define HAVE_NCURSES_TERM_H 1" >>confdefs.h

	;;
ncursesw/term.h)
	$as_echo "#define HAVE_NCURSESW_TERM_H 1" >>confdefs.h

	;;
esac



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ncurses version" >&5
$as_echo_n "checking for ncurses version... " >&6; }
if ${cf_cv_ncurses_version+:} false; then :
  $as_echo_n "(cached) " >&6
else

	cf_cv_ncurses_version=no
	cf_tempfile=out$$
	rm -f $cf_tempfile
	if test "$cross_compiling" = yes; then :


	# This will not work if the preprocessor splits the line after the
	# Autoconf token.  The 'unproto' program does that.
	cat > conftest.$ac_ext <<EOF
#include <${cf_cv_ncurses_header-curses.h}>
#undef Autoconf
#ifdef NCURSES_VERSION
Autoconf NCURSES_VERSION
#else
#ifdef __NCURSES_H
Autoconf "old"
#endif
;
#endif
EOF
	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$cf_try\""; } >&5
  (eval $cf_try) 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
	if test -f conftest.out ; then
		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
		rm -f conftest.out
	fi

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

#include <${cf_cv_ncurses_header-curses.h}>
#include <stdio.h>
int main()
{
	FILE *fp = fopen("$cf_tempfile", "w");
#ifdef NCURSES_VERSION
# ifdef NCURSES_VERSION_PATCH
	fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
# else
	fprintf(fp, "%s\n", NCURSES_VERSION);
# endif
#else
# ifdef __NCURSES_H
	fprintf(fp, "old\n");
# else
	make an error
# endif
#endif
	${cf_cv_main_return-return}(0);
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :

	cf_cv_ncurses_version=`cat $cf_tempfile`
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

	rm -f $cf_tempfile

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_ncurses_version" >&5
$as_echo "$cf_cv_ncurses_version" >&6; }
test "$cf_cv_ncurses_version" = no || $as_echo "#define NCURSES 1" >>confdefs.h




{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have identified curses libraries" >&5
$as_echo_n "checking if we have identified curses libraries... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <${cf_cv_ncurses_header-curses.h}>
int
main ()
{
initscr(); tgoto("?", 0,0)
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_result=yes
else
  cf_result=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_result" >&5
$as_echo "$cf_result" >&6; }

if test "$cf_result" = no ; then
case $host_os in #(vi
freebsd*) #(vi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgoto in -lmytinfo" >&5
$as_echo_n "checking for tgoto in -lmytinfo... " >&6; }
if ${ac_cv_lib_mytinfo_tgoto+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lmytinfo  $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 tgoto ();
int
main ()
{
return tgoto ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_mytinfo_tgoto=yes
else
  ac_cv_lib_mytinfo_tgoto=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_mytinfo_tgoto" >&5
$as_echo "$ac_cv_lib_mytinfo_tgoto" >&6; }
if test "x$ac_cv_lib_mytinfo_tgoto" = xyes; then :
  LIBS="-lmytinfo $LIBS"
fi

    ;;
hpux10.*) #(vi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lcur_colr" >&5
$as_echo_n "checking for initscr in -lcur_colr... " >&6; }
if ${ac_cv_lib_cur_colr_initscr+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lcur_colr  $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 initscr ();
int
main ()
{
return initscr ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_cur_colr_initscr=yes
else
  ac_cv_lib_cur_colr_initscr=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_cur_colr_initscr" >&5
$as_echo "$ac_cv_lib_cur_colr_initscr" >&6; }
if test "x$ac_cv_lib_cur_colr_initscr" = xyes; then :

        LIBS="-lcur_colr $LIBS"
        ac_cv_func_initscr=yes

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lHcurses" >&5
$as_echo_n "checking for initscr in -lHcurses... " >&6; }
if ${ac_cv_lib_Hcurses_initscr+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lHcurses  $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 initscr ();
int
main ()
{
return initscr ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_Hcurses_initscr=yes
else
  ac_cv_lib_Hcurses_initscr=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_Hcurses_initscr" >&5
$as_echo "$ac_cv_lib_Hcurses_initscr" >&6; }
if test "x$ac_cv_lib_Hcurses_initscr" = xyes; then :

        # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
        LIBS="-lHcurses $LIBS"
        CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
        ac_cv_func_initscr=yes

fi

fi

    ;;
linux*) # Suse Linux does not follow /usr/lib convention

if test -n "/lib" ; then
  for cf_add_libdir in /lib
  do
    if test $cf_add_libdir = /usr/lib ; then
      :
    elif test -d $cf_add_libdir
    then
      cf_have_libdir=no
      if test -n "$LDFLAGS$LIBS" ; then
        # a loop is needed to ensure we can add subdirs of existing dirs
        for cf_test_libdir in $LDFLAGS $LIBS ; do
          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
            cf_have_libdir=yes; break
          fi
        done
      fi
      if test "$cf_have_libdir" = no ; then
        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me-configure}:16121: testing adding $cf_add_libdir to library-path ..." 1>&5


        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
      fi
    fi
  done
fi

    ;;
sunos3*|sunos4*)
    if test -d /usr/5lib ; then

if test -n "/usr/5lib" ; then
  for cf_add_libdir in /usr/5lib
  do
    if test $cf_add_libdir = /usr/lib ; then
      :
    elif test -d $cf_add_libdir
    then
      cf_have_libdir=no
      if test -n "$LDFLAGS$LIBS" ; then
        # a loop is needed to ensure we can add subdirs of existing dirs
        for cf_test_libdir in $LDFLAGS $LIBS ; do
          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
            cf_have_libdir=yes; break
          fi
        done
      fi
      if test "$cf_have_libdir" = no ; then
        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me-configure}:16153: testing adding $cf_add_libdir to library-path ..." 1>&5


        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
      fi
    fi
  done
fi

      LIBS="$LIBS -lcurses -ltermcap"
    fi
    ac_cv_func_initscr=yes
    ;;
esac

if test ".$ac_cv_func_initscr" != .yes ; then
    cf_save_LIBS="$LIBS"
    cf_term_lib=""
    cf_curs_lib=""

    if test ".${cf_cv_ncurses_version-no}" != .no
    then
        cf_check_list="ncurses curses cursesX"
    else
        cf_check_list="cursesX curses ncurses"
    fi

    # Check for library containing tgoto.  Do this before curses library
    # because it may be needed to link the test-case for initscr.
    ac_fn_c_check_func "$LINENO" "tgoto" "ac_cv_func_tgoto"
if test "x$ac_cv_func_tgoto" = xyes; then :
  cf_term_lib=predefined
else

        for cf_term_lib in $cf_check_list termcap termlib unknown
        do
            as_ac_Lib=`$as_echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgoto in -l$cf_term_lib" >&5
$as_echo_n "checking for tgoto in -l$cf_term_lib... " >&6; }
if eval \${$as_ac_Lib+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-l$cf_term_lib  $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 tgoto ();
int
main ()
{
return tgoto ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  eval "$as_ac_Lib=yes"
else
  eval "$as_ac_Lib=no"
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
eval ac_res=\$$as_ac_Lib
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  break
fi

        done

fi


    # Check for library containing initscr
    test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
 	for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
    do
        as_ac_Lib=`$as_echo "ac_cv_lib_$cf_curs_lib''_initscr" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -l$cf_curs_lib" >&5
$as_echo_n "checking for initscr in -l$cf_curs_lib... " >&6; }
if eval \${$as_ac_Lib+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-l$cf_curs_lib  $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 initscr ();
int
main ()
{
return initscr ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  eval "$as_ac_Lib=yes"
else
  eval "$as_ac_Lib=no"
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
eval ac_res=\$$as_ac_Lib
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
  break
fi

    done
    test $cf_curs_lib = unknown && as_fn_error $? "no curses library found" "$LINENO" 5

    LIBS="-l$cf_curs_lib $cf_save_LIBS"
    if test "$cf_term_lib" = unknown ; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can link with $cf_curs_lib library" >&5
$as_echo_n "checking if we can link with $cf_curs_lib library... " >&6; }
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <${cf_cv_ncurses_header-curses.h}>
int
main ()
{
initscr()
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_result=yes
else
  cf_result=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_result" >&5
$as_echo "$cf_result" >&6; }
        test $cf_result = no && as_fn_error $? "Cannot link curses library" "$LINENO" 5
    elif test "$cf_curs_lib" = "$cf_term_lib" ; then
        :
    elif test "$cf_term_lib" != predefined ; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
$as_echo_n "checking if we need both $cf_curs_lib and $cf_term_lib libraries... " >&6; }
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <${cf_cv_ncurses_header-curses.h}>
int
main ()
{
initscr(); tgoto((char *)0, 0, 0);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_result=no
else

            LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <${cf_cv_ncurses_header-curses.h}>
int
main ()
{
initscr()
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_result=yes
else
  cf_result=error
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
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_result" >&5
$as_echo "$cf_result" >&6; }
    fi
fi
fi




{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for curses performance tradeoff" >&5
$as_echo_n "checking for curses performance tradeoff... " >&6; }
if ${cf_cv_curs_performance+:} false; then :
  $as_echo_n "(cached) " >&6
else

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

#include <${cf_cv_ncurses_header-curses.h}>
int
main ()
{

#if defined(wbkgdset) && defined(clearok) && defined(getbkgd)
	int x = ERR;
#else
	int x = ;	/* force an error */
#endif

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

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

#define CURS_PERFORMANCE
#include <${cf_cv_ncurses_header-curses.h}>
int
main ()
{

#if defined(wbkgdset) && defined(clearok) && defined(getbkgd)
	int x = ;	/* force an error */
#else
	int x = ERR;
#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_curs_performance=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

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_curs_performance" >&5
$as_echo "$cf_cv_curs_performance" >&6; }
test $cf_cv_curs_performance = yes && $as_echo "#define CURS_PERFORMANCE 1" >>confdefs.h



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for curses touchline function" >&5
$as_echo_n "checking for curses touchline function... " >&6; }
if ${cf_cv_curs_touchline+:} false; then :
  $as_echo_n "(cached) " >&6
else

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

#include <${cf_cv_ncurses_header-curses.h}>
int
main ()
{
touchline(stdscr, 1,2,3);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_curs_touchline=bsd
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <${cf_cv_ncurses_header-curses.h}>
int
main ()
{
touchline(stdscr, 1,2);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_curs_touchline=sysv
else
  cf_cv_curs_touchline=bsd
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
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_curs_touchline" >&5
$as_echo "$cf_cv_curs_touchline" >&6; }
case "$cf_cv_curs_touchline" in #(vi
bsd) #(vi
	$as_echo "#define HAVE_BSD_TOUCHLINE 1" >>confdefs.h

	;;
sysv)
	$as_echo "#define HAVE_SYSV_TOUCHLINE 1" >>confdefs.h

	;;
esac

	;;
ncurses)

cf_ncuconfig_root=ncurses

echo "Looking for ${cf_ncuconfig_root}-config"
for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
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_path_NCURSES_CONFIG+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $NCURSES_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_NCURSES_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
NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
if test -n "$NCURSES_CONFIG"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NCURSES_CONFIG" >&5
$as_echo "$NCURSES_CONFIG" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$NCURSES_CONFIG" && break
done
test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"


if test "$NCURSES_CONFIG" != none ; then

cf_cv_ncurses_header=curses.h

CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
LIBS="`$NCURSES_CONFIG --libs` $LIBS"

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



cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

cat >>confdefs.h <<_ACEOF
#define $cf_nculib_ROOT 1
_ACEOF


cf_cv_ncurses_version=`$NCURSES_CONFIG --version`

else



cf_ncuhdr_root=ncurses

test -n "$cf_cv_curses_dir" && \
test "$cf_cv_curses_dir" != "no" && { \

if test -n "$cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
  for cf_add_incdir in $cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:16609: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi

}

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $cf_ncuhdr_root header in include-path" >&5
$as_echo_n "checking for $cf_ncuhdr_root header in include-path... " >&6; }
if ${cf_cv_ncurses_h+:} false; then :
  $as_echo_n "(cached) " >&6
else

	cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
	( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
	for cf_header in $cf_header_list
	do

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


#include <$cf_header>
int
main ()
{

#ifdef NCURSES_VERSION

printf("%s\n", NCURSES_VERSION);
#else
#ifdef __NCURSES_H
printf("old\n");
#else
	make an error
#endif
#endif


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

else
  cf_cv_ncurses_h=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

		test "$cf_cv_ncurses_h" != no && break
	done

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



if test "$cf_cv_ncurses_h" != no ; then
	cf_cv_ncurses_header=$cf_cv_ncurses_h
else

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $cf_ncuhdr_root include-path" >&5
$as_echo_n "checking for $cf_ncuhdr_root include-path... " >&6; }
if ${cf_cv_ncurses_h2+:} false; then :
  $as_echo_n "(cached) " >&6
else

	test -n "$verbose" && echo

cf_header_path_list=""
if test -n "${CFLAGS}${CPPFLAGS}" ; then
	for cf_header_path in $CPPFLAGS $CFLAGS
	do
		case $cf_header_path in #(vi
		-I*)
			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`

test "$cf_header_path" != "NONE" && \
test -d "$cf_header_path" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
	test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
	test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
	test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
	test -d $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
}

			cf_header_path_list="$cf_header_path_list $cf_search"
			;;
		esac
	done
fi

cf_search=""


test "/usr" != "$prefix" && \
test -d "/usr" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /usr"
	test -d /usr/include &&          cf_search="$cf_search /usr/include"
	test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
	test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
	test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
	test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
}


test "$prefix" != "NONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
	test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
	test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
	test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
	test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
}


test "/usr/local" != "$prefix" && \
test -d "/usr/local" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /usr/local"
	test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
	test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
	test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
	test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
	test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
}


test "/opt" != "$prefix" && \
test -d "/opt" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /opt"
	test -d /opt/include &&          cf_search="$cf_search /opt/include"
	test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
	test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
	test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
	test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
}


test "$HOME" != "$prefix" && \
test -d "$HOME" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under $HOME"
	test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
	test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
	test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
	test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
	test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
}



test "$includedir" != NONE && \
test "$includedir" != "/usr/include" && \
test -d "$includedir" && {
	test -d $includedir &&    cf_search="$cf_search $includedir"
	test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
}

test "$oldincludedir" != NONE && \
test "$oldincludedir" != "/usr/include" && \
test -d "$oldincludedir" && {
	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
	test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
}

cf_search="$cf_header_path_list $cf_search"

	test -n "$verbose" && echo search path $cf_search
	cf_save2_CPPFLAGS="$CPPFLAGS"
	for cf_incdir in $cf_search
	do

if test -n "$cf_incdir" ; then
  for cf_add_incdir in $cf_incdir
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:16850: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi

		for cf_header in \
			ncurses.h \
			curses.h
		do

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


#include <$cf_header>
int
main ()
{

#ifdef NCURSES_VERSION

printf("%s\n", NCURSES_VERSION);
#else
#ifdef __NCURSES_H
printf("old\n");
#else
	make an error
#endif
#endif


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

else
  cf_cv_ncurses_h2=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

			if test "$cf_cv_ncurses_h2" != no ; then
				cf_cv_ncurses_h2=$cf_incdir/$cf_header
				test -n "$verbose" && echo $ac_n "	... found $ac_c" 1>&6
				break
			fi
			test -n "$verbose" && echo "	... tested $cf_incdir/$cf_header" 1>&6
		done
		CPPFLAGS="$cf_save2_CPPFLAGS"
		test "$cf_cv_ncurses_h2" != no && break
	done
	test "$cf_cv_ncurses_h2" = no && as_fn_error $? "not found" "$LINENO" 5

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

	cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
	cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
	if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
		cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
	fi

if test -n "$cf_1st_incdir" ; then
  for cf_add_incdir in $cf_1st_incdir
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:16974: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi


fi

# Set definitions to allow ifdef'ing for ncurses.h

case $cf_cv_ncurses_header in # (vi
*ncurses.h)
	$as_echo "#define HAVE_NCURSES_H 1" >>confdefs.h

	;;
esac

case $cf_cv_ncurses_header in # (vi
ncurses/curses.h|ncurses/ncurses.h)
	$as_echo "#define HAVE_NCURSES_NCURSES_H 1" >>confdefs.h

	;;
ncursesw/curses.h|ncursesw/ncurses.h)
	$as_echo "#define HAVE_NCURSESW_NCURSES_H 1" >>confdefs.h

	;;
esac



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for terminfo header" >&5
$as_echo_n "checking for terminfo header... " >&6; }
if ${cf_cv_term_header+:} false; then :
  $as_echo_n "(cached) " >&6
else

case ${cf_cv_ncurses_header} in #(vi
*/ncurses.h|*/ncursesw.h) #(vi
	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
	;;
*)
	cf_term_header=term.h
	;;
esac

for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
#include <${cf_cv_ncurses_header-curses.h}>
#include <$cf_test>

int
main ()
{
int x = auto_left_margin
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

	cf_cv_term_header="$cf_test"
else

	cf_cv_term_header=unknown

fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
	test "$cf_cv_term_header" != unknown && break
done

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

# Set definitions to allow ifdef'ing to accommodate subdirectories

case $cf_cv_term_header in # (vi
*term.h)
	$as_echo "#define HAVE_TERM_H 1" >>confdefs.h

	;;
esac

case $cf_cv_term_header in # (vi
ncurses/term.h) #(vi
	$as_echo "#define HAVE_NCURSES_TERM_H 1" >>confdefs.h

	;;
ncursesw/term.h)
	$as_echo "#define HAVE_NCURSESW_TERM_H 1" >>confdefs.h

	;;
esac


# some applications need this, but should check for NCURSES_VERSION
$as_echo "#define NCURSES 1" >>confdefs.h



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ncurses version" >&5
$as_echo_n "checking for ncurses version... " >&6; }
if ${cf_cv_ncurses_version+:} false; then :
  $as_echo_n "(cached) " >&6
else

	cf_cv_ncurses_version=no
	cf_tempfile=out$$
	rm -f $cf_tempfile
	if test "$cross_compiling" = yes; then :


	# This will not work if the preprocessor splits the line after the
	# Autoconf token.  The 'unproto' program does that.
	cat > conftest.$ac_ext <<EOF
#include <${cf_cv_ncurses_header-curses.h}>
#undef Autoconf
#ifdef NCURSES_VERSION
Autoconf NCURSES_VERSION
#else
#ifdef __NCURSES_H
Autoconf "old"
#endif
;
#endif
EOF
	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$cf_try\""; } >&5
  (eval $cf_try) 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
	if test -f conftest.out ; then
		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
		rm -f conftest.out
	fi

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

#include <${cf_cv_ncurses_header-curses.h}>
#include <stdio.h>
int main()
{
	FILE *fp = fopen("$cf_tempfile", "w");
#ifdef NCURSES_VERSION
# ifdef NCURSES_VERSION_PATCH
	fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
# else
	fprintf(fp, "%s\n", NCURSES_VERSION);
# endif
#else
# ifdef __NCURSES_H
	fprintf(fp, "old\n");
# else
	make an error
# endif
#endif
	${cf_cv_main_return-return}(0);
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :

	cf_cv_ncurses_version=`cat $cf_tempfile`
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

	rm -f $cf_tempfile

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_ncurses_version" >&5
$as_echo "$cf_cv_ncurses_version" >&6; }
test "$cf_cv_ncurses_version" = no || $as_echo "#define NCURSES 1" >>confdefs.h





cf_nculib_root=ncurses
	# This works, except for the special case where we find gpm, but
	# ncurses is in a nonstandard location via $LIBS, and we really want
	# to link gpm.
cf_ncurses_LIBS=""
cf_ncurses_SAVE="$LIBS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
$as_echo_n "checking for Gpm_Open in -lgpm... " >&6; }
if ${ac_cv_lib_gpm_Gpm_Open+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lgpm  $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 Gpm_Open ();
int
main ()
{
return Gpm_Open ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_gpm_Gpm_Open=yes
else
  ac_cv_lib_gpm_Gpm_Open=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_gpm_Gpm_Open" >&5
$as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; }
if test "x$ac_cv_lib_gpm_Gpm_Open" = xyes; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lgpm" >&5
$as_echo_n "checking for initscr in -lgpm... " >&6; }
if ${ac_cv_lib_gpm_initscr+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lgpm  $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 initscr ();
int
main ()
{
return initscr ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_gpm_initscr=yes
else
  ac_cv_lib_gpm_initscr=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_gpm_initscr" >&5
$as_echo "$ac_cv_lib_gpm_initscr" >&6; }
if test "x$ac_cv_lib_gpm_initscr" = xyes; then :
  LIBS="$cf_ncurses_SAVE"
else
  cf_ncurses_LIBS="-lgpm"
fi

fi


case $host_os in #(vi
freebsd*)
	# This is only necessary if you are linking against an obsolete
	# version of ncurses (but it should do no harm, since it's static).
	if test "$cf_nculib_root" = ncurses ; then
		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgoto in -lmytinfo" >&5
$as_echo_n "checking for tgoto in -lmytinfo... " >&6; }
if ${ac_cv_lib_mytinfo_tgoto+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lmytinfo  $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 tgoto ();
int
main ()
{
return tgoto ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_mytinfo_tgoto=yes
else
  ac_cv_lib_mytinfo_tgoto=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_mytinfo_tgoto" >&5
$as_echo "$ac_cv_lib_mytinfo_tgoto" >&6; }
if test "x$ac_cv_lib_mytinfo_tgoto" = xyes; then :
  cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
fi

	fi
	;;
esac

LIBS="$cf_ncurses_LIBS $LIBS"

if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
then

if test -n "$cf_cv_curses_dir/lib" ; then
  for cf_add_libdir in $cf_cv_curses_dir/lib
  do
    if test $cf_add_libdir = /usr/lib ; then
      :
    elif test -d $cf_add_libdir
    then
      cf_have_libdir=no
      if test -n "$LDFLAGS$LIBS" ; then
        # a loop is needed to ensure we can add subdirs of existing dirs
        for cf_test_libdir in $LDFLAGS $LIBS ; do
          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
            cf_have_libdir=yes; break
          fi
        done
      fi
      if test "$cf_have_libdir" = no ; then
        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me-configure}:17331: testing adding $cf_add_libdir to library-path ..." 1>&5


        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
      fi
    fi
  done
fi

	LIBS="-l$cf_nculib_root $LIBS"
else

	eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
	cf_libdir=""
	ac_fn_c_check_func "$LINENO" "initscr" "ac_cv_func_initscr"
if test "x$ac_cv_func_initscr" = xyes; then :
  eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
else

		cf_save_LIBS="$LIBS"
		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -l$cf_nculib_root" >&5
$as_echo_n "checking for initscr in -l$cf_nculib_root... " >&6; }
		LIBS="-l$cf_nculib_root $LIBS"
		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <${cf_cv_ncurses_header-curses.h}>
int
main ()
{
initscr()
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
			 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'

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

cf_library_path_list=""
if test -n "${LDFLAGS}${LIBS}" ; then
	for cf_library_path in $LDFLAGS $LIBS
	do
		case $cf_library_path in #(vi
		-L*)
			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`

test "$cf_library_path" != "NONE" && \
test -d "$cf_library_path" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
	test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
	test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
	test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
	test -d $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
}

			cf_library_path_list="$cf_library_path_list $cf_search"
			;;
		esac
	done
fi

cf_search=""


test "/usr" != "$prefix" && \
test -d "/usr" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /usr"
	test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
	test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
	test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
	test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
	test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
}


test "$prefix" != "NONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
	test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
	test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
	test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
	test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
}


test "/usr/local" != "$prefix" && \
test -d "/usr/local" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /usr/local"
	test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
	test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
	test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
	test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
	test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
}


test "/opt" != "$prefix" && \
test -d "/opt" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /opt"
	test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
	test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
	test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
	test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
	test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
}


test "$HOME" != "$prefix" && \
test -d "$HOME" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under $HOME"
	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
	test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
	test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
	test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
	test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
}



cf_search="$cf_library_path_list $cf_search"

			for cf_libdir in $cf_search
			do
				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$cf_nculib_root in $cf_libdir" >&5
$as_echo_n "checking for -l$cf_nculib_root in $cf_libdir... " >&6; }
				LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
				cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <${cf_cv_ncurses_header-curses.h}>
int
main ()
{
initscr()
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
			 		 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
					 break
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
					 LIBS="$cf_save_LIBS"
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
			done

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

fi

eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root

if test $cf_found_library = no ; then
	as_fn_error $? "Cannot link $cf_nculib_root library" "$LINENO" 5
fi


fi

if test -n "$cf_ncurses_LIBS" ; then
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
$as_echo_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... " >&6; }
	cf_ncurses_SAVE="$LIBS"
	for p in $cf_ncurses_LIBS ; do
		q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
		if test "$q" != "$LIBS" ; then
			LIBS="$q"
		fi
	done
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <${cf_cv_ncurses_header-curses.h}>
int
main ()
{
initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; 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" >&5
$as_echo "no" >&6; }
		 LIBS="$cf_ncurses_SAVE"
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi


cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

cat >>confdefs.h <<_ACEOF
#define $cf_nculib_ROOT 1
_ACEOF



fi

	;;
ncursesw)

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for multibyte character support" >&5
$as_echo_n "checking for multibyte character support... " >&6; }
if ${cf_cv_utf8_lib+:} false; then :
  $as_echo_n "(cached) " >&6
else

	cf_save_LIBS="$LIBS"
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdlib.h>
int
main ()
{
putwc(0,0);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_utf8_lib=yes
else


# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
# will be set on completion of the AC_TRY_LINK below.
cf_cv_header_path_utf8=
cf_cv_library_path_utf8=


echo "${as_me-configure}:17587: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5


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

#include <libutf8.h>
int
main ()
{
putwc(0,0);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_find_linkage_utf8=yes
else

    cf_cv_find_linkage_utf8=no

    test -n "$verbose" && echo "	find linkage for utf8 library" 1>&6

echo "${as_me-configure}:17610: testing find linkage for utf8 library ..." 1>&5



echo "${as_me-configure}:17614: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5


    cf_save_CPPFLAGS="$CPPFLAGS"
    cf_test_CPPFLAGS="$CPPFLAGS"


cf_header_path_list=""
if test -n "${CFLAGS}${CPPFLAGS}" ; then
	for cf_header_path in $CPPFLAGS $CFLAGS
	do
		case $cf_header_path in #(vi
		-I*)
			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`

test "$cf_header_path" != "NONE" && \
test -d "$cf_header_path" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
	test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
	test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
	test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
	test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
}

			cf_header_path_list="$cf_header_path_list $cf_search"
			;;
		esac
	done
fi

cf_search=""


test "/usr" != "$prefix" && \
test -d "/usr" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /usr"
	test -d /usr/include &&          cf_search="$cf_search /usr/include"
	test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
	test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
	test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
	test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
}


test "$prefix" != "NONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
	test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
	test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
	test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
	test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
}


test "/usr/local" != "$prefix" && \
test -d "/usr/local" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /usr/local"
	test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
	test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
	test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
	test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
	test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
}


test "/opt" != "$prefix" && \
test -d "/opt" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /opt"
	test -d /opt/include &&          cf_search="$cf_search /opt/include"
	test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
	test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
	test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
	test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
}


test "$HOME" != "$prefix" && \
test -d "$HOME" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under $HOME"
	test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
	test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
	test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
	test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
	test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
}



test "$includedir" != NONE && \
test "$includedir" != "/usr/include" && \
test -d "$includedir" && {
	test -d $includedir &&    cf_search="$cf_search $includedir"
	test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
}

test "$oldincludedir" != NONE && \
test "$oldincludedir" != "/usr/include" && \
test -d "$oldincludedir" && {
	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
	test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
}

cf_search="$cf_header_path_list $cf_search"

    for cf_cv_header_path_utf8 in $cf_search
    do
      if test -d $cf_cv_header_path_utf8 ; then
        test -n "$verbose" && echo "	... testing $cf_cv_header_path_utf8" 1>&6

echo "${as_me-configure}:17731: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5


        CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <libutf8.h>
int
main ()
{
putwc(0,0);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

            test -n "$verbose" && echo "	... found utf8 headers in $cf_cv_header_path_utf8" 1>&6

echo "${as_me-configure}:17751: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5


            cf_cv_find_linkage_utf8=maybe
            cf_test_CPPFLAGS="$CPPFLAGS"
            break
else

            CPPFLAGS="$cf_save_CPPFLAGS"

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

    if test "$cf_cv_find_linkage_utf8" = maybe ; then


echo "${as_me-configure}:17769: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5


      cf_save_LIBS="$LIBS"
      cf_save_LDFLAGS="$LDFLAGS"



      if test "$cf_cv_find_linkage_utf8" != yes ; then

cf_library_path_list=""
if test -n "${LDFLAGS}${LIBS}" ; then
	for cf_library_path in $LDFLAGS $LIBS
	do
		case $cf_library_path in #(vi
		-L*)
			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`

test "$cf_library_path" != "NONE" && \
test -d "$cf_library_path" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
	test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
	test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
	test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
	test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
}

			cf_library_path_list="$cf_library_path_list $cf_search"
			;;
		esac
	done
fi

cf_search=""


test "/usr" != "$prefix" && \
test -d "/usr" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /usr"
	test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
	test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
	test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
	test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
	test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
}


test "$prefix" != "NONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
	test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
	test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
	test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
	test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
}


test "/usr/local" != "$prefix" && \
test -d "/usr/local" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /usr/local"
	test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
	test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
	test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
	test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
	test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
}


test "/opt" != "$prefix" && \
test -d "/opt" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /opt"
	test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
	test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
	test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
	test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
	test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
}


test "$HOME" != "$prefix" && \
test -d "$HOME" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under $HOME"
	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
	test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
	test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
	test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
	test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
}



cf_search="$cf_library_path_list $cf_search"

        for cf_cv_library_path_utf8 in $cf_search
        do
          if test -d $cf_cv_library_path_utf8 ; then
            test -n "$verbose" && echo "	... testing $cf_cv_library_path_utf8" 1>&6

echo "${as_me-configure}:17875: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5


            CPPFLAGS="$cf_test_CPPFLAGS"
            LIBS="-lutf8  $cf_save_LIBS"
            LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <libutf8.h>
int
main ()
{
putwc(0,0);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :

                test -n "$verbose" && echo "	... found utf8 library in $cf_cv_library_path_utf8" 1>&6

echo "${as_me-configure}:17897: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5


                cf_cv_find_linkage_utf8=yes
                cf_cv_library_file_utf8="-lutf8"
                break
else

                CPPFLAGS="$cf_save_CPPFLAGS"
                LIBS="$cf_save_LIBS"
                LDFLAGS="$cf_save_LDFLAGS"

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
          fi
        done
        LIBS="$cf_save_LIBS"
        CPPFLAGS="$cf_save_CPPFLAGS"
        LDFLAGS="$cf_save_LDFLAGS"
      fi

    else
      cf_cv_find_linkage_utf8=no
    fi

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

if test "$cf_cv_find_linkage_utf8" = yes ; then
cf_cv_utf8_lib=add-on
else
cf_cv_utf8_lib=no
fi


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

# HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
# ncurses/ncursesw:
if test "$cf_cv_utf8_lib" = "add-on" ; then
	$as_echo "#define HAVE_LIBUTF8_H 1" >>confdefs.h


if test -n "$cf_cv_header_path_utf8" ; then
  for cf_add_incdir in $cf_cv_header_path_utf8
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:17995: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi


if test -n "$cf_cv_library_path_utf8" ; then
  for cf_add_libdir in $cf_cv_library_path_utf8
  do
    if test $cf_add_libdir = /usr/lib ; then
      :
    elif test -d $cf_add_libdir
    then
      cf_have_libdir=no
      if test -n "$LDFLAGS$LIBS" ; then
        # a loop is needed to ensure we can add subdirs of existing dirs
        for cf_test_libdir in $LDFLAGS $LIBS ; do
          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
            cf_have_libdir=yes; break
          fi
        done
      fi
      if test "$cf_have_libdir" = no ; then
        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me-configure}:18031: testing adding $cf_add_libdir to library-path ..." 1>&5


        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
      fi
    fi
  done
fi

	LIBS="-lutf8 $LIBS"
fi


cf_ncuconfig_root=ncursesw

echo "Looking for ${cf_ncuconfig_root}-config"
for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
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_path_NCURSES_CONFIG+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $NCURSES_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_NCURSES_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
NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
if test -n "$NCURSES_CONFIG"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NCURSES_CONFIG" >&5
$as_echo "$NCURSES_CONFIG" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$NCURSES_CONFIG" && break
done
test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"


if test "$NCURSES_CONFIG" != none ; then

cf_cv_ncurses_header=curses.h

CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
LIBS="`$NCURSES_CONFIG --libs` $LIBS"

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



cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

cat >>confdefs.h <<_ACEOF
#define $cf_nculib_ROOT 1
_ACEOF


cf_cv_ncurses_version=`$NCURSES_CONFIG --version`

else



cf_ncuhdr_root=ncursesw

test -n "$cf_cv_curses_dir" && \
test "$cf_cv_curses_dir" != "no" && { \

if test -n "$cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
  for cf_add_incdir in $cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:18171: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi

}

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $cf_ncuhdr_root header in include-path" >&5
$as_echo_n "checking for $cf_ncuhdr_root header in include-path... " >&6; }
if ${cf_cv_ncurses_h+:} false; then :
  $as_echo_n "(cached) " >&6
else

	cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
	( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
	for cf_header in $cf_header_list
	do

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


#define _XOPEN_SOURCE_EXTENDED
#undef  HAVE_LIBUTF8_H	/* in case we used CF_UTF8_LIB */
#define HAVE_LIBUTF8_H	/* to force ncurses' header file to use cchar_t */

#include <$cf_header>
int
main ()
{

#ifdef NCURSES_VERSION

#ifndef WACS_BSSB
	make an error
#endif

printf("%s\n", NCURSES_VERSION);
#else
#ifdef __NCURSES_H
printf("old\n");
#else
	make an error
#endif
#endif


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

else
  cf_cv_ncurses_h=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

		test "$cf_cv_ncurses_h" != no && break
	done

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



if test "$cf_cv_ncurses_h" != no ; then
	cf_cv_ncurses_header=$cf_cv_ncurses_h
else

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $cf_ncuhdr_root include-path" >&5
$as_echo_n "checking for $cf_ncuhdr_root include-path... " >&6; }
if ${cf_cv_ncurses_h2+:} false; then :
  $as_echo_n "(cached) " >&6
else

	test -n "$verbose" && echo

cf_header_path_list=""
if test -n "${CFLAGS}${CPPFLAGS}" ; then
	for cf_header_path in $CPPFLAGS $CFLAGS
	do
		case $cf_header_path in #(vi
		-I*)
			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`

test "$cf_header_path" != "NONE" && \
test -d "$cf_header_path" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
	test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
	test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
	test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
	test -d $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
}

			cf_header_path_list="$cf_header_path_list $cf_search"
			;;
		esac
	done
fi

cf_search=""


test "/usr" != "$prefix" && \
test -d "/usr" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /usr"
	test -d /usr/include &&          cf_search="$cf_search /usr/include"
	test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
	test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
	test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
	test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
}


test "$prefix" != "NONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
	test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
	test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
	test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
	test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
}


test "/usr/local" != "$prefix" && \
test -d "/usr/local" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /usr/local"
	test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
	test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
	test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
	test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
	test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
}


test "/opt" != "$prefix" && \
test -d "/opt" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /opt"
	test -d /opt/include &&          cf_search="$cf_search /opt/include"
	test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
	test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
	test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
	test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
}


test "$HOME" != "$prefix" && \
test -d "$HOME" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under $HOME"
	test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
	test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
	test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
	test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
	test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
}



test "$includedir" != NONE && \
test "$includedir" != "/usr/include" && \
test -d "$includedir" && {
	test -d $includedir &&    cf_search="$cf_search $includedir"
	test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
}

test "$oldincludedir" != NONE && \
test "$oldincludedir" != "/usr/include" && \
test -d "$oldincludedir" && {
	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
	test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
}

cf_search="$cf_header_path_list $cf_search"

	test -n "$verbose" && echo search path $cf_search
	cf_save2_CPPFLAGS="$CPPFLAGS"
	for cf_incdir in $cf_search
	do

if test -n "$cf_incdir" ; then
  for cf_add_incdir in $cf_incdir
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:18420: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi

		for cf_header in \
			ncurses.h \
			curses.h
		do

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


#include <$cf_header>
int
main ()
{

#ifdef NCURSES_VERSION

printf("%s\n", NCURSES_VERSION);
#else
#ifdef __NCURSES_H
printf("old\n");
#else
	make an error
#endif
#endif


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

else
  cf_cv_ncurses_h2=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

			if test "$cf_cv_ncurses_h2" != no ; then
				cf_cv_ncurses_h2=$cf_incdir/$cf_header
				test -n "$verbose" && echo $ac_n "	... found $ac_c" 1>&6
				break
			fi
			test -n "$verbose" && echo "	... tested $cf_incdir/$cf_header" 1>&6
		done
		CPPFLAGS="$cf_save2_CPPFLAGS"
		test "$cf_cv_ncurses_h2" != no && break
	done
	test "$cf_cv_ncurses_h2" = no && as_fn_error $? "not found" "$LINENO" 5

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

	cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
	cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
	if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
		cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
	fi

if test -n "$cf_1st_incdir" ; then
  for cf_add_incdir in $cf_1st_incdir
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:18544: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi


fi

# Set definitions to allow ifdef'ing for ncurses.h

case $cf_cv_ncurses_header in # (vi
*ncurses.h)
	$as_echo "#define HAVE_NCURSES_H 1" >>confdefs.h

	;;
esac

case $cf_cv_ncurses_header in # (vi
ncurses/curses.h|ncurses/ncurses.h)
	$as_echo "#define HAVE_NCURSES_NCURSES_H 1" >>confdefs.h

	;;
ncursesw/curses.h|ncursesw/ncurses.h)
	$as_echo "#define HAVE_NCURSESW_NCURSES_H 1" >>confdefs.h

	;;
esac



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for terminfo header" >&5
$as_echo_n "checking for terminfo header... " >&6; }
if ${cf_cv_term_header+:} false; then :
  $as_echo_n "(cached) " >&6
else

case ${cf_cv_ncurses_header} in #(vi
*/ncurses.h|*/ncursesw.h) #(vi
	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
	;;
*)
	cf_term_header=term.h
	;;
esac

for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
#include <${cf_cv_ncurses_header-curses.h}>
#include <$cf_test>

int
main ()
{
int x = auto_left_margin
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

	cf_cv_term_header="$cf_test"
else

	cf_cv_term_header=unknown

fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
	test "$cf_cv_term_header" != unknown && break
done

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

# Set definitions to allow ifdef'ing to accommodate subdirectories

case $cf_cv_term_header in # (vi
*term.h)
	$as_echo "#define HAVE_TERM_H 1" >>confdefs.h

	;;
esac

case $cf_cv_term_header in # (vi
ncurses/term.h) #(vi
	$as_echo "#define HAVE_NCURSES_TERM_H 1" >>confdefs.h

	;;
ncursesw/term.h)
	$as_echo "#define HAVE_NCURSESW_TERM_H 1" >>confdefs.h

	;;
esac


# some applications need this, but should check for NCURSES_VERSION
$as_echo "#define NCURSES 1" >>confdefs.h



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ncurses version" >&5
$as_echo_n "checking for ncurses version... " >&6; }
if ${cf_cv_ncurses_version+:} false; then :
  $as_echo_n "(cached) " >&6
else

	cf_cv_ncurses_version=no
	cf_tempfile=out$$
	rm -f $cf_tempfile
	if test "$cross_compiling" = yes; then :


	# This will not work if the preprocessor splits the line after the
	# Autoconf token.  The 'unproto' program does that.
	cat > conftest.$ac_ext <<EOF
#include <${cf_cv_ncurses_header-curses.h}>
#undef Autoconf
#ifdef NCURSES_VERSION
Autoconf NCURSES_VERSION
#else
#ifdef __NCURSES_H
Autoconf "old"
#endif
;
#endif
EOF
	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$cf_try\""; } >&5
  (eval $cf_try) 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
	if test -f conftest.out ; then
		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
		rm -f conftest.out
	fi

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

#include <${cf_cv_ncurses_header-curses.h}>
#include <stdio.h>
int main()
{
	FILE *fp = fopen("$cf_tempfile", "w");
#ifdef NCURSES_VERSION
# ifdef NCURSES_VERSION_PATCH
	fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
# else
	fprintf(fp, "%s\n", NCURSES_VERSION);
# endif
#else
# ifdef __NCURSES_H
	fprintf(fp, "old\n");
# else
	make an error
# endif
#endif
	${cf_cv_main_return-return}(0);
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :

	cf_cv_ncurses_version=`cat $cf_tempfile`
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

	rm -f $cf_tempfile

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_ncurses_version" >&5
$as_echo "$cf_cv_ncurses_version" >&6; }
test "$cf_cv_ncurses_version" = no || $as_echo "#define NCURSES 1" >>confdefs.h





cf_nculib_root=ncursesw
	# This works, except for the special case where we find gpm, but
	# ncurses is in a nonstandard location via $LIBS, and we really want
	# to link gpm.
cf_ncurses_LIBS=""
cf_ncurses_SAVE="$LIBS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
$as_echo_n "checking for Gpm_Open in -lgpm... " >&6; }
if ${ac_cv_lib_gpm_Gpm_Open+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lgpm  $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 Gpm_Open ();
int
main ()
{
return Gpm_Open ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_gpm_Gpm_Open=yes
else
  ac_cv_lib_gpm_Gpm_Open=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_gpm_Gpm_Open" >&5
$as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; }
if test "x$ac_cv_lib_gpm_Gpm_Open" = xyes; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lgpm" >&5
$as_echo_n "checking for initscr in -lgpm... " >&6; }
if ${ac_cv_lib_gpm_initscr+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lgpm  $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 initscr ();
int
main ()
{
return initscr ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_gpm_initscr=yes
else
  ac_cv_lib_gpm_initscr=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_gpm_initscr" >&5
$as_echo "$ac_cv_lib_gpm_initscr" >&6; }
if test "x$ac_cv_lib_gpm_initscr" = xyes; then :
  LIBS="$cf_ncurses_SAVE"
else
  cf_ncurses_LIBS="-lgpm"
fi

fi


case $host_os in #(vi
freebsd*)
	# This is only necessary if you are linking against an obsolete
	# version of ncurses (but it should do no harm, since it's static).
	if test "$cf_nculib_root" = ncurses ; then
		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgoto in -lmytinfo" >&5
$as_echo_n "checking for tgoto in -lmytinfo... " >&6; }
if ${ac_cv_lib_mytinfo_tgoto+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lmytinfo  $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 tgoto ();
int
main ()
{
return tgoto ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_mytinfo_tgoto=yes
else
  ac_cv_lib_mytinfo_tgoto=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_mytinfo_tgoto" >&5
$as_echo "$ac_cv_lib_mytinfo_tgoto" >&6; }
if test "x$ac_cv_lib_mytinfo_tgoto" = xyes; then :
  cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
fi

	fi
	;;
esac

LIBS="$cf_ncurses_LIBS $LIBS"

if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
then

if test -n "$cf_cv_curses_dir/lib" ; then
  for cf_add_libdir in $cf_cv_curses_dir/lib
  do
    if test $cf_add_libdir = /usr/lib ; then
      :
    elif test -d $cf_add_libdir
    then
      cf_have_libdir=no
      if test -n "$LDFLAGS$LIBS" ; then
        # a loop is needed to ensure we can add subdirs of existing dirs
        for cf_test_libdir in $LDFLAGS $LIBS ; do
          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
            cf_have_libdir=yes; break
          fi
        done
      fi
      if test "$cf_have_libdir" = no ; then
        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me-configure}:18901: testing adding $cf_add_libdir to library-path ..." 1>&5


        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
      fi
    fi
  done
fi

	LIBS="-l$cf_nculib_root $LIBS"
else

	eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
	cf_libdir=""
	ac_fn_c_check_func "$LINENO" "initscr" "ac_cv_func_initscr"
if test "x$ac_cv_func_initscr" = xyes; then :
  eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
else

		cf_save_LIBS="$LIBS"
		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -l$cf_nculib_root" >&5
$as_echo_n "checking for initscr in -l$cf_nculib_root... " >&6; }
		LIBS="-l$cf_nculib_root $LIBS"
		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <${cf_cv_ncurses_header-curses.h}>
int
main ()
{
initscr()
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
			 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'

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

cf_library_path_list=""
if test -n "${LDFLAGS}${LIBS}" ; then
	for cf_library_path in $LDFLAGS $LIBS
	do
		case $cf_library_path in #(vi
		-L*)
			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`

test "$cf_library_path" != "NONE" && \
test -d "$cf_library_path" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
	test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
	test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
	test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
	test -d $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
}

			cf_library_path_list="$cf_library_path_list $cf_search"
			;;
		esac
	done
fi

cf_search=""


test "/usr" != "$prefix" && \
test -d "/usr" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /usr"
	test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
	test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
	test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
	test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
	test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
}


test "$prefix" != "NONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
	test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
	test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
	test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
	test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
}


test "/usr/local" != "$prefix" && \
test -d "/usr/local" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /usr/local"
	test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
	test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
	test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
	test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
	test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
}


test "/opt" != "$prefix" && \
test -d "/opt" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /opt"
	test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
	test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
	test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
	test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
	test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
}


test "$HOME" != "$prefix" && \
test -d "$HOME" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under $HOME"
	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
	test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
	test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
	test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
	test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
}



cf_search="$cf_library_path_list $cf_search"

			for cf_libdir in $cf_search
			do
				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$cf_nculib_root in $cf_libdir" >&5
$as_echo_n "checking for -l$cf_nculib_root in $cf_libdir... " >&6; }
				LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
				cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <${cf_cv_ncurses_header-curses.h}>
int
main ()
{
initscr()
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
			 		 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
					 break
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
					 LIBS="$cf_save_LIBS"
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
			done

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

fi

eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root

if test $cf_found_library = no ; then
	as_fn_error $? "Cannot link $cf_nculib_root library" "$LINENO" 5
fi


fi

if test -n "$cf_ncurses_LIBS" ; then
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
$as_echo_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... " >&6; }
	cf_ncurses_SAVE="$LIBS"
	for p in $cf_ncurses_LIBS ; do
		q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
		if test "$q" != "$LIBS" ; then
			LIBS="$q"
		fi
	done
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <${cf_cv_ncurses_header-curses.h}>
int
main ()
{
initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; 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" >&5
$as_echo "no" >&6; }
		 LIBS="$cf_ncurses_SAVE"
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi


cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

cat >>confdefs.h <<_ACEOF
#define $cf_nculib_ROOT 1
_ACEOF



fi

	cf_wide_curses=yes
	;;
pdcurses)
	cf_cv_ncurses_header=xcurses.h
	# do this last, since it changes definition of main: CF_PDCURSES_X11
	;;
slang)

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for slang header file" >&5
$as_echo_n "checking for slang header file... " >&6; }
if ${cf_cv_slang_header+:} false; then :
  $as_echo_n "(cached) " >&6
else

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <slang.h>
int
main ()
{
printf("%s\n", SLANG_VERSION)
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_slang_header=predefined
else


cf_header_path_list=""
if test -n "${CFLAGS}${CPPFLAGS}" ; then
	for cf_header_path in $CPPFLAGS $CFLAGS
	do
		case $cf_header_path in #(vi
		-I*)
			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`

test "$cf_header_path" != "NONE" && \
test -d "$cf_header_path" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
	test -d $cf_header_path/include/slang &&       cf_search="$cf_search $cf_header_path/include/slang"
	test -d $cf_header_path/include/slang/include &&    cf_search="$cf_search $cf_header_path/include/slang/include"
	test -d $cf_header_path/slang/include &&       cf_search="$cf_search $cf_header_path/slang/include"
	test -d $cf_header_path/slang/include/slang &&    cf_search="$cf_search $cf_header_path/slang/include/slang"
}

			cf_header_path_list="$cf_header_path_list $cf_search"
			;;
		esac
	done
fi

cf_search=""


test "/usr" != "$prefix" && \
test -d "/usr" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /usr"
	test -d /usr/include &&          cf_search="$cf_search /usr/include"
	test -d /usr/include/slang &&       cf_search="$cf_search /usr/include/slang"
	test -d /usr/include/slang/include &&    cf_search="$cf_search /usr/include/slang/include"
	test -d /usr/slang/include &&       cf_search="$cf_search /usr/slang/include"
	test -d /usr/slang/include/slang &&    cf_search="$cf_search /usr/slang/include/slang"
}


test "$prefix" != "NONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
	test -d $prefix/include/slang &&       cf_search="$cf_search $prefix/include/slang"
	test -d $prefix/include/slang/include &&    cf_search="$cf_search $prefix/include/slang/include"
	test -d $prefix/slang/include &&       cf_search="$cf_search $prefix/slang/include"
	test -d $prefix/slang/include/slang &&    cf_search="$cf_search $prefix/slang/include/slang"
}


test "/usr/local" != "$prefix" && \
test -d "/usr/local" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /usr/local"
	test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
	test -d /usr/local/include/slang &&       cf_search="$cf_search /usr/local/include/slang"
	test -d /usr/local/include/slang/include &&    cf_search="$cf_search /usr/local/include/slang/include"
	test -d /usr/local/slang/include &&       cf_search="$cf_search /usr/local/slang/include"
	test -d /usr/local/slang/include/slang &&    cf_search="$cf_search /usr/local/slang/include/slang"
}


test "/opt" != "$prefix" && \
test -d "/opt" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /opt"
	test -d /opt/include &&          cf_search="$cf_search /opt/include"
	test -d /opt/include/slang &&       cf_search="$cf_search /opt/include/slang"
	test -d /opt/include/slang/include &&    cf_search="$cf_search /opt/include/slang/include"
	test -d /opt/slang/include &&       cf_search="$cf_search /opt/slang/include"
	test -d /opt/slang/include/slang &&    cf_search="$cf_search /opt/slang/include/slang"
}


test "$HOME" != "$prefix" && \
test -d "$HOME" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under $HOME"
	test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
	test -d $HOME/include/slang &&       cf_search="$cf_search $HOME/include/slang"
	test -d $HOME/include/slang/include &&    cf_search="$cf_search $HOME/include/slang/include"
	test -d $HOME/slang/include &&       cf_search="$cf_search $HOME/slang/include"
	test -d $HOME/slang/include/slang &&    cf_search="$cf_search $HOME/slang/include/slang"
}



test "$includedir" != NONE && \
test "$includedir" != "/usr/include" && \
test -d "$includedir" && {
	test -d $includedir &&    cf_search="$cf_search $includedir"
	test -d $includedir/slang && cf_search="$cf_search $includedir/slang"
}

test "$oldincludedir" != NONE && \
test "$oldincludedir" != "/usr/include" && \
test -d "$oldincludedir" && {
	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
	test -d $oldincludedir/slang && cf_search="$cf_search $oldincludedir/slang"
}

cf_search="$cf_header_path_list $cf_search"

	for cf_incdir in $cf_search
	do
		for cf_header in \
			slang.h
		do
			echo trying $cf_incdir/$cf_header 1>&5
			if egrep "SLANG_VERSION" $cf_incdir/$cf_header 1>&5 2>&1; then
				cf_cv_slang_header=$cf_incdir/$cf_header
				break
			fi
		done
		test -n "$cf_cv_slang_header" && break
	done
	test -z "$cf_cv_slang_header" && as_fn_error $? "not found" "$LINENO" 5

fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_slang_header" >&5
$as_echo "$cf_cv_slang_header" >&6; }
$as_echo "#define USE_SLANG 1" >>confdefs.h


cf_incdir=`echo $cf_cv_slang_header | sed -e 's%/[^/]*$%%'`

case $cf_cv_slang_header in # (vi
predefined) # (vi
	;;
*)

if test -n "$cf_incdir" ; then
  for cf_add_incdir in $cf_incdir
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:19337: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi

	;;
esac

# There's an unofficial set of patches for slang that gives it some limited
# UTF8 capability.  Unfortunately it won't compile unless one defines UTF8.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we must define UTF8" >&5
$as_echo_n "checking if we must define UTF8... " >&6; }
if ${cf_cv_slang_utf8+:} false; then :
  $as_echo_n "(cached) " >&6
else

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

#include <slang.h>
int
main ()
{
SLtt_get_screen_size()
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_slang_utf8=no
else

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

#define UTF8
#include <slang.h>
int
main ()
{
SLtt_get_screen_size()
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_slang_utf8=yes
else
  cf_cv_slang_utf8=unknown
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: $cf_cv_slang_utf8" >&5
$as_echo "$cf_cv_slang_utf8" >&6; }

if test "$cf_cv_slang_utf8" = yes ; then
	$as_echo "#define UTF8 1" >>confdefs.h

fi


cf_slang_LIBS1="$LIBS"

if ${cf_cv_termlib+:} false; then :
  $as_echo_n "(cached) " >&6
else

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

int
main ()
{
char *x=(char*)tgoto("",0,0)
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{
int x=tigetstr("")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_termlib=terminfo
else
  cf_cv_termlib=termcap
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
	test -n "$verbose" && echo "	using functions in predefined $cf_cv_termlib LIBS" 1>&6

echo "${as_me-configure}:19451: testing using functions in predefined $cf_cv_termlib LIBS ..." 1>&5



else


if test "$cf_cv_termlib" = none; then
	# FreeBSD's linker gives bogus results for AC_CHECK_LIB, saying that
	# tgetstr lives in -lcurses when it is only an unsatisfied extern.
	cf_save_LIBS="$LIBS"
	for cf_lib in curses ncurses termlib termcap
	do
	LIBS="-l$cf_lib $cf_save_LIBS"
	for cf_func in tigetstr tgetstr
	do
		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $cf_func in -l$cf_lib" >&5
$as_echo_n "checking for $cf_func in -l$cf_lib... " >&6; }
		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{
int x=$cf_func("")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_result=yes
else
  cf_result=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_result" >&5
$as_echo "$cf_result" >&6; }
		if test "$cf_result" = yes ; then
			if test "$cf_func" = tigetstr ; then
				cf_cv_termlib=terminfo
			else
				cf_cv_termlib=termcap
			fi
			break
		fi
	done
		test "$cf_result" = yes && break
	done
	test "$cf_result" = no && LIBS="$cf_save_LIBS"
fi
if test "$cf_cv_termlib" = none; then
	# allow curses library for broken AIX system.
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lcurses" >&5
$as_echo_n "checking for initscr in -lcurses... " >&6; }
if ${ac_cv_lib_curses_initscr+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lcurses  $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 initscr ();
int
main ()
{
return initscr ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_curses_initscr=yes
else
  ac_cv_lib_curses_initscr=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_curses_initscr" >&5
$as_echo "$ac_cv_lib_curses_initscr" >&6; }
if test "x$ac_cv_lib_curses_initscr" = xyes; then :
  LIBS="$LIBS -lcurses" cf_cv_termlib=termcap
fi

	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgoto in -ltermcap" >&5
$as_echo_n "checking for tgoto in -ltermcap... " >&6; }
if ${ac_cv_lib_termcap_tgoto+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ltermcap  $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 tgoto ();
int
main ()
{
return tgoto ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_termcap_tgoto=yes
else
  ac_cv_lib_termcap_tgoto=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_termcap_tgoto" >&5
$as_echo "$ac_cv_lib_termcap_tgoto" >&6; }
if test "x$ac_cv_lib_termcap_tgoto" = xyes; then :
  LIBS="$LIBS -ltermcap" cf_cv_termlib=termcap
fi

fi

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
if test "$cf_cv_termlib" = none; then
	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find -ltermlib, -lcurses, or -ltermcap" >&5
$as_echo "$as_me: WARNING: Cannot find -ltermlib, -lcurses, or -ltermcap" >&2;}
fi

fi

cf_slang_LIBS2="$LIBS"
ac_fn_c_check_func "$LINENO" "acos" "ac_cv_func_acos"
if test "x$ac_cv_func_acos" = xyes; then :

else

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for acos in -lm" >&5
$as_echo_n "checking for acos in -lm... " >&6; }
if ${ac_cv_lib_m_acos+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $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 acos ();
int
main ()
{
return acos ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_m_acos=yes
else
  ac_cv_lib_m_acos=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_m_acos" >&5
$as_echo "$ac_cv_lib_m_acos" >&6; }
if test "x$ac_cv_lib_m_acos" = xyes; then :


cf_tr_func=`echo "acos" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

	cat >>confdefs.h <<_ACEOF
#define HAVE_$cf_tr_func 1
_ACEOF

	ac_cv_func_acos=yes
	if test "$cf_used_lib_m" != yes ; then cf_used_lib_m=yes; LIBS="-lm $LIBS"; fi
else

	ac_cv_func_acos=unknown
	unset ac_cv_func_acos 2>/dev/null

fi


fi

case $host_os in #(vi
os2*)

	eval 'cf_cv_have_lib_'video'=no'
	cf_libdir=""
	ac_fn_c_check_func "$LINENO" "v_init" "ac_cv_func_v_init"
if test "x$ac_cv_func_v_init" = xyes; then :
  eval 'cf_cv_have_lib_'video'=yes'
else

		cf_save_LIBS="$LIBS"
		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for v_init in -lvideo" >&5
$as_echo_n "checking for v_init in -lvideo... " >&6; }
		LIBS="-lvideo $LIBS"
		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/video.h>
int
main ()
{
v_init()
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
			 eval 'cf_cv_have_lib_'video'=yes'

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

cf_library_path_list=""
if test -n "${LDFLAGS}${LIBS}" ; then
	for cf_library_path in $LDFLAGS $LIBS
	do
		case $cf_library_path in #(vi
		-L*)
			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`

test "$cf_library_path" != "NONE" && \
test -d "$cf_library_path" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
	test -d $cf_library_path/lib/video &&       cf_search="$cf_search $cf_library_path/lib/video"
	test -d $cf_library_path/lib/video/lib &&    cf_search="$cf_search $cf_library_path/lib/video/lib"
	test -d $cf_library_path/video/lib &&       cf_search="$cf_search $cf_library_path/video/lib"
	test -d $cf_library_path/video/lib/video &&    cf_search="$cf_search $cf_library_path/video/lib/video"
}

			cf_library_path_list="$cf_library_path_list $cf_search"
			;;
		esac
	done
fi

cf_search=""


test "/usr" != "$prefix" && \
test -d "/usr" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /usr"
	test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
	test -d /usr/lib/video &&       cf_search="$cf_search /usr/lib/video"
	test -d /usr/lib/video/lib &&    cf_search="$cf_search /usr/lib/video/lib"
	test -d /usr/video/lib &&       cf_search="$cf_search /usr/video/lib"
	test -d /usr/video/lib/video &&    cf_search="$cf_search /usr/video/lib/video"
}


test "$prefix" != "NONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
	test -d $prefix/lib/video &&       cf_search="$cf_search $prefix/lib/video"
	test -d $prefix/lib/video/lib &&    cf_search="$cf_search $prefix/lib/video/lib"
	test -d $prefix/video/lib &&       cf_search="$cf_search $prefix/video/lib"
	test -d $prefix/video/lib/video &&    cf_search="$cf_search $prefix/video/lib/video"
}


test "/usr/local" != "$prefix" && \
test -d "/usr/local" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /usr/local"
	test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
	test -d /usr/local/lib/video &&       cf_search="$cf_search /usr/local/lib/video"
	test -d /usr/local/lib/video/lib &&    cf_search="$cf_search /usr/local/lib/video/lib"
	test -d /usr/local/video/lib &&       cf_search="$cf_search /usr/local/video/lib"
	test -d /usr/local/video/lib/video &&    cf_search="$cf_search /usr/local/video/lib/video"
}


test "/opt" != "$prefix" && \
test -d "/opt" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /opt"
	test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
	test -d /opt/lib/video &&       cf_search="$cf_search /opt/lib/video"
	test -d /opt/lib/video/lib &&    cf_search="$cf_search /opt/lib/video/lib"
	test -d /opt/video/lib &&       cf_search="$cf_search /opt/video/lib"
	test -d /opt/video/lib/video &&    cf_search="$cf_search /opt/video/lib/video"
}


test "$HOME" != "$prefix" && \
test -d "$HOME" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under $HOME"
	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
	test -d $HOME/lib/video &&       cf_search="$cf_search $HOME/lib/video"
	test -d $HOME/lib/video/lib &&    cf_search="$cf_search $HOME/lib/video/lib"
	test -d $HOME/video/lib &&       cf_search="$cf_search $HOME/video/lib"
	test -d $HOME/video/lib/video &&    cf_search="$cf_search $HOME/video/lib/video"
}



cf_search="$cf_library_path_list $cf_search"

			for cf_libdir in $cf_search
			do
				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -lvideo in $cf_libdir" >&5
$as_echo_n "checking for -lvideo in $cf_libdir... " >&6; }
				LIBS="-L$cf_libdir -lvideo $cf_save_LIBS"
				cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/video.h>
int
main ()
{
v_init()
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
			 		 eval 'cf_cv_have_lib_'video'=yes'
					 break
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
					 LIBS="$cf_save_LIBS"
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
			done

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

fi

eval 'cf_found_library=$cf_cv_have_lib_'video

if test $cf_found_library = no ; then
	as_fn_error $? "Cannot link video library" "$LINENO" 5
fi


	;;
esac

	eval 'cf_cv_have_lib_'slang'=no'
	cf_libdir=""
	ac_fn_c_check_func "$LINENO" "SLtt_get_screen_size" "ac_cv_func_SLtt_get_screen_size"
if test "x$ac_cv_func_SLtt_get_screen_size" = xyes; then :
  eval 'cf_cv_have_lib_'slang'=yes'
else

		cf_save_LIBS="$LIBS"
		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SLtt_get_screen_size in -lslang" >&5
$as_echo_n "checking for SLtt_get_screen_size in -lslang... " >&6; }
		LIBS="-lslang $LIBS"
		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <slang.h>
int
main ()
{
SLtt_get_screen_size()
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
			 eval 'cf_cv_have_lib_'slang'=yes'

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

cf_library_path_list=""
if test -n "${LDFLAGS}${LIBS}" ; then
	for cf_library_path in $LDFLAGS $LIBS
	do
		case $cf_library_path in #(vi
		-L*)
			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`

test "$cf_library_path" != "NONE" && \
test -d "$cf_library_path" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
	test -d $cf_library_path/lib/slang &&       cf_search="$cf_search $cf_library_path/lib/slang"
	test -d $cf_library_path/lib/slang/lib &&    cf_search="$cf_search $cf_library_path/lib/slang/lib"
	test -d $cf_library_path/slang/lib &&       cf_search="$cf_search $cf_library_path/slang/lib"
	test -d $cf_library_path/slang/lib/slang &&    cf_search="$cf_search $cf_library_path/slang/lib/slang"
}

			cf_library_path_list="$cf_library_path_list $cf_search"
			;;
		esac
	done
fi

cf_search=""


test "/usr" != "$prefix" && \
test -d "/usr" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /usr"
	test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
	test -d /usr/lib/slang &&       cf_search="$cf_search /usr/lib/slang"
	test -d /usr/lib/slang/lib &&    cf_search="$cf_search /usr/lib/slang/lib"
	test -d /usr/slang/lib &&       cf_search="$cf_search /usr/slang/lib"
	test -d /usr/slang/lib/slang &&    cf_search="$cf_search /usr/slang/lib/slang"
}


test "$prefix" != "NONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
	test -d $prefix/lib/slang &&       cf_search="$cf_search $prefix/lib/slang"
	test -d $prefix/lib/slang/lib &&    cf_search="$cf_search $prefix/lib/slang/lib"
	test -d $prefix/slang/lib &&       cf_search="$cf_search $prefix/slang/lib"
	test -d $prefix/slang/lib/slang &&    cf_search="$cf_search $prefix/slang/lib/slang"
}


test "/usr/local" != "$prefix" && \
test -d "/usr/local" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /usr/local"
	test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
	test -d /usr/local/lib/slang &&       cf_search="$cf_search /usr/local/lib/slang"
	test -d /usr/local/lib/slang/lib &&    cf_search="$cf_search /usr/local/lib/slang/lib"
	test -d /usr/local/slang/lib &&       cf_search="$cf_search /usr/local/slang/lib"
	test -d /usr/local/slang/lib/slang &&    cf_search="$cf_search /usr/local/slang/lib/slang"
}


test "/opt" != "$prefix" && \
test -d "/opt" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /opt"
	test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
	test -d /opt/lib/slang &&       cf_search="$cf_search /opt/lib/slang"
	test -d /opt/lib/slang/lib &&    cf_search="$cf_search /opt/lib/slang/lib"
	test -d /opt/slang/lib &&       cf_search="$cf_search /opt/slang/lib"
	test -d /opt/slang/lib/slang &&    cf_search="$cf_search /opt/slang/lib/slang"
}


test "$HOME" != "$prefix" && \
test -d "$HOME" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under $HOME"
	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
	test -d $HOME/lib/slang &&       cf_search="$cf_search $HOME/lib/slang"
	test -d $HOME/lib/slang/lib &&    cf_search="$cf_search $HOME/lib/slang/lib"
	test -d $HOME/slang/lib &&       cf_search="$cf_search $HOME/slang/lib"
	test -d $HOME/slang/lib/slang &&    cf_search="$cf_search $HOME/slang/lib/slang"
}



cf_search="$cf_library_path_list $cf_search"

			for cf_libdir in $cf_search
			do
				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -lslang in $cf_libdir" >&5
$as_echo_n "checking for -lslang in $cf_libdir... " >&6; }
				LIBS="-L$cf_libdir -lslang $cf_save_LIBS"
				cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <slang.h>
int
main ()
{
SLtt_get_screen_size()
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
			 		 eval 'cf_cv_have_lib_'slang'=yes'
					 break
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
					 LIBS="$cf_save_LIBS"
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
			done

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

fi

eval 'cf_found_library=$cf_cv_have_lib_'slang

if test $cf_found_library = no ; then
	as_fn_error $? "Cannot link slang library" "$LINENO" 5
fi


cf_slang_LIBS3="$LIBS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can link slang without termcap" >&5
$as_echo_n "checking if we can link slang without termcap... " >&6; }
if test -n "`echo $cf_slang_LIBS1 | sed -e 's/ //g'`" ; then
	cf_exclude=`echo ".$cf_slang_LIBS2" | sed -e "s%$cf_slang_LIBS1%%" -e 's%^.%%'`
else
	cf_exclude="$cf_slang_LIBS2"
fi
LIBS=`echo ".$cf_slang_LIBS3" | sed -e "s%$cf_exclude%%" -e 's%^.%%'`
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <slang.h>
int
main ()
{
SLtt_get_screen_size()
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_result=yes
else
  cf_result=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_result" >&5
$as_echo "$cf_result" >&6; }
test $cf_result = no && LIBS="$cf_slang_LIBS3"




{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we must tell slang this is UNIX" >&5
$as_echo_n "checking if we must tell slang this is UNIX... " >&6; }
if ${cf_cv_slang_unix+:} false; then :
  $as_echo_n "(cached) " >&6
else

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <slang.h>
int
main ()
{

#ifdef REAL_UNIX_SYSTEM
make an error
#else
extern int SLang_TT_Baud_Rate;
SLang_TT_Baud_Rate = 1
#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_slang_unix=yes
else
  cf_cv_slang_unix=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: $cf_cv_slang_unix" >&5
$as_echo "$cf_cv_slang_unix" >&6; }
test $cf_cv_slang_unix = yes && $as_echo "#define REAL_UNIX_SYSTEM 1" >>confdefs.h


	dft_color_style=no
	;;
esac


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chtype typedef" >&5
$as_echo_n "checking for chtype typedef... " >&6; }
if ${cf_cv_chtype_decl+:} false; then :
  $as_echo_n "(cached) " >&6
else

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <${cf_cv_ncurses_header-curses.h}>
int
main ()
{
chtype foo
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_chtype_decl=yes
else
  cf_cv_chtype_decl=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_chtype_decl" >&5
$as_echo "$cf_cv_chtype_decl" >&6; }
if test $cf_cv_chtype_decl = yes ; then
	$as_echo "#define HAVE_TYPE_CHTYPE 1" >>confdefs.h

	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if chtype is scalar or struct" >&5
$as_echo_n "checking if chtype is scalar or struct... " >&6; }
if ${cf_cv_chtype_type+:} false; then :
  $as_echo_n "(cached) " >&6
else

		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <${cf_cv_ncurses_header-curses.h}>
int
main ()
{
chtype foo; long x = foo
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_chtype_type=scalar
else
  cf_cv_chtype_type=struct
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_chtype_type" >&5
$as_echo "$cf_cv_chtype_type" >&6; }
	if test $cf_cv_chtype_type = scalar ; then
		$as_echo "#define TYPE_CHTYPE_IS_SCALAR 1" >>confdefs.h

	fi
fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want the wide-curses features" >&5
$as_echo_n "checking if you want the wide-curses features... " >&6; }
# Check whether --enable-widec was given.
if test "${enable_widec+set}" = set; then :
  enableval=$enable_widec; test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    use_wide_curses=$enableval
  else
    use_wide_curses=$cf_wide_curses
  fi
else
  enableval=no
  use_wide_curses=$cf_wide_curses

fi

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

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if color-style code should be used" >&5
$as_echo_n "checking if color-style code should be used... " >&6; }
# Check whether --enable-color-style was given.
if test "${enable_color_style+set}" = set; then :
  enableval=$enable_color_style; test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    use_color_style=$enableval
  else
    use_color_style=$dft_color_style
  fi
else
  enableval=yes
  use_color_style=$dft_color_style

fi


case $use_color_style in
no)
	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
	INSTALL_LSS=
	;;
*)
	$as_echo "#define USE_COLOR_STYLE 1" >>confdefs.h

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

	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of style-sheet file" >&5
$as_echo_n "checking for location of style-sheet file... " >&6; }


# Check whether --with-lss-file was given.
if test "${with_lss_file+set}" = set; then :
  withval=$with_lss_file;
else
  withval="${LYNX_LSS_FILE-$sysconfdir/lynx.lss}"
fi
if test -n "$sysconfdir/lynx.lss" ; then

if test "x$prefix" != xNONE; then
  cf_path_syntax="$prefix"
else
  cf_path_syntax="$ac_default_prefix"
fi

case ".$withval" in #(vi
.\$\(*\)*|.\'*\'*) #(vi
  ;;
..|./*|.\\*) #(vi
  ;;
.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
  ;;
.\${*prefix}*) #(vi
  eval withval="$withval"
  case ".$withval" in #(vi
  .NONE/*)
    withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
    ;;
  esac
  ;; #(vi
.no|.NONE/*)
  withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
  ;;
*)
  as_fn_error $? "expected a pathname, not \"$withval\"" "$LINENO" 5
  ;;
esac

fi
LYNX_LSS_FILE="$withval"


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

	test "$LYNX_LSS_FILE" = no && LYNX_LSS_FILE=
	cat >>confdefs.h <<_ACEOF
#define LYNX_LSS_FILE "$LYNX_LSS_FILE"
_ACEOF


	INSTALL_LSS=install-lss
	;;
esac



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the default configuration-file" >&5
$as_echo_n "checking for the default configuration-file... " >&6; }


# Check whether --with-cfg-file was given.
if test "${with_cfg_file+set}" = set; then :
  withval=$with_cfg_file;
else
  withval="${LYNX_CFG_FILE-$sysconfdir/lynx.cfg}"
fi
if test -n "$sysconfdir/lynx.cfg" ; then

if test "x$prefix" != xNONE; then
  cf_path_syntax="$prefix"
else
  cf_path_syntax="$ac_default_prefix"
fi

case ".$withval" in #(vi
.\$\(*\)*|.\'*\'*) #(vi
  ;;
..|./*|.\\*) #(vi
  ;;
.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
  ;;
.\${*prefix}*) #(vi
  eval withval="$withval"
  case ".$withval" in #(vi
  .NONE/*)
    withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
    ;;
  esac
  ;; #(vi
.no|.NONE/*)
  withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
  ;;
*)
  as_fn_error $? "expected a pathname, not \"$withval\"" "$LINENO" 5
  ;;
esac

fi
LYNX_CFG_FILE="$withval"



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

test "$LYNX_CFG_FILE" = no && LYNX_CFG_FILE=
cat >>confdefs.h <<_ACEOF
#define LYNX_CFG_FILE "$LYNX_CFG_FILE"
_ACEOF


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if htmlized lynx.cfg should be built" >&5
$as_echo_n "checking if htmlized lynx.cfg should be built... " >&6; }
# Check whether --enable-htmlized-cfg was given.
if test "${enable_htmlized_cfg+set}" = set; then :
  enableval=$enable_htmlized_cfg; test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    use_htmlized_cfg=$enableval
  else
    use_htmlized_cfg=no
  fi
else
  enableval=no
  use_htmlized_cfg=no

fi

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

LYNXCFG_MAKE=''
if test $use_htmlized_cfg = no ; then
	LYNXCFG_MAKE='#'
fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if local doc directory should be linked to help page" >&5
$as_echo_n "checking if local doc directory should be linked to help page... " >&6; }
# Check whether --enable-local-docs was given.
if test "${enable_local_docs+set}" = set; then :
  enableval=$enable_local_docs; test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    use_local_docs=$enableval
  else
    use_local_docs=no
  fi
else
  enableval=no
  use_local_docs=no

fi

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

LYNXDOC_MAKE=''
if test $use_local_docs = no ; then
	LYNXDOC_MAKE='#'
fi



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MIME library directory" >&5
$as_echo_n "checking for MIME library directory... " >&6; }

# Check whether --with-mime-libdir was given.
if test "${with_mime_libdir+set}" = set; then :
  withval=$with_mime_libdir;
else
  withval="${MIME_LIBDIR-/etc}"
fi
if true ; then

if test "x$prefix" != xNONE; then
  cf_path_syntax="$prefix"
else
  cf_path_syntax="$ac_default_prefix"
fi

case ".$withval" in #(vi
.\$\(*\)*|.\'*\'*) #(vi
  ;;
..|./*|.\\*) #(vi
  ;;
.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
  ;;
.\${*prefix}*) #(vi
  eval withval="$withval"
  case ".$withval" in #(vi
  .NONE/*)
    withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
    ;;
  esac
  ;; #(vi
.no|.NONE/*)
  withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
  ;;
*)
  as_fn_error $? "expected a pathname, not \"$withval\"" "$LINENO" 5
  ;;
esac

fi
MIME_LIBDIR="$withval"

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIME_LIBDIR" >&5
$as_echo "$MIME_LIBDIR" >&6; }
MIME_LIBDIR=`echo "$MIME_LIBDIR" | sed -e 's,/$,,' -e 's,$,/,'`
cat >>confdefs.h <<_ACEOF
#define MIME_LIBDIR "$MIME_LIBDIR"
_ACEOF


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if locale-charset selection logic should be used" >&5
$as_echo_n "checking if locale-charset selection logic should be used... " >&6; }
# Check whether --enable-locale-charset was given.
if test "${enable_locale_charset+set}" = set; then :
  enableval=$enable_locale_charset; test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    use_locale_charset=$enableval
  else
    use_locale_charset=yes
  fi
else
  enableval=no
  use_locale_charset=yes

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_locale_charset" >&5
$as_echo "$use_locale_charset" >&6; }
test $use_locale_charset != no && $as_echo "#define USE_LOCALE_CHARSET 1" >>confdefs.h


CHARSET_DEFS=


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want only a few charsets" >&5
$as_echo_n "checking if you want only a few charsets... " >&6; }

# Check whether --with-charsets was given.
if test "${with_charsets+set}" = set; then :
  withval=$with_charsets; cf_charsets=$withval
else
  cf_charsets=
fi


if test -n "$cf_charsets" ; then
	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
	$as_echo "#define ALL_CHARSETS 0" >>confdefs.h

	cf_min_charsets=us-ascii,iso-8859-1,utf-8
	if test "$cf_charsets" = "no" ; then
		cf_charsets=minimal
	fi
	if test "$cf_charsets" = "minimal" ; then
		test -n "$verbose" && echo "	using minimal list of charsets: $cf_min_charsets" 1>&6

echo "${as_me-configure}:20446: testing using minimal list of charsets: $cf_min_charsets ..." 1>&5


	fi
	cf_charsets=`echo $cf_charsets | sed -e "s/minimal/$cf_min_charsets/g" -e 's/,/ /g'`
	for cf_charset in $cf_charsets
	do
		cf_def_charset=`echo $cf_charset | sed -e 's/+/_/g' -e 's/-/_/g'`
		cf_use_charset=no
		# check charsets that are defined via .tbl files
		if ( egrep '^M'$cf_charset'$' $srcdir/src/chrtrans/*.tbl 2>/dev/null >/dev/null )
		then
			cf_use_charset=yes
		# check charsets that are "built-in"
		else
			for cf_tst_charset in big5 euc_cn euc_jp euc_kr shift_jis x_transparent
			do
				if test "$cf_tst_charset" = "$cf_def_charset"
				then
					cf_use_charset=yes
					break
				fi
			done
		fi
		if test $cf_use_charset=yes
		then
			test -n "$verbose" && echo "	found $cf_charset" 1>&6

echo "${as_me-configure}:20474: testing found $cf_charset ..." 1>&5


			CHARSET_DEFS="-DNO_CHARSET_${cf_def_charset}=0 $CHARSET_DEFS"
		else
			test -n "$verbose" && echo "	not found $cf_charset" 1>&6

echo "${as_me-configure}:20481: testing not found $cf_charset ..." 1>&5


		fi
	done
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 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

{ $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_c_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

ac_header_dirent=no
for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
  as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
if eval \${$as_ac_Header+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
#include <$ac_hdr>

int
main ()
{
if ((DIR *) 0)
return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  eval "$as_ac_Header=yes"
else
  eval "$as_ac_Header=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$as_ac_Header
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
_ACEOF

ac_header_dirent=$ac_hdr; break
fi

done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
$as_echo_n "checking for library containing opendir... " >&6; }
if ${ac_cv_search_opendir+:} 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 opendir ();
int
main ()
{
return opendir ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' dir; 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_opendir=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
  if ${ac_cv_search_opendir+:} false; then :
  break
fi
done
if ${ac_cv_search_opendir+:} false; then :

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

fi

else
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
$as_echo_n "checking for library containing opendir... " >&6; }
if ${ac_cv_search_opendir+:} 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 opendir ();
int
main ()
{
return opendir ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' x; 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_opendir=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
  if ${ac_cv_search_opendir+:} false; then :
  break
fi
done
if ${ac_cv_search_opendir+:} false; then :

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

fi

fi

for ac_header in \
	arpa/inet.h \
	fcntl.h \
	limits.h \
	stdlib.h \
	string.h \
	sys/fcntl.h \
	sys/filio.h \
	sys/ioctl.h \
	sys/param.h \
	sys/timeb.h \
	sys/time.h \
	syslog.h \
	termio.h \
	termios.h \
	unistd.h \
	vfork.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"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking termio.h and termios.h" >&5
$as_echo_n "checking termio.h and termios.h... " >&6; }
if ${cf_cv_termio_and_termios+:} false; then :
  $as_echo_n "(cached) " >&6
else

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

#if HAVE_TERMIO_H
#include <termio.h>
#endif
#if HAVE_TERMIOS_H
#include <termios.h>
#endif
int
main ()
{
putchar (0x0a)
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_termio_and_termios=yes
else
  cf_cv_termio_and_termios=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_termio_and_termios" >&5
$as_echo "$cf_cv_termio_and_termios" >&6; }
test $cf_cv_termio_and_termios = no && $as_echo "#define TERMIO_AND_TERMIOS 1" >>confdefs.h



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigaction and structs" >&5
$as_echo_n "checking for sigaction and structs... " >&6; }
if ${cf_cv_func_sigaction+:} 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 ()
{
struct sigaction act;
	act.sa_handler = SIG_DFL;
#ifdef SA_RESTART
	act.sa_flags |= SA_RESTART;
#endif /* SA_RESTART */
	sigaction(1, &act, 0);

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_func_sigaction=yes
else
  cf_cv_func_sigaction=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: $cf_cv_func_sigaction" >&5
$as_echo "$cf_cv_func_sigaction" >&6; }
test "$cf_cv_func_sigaction" = yes && $as_echo "#define HAVE_SIGACTION 1" >>confdefs.h



for ac_header in sys/wait.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_wait_h" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_SYS_WAIT_H 1
_ACEOF

fi

done

cf_wait_headers="#include <sys/types.h>
"
if test $ac_cv_header_sys_wait_h = yes; then
cf_wait_headers="$cf_wait_headers
#include <sys/wait.h>
"
else
for ac_header in wait.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "wait.h" "ac_cv_header_wait_h" "$ac_includes_default"
if test "x$ac_cv_header_wait_h" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_WAIT_H 1
_ACEOF

fi

done

for ac_header in waitstatus.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "waitstatus.h" "ac_cv_header_waitstatus_h" "$ac_includes_default"
if test "x$ac_cv_header_waitstatus_h" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_WAITSTATUS_H 1
_ACEOF

fi

done

if test $ac_cv_header_wait_h = yes; then
cf_wait_headers="$cf_wait_headers
#include <wait.h>
"
fi
if test $ac_cv_header_waitstatus_h = yes; then
cf_wait_headers="$cf_wait_headers
#include <waitstatus.h>
"
fi
fi



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for union wait" >&5
$as_echo_n "checking for union wait... " >&6; }
if ${cf_cv_type_unionwait+:} false; then :
  $as_echo_n "(cached) " >&6
else

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$cf_wait_headers
int
main ()
{
int x;
	 int y = WEXITSTATUS(x);
	 int z = WTERMSIG(x);
	 wait(&x);

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_type_unionwait=no
	 echo compiles ok w/o union wait 1>&5

else

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$cf_wait_headers
int
main ()
{
union wait x;
#ifdef WEXITSTATUS
	 int y = WEXITSTATUS(x);
#endif
#ifdef WTERMSIG
	 int z = WTERMSIG(x);
#endif
	 wait(&x);

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_type_unionwait=yes
	 echo compiles ok with union wait and possibly macros too 1>&5

else
  cf_cv_type_unionwait=no
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
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_type_unionwait" >&5
$as_echo "$cf_cv_type_unionwait" >&6; }
test $cf_cv_type_unionwait = yes && $as_echo "#define HAVE_TYPE_UNIONWAIT 1" >>confdefs.h




if test $cf_cv_type_unionwait = yes; then

	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if union wait can be used as wait-arg" >&5
$as_echo_n "checking if union wait can be used as wait-arg... " >&6; }
	if ${cf_cv_arg_union_wait+:} false; then :
  $as_echo_n "(cached) " >&6
else

		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$cf_wait_headers
int
main ()
{
union wait x; wait(&x)
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_arg_union_wait=yes
else
  cf_cv_arg_union_wait=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

fi

	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_arg_union_wait" >&5
$as_echo "$cf_cv_arg_union_wait" >&6; }
	test $cf_cv_arg_union_wait = yes && $as_echo "#define WAIT_USES_UNION 1" >>confdefs.h


	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if union wait can be used as waitpid-arg" >&5
$as_echo_n "checking if union wait can be used as waitpid-arg... " >&6; }
	if ${cf_cv_arg_union_waitpid+:} false; then :
  $as_echo_n "(cached) " >&6
else

		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$cf_wait_headers
int
main ()
{
union wait x; waitpid(0, &x, 0)
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_arg_union_waitpid=yes
else
  cf_cv_arg_union_waitpid=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

fi

	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_arg_union_waitpid" >&5
$as_echo "$cf_cv_arg_union_waitpid" >&6; }
	test $cf_cv_arg_union_waitpid = yes && $as_echo "#define WAITPID_USES_UNION 1" >>confdefs.h


fi

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

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

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

$as_echo "#define uid_t int" >>confdefs.h


$as_echo "#define gid_t int" >>confdefs.h

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
$as_echo_n "checking type of array argument to getgroups... " >&6; }
if ${ac_cv_type_getgroups+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test "$cross_compiling" = yes; then :
  ac_cv_type_getgroups=cross
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
/* Thanks to Mike Rendell for this test.  */
$ac_includes_default
#define NGID 256
#undef MAX
#define MAX(x, y) ((x) > (y) ? (x) : (y))

int
main ()
{
  gid_t gidset[NGID];
  int i, n;
  union { gid_t gval; long int lval; }  val;

  val.lval = -1;
  for (i = 0; i < NGID; i++)
    gidset[i] = val.gval;
  n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
		 gidset);
  /* Exit non-zero if getgroups seems to require an array of ints.  This
     happens when gid_t is short int but getgroups modifies an array
     of ints.  */
  return n > 0 && gidset[n] != val.gval;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  ac_cv_type_getgroups=gid_t
else
  ac_cv_type_getgroups=int
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

if test $ac_cv_type_getgroups = cross; then
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <unistd.h>

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then :
  ac_cv_type_getgroups=gid_t
else
  ac_cv_type_getgroups=int
fi
rm -f conftest*

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

cat >>confdefs.h <<_ACEOF
#define GETGROUPS_T $ac_cv_type_getgroups
_ACEOF


ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
if test "x$ac_cv_type_off_t" = xyes; then :

else

cat >>confdefs.h <<_ACEOF
#define off_t long int
_ACEOF

fi

ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
if test "x$ac_cv_type_pid_t" = xyes; then :

else

cat >>confdefs.h <<_ACEOF
#define pid_t int
_ACEOF

fi

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

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

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

$as_echo "#define uid_t int" >>confdefs.h


$as_echo "#define gid_t int" >>confdefs.h

fi

ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
if test "x$ac_cv_type_mode_t" = xyes; then :

else

cat >>confdefs.h <<_ACEOF
#define mode_t int
_ACEOF

fi



	ac_fn_c_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" = xyes; then :
  ac_cv_type_socklen_t=yes
else
  ac_cv_type_socklen_t=no
fi

	if test $ac_cv_type_socklen_t = no; then
	$as_echo "#define socklen_t int" >>confdefs.h

fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tm.tm_gmtoff" >&5
$as_echo_n "checking for tm.tm_gmtoff... " >&6; }
if ${cf_cv_tm_gmtoff+:} false; then :
  $as_echo_n "(cached) " >&6
else

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

#ifdef TIME_WITH_SYS_TIME
#	include <sys/time.h>
#	include <time.h>
#else
#	ifdef HAVE_SYS_TIME_H
#		include <sys/time.h>
#	else
#		include <time.h>
#	endif
#endif

int
main ()
{

	struct tm foo;
	long bar = foo.tm_gmtoff
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_tm_gmtoff=yes
else
  cf_cv_tm_gmtoff=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_tm_gmtoff" >&5
$as_echo "$cf_cv_tm_gmtoff" >&6; }
test $cf_cv_tm_gmtoff = no && $as_echo "#define DONT_HAVE_TM_GMTOFF 1" >>confdefs.h



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

else
  if test "$ac_cv_type_off_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 (off_t)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_off_t=0
   fi
fi

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



cat >>confdefs.h <<_ACEOF
#define SIZEOF_OFF_T $ac_cv_sizeof_off_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 time_t" >&5
$as_echo_n "checking size of time_t... " >&6; }
if ${ac_cv_sizeof_time_t+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_time_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 (time_t)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_time_t=0
   fi
fi

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



cat >>confdefs.h <<_ACEOF
#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
_ACEOF




# 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"
if eval test \"x\$"$as_ac_var"\" = 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 ()
{
  static char *addr = 0;
  auto char dummy;
  if (addr == 0)
    {
      addr = &dummy;
      return find_stack_direction ();
    }
  else
    return (&dummy > addr) ? 1 : -1;
}

int
main ()
{
  return find_stack_direction () < 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

for ac_header in vfork.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
if test "x$ac_cv_header_vfork_h" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_VFORK_H 1
_ACEOF

fi

done

for ac_func in fork vfork
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"
if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done

if test "x$ac_cv_func_fork" = xyes; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
$as_echo_n "checking for working fork... " >&6; }
if ${ac_cv_func_fork_works+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test "$cross_compiling" = yes; then :
  ac_cv_func_fork_works=cross
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{

	  /* By Ruediger Kuhlmann. */
	  return fork () < 0;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  ac_cv_func_fork_works=yes
else
  ac_cv_func_fork_works=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: $ac_cv_func_fork_works" >&5
$as_echo "$ac_cv_func_fork_works" >&6; }

else
  ac_cv_func_fork_works=$ac_cv_func_fork
fi
if test "x$ac_cv_func_fork_works" = xcross; then
  case $host in
    *-*-amigaos* | *-*-msdosdjgpp*)
      # Override, as these systems have only a dummy fork() stub
      ac_cv_func_fork_works=no
      ;;
    *)
      ac_cv_func_fork_works=yes
      ;;
  esac
  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fi
ac_cv_func_vfork_works=$ac_cv_func_vfork
if test "x$ac_cv_func_vfork" = xyes; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
$as_echo_n "checking for working vfork... " >&6; }
if ${ac_cv_func_vfork_works+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test "$cross_compiling" = yes; then :
  ac_cv_func_vfork_works=cross
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
/* Thanks to Paul Eggert for this test.  */
$ac_includes_default
#include <sys/wait.h>
#ifdef HAVE_VFORK_H
# include <vfork.h>
#endif
/* On some sparc systems, changes by the child to local and incoming
   argument registers are propagated back to the parent.  The compiler
   is told about this with #include <vfork.h>, but some compilers
   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
   static variable whose address is put into a register that is
   clobbered by the vfork.  */
static void
#ifdef __cplusplus
sparc_address_test (int arg)
# else
sparc_address_test (arg) int arg;
#endif
{
  static pid_t child;
  if (!child) {
    child = vfork ();
    if (child < 0) {
      perror ("vfork");
      _exit(2);
    }
    if (!child) {
      arg = getpid();
      write(-1, "", 0);
      _exit (arg);
    }
  }
}

int
main ()
{
  pid_t parent = getpid ();
  pid_t child;

  sparc_address_test (0);

  child = vfork ();

  if (child == 0) {
    /* Here is another test for sparc vfork register problems.  This
       test uses lots of local variables, at least as many local
       variables as main has allocated so far including compiler
       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
       reuse the register of parent for one of the local variables,
       since it will think that parent can't possibly be used any more
       in this routine.  Assigning to the local variable will thus
       munge parent in the parent process.  */
    pid_t
      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
    /* Convince the compiler that p..p7 are live; otherwise, it might
       use the same hardware register for all 8 local variables.  */
    if (p != p1 || p != p2 || p != p3 || p != p4
	|| p != p5 || p != p6 || p != p7)
      _exit(1);

    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
       from child file descriptors.  If the child closes a descriptor
       before it execs or exits, this munges the parent's descriptor
       as well.  Test for this by closing stdout in the child.  */
    _exit(close(fileno(stdout)) != 0);
  } else {
    int status;
    struct stat st;

    while (wait(&status) != child)
      ;
    return (
	 /* Was there some problem with vforking?  */
	 child < 0

	 /* Did the child fail?  (This shouldn't happen.)  */
	 || status

	 /* Did the vfork/compiler bug occur?  */
	 || parent != getpid()

	 /* Did the file descriptor bug occur?  */
	 || fstat(fileno(stdout), &st) != 0
	 );
  }
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  ac_cv_func_vfork_works=yes
else
  ac_cv_func_vfork_works=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: $ac_cv_func_vfork_works" >&5
$as_echo "$ac_cv_func_vfork_works" >&6; }

fi;
if test "x$ac_cv_func_fork_works" = xcross; then
  ac_cv_func_vfork_works=$ac_cv_func_vfork
  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fi

if test "x$ac_cv_func_vfork_works" = xyes; then

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

else

$as_echo "#define vfork fork" >>confdefs.h

fi
if test "x$ac_cv_func_fork_works" = xyes; then

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

fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should use fcntl or ioctl" >&5
$as_echo_n "checking if we should use fcntl or ioctl... " >&6; }
if ${cf_cv_fionbio+:} 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 ret = ioctl(0, FIONBIO, (char *)0);

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_fionbio=ioctl
else

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

#include <sys/types.h>
#if HAVE_FCNTL_H
#include <fcntl.h>
#else
#if HAVE_SYS_FCNTL_H
#include <sys/fcntl.h>
#endif
#endif
int
main ()
{

        int ret = fcntl(0, F_SETFL, O_NONBLOCK);

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_fionbio=fcntl
else
  cf_cv_fionbio=unknown
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

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_fionbio" >&5
$as_echo "$cf_cv_fionbio" >&6; }
test "$cf_cv_fionbio" = "fcntl" && $as_echo "#define USE_FCNTL 1" >>confdefs.h



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken/missing definition of remove" >&5
$as_echo_n "checking for broken/missing definition of remove... " >&6; }
if ${cf_cv_baddef_remove+:} false; then :
  $as_echo_n "(cached) " >&6
else

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
remove("dummy")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_baddef_remove=no
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
		int __unlink(name) { return unlink(name); }
int
main ()
{
remove("dummy")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_baddef_remove=yes
else
  cf_cv_baddef_remove=unknown
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

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_baddef_remove" >&5
$as_echo "$cf_cv_baddef_remove" >&6; }
test "$cf_cv_baddef_remove" != no && $as_echo "#define NEED_REMOVE 1" >>confdefs.h



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lstat" >&5
$as_echo_n "checking for lstat... " >&6; }
if ${ac_cv_func_lstat+:} false; then :
  $as_echo_n "(cached) " >&6
else

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

#include <sys/types.h>
#include <sys/stat.h>
int
main ()
{
lstat(".", (struct stat *)0)
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_func_lstat=yes
else
  ac_cv_func_lstat=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_lstat " >&5
$as_echo "$ac_cv_func_lstat " >&6; }
if test $ac_cv_func_lstat = yes; then
	$as_echo "#define HAVE_LSTAT 1" >>confdefs.h

fi

for ac_func in \
	ctermid \
	cuserid \
	ftime \
	getcwd \
	getgroups \
	gettimeofday \
	getuid \
	mktemp \
	mkdtemp \
	popen \
	putenv \
	readdir \
	setuid \
	strerror \
	truncate \
	ttyname \
	unsetenv \
	usleep \
	vasprintf \
	waitpid \
	zError \

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

fi
done

ac_fn_c_check_func "$LINENO" "mktime" "ac_cv_func_mktime"
if test "x$ac_cv_func_mktime" = xyes; then :
  $as_echo "#define HAVE_MKTIME 1" >>confdefs.h

else
  case " $LIBOBJS " in
  *" mktime.$ac_objext "* ) ;;
  *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
 ;;
esac

fi

ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr"
if test "x$ac_cv_func_strstr" = xyes; then :
  $as_echo "#define HAVE_STRSTR 1" >>confdefs.h

else
  case " $LIBOBJS " in
  *" strstr.$ac_objext "* ) ;;
  *) LIBOBJS="$LIBOBJS strstr.$ac_objext"
 ;;
esac

fi




{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for random-integer functions" >&5
$as_echo_n "checking for random-integer functions... " >&6; }
if ${cf_cv_srand_func+:} false; then :
  $as_echo_n "(cached) " >&6
else

cf_cv_srand_func=unknown
for cf_func in arc4random_push/arc4random arc4random_stir/arc4random srandom/random srand48/lrand48 srand/rand
do

	cf_srand_func=`echo $cf_func | sed -e 's%/.*%%'`
	cf_rand_func=`echo $cf_func | sed -e 's%.*/%%'`

	case $cf_srand_func in #(vi
	arc4random_stir)
		cf_srand_func='(void)'
		;;
	esac


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

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

int
main ()
{
long seed = 1; $cf_srand_func(seed); seed = $cf_rand_func()
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_srand_func=$cf_func
 break
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
done

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_srand_func" >&5
$as_echo "$cf_cv_srand_func" >&6; }
if test "$cf_cv_srand_func" != unknown ; then
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for range of random-integers" >&5
$as_echo_n "checking for range of random-integers... " >&6; }
if ${cf_cv_rand_max+:} false; then :
  $as_echo_n "(cached) " >&6
else

		case $cf_cv_srand_func in
		srand/rand)
			cf_cv_rand_max=RAND_MAX
			cf_rand_max=16
			;;
		*/arc4random)
			cf_cv_rand_max=0xFFFFFFFFUL
			cf_rand_max=32
			;;
		*)
			cf_cv_rand_max=INT_MAX
			cf_rand_max=31
			;;
		esac
		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

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

int
main ()
{
long x = $cf_cv_rand_max
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_cv_rand_max="(1L<<$cf_rand_max)-1"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

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

	cf_srand_func=`echo $cf_func | sed -e 's%/.*%%'`
	cf_rand_func=`echo $cf_func | sed -e 's%.*/%%'`

	case $cf_srand_func in #(vi
	arc4random_stir)
		cf_srand_func='(void)'
		;;
	esac



cf_rand_max=`echo "lynx_rand_max" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

	cat >>confdefs.h <<_ACEOF
#define lynx_srand $cf_srand_func
_ACEOF

	cat >>confdefs.h <<_ACEOF
#define lynx_rand $cf_rand_func
_ACEOF

	cat >>confdefs.h <<_ACEOF
#define $cf_rand_max $cf_cv_rand_max
_ACEOF

fi

for ac_func in strstr
do

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_func declaration" >&5
$as_echo_n "checking for $ac_func declaration... " >&6; }
if eval \${ac_cv_func_decl_$ac_func+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <string.h>
int
main ()
{
#ifndef ${ac_func}
extern	int	${ac_func}();
#endif
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <string.h>
int
main ()
{
#ifndef ${ac_func}
int	(*p)() = ${ac_func};
#endif
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

eval "ac_cv_func_decl_$ac_func=yes"
else

eval "ac_cv_func_decl_$ac_func=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else

eval "ac_cv_func_decl_$ac_func=yes"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi

if eval "test \"`echo '$ac_cv_func_'decl_$ac_func`\" = yes"; 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" >&5
$as_echo "no" >&6; }


ac_tr_func=`echo "DECL_$ac_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

  cat >>confdefs.h <<_ACEOF
#define $ac_tr_func 1
_ACEOF

fi
done

for ac_func in getgrgid getgrnam
do

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_func declaration" >&5
$as_echo_n "checking for $ac_func declaration... " >&6; }
if eval \${ac_cv_func_decl_$ac_func+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdio.h>
#include <grp.h>
int
main ()
{
#ifndef ${ac_func}
extern	int	${ac_func}();
#endif
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

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

#include <stdio.h>
#include <grp.h>
int
main ()
{
#ifndef ${ac_func}
int	(*p)() = ${ac_func};
#endif
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

eval "ac_cv_func_decl_$ac_func=yes"
else

eval "ac_cv_func_decl_$ac_func=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else

eval "ac_cv_func_decl_$ac_func=yes"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi

if eval "test \"`echo '$ac_cv_func_'decl_$ac_func`\" = yes"; 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" >&5
$as_echo "no" >&6; }


ac_tr_func=`echo "DECL_$ac_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

  cat >>confdefs.h <<_ACEOF
#define $ac_tr_func 1
_ACEOF

fi
done




{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if TRUE/FALSE are defined" >&5
$as_echo_n "checking if TRUE/FALSE are defined... " >&6; }
if ${cf_cv_bool_defs+:} false; then :
  $as_echo_n "(cached) " >&6
else

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

#include <${cf_cv_ncurses_header-curses.h}>
#include <stdio.h>
int
main ()
{
int x = TRUE, y = FALSE
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_bool_defs=yes
else
  cf_cv_bool_defs=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_bool_defs" >&5
$as_echo "$cf_cv_bool_defs" >&6; }
if test "$cf_cv_bool_defs" = no ; then
	$as_echo "#define TRUE (1)" >>confdefs.h

	$as_echo "#define FALSE (0)" >>confdefs.h

fi



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if external errno is declared" >&5
$as_echo_n "checking if external errno is declared... " >&6; }
if ${cf_cv_dcl_errno+:} false; then :
  $as_echo_n "(cached) " >&6
else

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

#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include <stdio.h>
#include <sys/types.h>
#include <errno.h>
int
main ()
{
int x = (int) errno
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_dcl_errno=yes
else
  cf_cv_dcl_errno=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

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

if test "$cf_cv_dcl_errno" = no ; then

cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

    cat >>confdefs.h <<_ACEOF
#define $cf_result 1
_ACEOF

fi

# It's possible (for near-UNIX clones) that the data doesn't exist

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if external errno exists" >&5
$as_echo_n "checking if external errno exists... " >&6; }
if ${cf_cv_have_errno+:} false; then :
  $as_echo_n "(cached) " >&6
else

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

#undef errno
extern int errno;

int
main ()
{
errno = 2
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_have_errno=yes
else
  cf_cv_have_errno=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: $cf_cv_have_errno" >&5
$as_echo "$cf_cv_have_errno" >&6; }

if test "$cf_cv_have_errno" = yes ; then

cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

    cat >>confdefs.h <<_ACEOF
#define $cf_result 1
_ACEOF

fi





{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can set errno" >&5
$as_echo_n "checking if we can set errno... " >&6; }
if ${cf_cv_set_errno+:} false; then :
  $as_echo_n "(cached) " >&6
else

if test "$cross_compiling" = yes; then :
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <errno.h>
int
main ()
{
errno = 255
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_set_errno=maybe
else
  cf_cv_set_errno=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <errno.h>
int main()
{
	errno = 255;
	${cf_cv_main_return-return}(errno != 255);
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  cf_cv_set_errno=yes
else
  cf_cv_set_errno=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: $cf_cv_set_errno" >&5
$as_echo "$cf_cv_set_errno" >&6; }
test "$cf_cv_set_errno" != no && $as_echo "#define CAN_SET_ERRNO 1" >>confdefs.h



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setlocale()" >&5
$as_echo_n "checking for setlocale()... " >&6; }
if ${cf_cv_locale+:} false; then :
  $as_echo_n "(cached) " >&6
else

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <locale.h>
int
main ()
{
setlocale(LC_ALL, "")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_locale=yes
else
  cf_cv_locale=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: $cf_cv_locale" >&5
$as_echo "$cf_cv_locale" >&6; }
test $cf_cv_locale = yes && { $as_echo "#define LOCALE 1" >>confdefs.h
 }


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if NGROUPS is defined" >&5
$as_echo_n "checking if NGROUPS is defined... " >&6; }
if ${cf_cv_ngroups+:} false; then :
  $as_echo_n "(cached) " >&6
else

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

#if HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#if HAVE_LIMITS_H
#include <limits.h>
#endif

int
main ()
{
int x = NGROUPS
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_ngroups=yes
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#if HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#if HAVE_LIMITS_H
#include <limits.h>
#endif

int
main ()
{
int x = NGROUPS_MAX
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_ngroups=NGROUPS_MAX
else
  cf_cv_ngroups=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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_ngroups" >&5
$as_echo "$cf_cv_ngroups" >&6; }

fi

if test "$cf_cv_ngroups" = no ; then
	$as_echo "#define NGROUPS 16" >>confdefs.h

elif test "$cf_cv_ngroups" = NGROUPS_MAX ; then
	$as_echo "#define NGROUPS NGROUPS_MAX" >>confdefs.h

fi



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if external sys_nerr is declared" >&5
$as_echo_n "checking if external sys_nerr is declared... " >&6; }
if ${cf_cv_dcl_sys_nerr+:} false; then :
  $as_echo_n "(cached) " >&6
else

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

#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include <stdio.h>
#include <sys/types.h>
#include <errno.h>
int
main ()
{
int x = (int) sys_nerr
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_dcl_sys_nerr=yes
else
  cf_cv_dcl_sys_nerr=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

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

if test "$cf_cv_dcl_sys_nerr" = no ; then

cf_result=`echo "decl_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

    cat >>confdefs.h <<_ACEOF
#define $cf_result 1
_ACEOF

fi

# It's possible (for near-UNIX clones) that the data doesn't exist

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if external sys_nerr exists" >&5
$as_echo_n "checking if external sys_nerr exists... " >&6; }
if ${cf_cv_have_sys_nerr+:} false; then :
  $as_echo_n "(cached) " >&6
else

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

#undef sys_nerr
extern int sys_nerr;

int
main ()
{
sys_nerr = 2
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_have_sys_nerr=yes
else
  cf_cv_have_sys_nerr=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: $cf_cv_have_sys_nerr" >&5
$as_echo "$cf_cv_have_sys_nerr" >&6; }

if test "$cf_cv_have_sys_nerr" = yes ; then

cf_result=`echo "have_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

    cat >>confdefs.h <<_ACEOF
#define $cf_result 1
_ACEOF

fi




{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if external sys_errlist is declared" >&5
$as_echo_n "checking if external sys_errlist is declared... " >&6; }
if ${cf_cv_dcl_sys_errlist+:} false; then :
  $as_echo_n "(cached) " >&6
else

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

#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include <stdio.h>
#include <sys/types.h>
#include <errno.h>
int
main ()
{
int x = (int) sys_errlist
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_dcl_sys_errlist=yes
else
  cf_cv_dcl_sys_errlist=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

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

if test "$cf_cv_dcl_sys_errlist" = no ; then

cf_result=`echo "decl_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

    cat >>confdefs.h <<_ACEOF
#define $cf_result 1
_ACEOF

fi

# It's possible (for near-UNIX clones) that the data doesn't exist

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if external sys_errlist exists" >&5
$as_echo_n "checking if external sys_errlist exists... " >&6; }
if ${cf_cv_have_sys_errlist+:} false; then :
  $as_echo_n "(cached) " >&6
else

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

#undef sys_errlist
extern int sys_errlist;

int
main ()
{
sys_errlist = 2
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_have_sys_errlist=yes
else
  cf_cv_have_sys_errlist=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: $cf_cv_have_sys_errlist" >&5
$as_echo "$cf_cv_have_sys_errlist" >&6; }

if test "$cf_cv_have_sys_errlist" = yes ; then

cf_result=`echo "have_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

    cat >>confdefs.h <<_ACEOF
#define $cf_result 1
_ACEOF

fi





for ac_header in lastlog.h paths.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"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lastlog path" >&5
$as_echo_n "checking for lastlog path... " >&6; }
if ${cf_cv_path_lastlog+:} false; then :
  $as_echo_n "(cached) " >&6
else

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

#include <sys/types.h>
#ifdef HAVE_LASTLOG_H
#include <lastlog.h>
#else
#ifdef HAVE_PATHS_H
#include <paths.h>
#endif
#endif
int
main ()
{
char *path = _PATH_LASTLOG
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_path_lastlog="_PATH_LASTLOG"
else
  if test -f /usr/adm/lastlog ; then
	 	cf_cv_path_lastlog=/usr/adm/lastlog
	else
		cf_cv_path_lastlog=no
	fi
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_path_lastlog" >&5
$as_echo "$cf_cv_path_lastlog" >&6; }
test $cf_cv_path_lastlog != no && $as_echo "#define USE_LASTLOG 1" >>confdefs.h





{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for utmp implementation" >&5
$as_echo_n "checking for utmp implementation... " >&6; }
if ${cf_cv_have_utmp+:} false; then :
  $as_echo_n "(cached) " >&6
else

	cf_cv_have_utmp=no
for cf_header in utmpx utmp ; do
cf_utmp_includes="
#include <sys/types.h>
#include <${cf_header}.h>
#define getutent getutxent
#ifdef USE_LASTLOG
#include <lastlog.h>	/* may conflict with utmpx.h on Linux */
#endif
"
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$cf_utmp_includes
int
main ()
{
struct $cf_header x;
	 char *name = x.ut_name; /* utmp.h and compatible definitions */

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_have_utmp=$cf_header
	 break
else

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$cf_utmp_includes
int
main ()
{
struct $cf_header x;
	 char *name = x.ut_user; /* utmpx.h must declare this */

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_have_utmp=$cf_header
	 break

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

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

if test $cf_cv_have_utmp != no ; then
	$as_echo "#define HAVE_UTMP 1" >>confdefs.h

	test $cf_cv_have_utmp = utmpx && $as_echo "#define UTMPX_FOR_UTMP 1" >>confdefs.h


if test $cf_cv_have_utmp != no ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${cf_cv_have_utmp}.ut_host is declared" >&5
$as_echo_n "checking if ${cf_cv_have_utmp}.ut_host is declared... " >&6; }
if ${cf_cv_have_utmp_ut_host+:} false; then :
  $as_echo_n "(cached) " >&6
else

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

#include <sys/types.h>
#include <${cf_cv_have_utmp}.h>
int
main ()
{
struct $cf_cv_have_utmp x; char *y = &x.ut_host[0]
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_have_utmp_ut_host=yes
else
  cf_cv_have_utmp_ut_host=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_have_utmp_ut_host" >&5
$as_echo "$cf_cv_have_utmp_ut_host" >&6; }
test $cf_cv_have_utmp_ut_host != no && $as_echo "#define HAVE_UTMP_UT_HOST 1" >>confdefs.h

fi


if test $cf_cv_have_utmp != no ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${cf_cv_have_utmp}.ut_syslen is declared" >&5
$as_echo_n "checking if ${cf_cv_have_utmp}.ut_syslen is declared... " >&6; }
if ${cf_cv_have_utmp_ut_syslen+:} false; then :
  $as_echo_n "(cached) " >&6
else

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

#include <sys/types.h>
#include <${cf_cv_have_utmp}.h>
int
main ()
{
struct $cf_cv_have_utmp x; int y = x.ut_syslen
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_have_utmp_ut_syslen=yes
else
  cf_cv_have_utmp_ut_syslen=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_have_utmp_ut_syslen" >&5
$as_echo "$cf_cv_have_utmp_ut_syslen" >&6; }
test $cf_cv_have_utmp_ut_syslen != no && $as_echo "#define HAVE_UTMP_UT_SYSLEN 1" >>confdefs.h

fi


if test $cf_cv_have_utmp != no ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${cf_cv_have_utmp}.ut_name is declared" >&5
$as_echo_n "checking if ${cf_cv_have_utmp}.ut_name is declared... " >&6; }
if ${cf_cv_have_utmp_ut_name+:} false; then :
  $as_echo_n "(cached) " >&6
else

	cf_cv_have_utmp_ut_name=no
cf_utmp_includes="
#include <sys/types.h>
#include <${cf_cv_have_utmp}.h>
#define getutent getutxent
#ifdef USE_LASTLOG
#include <lastlog.h>		/* may conflict with utmpx.h on Linux */
#endif
"
for cf_header in ut_name ut_user ; do
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$cf_utmp_includes
int
main ()
{
struct $cf_cv_have_utmp x;
	 char *name = x.$cf_header;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_have_utmp_ut_name=$cf_header
	 break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done

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

case $cf_cv_have_utmp_ut_name in #(vi
no) #(vi
	as_fn_error $? "Cannot find declaration for ut.ut_name" "$LINENO" 5
	;;
ut_user)
	$as_echo "#define ut_name ut_user" >>confdefs.h

	;;
esac
fi


if test $cf_cv_have_utmp != no ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for exit-status in $cf_cv_have_utmp" >&5
$as_echo_n "checking for exit-status in $cf_cv_have_utmp... " >&6; }
if ${cf_cv_have_utmp_ut_xstatus+:} false; then :
  $as_echo_n "(cached) " >&6
else

for cf_result in \
	ut_exit.__e_exit \
	ut_exit.e_exit \
	ut_exit.ut_e_exit \
	ut_exit.ut_exit
do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <sys/types.h>
#include <${cf_cv_have_utmp}.h>
int
main ()
{
struct $cf_cv_have_utmp x; long y = x.$cf_result = 0
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_have_utmp_ut_xstatus=$cf_result
	 break
else
  cf_cv_have_utmp_ut_xstatus=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_have_utmp_ut_xstatus" >&5
$as_echo "$cf_cv_have_utmp_ut_xstatus" >&6; }
if test $cf_cv_have_utmp_ut_xstatus != no ; then
	$as_echo "#define HAVE_UTMP_UT_XSTATUS 1" >>confdefs.h

	cat >>confdefs.h <<_ACEOF
#define ut_xstatus $cf_cv_have_utmp_ut_xstatus
_ACEOF

fi
fi


if test $cf_cv_have_utmp != no ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${cf_cv_have_utmp}.ut_xtime is declared" >&5
$as_echo_n "checking if ${cf_cv_have_utmp}.ut_xtime is declared... " >&6; }
if ${cf_cv_have_utmp_ut_xtime+:} false; then :
  $as_echo_n "(cached) " >&6
else

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

#include <sys/types.h>
#include <${cf_cv_have_utmp}.h>
int
main ()
{
struct $cf_cv_have_utmp x; long y = x.ut_xtime = 0
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_have_utmp_ut_xtime=yes
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <sys/types.h>
#include <${cf_cv_have_utmp}.h>
int
main ()
{
struct $cf_cv_have_utmp x; long y = x.ut_tv.tv_sec
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_have_utmp_ut_xtime=define
else
  cf_cv_have_utmp_ut_xtime=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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_have_utmp_ut_xtime" >&5
$as_echo "$cf_cv_have_utmp_ut_xtime" >&6; }
if test $cf_cv_have_utmp_ut_xtime != no ; then
	$as_echo "#define HAVE_UTMP_UT_XTIME 1" >>confdefs.h

	if test $cf_cv_have_utmp_ut_xtime = define ; then
		$as_echo "#define ut_xtime ut_tv.tv_sec" >>confdefs.h

	fi
fi
fi


if test $cf_cv_have_utmp != no ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${cf_cv_have_utmp}.ut_session is declared" >&5
$as_echo_n "checking if ${cf_cv_have_utmp}.ut_session is declared... " >&6; }
if ${cf_cv_have_utmp_ut_session+:} false; then :
  $as_echo_n "(cached) " >&6
else

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

#include <sys/types.h>
#include <${cf_cv_have_utmp}.h>
int
main ()
{
struct $cf_cv_have_utmp x; long y = x.ut_session
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_have_utmp_ut_session=yes
else
  cf_cv_have_utmp_ut_session=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_have_utmp_ut_session" >&5
$as_echo "$cf_cv_have_utmp_ut_session" >&6; }
if test $cf_cv_have_utmp_ut_session != no ; then
	$as_echo "#define HAVE_UTMP_UT_SESSION 1" >>confdefs.h

fi
fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $cf_cv_have_utmp is SYSV flavor" >&5
$as_echo_n "checking if $cf_cv_have_utmp is SYSV flavor... " >&6; }
if ${cf_cv_sysv_utmp+:} false; then :
  $as_echo_n "(cached) " >&6
else

test "$cf_cv_have_utmp" = "utmp" && cf_prefix="ut" || cf_prefix="utx"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <sys/types.h>
#include <${cf_cv_have_utmp}.h>
int
main ()
{

struct $cf_cv_have_utmp x;
	set${cf_prefix}ent ();
	get${cf_prefix}id(&x);
	put${cf_prefix}line(&x);
	end${cf_prefix}ent();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_sysv_utmp=yes
else
  cf_cv_sysv_utmp=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: $cf_cv_sysv_utmp" >&5
$as_echo "$cf_cv_sysv_utmp" >&6; }
test $cf_cv_sysv_utmp = yes && $as_echo "#define USE_SYSV_UTMP 1" >>confdefs.h


fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if external h_errno exists" >&5
$as_echo_n "checking if external h_errno exists... " >&6; }
if ${cf_cv_have_h_errno+:} false; then :
  $as_echo_n "(cached) " >&6
else

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

#undef h_errno
extern int h_errno;

int
main ()
{
h_errno = 2
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_have_h_errno=yes
else
  cf_cv_have_h_errno=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: $cf_cv_have_h_errno" >&5
$as_echo "$cf_cv_have_h_errno" >&6; }

if test "$cf_cv_have_h_errno" = yes ; then

cf_result=`echo "have_h_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

    cat >>confdefs.h <<_ACEOF
#define $cf_result 1
_ACEOF

fi






Experimental Options:

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if bibp: URLs should be supported" >&5
$as_echo_n "checking if bibp: URLs should be supported... " >&6; }
# Check whether --enable-bibp-urls was given.
if test "${enable_bibp_urls+set}" = set; then :
  enableval=$enable_bibp_urls; test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    use_bibp_urls=$enableval
  else
    use_bibp_urls=yes
  fi
else
  enableval=yes
  use_bibp_urls=yes

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_bibp_urls" >&5
$as_echo "$use_bibp_urls" >&6; }
test $use_bibp_urls = no && $as_echo "#define DISABLE_BIBP 1" >>confdefs.h


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if configuration info should be browsable" >&5
$as_echo_n "checking if configuration info should be browsable... " >&6; }
# Check whether --enable-config-info was given.
if test "${enable_config_info+set}" = set; then :
  enableval=$enable_config_info; test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    use_config_info=$enableval
  else
    use_config_info=yes
  fi
else
  enableval=yes
  use_config_info=yes

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_config_info" >&5
$as_echo "$use_config_info" >&6; }
test $use_config_info = no && $as_echo "#define NO_CONFIG_INFO 1" >>confdefs.h


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if new-style forms-based options screen should be used" >&5
$as_echo_n "checking if new-style forms-based options screen should be used... " >&6; }
# Check whether --enable-forms-options was given.
if test "${enable_forms_options+set}" = set; then :
  enableval=$enable_forms_options; test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    use_forms_options=$enableval
  else
    use_forms_options=yes
  fi
else
  enableval=yes
  use_forms_options=yes

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_forms_options" >&5
$as_echo "$use_forms_options" >&6; }
test $use_forms_options = no && $as_echo "#define NO_OPTION_FORMS 1" >>confdefs.h


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if old-style options menu should be used" >&5
$as_echo_n "checking if old-style options menu should be used... " >&6; }
# Check whether --enable-menu-options was given.
if test "${enable_menu_options+set}" = set; then :
  enableval=$enable_menu_options; test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    use_menu_options=$enableval
  else
    use_menu_options=yes
  fi
else
  enableval=yes
  use_menu_options=yes

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_menu_options" >&5
$as_echo "$use_menu_options" >&6; }
test $use_menu_options = no && $as_echo "#define NO_OPTION_MENU 1" >>confdefs.h


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if experimental address-list page should be used" >&5
$as_echo_n "checking if experimental address-list page should be used... " >&6; }
# Check whether --enable-addrlist-page was given.
if test "${enable_addrlist_page+set}" = set; then :
  enableval=$enable_addrlist_page; test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    use_addrlist_page=$enableval
  else
    use_addrlist_page=no
  fi
else
  enableval=no
  use_addrlist_page=no

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_addrlist_page" >&5
$as_echo "$use_addrlist_page" >&6; }
test $use_addrlist_page != no && $as_echo "#define EXP_ADDRLIST_PAGE 1" >>confdefs.h


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if experimental ascii case-conversion should be used" >&5
$as_echo_n "checking if experimental ascii case-conversion should be used... " >&6; }
# Check whether --enable-ascii-ctypes was given.
if test "${enable_ascii_ctypes+set}" = set; then :
  enableval=$enable_ascii_ctypes; test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    use_ascii_ctypes=$enableval
  else
    use_ascii_ctypes=yes
  fi
else
  enableval=no
  use_ascii_ctypes=yes

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_ascii_ctypes" >&5
$as_echo "$use_ascii_ctypes" >&6; }
test $use_ascii_ctypes != no && $as_echo "#define EXP_ASCII_CTYPES 1" >>confdefs.h


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if experimental charset-selection logic should be used" >&5
$as_echo_n "checking if experimental charset-selection logic should be used... " >&6; }
# Check whether --enable-charset-choice was given.
if test "${enable_charset_choice+set}" = set; then :
  enableval=$enable_charset_choice; test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    use_charset_choice=$enableval
  else
    use_charset_choice=no
  fi
else
  enableval=no
  use_charset_choice=no

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_charset_choice" >&5
$as_echo "$use_charset_choice" >&6; }
test $use_charset_choice != no && $as_echo "#define EXP_CHARSET_CHOICE 1" >>confdefs.h


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if experimental CJK logic should be used" >&5
$as_echo_n "checking if experimental CJK logic should be used... " >&6; }
# Check whether --enable-cjk was given.
if test "${enable_cjk+set}" = set; then :
  enableval=$enable_cjk; test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    use_cjk=$enableval
  else
    use_cjk=no
  fi
else
  enableval=no
  use_cjk=no

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_cjk" >&5
$as_echo "$use_cjk" >&6; }
test $use_cjk != no && $as_echo "#define CJK_EX 1" >>confdefs.h


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if experimental Japanese UTF-8 logic should be used" >&5
$as_echo_n "checking if experimental Japanese UTF-8 logic should be used... " >&6; }
# Check whether --enable-japanese-utf8 was given.
if test "${enable_japanese_utf8+set}" = set; then :
  enableval=$enable_japanese_utf8; test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    use_ja_utf8=$enableval
  else
    use_ja_utf8=no
  fi
else
  enableval=no
  use_ja_utf8=no

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_ja_utf8" >&5
$as_echo "$use_ja_utf8" >&6; }
if test $use_ja_utf8 != no ; then
	$as_echo "#define EXP_JAPANESEUTF8_SUPPORT 1" >>confdefs.h




# Check whether --with-libiconv-prefix was given.
if test "${with_libiconv_prefix+set}" = set; then :
  withval=$with_libiconv_prefix;

  case "$withval" in #(vi
  no) #(vi
      ;;
  yes) #(vi
      ;;
  *)


for cf_searchpath in `echo "$withval" | tr $PATH_SEPARATOR ' '`; do
	if test -d $cf_searchpath/include; then

if test -n "$cf_searchpath/include" ; then
  for cf_add_incdir in $cf_searchpath/include
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:23552: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi

	elif test -d $cf_searchpath/../include ; then

if test -n "$cf_searchpath/../include" ; then
  for cf_add_incdir in $cf_searchpath/../include
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:23618: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi

	else
as_fn_error $? "cannot find libiconv under $withval" "$LINENO" 5
	fi
	if test -d $cf_searchpath/lib; then

if test -n "$cf_searchpath/lib" ; then
  for cf_add_libdir in $cf_searchpath/lib
  do
    if test $cf_add_libdir = /usr/lib ; then
      :
    elif test -d $cf_add_libdir
    then
      cf_have_libdir=no
      if test -n "$LDFLAGS$LIBS" ; then
        # a loop is needed to ensure we can add subdirs of existing dirs
        for cf_test_libdir in $LDFLAGS $LIBS ; do
          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
            cf_have_libdir=yes; break
          fi
        done
      fi
      if test "$cf_have_libdir" = no ; then
        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me-configure}:23658: testing adding $cf_add_libdir to library-path ..." 1>&5


        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
      fi
    fi
  done
fi

	elif test -d $cf_searchpath ; then

if test -n "$cf_searchpath" ; then
  for cf_add_libdir in $cf_searchpath
  do
    if test $cf_add_libdir = /usr/lib ; then
      :
    elif test -d $cf_add_libdir
    then
      cf_have_libdir=no
      if test -n "$LDFLAGS$LIBS" ; then
        # a loop is needed to ensure we can add subdirs of existing dirs
        for cf_test_libdir in $LDFLAGS $LIBS ; do
          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
            cf_have_libdir=yes; break
          fi
        done
      fi
      if test "$cf_have_libdir" = no ; then
        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me-configure}:23688: testing adding $cf_add_libdir to library-path ..." 1>&5


        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
      fi
    fi
  done
fi

	else
as_fn_error $? "cannot find libiconv under $withval" "$LINENO" 5
	fi
done

      ;;
  esac


fi


  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
$as_echo_n "checking for iconv... " >&6; }
if ${am_cv_func_iconv+:} false; then :
  $as_echo_n "(cached) " >&6
else



# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
# will be set on completion of the AC_TRY_LINK below.
cf_cv_header_path_iconv=
cf_cv_library_path_iconv=


echo "${as_me-configure}:23723: testing Starting FIND_LINKAGE(iconv,) ..." 1>&5


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_c_try_link "$LINENO"; then :
  cf_cv_find_linkage_iconv=yes
else

    cf_cv_find_linkage_iconv=no

    test -n "$verbose" && echo "	find linkage for iconv library" 1>&6

echo "${as_me-configure}:23752: testing find linkage for iconv library ..." 1>&5



echo "${as_me-configure}:23756: testing Searching for headers in FIND_LINKAGE(iconv,) ..." 1>&5


    cf_save_CPPFLAGS="$CPPFLAGS"
    cf_test_CPPFLAGS="$CPPFLAGS"


cf_header_path_list=""
if test -n "${CFLAGS}${CPPFLAGS}" ; then
	for cf_header_path in $CPPFLAGS $CFLAGS
	do
		case $cf_header_path in #(vi
		-I*)
			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`

test "$cf_header_path" != "NONE" && \
test -d "$cf_header_path" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
	test -d $cf_header_path/include/iconv &&       cf_search="$cf_search $cf_header_path/include/iconv"
	test -d $cf_header_path/include/iconv/include &&    cf_search="$cf_search $cf_header_path/include/iconv/include"
	test -d $cf_header_path/iconv/include &&       cf_search="$cf_search $cf_header_path/iconv/include"
	test -d $cf_header_path/iconv/include/iconv &&    cf_search="$cf_search $cf_header_path/iconv/include/iconv"
}

			cf_header_path_list="$cf_header_path_list $cf_search"
			;;
		esac
	done
fi

cf_search=""


test "/usr" != "$prefix" && \
test -d "/usr" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /usr"
	test -d /usr/include &&          cf_search="$cf_search /usr/include"
	test -d /usr/include/iconv &&       cf_search="$cf_search /usr/include/iconv"
	test -d /usr/include/iconv/include &&    cf_search="$cf_search /usr/include/iconv/include"
	test -d /usr/iconv/include &&       cf_search="$cf_search /usr/iconv/include"
	test -d /usr/iconv/include/iconv &&    cf_search="$cf_search /usr/iconv/include/iconv"
}


test "$prefix" != "NONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
	test -d $prefix/include/iconv &&       cf_search="$cf_search $prefix/include/iconv"
	test -d $prefix/include/iconv/include &&    cf_search="$cf_search $prefix/include/iconv/include"
	test -d $prefix/iconv/include &&       cf_search="$cf_search $prefix/iconv/include"
	test -d $prefix/iconv/include/iconv &&    cf_search="$cf_search $prefix/iconv/include/iconv"
}


test "/usr/local" != "$prefix" && \
test -d "/usr/local" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /usr/local"
	test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
	test -d /usr/local/include/iconv &&       cf_search="$cf_search /usr/local/include/iconv"
	test -d /usr/local/include/iconv/include &&    cf_search="$cf_search /usr/local/include/iconv/include"
	test -d /usr/local/iconv/include &&       cf_search="$cf_search /usr/local/iconv/include"
	test -d /usr/local/iconv/include/iconv &&    cf_search="$cf_search /usr/local/iconv/include/iconv"
}


test "/opt" != "$prefix" && \
test -d "/opt" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /opt"
	test -d /opt/include &&          cf_search="$cf_search /opt/include"
	test -d /opt/include/iconv &&       cf_search="$cf_search /opt/include/iconv"
	test -d /opt/include/iconv/include &&    cf_search="$cf_search /opt/include/iconv/include"
	test -d /opt/iconv/include &&       cf_search="$cf_search /opt/iconv/include"
	test -d /opt/iconv/include/iconv &&    cf_search="$cf_search /opt/iconv/include/iconv"
}


test "$HOME" != "$prefix" && \
test -d "$HOME" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under $HOME"
	test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
	test -d $HOME/include/iconv &&       cf_search="$cf_search $HOME/include/iconv"
	test -d $HOME/include/iconv/include &&    cf_search="$cf_search $HOME/include/iconv/include"
	test -d $HOME/iconv/include &&       cf_search="$cf_search $HOME/iconv/include"
	test -d $HOME/iconv/include/iconv &&    cf_search="$cf_search $HOME/iconv/include/iconv"
}



test "$includedir" != NONE && \
test "$includedir" != "/usr/include" && \
test -d "$includedir" && {
	test -d $includedir &&    cf_search="$cf_search $includedir"
	test -d $includedir/iconv && cf_search="$cf_search $includedir/iconv"
}

test "$oldincludedir" != NONE && \
test "$oldincludedir" != "/usr/include" && \
test -d "$oldincludedir" && {
	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
	test -d $oldincludedir/iconv && cf_search="$cf_search $oldincludedir/iconv"
}

cf_search="$cf_header_path_list $cf_search"

    for cf_cv_header_path_iconv in $cf_search
    do
      if test -d $cf_cv_header_path_iconv ; then
        test -n "$verbose" && echo "	... testing $cf_cv_header_path_iconv" 1>&6

echo "${as_me-configure}:23873: testing ... testing $cf_cv_header_path_iconv ..." 1>&5


        CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_iconv"
        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_c_try_compile "$LINENO"; then :

            test -n "$verbose" && echo "	... found iconv headers in $cf_cv_header_path_iconv" 1>&6

echo "${as_me-configure}:23899: testing ... found iconv headers in $cf_cv_header_path_iconv ..." 1>&5


            cf_cv_find_linkage_iconv=maybe
            cf_test_CPPFLAGS="$CPPFLAGS"
            break
else

            CPPFLAGS="$cf_save_CPPFLAGS"

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

    if test "$cf_cv_find_linkage_iconv" = maybe ; then


echo "${as_me-configure}:23917: testing Searching for iconv library in FIND_LINKAGE(iconv,) ..." 1>&5


      cf_save_LIBS="$LIBS"
      cf_save_LDFLAGS="$LDFLAGS"



      if test "$cf_cv_find_linkage_iconv" != yes ; then

cf_library_path_list=""
if test -n "${LDFLAGS}${LIBS}" ; then
	for cf_library_path in $LDFLAGS $LIBS
	do
		case $cf_library_path in #(vi
		-L*)
			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`

test "$cf_library_path" != "NONE" && \
test -d "$cf_library_path" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
	test -d $cf_library_path/lib/iconv &&       cf_search="$cf_search $cf_library_path/lib/iconv"
	test -d $cf_library_path/lib/iconv/lib &&    cf_search="$cf_search $cf_library_path/lib/iconv/lib"
	test -d $cf_library_path/iconv/lib &&       cf_search="$cf_search $cf_library_path/iconv/lib"
	test -d $cf_library_path/iconv/lib/iconv &&    cf_search="$cf_search $cf_library_path/iconv/lib/iconv"
}

			cf_library_path_list="$cf_library_path_list $cf_search"
			;;
		esac
	done
fi

cf_search=""


test "/usr" != "$prefix" && \
test -d "/usr" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /usr"
	test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
	test -d /usr/lib/iconv &&       cf_search="$cf_search /usr/lib/iconv"
	test -d /usr/lib/iconv/lib &&    cf_search="$cf_search /usr/lib/iconv/lib"
	test -d /usr/iconv/lib &&       cf_search="$cf_search /usr/iconv/lib"
	test -d /usr/iconv/lib/iconv &&    cf_search="$cf_search /usr/iconv/lib/iconv"
}


test "$prefix" != "NONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
	test -d $prefix/lib/iconv &&       cf_search="$cf_search $prefix/lib/iconv"
	test -d $prefix/lib/iconv/lib &&    cf_search="$cf_search $prefix/lib/iconv/lib"
	test -d $prefix/iconv/lib &&       cf_search="$cf_search $prefix/iconv/lib"
	test -d $prefix/iconv/lib/iconv &&    cf_search="$cf_search $prefix/iconv/lib/iconv"
}


test "/usr/local" != "$prefix" && \
test -d "/usr/local" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /usr/local"
	test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
	test -d /usr/local/lib/iconv &&       cf_search="$cf_search /usr/local/lib/iconv"
	test -d /usr/local/lib/iconv/lib &&    cf_search="$cf_search /usr/local/lib/iconv/lib"
	test -d /usr/local/iconv/lib &&       cf_search="$cf_search /usr/local/iconv/lib"
	test -d /usr/local/iconv/lib/iconv &&    cf_search="$cf_search /usr/local/iconv/lib/iconv"
}


test "/opt" != "$prefix" && \
test -d "/opt" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /opt"
	test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
	test -d /opt/lib/iconv &&       cf_search="$cf_search /opt/lib/iconv"
	test -d /opt/lib/iconv/lib &&    cf_search="$cf_search /opt/lib/iconv/lib"
	test -d /opt/iconv/lib &&       cf_search="$cf_search /opt/iconv/lib"
	test -d /opt/iconv/lib/iconv &&    cf_search="$cf_search /opt/iconv/lib/iconv"
}


test "$HOME" != "$prefix" && \
test -d "$HOME" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under $HOME"
	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
	test -d $HOME/lib/iconv &&       cf_search="$cf_search $HOME/lib/iconv"
	test -d $HOME/lib/iconv/lib &&    cf_search="$cf_search $HOME/lib/iconv/lib"
	test -d $HOME/iconv/lib &&       cf_search="$cf_search $HOME/iconv/lib"
	test -d $HOME/iconv/lib/iconv &&    cf_search="$cf_search $HOME/iconv/lib/iconv"
}



cf_search="$cf_library_path_list $cf_search"

        for cf_cv_library_path_iconv in $cf_search
        do
          if test -d $cf_cv_library_path_iconv ; then
            test -n "$verbose" && echo "	... testing $cf_cv_library_path_iconv" 1>&6

echo "${as_me-configure}:24023: testing ... testing $cf_cv_library_path_iconv ..." 1>&5


            CPPFLAGS="$cf_test_CPPFLAGS"
            LIBS="-liconv  $cf_save_LIBS"
            LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_iconv"
            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_c_try_link "$LINENO"; then :

                test -n "$verbose" && echo "	... found iconv library in $cf_cv_library_path_iconv" 1>&6

echo "${as_me-configure}:24051: testing ... found iconv library in $cf_cv_library_path_iconv ..." 1>&5


                cf_cv_find_linkage_iconv=yes
                cf_cv_library_file_iconv="-liconv"
                break
else

                CPPFLAGS="$cf_save_CPPFLAGS"
                LIBS="$cf_save_LIBS"
                LDFLAGS="$cf_save_LDFLAGS"

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
          fi
        done
        LIBS="$cf_save_LIBS"
        CPPFLAGS="$cf_save_CPPFLAGS"
        LDFLAGS="$cf_save_LDFLAGS"
      fi

    else
      cf_cv_find_linkage_iconv=no
    fi

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

if test "$cf_cv_find_linkage_iconv" = yes ; then
am_cv_func_iconv=yes
else
am_cv_func_iconv="no, consider installing GNU libiconv"
fi

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

  if test "$am_cv_func_iconv" = yes; then

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


    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the declaration of iconv() needs const." >&5
$as_echo_n "checking if the declaration of iconv() needs const.... " >&6; }
if ${am_cv_proto_iconv_const+:} 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

int
main ()
{

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

    if test "$am_cv_proto_iconv_const" = yes ; then
      am_cv_proto_iconv_arg1="const"
    else
      am_cv_proto_iconv_arg1=""
    fi


cat >>confdefs.h <<_ACEOF
#define ICONV_CONST $am_cv_proto_iconv_arg1
_ACEOF

  fi

  LIBICONV=
  if test "$cf_cv_find_linkage_iconv" = yes; then

if test -n "$cf_cv_header_path_iconv" ; then
  for cf_add_incdir in $cf_cv_header_path_iconv
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:24200: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi

    if test -n "$cf_cv_library_file_iconv" ; then
      LIBICONV="-liconv"

if test -n "$cf_cv_library_path_iconv" ; then
  for cf_add_libdir in $cf_cv_library_path_iconv
  do
    if test $cf_add_libdir = /usr/lib ; then
      :
    elif test -d $cf_add_libdir
    then
      cf_have_libdir=no
      if test -n "$LDFLAGS$LIBS" ; then
        # a loop is needed to ensure we can add subdirs of existing dirs
        for cf_test_libdir in $LDFLAGS $LIBS ; do
          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
            cf_have_libdir=yes; break
          fi
        done
      fi
      if test "$cf_have_libdir" = no ; then
        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me-configure}:24238: testing adding $cf_add_libdir to library-path ..." 1>&5


        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
      fi
    fi
  done
fi

    fi
  fi



	if test "$USE_NLS" != yes ; then
	  LIBS="$LIBICONV $LIBS"
	fi
fi

use_dft_colors=no
case $cf_cv_screen in
curses|slang|ncurses*)
	use_dft_colors=maybe
	;;
esac

if test "$use_dft_colors" != no ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want to use default-colors" >&5
$as_echo_n "checking if you want to use default-colors... " >&6; }
# Check whether --enable-default-colors was given.
if test "${enable_default_colors+set}" = set; then :
  enableval=$enable_default_colors; test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    use_dft_colors=yes
  else
    use_dft_colors=no
  fi
else
  enableval=no
  use_dft_colors=no

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_dft_colors" >&5
$as_echo "$use_dft_colors" >&6; }
test $use_dft_colors = "yes" && $as_echo "#define USE_DEFAULT_COLORS 1" >>confdefs.h

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if experimental keyboard-layout logic should be used" >&5
$as_echo_n "checking if experimental keyboard-layout logic should be used... " >&6; }
# Check whether --enable-kbd-layout was given.
if test "${enable_kbd_layout+set}" = set; then :
  enableval=$enable_kbd_layout; test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    use_kbd_layout=$enableval
  else
    use_kbd_layout=no
  fi
else
  enableval=no
  use_kbd_layout=no

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_kbd_layout" >&5
$as_echo "$use_kbd_layout" >&6; }
test $use_kbd_layout != no && $as_echo "#define EXP_KEYBOARD_LAYOUT 1" >>confdefs.h


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if experimental nested-table logic should be used" >&5
$as_echo_n "checking if experimental nested-table logic should be used... " >&6; }
# Check whether --enable-nested-tables was given.
if test "${enable_nested_tables+set}" = set; then :
  enableval=$enable_nested_tables; test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    use_nested_tables=$enableval
  else
    use_nested_tables=no
  fi
else
  enableval=no
  use_nested_tables=no

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_nested_tables" >&5
$as_echo "$use_nested_tables" >&6; }
test $use_nested_tables != no && $as_echo "#define EXP_NESTED_TABLES 1" >>confdefs.h


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if progress-bar code should be used" >&5
$as_echo_n "checking if progress-bar code should be used... " >&6; }
# Check whether --enable-progressbar was given.
if test "${enable_progressbar+set}" = set; then :
  enableval=$enable_progressbar; test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    use_progressbar=$enableval
  else
    use_progressbar=no
  fi
else
  enableval=no
  use_progressbar=no

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_progressbar" >&5
$as_echo "$use_progressbar" >&6; }
test $use_progressbar != no && $as_echo "#define USE_PROGRESSBAR 1" >>confdefs.h


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if scrollbar code should be used" >&5
$as_echo_n "checking if scrollbar code should be used... " >&6; }
# Check whether --enable-scrollbar was given.
if test "${enable_scrollbar+set}" = set; then :
  enableval=$enable_scrollbar; test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    use_scrollbar=$enableval
  else
    use_scrollbar=no
  fi
else
  enableval=no
  use_scrollbar=no

fi

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

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sessions code should be used" >&5
$as_echo_n "checking if sessions code should be used... " >&6; }
# Check whether --enable-sessions was given.
if test "${enable_sessions+set}" = set; then :
  enableval=$enable_sessions; test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    use_sessions=$enableval
  else
    use_sessions=no
  fi
else
  enableval=no
  use_sessions=no

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_sessions" >&5
$as_echo "$use_sessions" >&6; }
if test $use_sessions != no ; then
	$as_echo "#define USE_SESSIONS 1" >>confdefs.h

	EXTRA_OBJS="$EXTRA_OBJS LYSession\$o"
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if session-caching code should be used" >&5
$as_echo_n "checking if session-caching code should be used... " >&6; }
# Check whether --enable-session-cache was given.
if test "${enable_session_cache+set}" = set; then :
  enableval=$enable_session_cache; test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    use_session_cache=$enableval
  else
    use_session_cache=no
  fi
else
  enableval=no
  use_session_cache=no

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_session_cache" >&5
$as_echo "$use_session_cache" >&6; }
if test $use_session_cache != no ; then
    $as_echo "#define USE_CACHEJAR 1" >>confdefs.h

fi


Miscellaneous Options:

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if alternative line-edit bindings should be used" >&5
$as_echo_n "checking if alternative line-edit bindings should be used... " >&6; }
# Check whether --enable-alt-bindings was given.
if test "${enable_alt_bindings+set}" = set; then :
  enableval=$enable_alt_bindings; test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    use_alt_bindings=$enableval
  else
    use_alt_bindings=yes
  fi
else
  enableval=no
  use_alt_bindings=yes

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_alt_bindings" >&5
$as_echo "$use_alt_bindings" >&6; }
test $use_alt_bindings != no && $as_echo "#define EXP_ALT_BINDINGS 1" >>confdefs.h


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want to use extended HTML DTD logic" >&5
$as_echo_n "checking if you want to use extended HTML DTD logic... " >&6; }
# Check whether --enable-extended-dtd was given.
if test "${enable_extended_dtd+set}" = set; then :
  enableval=$enable_extended_dtd; test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    use_ext_htmldtd=no
  else
    use_ext_htmldtd=yes
  fi
else
  enableval=yes
  use_ext_htmldtd=yes

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_ext_htmldtd" >&5
$as_echo "$use_ext_htmldtd" >&6; }
test $use_ext_htmldtd = "no" && $as_echo "#define NO_EXTENDED_HTMLDTD 1" >>confdefs.h


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if file-upload logic should be used" >&5
$as_echo_n "checking if file-upload logic should be used... " >&6; }
# Check whether --enable-file-upload was given.
if test "${enable_file_upload+set}" = set; then :
  enableval=$enable_file_upload; test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    use_file_upload=$enableval
  else
    use_file_upload=yes
  fi
else
  enableval=yes
  use_file_upload=yes

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_file_upload" >&5
$as_echo "$use_file_upload" >&6; }
test $use_file_upload != no && $as_echo "#define USE_FILE_UPLOAD 1" >>confdefs.h


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if element-justification logic should be used" >&5
$as_echo_n "checking if element-justification logic should be used... " >&6; }
# Check whether --enable-justify-elts was given.
if test "${enable_justify_elts+set}" = set; then :
  enableval=$enable_justify_elts; test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    use_justify_elts=$enableval
  else
    use_justify_elts=yes
  fi
else
  enableval=yes
  use_justify_elts=yes

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_justify_elts" >&5
$as_echo "$use_justify_elts" >&6; }
test $use_justify_elts != no && $as_echo "#define EXP_JUSTIFY_ELTS 1" >>confdefs.h


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if partial-display should be used" >&5
$as_echo_n "checking if partial-display should be used... " >&6; }
# Check whether --enable-partial was given.
if test "${enable_partial+set}" = set; then :
  enableval=$enable_partial; test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    use_partial_display=$enableval
  else
    use_partial_display=yes
  fi
else
  enableval=yes
  use_partial_display=yes

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_partial_display" >&5
$as_echo "$use_partial_display" >&6; }
test $use_partial_display != no && $as_echo "#define DISP_PARTIAL 1" >>confdefs.h


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if persistent-cookie logic should be used" >&5
$as_echo_n "checking if persistent-cookie logic should be used... " >&6; }
# Check whether --enable-persistent-cookies was given.
if test "${enable_persistent_cookies+set}" = set; then :
  enableval=$enable_persistent_cookies; test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    use_filed_cookies=$enableval
  else
    use_filed_cookies=yes
  fi
else
  enableval=yes
  use_filed_cookies=yes

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_filed_cookies" >&5
$as_echo "$use_filed_cookies" >&6; }
test $use_filed_cookies != no && $as_echo "#define USE_PERSISTENT_COOKIES 1" >>confdefs.h


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if html source should be colorized" >&5
$as_echo_n "checking if html source should be colorized... " >&6; }
# Check whether --enable-prettysrc was given.
if test "${enable_prettysrc+set}" = set; then :
  enableval=$enable_prettysrc; test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    use_prettysrc=$enableval
  else
    use_prettysrc=yes
  fi
else
  enableval=yes
  use_prettysrc=yes

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_prettysrc" >&5
$as_echo "$use_prettysrc" >&6; }
test $use_prettysrc != no && $as_echo "#define USE_PRETTYSRC 1" >>confdefs.h


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if read-progress message should show ETA" >&5
$as_echo_n "checking if read-progress message should show ETA... " >&6; }
# Check whether --enable-read-eta was given.
if test "${enable_read_eta+set}" = set; then :
  enableval=$enable_read_eta; test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    use_read_eta=$enableval
  else
    use_read_eta=yes
  fi
else
  enableval=yes
  use_read_eta=yes

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_read_eta" >&5
$as_echo "$use_read_eta" >&6; }
test $use_read_eta != no && $as_echo "#define USE_READPROGRESS 1" >>confdefs.h


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if source caching should be used" >&5
$as_echo_n "checking if source caching should be used... " >&6; }
# Check whether --enable-source-cache was given.
if test "${enable_source_cache+set}" = set; then :
  enableval=$enable_source_cache; test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    use_source_cache=$enableval
  else
    use_source_cache=yes
  fi
else
  enableval=yes
  use_source_cache=yes

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_source_cache" >&5
$as_echo "$use_source_cache" >&6; }
test $use_source_cache != no && $as_echo "#define USE_SOURCE_CACHE 1" >>confdefs.h


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want to use external commands" >&5
$as_echo_n "checking if you want to use external commands... " >&6; }
# Check whether --enable-externs was given.
if test "${enable_externs+set}" = set; then :
  enableval=$enable_externs; test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    use_externs=yes
  else
    use_externs=no
  fi
else
  enableval=no
  use_externs=no

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_externs" >&5
$as_echo "$use_externs" >&6; }
if test $use_externs != "no" ; then
	$as_echo "#define USE_EXTERNALS 1" >>confdefs.h

	EXTRA_OBJS="$EXTRA_OBJS LYExtern\$o"
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want to use setfont support" >&5
$as_echo_n "checking if you want to use setfont support... " >&6; }
# Check whether --enable-font-switch was given.
if test "${enable_font_switch+set}" = set; then :
  enableval=$enable_font_switch; test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    use_setfont=yes
  else
    use_setfont=no
  fi
else
  enableval=no
  use_setfont=no

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_setfont" >&5
$as_echo "$use_setfont" >&6; }
if test $use_setfont = yes ; then
	case $host_os in
	linux*)


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


  test -n "$SETFONT" && break
done
test -n "$SETFONT" || SETFONT="$SETFONT"


cf_path_prog=""
cf_path_args=""
IFS="${IFS= 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
for cf_temp in $ac_cv_path_SETFONT
do
	if test -z "$cf_path_prog" ; then
		if test "$with_full_paths" = yes ; then

if test "x$prefix" != xNONE; then
  cf_path_syntax="$prefix"
else
  cf_path_syntax="$ac_default_prefix"
fi

case ".$cf_temp" in #(vi
.\$\(*\)*|.\'*\'*) #(vi
  ;;
..|./*|.\\*) #(vi
  ;;
.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
  ;;
.\${*prefix}*) #(vi
  eval cf_temp="$cf_temp"
  case ".$cf_temp" in #(vi
  .NONE/*)
    cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
    ;;
  esac
  ;; #(vi
.no|.NONE/*)
  cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
  ;;
*)
  break
  ;;
esac

			cf_path_prog="$cf_temp"
		else
			cf_path_prog="`basename $cf_temp`"
		fi
	elif test -z "$cf_path_args" ; then
		cf_path_args="$cf_temp"
	else
		cf_path_args="$cf_path_args $cf_temp"
	fi
done
IFS="$cf_save_ifs"

if test -n "$cf_path_prog" ; then

echo "${as_me-configure}:24754: testing defining path for ${cf_path_prog} ..." 1>&5

	cat >>confdefs.h <<_ACEOF
#define SETFONT_PATH "$cf_path_prog"
_ACEOF

	test -n "$cf_path_args" && cat >>confdefs.h <<_ACEOF
#define SETFONT_ARGS "$cf_path_args"
_ACEOF

fi

		;;
	os2*)
		SETFONT=built-in
		test -n "$verbose" && echo "	Assume $host_os has font-switching" 1>&6

echo "${as_me-configure}:24771: testing Assume $host_os has font-switching ..." 1>&5


		;;
	*)
		SETFONT=unknown
		test -n "$verbose" && echo "	Assume $host_os has no font-switching" 1>&6

echo "${as_me-configure}:24779: testing Assume $host_os has no font-switching ..." 1>&5


		;;
	esac
	if test -z "$SETFONT" ; then
		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find a font-setting program" >&5
$as_echo "$as_me: WARNING: Cannot find a font-setting program" >&2;}
	elif test "$SETFONT" != unknown ; then
		$as_echo "#define EXP_CHARTRANS_AUTOSWITCH 1" >>confdefs.h

	fi
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want cgi-link support" >&5
$as_echo_n "checking if you want cgi-link support... " >&6; }
# Check whether --enable-cgi-links was given.
if test "${enable_cgi_links+set}" = set; then :
  enableval=$enable_cgi_links; test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    $as_echo "#define LYNXCGI_LINKS 1" >>confdefs.h

  fi
else
  enableval=no
fi

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

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want change-exec support" >&5
$as_echo_n "checking if you want change-exec support... " >&6; }
# Check whether --enable-change-exec was given.
if test "${enable_change_exec+set}" = set; then :
  enableval=$enable_change_exec; test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    use_change_exec=yes
  else
    use_change_exec=no
  fi
else
  enableval=no
  use_change_exec=no

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_change_exec" >&5
$as_echo "$use_change_exec" >&6; }
test $use_change_exec = yes && $as_echo "#define ENABLE_OPTS_CHANGE_EXEC 1" >>confdefs.h


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want exec-links support" >&5
$as_echo_n "checking if you want exec-links support... " >&6; }
# Check whether --enable-exec-links was given.
if test "${enable_exec_links+set}" = set; then :
  enableval=$enable_exec_links; test "$enableval" != no && enableval=yes
  if test "$enableval" != "$use_change_exec" ; then
    use_exec_links=$enableval
  else
    use_exec_links=$enableval
  fi
else
  enableval=$use_change_exec
  use_exec_links=$enableval

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_exec_links" >&5
$as_echo "$use_exec_links" >&6; }
test $use_exec_links = yes && $as_echo "#define EXEC_LINKS 1" >>confdefs.h


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want exec-scripts support" >&5
$as_echo_n "checking if you want exec-scripts support... " >&6; }
# Check whether --enable-exec-scripts was given.
if test "${enable_exec_scripts+set}" = set; then :
  enableval=$enable_exec_scripts; test "$enableval" != no && enableval=yes
  if test "$enableval" != "$use_change_exec" ; then
    use_exec_scripts=$enableval
  else
    use_exec_scripts=$enableval
  fi
else
  enableval=$use_change_exec
  use_exec_scripts=$enableval

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_exec_scripts" >&5
$as_echo "$use_exec_scripts" >&6; }
test $use_exec_scripts = yes && $as_echo "#define EXEC_SCRIPTS 1" >>confdefs.h


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want internal-links feature" >&5
$as_echo_n "checking if you want internal-links feature... " >&6; }
# Check whether --enable-internal-links was given.
if test "${enable_internal_links+set}" = set; then :
  enableval=$enable_internal_links; test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    use_internal_links=yes
  else
    use_internal_links=no
  fi
else
  enableval=no
  use_internal_links=no

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_internal_links" >&5
$as_echo "$use_internal_links" >&6; }
test $use_internal_links = no && $as_echo "#define DONT_TRACK_INTERNAL_LINKS 1" >>confdefs.h


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want to fork NSL requests" >&5
$as_echo_n "checking if you want to fork NSL requests... " >&6; }
# Check whether --enable-nsl-fork was given.
if test "${enable_nsl_fork+set}" = set; then :
  enableval=$enable_nsl_fork; test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    use_nsl_fork=yes
  else
    use_nsl_fork=no
  fi
else
  enableval=no
  use_nsl_fork=no

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_nsl_fork" >&5
$as_echo "$use_nsl_fork" >&6; }
if test $use_nsl_fork = yes ; then
	case $host_os in
	mingw*)
		$as_echo "#define _WINDOWS_NSL 1" >>confdefs.h

		;;
	*)
		$as_echo "#define NSL_FORK 1" >>confdefs.h

		;;
	esac
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want to log URL requests via syslog" >&5
$as_echo_n "checking if you want to log URL requests via syslog... " >&6; }
# Check whether --enable-syslog was given.
if test "${enable_syslog+set}" = set; then :
  enableval=$enable_syslog; test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    use_syslog=yes
  else
    use_syslog=no
  fi
else
  enableval=no
  use_syslog=no

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_syslog" >&5
$as_echo "$use_syslog" >&6; }
test $use_syslog = yes && $as_echo "#define SYSLOG_REQUESTED_URLS 1" >>confdefs.h


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want to underline links" >&5
$as_echo_n "checking if you want to underline links... " >&6; }
# Check whether --enable-underlines was given.
if test "${enable_underlines+set}" = set; then :
  enableval=$enable_underlines; test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    use_underline=yes
  else
    use_underline=no
  fi
else
  enableval=no
  use_underline=no

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_underline" >&5
$as_echo "$use_underline" >&6; }
test $use_underline = yes && $as_echo "#define UNDERLINE_LINKS 1" >>confdefs.h

test $use_underline = no  && $as_echo "#define UNDERLINE_LINKS 0" >>confdefs.h


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if help files should be gzip'ed" >&5
$as_echo_n "checking if help files should be gzip'ed... " >&6; }
# Check whether --enable-gzip-help was given.
if test "${enable_gzip_help+set}" = set; then :
  enableval=$enable_gzip_help; test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    use_gzip_help=$enableval
  else
    use_gzip_help=no
  fi
else
  enableval=no
  use_gzip_help=no

fi

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

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want to use libbz2 for decompression of some bzip2 files" >&5
$as_echo_n "checking if you want to use libbz2 for decompression of some bzip2 files... " >&6; }

# Check whether --with-bzlib was given.
if test "${with_bzlib+set}" = set; then :
  withval=$with_bzlib; use_bzlib=$withval
else
  use_bzlib=no
fi

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

if test ".$use_bzlib" != ".no" ; then


  case "$use_bzlib" in #(vi
  no) #(vi
      ;;
  yes) #(vi
      ;;
  *)


for cf_searchpath in `echo "$use_bzlib" | tr $PATH_SEPARATOR ' '`; do
	if test -d $cf_searchpath/include; then

if test -n "$cf_searchpath/include" ; then
  for cf_add_incdir in $cf_searchpath/include
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:25062: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi

	elif test -d $cf_searchpath/../include ; then

if test -n "$cf_searchpath/../include" ; then
  for cf_add_incdir in $cf_searchpath/../include
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:25128: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi

	else
as_fn_error $? "cannot find  under $use_bzlib" "$LINENO" 5
	fi
	if test -d $cf_searchpath/lib; then

if test -n "$cf_searchpath/lib" ; then
  for cf_add_libdir in $cf_searchpath/lib
  do
    if test $cf_add_libdir = /usr/lib ; then
      :
    elif test -d $cf_add_libdir
    then
      cf_have_libdir=no
      if test -n "$LDFLAGS$LIBS" ; then
        # a loop is needed to ensure we can add subdirs of existing dirs
        for cf_test_libdir in $LDFLAGS $LIBS ; do
          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
            cf_have_libdir=yes; break
          fi
        done
      fi
      if test "$cf_have_libdir" = no ; then
        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me-configure}:25168: testing adding $cf_add_libdir to library-path ..." 1>&5


        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
      fi
    fi
  done
fi

	elif test -d $cf_searchpath ; then

if test -n "$cf_searchpath" ; then
  for cf_add_libdir in $cf_searchpath
  do
    if test $cf_add_libdir = /usr/lib ; then
      :
    elif test -d $cf_add_libdir
    then
      cf_have_libdir=no
      if test -n "$LDFLAGS$LIBS" ; then
        # a loop is needed to ensure we can add subdirs of existing dirs
        for cf_test_libdir in $LDFLAGS $LIBS ; do
          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
            cf_have_libdir=yes; break
          fi
        done
      fi
      if test "$cf_have_libdir" = no ; then
        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me-configure}:25198: testing adding $cf_add_libdir to library-path ..." 1>&5


        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
      fi
    fi
  done
fi

	else
as_fn_error $? "cannot find  under $use_bzlib" "$LINENO" 5
	fi
done

      ;;
  esac




# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
# will be set on completion of the AC_TRY_LINK below.
cf_cv_header_path_bz2=
cf_cv_library_path_bz2=


echo "${as_me-configure}:25224: testing Starting FIND_LINKAGE(bz2,bzlib) ..." 1>&5


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

#include <stdio.h>
#include <bzlib.h>

int
main ()
{

    BZ2_bzopen("name","mode")

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_find_linkage_bz2=yes
else

    cf_cv_find_linkage_bz2=no

    test -n "$verbose" && echo "	find linkage for bz2 library" 1>&6

echo "${as_me-configure}:25251: testing find linkage for bz2 library ..." 1>&5



echo "${as_me-configure}:25255: testing Searching for headers in FIND_LINKAGE(bz2,bzlib) ..." 1>&5


    cf_save_CPPFLAGS="$CPPFLAGS"
    cf_test_CPPFLAGS="$CPPFLAGS"


cf_header_path_list=""
if test -n "${CFLAGS}${CPPFLAGS}" ; then
	for cf_header_path in $CPPFLAGS $CFLAGS
	do
		case $cf_header_path in #(vi
		-I*)
			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`

test "$cf_header_path" != "NONE" && \
test -d "$cf_header_path" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
	test -d $cf_header_path/include/bzlib &&       cf_search="$cf_search $cf_header_path/include/bzlib"
	test -d $cf_header_path/include/bzlib/include &&    cf_search="$cf_search $cf_header_path/include/bzlib/include"
	test -d $cf_header_path/bzlib/include &&       cf_search="$cf_search $cf_header_path/bzlib/include"
	test -d $cf_header_path/bzlib/include/bzlib &&    cf_search="$cf_search $cf_header_path/bzlib/include/bzlib"
}

			cf_header_path_list="$cf_header_path_list $cf_search"
			;;
		esac
	done
fi

cf_search=""


test "/usr" != "$prefix" && \
test -d "/usr" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /usr"
	test -d /usr/include &&          cf_search="$cf_search /usr/include"
	test -d /usr/include/bzlib &&       cf_search="$cf_search /usr/include/bzlib"
	test -d /usr/include/bzlib/include &&    cf_search="$cf_search /usr/include/bzlib/include"
	test -d /usr/bzlib/include &&       cf_search="$cf_search /usr/bzlib/include"
	test -d /usr/bzlib/include/bzlib &&    cf_search="$cf_search /usr/bzlib/include/bzlib"
}


test "$prefix" != "NONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
	test -d $prefix/include/bzlib &&       cf_search="$cf_search $prefix/include/bzlib"
	test -d $prefix/include/bzlib/include &&    cf_search="$cf_search $prefix/include/bzlib/include"
	test -d $prefix/bzlib/include &&       cf_search="$cf_search $prefix/bzlib/include"
	test -d $prefix/bzlib/include/bzlib &&    cf_search="$cf_search $prefix/bzlib/include/bzlib"
}


test "/usr/local" != "$prefix" && \
test -d "/usr/local" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /usr/local"
	test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
	test -d /usr/local/include/bzlib &&       cf_search="$cf_search /usr/local/include/bzlib"
	test -d /usr/local/include/bzlib/include &&    cf_search="$cf_search /usr/local/include/bzlib/include"
	test -d /usr/local/bzlib/include &&       cf_search="$cf_search /usr/local/bzlib/include"
	test -d /usr/local/bzlib/include/bzlib &&    cf_search="$cf_search /usr/local/bzlib/include/bzlib"
}


test "/opt" != "$prefix" && \
test -d "/opt" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /opt"
	test -d /opt/include &&          cf_search="$cf_search /opt/include"
	test -d /opt/include/bzlib &&       cf_search="$cf_search /opt/include/bzlib"
	test -d /opt/include/bzlib/include &&    cf_search="$cf_search /opt/include/bzlib/include"
	test -d /opt/bzlib/include &&       cf_search="$cf_search /opt/bzlib/include"
	test -d /opt/bzlib/include/bzlib &&    cf_search="$cf_search /opt/bzlib/include/bzlib"
}


test "$HOME" != "$prefix" && \
test -d "$HOME" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under $HOME"
	test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
	test -d $HOME/include/bzlib &&       cf_search="$cf_search $HOME/include/bzlib"
	test -d $HOME/include/bzlib/include &&    cf_search="$cf_search $HOME/include/bzlib/include"
	test -d $HOME/bzlib/include &&       cf_search="$cf_search $HOME/bzlib/include"
	test -d $HOME/bzlib/include/bzlib &&    cf_search="$cf_search $HOME/bzlib/include/bzlib"
}



test "$includedir" != NONE && \
test "$includedir" != "/usr/include" && \
test -d "$includedir" && {
	test -d $includedir &&    cf_search="$cf_search $includedir"
	test -d $includedir/bzlib && cf_search="$cf_search $includedir/bzlib"
}

test "$oldincludedir" != NONE && \
test "$oldincludedir" != "/usr/include" && \
test -d "$oldincludedir" && {
	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
	test -d $oldincludedir/bzlib && cf_search="$cf_search $oldincludedir/bzlib"
}

cf_search="$cf_header_path_list $cf_search"

    for cf_cv_header_path_bz2 in $cf_search
    do
      if test -d $cf_cv_header_path_bz2 ; then
        test -n "$verbose" && echo "	... testing $cf_cv_header_path_bz2" 1>&6

echo "${as_me-configure}:25372: testing ... testing $cf_cv_header_path_bz2 ..." 1>&5


        CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_bz2"
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdio.h>
#include <bzlib.h>

int
main ()
{

    BZ2_bzopen("name","mode")

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

            test -n "$verbose" && echo "	... found bz2 headers in $cf_cv_header_path_bz2" 1>&6

echo "${as_me-configure}:25396: testing ... found bz2 headers in $cf_cv_header_path_bz2 ..." 1>&5


            cf_cv_find_linkage_bz2=maybe
            cf_test_CPPFLAGS="$CPPFLAGS"
            break
else

            CPPFLAGS="$cf_save_CPPFLAGS"

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

    if test "$cf_cv_find_linkage_bz2" = maybe ; then


echo "${as_me-configure}:25414: testing Searching for bz2 library in FIND_LINKAGE(bz2,bzlib) ..." 1>&5


      cf_save_LIBS="$LIBS"
      cf_save_LDFLAGS="$LDFLAGS"


        CPPFLAGS="$cf_test_CPPFLAGS"
        LIBS="-lbz2  $cf_save_LIBS"
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdio.h>
#include <bzlib.h>

int
main ()
{

    BZ2_bzopen("name","mode")

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

            test -n "$verbose" && echo "	... found bz2 library in system" 1>&6

echo "${as_me-configure}:25443: testing ... found bz2 library in system ..." 1>&5


            cf_cv_find_linkage_bz2=yes
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
            CPPFLAGS="$cf_save_CPPFLAGS"
            LIBS="$cf_save_LIBS"


      if test "$cf_cv_find_linkage_bz2" != yes ; then

cf_library_path_list=""
if test -n "${LDFLAGS}${LIBS}" ; then
	for cf_library_path in $LDFLAGS $LIBS
	do
		case $cf_library_path in #(vi
		-L*)
			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`

test "$cf_library_path" != "NONE" && \
test -d "$cf_library_path" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
	test -d $cf_library_path/lib/bz2 &&       cf_search="$cf_search $cf_library_path/lib/bz2"
	test -d $cf_library_path/lib/bz2/lib &&    cf_search="$cf_search $cf_library_path/lib/bz2/lib"
	test -d $cf_library_path/bz2/lib &&       cf_search="$cf_search $cf_library_path/bz2/lib"
	test -d $cf_library_path/bz2/lib/bz2 &&    cf_search="$cf_search $cf_library_path/bz2/lib/bz2"
}

			cf_library_path_list="$cf_library_path_list $cf_search"
			;;
		esac
	done
fi

cf_search=""


test "/usr" != "$prefix" && \
test -d "/usr" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /usr"
	test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
	test -d /usr/lib/bz2 &&       cf_search="$cf_search /usr/lib/bz2"
	test -d /usr/lib/bz2/lib &&    cf_search="$cf_search /usr/lib/bz2/lib"
	test -d /usr/bz2/lib &&       cf_search="$cf_search /usr/bz2/lib"
	test -d /usr/bz2/lib/bz2 &&    cf_search="$cf_search /usr/bz2/lib/bz2"
}


test "$prefix" != "NONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
	test -d $prefix/lib/bz2 &&       cf_search="$cf_search $prefix/lib/bz2"
	test -d $prefix/lib/bz2/lib &&    cf_search="$cf_search $prefix/lib/bz2/lib"
	test -d $prefix/bz2/lib &&       cf_search="$cf_search $prefix/bz2/lib"
	test -d $prefix/bz2/lib/bz2 &&    cf_search="$cf_search $prefix/bz2/lib/bz2"
}


test "/usr/local" != "$prefix" && \
test -d "/usr/local" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /usr/local"
	test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
	test -d /usr/local/lib/bz2 &&       cf_search="$cf_search /usr/local/lib/bz2"
	test -d /usr/local/lib/bz2/lib &&    cf_search="$cf_search /usr/local/lib/bz2/lib"
	test -d /usr/local/bz2/lib &&       cf_search="$cf_search /usr/local/bz2/lib"
	test -d /usr/local/bz2/lib/bz2 &&    cf_search="$cf_search /usr/local/bz2/lib/bz2"
}


test "/opt" != "$prefix" && \
test -d "/opt" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /opt"
	test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
	test -d /opt/lib/bz2 &&       cf_search="$cf_search /opt/lib/bz2"
	test -d /opt/lib/bz2/lib &&    cf_search="$cf_search /opt/lib/bz2/lib"
	test -d /opt/bz2/lib &&       cf_search="$cf_search /opt/bz2/lib"
	test -d /opt/bz2/lib/bz2 &&    cf_search="$cf_search /opt/bz2/lib/bz2"
}


test "$HOME" != "$prefix" && \
test -d "$HOME" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under $HOME"
	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
	test -d $HOME/lib/bz2 &&       cf_search="$cf_search $HOME/lib/bz2"
	test -d $HOME/lib/bz2/lib &&    cf_search="$cf_search $HOME/lib/bz2/lib"
	test -d $HOME/bz2/lib &&       cf_search="$cf_search $HOME/bz2/lib"
	test -d $HOME/bz2/lib/bz2 &&    cf_search="$cf_search $HOME/bz2/lib/bz2"
}



cf_search="$cf_library_path_list $cf_search"

        for cf_cv_library_path_bz2 in $cf_search
        do
          if test -d $cf_cv_library_path_bz2 ; then
            test -n "$verbose" && echo "	... testing $cf_cv_library_path_bz2" 1>&6

echo "${as_me-configure}:25552: testing ... testing $cf_cv_library_path_bz2 ..." 1>&5


            CPPFLAGS="$cf_test_CPPFLAGS"
            LIBS="-lbz2  $cf_save_LIBS"
            LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_bz2"
            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdio.h>
#include <bzlib.h>

int
main ()
{

    BZ2_bzopen("name","mode")

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

                test -n "$verbose" && echo "	... found bz2 library in $cf_cv_library_path_bz2" 1>&6

echo "${as_me-configure}:25578: testing ... found bz2 library in $cf_cv_library_path_bz2 ..." 1>&5


                cf_cv_find_linkage_bz2=yes
                cf_cv_library_file_bz2="-lbz2"
                break
else

                CPPFLAGS="$cf_save_CPPFLAGS"
                LIBS="$cf_save_LIBS"
                LDFLAGS="$cf_save_LDFLAGS"

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
          fi
        done
        LIBS="$cf_save_LIBS"
        CPPFLAGS="$cf_save_CPPFLAGS"
        LDFLAGS="$cf_save_LDFLAGS"
      fi

    else
      cf_cv_find_linkage_bz2=no
    fi

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

if test "$cf_cv_find_linkage_bz2" = yes ; then


if test -n "$cf_cv_header_path_bz2" ; then
  for cf_add_incdir in $cf_cv_header_path_bz2
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:25659: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi


if test -n "$cf_cv_library_path_bz2" ; then
  for cf_add_libdir in $cf_cv_library_path_bz2
  do
    if test $cf_add_libdir = /usr/lib ; then
      :
    elif test -d $cf_add_libdir
    then
      cf_have_libdir=no
      if test -n "$LDFLAGS$LIBS" ; then
        # a loop is needed to ensure we can add subdirs of existing dirs
        for cf_test_libdir in $LDFLAGS $LIBS ; do
          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
            cf_have_libdir=yes; break
          fi
        done
      fi
      if test "$cf_have_libdir" = no ; then
        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me-configure}:25695: testing adding $cf_add_libdir to library-path ..." 1>&5


        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
      fi
    fi
  done
fi

  LIBS="-lbz2 $LIBS"

else
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find bz2 library" >&5
$as_echo "$as_me: WARNING: Cannot find bz2 library" >&2;}
fi


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

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want to use zlib for decompression of some gzip files" >&5
$as_echo_n "checking if you want to use zlib for decompression of some gzip files... " >&6; }

# Check whether --with-zlib was given.
if test "${with_zlib+set}" = set; then :
  withval=$with_zlib; use_zlib=$withval
else
  use_zlib=no
fi

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

if test ".$use_zlib" != ".no" ; then


  case "$use_zlib" in #(vi
  no) #(vi
      ;;
  yes) #(vi
      ;;
  *)


for cf_searchpath in `echo "$use_zlib" | tr $PATH_SEPARATOR ' '`; do
	if test -d $cf_searchpath/include; then

if test -n "$cf_searchpath/include" ; then
  for cf_add_incdir in $cf_searchpath/include
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:25791: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi

	elif test -d $cf_searchpath/../include ; then

if test -n "$cf_searchpath/../include" ; then
  for cf_add_incdir in $cf_searchpath/../include
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:25857: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi

	else
as_fn_error $? "cannot find  under $use_zlib" "$LINENO" 5
	fi
	if test -d $cf_searchpath/lib; then

if test -n "$cf_searchpath/lib" ; then
  for cf_add_libdir in $cf_searchpath/lib
  do
    if test $cf_add_libdir = /usr/lib ; then
      :
    elif test -d $cf_add_libdir
    then
      cf_have_libdir=no
      if test -n "$LDFLAGS$LIBS" ; then
        # a loop is needed to ensure we can add subdirs of existing dirs
        for cf_test_libdir in $LDFLAGS $LIBS ; do
          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
            cf_have_libdir=yes; break
          fi
        done
      fi
      if test "$cf_have_libdir" = no ; then
        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me-configure}:25897: testing adding $cf_add_libdir to library-path ..." 1>&5


        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
      fi
    fi
  done
fi

	elif test -d $cf_searchpath ; then

if test -n "$cf_searchpath" ; then
  for cf_add_libdir in $cf_searchpath
  do
    if test $cf_add_libdir = /usr/lib ; then
      :
    elif test -d $cf_add_libdir
    then
      cf_have_libdir=no
      if test -n "$LDFLAGS$LIBS" ; then
        # a loop is needed to ensure we can add subdirs of existing dirs
        for cf_test_libdir in $LDFLAGS $LIBS ; do
          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
            cf_have_libdir=yes; break
          fi
        done
      fi
      if test "$cf_have_libdir" = no ; then
        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me-configure}:25927: testing adding $cf_add_libdir to library-path ..." 1>&5


        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
      fi
    fi
  done
fi

	else
as_fn_error $? "cannot find  under $use_zlib" "$LINENO" 5
	fi
done

      ;;
  esac




# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
# will be set on completion of the AC_TRY_LINK below.
cf_cv_header_path_z=
cf_cv_library_path_z=


echo "${as_me-configure}:25953: testing Starting FIND_LINKAGE(z,zlib) ..." 1>&5


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

#include <zlib.h>

int
main ()
{

	gzopen("name","mode")

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_find_linkage_z=yes
else

    cf_cv_find_linkage_z=no

    test -n "$verbose" && echo "	find linkage for z library" 1>&6

echo "${as_me-configure}:25979: testing find linkage for z library ..." 1>&5



echo "${as_me-configure}:25983: testing Searching for headers in FIND_LINKAGE(z,zlib) ..." 1>&5


    cf_save_CPPFLAGS="$CPPFLAGS"
    cf_test_CPPFLAGS="$CPPFLAGS"


cf_header_path_list=""
if test -n "${CFLAGS}${CPPFLAGS}" ; then
	for cf_header_path in $CPPFLAGS $CFLAGS
	do
		case $cf_header_path in #(vi
		-I*)
			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`

test "$cf_header_path" != "NONE" && \
test -d "$cf_header_path" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
	test -d $cf_header_path/include/zlib &&       cf_search="$cf_search $cf_header_path/include/zlib"
	test -d $cf_header_path/include/zlib/include &&    cf_search="$cf_search $cf_header_path/include/zlib/include"
	test -d $cf_header_path/zlib/include &&       cf_search="$cf_search $cf_header_path/zlib/include"
	test -d $cf_header_path/zlib/include/zlib &&    cf_search="$cf_search $cf_header_path/zlib/include/zlib"
}

			cf_header_path_list="$cf_header_path_list $cf_search"
			;;
		esac
	done
fi

cf_search=""


test "/usr" != "$prefix" && \
test -d "/usr" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /usr"
	test -d /usr/include &&          cf_search="$cf_search /usr/include"
	test -d /usr/include/zlib &&       cf_search="$cf_search /usr/include/zlib"
	test -d /usr/include/zlib/include &&    cf_search="$cf_search /usr/include/zlib/include"
	test -d /usr/zlib/include &&       cf_search="$cf_search /usr/zlib/include"
	test -d /usr/zlib/include/zlib &&    cf_search="$cf_search /usr/zlib/include/zlib"
}


test "$prefix" != "NONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
	test -d $prefix/include/zlib &&       cf_search="$cf_search $prefix/include/zlib"
	test -d $prefix/include/zlib/include &&    cf_search="$cf_search $prefix/include/zlib/include"
	test -d $prefix/zlib/include &&       cf_search="$cf_search $prefix/zlib/include"
	test -d $prefix/zlib/include/zlib &&    cf_search="$cf_search $prefix/zlib/include/zlib"
}


test "/usr/local" != "$prefix" && \
test -d "/usr/local" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /usr/local"
	test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
	test -d /usr/local/include/zlib &&       cf_search="$cf_search /usr/local/include/zlib"
	test -d /usr/local/include/zlib/include &&    cf_search="$cf_search /usr/local/include/zlib/include"
	test -d /usr/local/zlib/include &&       cf_search="$cf_search /usr/local/zlib/include"
	test -d /usr/local/zlib/include/zlib &&    cf_search="$cf_search /usr/local/zlib/include/zlib"
}


test "/opt" != "$prefix" && \
test -d "/opt" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under /opt"
	test -d /opt/include &&          cf_search="$cf_search /opt/include"
	test -d /opt/include/zlib &&       cf_search="$cf_search /opt/include/zlib"
	test -d /opt/include/zlib/include &&    cf_search="$cf_search /opt/include/zlib/include"
	test -d /opt/zlib/include &&       cf_search="$cf_search /opt/zlib/include"
	test -d /opt/zlib/include/zlib &&    cf_search="$cf_search /opt/zlib/include/zlib"
}


test "$HOME" != "$prefix" && \
test -d "$HOME" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for include-directories under $HOME"
	test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
	test -d $HOME/include/zlib &&       cf_search="$cf_search $HOME/include/zlib"
	test -d $HOME/include/zlib/include &&    cf_search="$cf_search $HOME/include/zlib/include"
	test -d $HOME/zlib/include &&       cf_search="$cf_search $HOME/zlib/include"
	test -d $HOME/zlib/include/zlib &&    cf_search="$cf_search $HOME/zlib/include/zlib"
}



test "$includedir" != NONE && \
test "$includedir" != "/usr/include" && \
test -d "$includedir" && {
	test -d $includedir &&    cf_search="$cf_search $includedir"
	test -d $includedir/zlib && cf_search="$cf_search $includedir/zlib"
}

test "$oldincludedir" != NONE && \
test "$oldincludedir" != "/usr/include" && \
test -d "$oldincludedir" && {
	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
	test -d $oldincludedir/zlib && cf_search="$cf_search $oldincludedir/zlib"
}

cf_search="$cf_header_path_list $cf_search"

    for cf_cv_header_path_z in $cf_search
    do
      if test -d $cf_cv_header_path_z ; then
        test -n "$verbose" && echo "	... testing $cf_cv_header_path_z" 1>&6

echo "${as_me-configure}:26100: testing ... testing $cf_cv_header_path_z ..." 1>&5


        CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_z"
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <zlib.h>

int
main ()
{

	gzopen("name","mode")

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

            test -n "$verbose" && echo "	... found z headers in $cf_cv_header_path_z" 1>&6

echo "${as_me-configure}:26123: testing ... found z headers in $cf_cv_header_path_z ..." 1>&5


            cf_cv_find_linkage_z=maybe
            cf_test_CPPFLAGS="$CPPFLAGS"
            break
else

            CPPFLAGS="$cf_save_CPPFLAGS"

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

    if test "$cf_cv_find_linkage_z" = maybe ; then


echo "${as_me-configure}:26141: testing Searching for z library in FIND_LINKAGE(z,zlib) ..." 1>&5


      cf_save_LIBS="$LIBS"
      cf_save_LDFLAGS="$LDFLAGS"


        CPPFLAGS="$cf_test_CPPFLAGS"
        LIBS="-lz  $cf_save_LIBS"
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <zlib.h>

int
main ()
{

	gzopen("name","mode")

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

            test -n "$verbose" && echo "	... found z library in system" 1>&6

echo "${as_me-configure}:26169: testing ... found z library in system ..." 1>&5


            cf_cv_find_linkage_z=yes
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
            CPPFLAGS="$cf_save_CPPFLAGS"
            LIBS="$cf_save_LIBS"


      if test "$cf_cv_find_linkage_z" != yes ; then

cf_library_path_list=""
if test -n "${LDFLAGS}${LIBS}" ; then
	for cf_library_path in $LDFLAGS $LIBS
	do
		case $cf_library_path in #(vi
		-L*)
			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`

test "$cf_library_path" != "NONE" && \
test -d "$cf_library_path" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
	test -d $cf_library_path/lib/z &&       cf_search="$cf_search $cf_library_path/lib/z"
	test -d $cf_library_path/lib/z/lib &&    cf_search="$cf_search $cf_library_path/lib/z/lib"
	test -d $cf_library_path/z/lib &&       cf_search="$cf_search $cf_library_path/z/lib"
	test -d $cf_library_path/z/lib/z &&    cf_search="$cf_search $cf_library_path/z/lib/z"
}

			cf_library_path_list="$cf_library_path_list $cf_search"
			;;
		esac
	done
fi

cf_search=""


test "/usr" != "$prefix" && \
test -d "/usr" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /usr"
	test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
	test -d /usr/lib/z &&       cf_search="$cf_search /usr/lib/z"
	test -d /usr/lib/z/lib &&    cf_search="$cf_search /usr/lib/z/lib"
	test -d /usr/z/lib &&       cf_search="$cf_search /usr/z/lib"
	test -d /usr/z/lib/z &&    cf_search="$cf_search /usr/z/lib/z"
}


test "$prefix" != "NONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
	test -d $prefix/lib/z &&       cf_search="$cf_search $prefix/lib/z"
	test -d $prefix/lib/z/lib &&    cf_search="$cf_search $prefix/lib/z/lib"
	test -d $prefix/z/lib &&       cf_search="$cf_search $prefix/z/lib"
	test -d $prefix/z/lib/z &&    cf_search="$cf_search $prefix/z/lib/z"
}


test "/usr/local" != "$prefix" && \
test -d "/usr/local" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /usr/local"
	test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
	test -d /usr/local/lib/z &&       cf_search="$cf_search /usr/local/lib/z"
	test -d /usr/local/lib/z/lib &&    cf_search="$cf_search /usr/local/lib/z/lib"
	test -d /usr/local/z/lib &&       cf_search="$cf_search /usr/local/z/lib"
	test -d /usr/local/z/lib/z &&    cf_search="$cf_search /usr/local/z/lib/z"
}


test "/opt" != "$prefix" && \
test -d "/opt" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under /opt"
	test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
	test -d /opt/lib/z &&       cf_search="$cf_search /opt/lib/z"
	test -d /opt/lib/z/lib &&    cf_search="$cf_search /opt/lib/z/lib"
	test -d /opt/z/lib &&       cf_search="$cf_search /opt/z/lib"
	test -d /opt/z/lib/z &&    cf_search="$cf_search /opt/z/lib/z"
}


test "$HOME" != "$prefix" && \
test -d "$HOME" && \
(test $prefix = NONE || test -d $prefix) && {
	test -n "$verbose" && echo "	... testing for lib-directories under $HOME"
	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
	test -d $HOME/lib/z &&       cf_search="$cf_search $HOME/lib/z"
	test -d $HOME/lib/z/lib &&    cf_search="$cf_search $HOME/lib/z/lib"
	test -d $HOME/z/lib &&       cf_search="$cf_search $HOME/z/lib"
	test -d $HOME/z/lib/z &&    cf_search="$cf_search $HOME/z/lib/z"
}



cf_search="$cf_library_path_list $cf_search"

        for cf_cv_library_path_z in $cf_search
        do
          if test -d $cf_cv_library_path_z ; then
            test -n "$verbose" && echo "	... testing $cf_cv_library_path_z" 1>&6

echo "${as_me-configure}:26278: testing ... testing $cf_cv_library_path_z ..." 1>&5


            CPPFLAGS="$cf_test_CPPFLAGS"
            LIBS="-lz  $cf_save_LIBS"
            LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_z"
            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <zlib.h>

int
main ()
{

	gzopen("name","mode")

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

                test -n "$verbose" && echo "	... found z library in $cf_cv_library_path_z" 1>&6

echo "${as_me-configure}:26303: testing ... found z library in $cf_cv_library_path_z ..." 1>&5


                cf_cv_find_linkage_z=yes
                cf_cv_library_file_z="-lz"
                break
else

                CPPFLAGS="$cf_save_CPPFLAGS"
                LIBS="$cf_save_LIBS"
                LDFLAGS="$cf_save_LDFLAGS"

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
          fi
        done
        LIBS="$cf_save_LIBS"
        CPPFLAGS="$cf_save_CPPFLAGS"
        LDFLAGS="$cf_save_LDFLAGS"
      fi

    else
      cf_cv_find_linkage_z=no
    fi

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

if test "$cf_cv_find_linkage_z" = yes ; then


if test -n "$cf_cv_header_path_z" ; then
  for cf_add_incdir in $cf_cv_header_path_z
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS
			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
			  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  cf_have_incdir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me-configure}:26384: testing adding $cf_add_incdir to include-path ..." 1>&5


		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  fi
	done
  done
fi


if test -n "$cf_cv_library_path_z" ; then
  for cf_add_libdir in $cf_cv_library_path_z
  do
    if test $cf_add_libdir = /usr/lib ; then
      :
    elif test -d $cf_add_libdir
    then
      cf_have_libdir=no
      if test -n "$LDFLAGS$LIBS" ; then
        # a loop is needed to ensure we can add subdirs of existing dirs
        for cf_test_libdir in $LDFLAGS $LIBS ; do
          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
            cf_have_libdir=yes; break
          fi
        done
      fi
      if test "$cf_have_libdir" = no ; then
        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me-configure}:26420: testing adding $cf_add_libdir to library-path ..." 1>&5


        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
      fi
    fi
  done
fi

  LIBS="-lz $LIBS"

else
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find z library" >&5
$as_echo "$as_me: WARNING: Cannot find z library" >&2;}
fi


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

fi

Other Network Services:

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want to exclude FINGER code" >&5
$as_echo_n "checking if you want to exclude FINGER code... " >&6; }
# Check whether --enable-finger was given.
if test "${enable_finger+set}" = set; then :
  enableval=$enable_finger; test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    use_finger=yes
  else
    use_finger=no
  fi
else
  enableval=yes
  use_finger=no

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_finger" >&5
$as_echo "$use_finger" >&6; }
test $use_finger != "no" && $as_echo "#define DISABLE_FINGER 1" >>confdefs.h


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want to exclude GOPHER code" >&5
$as_echo_n "checking if you want to exclude GOPHER code... " >&6; }
# Check whether --enable-gopher was given.
if test "${enable_gopher+set}" = set; then :
  enableval=$enable_gopher; test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    use_gopher=yes
  else
    use_gopher=no
  fi
else
  enableval=yes
  use_gopher=no

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_gopher" >&5
$as_echo "$use_gopher" >&6; }
test $use_gopher != "no" && $as_echo "#define DISABLE_GOPHER 1" >>confdefs.h


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want to exclude NEWS code" >&5
$as_echo_n "checking if you want to exclude NEWS code... " >&6; }
# Check whether --enable-news was given.
if test "${enable_news+set}" = set; then :
  enableval=$enable_news; test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    use_news=yes
  else
    use_news=no
  fi
else
  enableval=yes
  use_news=no

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_news" >&5
$as_echo "$use_news" >&6; }
test $use_news != "no" && $as_echo "#define DISABLE_NEWS 1" >>confdefs.h


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want to exclude FTP code" >&5
$as_echo_n "checking if you want to exclude FTP code... " >&6; }
# Check whether --enable-ftp was given.
if test "${enable_ftp+set}" = set; then :
  enableval=$enable_ftp; test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    use_ftp=yes
  else
    use_ftp=no
  fi
else
  enableval=yes
  use_ftp=no

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_ftp" >&5
$as_echo "$use_ftp" >&6; }
test $use_ftp != "no" && $as_echo "#define DISABLE_FTP 1" >>confdefs.h



Directory Editor Options:

# All DirEd functions that were enabled on compilation can be disabled
# or modified at run time via DIRED_MENU symbols in lynx.cfg.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if directory-editor code should be used" >&5
$as_echo_n "checking if directory-editor code should be used... " >&6; }
# Check whether --enable-dired was given.
if test "${enable_dired+set}" = set; then :
  enableval=$enable_dired; test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    use_dired=$enableval
  else
    use_dired=yes
  fi
else
  enableval=yes
  use_dired=yes

fi

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

if test ".$use_dired" != ".no" ; then
	EXTRA_OBJS="$EXTRA_OBJS LYLocal\$o"
	$as_echo "#define DIRED_SUPPORT 1" >>confdefs.h


	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you wish to allow extracting from archives via DirEd" >&5
$as_echo_n "checking if you wish to allow extracting from archives via DirEd... " >&6; }
	# Check whether --enable-dired-dearchive was given.
if test "${enable_dired_dearchive+set}" = set; then :
  enableval=$enable_dired_dearchive; test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    $as_echo "#define ARCHIVE_ONLY 1" >>confdefs.h

  fi
else
  enableval=yes
fi

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

	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if DirEd mode should override keys" >&5
$as_echo_n "checking if DirEd mode should override keys... " >&6; }
	# Check whether --enable-dired-override was given.
if test "${enable_dired_override+set}" = set; then :
  enableval=$enable_dired_override; test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    :
  else
    $as_echo "#define OK_OVERRIDE 1" >>confdefs.h

  fi
else
  enableval=yes
  $as_echo "#define OK_OVERRIDE 1" >>confdefs.h


fi

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

	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you wish to allow permissions commands via DirEd" >&5
$as_echo_n "checking if you wish to allow permissions commands via DirEd... " >&6; }
	# Check whether --enable-dired-permit was given.
if test "${enable_dired_permit+set}" = set; then :
  enableval=$enable_dired_permit; test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    :
  else
    $as_echo "#define OK_PERMIT 1" >>confdefs.h

  fi
else
  enableval=yes
  $as_echo "#define OK_PERMIT 1" >>confdefs.h


fi

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

	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you wish to allow executable-permission commands via DirEd" >&5
$as_echo_n "checking if you wish to allow executable-permission commands via DirEd... " >&6; }
	# Check whether --enable-dired-xpermit was given.
if test "${enable_dired_xpermit+set}" = set; then :
  enableval=$enable_dired_xpermit; test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    $as_echo "#define NO_CHANGE_EXECUTE_PERMS 1" >>confdefs.h

  fi
else
  enableval=yes
fi

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

	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you wish to allow \"tar\" commands from DirEd" >&5
$as_echo_n "checking if you wish to allow \"tar\" commands from DirEd... " >&6; }
	# Check whether --enable-dired-tar was given.
if test "${enable_dired_tar+set}" = set; then :
  enableval=$enable_dired_tar; test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    :
  else
    $as_echo "#define OK_TAR 1" >>confdefs.h

  fi
else
  enableval=yes
  $as_echo "#define OK_TAR 1" >>confdefs.h


fi

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

	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you wish to allow \"uudecode\" commands from DirEd" >&5
$as_echo_n "checking if you wish to allow \"uudecode\" commands from DirEd... " >&6; }
	# Check whether --enable-dired-uudecode was given.
if test "${enable_dired_uudecode+set}" = set; then :
  enableval=$enable_dired_uudecode; test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    :
  else
    $as_echo "#define OK_UUDECODE 1" >>confdefs.h

  fi
else
  enableval=yes
  $as_echo "#define OK_UUDECODE 1" >>confdefs.h


fi

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

	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you wish to allow \"zip\" and \"unzip\" commands from DirEd" >&5
$as_echo_n "checking if you wish to allow \"zip\" and \"unzip\" commands from DirEd... " >&6; }
	# Check whether --enable-dired-zip was given.
if test "${enable_dired_zip+set}" = set; then :
  enableval=$enable_dired_zip; test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    :
  else
    $as_echo "#define OK_ZIP 1" >>confdefs.h

  fi
else
  enableval=yes
  $as_echo "#define OK_ZIP 1" >>confdefs.h


fi

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

	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you wish to allow \"gzip\" and \"gunzip\" commands from DirEd" >&5
$as_echo_n "checking if you wish to allow \"gzip\" and \"gunzip\" commands from DirEd... " >&6; }
	# Check whether --enable-dired-gzip was given.
if test "${enable_dired_gzip+set}" = set; then :
  enableval=$enable_dired_gzip; test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    :
  else
    $as_echo "#define OK_GZIP 1" >>confdefs.h

  fi
else
  enableval=yes
  $as_echo "#define OK_GZIP 1" >>confdefs.h


fi

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

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want long-directory listings" >&5
$as_echo_n "checking if you want long-directory listings... " >&6; }
# Check whether --enable-long-list was given.
if test "${enable_long_list+set}" = set; then :
  enableval=$enable_long_list; test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    :
  else
    $as_echo "#define LONG_LIST 1" >>confdefs.h

  fi
else
  enableval=yes
  $as_echo "#define LONG_LIST 1" >>confdefs.h


fi

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

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if parent-directory references are permitted" >&5
$as_echo_n "checking if parent-directory references are permitted... " >&6; }
# Check whether --enable-parent-dir-refs was given.
if test "${enable_parent_dir_refs+set}" = set; then :
  enableval=$enable_parent_dir_refs; test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    $as_echo "#define NO_PARENT_DIR_REFERENCE 1" >>confdefs.h

  fi
else
  enableval=yes
fi

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



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


  test -n "$TELNET" && break
done
test -n "$TELNET" || TELNET="$TELNET"


cf_path_prog=""
cf_path_args=""
IFS="${IFS= 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
for cf_temp in $ac_cv_path_TELNET
do
	if test -z "$cf_path_prog" ; then
		if test "$with_full_paths" = yes ; then

if test "x$prefix" != xNONE; then
  cf_path_syntax="$prefix"
else
  cf_path_syntax="$ac_default_prefix"
fi

case ".$cf_temp" in #(vi
.\$\(*\)*|.\'*\'*) #(vi
  ;;
..|./*|.\\*) #(vi
  ;;
.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
  ;;
.\${*prefix}*) #(vi
  eval cf_temp="$cf_temp"
  case ".$cf_temp" in #(vi
  .NONE/*)
    cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
    ;;
  esac
  ;; #(vi
.no|.NONE/*)
  cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
  ;;
*)
  break
  ;;
esac

			cf_path_prog="$cf_temp"
		else
			cf_path_prog="`basename $cf_temp`"
		fi
	elif test -z "$cf_path_args" ; then
		cf_path_args="$cf_temp"
	else
		cf_path_args="$cf_path_args $cf_temp"
	fi
done
IFS="$cf_save_ifs"

if test -n "$cf_path_prog" ; then

echo "${as_me-configure}:26853: testing defining path for ${cf_path_prog} ..." 1>&5

	cat >>confdefs.h <<_ACEOF
#define TELNET_PATH "$cf_path_prog"
_ACEOF

	test -n "$cf_path_args" && cat >>confdefs.h <<_ACEOF
#define TELNET_ARGS "$cf_path_args"
_ACEOF

fi



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


  test -n "$TN3270" && break
done
test -n "$TN3270" || TN3270="$TN3270"


cf_path_prog=""
cf_path_args=""
IFS="${IFS= 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
for cf_temp in $ac_cv_path_TN3270
do
	if test -z "$cf_path_prog" ; then
		if test "$with_full_paths" = yes ; then

if test "x$prefix" != xNONE; then
  cf_path_syntax="$prefix"
else
  cf_path_syntax="$ac_default_prefix"
fi

case ".$cf_temp" in #(vi
.\$\(*\)*|.\'*\'*) #(vi
  ;;
..|./*|.\\*) #(vi
  ;;
.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
  ;;
.\${*prefix}*) #(vi
  eval cf_temp="$cf_temp"
  case ".$cf_temp" in #(vi
  .NONE/*)
    cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
    ;;
  esac
  ;; #(vi
.no|.NONE/*)
  cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
  ;;
*)
  break
  ;;
esac

			cf_path_prog="$cf_temp"
		else
			cf_path_prog="`basename $cf_temp`"
		fi
	elif test -z "$cf_path_args" ; then
		cf_path_args="$cf_temp"
	else
		cf_path_args="$cf_path_args $cf_temp"
	fi
done
IFS="$cf_save_ifs"

if test -n "$cf_path_prog" ; then

echo "${as_me-configure}:26966: testing defining path for ${cf_path_prog} ..." 1>&5

	cat >>confdefs.h <<_ACEOF
#define TN3270_PATH "$cf_path_prog"
_ACEOF

	test -n "$cf_path_args" && cat >>confdefs.h <<_ACEOF
#define TN3270_ARGS "$cf_path_args"
_ACEOF

fi



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


  test -n "$RLOGIN" && break
done
test -n "$RLOGIN" || RLOGIN="$RLOGIN"


cf_path_prog=""
cf_path_args=""
IFS="${IFS= 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
for cf_temp in $ac_cv_path_RLOGIN
do
	if test -z "$cf_path_prog" ; then
		if test "$with_full_paths" = yes ; then

if test "x$prefix" != xNONE; then
  cf_path_syntax="$prefix"
else
  cf_path_syntax="$ac_default_prefix"
fi

case ".$cf_temp" in #(vi
.\$\(*\)*|.\'*\'*) #(vi
  ;;
..|./*|.\\*) #(vi
  ;;
.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
  ;;
.\${*prefix}*) #(vi
  eval cf_temp="$cf_temp"
  case ".$cf_temp" in #(vi
  .NONE/*)
    cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
    ;;
  esac
  ;; #(vi
.no|.NONE/*)
  cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
  ;;
*)
  break
  ;;
esac

			cf_path_prog="$cf_temp"
		else
			cf_path_prog="`basename $cf_temp`"
		fi
	elif test -z "$cf_path_args" ; then
		cf_path_args="$cf_temp"
	else
		cf_path_args="$cf_path_args $cf_temp"
	fi
done
IFS="$cf_save_ifs"

if test -n "$cf_path_prog" ; then

echo "${as_me-configure}:27079: testing defining path for ${cf_path_prog} ..." 1>&5

	cat >>confdefs.h <<_ACEOF
#define RLOGIN_PATH "$cf_path_prog"
_ACEOF

	test -n "$cf_path_args" && cat >>confdefs.h <<_ACEOF
#define RLOGIN_ARGS "$cf_path_args"
_ACEOF

fi




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


  test -n "$MV" && break
done
test -n "$MV" || MV="$MV"


cf_path_prog=""
cf_path_args=""
IFS="${IFS= 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
for cf_temp in $ac_cv_path_MV
do
	if test -z "$cf_path_prog" ; then
		if test "$with_full_paths" = yes ; then

if test "x$prefix" != xNONE; then
  cf_path_syntax="$prefix"
else
  cf_path_syntax="$ac_default_prefix"
fi

case ".$cf_temp" in #(vi
.\$\(*\)*|.\'*\'*) #(vi
  ;;
..|./*|.\\*) #(vi
  ;;
.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
  ;;
.\${*prefix}*) #(vi
  eval cf_temp="$cf_temp"
  case ".$cf_temp" in #(vi
  .NONE/*)
    cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
    ;;
  esac
  ;; #(vi
.no|.NONE/*)
  cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
  ;;
*)
  break
  ;;
esac

			cf_path_prog="$cf_temp"
		else
			cf_path_prog="`basename $cf_temp`"
		fi
	elif test -z "$cf_path_args" ; then
		cf_path_args="$cf_temp"
	else
		cf_path_args="$cf_path_args $cf_temp"
	fi
done
IFS="$cf_save_ifs"

if test -n "$cf_path_prog" ; then

echo "${as_me-configure}:27193: testing defining path for ${cf_path_prog} ..." 1>&5

	cat >>confdefs.h <<_ACEOF
#define MV_PATH "$cf_path_prog"
_ACEOF

	test -n "$cf_path_args" && cat >>confdefs.h <<_ACEOF
#define MV_ARGS "$cf_path_args"
_ACEOF

fi




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


  test -n "$GZIP" && break
done
test -n "$GZIP" || GZIP="$GZIP"


cf_path_prog=""
cf_path_args=""
IFS="${IFS= 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
for cf_temp in $ac_cv_path_GZIP
do
	if test -z "$cf_path_prog" ; then
		if test "$with_full_paths" = yes ; then

if test "x$prefix" != xNONE; then
  cf_path_syntax="$prefix"
else
  cf_path_syntax="$ac_default_prefix"
fi

case ".$cf_temp" in #(vi
.\$\(*\)*|.\'*\'*) #(vi
  ;;
..|./*|.\\*) #(vi
  ;;
.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
  ;;
.\${*prefix}*) #(vi
  eval cf_temp="$cf_temp"
  case ".$cf_temp" in #(vi
  .NONE/*)
    cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
    ;;
  esac
  ;; #(vi
.no|.NONE/*)
  cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
  ;;
*)
  break
  ;;
esac

			cf_path_prog="$cf_temp"
		else
			cf_path_prog="`basename $cf_temp`"
		fi
	elif test -z "$cf_path_args" ; then
		cf_path_args="$cf_temp"
	else
		cf_path_args="$cf_path_args $cf_temp"
	fi
done
IFS="$cf_save_ifs"

if test -n "$cf_path_prog" ; then

echo "${as_me-configure}:27307: testing defining path for ${cf_path_prog} ..." 1>&5

	cat >>confdefs.h <<_ACEOF
#define GZIP_PATH "$cf_path_prog"
_ACEOF

	test -n "$cf_path_args" && cat >>confdefs.h <<_ACEOF
#define GZIP_ARGS "$cf_path_args"
_ACEOF

fi



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


  test -n "$UNCOMPRESS" && break
done
test -n "$UNCOMPRESS" || UNCOMPRESS="$UNCOMPRESS"


cf_path_prog=""
cf_path_args=""
IFS="${IFS= 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
for cf_temp in $ac_cv_path_UNCOMPRESS
do
	if test -z "$cf_path_prog" ; then
		if test "$with_full_paths" = yes ; then

if test "x$prefix" != xNONE; then
  cf_path_syntax="$prefix"
else
  cf_path_syntax="$ac_default_prefix"
fi

case ".$cf_temp" in #(vi
.\$\(*\)*|.\'*\'*) #(vi
  ;;
..|./*|.\\*) #(vi
  ;;
.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
  ;;
.\${*prefix}*) #(vi
  eval cf_temp="$cf_temp"
  case ".$cf_temp" in #(vi
  .NONE/*)
    cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
    ;;
  esac
  ;; #(vi
.no|.NONE/*)
  cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
  ;;
*)
  break
  ;;
esac

			cf_path_prog="$cf_temp"
		else
			cf_path_prog="`basename $cf_temp`"
		fi
	elif test -z "$cf_path_args" ; then
		cf_path_args="$cf_temp"
	else
		cf_path_args="$cf_path_args $cf_temp"
	fi
done
IFS="$cf_save_ifs"

if test -n "$cf_path_prog" ; then

echo "${as_me-configure}:27420: testing defining path for ${cf_path_prog} ..." 1>&5

	cat >>confdefs.h <<_ACEOF
#define UNCOMPRESS_PATH "$cf_path_prog"
_ACEOF

	test -n "$cf_path_args" && cat >>confdefs.h <<_ACEOF
#define UNCOMPRESS_ARGS "$cf_path_args"
_ACEOF

fi



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


  test -n "$UNZIP" && break
done
test -n "$UNZIP" || UNZIP="$UNZIP"


cf_path_prog=""
cf_path_args=""
IFS="${IFS= 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
for cf_temp in $ac_cv_path_UNZIP
do
	if test -z "$cf_path_prog" ; then
		if test "$with_full_paths" = yes ; then

if test "x$prefix" != xNONE; then
  cf_path_syntax="$prefix"
else
  cf_path_syntax="$ac_default_prefix"
fi

case ".$cf_temp" in #(vi
.\$\(*\)*|.\'*\'*) #(vi
  ;;
..|./*|.\\*) #(vi
  ;;
.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
  ;;
.\${*prefix}*) #(vi
  eval cf_temp="$cf_temp"
  case ".$cf_temp" in #(vi
  .NONE/*)
    cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
    ;;
  esac
  ;; #(vi
.no|.NONE/*)
  cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
  ;;
*)
  break
  ;;
esac

			cf_path_prog="$cf_temp"
		else
			cf_path_prog="`basename $cf_temp`"
		fi
	elif test -z "$cf_path_args" ; then
		cf_path_args="$cf_temp"
	else
		cf_path_args="$cf_path_args $cf_temp"
	fi
done
IFS="$cf_save_ifs"

if test -n "$cf_path_prog" ; then

echo "${as_me-configure}:27533: testing defining path for ${cf_path_prog} ..." 1>&5

	cat >>confdefs.h <<_ACEOF
#define UNZIP_PATH "$cf_path_prog"
_ACEOF

	test -n "$cf_path_args" && cat >>confdefs.h <<_ACEOF
#define UNZIP_ARGS "$cf_path_args"
_ACEOF

fi



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


  test -n "$BZIP2" && break
done
test -n "$BZIP2" || BZIP2="$BZIP2"


cf_path_prog=""
cf_path_args=""
IFS="${IFS= 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
for cf_temp in $ac_cv_path_BZIP2
do
	if test -z "$cf_path_prog" ; then
		if test "$with_full_paths" = yes ; then

if test "x$prefix" != xNONE; then
  cf_path_syntax="$prefix"
else
  cf_path_syntax="$ac_default_prefix"
fi

case ".$cf_temp" in #(vi
.\$\(*\)*|.\'*\'*) #(vi
  ;;
..|./*|.\\*) #(vi
  ;;
.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
  ;;
.\${*prefix}*) #(vi
  eval cf_temp="$cf_temp"
  case ".$cf_temp" in #(vi
  .NONE/*)
    cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
    ;;
  esac
  ;; #(vi
.no|.NONE/*)
  cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
  ;;
*)
  break
  ;;
esac

			cf_path_prog="$cf_temp"
		else
			cf_path_prog="`basename $cf_temp`"
		fi
	elif test -z "$cf_path_args" ; then
		cf_path_args="$cf_temp"
	else
		cf_path_args="$cf_path_args $cf_temp"
	fi
done
IFS="$cf_save_ifs"

if test -n "$cf_path_prog" ; then

echo "${as_me-configure}:27646: testing defining path for ${cf_path_prog} ..." 1>&5

	cat >>confdefs.h <<_ACEOF
#define BZIP2_PATH "$cf_path_prog"
_ACEOF

	test -n "$cf_path_args" && cat >>confdefs.h <<_ACEOF
#define BZIP2_ARGS "$cf_path_args"
_ACEOF

fi




test -z "$TAR" && TAR=tar
for ac_prog in $TAR tar pax gtar gnutar bsdtar star
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_path_TAR+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $TAR in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_TAR="$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
TAR=$ac_cv_path_TAR
if test -n "$TAR"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
$as_echo "$TAR" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$TAR" && break
done
test -n "$TAR" || TAR="$TAR"


cf_path_prog=""
cf_path_args=""
IFS="${IFS= 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
for cf_temp in $ac_cv_path_TAR
do
	if test -z "$cf_path_prog" ; then
		if test "$with_full_paths" = yes ; then

if test "x$prefix" != xNONE; then
  cf_path_syntax="$prefix"
else
  cf_path_syntax="$ac_default_prefix"
fi

case ".$cf_temp" in #(vi
.\$\(*\)*|.\'*\'*) #(vi
  ;;
..|./*|.\\*) #(vi
  ;;
.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
  ;;
.\${*prefix}*) #(vi
  eval cf_temp="$cf_temp"
  case ".$cf_temp" in #(vi
  .NONE/*)
    cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
    ;;
  esac
  ;; #(vi
.no|.NONE/*)
  cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
  ;;
*)
  break
  ;;
esac

			cf_path_prog="$cf_temp"
		else
			cf_path_prog="`basename $cf_temp`"
		fi
	elif test -z "$cf_path_args" ; then
		cf_path_args="$cf_temp"
	else
		cf_path_args="$cf_path_args $cf_temp"
	fi
done
IFS="$cf_save_ifs"

if test -n "$cf_path_prog" ; then

echo "${as_me-configure}:27760: testing defining path for ${cf_path_prog} ..." 1>&5

	cat >>confdefs.h <<_ACEOF
#define TAR_PATH "$cf_path_prog"
_ACEOF

	test -n "$cf_path_args" && cat >>confdefs.h <<_ACEOF
#define TAR_ARGS "$cf_path_args"
_ACEOF

fi


case $TAR in
*pax|*pax$EXEEXT)
	TAR_UP_OPTIONS="-w"
	TAR_DOWN_OPTIONS="-r"
	TAR_PIPE_OPTIONS=""
	TAR_FILE_OPTIONS="-f"
	;;
*star|*star$EXEEXT)
	TAR_UP_OPTIONS="-c -f"
	TAR_DOWN_OPTIONS="-x -U -f"
	TAR_PIPE_OPTIONS="-"
	TAR_FILE_OPTIONS=""
	;;
*tar|*tar$EXEEXT)
	# FIXME: some versions of tar require, some don't allow the "-"
	TAR_UP_OPTIONS="-cf"
	TAR_DOWN_OPTIONS="-xf"
	TAR_PIPE_OPTIONS="-"
	TAR_FILE_OPTIONS=""
	;;
esac






cat >>confdefs.h <<_ACEOF
#define TAR_UP_OPTIONS "$TAR_UP_OPTIONS"
_ACEOF

cat >>confdefs.h <<_ACEOF
#define TAR_DOWN_OPTIONS "$TAR_DOWN_OPTIONS"
_ACEOF

cat >>confdefs.h <<_ACEOF
#define TAR_FILE_OPTIONS "$TAR_FILE_OPTIONS"
_ACEOF

cat >>confdefs.h <<_ACEOF
#define TAR_PIPE_OPTIONS "$TAR_PIPE_OPTIONS"
_ACEOF


if test ".$use_dired" != ".no" ; then



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


  test -n "$COMPRESS" && break
done
test -n "$COMPRESS" || COMPRESS="$COMPRESS"


cf_path_prog=""
cf_path_args=""
IFS="${IFS= 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
for cf_temp in $ac_cv_path_COMPRESS
do
	if test -z "$cf_path_prog" ; then
		if test "$with_full_paths" = yes ; then

if test "x$prefix" != xNONE; then
  cf_path_syntax="$prefix"
else
  cf_path_syntax="$ac_default_prefix"
fi

case ".$cf_temp" in #(vi
.\$\(*\)*|.\'*\'*) #(vi
  ;;
..|./*|.\\*) #(vi
  ;;
.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
  ;;
.\${*prefix}*) #(vi
  eval cf_temp="$cf_temp"
  case ".$cf_temp" in #(vi
  .NONE/*)
    cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
    ;;
  esac
  ;; #(vi
.no|.NONE/*)
  cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
  ;;
*)
  break
  ;;
esac

			cf_path_prog="$cf_temp"
		else
			cf_path_prog="`basename $cf_temp`"
		fi
	elif test -z "$cf_path_args" ; then
		cf_path_args="$cf_temp"
	else
		cf_path_args="$cf_path_args $cf_temp"
	fi
done
IFS="$cf_save_ifs"

if test -n "$cf_path_prog" ; then

echo "${as_me-configure}:27920: testing defining path for ${cf_path_prog} ..." 1>&5

	cat >>confdefs.h <<_ACEOF
#define COMPRESS_PATH "$cf_path_prog"
_ACEOF

	test -n "$cf_path_args" && cat >>confdefs.h <<_ACEOF
#define COMPRESS_ARGS "$cf_path_args"
_ACEOF

fi



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


  test -n "$RM" && break
done
test -n "$RM" || RM="$RM"


cf_path_prog=""
cf_path_args=""
IFS="${IFS= 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
for cf_temp in $ac_cv_path_RM
do
	if test -z "$cf_path_prog" ; then
		if test "$with_full_paths" = yes ; then

if test "x$prefix" != xNONE; then
  cf_path_syntax="$prefix"
else
  cf_path_syntax="$ac_default_prefix"
fi

case ".$cf_temp" in #(vi
.\$\(*\)*|.\'*\'*) #(vi
  ;;
..|./*|.\\*) #(vi
  ;;
.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
  ;;
.\${*prefix}*) #(vi
  eval cf_temp="$cf_temp"
  case ".$cf_temp" in #(vi
  .NONE/*)
    cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
    ;;
  esac
  ;; #(vi
.no|.NONE/*)
  cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
  ;;
*)
  break
  ;;
esac

			cf_path_prog="$cf_temp"
		else
			cf_path_prog="`basename $cf_temp`"
		fi
	elif test -z "$cf_path_args" ; then
		cf_path_args="$cf_temp"
	else
		cf_path_args="$cf_path_args $cf_temp"
	fi
done
IFS="$cf_save_ifs"

if test -n "$cf_path_prog" ; then

echo "${as_me-configure}:28033: testing defining path for ${cf_path_prog} ..." 1>&5

	cat >>confdefs.h <<_ACEOF
#define RM_PATH "$cf_path_prog"
_ACEOF

	test -n "$cf_path_args" && cat >>confdefs.h <<_ACEOF
#define RM_ARGS "$cf_path_args"
_ACEOF

fi



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


  test -n "$UUDECODE" && break
done
test -n "$UUDECODE" || UUDECODE="$UUDECODE"


cf_path_prog=""
cf_path_args=""
IFS="${IFS= 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
for cf_temp in $ac_cv_path_UUDECODE
do
	if test -z "$cf_path_prog" ; then
		if test "$with_full_paths" = yes ; then

if test "x$prefix" != xNONE; then
  cf_path_syntax="$prefix"
else
  cf_path_syntax="$ac_default_prefix"
fi

case ".$cf_temp" in #(vi
.\$\(*\)*|.\'*\'*) #(vi
  ;;
..|./*|.\\*) #(vi
  ;;
.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
  ;;
.\${*prefix}*) #(vi
  eval cf_temp="$cf_temp"
  case ".$cf_temp" in #(vi
  .NONE/*)
    cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
    ;;
  esac
  ;; #(vi
.no|.NONE/*)
  cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
  ;;
*)
  break
  ;;
esac

			cf_path_prog="$cf_temp"
		else
			cf_path_prog="`basename $cf_temp`"
		fi
	elif test -z "$cf_path_args" ; then
		cf_path_args="$cf_temp"
	else
		cf_path_args="$cf_path_args $cf_temp"
	fi
done
IFS="$cf_save_ifs"

if test -n "$cf_path_prog" ; then

echo "${as_me-configure}:28146: testing defining path for ${cf_path_prog} ..." 1>&5

	cat >>confdefs.h <<_ACEOF
#define UUDECODE_PATH "$cf_path_prog"
_ACEOF

	test -n "$cf_path_args" && cat >>confdefs.h <<_ACEOF
#define UUDECODE_ARGS "$cf_path_args"
_ACEOF

fi



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


  test -n "$ZCAT" && break
done
test -n "$ZCAT" || ZCAT="$ZCAT"


cf_path_prog=""
cf_path_args=""
IFS="${IFS= 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
for cf_temp in $ac_cv_path_ZCAT
do
	if test -z "$cf_path_prog" ; then
		if test "$with_full_paths" = yes ; then

if test "x$prefix" != xNONE; then
  cf_path_syntax="$prefix"
else
  cf_path_syntax="$ac_default_prefix"
fi

case ".$cf_temp" in #(vi
.\$\(*\)*|.\'*\'*) #(vi
  ;;
..|./*|.\\*) #(vi
  ;;
.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
  ;;
.\${*prefix}*) #(vi
  eval cf_temp="$cf_temp"
  case ".$cf_temp" in #(vi
  .NONE/*)
    cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
    ;;
  esac
  ;; #(vi
.no|.NONE/*)
  cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
  ;;
*)
  break
  ;;
esac

			cf_path_prog="$cf_temp"
		else
			cf_path_prog="`basename $cf_temp`"
		fi
	elif test -z "$cf_path_args" ; then
		cf_path_args="$cf_temp"
	else
		cf_path_args="$cf_path_args $cf_temp"
	fi
done
IFS="$cf_save_ifs"

if test -n "$cf_path_prog" ; then

echo "${as_me-configure}:28259: testing defining path for ${cf_path_prog} ..." 1>&5

	cat >>confdefs.h <<_ACEOF
#define ZCAT_PATH "$cf_path_prog"
_ACEOF

	test -n "$cf_path_args" && cat >>confdefs.h <<_ACEOF
#define ZCAT_ARGS "$cf_path_args"
_ACEOF

fi



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


  test -n "$ZIP" && break
done
test -n "$ZIP" || ZIP="$ZIP"


cf_path_prog=""
cf_path_args=""
IFS="${IFS= 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
for cf_temp in $ac_cv_path_ZIP
do
	if test -z "$cf_path_prog" ; then
		if test "$with_full_paths" = yes ; then

if test "x$prefix" != xNONE; then
  cf_path_syntax="$prefix"
else
  cf_path_syntax="$ac_default_prefix"
fi

case ".$cf_temp" in #(vi
.\$\(*\)*|.\'*\'*) #(vi
  ;;
..|./*|.\\*) #(vi
  ;;
.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
  ;;
.\${*prefix}*) #(vi
  eval cf_temp="$cf_temp"
  case ".$cf_temp" in #(vi
  .NONE/*)
    cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
    ;;
  esac
  ;; #(vi
.no|.NONE/*)
  cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
  ;;
*)
  break
  ;;
esac

			cf_path_prog="$cf_temp"
		else
			cf_path_prog="`basename $cf_temp`"
		fi
	elif test -z "$cf_path_args" ; then
		cf_path_args="$cf_temp"
	else
		cf_path_args="$cf_path_args $cf_temp"
	fi
done
IFS="$cf_save_ifs"

if test -n "$cf_path_prog" ; then

echo "${as_me-configure}:28372: testing defining path for ${cf_path_prog} ..." 1>&5

	cat >>confdefs.h <<_ACEOF
#define ZIP_PATH "$cf_path_prog"
_ACEOF

	test -n "$cf_path_args" && cat >>confdefs.h <<_ACEOF
#define ZIP_ARGS "$cf_path_args"
_ACEOF

fi


case "$INSTALL" in
$srcdir*) # (vi
	cat >>confdefs.h <<_ACEOF
#define INSTALL_PATH "install"
_ACEOF

	;;
*) # (vi
	cf_save_INSTALL="$INSTALL"


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


  test -n "$INSTALL" && break
done
test -n "$INSTALL" || INSTALL="$INSTALL"


cf_path_prog=""
cf_path_args=""
IFS="${IFS= 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
for cf_temp in $ac_cv_path_INSTALL
do
	if test -z "$cf_path_prog" ; then
		if test "$with_full_paths" = yes ; then

if test "x$prefix" != xNONE; then
  cf_path_syntax="$prefix"
else
  cf_path_syntax="$ac_default_prefix"
fi

case ".$cf_temp" in #(vi
.\$\(*\)*|.\'*\'*) #(vi
  ;;
..|./*|.\\*) #(vi
  ;;
.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
  ;;
.\${*prefix}*) #(vi
  eval cf_temp="$cf_temp"
  case ".$cf_temp" in #(vi
  .NONE/*)
    cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
    ;;
  esac
  ;; #(vi
.no|.NONE/*)
  cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
  ;;
*)
  break
  ;;
esac

			cf_path_prog="$cf_temp"
		else
			cf_path_prog="`basename $cf_temp`"
		fi
	elif test -z "$cf_path_args" ; then
		cf_path_args="$cf_temp"
	else
		cf_path_args="$cf_path_args $cf_temp"
	fi
done
IFS="$cf_save_ifs"

if test -n "$cf_path_prog" ; then

echo "${as_me-configure}:28495: testing defining path for ${cf_path_prog} ..." 1>&5

	cat >>confdefs.h <<_ACEOF
#define INSTALL_PATH "$cf_path_prog"
_ACEOF

	test -n "$cf_path_args" && cat >>confdefs.h <<_ACEOF
#define INSTALL_ARGS "$cf_path_args"
_ACEOF

fi

	INSTALL="$cf_save_INSTALL"
	;;
esac
fi

COMPRESS_PROG=
COMPRESS_EXT=
if test $use_gzip_help = yes ; then
	COMPRESS_PROG="$ac_cv_path_GZIP -9"
	COMPRESS_EXT=.gz
fi



if test $cf_cv_screen = pdcurses ; then
	Special Libraries for PDCurses X11:
	{ $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_c_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_c_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_c_werror_flag=$ac_c_werror_flag
    ac_c_werror_flag=yes
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_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_c_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_c_werror_flag=$ac_xsave_c_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_c_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_c_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" = xyes; 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_c_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" = xyes; 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_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
if test "x$ac_cv_func_gethostbyname" = xyes; 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_c_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" = xyes; 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_c_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" = xyes; 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_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
if test "x$ac_cv_func_connect" = xyes; 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_c_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" = xyes; then :
  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
fi

    fi

    # Guillermo Gomez says -lposix is necessary on A/UX.
    ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
if test "x$ac_cv_func_remove" = xyes; 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_c_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" = xyes; then :
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
fi

    fi

    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
    ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
if test "x$ac_cv_func_shmat" = xyes; 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_c_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" = xyes; 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_c_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" = xyes; then :
  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
fi

  LDFLAGS=$ac_save_LDFLAGS

fi





# SYSTEM_NAME=`echo "$cf_cv_system_name"|tr ' ' -`

cf_have_X_LIBS=no

LDFLAGS="$X_LIBS $LDFLAGS"

test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6

echo "${as_me-configure}:29218: testing checking additions to CFLAGS ..." 1>&5


cf_check_cflags="$CFLAGS"
cf_check_cppflags="$CPPFLAGS"

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $X_CFLAGS
do
case $cf_fix_cppflags in
no)
	case $cf_add_cflags in #(vi
	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
		case $cf_add_cflags in
		-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
			&& test -z "${cf_tst_cflags}" \
			&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then
				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then
				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		*$cf_add_cflags) #(vi
			;;
		*) #(vi
			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
			;;
		esac
		;;
	*)
		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
		;;
	esac
	;;
yes)
	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
	&& test -z "${cf_tst_cflags}" \
	&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then
	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6

echo "${as_me-configure}:29280: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5


	CFLAGS="$CFLAGS $cf_new_cflags"
fi

if test -n "$cf_new_cppflags" ; then
	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6

echo "${as_me-configure}:29289: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5


	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
fi

if test -n "$cf_new_extra_cppflags" ; then
	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6

echo "${as_me-configure}:29298: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5


	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
fi




if test "$cf_check_cflags" != "$CFLAGS" ; then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello world");
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :

else
  test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6

echo "${as_me-configure}:29324: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5


	 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6

echo "${as_me-configure}:29330: testing but keeping change to \$CPPFLAGS ..." 1>&5


	 fi
	 CFLAGS="$cf_check_flags"
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi


ac_fn_c_check_func "$LINENO" "XOpenDisplay" "ac_cv_func_XOpenDisplay"
if test "x$ac_cv_func_XOpenDisplay" = xyes; then :

else

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XOpenDisplay in -lX11" >&5
$as_echo_n "checking for XOpenDisplay in -lX11... " >&6; }
if ${ac_cv_lib_X11_XOpenDisplay+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lX11 $X_PRE_LIBS $LIBS $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 XOpenDisplay ();
int
main ()
{
return XOpenDisplay ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_X11_XOpenDisplay=yes
else
  ac_cv_lib_X11_XOpenDisplay=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_X11_XOpenDisplay" >&5
$as_echo "$ac_cv_lib_X11_XOpenDisplay" >&6; }
if test "x$ac_cv_lib_X11_XOpenDisplay" = xyes; then :
  LIBS="-lX11 $LIBS"
fi

fi


ac_fn_c_check_func "$LINENO" "XtAppInitialize" "ac_cv_func_XtAppInitialize"
if test "x$ac_cv_func_XtAppInitialize" = xyes; then :

else

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XtAppInitialize in -lXt" >&5
$as_echo_n "checking for XtAppInitialize in -lXt... " >&6; }
if ${ac_cv_lib_Xt_XtAppInitialize+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lXt $X_PRE_LIBS $LIBS $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 XtAppInitialize ();
int
main ()
{
return XtAppInitialize ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_Xt_XtAppInitialize=yes
else
  ac_cv_lib_Xt_XtAppInitialize=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_XtAppInitialize" >&5
$as_echo "$ac_cv_lib_Xt_XtAppInitialize" >&6; }
if test "x$ac_cv_lib_Xt_XtAppInitialize" = xyes; then :
  $as_echo "#define HAVE_LIBXT 1" >>confdefs.h

	 cf_have_X_LIBS=Xt
	 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
fi

fi


if test $cf_have_X_LIBS = no ; then
	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to successfully link X Toolkit library (-lXt) with
test program.  You will have to check and add the proper libraries by hand
to makefile." >&5
$as_echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
test program.  You will have to check and add the proper libraries by hand
to makefile." >&2;}
fi


cf_x_athena=${cf_x_athena-Xaw}

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want to link with Xaw 3d library" >&5
$as_echo_n "checking if you want to link with Xaw 3d library... " >&6; }
withval=

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

if test "$withval" = yes ; then
	cf_x_athena=Xaw3d
	{ $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

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want to link with neXT Athena library" >&5
$as_echo_n "checking if you want to link with neXT Athena library... " >&6; }
withval=

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

if test "$withval" = yes ; then
	cf_x_athena=neXtaw
	{ $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

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want to link with Athena-Plus library" >&5
$as_echo_n "checking if you want to link with Athena-Plus library... " >&6; }
withval=

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

if test "$withval" = yes ; then
	cf_x_athena=XawPlus
	{ $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

{ $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  $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_c_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" = xyes; then :
  LIBS="-lXext $LIBS"
fi


cf_x_athena_lib=""


cf_x_athena_root=$cf_x_athena
cf_x_athena_include=""

for cf_path in default \
	/usr/contrib/X11R6 \
	/usr/contrib/X11R5 \
	/usr/lib/X11R5 \
	/usr/local
do
	if test -z "$cf_x_athena_include" ; then
		cf_save="$CPPFLAGS"
		cf_test=X11/$cf_x_athena_root/SimpleMenu.h
		if test $cf_path != default ; then
			CPPFLAGS="$cf_save -I$cf_path/include"
			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $cf_test in $cf_path" >&5
$as_echo_n "checking for $cf_test in $cf_path... " >&6; }
		else
			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $cf_test" >&5
$as_echo_n "checking for $cf_test... " >&6; }
		fi
		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <X11/Intrinsic.h>
#include <$cf_test>
int
main ()
{

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

if test -z "$cf_x_athena_include" ; then
	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to successfully find Athena header files with test program" >&5
$as_echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
elif test "$cf_x_athena_include" != default ; then
	CPPFLAGS="$CPPFLAGS -I$cf_x_athena_include"
fi


cf_x_athena_root=$cf_x_athena
cf_x_athena_lib=""

for cf_path in default \
	/usr/contrib/X11R6 \
	/usr/contrib/X11R5 \
	/usr/lib/X11R5 \
	/usr/local
do
	for cf_lib in \
		"-l$cf_x_athena_root -lXmu" \
		"-l$cf_x_athena_root -lXpm -lXmu" \
		"-l${cf_x_athena_root}_s -lXmu_s"
	do
		if test -z "$cf_x_athena_lib" ; then
			cf_save="$LIBS"
			cf_test=XawSimpleMenuAddGlobalActions
			if test $cf_path != default ; then
				LIBS="-L$cf_path/lib $cf_lib $LIBS"
				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $cf_lib in $cf_path" >&5
$as_echo_n "checking for $cf_lib in $cf_path... " >&6; }
			else
				LIBS="$cf_lib $LIBS"
				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $cf_test in $cf_lib" >&5
$as_echo_n "checking for $cf_test in $cf_lib... " >&6; }
			fi
			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{
$cf_test()
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_result=yes
else
  cf_result=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_result" >&5
$as_echo "$cf_result" >&6; }
			if test "$cf_result" = yes ; then
				cf_x_athena_lib="$cf_lib"
				break
			fi
			LIBS="$cf_save"
		fi
	done
done

if test -z "$cf_x_athena_lib" ; then
	as_fn_error $? "Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" "$LINENO" 5
fi


cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

cat >>confdefs.h <<_ACEOF
#define $cf_x_athena_LIBS 1
_ACEOF






for ac_prog in xcurses-config
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_path_XCURSES_CONFIG+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $XCURSES_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_XCURSES_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
XCURSES_CONFIG=$ac_cv_path_XCURSES_CONFIG
if test -n "$XCURSES_CONFIG"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCURSES_CONFIG" >&5
$as_echo "$XCURSES_CONFIG" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$XCURSES_CONFIG" && break
done
test -n "$XCURSES_CONFIG" || XCURSES_CONFIG="none"


if test "$XCURSES_CONFIG" != none ; then

CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
LIBS="`$XCURSES_CONFIG --libs` $LIBS"

cf_cv_lib_XCurses=yes

else

LDFLAGS="$LDFLAGS $X_LIBS"

test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6

echo "${as_me-configure}:29739: testing checking additions to CFLAGS ..." 1>&5


cf_check_cflags="$CFLAGS"
cf_check_cppflags="$CPPFLAGS"

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $X_CFLAGS
do
case $cf_fix_cppflags in
no)
	case $cf_add_cflags in #(vi
	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
		case $cf_add_cflags in
		-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
			&& test -z "${cf_tst_cflags}" \
			&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then
				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then
				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		*$cf_add_cflags) #(vi
			;;
		*) #(vi
			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
			;;
		esac
		;;
	*)
		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
		;;
	esac
	;;
yes)
	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
	&& test -z "${cf_tst_cflags}" \
	&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then
	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6

echo "${as_me-configure}:29801: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5


	CFLAGS="$CFLAGS $cf_new_cflags"
fi

if test -n "$cf_new_cppflags" ; then
	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6

echo "${as_me-configure}:29810: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5


	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
fi

if test -n "$cf_new_extra_cppflags" ; then
	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6

echo "${as_me-configure}:29819: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5


	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
fi




if test "$cf_check_cflags" != "$CFLAGS" ; then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("Hello world");
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :

else
  test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6

echo "${as_me-configure}:29845: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5


	 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6

echo "${as_me-configure}:29851: testing but keeping change to \$CPPFLAGS ..." 1>&5


	 fi
	 CFLAGS="$cf_check_flags"
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XOpenDisplay in -lX11" >&5
$as_echo_n "checking for XOpenDisplay in -lX11... " >&6; }
if ${ac_cv_lib_X11_XOpenDisplay+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lX11 $X_PRE_LIBS $LIBS $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 XOpenDisplay ();
int
main ()
{
return XOpenDisplay ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_X11_XOpenDisplay=yes
else
  ac_cv_lib_X11_XOpenDisplay=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_X11_XOpenDisplay" >&5
$as_echo "$ac_cv_lib_X11_XOpenDisplay" >&6; }
if test "x$ac_cv_lib_X11_XOpenDisplay" = xyes; then :
  LIBS="-lX11 $LIBS"
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCurses library" >&5
$as_echo_n "checking for XCurses library... " >&6; }
if ${cf_cv_lib_XCurses+:} false; then :
  $as_echo_n "(cached) " >&6
else

LIBS="-lXCurses $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <xcurses.h>
char *XCursesProgramName = "test";

int
main ()
{
XCursesExit();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_lib_XCurses=yes
else
  cf_cv_lib_XCurses=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: $cf_cv_lib_XCurses" >&5
$as_echo "$cf_cv_lib_XCurses" >&6; }

fi

if test $cf_cv_lib_XCurses = yes ; then
	$as_echo "#define UNIX 1" >>confdefs.h

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

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

else
	as_fn_error $? "Cannot link with XCurses" "$LINENO" 5
fi

else

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can include termio.h with curses" >&5
$as_echo_n "checking if we can include termio.h with curses... " >&6; }
if ${cf_cv_termio_and_curses+:} false; then :
  $as_echo_n "(cached) " >&6
else

    cf_save_CFLAGS="$CPPFLAGS"
    CPPFLAGS="$CPPFLAGS -DHAVE_CONFIG_H -I. -I${srcdir-.} -I${srcdir-.}/src -I${srcdir-.}/WWW/Library/Implementation"
    touch lynx_cfg.h
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <LYCurses.h>
#include <termio.h>
int
main ()
{
putchar(0x0a)
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_termio_and_curses=yes
else
  cf_cv_termio_and_curses=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    CPPFLAGS="$cf_save_CFLAGS"
    rm -f lynx_cfg.h

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

test $cf_cv_termio_and_curses = yes && $as_echo "#define TERMIO_AND_CURSES 1" >>confdefs.h


fi

### These tests must be run after establishing the curses library.
if test $cf_cv_screen != slang ; then
	for ac_header in $cf_cv_screen/term.h term.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"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if curses supports alternate-character set" >&5
$as_echo_n "checking if curses supports alternate-character set... " >&6; }
if ${cf_cv_alt_char_set+:} false; then :
  $as_echo_n "(cached) " >&6
else

for mapname in acs_map _acs_map
do
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <${cf_cv_ncurses_header-curses.h}>

int
main ()
{
chtype x = $mapname['l']; $mapname['m'] = 0
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_alt_char_set=$mapname
	 break
else
  cf_cv_alt_char_set=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
done

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_alt_char_set" >&5
$as_echo "$cf_cv_alt_char_set" >&6; }
test $cf_cv_alt_char_set != no && cat >>confdefs.h <<_ACEOF
#define ALT_CHAR_SET $cf_cv_alt_char_set
_ACEOF



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if curses supports fancy attributes" >&5
$as_echo_n "checking if curses supports fancy attributes... " >&6; }
if ${cf_cv_fancy_curses+:} false; then :
  $as_echo_n "(cached) " >&6
else

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

#include <${cf_cv_ncurses_header-curses.h}>

int
main ()
{
attrset(A_UNDERLINE|A_BOLD|A_REVERSE);
	 wattrset(stdscr, A_BLINK|A_DIM);
	 attroff(A_BOLD);
	 keypad(stdscr,TRUE);

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_fancy_curses=yes
else
  cf_cv_fancy_curses=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: $cf_cv_fancy_curses" >&5
$as_echo "$cf_cv_fancy_curses" >&6; }
test $cf_cv_fancy_curses = yes && $as_echo "#define FANCY_CURSES 1" >>confdefs.h



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function curses_version" >&5
$as_echo_n "checking for function curses_version... " >&6; }
if ${cf_cv_func_curses_version+:} false; then :
  $as_echo_n "(cached) " >&6
else

if test "$cross_compiling" = yes; then :
  cf_cv_func_curses_version=unknown
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <${cf_cv_ncurses_header-curses.h}>
int main()
{
	char temp[1024];
	sprintf(temp, "%s\n", curses_version());
	${cf_cv_main_return-return}(0);
}

_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  cf_cv_func_curses_version=yes

else
  cf_cv_func_curses_version=no

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

rm -f core
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_func_curses_version" >&5
$as_echo "$cf_cv_func_curses_version" >&6; }
test "$cf_cv_func_curses_version" = yes && $as_echo "#define HAVE_CURSES_VERSION 1" >>confdefs.h




if test "$cf_cv_ncurses_version" != no ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for obsolete/broken version of ncurses" >&5
$as_echo_n "checking for obsolete/broken version of ncurses... " >&6; }
if ${cf_cv_ncurses_broken+:} false; then :
  $as_echo_n "(cached) " >&6
else

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

#include <${cf_cv_ncurses_header-curses.h}>
int
main ()
{

#if defined(NCURSES_VERSION) && defined(wgetbkgd)
	make an error
#else
	int x = 1
#endif

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

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_ncurses_broken" >&5
$as_echo "$cf_cv_ncurses_broken" >&6; }
if test "$cf_cv_ncurses_broken" = yes ; then
	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: hmm... you should get an up-to-date version of ncurses" >&5
$as_echo "$as_me: WARNING: hmm... you should get an up-to-date version of ncurses" >&2;}
	$as_echo "#define NCURSES_BROKEN 1" >>confdefs.h

fi
fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if curses supports color attributes" >&5
$as_echo_n "checking if curses supports color attributes... " >&6; }
if ${cf_cv_color_curses+:} false; then :
  $as_echo_n "(cached) " >&6
else

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

#include <${cf_cv_ncurses_header-curses.h}>

int
main ()
{
chtype x = COLOR_BLUE;
	 has_colors();
	 start_color();
#ifndef NCURSES_BROKEN
	 wbkgd(curscr, getbkgd(stdscr)); /* X/Open XPG4 aka SVr4 Curses */
#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_color_curses=yes
else
  cf_cv_color_curses=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: $cf_cv_color_curses" >&5
$as_echo "$cf_cv_color_curses" >&6; }
if test $cf_cv_color_curses = yes ; then
	$as_echo "#define COLOR_CURSES 1" >>confdefs.h

	test ".$cf_cv_ncurses_broken" != .yes && $as_echo "#define HAVE_GETBKGD 1" >>confdefs.h

fi


for ac_header in \
termio.h \
termios.h \
unistd.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"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done

if test "$ISC" = yes ; then
	for ac_header in sys/termio.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"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done

fi
if test "$ac_cv_header_termios_h" = yes ; then
	case "$CFLAGS $CPPFLAGS" in
	*-D_POSIX_SOURCE*)
		termios_bad=dunno ;;
	*)	termios_bad=maybe ;;
	esac
	if test "$termios_bad" = maybe ; then
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether termios.h needs _POSIX_SOURCE" >&5
$as_echo_n "checking whether termios.h needs _POSIX_SOURCE... " >&6; }
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <termios.h>
int
main ()
{
struct termios foo; int x = foo.c_iflag
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  termios_bad=no
else

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

#define _POSIX_SOURCE
#include <termios.h>
int
main ()
{
struct termios foo; int x = foo.c_iflag
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  termios_bad=unknown
else
  termios_bad=yes $as_echo "#define SVR4_TERMIO 1" >>confdefs.h

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

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



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking declaration of size-change" >&5
$as_echo_n "checking declaration of size-change... " >&6; }
if ${cf_cv_sizechange+:} false; then :
  $as_echo_n "(cached) " >&6
else

    cf_cv_sizechange=unknown
    cf_save_CPPFLAGS="$CPPFLAGS"

for cf_opts in "" "NEED_PTEM_H"
do

    CPPFLAGS="$cf_save_CPPFLAGS"
    test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
#ifdef HAVE_TERMIOS_H
#include <termios.h>
#else
#ifdef HAVE_TERMIO_H
#include <termio.h>
#endif
#endif
#ifdef NEED_PTEM_H
/* This is a workaround for SCO:  they neglected to define struct winsize in
 * termios.h -- it's only in termio.h and ptem.h
 */
#include        <sys/stream.h>
#include        <sys/ptem.h>
#endif
#if !defined(sun) || !defined(HAVE_TERMIOS_H)
#include <sys/ioctl.h>
#endif

int
main ()
{

#ifdef TIOCGSIZE
	struct ttysize win;	/* FIXME: what system is this? */
	int y = win.ts_lines;
	int x = win.ts_cols;
#else
#ifdef TIOCGWINSZ
	struct winsize win;
	int y = win.ws_row;
	int x = win.ws_col;
#else
	no TIOCGSIZE or TIOCGWINSZ
#endif /* TIOCGWINSZ */
#endif /* TIOCGSIZE */

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

	CPPFLAGS="$cf_save_CPPFLAGS"
	if test "$cf_cv_sizechange" = yes ; then
		echo "size-change succeeded ($cf_opts)" >&5
		test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
		break
	fi
done

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_sizechange" >&5
$as_echo "$cf_cv_sizechange" >&6; }
if test "$cf_cv_sizechange" != no ; then
	$as_echo "#define HAVE_SIZECHANGE 1" >>confdefs.h

	case $cf_cv_sizechange in #(vi
	NEED*)
		cat >>confdefs.h <<_ACEOF
#define $cf_cv_sizechange  1
_ACEOF

		;;
	esac
fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if ttytype is declared in curses library" >&5
$as_echo_n "checking if ttytype is declared in curses library... " >&6; }
if ${cf_cv_have_ttytype+:} false; then :
  $as_echo_n "(cached) " >&6
else

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <${cf_cv_ncurses_header-curses.h}>
int
main ()
{
char *x = &ttytype[1]; *x = 1
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_have_ttytype=yes
else
  cf_cv_have_ttytype=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: $cf_cv_have_ttytype" >&5
$as_echo "$cf_cv_have_ttytype" >&6; }
test $cf_cv_have_ttytype = yes && $as_echo "#define HAVE_TTYTYPE 1" >>confdefs.h


	if test "$use_wide_curses" = yes ; then

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if curses supports wide characters" >&5
$as_echo_n "checking if curses supports wide characters... " >&6; }
if ${cf_cv_widec_curses+:} false; then :
  $as_echo_n "(cached) " >&6
else

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

#include <stdlib.h>
#include <${cf_cv_ncurses_header-curses.h}>
int
main ()
{

    wchar_t temp[2];
    wchar_t wch = 'A';
    temp[0] = wch;
    waddnwstr(stdscr, temp, 1);

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_widec_curses=yes
else
  cf_cv_widec_curses=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: $cf_cv_widec_curses" >&5
$as_echo "$cf_cv_widec_curses" >&6; }

if test "$cf_cv_widec_curses" = yes ; then
	$as_echo "#define WIDEC_CURSES 1" >>confdefs.h


	# This is needed on Tru64 5.0 to declare mbstate_t
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we must include wchar.h to declare mbstate_t" >&5
$as_echo_n "checking if we must include wchar.h to declare mbstate_t... " >&6; }
if ${cf_cv_widec_mbstate+:} false; then :
  $as_echo_n "(cached) " >&6
else

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

#include <stdlib.h>
#include <${cf_cv_ncurses_header-curses.h}>
int
main ()
{
mbstate_t state
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_widec_mbstate=no
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdlib.h>
#include <wchar.h>
#include <${cf_cv_ncurses_header-curses.h}>
int
main ()
{
mbstate_t state
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_widec_mbstate=yes
else
  cf_cv_widec_mbstate=unknown
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: $cf_cv_widec_mbstate" >&5
$as_echo "$cf_cv_widec_mbstate" >&6; }

if test "$cf_cv_widec_mbstate" = yes ; then
	$as_echo "#define NEED_WCHAR_H 1" >>confdefs.h

fi

if test "$cf_cv_widec_mbstate" != unknown ; then
	$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h

fi

fi

	fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
$as_echo_n "checking if we must define _XOPEN_SOURCE_EXTENDED... " >&6; }
if ${cf_cv_need_xopen_extension+:} false; then :
  $as_echo_n "(cached) " >&6
else

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

#include <stdlib.h>
#include <${cf_cv_ncurses_header-curses.h}>
int
main ()
{

	long x = winnstr(stdscr, "", 0);
	int x1, y1;
	getbegyx(stdscr, y1, x1)
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_need_xopen_extension=no
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#define _XOPEN_SOURCE_EXTENDED
#include <stdlib.h>
#include <${cf_cv_ncurses_header-curses.h}>
int
main ()
{

	long x = winnstr(stdscr, "", 0);
	int x1, y1;
	getbegyx(stdscr, y1, x1)
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_cv_need_xopen_extension=yes
else
  cf_cv_need_xopen_extension=unknown
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
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_need_xopen_extension" >&5
$as_echo "$cf_cv_need_xopen_extension" >&6; }
test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for term.h" >&5
$as_echo_n "checking for term.h... " >&6; }
if ${cf_cv_term_header+:} false; then :
  $as_echo_n "(cached) " >&6
else


# If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
# for <term.h> if we do not find the variant.
for cf_header in \
	`echo ${cf_cv_ncurses_header-curses.h} | sed -e 's%/.*%/%'`term.h \
	term.h
do
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <${cf_cv_ncurses_header-curses.h}>
#include <${cf_header}>
int
main ()
{
WINDOW *x
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cf_cv_term_header=$cf_header
	 break
else
  cf_cv_term_header=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done

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

case $cf_cv_term_header in #(vi
term.h) #(vi
	$as_echo "#define HAVE_TERM_H 1" >>confdefs.h

	;;
ncurses/term.h)
	$as_echo "#define HAVE_NCURSES_TERM_H 1" >>confdefs.h

	;;
ncursesw/term.h)
	$as_echo "#define HAVE_NCURSESW_TERM_H 1" >>confdefs.h

	;;
esac




for cf_func in \
		assume_default_colors \
		cbreak \
		define_key \
		delscreen \
		getattrs \
		getbegx \
		getbegy \
		keypad \
		napms \
		newpad \
		newterm \
		pnoutrefresh \
		resizeterm \
		touchline \
		touchwin \
		use_default_colors \
		use_legacy_coding \
		wattr_get \
		wborder \
		wredrawln \
		wresize \

do

cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${cf_func}" >&5
$as_echo_n "checking for ${cf_func}... " >&6; }

echo "${as_me-configure}:30673: testing ${cf_func} ..." 1>&5

	if eval \${cf_cv_func_$cf_func+:} false; then :
  $as_echo_n "(cached) " >&6
else

		eval cf_result='$ac_cv_func_'$cf_func
		if test ".$cf_result" != ".no"; then
			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef HAVE_XCURSES
#include <xcurses.h>
char * XCursesProgramName = "test";
#else
#include <${cf_cv_ncurses_header-curses.h}>
#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
#include <ncursesw/term.h>
#else
#if defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
#include <ncurses/term.h>
#else
#ifdef HAVE_TERM_H
#include <term.h>
#endif
#endif
#endif
#endif
int
main ()
{

#ifndef ${cf_func}
long foo = (long)(&${cf_func});
${cf_cv_main_return-return}(foo == 0);
#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  cf_result=yes
else
  cf_result=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
		fi
		eval 'cf_cv_func_'$cf_func'=$cf_result'

fi

	# use the computed/retrieved cache-value:
	eval 'cf_result=$cf_cv_func_'$cf_func
	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_result" >&5
$as_echo "$cf_result" >&6; }
	if test $cf_result != no; then
		cat >>confdefs.h <<_ACEOF
#define HAVE_${cf_tr_func} 1
_ACEOF

	fi
done

	for ac_func in \
		_nc_free_and_exit \
		_nc_freeall \

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

fi
done

fi

if test $use_color_style != no ; then
	if test .$cf_cv_color_curses != .yes ; then
		as_fn_error $? "Configuration does not support color-styles" "$LINENO" 5
	fi
	if test $cf_cv_screen = slang ; then
		as_fn_error $? "Configuration does not support color-styles" "$LINENO" 5
	fi
fi

if test $use_scrollbar != no ; then
	if test .$cf_cv_fancy_curses != .yes ; then
		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Configuration does not support ACS_xxx definitions" >&5
$as_echo "$as_me: WARNING: Configuration does not support ACS_xxx definitions" >&2;}
	else
		$as_echo "#define USE_SCROLLBAR 1" >>confdefs.h

	fi
fi

### Finally, build config.h and the makefiles
test -z "$CONFIG_SHELL" && CONFIG_SHELL=/bin/sh


CFLAGS="$CFLAGS $EXTRA_CFLAGS"
srcdir="$srcdir"
SRCDIR_CLEAN="#"
if test -n "$srcdir" ; then
	echo srcdir is $srcdir
	$CONFIG_SHELL $MKINSTALLDIRS WWW/Library/Implementation
	$CONFIG_SHELL $MKINSTALLDIRS src/chrtrans
	test "$USE_INCLUDED_LIBINTL" = yes && $CONFIG_SHELL $MKINSTALLDIRS intl
	test "$srcdir" != "." && SRCDIR_CLEAN=""
fi


ac_config_files="$ac_config_files makefile WWW/Library/Implementation/makefile src/makefile src/chrtrans/makefile $SUB_MAKEFILE"

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 -p'.
    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
      as_ln_s='cp -p'
  elif ln conf$$.file conf$$ 2>/dev/null; then
    as_ln_s=ln
  else
    as_ln_s='cp -p'
  fi
else
  as_ln_s='cp -p'
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

if test -x / >/dev/null 2>&1; then
  as_test_x='test -x'
else
  if ls -dL / >/dev/null 2>&1; then
    as_ls_L_option=L
  else
    as_ls_L_option=
  fi
  as_test_x='
    eval sh -c '\''
      if test -d "$1"; then
	test -d "$1/.";
      else
	case $1 in #(
	-*)set "./$1";;
	esac;
	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
	???[sx]*):;;*)false;;esac;fi
    '\'' sh
  '
fi
as_executable_p=$as_test_x

# 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 $as_me, which was
generated by GNU Autoconf 2.68.  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 the package provider."

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
config.status
configured by $0, generated by GNU Autoconf 2.68,
  with options \\"\$ac_cs_config\\"

Copyright (C) 2010 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'
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
#


	USE_NLS=$USE_NLS
	use_our_messages=$use_our_messages



_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
    "$CONFIG_H") CONFIG_HEADERS="$CONFIG_HEADERS $CONFIG_H:config.hin" ;;
    "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
    "makefile") CONFIG_FILES="$CONFIG_FILES makefile" ;;
    "WWW/Library/Implementation/makefile") CONFIG_FILES="$CONFIG_FILES WWW/Library/Implementation/makefile" ;;
    "src/makefile") CONFIG_FILES="$CONFIG_FILES src/makefile" ;;
    "src/chrtrans/makefile") CONFIG_FILES="$CONFIG_FILES src/chrtrans/makefile" ;;
    "$SUB_MAKEFILE") CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILE" ;;
    "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
  ac_builddir=.

case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
  ac_dir_suffix=/`$as_echo "$ac_dir" | 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_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-1":C) for ac_file in $CONFIG_FILES; do

      # Support "outfile[:infile[:infile...]]"
      case "$ac_file" in
        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
      esac

      # PO directories have a Makefile.in generated from Makefile.inn.
      case "$ac_file" in */[Mm]akefile.in)
        # Adjust a relative srcdir.
        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
        ac_base=`basename $ac_file .in`
        # In autoconf-2.13 it is called $ac_given_srcdir.
        # In autoconf-2.50 it is called $srcdir.
        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"

        case "$ac_given_srcdir" in
          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
          /*) top_srcdir="$ac_given_srcdir" ;;
          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
        esac

        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
          rm -f "$ac_dir/POTFILES"
          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
          sed -e "/^#/d" -e "/^[ 	]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
          test -n "$as_me" && echo "$as_me: creating $ac_dir/$ac_base" || echo "creating $ac_dir/$ac_base"
          sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/$ac_base.in" > "$ac_dir/$ac_base"
        fi
        ;;
      esac
    done ;;
    "default":C)
	if test "$USE_NLS" = yes ; then
	if test "$use_our_messages" = yes ; then
		echo creating po/makefile
		rm -f	po/temp$$
		sed	-e 's%^.*LYMessages.c%	../LYMessages.c%' \
			-e '$s/\\//' po/POTFILES >po/temp$$
		sed	-e "/POTFILES =/r po/temp$$" \
			po/makefile.in > po/makefile
		rm -f	po/temp$$
	fi
	fi
	 ;;

  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

