#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.71 for GNU Emacs 30.1.90.
#
# Report bugs to <bug-gnu-emacs@gnu.org>.
#
#
# Copyright (C) 1992-1996, 1998-2017, 2020-2021 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
as_nop=:
if test ${ZSH_VERSION+y} && (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 $as_nop
  case `(set -o) 2>/dev/null` in #(
  *posix*) :
    set -o posix ;; #(
  *) :
     ;;
esac
fi



# Reset variables that may have inherited troublesome values from
# the environment.

# IFS needs to be set, to space, tab, and newline, in precisely that order.
# (If _AS_PATH_WALK were called with IFS unset, it would have the
# side effect of setting IFS to empty, thus disabling word splitting.)
# Quoting is to prevent editors from complaining about space-tab.
as_nl='
'
export as_nl
IFS=" ""	$as_nl"

PS1='$ '
PS2='> '
PS4='+ '

# Ensure predictable behavior from utilities with locale-dependent output.
LC_ALL=C
export LC_ALL
LANGUAGE=C
export LANGUAGE

# We cannot yet rely on "unset" to work, but we need these variables
# to be unset--not just set to an empty or harmless value--now, to
# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
# also avoids known problems related to "unset" and subshell syntax
# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
do eval test \${$as_var+y} \
  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
done

# Ensure that fds 0, 1, and 2 are open.
if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
if (exec 3>&2)            ; then :; else exec 2>/dev/null; fi

# The user is always right.
if ${PATH_SEPARATOR+false} :; 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


# 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
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    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
  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
  exit 1
fi


# Use a proper internal environment variable to ensure we don't fall
  # into an infinite loop, continuously re-executing ourselves.
  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
    _as_can_reexec=no; export _as_can_reexec;
    # We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
# works around shells that cannot unset nonexistent variables.
# Preserve -v and -x to the replacement shell.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
case $- in # ((((
  *v*x* | *x*v* ) as_opts=-vx ;;
  *v* ) as_opts=-v ;;
  *x* ) as_opts=-x ;;
  * ) as_opts= ;;
esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
exit 255
  fi
  # We don't want this to propagate to other subprocesses.
          { _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
  as_bourne_compatible="as_nop=:
if test \${ZSH_VERSION+y} && (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 \$as_nop
  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 \$as_nop
  exitcode=1; echo positional parameters were not saved.
fi
test x\$exitcode = x0 || exit 1
blah=\$(echo \$(echo blah))
test x\"\$blah\" = xblah || exit 1
test -x / || exit 1"
  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
test \$(( 1 + 1 )) = 2 || exit 1"
  if (eval "$as_required") 2>/dev/null
then :
  as_have_required=yes
else $as_nop
  as_have_required=no
fi
  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
then :

else $as_nop
  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
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
  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_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
then :
  CONFIG_SHELL=$as_shell as_have_required=yes
		   if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
then :
  break 2
fi
fi
	   done;;
       esac
  as_found=false
done
IFS=$as_save_IFS
if $as_found
then :

else $as_nop
  if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
	      as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
then :
  CONFIG_SHELL=$SHELL as_have_required=yes
fi
fi


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

    if test x$as_have_required = xno
then :
  printf "%s\n" "$0: This script requires a shell more modern than all"
  printf "%s\n" "$0: the shells that I found on your system."
  if test ${ZSH_VERSION+y} ; then
    printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
    printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
  else
    printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and
$0: bug-gnu-emacs@gnu.org about your system, including any
$0: error possibly output before this message. Then install
$0: a modern shell, or manually run the script under such a
$0: 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_nop
# ---------
# Do nothing but, unlike ":", preserve the value of $?.
as_fn_nop ()
{
  return $?
}
as_nop=as_fn_nop

# 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=`printf "%s\n" "$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 ||
printf "%s\n" X"$as_dir" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
      test -d "$as_dir" && break
    done
    test -z "$as_dirs" || eval "mkdir $as_dirs"
  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"


} # as_fn_mkdir_p

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

# as_fn_nop
# ---------
# Do nothing but, unlike ":", preserve the value of $?.
as_fn_nop ()
{
  return $?
}
as_nop=as_fn_nop

# 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
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
  fi
  printf "%s\n" "$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 ||
printf "%s\n" 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" ||
    { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }

  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
  # already done that, so ensure we don't try to do so again and fall
  # in an infinite loop.  This has already happened in practice.
  _as_can_reexec=no; export _as_can_reexec
  # Don't try to exec as it changes $[0], causing all sort of problems
  # (the dirname of $[0] is not the place where we might find the
  # original and so on.  Autoconf is especially sensitive to this).
  . "./$as_me.lineno"
  # Exit status is that of the last command.
  exit
}


# Determine whether it's possible to make 'echo' print without a newline.
# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
# for compatibility with existing Makefiles.
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

# For backward compatibility with old third-party macros, we provide
# the shell variables $as_echo and $as_echo_n.  New code should use
# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
as_echo='printf %s\n'
as_echo_n='printf %s'


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

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

as_test_x='test -x'
as_executable_p=as_fn_executable_p

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

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


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

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

#
# Initializations.
#
ac_default_prefix=/usr/local
ac_clean_files=
ac_config_libobj_dir=.
LIBOBJS=
cross_compiling=no
subdirs=
MFLAGS=
MAKEFLAGS=

# Identity of this package.
PACKAGE_NAME='GNU Emacs'
PACKAGE_TARNAME='emacs'
PACKAGE_VERSION='30.1.90'
PACKAGE_STRING='GNU Emacs 30.1.90'
PACKAGE_BUGREPORT='bug-gnu-emacs@gnu.org'
PACKAGE_URL='https://www.gnu.org/software/emacs/'

ac_unique_file="src/lisp.h"
# Factoring default headers for most tests.
ac_includes_default="\
#include <stddef.h>
#ifdef HAVE_STDIO_H
# include <stdio.h>
#endif
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#endif
#ifdef HAVE_STRING_H
# include <string.h>
#endif
#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
#endif
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif"

ac_header_c_list=
ac_func_c_list=
gl_getopt_required=POSIX
enable_year2038=yes
ac_subst_vars='gltests_LIBOBJDEPS
gltests_LTLIBOBJS
gltests_LIBOBJS
gl_LIBOBJDEPS
gl_LTLIBOBJS
gl_LIBOBJS
LTLIBOBJS
LIBOBJS
NDK_BUILD_READELF
NDK_BUILD_CFLAGS
NDK_BUILD_ANY_CXX_MODULE
NDK_BUILD_CXX_LDFLAGS
NDK_BUILD_CXX_STL
NDK_BUILD_CXX_SHARED
NDK_BUILD_MODULES
NDK_BUILD_AR
NDK_BUILD_CXX
NDK_BUILD_CC
NDK_BUILD_SDK
NDK_BUILD_ABI
NDK_BUILD_ARCH
NDK_BUILD_ANDROID_MK
SMALL_JA_DIC
SUBDIR_MAKEFILES_IN
ns_check_file
WINDOW_SYSTEM_OBJ
LD_SWITCH_SYSTEM_TEMACS
LIBGMP_CFLAGS
LIBGNU_LTLIBDEPS
LIBGNU_LIBDEPS
GL_CFLAG_GNULIB_WARNINGS
GL_CFLAG_ALLOW_WARNINGS
gltests_WITNESS
gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_CONDITION
gl_GNULIB_ENABLED_verify_CONDITION
gl_GNULIB_ENABLED_utimens_CONDITION
gl_GNULIB_ENABLED_strtoll_CONDITION
gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_CONDITION
gl_GNULIB_ENABLED_61bcaca76b3e6f9ae55d57a1c3193bc4_CONDITION
gl_GNULIB_ENABLED_d3b2383720ee0e541357aa2aac598e2b_CONDITION
gl_GNULIB_ENABLED_rawmemchr_CONDITION
gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_CONDITION
gl_GNULIB_ENABLED_open_CONDITION
gl_GNULIB_ENABLED_5264294aa0a5557541b53c8c741f7f31_CONDITION
gl_GNULIB_ENABLED_ef455225c00f5049c808c2eda3e76866_CONDITION
gl_GNULIB_ENABLED_e80bf6f757095d2e5fc94dafb8f8fc8b_CONDITION
gl_GNULIB_ENABLED_lchmod_CONDITION
gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_CONDITION
gl_GNULIB_ENABLED_8444034ea779b88768865bb60b4fb8c9_CONDITION
gl_GNULIB_ENABLED_fd38c7e463b54744b77b98aeafb4fa7c_CONDITION
gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_CONDITION
gl_GNULIB_ENABLED_getgroups_CONDITION
gl_GNULIB_ENABLED_getdtablesize_CONDITION
gl_GNULIB_ENABLED_getdelim_CONDITION
gl_GNULIB_ENABLED_euidaccess_CONDITION
gl_GNULIB_ENABLED_endian_CONDITION
gl_GNULIB_ENABLED_925677f0343de64b89a9f0c790b4104c_CONDITION
gl_GNULIB_ENABLED_dirfd_CONDITION
gl_GNULIB_ENABLED_cloexec_CONDITION
gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_CONDITION
GL_COND_OBJ_STRTOLL_CONDITION
GL_COND_OBJ_RAWMEMCHR_CONDITION
GL_COND_OBJ_OPEN_CONDITION
GL_COND_OBJ_LCHMOD_CONDITION
GL_COND_OBJ_GROUP_MEMBER_CONDITION
LTLIBINTL
LIBINTL
GL_COND_OBJ_GETGROUPS_CONDITION
GL_COND_OBJ_GETDTABLESIZE_CONDITION
GL_COND_OBJ_GETDELIM_CONDITION
LIB_EACCESS
EUIDACCESS_LIBGEN
GL_COND_OBJ_EUIDACCESS_CONDITION
GL_GENERATE_ENDIAN_H_CONDITION
ENDIAN_H
ENDIAN_H_JUST_MISSING_STDINT
HAVE_ENDIAN_H
NEXT_AS_FIRST_DIRECTIVE_ENDIAN_H
NEXT_ENDIAN_H
GL_COND_OBJ_DIRFD_CONDITION
GL_COND_OBJ_UTIMENSAT_CONDITION
HAVE_UNISTD_H
NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
NEXT_UNISTD_H
LIB_TIMER_TIME
TIMER_TIME_LIB
GL_COND_OBJ_TIMEGM_CONDITION
GL_COND_OBJ_TIME_RZ_CONDITION
GL_COND_OBJ_TIME_R_CONDITION
TIME_H_DEFINES_TIME_UTC
UNISTD_H_DEFINES_STRUCT_TIMESPEC
PTHREAD_H_DEFINES_STRUCT_TIMESPEC
SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
TIME_H_DEFINES_STRUCT_TIMESPEC
NEXT_AS_FIRST_DIRECTIVE_TIME_H
NEXT_TIME_H
WINDOWS_STAT_INODES
HAVE_OFF64_T
WINDOWS_64_BIT_OFF_T
NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
NEXT_SYS_TYPES_H
WINDOWS_64_BIT_ST_SIZE
WINDOWS_STAT_TIMESPEC
NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
NEXT_SYS_STAT_H
HAVE_SYS_RANDOM_H
NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H
NEXT_SYS_RANDOM_H
GL_COND_OBJ_SYMLINK_CONDITION
GL_COND_OBJ_STRTOIMAX_CONDITION
GL_COND_OBJ_STRNLEN_CONDITION
NEXT_AS_FIRST_DIRECTIVE_STRING_H
NEXT_STRING_H
GL_COND_OBJ_STPCPY_CONDITION
NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
NEXT_STDLIB_H
GL_COND_OBJ_STDIO_WRITE_CONDITION
GL_COND_OBJ_STDIO_READ_CONDITION
NEXT_AS_FIRST_DIRECTIVE_STDIO_H
NEXT_STDIO_H
GL_GENERATE_STDINT_H_CONDITION
STDINT_H
GL_GENERATE_STDDEF_H_CONDITION
STDDEF_H
NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
NEXT_STDDEF_H
HAVE_WCHAR_T
HAVE_MAX_ALIGN_T
REPLACE_NULL
STDDEF_NOT_IDEMPOTENT
NULLPTR_T_NEEDS_STDDEF
GL_GENERATE_STDCKDINT_H_CONDITION
STDCKDINT_H
GL_GENERATE_STDBIT_H_CONDITION
STDBIT_H
GL_STDC_BIT_CEIL
GL_STDC_BIT_FLOOR
GL_STDC_BIT_WIDTH
GL_STDC_HAS_SINGLE_BIT
GL_STDC_COUNT_ONES
GL_STDC_COUNT_ZEROS
GL_STDC_FIRST_TRAILING_ONE
GL_STDC_FIRST_TRAILING_ZERO
GL_STDC_FIRST_LEADING_ONE
GL_STDC_FIRST_LEADING_ZERO
GL_STDC_TRAILING_ONES
GL_STDC_TRAILING_ZEROS
GL_STDC_LEADING_ONES
GL_STDC_LEADING_ZEROS
NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
NEXT_SIGNAL_H
GL_COND_OBJ_SIGDESCR_NP_CONDITION
GL_COND_OBJ_SIG2STR_CONDITION
GL_COND_OBJ_REGEX_CONDITION
GL_COND_OBJ_READLINKAT_CONDITION
GL_COND_OBJ_READLINK_CONDITION
QCOPY_ACL_LIB
LIB_XATTR
GL_GNULIB_SIGACTION
GL_GNULIB_SIGPROCMASK
GL_GNULIB_SIGNAL_H_SIGPIPE
GL_GNULIB_RAISE
GL_GNULIB_PTHREAD_SIGMASK
GL_COND_OBJ_PTHREAD_SIGMASK_CONDITION
LIB_PTHREAD_SIGMASK
PTHREAD_SIGMASK_LIB
REPLACE_RAISE
REPLACE_PTHREAD_SIGMASK
HAVE_SIGHANDLER_T
HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
HAVE_STRUCT_SIGACTION_SA_SIGACTION
HAVE_SIGACTION
HAVE_SIGINFO_T
HAVE_SIGSET_T
HAVE_RAISE
HAVE_PTHREAD_SIGMASK
HAVE_POSIX_SIGNALBLOCKING
GL_GNULIB_SELECT
GL_GNULIB_PSELECT
GL_COND_OBJ_PSELECT_CONDITION
HAVE_SYS_SELECT_H
NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
NEXT_SYS_SELECT_H
REPLACE_SELECT
REPLACE_PSELECT
HAVE_PSELECT
GL_COND_OBJ_NANOSLEEP_CONDITION
LIB_NANOSLEEP
NANOSLEEP_LIB
GL_GNULIB_MDA_TZSET
GL_GNULIB_TZSET
GL_GNULIB_TIME_RZ
GL_GNULIB_TIME_R
GL_GNULIB_TIMESPEC_GETRES
GL_GNULIB_TIMESPEC_GET
GL_GNULIB_TIMEGM
GL_GNULIB_TIME
GL_GNULIB_STRPTIME
GL_GNULIB_STRFTIME
GL_GNULIB_NANOSLEEP
GL_GNULIB_LOCALTIME
GL_GNULIB_MKTIME
GL_GNULIB_CTIME
REPLACE_TZSET
REPLACE_TIMESPEC_GETRES
REPLACE_TIMESPEC_GET
REPLACE_TIMEGM
REPLACE_TIME
REPLACE_STRFTIME
REPLACE_NANOSLEEP
REPLACE_MKTIME
REPLACE_LOCALTIME_R
REPLACE_LOCALTIME
REPLACE_GMTIME
REPLACE_CTIME
HAVE_TIMEZONE_T
HAVE_TIMESPEC_GETRES
HAVE_TIMESPEC_GET
HAVE_TIMEGM
HAVE_STRPTIME
HAVE_NANOSLEEP
HAVE_DECL_LOCALTIME_R
GL_COND_OBJ_MKOSTEMP_CONDITION
GL_COND_OBJ_MEMSET_EXPLICIT_CONDITION
GL_COND_OBJ_MEMRCHR_CONDITION
GL_COND_OBJ_MEMPCPY_CONDITION
GL_GNULIB_MDA_STRDUP
GL_GNULIB_MDA_MEMCCPY
GL_GNULIB_STRVERSCMP
GL_GNULIB_STRSIGNAL
GL_GNULIB_SIGDESCR_NP
GL_GNULIB_SIGABBREV_NP
GL_GNULIB_STRERRORNAME_NP
GL_GNULIB_STRERROR_R
GL_GNULIB_STRERROR
GL_GNULIB_MBSTOK_R
GL_GNULIB_MBSSEP
GL_GNULIB_MBSSPN
GL_GNULIB_MBSPBRK
GL_GNULIB_MBSCSPN
GL_GNULIB_MBSCASESTR
GL_GNULIB_MBSPCASECMP
GL_GNULIB_MBSNCASECMP
GL_GNULIB_MBSCASECMP
GL_GNULIB_MBSSTR
GL_GNULIB_MBSRCHR
GL_GNULIB_MBSCHR
GL_GNULIB_MBSNLEN
GL_GNULIB_MBSLEN
GL_GNULIB_STRTOK_R
GL_GNULIB_STRCASESTR
GL_GNULIB_STRSTR
GL_GNULIB_STRSEP
GL_GNULIB_STRPBRK
GL_GNULIB_STRNLEN
GL_GNULIB_STRNDUP
GL_GNULIB_STRNCAT
GL_GNULIB_STRDUP
GL_GNULIB_STRCHRNUL
GL_GNULIB_STPNCPY
GL_GNULIB_STPCPY
GL_GNULIB_RAWMEMCHR
GL_GNULIB_MEMSET_EXPLICIT
GL_GNULIB_MEMRCHR
GL_GNULIB_MEMPCPY
GL_GNULIB_MEMMEM
GL_GNULIB_MEMCHR
GL_GNULIB_FFSLL
GL_GNULIB_FFSL
GL_GNULIB_EXPLICIT_BZERO
UNDEFINE_STRTOK_R
REPLACE_STRVERSCMP
REPLACE_STRSIGNAL
REPLACE_STRERRORNAME_NP
REPLACE_STRERROR_R
REPLACE_STRERROR
REPLACE_STRTOK_R
REPLACE_STRCASESTR
REPLACE_STRSTR
REPLACE_STRNLEN
REPLACE_STRNDUP
REPLACE_STRNCAT
REPLACE_STRDUP
REPLACE_STRCHRNUL
REPLACE_STPNCPY
REPLACE_STPCPY
REPLACE_MEMSET_EXPLICIT
REPLACE_MEMPCPY
REPLACE_MEMMEM
REPLACE_MEMCHR
REPLACE_FFSLL
HAVE_STRVERSCMP
HAVE_DECL_STRSIGNAL
HAVE_SIGDESCR_NP
HAVE_SIGABBREV_NP
HAVE_STRERRORNAME_NP
HAVE_DECL_STRERROR_R
HAVE_DECL_STRTOK_R
HAVE_STRCASESTR
HAVE_STRSEP
HAVE_STRPBRK
HAVE_DECL_STRNLEN
HAVE_DECL_STRNDUP
HAVE_DECL_STRDUP
HAVE_STRCHRNUL
HAVE_STPNCPY
HAVE_STPCPY
HAVE_RAWMEMCHR
HAVE_DECL_MEMRCHR
HAVE_MEMSET_EXPLICIT
HAVE_MEMPCPY
HAVE_DECL_MEMMEM
HAVE_FFSLL
HAVE_FFSL
HAVE_EXPLICIT_BZERO
HAVE_MBSLEN
GL_COND_OBJ_LSTAT_CONDITION
GL_GENERATE_LIMITS_H_CONDITION
LIMITS_H
GL_COND_OBJ_MINI_GMP_GNULIB_CONDITION
GL_GENERATE_GMP_H_CONDITION
GMP_H
GL_GENERATE_GMP_GMP_H_CONDITION
GL_GENERATE_MINI_GMP_H_CONDITION
LTLIBGMP
LIBGMP
HAVE_LIBGMP
GL_GNULIB_STRTOUMAX
GL_GNULIB_STRTOIMAX
GL_GNULIB_IMAXDIV
GL_GNULIB_IMAXABS
NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
NEXT_INTTYPES_H
UINT64_MAX_EQ_ULONG_MAX
UINT32_MAX_LT_UINTMAX_MAX
PRIPTR_PREFIX
INT64_MAX_EQ_LONG_MAX
INT32_MAX_LT_INTMAX_MAX
REPLACE_STRTOUMAX
REPLACE_STRTOIMAX
REPLACE_IMAXDIV
REPLACE_IMAXABS
HAVE_IMAXDIV
HAVE_IMAXABS
HAVE_IMAXDIV_T
HAVE_DECL_STRTOUMAX
HAVE_DECL_STRTOIMAX
HAVE_DECL_IMAXDIV
HAVE_DECL_IMAXABS
HAVE_SYS_INTTYPES_H
HAVE_SYS_BITYPES_H
HAVE_C99_STDINT_H
WINT_T_SUFFIX
WCHAR_T_SUFFIX
SIG_ATOMIC_T_SUFFIX
SIZE_T_SUFFIX
PTRDIFF_T_SUFFIX
HAVE_SIGNED_WINT_T
HAVE_SIGNED_WCHAR_T
HAVE_SIGNED_SIG_ATOMIC_T
BITSIZEOF_WINT_T
BITSIZEOF_WCHAR_T
BITSIZEOF_SIG_ATOMIC_T
BITSIZEOF_SIZE_T
BITSIZEOF_PTRDIFF_T
APPLE_UNIVERSAL_BUILD
HAVE_STDINT_H
NEXT_AS_FIRST_DIRECTIVE_STDINT_H
NEXT_STDINT_H
HAVE_SYS_TYPES_H
HAVE_INTTYPES_H
HAVE_WCHAR_H
GNULIBHEADERS_OVERRIDE_WINT_T
NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
NEXT_LIMITS_H
GL_GENERATE_IEEE754_H_CONDITION
IEEE754_H
GL_GNULIB_GETTIMEOFDAY
GL_COND_OBJ_GETTIMEOFDAY_CONDITION
HAVE_WINSOCK2_H
NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
NEXT_SYS_TIME_H
REPLACE_STRUCT_TIMEVAL
REPLACE_GETTIMEOFDAY
HAVE_SYS_TIME_H
HAVE_STRUCT_TIMEVAL
HAVE_GETTIMEOFDAY
GL_GNULIB_GETRANDOM
GL_COND_OBJ_GETRANDOM_CONDITION
LIB_GETRANDOM
GETRANDOM_LIB
REPLACE_GETRANDOM
HAVE_GETRANDOM
GL_COND_OBJ_GETOPT_CONDITION
GL_GENERATE_GETOPT_CDEFS_H_CONDITION
GETOPT_CDEFS_H
GL_GENERATE_GETOPT_H_CONDITION
GETOPT_H
HAVE_SYS_CDEFS_H
HAVE_GETOPT_H
NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
NEXT_GETOPT_H
AWK
GL_COND_OBJ_GETLOADAVG_CONDITION
GETLOADAVG_LIBS
GL_GNULIB_MDA_TEMPNAM
GL_GNULIB_MDA_PUTW
GL_GNULIB_MDA_GETW
GL_GNULIB_MDA_FILENO
GL_GNULIB_MDA_FDOPEN
GL_GNULIB_MDA_FCLOSEALL
GL_GNULIB_VSPRINTF_POSIX
GL_GNULIB_VSNPRINTF
GL_GNULIB_VPRINTF_POSIX
GL_GNULIB_VPRINTF
GL_GNULIB_VFPRINTF_POSIX
GL_GNULIB_VFPRINTF
GL_GNULIB_VDPRINTF
GL_GNULIB_VSCANF
GL_GNULIB_VFSCANF
GL_GNULIB_VASPRINTF
GL_GNULIB_TMPFILE
GL_GNULIB_STDIO_H_SIGPIPE
GL_GNULIB_STDIO_H_NONBLOCKING
GL_GNULIB_SPRINTF_POSIX
GL_GNULIB_SNPRINTF
GL_GNULIB_SCANF
GL_GNULIB_RENAMEAT
GL_GNULIB_RENAME
GL_GNULIB_REMOVE
GL_GNULIB_PUTS
GL_GNULIB_PUTCHAR
GL_GNULIB_PUTC
GL_GNULIB_PRINTF_POSIX
GL_GNULIB_PRINTF
GL_GNULIB_POPEN
GL_GNULIB_PERROR
GL_GNULIB_PCLOSE
GL_GNULIB_OBSTACK_PRINTF_POSIX
GL_GNULIB_OBSTACK_PRINTF
GL_GNULIB_GETLINE
GL_GNULIB_GETDELIM
GL_GNULIB_GETCHAR
GL_GNULIB_GETC
GL_GNULIB_FWRITE
GL_GNULIB_FTELLO
GL_GNULIB_FTELL
GL_GNULIB_FSEEKO
GL_GNULIB_FSEEK
GL_GNULIB_FSCANF
GL_GNULIB_FREOPEN
GL_GNULIB_FREAD
GL_GNULIB_FPUTS
GL_GNULIB_FPUTC
GL_GNULIB_FPURGE
GL_GNULIB_FPRINTF_POSIX
GL_GNULIB_FPRINTF
GL_GNULIB_FOPEN_GNU
GL_GNULIB_FOPEN
GL_GNULIB_FGETS
GL_GNULIB_FGETC
GL_GNULIB_FFLUSH
GL_GNULIB_FDOPEN
GL_GNULIB_FCLOSE
GL_GNULIB_DPRINTF
GL_COND_OBJ_GETLINE_CONDITION
REPLACE_VSPRINTF
REPLACE_VSNPRINTF
REPLACE_VPRINTF
REPLACE_VFPRINTF
REPLACE_VDPRINTF
REPLACE_VASPRINTF
REPLACE_TMPFILE
REPLACE_STDIO_WRITE_FUNCS
REPLACE_STDIO_READ_FUNCS
REPLACE_SPRINTF
REPLACE_SNPRINTF
REPLACE_RENAMEAT
REPLACE_RENAME
REPLACE_REMOVE
REPLACE_PRINTF
REPLACE_POPEN
REPLACE_PERROR
REPLACE_OBSTACK_PRINTF
REPLACE_GETLINE
REPLACE_GETDELIM
REPLACE_FTELLO
REPLACE_FTELL
REPLACE_FSEEKO
REPLACE_FSEEK
REPLACE_FREOPEN
REPLACE_FPURGE
REPLACE_FPRINTF
REPLACE_FOPEN_FOR_FOPEN_GNU
REPLACE_FOPEN
REPLACE_FFLUSH
REPLACE_FDOPEN
REPLACE_FCLOSE
REPLACE_DPRINTF
HAVE_VDPRINTF
HAVE_VASPRINTF
HAVE_RENAMEAT
HAVE_POPEN
HAVE_PCLOSE
HAVE_FTELLO
HAVE_FSEEKO
HAVE_DPRINTF
HAVE_DECL_VSNPRINTF
HAVE_DECL_SNPRINTF
HAVE_DECL_PUTW
HAVE_DECL_OBSTACK_PRINTF
HAVE_DECL_GETW
HAVE_DECL_GETLINE
HAVE_DECL_GETDELIM
HAVE_DECL_FTELLO
HAVE_DECL_FSEEKO
HAVE_DECL_FPURGE
HAVE_DECL_FCLOSEALL
GL_COND_OBJ_FUTIMENS_CONDITION
GL_COND_OBJ_FSYNC_CONDITION
GL_COND_OBJ_FSUSAGE_CONDITION
GL_COND_OBJ_FSTATAT_CONDITION
GL_COND_OBJ_FREE_CONDITION
GL_COND_OBJ_FPENDING_CONDITION
FILE_HAS_ACL_LIB
GL_COND_OBJ_FDOPENDIR_CONDITION
NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
NEXT_FCNTL_H
GL_GNULIB_MDA_OPEN
GL_GNULIB_MDA_CREAT
GL_GNULIB_OPENAT
GL_GNULIB_OPEN
GL_GNULIB_NONBLOCKING
GL_GNULIB_FCNTL
GL_GNULIB_CREAT
GL_COND_OBJ_FCNTL_CONDITION
REPLACE_OPENAT
REPLACE_OPEN
REPLACE_FCNTL
REPLACE_CREAT
HAVE_OPENAT
HAVE_FCNTL
GL_GNULIB_MDA_UMASK
GL_GNULIB_MDA_MKDIR
GL_GNULIB_MDA_CHMOD
GL_GNULIB_OVERRIDES_STRUCT_STAT
GL_GNULIB_UTIMENSAT
GL_GNULIB_STAT
GL_GNULIB_MKNODAT
GL_GNULIB_MKNOD
GL_GNULIB_MKFIFOAT
GL_GNULIB_MKFIFO
GL_GNULIB_MKDIRAT
GL_GNULIB_MKDIR
GL_GNULIB_LSTAT
GL_GNULIB_LCHMOD
GL_GNULIB_GETUMASK
GL_GNULIB_FUTIMENS
GL_GNULIB_FSTATAT
GL_GNULIB_FSTAT
GL_GNULIB_FCHMODAT
GL_GNULIB_CHMOD
GL_COND_OBJ_FCHMODAT_CONDITION
REPLACE_UTIMENSAT
REPLACE_STAT
REPLACE_MKNODAT
REPLACE_MKNOD
REPLACE_MKFIFOAT
REPLACE_MKFIFO
REPLACE_MKDIR
REPLACE_LSTAT
REPLACE_FUTIMENS
REPLACE_FSTATAT
REPLACE_FSTAT
REPLACE_FCHMODAT
REPLACE_CHMOD
HAVE_UTIMENSAT
HAVE_MKNODAT
HAVE_MKNOD
HAVE_MKFIFOAT
HAVE_MKFIFO
HAVE_MKDIRAT
HAVE_LSTAT
HAVE_LCHMOD
HAVE_GETUMASK
HAVE_FUTIMENS
HAVE_FSTATAT
HAVE_FCHMODAT
GL_COND_OBJ_FACCESSAT_CONDITION
GL_COND_OBJ_EXECINFO_CONDITION
GL_GENERATE_EXECINFO_H_CONDITION
EXECINFO_H
LIB_EXECINFO
GL_GENERATE_ERRNO_H_CONDITION
ERRNO_H
EOVERFLOW_VALUE
EOVERFLOW_HIDDEN
ENOLINK_VALUE
ENOLINK_HIDDEN
EMULTIHOP_VALUE
EMULTIHOP_HIDDEN
NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
NEXT_ERRNO_H
GL_COND_OBJ_DUP2_CONDITION
GL_GNULIB_ALPHASORT
GL_GNULIB_SCANDIR
GL_GNULIB_FDOPENDIR
GL_GNULIB_DIRFD
GL_GNULIB_CLOSEDIR
GL_GNULIB_REWINDDIR
GL_GNULIB_READDIR
GL_GNULIB_OPENDIR
DIR_HAS_FD_MEMBER
HAVE_DIRENT_H
NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
NEXT_DIRENT_H
REPLACE_FDOPENDIR
REPLACE_DIRFD
REPLACE_CLOSEDIR
REPLACE_REWINDDIR
REPLACE_READDIR
REPLACE_OPENDIR
HAVE_ALPHASORT
HAVE_SCANDIR
HAVE_FDOPENDIR
HAVE_DECL_FDOPENDIR
HAVE_DECL_DIRFD
HAVE_CLOSEDIR
HAVE_REWINDDIR
HAVE_READDIR
HAVE_OPENDIR
GL_GNULIB_MDA_WRITE
GL_GNULIB_MDA_UNLINK
GL_GNULIB_MDA_SWAB
GL_GNULIB_MDA_RMDIR
GL_GNULIB_MDA_READ
GL_GNULIB_MDA_LSEEK
GL_GNULIB_MDA_ISATTY
GL_GNULIB_MDA_GETPID
GL_GNULIB_MDA_GETCWD
GL_GNULIB_MDA_EXECVPE
GL_GNULIB_MDA_EXECVP
GL_GNULIB_MDA_EXECVE
GL_GNULIB_MDA_EXECV
GL_GNULIB_MDA_EXECLP
GL_GNULIB_MDA_EXECLE
GL_GNULIB_MDA_EXECL
GL_GNULIB_MDA_DUP2
GL_GNULIB_MDA_DUP
GL_GNULIB_MDA_CLOSE
GL_GNULIB_MDA_CHDIR
GL_GNULIB_MDA_ACCESS
GL_GNULIB_WRITE
GL_GNULIB_USLEEP
GL_GNULIB_UNLINKAT
GL_GNULIB_UNLINK
GL_GNULIB_UNISTD_H_SIGPIPE
GL_GNULIB_UNISTD_H_NONBLOCKING
GL_GNULIB_UNISTD_H_GETOPT
GL_GNULIB_TTYNAME_R
GL_GNULIB_TRUNCATE
GL_GNULIB_SYMLINKAT
GL_GNULIB_SYMLINK
GL_GNULIB_SLEEP
GL_GNULIB_SETHOSTNAME
GL_GNULIB_RMDIR
GL_GNULIB_READLINKAT
GL_GNULIB_READLINK
GL_GNULIB_READ
GL_GNULIB_PWRITE
GL_GNULIB_PREAD
GL_GNULIB_PIPE2
GL_GNULIB_PIPE
GL_GNULIB_LSEEK
GL_GNULIB_LINKAT
GL_GNULIB_LINK
GL_GNULIB_LCHOWN
GL_GNULIB_ISATTY
GL_GNULIB_GROUP_MEMBER
GL_GNULIB_GETUSERSHELL
GL_GNULIB_GETPASS_GNU
GL_GNULIB_GETPASS
GL_GNULIB_GETPAGESIZE
GL_GNULIB_GETOPT_POSIX
GL_GNULIB_GETLOGIN_R
GL_GNULIB_GETLOGIN
GL_GNULIB_GETHOSTNAME
GL_GNULIB_GETGROUPS
GL_GNULIB_GETENTROPY
GL_GNULIB_GETDTABLESIZE
GL_GNULIB_GETDOMAINNAME
GL_GNULIB_GETCWD
GL_GNULIB_FTRUNCATE
GL_GNULIB_FSYNC
GL_GNULIB_FDATASYNC
GL_GNULIB_FCHOWNAT
GL_GNULIB_FCHDIR
GL_GNULIB_FACCESSAT
GL_GNULIB_EXECVPE
GL_GNULIB_EXECVP
GL_GNULIB_EXECVE
GL_GNULIB_EXECV
GL_GNULIB_EXECLP
GL_GNULIB_EXECLE
GL_GNULIB_EXECL
GL_GNULIB_EUIDACCESS
GL_GNULIB_ENVIRON
GL_GNULIB_DUP3
GL_GNULIB_DUP2
GL_GNULIB_DUP
GL_GNULIB_COPY_FILE_RANGE
GL_GNULIB_CLOSE
GL_GNULIB_CHOWN
GL_GNULIB_CHDIR
GL_GNULIB_ACCESS
GL_COND_OBJ_COPY_FILE_RANGE_CONDITION
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
UNISTD_H_HAVE_WINSOCK2_H
UNISTD_H_HAVE_SYS_RANDOM_H
REPLACE_WRITE
REPLACE_USLEEP
REPLACE_UNLINKAT
REPLACE_UNLINK
REPLACE_TTYNAME_R
REPLACE_TRUNCATE
REPLACE_SYMLINKAT
REPLACE_SYMLINK
REPLACE_SLEEP
REPLACE_SETHOSTNAME
REPLACE_RMDIR
REPLACE_READLINKAT
REPLACE_READLINK
REPLACE_READ
REPLACE_PWRITE
REPLACE_PREAD
REPLACE_PIPE2
REPLACE_LSEEK
REPLACE_LINKAT
REPLACE_LINK
REPLACE_LCHOWN
REPLACE_ISATTY
REPLACE_GETUSERSHELL
REPLACE_GETPASS_FOR_GETPASS_GNU
REPLACE_GETPASS
REPLACE_GETPAGESIZE
REPLACE_GETGROUPS
REPLACE_GETLOGIN_R
REPLACE_GETENTROPY
REPLACE_GETDTABLESIZE
REPLACE_GETDOMAINNAME
REPLACE_GETCWD
REPLACE_FTRUNCATE
REPLACE_FDATASYNC
REPLACE_FCHOWNAT
REPLACE_FCHDIR
REPLACE_FACCESSAT
REPLACE_EXECVPE
REPLACE_EXECVP
REPLACE_EXECVE
REPLACE_EXECV
REPLACE_EXECLP
REPLACE_EXECLE
REPLACE_EXECL
REPLACE_DUP3
REPLACE_DUP2
REPLACE_DUP
REPLACE_COPY_FILE_RANGE
REPLACE_CLOSE
REPLACE_CHOWN
REPLACE_ACCESS
HAVE_SYS_PARAM_H
HAVE_OS_H
HAVE_DECL_TTYNAME_R
HAVE_DECL_TRUNCATE
HAVE_DECL_SETHOSTNAME
HAVE_DECL_GETUSERSHELL
HAVE_DECL_GETPAGESIZE
HAVE_DECL_GETLOGIN_R
HAVE_DECL_GETLOGIN
HAVE_DECL_GETDOMAINNAME
HAVE_DECL_FDATASYNC
HAVE_DECL_FCHDIR
HAVE_DECL_EXECVPE
HAVE_DECL_ENVIRON
HAVE_USLEEP
HAVE_UNLINKAT
HAVE_SYMLINKAT
HAVE_SYMLINK
HAVE_SLEEP
HAVE_SETHOSTNAME
HAVE_READLINKAT
HAVE_READLINK
HAVE_PWRITE
HAVE_PREAD
HAVE_PIPE2
HAVE_PIPE
HAVE_LINKAT
HAVE_LINK
HAVE_LCHOWN
HAVE_GROUP_MEMBER
HAVE_GETPASS
HAVE_GETPAGESIZE
HAVE_GETLOGIN
HAVE_GETHOSTNAME
HAVE_GETGROUPS
HAVE_GETENTROPY
HAVE_GETDTABLESIZE
HAVE_FTRUNCATE
HAVE_FSYNC
HAVE_FDATASYNC
HAVE_FCHOWNAT
HAVE_FCHDIR
HAVE_FACCESSAT
HAVE_EXECVPE
HAVE_EUIDACCESS
HAVE_DUP3
HAVE_COPY_FILE_RANGE
HAVE_CHOWN
LIB_CLOCK_GETTIME
CLOCK_TIME_LIB
GL_GNULIB_MDA_PUTENV
GL_GNULIB_MDA_MKTEMP
GL_GNULIB_MDA_GCVT
GL_GNULIB_MDA_FCVT
GL_GNULIB_MDA_ECVT
GL_GNULIB_WCTOMB
GL_GNULIB_UNSETENV
GL_GNULIB_UNLOCKPT
GL_GNULIB_SYSTEM_POSIX
GL_GNULIB_STRTOULL
GL_GNULIB_STRTOUL
GL_GNULIB_STRTOLL
GL_GNULIB_STRTOLD
GL_GNULIB_STRTOL
GL_GNULIB_STRTOF
GL_GNULIB_STRTOD
GL_GNULIB_SETENV
GL_GNULIB_SECURE_GETENV
GL_GNULIB_RPMATCH
GL_GNULIB_REALPATH
GL_GNULIB_REALLOC_POSIX
GL_GNULIB_REALLOC_GNU
GL_GNULIB_REALLOCARRAY
GL_GNULIB_RANDOM_R
GL_GNULIB_RANDOM
GL_GNULIB_RAND
GL_GNULIB_QSORT_R
GL_GNULIB_PUTENV
GL_GNULIB_PTSNAME_R
GL_GNULIB_PTSNAME
GL_GNULIB_POSIX_OPENPT
GL_GNULIB_POSIX_MEMALIGN
GL_GNULIB_MKSTEMPS
GL_GNULIB_MKSTEMP
GL_GNULIB_MKOSTEMPS
GL_GNULIB_MKOSTEMP
GL_GNULIB_MKDTEMP
GL_GNULIB_MBTOWC
GL_GNULIB_MBSTOWCS
GL_GNULIB_MALLOC_POSIX
GL_GNULIB_MALLOC_GNU
GL_GNULIB_GRANTPT
GL_GNULIB_GETSUBOPT
GL_GNULIB_GETPROGNAME
GL_GNULIB_GETLOADAVG
GL_GNULIB_FREE_POSIX
GL_GNULIB_CANONICALIZE_FILE_NAME
GL_GNULIB_CALLOC_POSIX
GL_GNULIB_CALLOC_GNU
GL_GNULIB_ATOLL
GL_GNULIB_ALIGNED_ALLOC
GL_GNULIB_ABORT_DEBUG
GL_GNULIB__EXIT
GL_COND_OBJ_CANONICALIZE_LGPL_CONDITION
REPLACE_WCTOMB
REPLACE_UNSETENV
REPLACE_STRTOULL
REPLACE_STRTOUL
REPLACE_STRTOLL
REPLACE_STRTOLD
REPLACE_STRTOL
REPLACE_STRTOF
REPLACE_STRTOD
REPLACE_SETSTATE
REPLACE_SETENV
REPLACE_REALPATH
REPLACE_REALLOCARRAY
REPLACE_REALLOC_FOR_REALLOC_POSIX
REPLACE_REALLOC_FOR_REALLOC_GNU
REPLACE_RANDOM_R
REPLACE_RANDOM
REPLACE_RAND
REPLACE_QSORT_R
REPLACE_PUTENV
REPLACE_PTSNAME_R
REPLACE_PTSNAME
REPLACE_POSIX_OPENPT
REPLACE_POSIX_MEMALIGN
REPLACE_MKSTEMP
REPLACE_MKOSTEMPS
REPLACE_MKOSTEMP
REPLACE_MBTOWC
REPLACE_MBSTOWCS
REPLACE_MB_CUR_MAX
REPLACE_MALLOC_FOR_MALLOC_POSIX
REPLACE_MALLOC_FOR_MALLOC_GNU
REPLACE_INITSTATE
REPLACE_GETSUBOPT
REPLACE_GETPROGNAME
REPLACE_GETLOADAVG
REPLACE_FREE
REPLACE_CANONICALIZE_FILE_NAME
REPLACE_CALLOC_FOR_CALLOC_POSIX
REPLACE_CALLOC_FOR_CALLOC_GNU
REPLACE_ALIGNED_ALLOC
REPLACE_ABORT
REPLACE__EXIT
HAVE_DECL_UNSETENV
HAVE_UNLOCKPT
HAVE_SYS_LOADAVG_H
HAVE_STRUCT_RANDOM_DATA
HAVE_STRTOULL
HAVE_STRTOUL
HAVE_STRTOLL
HAVE_STRTOLD
HAVE_STRTOL
HAVE_STRTOF
HAVE_STRTOD
HAVE_DECL_SETSTATE
HAVE_SETSTATE
HAVE_DECL_SETENV
HAVE_SETENV
HAVE_SECURE_GETENV
HAVE_RPMATCH
HAVE_REALPATH
HAVE_REALLOCARRAY
HAVE_RANDOM_R
HAVE_RANDOM_H
HAVE_RANDOM
HAVE_QSORT_R
HAVE_PTSNAME_R
HAVE_PTSNAME
HAVE_POSIX_OPENPT
HAVE_POSIX_MEMALIGN
HAVE_MKSTEMPS
HAVE_MKSTEMP
HAVE_MKOSTEMPS
HAVE_MKOSTEMP
HAVE_MKDTEMP
HAVE_MBTOWC
HAVE_DECL_INITSTATE
HAVE_INITSTATE
HAVE_GRANTPT
HAVE_GETSUBOPT
HAVE_GETPROGNAME
HAVE_DECL_PROGRAM_INVOCATION_NAME
HAVE_DECL_GETLOADAVG
HAVE_DECL_GCVT
HAVE_DECL_FCVT
HAVE_DECL_ECVT
HAVE_CANONICALIZE_FILE_NAME
HAVE_ATOLL
HAVE_ALIGNED_ALLOC
HAVE__EXIT
GL_GENERATE_BYTESWAP_H_CONDITION
BYTESWAP_H
GL_GENERATE_ASSERT_H_CONDITION
ASSERT_H
NEXT_AS_FIRST_DIRECTIVE_ASSERT_H
NEXT_ASSERT_H
PRAGMA_COLUMNS
PRAGMA_SYSTEM_HEADER
INCLUDE_NEXT_AS_FIRST_DIRECTIVE
INCLUDE_NEXT
MKDIR_P
GL_GENERATE_ALLOCA_H_CONDITION
ALLOCA_H
HAVE_ALLOCA_H
ALLOCA
USE_ACL
LIB_ACL
GL_COND_LIBTOOL_CONDITION
POST_ALLOC_OBJ
PRE_ALLOC_OBJ
CYGWIN_OBJ
RALLOC_OBJ
LIBXMENU
LIBX_OTHER
LIBXT_OTHER
TOOLKIT_LIBW
WIDGET_OBJ
XOBJ
XMENU_OBJ
FONT_OBJ
OTHER_FILES
GNU_OBJC_CFLAGS
ns_appsrc
ns_appresdir
ns_applibdir
ns_applibexecdir
ns_appbindir
ns_appdir
X_TOOLKIT_TYPE
GNUSTEP_CFLAGS
C_SWITCH_X_SITE
LD_SWITCH_X_SITE
gamegroup
gameuser
gamedir
bitmapdir
etcdocdir
archlibdir
etcdir
x_default_search_path
lisppath
locallisppath
standardlisppath
lispdir
lispdirrel
gsettingsschemadir
srcdir
canonical
configuration
version
copyright
SEPCHAR
XGSELOBJ
HAVE_DECL_POSIX_SPAWN_SETSID
HAVE_POSIX_SPAWNATTR_SETFLAGS
HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR_NP
HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR
HAVE_POSIX_SPAWN
HAVE_SPAWN_H
KRB4LIB
DESLIB
KRB5LIB
CRYPTOLIB
COM_ERRLIB
LIBRESOLV
LIBHESIOD
TERMCAP_OBJ
LIBS_TERMCAP
SIZEOF_LONG
HAVE_LIBSECCOMP
LIBSECCOMP_LIBS
LIBSECCOMP_CFLAGS
HAVE_SECCOMP
LIBS_MAIL
BLESSMAIL_TARGET
liblockfile
LIBXML2_LIBS
LIBXML2_CFLAGS
XCOMPOSITE_LIBS
XCOMPOSITE_CFLAGS
XSHAPE_LIBS
XSHAPE_CFLAGS
XDBE_LIBS
XDBE_CFLAGS
XSYNC_CFLAGS
XSYNC_LIBS
XINPUT_LIBS
XINPUT_CFLAGS
XFIXES_LIBS
XFIXES_CFLAGS
XINERAMA_LIBS
XINERAMA_CFLAGS
XRANDR_LIBS
XRANDR_CFLAGS
LIBXSM
LIBGPM
GIF_CFLAGS
LIBGIF
TIFF_CFLAGS
LIBTIFF
LIBPNG
PNG_LIBS
PNG_CFLAGS
DYNLIB_OBJ
LIBGCCJIT_LIBS
LIBGCCJIT_CFLAGS
HAVE_NATIVE_COMP
emacs_major_version
MODULES_SECONDARY_SUFFIX
MODULES_SUFFIX
HAVE_MODULES
LIBMODULES
MODULES_OBJ
DYNAMIC_LIB_SECONDARY_SUFFIX
DYNAMIC_LIB_SUFFIX
LIBZ
LCMS2_LIBS
LCMS2_CFLAGS
JPEG_CFLAGS
LIBJPEG
LIBXPM
XCB_LIBS
HARFBUZZ_LIBS
HARFBUZZ_CFLAGS
M17N_FLT_LIBS
M17N_FLT_CFLAGS
LIBOTF_LIBS
LIBOTF_CFLAGS
XFT_LIBS
XFT_CFLAGS
FONTCONFIG_LIBS
FONTCONFIG_CFLAGS
FREETYPE_LIBS
FREETYPE_CFLAGS
XWIDGETS_OBJ
CAIRO_XLIB_LIBS
CAIRO_XLIB_CFLAGS
WEBKIT_LIBS
WEBKIT_CFLAGS
CAIRO_XCB_LIBS
CAIRO_XCB_CFLAGS
CAIRO_LIBS
CAIRO_CFLAGS
XRENDER_LIBS
LIBXMU
LIBXTR6
NOTIFY_OBJ
NOTIFY_LIBS
NOTIFY_CFLAGS
GFILENOTIFY_LIBS
GFILENOTIFY_CFLAGS
KQUEUE_LIBS
KQUEUE_CFLAGS
TREE_SITTER_LIBS
TREE_SITTER_CFLAGS
LIBSYSTEMD_LIBS
LIBSYSTEMD_CFLAGS
LIBGNUTLS_LIBS
LIBGNUTLS_CFLAGS
LIBSELINUX_CFLAGS
LIBSELINUX_LIBS
USE_STARTUP_NOTIFICATION
SETTINGS_LIBS
SETTINGS_CFLAGS
GOBJECT_LIBS
GOBJECT_CFLAGS
GCONF_LIBS
GCONF_CFLAGS
HAVE_GSETTINGS
GSETTINGS_LIBS
GSETTINGS_CFLAGS
DBUS_OBJ
DBUS_LIBS
DBUS_CFLAGS
PGTK_LIBS
PGTK_OBJ
GTK_OBJ
GTK_LIBS
GTK_CFLAGS
GETADDRINFO_A_LIBS
IMAGEMAGICK_LIBS
IMAGEMAGICK_CFLAGS
SQLITE3_CFLAGS
SQLITE3_LIBS
WEBP_LIBS
WEBP_CFLAGS
RSVG_LIBS
RSVG_CFLAGS
LIB_PTHREAD
VMLIMIT_OBJ
GMALLOC_OBJ
HYBRID_MALLOC
HAVE_XSERVER
HAVE_PGTK
HAIKU_CFLAGS
HAIKU_CXX_OBJ
HAIKU_OBJ
HAIKU_LIBS
XARGS_LIMIT
NTLIB
LIB_WSOCK32
LIBS_ECLIENT
CM_OBJ
NTDIR
FIRSTFILE_OBJ
W32_RES_LINK
CLIENTW
CLIENTRES
EMACS_MANIFEST
EMACSRES
W32_LIBS
W32_OBJ
comma_space_version
comma_version
WINDRES
HAVE_BE_APP
ac_ct_OBJC
OBJCFLAGS
OBJC
NS_OBJC_OBJ
NS_OBJ
ns_self_contained
INSTALL_ARCH_INDEP_EXTRA
LIBS_GNUSTEP
LD_SWITCH_X_SITE_RPATH
XMKMF
ANDROID_SHARED_USER_NAME
ANDROID_SHARED_USER_ID
ANDROID_BUILD_CFLAGS
ANDROID_LDFLAGS
ANDROID_LIBS
ANDROID_OBJ
AUTO_DEPEND
CFLAGS_SOUND
ALSA_LIBS
ALSA_CFLAGS
LIBSOUND
PKG_CONFIG_LIBDIR
PKG_CONFIG_PATH
PKG_CONFIG
SYSTEM_TYPE
LIB_MATH
LIBS_SYSTEM
C_SWITCH_SYSTEM
C_SWITCH_MACHINE
LD_SWITCH_SYSTEM
UNEXEC_OBJ
DOCMISC_W32
HAVE_MACPORTS
MAKEINFO
BREW
SETFATTR
PAXCTL_notdumped
PAXCTL_dumped
PAXCTL
FIND_DELETE
GZIP_PROG
INSTALL_INFO
LN_S_FILEONLY
INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
AM_DEFAULT_VERBOSITY
GNULIB_WARN_CFLAGS
WERROR_CFLAGS
WARN_CFLAGS
NATIVE_COMPILATION_AOT
ac_ct_CXX
CXXFLAGS
ARFLAGS
EGREP
GREP
CPP
OBJEXT
EXEEXT
ac_ct_CC
CPPFLAGS
LDFLAGS
CFLAGS
CC
XCONFIGURE
IS_D8_R8
ANDROID_ABI
ANDROID_JAR
ANDROID
ANDROID_DEBUGGABLE
emacs_use_mailutils
ANDROID_SDK_8_OR_EARLIER
ANDROID_SDK_18_OR_EARLIER
ANDROID_MIN_SDK
ZIPALIGN
D8
AAPT
WARN_JAVAFLAGS
ZIP
APKSIGNER
JARSIGNER
JAVAC
ANDROID_CFLAGS
SDK_BUILD_TOOLS
ANDROID_CC
BUILD_DETAILS
PROFILING_CFLAGS
CHECK_STRUCTS
cache_file
with_mailutils
DUMPING
HAVE_PDUMPER
CXX
READELF
NDK_BUILD_NASM
RANLIB
AR
host_os
host_vendor
host_cpu
host
build_os
build_vendor
build_cpu
build
MAKE_PROG
XCRUN
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
runstatedir
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='module_env_snippet_25
module_env_snippet_26
module_env_snippet_27
module_env_snippet_28
module_env_snippet_29
module_env_snippet_30'
ac_user_opts='
enable_option_checking
with_ndk_path
with_ndk_cxx
with_all
with_mailutils
with_pop
with_kerberos
with_kerberos5
with_hesiod
with_mail_unlink
with_mailhost
with_sound
with_pdumper
with_unexec
with_dumping
with_x_toolkit
with_wide_int
with_xpm
with_jpeg
with_tiff
with_gif
with_png
with_rsvg
with_webp
with_sqlite3
with_lcms2
with_libsystemd
with_cairo
with_cairo_xcb
with_xml2
with_imagemagick
with_native_image_api
with_tree_sitter
with_xft
with_harfbuzz
with_libotf
with_m17n_flt
with_toolkit_scroll_bars
with_xaw3d
with_xim
with_xdbe
with_ns
with_w32
with_pgtk
with_gpm
with_dbus
with_gconf
with_gsettings
with_selinux
with_gnutls
with_zlib
with_modules
with_threads
with_cygwin32_native_compilation
with_xinput2
with_small_ja_dic
with_android
with_android_debug
with_shared_user_id
with_file_notification
with_xwidgets
with_be_app
with_be_cairo
with_compress_install
with_gameuser
with_gnustep_conf
enable_ns_self_contained
enable_locallisppath
enable_checking
enable_gc_mark_trace
enable_profiling
enable_autodepend
enable_gtk_deprecation_warnings
enable_build_details
enable_largefile
enable_gcc_warnings
with_native_compilation
enable_check_lisp_object_type
enable_link_time_optimization
enable_silent_rules
with_x
enable_cross_guesses
enable_acl
with_libgmp
enable_xattr
with_included_regex
enable_year2038
'
      ac_precious_vars='build_alias
host_alias
target_alias
ANDROID_CC
SDK_BUILD_TOOLS
ANDROID_CFLAGS
JAVAC
JARSIGNER
APKSIGNER
ZIP
CC
CFLAGS
LDFLAGS
LIBS
CPPFLAGS
CPP
CXX
CXXFLAGS
CCC
PKG_CONFIG
PKG_CONFIG_PATH
PKG_CONFIG_LIBDIR
ALSA_CFLAGS
ALSA_LIBS
XMKMF
OBJC
OBJCFLAGS
RSVG_CFLAGS
RSVG_LIBS
WEBP_CFLAGS
WEBP_LIBS
IMAGEMAGICK_CFLAGS
IMAGEMAGICK_LIBS
GTK_CFLAGS
GTK_LIBS
DBUS_CFLAGS
DBUS_LIBS
GSETTINGS_CFLAGS
GSETTINGS_LIBS
GCONF_CFLAGS
GCONF_LIBS
GOBJECT_CFLAGS
GOBJECT_LIBS
LIBGNUTLS_CFLAGS
LIBGNUTLS_LIBS
LIBSYSTEMD_CFLAGS
LIBSYSTEMD_LIBS
TREE_SITTER_CFLAGS
TREE_SITTER_LIBS
KQUEUE_CFLAGS
KQUEUE_LIBS
GFILENOTIFY_CFLAGS
GFILENOTIFY_LIBS
CAIRO_CFLAGS
CAIRO_LIBS
CAIRO_XCB_CFLAGS
CAIRO_XCB_LIBS
WEBKIT_CFLAGS
WEBKIT_LIBS
CAIRO_XLIB_CFLAGS
CAIRO_XLIB_LIBS
FREETYPE_CFLAGS
FREETYPE_LIBS
FONTCONFIG_CFLAGS
FONTCONFIG_LIBS
XFT_CFLAGS
XFT_LIBS
LIBOTF_CFLAGS
LIBOTF_LIBS
M17N_FLT_CFLAGS
M17N_FLT_LIBS
HARFBUZZ_CFLAGS
HARFBUZZ_LIBS
LCMS2_CFLAGS
LCMS2_LIBS
PNG_CFLAGS
PNG_LIBS
XRANDR_CFLAGS
XRANDR_LIBS
XINERAMA_CFLAGS
XINERAMA_LIBS
XFIXES_CFLAGS
XFIXES_LIBS
XINPUT_CFLAGS
XINPUT_LIBS
LIBXML2_CFLAGS
LIBXML2_LIBS
LIBSECCOMP_CFLAGS
LIBSECCOMP_LIBS'


# 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'
runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
infodir='${datarootdir}/info'
htmldir='${docdir}'
dvidir='${docdir}'
pdfdir='${docdir}'
psdir='${docdir}'
libdir='${exec_prefix}/lib'
localedir='${datarootdir}/locale'
mandir='${datarootdir}/man'

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

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

  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=`printf "%s\n" "$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=`printf "%s\n" "$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 ;;

  -runstatedir | --runstatedir | --runstatedi | --runstated \
  | --runstate | --runstat | --runsta | --runst | --runs \
  | --run | --ru | --r)
    ac_prev=runstatedir ;;
  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
  | --run=* | --ru=* | --r=*)
    runstatedir=$ac_optarg ;;

  -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=`printf "%s\n" "$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=`printf "%s\n" "$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.
    printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
      printf "%s\n" "$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" ;;
    *)     printf "%s\n" "$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 runstatedir
do
  eval ac_val=\$$ac_var
  # Remove trailing slashes.
  case $ac_val in
    */ )
      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
      eval $ac_var=\$ac_val;;
  esac
  # Be sure to have absolute directory names.
  case $ac_val in
    [\\/$]* | ?:[\\/]* )  continue;;
    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
  esac
  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
done

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

# FIXME: To remove some day.
if test "x$host_alias" != x; then
  if test "x$build_alias" = x; then
    cross_compiling=maybe
  elif test "x$build_alias" != "x$host_alias"; then
    cross_compiling=yes
  fi
fi

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

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


ac_pwd=`pwd` && test -n "$ac_pwd" &&
ac_ls_di=`ls -di .` &&
ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
  as_fn_error $? "working directory cannot be determined"
test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
  as_fn_error $? "pwd does not report name of working directory"


# Find the source files, if location was not specified.
if test -z "$srcdir"; then
  ac_srcdir_defaulted=yes
  # Try the directory containing this script, then the parent directory.
  ac_confdir=`$as_dirname -- "$as_myself" ||
$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$as_myself" : 'X\(//\)[^/]' \| \
	 X"$as_myself" : 'X\(//\)$' \| \
	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" 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 GNU Emacs 30.1.90 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]
  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
  --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/emacs]
  --htmldir=DIR           html documentation [DOCDIR]
  --dvidir=DIR            dvi documentation [DOCDIR]
  --pdfdir=DIR            pdf documentation [DOCDIR]
  --psdir=DIR             ps documentation [DOCDIR]
_ACEOF

  cat <<\_ACEOF

Program names:
  --program-prefix=PREFIX            prepend PREFIX to installed program names
  --program-suffix=SUFFIX            append SUFFIX to installed program names
  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names

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

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

if test -n "$ac_init_help"; then
  case $ac_init_help in
     short | recursive ) echo "Configuration of GNU Emacs 30.1.90:";;
   esac
  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-ns-self-contained
                          disable self contained build under NeXTstep
  --enable-locallisppath=PATH
                          directories Emacs should search for lisp files
                          specific to this site
  --enable-checking[=LIST]
                          enable expensive checks. With LIST, enable only
                          specific categories of checks. Categories are:
                          all,yes,no. Flags are: stringbytes, stringoverrun,
                          stringfreelist, structs, glyphs
  --disable-gc-mark-trace disable the mark trace buffer used for debugging the
                          Emacs garbage collector
  --enable-profiling      build emacs with low-level, gprof profiling support.
                          Mainly useful for debugging Emacs itself. May not
                          work on all platforms. Stops profiler.el working.
  --enable-autodepend     automatically generate dependencies to .h-files.
                          Requires gcc, enabled if found.
  --enable-gtk-deprecation-warnings
                          Show Gtk+/Gdk deprecation warnings for Gtk+ >= 3.0
  --disable-build-details Make the build more deterministic by omitting host
                          names, time stamps, etc. from the output.
  --disable-largefile     omit support for large files
  --enable-gcc-warnings[=TYPE]
                          control generation of GCC warnings. The TYPE 'yes'
                          means to fail if any warnings are issued;
                          'warn-only' means issue warnings without failing
                          (default for developer builds); 'no' means disable
                          warnings (default for non-developer builds).
  --enable-check-lisp-object-type
                          Enable compile time checks for the Lisp_Object data
                          type, which can catch some bugs during development.
  --enable-link-time-optimization
                          build with link-time optimization (experimental; see
                          INSTALL)
  --disable-silent-rules  verbose build output (undo: "make V=0")
  --enable-cross-guesses={conservative|risky}
                          specify policy for cross-compilation guesses
  --disable-acl           do not support ACLs
  --disable-xattr         do not support extended attributes
  --disable-year2038      don't support timestamps after 2038

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-ndk-path         find Android libraries in these directories
  --with-ndk-cxx          name of the C++ compiler included with the NDK
  --without-all           omit almost all features and build small executable
                          with minimal dependencies
  --with-mailutils        rely on GNU Mailutils, so that the --without-pop
                          through --with-mailhost options are irrelevant; this
                          is the default if GNU Mailutils is installed
  --with-pop              Support POP mail retrieval if Emacs movemail is used
                          (not recommended, as Emacs movemail POP is
                          insecure). This is the default only on native
                          MS-Windows and Android.
  --with-kerberos         support Kerberos-authenticated POP
  --with-kerberos5        support Kerberos version 5 authenticated POP
  --with-hesiod           support Hesiod to get the POP server host
  --with-mail-unlink      unlink, rather than empty, mail spool after reading
  --with-mailhost=HOSTNAME
                          string giving default POP mail host
  --with-sound=VALUE      compile with sound support (VALUE one of: yes, alsa,
                          oss, bsd-ossaudio, no; default yes). Only for
                          GNU/Linux, FreeBSD, NetBSD, MinGW, Cygwin.
  --with-pdumper=VALUE    enable pdumper support unconditionally ('yes', 'no',
                          or 'auto': default 'auto')
  --with-unexec=VALUE     enable unexec support unconditionally ('yes', 'no',
                          or 'auto': default 'auto')
  --with-dumping=VALUE    kind of dumping to use for initial Emacs build
                          (VALUE one of: pdumper, unexec, none; default
                          pdumper)
  --with-x-toolkit=KIT    use an X toolkit (KIT one of: yes or gtk, gtk2,
                          gtk3, lucid or athena, motif, no)
  --with-wide-int         prefer wide Emacs integers (typically 62-bit); on
                          32-bit hosts, this allows buffer and string size up
                          to 2GB, at the cost of 10% to 30% slowdown of Lisp
                          interpreter and larger memory footprint
  --without-xpm           don't compile with XPM image support
  --without-jpeg          don't compile with JPEG image support
  --without-tiff          don't compile with TIFF image support
  --without-gif           don't compile with GIF image support
  --without-png           don't compile with PNG image support
  --without-rsvg          don't compile with SVG image support
  --without-webp          don't compile with WebP image support
  --without-sqlite3       don't compile with sqlite3 support
  --without-lcms2         don't compile with Little CMS support
  --without-libsystemd    don't compile with libsystemd support
  --without-cairo         don't compile with Cairo drawing
  --with-cairo-xcb        use XCB surfaces for Cairo support
  --without-xml2          don't compile with XML parsing support
  --with-imagemagick      compile with ImageMagick image support
  --without-native-image-api
                          don't use native image APIs (GDI+ on Windows)
  --with-tree-sitter      compile with tree-sitter
  --without-xft           don't use XFT for anti aliased fonts
  --without-harfbuzz      don't use HarfBuzz for text shaping
  --without-libotf        don't use libotf for OpenType font support
  --without-m17n-flt      don't use m17n-flt for text shaping
  --without-toolkit-scroll-bars
                          don't use Motif/Xaw3d/GTK toolkit scroll bars
  --without-xaw3d         don't use Xaw3d
  --without-xim           at runtime, default X11 XIM to off
  --without-xdbe          don't use X11 double buffering support
  --with-ns               use Nextstep (macOS Cocoa or GNUstep) windowing
                          system. On by default on macOS.
  --with-w32              use native MS Windows GUI in a Cygwin build
  --with-pgtk             use GTK to support window systems other than X
  --without-gpm           don't use -lgpm for mouse support on a GNU/Linux
                          console
  --without-dbus          don't compile with D-Bus support
  --with-gconf            compile with Gconf support (Gsettings replaces this)
  --without-gsettings     don't compile with GSettings support
  --without-selinux       don't compile with SELinux support
  --without-gnutls        don't use -lgnutls for SSL/TLS support
  --without-zlib          don't compile with zlib decompression support
  --without-modules       don't compile with dynamic modules support
  --without-threads       don't compile with elisp threading support
  --with-cygwin32-native-compilation
                          use native compilation on 32-bit Cygwin
  --without-xinput2       don't use version 2 of the X Input Extension for
                          input
  --with-small-ja-dic     generate a smaller-size Japanese dictionary
  --with-android          cross-compile Android application package
  --without-android-debug don't build Emacs as a debug package on Android
  --with-shared-user-id=ID
                          use the given shared user ID in Android builds
  --with-file-notification=LIB
                          use a file notification library (LIB one of: yes,
                          inotify, kqueue, gfile, w32, no)
  --with-xwidgets         enable use of xwidgets in Emacs buffers (requires
                          gtk3 or macOS Cocoa)
  --with-be-app           enable use of Haiku's Application Kit as a window
                          system
  --with-be-cairo         enable use of cairo under Haiku's Application Kit
  --without-compress-install
                          don't compress some files (.el, .info, etc.) when
                          installing. Equivalent to: make GZIP_PROG= install
  --with-gameuser=USER_OR_GROUP
                          user for shared game score files. An argument
                          prefixed by ':' specifies a group instead.
  --with-gnustep-conf=FILENAME
                          name of GNUstep configuration file to use on systems
                          where the command 'gnustep-config' does not work;
                          default $GNUSTEP_CONFIG_FILE, or
                          /etc/GNUstep/GNUstep.conf
  --with-native-compilation[=TYPE]
                          compile with Emacs Lisp native compiler support. The
                          TYPE 'yes' (or empty) means to enable it and compile
                          natively preloaded Lisp files; 'no' means to disable
                          it; 'aot' will make the build process compile all
                          the Lisp files in the tree natively ahead of time.
                          (This will usually be quite slow.)
  --with-x                use the X Window System
  --without-libgmp        do not use the GNU Multiple Precision (GMP) library;
                          this is the default on systems lacking libgmp.
  --without-included-regex
                          don't compile regex; this is the default on systems
                          with recent-enough versions of the GNU C Library
                          (use with caution on other systems).

Some influential environment variables:
  ANDROID_CC  The Android C cross-compiler.
  SDK_BUILD_TOOLS
              Name of directory holding Android SDK build-tools.
  ANDROID_CFLAGS
              Flags given to the Android C cross-compiler.
  JAVAC       Java compiler path. Used for Android.
  JARSIGNER   Java package signer path. Used for Android.
  APKSIGNER   Android package signer path. Used for Android.
  ZIP         Path to the `zip' utility.
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  LIBS        libraries to pass to the linker, e.g. -l<library>
  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
              you have headers in a nonstandard directory <include dir>
  CPP         C preprocessor
  CXX         C++ compiler command
  CXXFLAGS    C++ compiler flags
  PKG_CONFIG  path to pkg-config utility
  PKG_CONFIG_PATH
              directories to add to pkg-config's search path
  PKG_CONFIG_LIBDIR
              path overriding pkg-config's built-in search path
  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
  XMKMF       Path to xmkmf, Makefile generator for X Window System
  OBJC        Objective C compiler command
  OBJCFLAGS   Objective C compiler flags
  RSVG_CFLAGS C compiler flags for RSVG, overriding pkg-config
  RSVG_LIBS   linker flags for RSVG, overriding pkg-config
  WEBP_CFLAGS C compiler flags for WEBP, overriding pkg-config
  WEBP_LIBS   linker flags for WEBP, overriding pkg-config
  IMAGEMAGICK_CFLAGS
              C compiler flags for IMAGEMAGICK, overriding pkg-config
  IMAGEMAGICK_LIBS
              linker flags for IMAGEMAGICK, overriding pkg-config
  GTK_CFLAGS  C compiler flags for GTK, overriding pkg-config
  GTK_LIBS    linker flags for GTK, overriding pkg-config
  DBUS_CFLAGS C compiler flags for DBUS, overriding pkg-config
  DBUS_LIBS   linker flags for DBUS, overriding pkg-config
  GSETTINGS_CFLAGS
              C compiler flags for GSETTINGS, overriding pkg-config
  GSETTINGS_LIBS
              linker flags for GSETTINGS, overriding pkg-config
  GCONF_CFLAGS
              C compiler flags for GCONF, overriding pkg-config
  GCONF_LIBS  linker flags for GCONF, overriding pkg-config
  GOBJECT_CFLAGS
              C compiler flags for GOBJECT, overriding pkg-config
  GOBJECT_LIBS
              linker flags for GOBJECT, overriding pkg-config
  LIBGNUTLS_CFLAGS
              C compiler flags for LIBGNUTLS, overriding pkg-config
  LIBGNUTLS_LIBS
              linker flags for LIBGNUTLS, overriding pkg-config
  LIBSYSTEMD_CFLAGS
              C compiler flags for LIBSYSTEMD, overriding pkg-config
  LIBSYSTEMD_LIBS
              linker flags for LIBSYSTEMD, overriding pkg-config
  TREE_SITTER_CFLAGS
              C compiler flags for TREE_SITTER, overriding pkg-config
  TREE_SITTER_LIBS
              linker flags for TREE_SITTER, overriding pkg-config
  KQUEUE_CFLAGS
              C compiler flags for KQUEUE, overriding pkg-config
  KQUEUE_LIBS linker flags for KQUEUE, overriding pkg-config
  GFILENOTIFY_CFLAGS
              C compiler flags for GFILENOTIFY, overriding pkg-config
  GFILENOTIFY_LIBS
              linker flags for GFILENOTIFY, overriding pkg-config
  CAIRO_CFLAGS
              C compiler flags for CAIRO, overriding pkg-config
  CAIRO_LIBS  linker flags for CAIRO, overriding pkg-config
  CAIRO_XCB_CFLAGS
              C compiler flags for CAIRO_XCB, overriding pkg-config
  CAIRO_XCB_LIBS
              linker flags for CAIRO_XCB, overriding pkg-config
  WEBKIT_CFLAGS
              C compiler flags for WEBKIT, overriding pkg-config
  WEBKIT_LIBS linker flags for WEBKIT, overriding pkg-config
  CAIRO_XLIB_CFLAGS
              C compiler flags for CAIRO_XLIB, overriding pkg-config
  CAIRO_XLIB_LIBS
              linker flags for CAIRO_XLIB, overriding pkg-config
  FREETYPE_CFLAGS
              C compiler flags for FREETYPE, overriding pkg-config
  FREETYPE_LIBS
              linker flags for FREETYPE, overriding pkg-config
  FONTCONFIG_CFLAGS
              C compiler flags for FONTCONFIG, overriding pkg-config
  FONTCONFIG_LIBS
              linker flags for FONTCONFIG, overriding pkg-config
  XFT_CFLAGS  C compiler flags for XFT, overriding pkg-config
  XFT_LIBS    linker flags for XFT, overriding pkg-config
  LIBOTF_CFLAGS
              C compiler flags for LIBOTF, overriding pkg-config
  LIBOTF_LIBS linker flags for LIBOTF, overriding pkg-config
  M17N_FLT_CFLAGS
              C compiler flags for M17N_FLT, overriding pkg-config
  M17N_FLT_LIBS
              linker flags for M17N_FLT, overriding pkg-config
  HARFBUZZ_CFLAGS
              C compiler flags for HARFBUZZ, overriding pkg-config
  HARFBUZZ_LIBS
              linker flags for HARFBUZZ, overriding pkg-config
  LCMS2_CFLAGS
              C compiler flags for LCMS2, overriding pkg-config
  LCMS2_LIBS  linker flags for LCMS2, overriding pkg-config
  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
  PNG_LIBS    linker flags for PNG, overriding pkg-config
  XRANDR_CFLAGS
              C compiler flags for XRANDR, overriding pkg-config
  XRANDR_LIBS linker flags for XRANDR, overriding pkg-config
  XINERAMA_CFLAGS
              C compiler flags for XINERAMA, overriding pkg-config
  XINERAMA_LIBS
              linker flags for XINERAMA, overriding pkg-config
  XFIXES_CFLAGS
              C compiler flags for XFIXES, overriding pkg-config
  XFIXES_LIBS linker flags for XFIXES, overriding pkg-config
  XINPUT_CFLAGS
              C compiler flags for XINPUT, overriding pkg-config
  XINPUT_LIBS linker flags for XINPUT, overriding pkg-config
  LIBXML2_CFLAGS
              C compiler flags for LIBXML2, overriding pkg-config
  LIBXML2_LIBS
              linker flags for LIBXML2, overriding pkg-config
  LIBSECCOMP_CFLAGS
              C compiler flags for LIBSECCOMP, overriding pkg-config
  LIBSECCOMP_LIBS
              linker flags for LIBSECCOMP, overriding pkg-config

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 <bug-gnu-emacs@gnu.org>.
GNU Emacs home page: <https://www.gnu.org/software/emacs/>.
General help using GNU software: <https://www.gnu.org/gethelp/>.
_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=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
  # A ".." for each directory in $ac_dir_suffix.
  ac_top_builddir_sub=`printf "%s\n" "$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 configure.gnu first; this name is used for a wrapper for
    # Metaconfig's "Configure" on case-insensitive file systems.
    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
      printf "%s\n" "$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
GNU Emacs configure 30.1.90
generated by GNU Autoconf 2.71

Copyright (C) 2021 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 conftest.beam
  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\""
printf "%s\n" "$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
  printf "%s\n" "$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_nop
  printf "%s\n" "$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_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
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
printf %s "checking for $2... " >&6; }
if eval test \${$3+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  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 $as_nop
  eval "$3=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
eval ac_res=\$$3
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_c_check_header_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\""
printf "%s\n" "$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
  printf "%s\n" "$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_nop
  printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

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

} # ac_fn_c_try_cpp

# ac_fn_cxx_try_compile LINENO
# ----------------------------
# Try to compile conftest.$ac_ext, and return whether this succeeded.
ac_fn_cxx_try_compile ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  rm -f conftest.$ac_objext conftest.beam
  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\""
printf "%s\n" "$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
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext
then :
  ac_retval=0
else $as_nop
  printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

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

} # ac_fn_cxx_try_compile

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

} # ac_fn_cxx_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.beam 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\""
printf "%s\n" "$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
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext && {
	 test "$cross_compiling" = yes ||
	 test -x conftest$ac_exeext
       }
then :
  ac_retval=0
else $as_nop
  printf "%s\n" "$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_member LINENO AGGR MEMBER VAR INCLUDES
# ----------------------------------------------------
# Tries to find if the field MEMBER exists in type AGGR, after including
# INCLUDES, setting cache variable VAR accordingly.
ac_fn_c_check_member ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
printf %s "checking for $2.$3... " >&6; }
if eval test \${$4+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$5
int
main (void)
{
static $2 ac_aggr;
if (ac_aggr.$3)
return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  eval "$4=yes"
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$5
int
main (void)
{
static $2 ac_aggr;
if (sizeof ac_aggr.$3)
return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  eval "$4=yes"
else $as_nop
  eval "$4=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
eval ac_res=\$$4
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_c_check_member

# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
# ------------------------------------------------------------------
# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
ac_fn_check_decl ()
{
  ac_saved_ac_compile="$ac_compile"
  if test -n "$ac_compile_for_check_decl"; then
    ac_compile="$ac_compile_for_check_decl"
  fi
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  as_decl_name=`echo $2|sed 's/ *(.*//'`
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
printf %s "checking whether $as_decl_name is declared... " >&6; }
if eval test \${$3+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
  eval ac_save_FLAGS=\$$6
  as_fn_append $6 " $5"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main (void)
{
#ifndef $as_decl_name
#ifdef __cplusplus
  (void) $as_decl_use;
#else
  (void) $as_decl_name;
#endif
#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  eval "$3=yes"
else $as_nop
  eval "$3=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
  eval $6=\$ac_save_FLAGS

fi
eval ac_res=\$$3
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  ac_compile="$ac_saved_ac_compile"

} # ac_fn_check_decl

# ac_fn_objc_try_compile LINENO
# -----------------------------
# Try to compile conftest.$ac_ext, and return whether this succeeded.
ac_fn_objc_try_compile ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  rm -f conftest.$ac_objext conftest.beam
  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\""
printf "%s\n" "$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
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && {
	 test -z "$ac_objc_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext
then :
  ac_retval=0
else $as_nop
  printf "%s\n" "$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_objc_try_compile

# 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
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
printf %s "checking for $2... " >&6; }
if eval test \${$3+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  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.  */

#include <limits.h>
#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 (void)
{
return $2 ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  eval "$3=yes"
else $as_nop
  eval "$3=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
fi
eval ac_res=\$$3
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_c_check_func

# ac_fn_c_try_run LINENO
# ----------------------
# Try to run 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\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  printf "%s\n" "$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\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; }
then :
  ac_retval=0
else $as_nop
  printf "%s\n" "$as_me: program exited with status $ac_status" >&5
       printf "%s\n" "$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_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 (void)
{
static int test_array [1 - 2 * !(($2) >= 0)];
test_array [0] = 0;
return test_array [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 (void)
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
test_array [0] = 0;
return test_array [0];

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_hi=$ac_mid; break
else $as_nop
  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.beam conftest.$ac_ext
  done
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main (void)
{
static int test_array [1 - 2 * !(($2) < 0)];
test_array [0] = 0;
return test_array [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 (void)
{
static int test_array [1 - 2 * !(($2) >= $ac_mid)];
test_array [0] = 0;
return test_array [0];

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_lo=$ac_mid; break
else $as_nop
  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.beam conftest.$ac_ext
  done
else $as_nop
  ac_lo= ac_hi=
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam 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 (void)
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
test_array [0] = 0;
return test_array [0];

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_hi=$ac_mid
else $as_nop
  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam 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 (void) { return $2; }
static unsigned long int ulongval (void) { return $2; }
#include <stdio.h>
#include <stdlib.h>
int
main (void)
{

  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 $as_nop
  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

# 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
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
printf %s "checking for $2... " >&6; }
if eval test \${$3+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  eval "$3=no"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main (void)
{
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 (void)
{
if (sizeof (($2)))
	    return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :

else $as_nop
  eval "$3=yes"
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
eval ac_res=\$$3
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_c_check_type
ac_configure_args_raw=
for ac_arg
do
  case $ac_arg in
  *\'*)
    ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
  esac
  as_fn_append ac_configure_args_raw " '$ac_arg'"
done

case $ac_configure_args_raw in
  *$as_nl*)
    ac_safe_unquote= ;;
  *)
    ac_unsafe_z='|&;<>()$`\\"*?[ ''	' # This string ends in space, tab.
    ac_unsafe_a="$ac_unsafe_z#~"
    ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
    ac_configure_args_raw=`      printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
esac

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 GNU Emacs $as_me 30.1.90, which was
generated by GNU Autoconf 2.71.  Invocation command line was

  $ $0$ac_configure_args_raw

_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
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    printf "%s\n" "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=`printf "%s\n" "$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=$?
  # Sanitize IFS.
  IFS=" ""	$as_nl"
  # Save into config.log some information that might help in debugging.
  {
    echo

    printf "%s\n" "## ---------------- ##
## 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_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
printf "%s\n" "$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

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

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

    if test -s confdefs.h; then
      printf "%s\n" "## ----------- ##
## confdefs.h. ##
## ----------- ##"
      echo
      cat confdefs.h
      echo
    fi
    test "$ac_signal" != 0 &&
      printf "%s\n" "$as_me: caught signal $ac_signal"
    printf "%s\n" "$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

printf "%s\n" "/* confdefs.h */" > confdefs.h

# Predefined preprocessor variables.

printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h

printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h

printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h

printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h

printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h

printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h


# Let the site file select an alternate cache file if it wants to.
# Prefer an explicitly selected file to automatically selected ones.
if test -n "$CONFIG_SITE"; then
  ac_site_files="$CONFIG_SITE"
elif test "x$prefix" != xNONE; then
  ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
else
  ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi

for ac_site_file in $ac_site_files
do
  case $ac_site_file in #(
  */*) :
     ;; #(
  *) :
    ac_site_file=./$ac_site_file ;;
esac
  if test -f "$ac_site_file" && test -r "$ac_site_file"; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
    sed 's/^/| /' "$ac_site_file" >&5
    . "$ac_site_file" \
      || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$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
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
    case $cache_file in
      [\\/]* | ?:[\\/]* ) . "$cache_file";;
      *)                      . "./$cache_file";;
    esac
  fi
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
  >$cache_file
fi

# Test code for whether the C compiler supports C89 (global declarations)
ac_c_conftest_c89_globals='
/* Does the compiler advertise C89 conformance?
   Do not test the value of __STDC__, because some compilers set it to 0
   while being otherwise adequately conformant. */
#if !defined __STDC__
# error "Compiler does not advertise C89 conformance"
#endif

#include <stddef.h>
#include <stdarg.h>
struct stat;
/* Most of the following tests are stolen from RCS 5.7 src/conf.sh.  */
struct buf { int x; };
struct buf * (*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 do not provoke an error unfortunately, instead are silently treated
   as an "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 is necessary to write \x00 == 0 to get something
   that is 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 **, int *(*)(struct buf *, struct stat *, int),
               int, int);'

# Test code for whether the C compiler supports C89 (body of main).
ac_c_conftest_c89_main='
ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
'

# Test code for whether the C compiler supports C99 (global declarations)
ac_c_conftest_c99_globals='
// Does the compiler advertise C99 conformance?
#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
# error "Compiler does not advertise C99 conformance"
#endif

#include <stdbool.h>
extern int puts (const char *);
extern int printf (const char *, ...);
extern int dprintf (int, const char *, ...);
extern void *malloc (size_t);

// Check varargs macros.  These examples are taken from C99 6.10.3.5.
// dprintf is used instead of fprintf to avoid needing to declare
// FILE and stderr.
#define debug(...) dprintf (2, __VA_ARGS__)
#define showlist(...) puts (#__VA_ARGS__)
#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
static void
test_varargs_macros (void)
{
  int x = 1234;
  int y = 5678;
  debug ("Flag");
  debug ("X = %d\n", x);
  showlist (The first, second, and third items.);
  report (x>y, "x is %d but y is %d", x, y);
}

// Check long long types.
#define BIG64 18446744073709551615ull
#define BIG32 4294967295ul
#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
#if !BIG_OK
  #error "your preprocessor is broken"
#endif
#if BIG_OK
#else
  #error "your preprocessor is broken"
#endif
static long long int bignum = -9223372036854775807LL;
static unsigned long long int ubignum = BIG64;

struct incomplete_array
{
  int datasize;
  double data[];
};

struct named_init {
  int number;
  const wchar_t *name;
  double average;
};

typedef const char *ccp;

static inline int
test_restrict (ccp restrict text)
{
  // See if C++-style comments work.
  // Iterate through items via the restricted pointer.
  // Also check for declarations in for loops.
  for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
    continue;
  return 0;
}

// Check varargs and va_copy.
static bool
test_varargs (const char *format, ...)
{
  va_list args;
  va_start (args, format);
  va_list args_copy;
  va_copy (args_copy, args);

  const char *str = "";
  int number = 0;
  float fnumber = 0;

  while (*format)
    {
      switch (*format++)
	{
	case '\''s'\'': // string
	  str = va_arg (args_copy, const char *);
	  break;
	case '\''d'\'': // int
	  number = va_arg (args_copy, int);
	  break;
	case '\''f'\'': // float
	  fnumber = va_arg (args_copy, double);
	  break;
	default:
	  break;
	}
    }
  va_end (args_copy);
  va_end (args);

  return *str && number && fnumber;
}
'

# Test code for whether the C compiler supports C99 (body of main).
ac_c_conftest_c99_main='
  // Check bool.
  _Bool success = false;
  success |= (argc != 0);

  // Check restrict.
  if (test_restrict ("String literal") == 0)
    success = true;
  char *restrict newvar = "Another string";

  // Check varargs.
  success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
  test_varargs_macros ();

  // Check flexible array members.
  struct incomplete_array *ia =
    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
  ia->datasize = 10;
  for (int i = 0; i < ia->datasize; ++i)
    ia->data[i] = i * 1.234;

  // Check named initializers.
  struct named_init ni = {
    .number = 34,
    .name = L"Test wide string",
    .average = 543.34343,
  };

  ni.number = 58;

  int dynamic_array[ni.number];
  dynamic_array[0] = argv[0][0];
  dynamic_array[ni.number - 1] = 543;

  // work around unused variable warnings
  ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
	 || dynamic_array[ni.number - 1] != 543);
'

# Test code for whether the C compiler supports C11 (global declarations)
ac_c_conftest_c11_globals='
// Does the compiler advertise C11 conformance?
#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
# error "Compiler does not advertise C11 conformance"
#endif

// Check _Alignas.
char _Alignas (double) aligned_as_double;
char _Alignas (0) no_special_alignment;
extern char aligned_as_int;
char _Alignas (0) _Alignas (int) aligned_as_int;

// Check _Alignof.
enum
{
  int_alignment = _Alignof (int),
  int_array_alignment = _Alignof (int[100]),
  char_alignment = _Alignof (char)
};
_Static_assert (0 < -_Alignof (int), "_Alignof is signed");

// Check _Noreturn.
int _Noreturn does_not_return (void) { for (;;) continue; }

// Check _Static_assert.
struct test_static_assert
{
  int x;
  _Static_assert (sizeof (int) <= sizeof (long int),
                  "_Static_assert does not work in struct");
  long int y;
};

// Check UTF-8 literals.
#define u8 syntax error!
char const utf8_literal[] = u8"happens to be ASCII" "another string";

// Check duplicate typedefs.
typedef long *long_ptr;
typedef long int *long_ptr;
typedef long_ptr long_ptr;

// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
struct anonymous
{
  union {
    struct { int i; int j; };
    struct { int k; long int l; } w;
  };
  int m;
} v1;
'

# Test code for whether the C compiler supports C11 (body of main).
ac_c_conftest_c11_main='
  _Static_assert ((offsetof (struct anonymous, i)
		   == offsetof (struct anonymous, w.k)),
		  "Anonymous union alignment botch");
  v1.i = 2;
  v1.w.k = 5;
  ok |= v1.i != 5;
'

# Test code for whether the C compiler supports C11 (complete).
ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
${ac_c_conftest_c99_globals}
${ac_c_conftest_c11_globals}

int
main (int argc, char **argv)
{
  int ok = 0;
  ${ac_c_conftest_c89_main}
  ${ac_c_conftest_c99_main}
  ${ac_c_conftest_c11_main}
  return ok;
}
"

# Test code for whether the C compiler supports C99 (complete).
ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
${ac_c_conftest_c99_globals}

int
main (int argc, char **argv)
{
  int ok = 0;
  ${ac_c_conftest_c89_main}
  ${ac_c_conftest_c99_main}
  return ok;
}
"

# Test code for whether the C compiler supports C89 (complete).
ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}

int
main (int argc, char **argv)
{
  int ok = 0;
  ${ac_c_conftest_c89_main}
  return ok;
}
"

as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
# Test code for whether the C++ compiler supports C++98 (global declarations)
ac_cxx_conftest_cxx98_globals='
// Does the compiler advertise C++98 conformance?
#if !defined __cplusplus || __cplusplus < 199711L
# error "Compiler does not advertise C++98 conformance"
#endif

// These inclusions are to reject old compilers that
// lack the unsuffixed header files.
#include <cstdlib>
#include <exception>

// <cassert> and <cstring> are *not* freestanding headers in C++98.
extern void assert (int);
namespace std {
  extern int strcmp (const char *, const char *);
}

// Namespaces, exceptions, and templates were all added after "C++ 2.0".
using std::exception;
using std::strcmp;

namespace {

void test_exception_syntax()
{
  try {
    throw "test";
  } catch (const char *s) {
    // Extra parentheses suppress a warning when building autoconf itself,
    // due to lint rules shared with more typical C programs.
    assert (!(strcmp) (s, "test"));
  }
}

template <typename T> struct test_template
{
  T const val;
  explicit test_template(T t) : val(t) {}
  template <typename U> T add(U u) { return static_cast<T>(u) + val; }
};

} // anonymous namespace
'

# Test code for whether the C++ compiler supports C++98 (body of main)
ac_cxx_conftest_cxx98_main='
  assert (argc);
  assert (! argv[0]);
{
  test_exception_syntax ();
  test_template<double> tt (2.0);
  assert (tt.add (4) == 6.0);
  assert (true && !false);
}
'

# Test code for whether the C++ compiler supports C++11 (global declarations)
ac_cxx_conftest_cxx11_globals='
// Does the compiler advertise C++ 2011 conformance?
#if !defined __cplusplus || __cplusplus < 201103L
# error "Compiler does not advertise C++11 conformance"
#endif

namespace cxx11test
{
  constexpr int get_val() { return 20; }

  struct testinit
  {
    int i;
    double d;
  };

  class delegate
  {
  public:
    delegate(int n) : n(n) {}
    delegate(): delegate(2354) {}

    virtual int getval() { return this->n; };
  protected:
    int n;
  };

  class overridden : public delegate
  {
  public:
    overridden(int n): delegate(n) {}
    virtual int getval() override final { return this->n * 2; }
  };

  class nocopy
  {
  public:
    nocopy(int i): i(i) {}
    nocopy() = default;
    nocopy(const nocopy&) = delete;
    nocopy & operator=(const nocopy&) = delete;
  private:
    int i;
  };

  // for testing lambda expressions
  template <typename Ret, typename Fn> Ret eval(Fn f, Ret v)
  {
    return f(v);
  }

  // for testing variadic templates and trailing return types
  template <typename V> auto sum(V first) -> V
  {
    return first;
  }
  template <typename V, typename... Args> auto sum(V first, Args... rest) -> V
  {
    return first + sum(rest...);
  }
}
'

# Test code for whether the C++ compiler supports C++11 (body of main)
ac_cxx_conftest_cxx11_main='
{
  // Test auto and decltype
  auto a1 = 6538;
  auto a2 = 48573953.4;
  auto a3 = "String literal";

  int total = 0;
  for (auto i = a3; *i; ++i) { total += *i; }

  decltype(a2) a4 = 34895.034;
}
{
  // Test constexpr
  short sa[cxx11test::get_val()] = { 0 };
}
{
  // Test initializer lists
  cxx11test::testinit il = { 4323, 435234.23544 };
}
{
  // Test range-based for
  int array[] = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3,
                 14, 19, 17, 8, 6, 20, 16, 2, 11, 1};
  for (auto &x : array) { x += 23; }
}
{
  // Test lambda expressions
  using cxx11test::eval;
  assert (eval ([](int x) { return x*2; }, 21) == 42);
  double d = 2.0;
  assert (eval ([&](double x) { return d += x; }, 3.0) == 5.0);
  assert (d == 5.0);
  assert (eval ([=](double x) mutable { return d += x; }, 4.0) == 9.0);
  assert (d == 5.0);
}
{
  // Test use of variadic templates
  using cxx11test::sum;
  auto a = sum(1);
  auto b = sum(1, 2);
  auto c = sum(1.0, 2.0, 3.0);
}
{
  // Test constructor delegation
  cxx11test::delegate d1;
  cxx11test::delegate d2();
  cxx11test::delegate d3(45);
}
{
  // Test override and final
  cxx11test::overridden o1(55464);
}
{
  // Test nullptr
  char *c = nullptr;
}
{
  // Test template brackets
  test_template<::test_template<int>> v(test_template<int>(12));
}
{
  // Unicode literals
  char const *utf8 = u8"UTF-8 string \u2500";
  char16_t const *utf16 = u"UTF-8 string \u2500";
  char32_t const *utf32 = U"UTF-32 string \u2500";
}
'

# Test code for whether the C compiler supports C++11 (complete).
ac_cxx_conftest_cxx11_program="${ac_cxx_conftest_cxx98_globals}
${ac_cxx_conftest_cxx11_globals}

int
main (int argc, char **argv)
{
  int ok = 0;
  ${ac_cxx_conftest_cxx98_main}
  ${ac_cxx_conftest_cxx11_main}
  return ok;
}
"

# Test code for whether the C compiler supports C++98 (complete).
ac_cxx_conftest_cxx98_program="${ac_cxx_conftest_cxx98_globals}
int
main (int argc, char **argv)
{
  int ok = 0;
  ${ac_cxx_conftest_cxx98_main}
  return ok;
}
"

as_fn_append ac_header_c_list " linux/fs.h linux_fs_h HAVE_LINUX_FS_H"
as_fn_append ac_header_c_list " malloc.h malloc_h HAVE_MALLOC_H"
as_fn_append ac_header_c_list " sys/systeminfo.h sys_systeminfo_h HAVE_SYS_SYSTEMINFO_H"
as_fn_append ac_header_c_list " sys/sysinfo.h sys_sysinfo_h HAVE_SYS_SYSINFO_H"
as_fn_append ac_header_c_list " coff.h coff_h HAVE_COFF_H"
as_fn_append ac_header_c_list " pty.h pty_h HAVE_PTY_H"
as_fn_append ac_header_c_list " sys/resource.h sys_resource_h HAVE_SYS_RESOURCE_H"
as_fn_append ac_header_c_list " sys/utsname.h sys_utsname_h HAVE_SYS_UTSNAME_H"
as_fn_append ac_header_c_list " pwd.h pwd_h HAVE_PWD_H"
as_fn_append ac_header_c_list " util.h util_h HAVE_UTIL_H"
as_fn_append ac_header_c_list " sanitizer/lsan_interface.h sanitizer_lsan_interface_h HAVE_SANITIZER_LSAN_INTERFACE_H"
as_fn_append ac_header_c_list " sanitizer/asan_interface.h sanitizer_asan_interface_h HAVE_SANITIZER_ASAN_INTERFACE_H"
as_fn_append ac_header_c_list " sanitizer/common_interface_defs.h sanitizer_common_interface_defs_h HAVE_SANITIZER_COMMON_INTERFACE_DEFS_H"
as_fn_append ac_header_c_list " sys/socket.h sys_socket_h HAVE_SYS_SOCKET_H"
as_fn_append ac_func_c_list " sbrk HAVE_SBRK"
as_fn_append ac_header_c_list " sys/param.h sys_param_h HAVE_SYS_PARAM_H"
as_fn_append ac_func_c_list " getpagesize HAVE_GETPAGESIZE"
as_fn_append ac_header_c_list " pthread.h pthread_h HAVE_PTHREAD_H"
as_fn_append ac_header_c_list " malloc/malloc.h malloc_malloc_h HAVE_MALLOC_MALLOC_H"
as_fn_append ac_header_c_list " sys/un.h sys_un_h HAVE_SYS_UN_H"
as_fn_append ac_func_c_list " __lsan_ignore_object HAVE___LSAN_IGNORE_OBJECT"
as_fn_append ac_header_c_list " vfork.h vfork_h HAVE_VFORK_H"
as_fn_append ac_func_c_list " fork HAVE_FORK"
as_fn_append ac_func_c_list " vfork HAVE_VFORK"
as_fn_append ac_func_c_list " fchmod HAVE_FCHMOD"
as_fn_append ac_header_c_list " utmp.h utmp_h HAVE_UTMP_H"
as_fn_append ac_header_c_list " utmpx.h utmpx_h HAVE_UTMPX_H"
as_fn_append ac_func_c_list " utmpname HAVE_UTMPNAME"
as_fn_append ac_func_c_list " utmpxname HAVE_UTMPXNAME"
as_fn_append ac_header_c_list " OS.h OS_h HAVE_OS_H"
as_fn_append ac_header_c_list " byteswap.h byteswap_h HAVE_BYTESWAP_H"
as_fn_append ac_func_c_list " canonicalize_file_name HAVE_CANONICALIZE_FILE_NAME"
as_fn_append ac_func_c_list " realpath HAVE_REALPATH"
as_fn_append ac_func_c_list " lstat HAVE_LSTAT"
as_fn_append ac_header_c_list " dirent.h dirent_h HAVE_DIRENT_H"
as_fn_append ac_header_c_list " execinfo.h execinfo_h HAVE_EXECINFO_H"
as_fn_append ac_func_c_list " fchmodat HAVE_FCHMODAT"
as_fn_append ac_func_c_list " lchmod HAVE_LCHMOD"
as_fn_append ac_func_c_list " fcntl HAVE_FCNTL"
as_fn_append ac_func_c_list " fdopendir HAVE_FDOPENDIR"
as_fn_append ac_header_c_list " linux/xattr.h linux_xattr_h HAVE_LINUX_XATTR_H"
as_fn_append ac_func_c_list " listxattr HAVE_LISTXATTR"
as_fn_append ac_header_c_list " stdio_ext.h stdio_ext_h HAVE_STDIO_EXT_H"
as_fn_append ac_func_c_list " fstatat HAVE_FSTATAT"
as_fn_append ac_header_c_list " sys/vfs.h sys_vfs_h HAVE_SYS_VFS_H"
as_fn_append ac_header_c_list " sys/fs_types.h sys_fs_types_h HAVE_SYS_FS_TYPES_H"
as_fn_append ac_func_c_list " fsync HAVE_FSYNC"
gl_getopt_required=GNU
as_fn_append ac_header_c_list " getopt.h getopt_h HAVE_GETOPT_H"
as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
as_fn_append ac_func_c_list " gettimeofday HAVE_GETTIMEOFDAY"
as_fn_append ac_header_c_list " ieee754.h ieee754_h HAVE_IEEE754_H"
as_fn_append ac_header_c_list " limits.h limits_h HAVE_LIMITS_H"
as_fn_append ac_func_c_list " memset_s HAVE_MEMSET_S"
as_fn_append ac_header_c_list " sys/select.h sys_select_h HAVE_SYS_SELECT_H"
as_fn_append ac_func_c_list " pselect HAVE_PSELECT"
as_fn_append ac_func_c_list " pthread_sigmask HAVE_PTHREAD_SIGMASK"
as_fn_append ac_func_c_list " readlink HAVE_READLINK"
as_fn_append ac_func_c_list " isblank HAVE_ISBLANK"
as_fn_append ac_func_c_list " iswctype HAVE_ISWCTYPE"
as_fn_append ac_header_c_list " stdbit.h stdbit_h HAVE_STDBIT_H"
as_fn_append ac_header_c_list " stdbool.h stdbool_h HAVE_STDBOOL_H"
as_fn_append ac_header_c_list " stdckdint.h stdckdint_h HAVE_STDCKDINT_H"
as_fn_append ac_func_c_list " strtoimax HAVE_STRTOIMAX"
as_fn_append ac_func_c_list " symlink HAVE_SYMLINK"
as_fn_append ac_header_c_list " sys/random.h sys_random_h HAVE_SYS_RANDOM_H"
as_fn_append ac_func_c_list " localtime_r HAVE_LOCALTIME_R"
as_fn_append ac_header_c_list " endian.h endian_h HAVE_ENDIAN_H"
as_fn_append ac_func_c_list " getdtablesize HAVE_GETDTABLESIZE"

# Auxiliary files required by this configure script.
ac_aux_files="install-sh ndk-build-helper.mk config.guess config.sub"

# Locations in which to look for auxiliary files.
ac_aux_dir_candidates="${srcdir}/build-aux"

# Search for a directory containing all of the required auxiliary files,
# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
# If we don't find one directory that contains all the files we need,
# we report the set of missing files from the *first* directory in
# $ac_aux_dir_candidates and give up.
ac_missing_aux_files=""
ac_first_candidate=:
printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_found=false
for as_dir in $ac_aux_dir_candidates
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
  as_found=:

  printf "%s\n" "$as_me:${as_lineno-$LINENO}:  trying $as_dir" >&5
  ac_aux_dir_found=yes
  ac_install_sh=
  for ac_aux in $ac_aux_files
  do
    # As a special case, if "install-sh" is required, that requirement
    # can be satisfied by any of "install-sh", "install.sh", or "shtool",
    # and $ac_install_sh is set appropriately for whichever one is found.
    if test x"$ac_aux" = x"install-sh"
    then
      if test -f "${as_dir}install-sh"; then
        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install-sh found" >&5
        ac_install_sh="${as_dir}install-sh -c"
      elif test -f "${as_dir}install.sh"; then
        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install.sh found" >&5
        ac_install_sh="${as_dir}install.sh -c"
      elif test -f "${as_dir}shtool"; then
        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}shtool found" >&5
        ac_install_sh="${as_dir}shtool install -c"
      else
        ac_aux_dir_found=no
        if $ac_first_candidate; then
          ac_missing_aux_files="${ac_missing_aux_files} install-sh"
        else
          break
        fi
      fi
    else
      if test -f "${as_dir}${ac_aux}"; then
        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}${ac_aux} found" >&5
      else
        ac_aux_dir_found=no
        if $ac_first_candidate; then
          ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
        else
          break
        fi
      fi
    fi
  done
  if test "$ac_aux_dir_found" = yes; then
    ac_aux_dir="$as_dir"
    break
  fi
  ac_first_candidate=false

  as_found=false
done
IFS=$as_save_IFS
if $as_found
then :

else $as_nop
  as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$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.
if test -f "${ac_aux_dir}config.guess"; then
  ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
fi
if test -f "${ac_aux_dir}config.sub"; then
  ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
fi
if test -f "$ac_aux_dir/configure"; then
  ac_configure="$SHELL ${ac_aux_dir}configure"
fi

# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
for ac_var in $ac_precious_vars; do
  eval ac_old_set=\$ac_cv_env_${ac_var}_set
  eval ac_new_set=\$ac_env_${ac_var}_set
  eval ac_old_val=\$ac_cv_env_${ac_var}_value
  eval ac_new_val=\$ac_env_${ac_var}_value
  case $ac_old_set,$ac_new_set in
    set,)
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
      ac_cache_corrupted=: ;;
    ,set)
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
printf "%s\n" "$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
	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
	  ac_cache_corrupted=:
	else
	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
	  eval $ac_var=\$ac_old_val
	fi
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
printf "%s\n" "$as_me:   former value:  \`$ac_old_val'" >&2;}
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
printf "%s\n" "$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=`printf "%s\n" "$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
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
  as_fn_error $? "run \`${MAKE-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



if test "$XCONFIGURE" = "android"; then
  # configure is being called recursively to configure Emacs for
  # Android!
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: called to recursively configure Emacs for Android." >&5
printf "%s\n" "$as_me: called to recursively configure Emacs for Android." >&6;}
  # Set CC to ANDROID_CC and CFLAGS to ANDROID_CFLAGS.
  CC=$ANDROID_CC
  # Set -Wno-implicit-function-declaration.  Building Emacs for older
  # versions of Android requires configure tests to fail if the
  # functions are not defined, as the Android library in the NDK
  # defines subroutines that are not available in the headers being
  # used.
  CFLAGS="$ANDROID_CFLAGS -Werror=implicit-function-declaration"
  # Don't explicitly enable support for large files unless Emacs is
  # being built for API 21 or later.  Otherwise, mmap does not work.
  #
  # Moreover, 64-bit variants of file IO functions in the C library are
  # liable to fail with ENOSYS or EINVAL on earlier API versions, and as
  # such their definitions must be explicitly disabled on NDK releases
  # that enable them by default.
  if test "$ANDROID_SDK" -lt "21"
then :

    CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=32"
    enable_largefile=no
    enable_year2038=no
fi
fi

emacs_config_options=
optsep=
for opt in "$@" CFLAGS CPPFLAGS LDFLAGS; do
  case $opt in
    -n | --no-create | --no-recursion)
      continue ;;
    CFLAGS | CPPFLAGS | LDFLAGS)
      eval 'test "${'$opt'+set}" = set' || continue
      case " $*" in
	*" $opt="*) continue ;;
      esac
      eval opt=$opt=\$$opt ;;
  esac

  emacs_shell_specials=$IFS\''"#$&()*;<>?[\\`{|~'
  case $opt in
    *["$emacs_shell_specials"]*)
      case $opt in
	*\'*)
	  emacs_quote_apostrophes="s/'/'\\\\''/g"
	  opt=`printf "%s\n" "$opt" | sed "$emacs_quote_apostrophes"` ;;
      esac
      opt="'$opt'"
      case $opt in
	*['"\\']*)
	  emacs_quote_for_c='s/["\\]/\\&/g; $!s/$/\\n\\/'
	  opt=`printf "%s\n" "$opt" | sed "$emacs_quote_for_c"` ;;
      esac ;;
  esac
  as_fn_append emacs_config_options "$optsep$opt"
  optsep=' '
done

ac_config_headers="$ac_config_headers src/config.h:src/config.in"





xcsdkdir=
for ac_prog in xcrun
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_XCRUN+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$XCRUN"; then
  ac_cv_prog_XCRUN="$XCRUN" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_XCRUN="$ac_prog"
    printf "%s\n" "$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
XCRUN=$ac_cv_prog_XCRUN
if test -n "$XCRUN"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XCRUN" >&5
printf "%s\n" "$XCRUN" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$XCRUN" && break
done

if test -n "$XCRUN"; then
  if test -z "$MAKE"; then
            # Extract the first word of "make", so it can be a program name with args.
set dummy make; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_MAKE_PROG+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$MAKE_PROG"; then
  ac_cv_prog_MAKE_PROG="$MAKE_PROG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_MAKE_PROG="yes"
    printf "%s\n" "$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
MAKE_PROG=$ac_cv_prog_MAKE_PROG
if test -n "$MAKE_PROG"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAKE_PROG" >&5
printf "%s\n" "$MAKE_PROG" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


    if test -z "$MAKE_PROG"; then
      MAKE="$XCRUN MAKE"
      export MAKE
      xcsdkdir=`$XCRUN --show-sdk-path 2>/dev/null`
    fi
  fi
fi

emacs_check_gnu_make ()
{
  emacs_makeout=`($1 --version) 2>/dev/null` &&
  case $emacs_makeout in
    'GNU Make '3.8[1-9]* | 'GNU Make '3.9[0-9]* | \
    'GNU Make '3.[1-9][0-9][0-9]* | 'GNU Make '[4-9]* | 'GNU Make '[1-9][0-9]* )
       ac_path_MAKE_found=:;;
  esac
}
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU Make" >&5
printf %s "checking for GNU Make... " >&6; }
if test ${ac_cv_path_MAKE+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_path_MAKE_found=false
   if test -n "$MAKE"; then
     emacs_check_gnu_make "$MAKE"
     ac_cv_path_MAKE=$MAKE
   else
     emacs_tried_make=false
     emacs_tried_gmake=false
     emacs_tried_gnumake=false
     if test -z "$MAKE"; then
  ac_path_MAKE_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
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_prog in make gmake gnumake
   do
    for ac_exec_ext in '' $ac_executable_extensions; do
      ac_path_MAKE="$as_dir$ac_prog$ac_exec_ext"
      as_fn_executable_p "$ac_path_MAKE" || continue
emacs_check_gnu_make "$ac_path_MAKE"
	 if $ac_path_MAKE_found; then
	   # Use the fully-qualified program name only if the basename
	   # would not resolve to it.
	   if eval \$emacs_tried_$ac_prog; then
	     ac_cv_path_MAKE=$ac_path_MAKE
	   else
	     ac_cv_path_MAKE=$ac_prog
	   fi
	 fi
	 eval emacs_tried_$ac_prog=:
      $ac_path_MAKE_found && break 3
    done
  done
  done
IFS=$as_save_IFS
  if test -z "$ac_cv_path_MAKE"; then
    :
  fi
else
  ac_cv_path_MAKE=$MAKE
fi

   fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_MAKE" >&5
printf "%s\n" "$ac_cv_path_MAKE" >&6; }
$ac_path_MAKE_found || {
as_fn_error $? "Building Emacs requires GNU Make, at least version 3.81.
If you have it installed under another name, configure with 'MAKE=...'.
For example, run '$0 MAKE=gnu-make'." "$LINENO" 5
}
MAKE=$ac_cv_path_MAKE
export MAKE

if test "$XCONFIGURE" = "android"; then

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the cross-compiler's target" >&5
printf %s "checking the cross-compiler's target... " >&6; }
  cc_target=`${CC} -v 2>&1 | sed -n 's/Target: //p'`
  case "$cc_target" in
    *android*) host_alias=$cc_target
    ;;
    *) as_fn_error $? "The cross compiler does not compile for Android.
Please verify that you specified the correct compiler in the ANDROID_CC
variable when you ran configure." "$LINENO" 5
    ;;
  esac
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $host_alias" >&5
printf "%s\n" "$host_alias" >&6; }
fi




  # 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

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
printf %s "checking build system type... " >&6; }
if test ${ac_cv_build+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
printf "%s\n" "$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


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
printf %s "checking host system type... " >&6; }
if test ${ac_cv_host+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
printf "%s\n" "$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




if test "$XCONFIGURE" = "android"
then :

  # Initialize the Android NDK build system.  Make sure to use the
  # passed through NDK path.
  # Make sure to pass through the CFLAGS, as older versions of the
  # NDK require them to be able to find system includes.
  with_ndk_path="$android_ndk_path"
  with_ndk_cxx="$android_ndk_cxx"

# Look for Android.mk files.
ndk_module_files=
for file in $with_ndk_path; do
  if test -f $file/Android.mk; then
    ndk_module_files="$ndk_module_files$file/Android.mk "
  fi
done



ndk_AUX_DIR=$ac_aux_dir
ndk_ABI=$android_abi
ndk_MODULES=
ndk_MAKEFILES=
ndk_INITIALIZED=yes
ndk_API=$ANDROID_SDK
ndk_DIR=cross/ndk-build
ndk_ANY_CXX=
ndk_BUILD_CFLAGS="$ANDROID_CFLAGS"
ndk_working_cxx=no
ndk_CXX_SHARED=

case "$ndk_ABI" in #(
  *arm64*) :
    ndk_ARCH=arm64 ;; #(
  *arm*) :
    ndk_ARCH=arm ;; #(
  *x86_64*) :
    ndk_ARCH=x86_64 ;; #(
  *x86*) :
    ndk_ARCH=x86 ;; #(
  *mips64*) :
    ndk_ARCH=mips64 ;; #(
  *mips*) :
    ndk_ARCH=mips ;; #(
  *) :
    as_fn_error $? "Failed to determine Android device architecture" "$LINENO" 5 ;;
esac

# This is a map between pkg-config style package names and Android
# ones.

ndk_package_map="libwebpdemux:webpdemux libxml-2.0:libxml2"
ndk_package_map="$ndk_package_map sqlite3:libsqlite_static_minimal"
ndk_package_map="$ndk_package_map MagickWand:libmagickwand-7 lcms2:liblcms2"

# Replace ndk_module with the appropriate Android module name if it is
# found in ndk_package_map.

ndk_replace_pkg_config_package () {
  for ndk_stuff in $ndk_package_map; do
    ndk_key=`printf "%s\n" $ndk_stuff | cut -d: -f1`
    ndk_value=`printf "%s\n" $ndk_stuff | cut -d: -f2`

    if test "$ndk_key" = "$ndk_module"; then
      ndk_module="$ndk_value"
      break
    fi
  done
}

# Run the Makefile helper script for the Android.mk file.

ndk_run_test () {
  # Figure out where the helper Makefile is.
  ndk_build_helper_file="${ndk_AUX_DIR}ndk-build-helper.mk"
  ndk_module_extract_awk="${ndk_AUX_DIR}ndk-module-extract.awk"
  ndk_dir=`$as_dirname -- $ndk_android_mk ||
$as_expr X$ndk_android_mk : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X$ndk_android_mk : 'X\(//\)[^/]' \| \
	 X$ndk_android_mk : 'X\(//\)$' \| \
	 X$ndk_android_mk : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X$ndk_android_mk |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`

  # Now call Make with the right arguments.
  "$MAKE" -s -f "$ndk_build_helper_file" EMACS_SRCDIR=`pwd`		\
    EMACS_ABI="$ndk_ABI" ANDROID_MAKEFILE="$ndk_android_mk"		\
    NDK_BUILD_DIR="$ndk_DIR" NDK_ROOT="/tmp"				\
    ANDROID_MODULE_DIRECTORY="$ndk_dir" BUILD_AUXDIR=$ndk_AUX_DIR	\
    NDK_BUILD_ARCH="$ndk_ARCH" 2>&5 >conftest.ndk

  # Read the output.
  cat conftest.ndk | awk -f "$ndk_module_extract_awk" MODULE="$ndk_module"

  # Remove the temporary file.
  rm -f conftest.ndk
}

# ndk_parse_pkg_config_string PKG_CONFIG_STRING
# ---------------------------------------------
# Parse a pkg-config style list of modules.  Place the resulting list
# in ndk_modules.

ndk_parse_pkg_config_string () {
  ndk_input=$1
  ndk_modules=
  while test -n "$ndk_input"; do
    ndk_str=`printf %s "$ndk_input" | cut -f1 -d' '`
    ndk_input=`printf %s "$ndk_input" | cut -s -f2- -d' '`

    if test "$ndk_str" = ">=" || test "$ndk_str" = "<=" \
      || test "$ndk_str" = ">" || test "$ndk_str" = "<" \
      || test "$ndk_str" = "!="; then
      ndk_input=`printf %s "$ndk_input" | cut -s -f2- -d' '`
    else
      ndk_modules="$ndk_modules$ndk_str "
    fi
  done
}

# ndk_resolve_import_module MODULE
# --------------------------------
# Resolve MODULE, a single import.  Prepend its makefile to
# ndk_MAKEFILES if found.  Also, prepend all includes to the variable
# ndk_import_includes.

ndk_resolve_import_module () {
  module_name=
  ndk_module=$1

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for imported $ndk_module" >&5
printf %s "checking for imported $ndk_module... " >&6; }

  for ndk_android_mk in $ndk_module_files; do
    # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
    # tree build system sets it to a meaningful value, but build files
    # just use it to test whether or not the NDK is being used.
    ndk_commands=`ndk_run_test`
    eval "$ndk_commands"

    if test -n "$module_name"; then
      break;
    fi
  done

  if test -z "$module_name"
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
     as_fn_error $? "The module currently being built depends on $1, but \
that could not be found in the list of directories specified in \
\`--with-ndk-path'." "$LINENO" 5
fi

  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $android_abi requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

  # Make sure the module is prepended.
  ndk_MODULES="$ndk_MODULES $module_target"
  ndk_MAKEFILES="$ndk_android_mk $ndk_MAKEFILES"
  ndk_import_includes="$module_includes $ndk_import_includes"

  # Now recursively resolve this module's imports.
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
  done
}

# ndk_filter_cc_for_cxx
# ---------------------
# Run through $CC, removing any options that are not suitable for
# use in a C++ compiler.

ndk_filter_cc_for_cxx () {
  for ndk_word in $CC; do
    case $ndk_word in #(
  *-std=*) :
     ;; #(
  *) :
    printf %s "$ndk_word " ;;
esac
  done
}

# ndk_subst_cc_onto_cxx
# ---------------------
# Print the value of $CXX, followed by any innocent looking options
# in $CC.

ndk_subst_cc_onto_cxx () {
  printf %s "$CXX "
  ndk_flag=
  for ndk_word in `printf %s "$CC" | cut -s -f2- -d' '`; do
    if test "$ndk_flag" = "yes"
then :
  printf %s "$ndk_word "
       ndk_flag=no
else $as_nop
  case $ndk_word in #(
  *-sysroot=*) :
    printf %s "$ndk_word " ;; #(
  *-isystem*) :
    printf %s "$ndk_word "
	   ndk_flag=yes ;; #(
  *-sysroot*) :
    printf %s "$ndk_word "
	   ndk_flag=yes ;; #(
  -D__ANDROID_API__*) :
    printf %s "$ndk_word " ;; #(
  *) :
     ;;
esac
fi
  done
}

# ndk_subst_cflags_onto_cxx
# ---------------------
# Print any options in CFLAGS also suitable for a C++ compiler.

ndk_subst_cflags_onto_cxx () {
  ndk_flag=
  for ndk_word in $CFLAGS; do
    if test "$ndk_flag" = "yes"
then :
  printf %s "$ndk_word "
       ndk_flag=no
else $as_nop
  case $ndk_word in #(
  *-sysroot=*) :
    printf %s "$ndk_word " ;; #(
  *-isystem*) :
    printf %s "$ndk_word "
	   ndk_flag=yes ;; #(
  *-I*) :
    printf %s "$ndk_word "
	   ndk_flag=yes ;; #(
  *-sysroot*) :
    printf %s "$ndk_word "
	   ndk_flag=yes ;; #(
  -D__ANDROID_API__*) :
    printf %s "$ndk_word " ;; #(
  *) :
     ;;
esac
fi
  done
}

# Detect the installation directory and type of the NDK being used.

ndk_install_dir=
ndk_toolchain_type=

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the directory where the NDK is installed" >&5
printf %s "checking for the directory where the NDK is installed... " >&6; }

ndk_programs_dirs=`$CC -print-search-dirs | sed -n "s/^programs:[\t ]*=\?\(.*\)/\1/p"`
ndk_save_IFS=$IFS; IFS=:
for ndk_dir in $ndk_programs_dirs; do
   if test -d "$ndk_dir"; then :; else
     continue
   fi
   ndk_dir=`cd "$ndk_dir"; pwd`
   while test "$ndk_dir" != "/" && test -z "$ndk_toolchain_type"; do
     ndk_dir=`$as_dirname -- $ndk_dir ||
$as_expr X$ndk_dir : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X$ndk_dir : 'X\(//\)[^/]' \| \
	 X$ndk_dir : 'X\(//\)$' \| \
	 X$ndk_dir : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X$ndk_dir |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
     if test -d "$ndk_dir/bin" && test -d "$ndk_dir/lib"
then :
                                            ndk_dir1=`$as_dirname -- "$ndk_dir" ||
$as_expr X"$ndk_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$ndk_dir" : 'X\(//\)[^/]' \| \
	 X"$ndk_dir" : 'X\(//\)$' \| \
	 X"$ndk_dir" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"$ndk_dir" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
       ndk_basename=`$as_basename -- "$ndk_dir1" ||
$as_expr X/"$ndk_dir1" : '.*/\([^/][^/]*\)/*$' \| \
	 X"$ndk_dir1" : 'X\(//\)$' \| \
	 X"$ndk_dir1" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X/"$ndk_dir1" |
    sed '/^.*\/\([^/][^/]*\)\/*$/{
	    s//\1/
	    q
	  }
	  /^X\/\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\/\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
       if test "$ndk_basename" = "prebuilt"
then :
  	  	  	  	  	  ndk_toolchain_type=combined
	  while test "$ndk_dir1" != "/"; do
	    if test -d "$ndk_dir1/toolchains" \
		   && test -d "$ndk_dir1/sources"
then :
  ndk_install_dir=$ndk_dir1
	       break
fi
	    ndk_dir1=`$as_dirname -- "$ndk_dir1" ||
$as_expr X"$ndk_dir1" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$ndk_dir1" : 'X\(//\)[^/]' \| \
	 X"$ndk_dir1" : 'X\(//\)$' \| \
	 X"$ndk_dir1" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"$ndk_dir1" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
	  done
else $as_nop
  ndk_toolchain_type=standalone
	  ndk_install_dir=$ndk_dir
fi
fi
   done
   if test -n "$ndk_toolchain_type"
then :
  break
fi
done
IFS=$ndk_save_IFS

if test -z "$ndk_install_dir"
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
printf "%s\n" "unknown" >&6; }
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: The NDK installation directory could not be \
derived from the compiler." >&5
printf "%s\n" "$as_me: WARNING: The NDK installation directory could not be \
derived from the compiler." >&2;}
else $as_nop
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ndk_install_dir ($ndk_toolchain_type)" >&5
printf "%s\n" "$ndk_install_dir ($ndk_toolchain_type)" >&6; }
fi

# Look for a suitable ar and ranlib in the same directory as the C
# compiler.
ndk_cc_firstword=`printf "%s\n" "$CC" | cut -d' ' -f1`
ndk_where_cc=`which $ndk_cc_firstword`
ndk_ar_search_path=$PATH
ndk_ranlib_search_path=$RANLIB

# First, try to find $host_alias-ar in PATH.
for ac_prog in $host_alias-ar
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_AR+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  case $AR in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_AR="$AR" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $ndk_ar_search_path
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_AR="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$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
AR=$ac_cv_path_AR
if test -n "$AR"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
printf "%s\n" "$AR" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$AR" && break
done


if test -z "$AR"
then :

  # Next, try finding either that or llvm-ar in the directory holding
  # CC.
  ndk_ar_search_path="`$as_dirname -- $ndk_where_cc ||
$as_expr X$ndk_where_cc : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X$ndk_where_cc : 'X\(//\)[^/]' \| \
	 X$ndk_where_cc : 'X\(//\)$' \| \
	 X$ndk_where_cc : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X$ndk_where_cc |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`:$ndk_ar_search_path"
  for ac_prog in $host_alias-ar llvm-ar
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_AR+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  case $AR in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_AR="$AR" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $ndk_ar_search_path
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_AR="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$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
AR=$ac_cv_path_AR
if test -n "$AR"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
printf "%s\n" "$AR" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$AR" && break
done

fi

# First, try to find $host_alias-ranlib in PATH.
for ac_prog in $host_alias-ranlib
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_RANLIB+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  case $RANLIB in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_RANLIB="$RANLIB" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $ndk_ranlib_search_path
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_RANLIB="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$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
RANLIB=$ac_cv_path_RANLIB
if test -n "$RANLIB"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
printf "%s\n" "$RANLIB" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$RANLIB" && break
done


if test -z "$RANLIB"
then :

  # Next, try finding either that or llvm-ranlib in the directory
  # holding CC.
  ndk_ranlib_search_path="`$as_dirname -- $ndk_where_cc ||
$as_expr X$ndk_where_cc : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X$ndk_where_cc : 'X\(//\)[^/]' \| \
	 X$ndk_where_cc : 'X\(//\)$' \| \
	 X$ndk_where_cc : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X$ndk_where_cc |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`:$ndk_ranlib_search_path"
  for ac_prog in $host_alias-ranlib llvm-ranlib
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_RANLIB+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  case $RANLIB in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_RANLIB="$RANLIB" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $ndk_ranlib_search_path
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_RANLIB="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$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
RANLIB=$ac_cv_path_RANLIB
if test -n "$RANLIB"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
printf "%s\n" "$RANLIB" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$RANLIB" && break
done

fi

NDK_BUILD_NASM=

# Next, try to find nasm on x86.  This doesn't ship with the NDK.
if test "$ndk_ARCH" = "x86" || test "$ndk_ARCH" = "x86_64"
then :
  for ac_prog in nasm
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_NDK_BUILD_NASM+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$NDK_BUILD_NASM"; then
  ac_cv_prog_NDK_BUILD_NASM="$NDK_BUILD_NASM" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_NDK_BUILD_NASM="$ac_prog"
    printf "%s\n" "$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
NDK_BUILD_NASM=$ac_cv_prog_NDK_BUILD_NASM
if test -n "$NDK_BUILD_NASM"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NDK_BUILD_NASM" >&5
printf "%s\n" "$NDK_BUILD_NASM" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$NDK_BUILD_NASM" && break
done

fi

# Search for a suitable readelf binary, which is required to generate
# the shared library list loaded on old Android systems.
for ac_prog in readelf llvm-readelf $host_alias-readelf
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_READELF+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  case $READELF in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="$ndk_ranlib_search_path:$PATH"
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_READELF="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$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
READELF=$ac_cv_path_READELF
if test -n "$READELF"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
printf "%s\n" "$READELF" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$READELF" && break
done

if test -z "$READELF"
then :
  as_fn_error $? "A suitable \`readelf' utility cannot be located.
Please verify that the Android NDK has been installed correctly,
or install a functioning \`readelf' yourself." "$LINENO" 5
fi
NDK_BUILD_READELF="$READELF"

# Search for a C++ compiler.  Upon failure, pretend the C compiler is a
# C++ compiler and use that instead.

ndk_cc_name=`$as_basename -- "${ndk_cc_firstword}" ||
$as_expr X/"${ndk_cc_firstword}" : '.*/\([^/][^/]*\)/*$' \| \
	 X"${ndk_cc_firstword}" : 'X\(//\)$' \| \
	 X"${ndk_cc_firstword}" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X/"${ndk_cc_firstword}" |
    sed '/^.*\/\([^/][^/]*\)\/*$/{
	    s//\1/
	    q
	  }
	  /^X\/\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\/\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
ndk_cxx_name=

case $ndk_cc_name in #(
  *-gcc) :
    ndk_cxx_name=`printf "%s\n" $ndk_cc_name | sed 's/gcc/g++/'` ;; #(
  *) :
    ndk_cxx_name="${ndk_cc_name}++" ;;
esac

if test -n "$with_ndk_cxx"
then :
  CXX=$with_ndk_cxx
else $as_nop
  for ac_prog in $ndk_cxx_name
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_CXX+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  case $CXX in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="`$as_dirname -- "$ndk_where_cc" ||
$as_expr X"$ndk_where_cc" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$ndk_where_cc" : 'X\(//\)[^/]' \| \
	 X"$ndk_where_cc" : 'X\(//\)$' \| \
	 X"$ndk_where_cc" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"$ndk_where_cc" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`:$PATH"
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_CXX="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$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
CXX=$ac_cv_path_CXX
if test -n "$CXX"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
printf "%s\n" "$CXX" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$CXX" && break
done

   if test -z "$CXX"
then :
  CXX=`ndk_filter_cc_for_cxx`
else $as_nop
  CXX=`ndk_subst_cc_onto_cxx`
fi
fi

# None of the C++ standard libraries installed with Android are
# available to NDK programs, which are expected to select one of several
# standard libraries distributed with the NDK.  This library must be
# extracted from the NDK by the program's build system and copied into
# the application directory, and the build system is also expected to
# provide the compiler with suitable options to enable it.
#
# Emacs, on recent releases of the NDK, prefers the libc++ library, the
# most complete of the libraries available, when it detects the presence
# of its headers and libraries in the compiler's search path.  Next in
# line are the several libraries located in a directory named `cxx-stl'
# inside the NDK distribution, of which Emacs prefers, in this order,
# the GNU libstdc++, stlport, gabi and the system C++ library.  The
# scope of the last two is confined to providing runtime support for
# basic C++ operations, and is useless for compiling most C++
# dependencies whose requirements go beyond such operations.
#
# The NDK comes in two forms.  In a "combined toolchain", all C++
# libraries are present in the NDK directory and the responsibility is
# left to the build system to locate and select the best C++ library,
# whereas in a "standalone toolchain" an STL will have already been
# specified a C++ library, besides which no others will be present.
#
# Though Android.mk files are provided by the NDK for each such library,
# Emacs cannot use any of these, both for lack of prebuilt support in
# its ndk-build implementation, and since they are absent from combined
# toolchains.

ndk_CXX_SHARED=
ndk_CXX_STL=
ndk_CXX_LDFLAGS=

if test -n "$CXX" && test -n "$ndk_install_dir"
then :
  ndk_library_dirs=`$CXX -print-search-dirs \
                      | sed -n "s/^libraries:[\t ]*=\?\(.*\)/\1/p"`
   if test "$ndk_toolchain_type" = "standalone"
then :
                 ndk_save_IFS=$IFS; IFS=:
     for ndk_dir in $ndk_library_dirs; do
       if test -d "$ndk_dir"; then :; else
	 continue
       fi
       ndk_dir=`cd "$ndk_dir"; pwd`
       if test -f "$ndk_dir/libc++_shared.so"; then
         ndk_CXX_SHARED="$ndk_dir/libc++_shared.so"
         ndk_CXX_LDFLAGS=-lc++_shared; break
       elif test -f "$ndk_dir/libgnustl_shared.so"; then
         ndk_CXX_SHARED="$ndk_dir/libgnustl_shared.so"
         ndk_CXX_LDFLAGS=-lgnustl_shared; break
       elif test -f "$ndk_dir/libstlport_shared.so"; then
         ndk_CXX_SHARED="$ndk_dir/libstlport_shared.so"
	 ndk_CXX_LDFLAGS=-lstlport_shared; break
       fi
     done
     IFS=$ndk_save_IFS
else $as_nop
                           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiler defaults to libc++" >&5
printf %s "checking whether compiler defaults to libc++... " >&6; }
     cat <<_ACEOF >conftest.cc
#include <string>
#ifndef _LIBCPP_VERSION
Not libc++!
#endif /* _LIBCPP_VERSION */

int
main (void)
{

}
_ACEOF
     if $CXX conftest.cc -o conftest.o >&5 2>&1
then :
          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	ndk_save_IFS=$IFS; IFS=:
	for ndk_dir in $ndk_library_dirs; do
	  if test -f "$ndk_dir/libc++_shared.so"; then
	    ndk_CXX_SHARED="$ndk_dir/libc++_shared.so"
	    ndk_CXX_LDFLAGS=-lc++_shared; break
	  fi
	done
	IFS=$ndk_save_IFS
else $as_nop
                          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
        ndk_gcc_version=`($CXX -v 2>&1) \
	 | sed -n "s/^gcc version \([0123456789]\+.[0123456789]\+\).*/\1/p"`
	cxx_stl="$ndk_install_dir/sources/cxx-stl"
	ndk_cxx_stl_base="$cxx_stl/gnu-libstdc++/$ndk_gcc_version"
	if test -n "$ndk_gcc_version" \
	       && test -d "$ndk_cxx_stl_base/libs/$ndk_ABI"
then :
  ndk_CXX_LDFLAGS="-L$ndk_cxx_stl_base/libs/$ndk_ABI -lgnustl_shared"
	   ndk_CXX_LDFLAGS="$ndk_CXX_LDFLAGS -lsupc++"
	   ndk_CXX_STL="-isystem $ndk_cxx_stl_base/include"
	   ndk_CXX_STL="$ndk_CXX_STL -isystem $ndk_cxx_stl_base/libs/$ndk_ABI/include"
	   ndk_CXX_SHARED="$ndk_cxx_stl_base/libs/$ndk_ABI/libgnustl_shared.so"
fi
	if test -f "$ndk_CXX_SHARED"
then :

else $as_nop
  	   	   ndk_CXX_STL=
	   ndk_CXX_SHARED=
	   ndk_CXX_LDFLAGS=
	   ndk_cxx_stl_base="$cxx_stl/stlport"
	   if test -d "$ndk_cxx_stl_base"
then :
  ndk_CXX_LDFLAGS="-L$ndk_cxx_stl_base/libs/$ndk_ABI -lstlport_shared"
	      ndk_CXX_STL="-isystem $ndk_cxx_stl_base/stlport"
	      ndk_CXX_SHARED="$ndk_cxx_stl_base/libs/$ndk_ABI/libstlport_shared.so"
fi
           if test -f "$ndk_CXX_SHARED"
then :

else $as_nop
  ndk_CXX_STL=
	      ndk_CXX_SHARED=
	      ndk_CXX_LDFLAGS=
	      ndk_cxx_stl_base="$cxx_stl/gabi++"
	      if test -d "$ndk_cxx_stl_base"
then :
  ndk_CXX_LDFLAGS="-L$ndk_cxx_stl_base/libs/$ndk_ABI -lgabi++_shared"
	        ndk_CXX_STL="$ndk_CXX_STL -isystem $ndk_cxx_stl_base/include"
	        ndk_CXX_SHARED="$ndk_cxx_stl_base/libs/$ndk_ABI/lgabi++_shared.so"
fi
fi
           if test -f "$ndk_CXX_SHARED"
then :

else $as_nop
  ndk_CXX_STL=
	      ndk_CXX_SHARED=
	      ndk_CXX_LDFLAGS=
	      ndk_cxx_stl_base="$cxx_stl/system"
	      if test -d "$ndk_cxx_stl_base"
then :
  ndk_CXX_LDFLAGS="-L$ndk_cxx_stl_base/libs/$ndk_ABI -lstdc++"
                ndk_CXX_STL="-isystem $ndk_cxx_stl_base/include"
	        	        	        ndk_CXX_SHARED=

fi
fi
fi
fi
     rm -f conftest.o
fi
fi

printf "%s\n"
printf "%s\n" "C++ compiler configuration: "
printf "%s\n"
printf "%s\n" "Library includes        : $ndk_CXX_STL"
printf "%s\n" "Linker options          : $ndk_CXX_LDFLAGS"
printf "%s\n" "Library file (if any)   : $ndk_CXX_SHARED"
printf "%s\n"


  # At the same time, configure libexec with the build directory
  # set to `exec'.
  as_dir=exec; as_fn_mkdir_p

  # Enter exec and configure it, using the C compiler as both the
  # assembler and the linker.  Determine the absolute name of the
  # source directory.
  # N.B. that the linker is actually cc, so pass -nostdlib, lest
  # the crt be linked in.  Likewise for as.

  case $srcdir in #(
  .) :
    emacs_srcdir=`pwd` ;; #(
  [\\/]* | ?:[\\/]*) :
    emacs_srcdir=$srcdir ;; #(
  *) :
    emacs_srcdir=`pwd`/$srcdir ;; #(
  *) :
     ;;
esac

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: configuring in \`exec'" >&5
printf "%s\n" "$as_me: configuring in \`exec'" >&6;}

  OLDCWD=`pwd`
  cd exec
  $CONFIG_SHELL $emacs_srcdir/exec/configure		\
		--host=$host "CC=$CC" "LD=$CC" "AS=$CC"	\
		"AR=$AR" "CFLAGS=$CFLAGS"
  emacs_val=$?
  cd $OLDCWD

  if test "$emacs_val" != "0"
then :
  as_fn_error $? "failed to configure in \`exec'" "$LINENO" 5
fi

fi

case $host in
 *-mingw*)

  if test -z "$host_alias"; then

      # No --host argument was given to 'configure'; therefore $host
      # was set to a default value based on the build platform.  But
      # this default value may be wrong if we are building from a
      # 64-bit MSYS[2] pre-configured to build 32-bit MinGW programs.
      # Therefore, we'll try to get the right host platform from the
      # compiler's target.

      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the compiler's target" >&5
printf %s "checking the compiler's target... " >&6; }
      if test -z "$CC"; then
	  cc=gcc
      else
	  cc=$CC
      fi
      cc_target=`$cc -v 2>&1 | sed -n 's/Target: //p'`
      case "$cc_target" in
          *-*) host=$cc_target
	      ;;
          "") as_fn_error $? "Impossible to obtain $cc compiler target.
Please explicitly provide --host." "$LINENO" 5
              ;;
	  *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Compiler reported non-standard target.
Defaulting to $host." >&5
printf "%s\n" "$as_me: WARNING: Compiler reported non-standard target.
Defaulting to $host." >&2;}
              ;;
      esac
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $host" >&5
printf "%s\n" "$host" >&6; }
  fi

  . $srcdir/nt/mingw-cfg.site

  case $srcdir in
    /* | ?:*)
      # srcdir is an absolute path.  In this case, force the format
      # "/c/foo/bar", to simplify later conversions to native Windows
      # format ("c:/foo/bar").
      srcdir=`cd "${srcdir}" && pwd -W`
      # 'eval' pacifies strict POSIX non-MinGW shells (Bug#18612).
      # We downcase the drive letter to avoid warnings when
      # generating autoloads.
      eval 'srcdir=/`echo ${srcdir:0:1} | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/"`"${srcdir:2}"'
      ;;
  esac;;
esac

canonical=$host
configuration=${host_alias-${build_alias-$host}}
emacs_uname_r=`uname -r`

test "$program_prefix" != NONE &&
  program_transform_name="s&^&$program_prefix&;$program_transform_name"
# Use a double $ so make ignores it.
test "$program_suffix" != NONE &&
  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
# Double any \ or $.
# By default was `s,x,x', remove it if useless.
ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`


lispdirrel='${version}/lisp'
lispdir='${datadir}/emacs/'${lispdirrel}
standardlisppath='${lispdir}'
locallisppath='${datadir}/emacs/${version}/site-lisp:'\
'${datadir}/emacs/site-lisp'
lisppath='${locallisppath}:${standardlisppath}'
etcdir='${datadir}/emacs/${version}/etc'
archlibdir='${libexecdir}/emacs/${version}/${configuration}'
etcdocdir='${datadir}/emacs/${version}/etc'
gamedir='${localstatedir}/games/emacs'


# Check whether --with-all was given.
if test ${with_all+y}
then :
  withval=$with_all; with_features=$withval
else $as_nop
  with_features=yes
fi







# For retrieving mail, unencrypted network connections are the default
# only on native MS-Windows platforms.  (FIXME: These platforms should
# also be secure by default.)


# Check whether --with-mailutils was given.
if test ${with_mailutils+y}
then :
  withval=$with_mailutils;
else $as_nop
  if test "$with_features" != "no"
then :
  with_mailutils=yes-unless-android
    if test "x$XCONFIGURE" != "xandroid"
then :
  (movemail --version) >/dev/null 2>&1 || with_mailutils=no
else $as_nop
              with_mailutils=no
fi
fi
fi



# Check whether --with-pop was given.
if test ${with_pop+y}
then :
  withval=$with_pop;
else $as_nop
      case $host in #(
  *-mingw*|*android*) :
    with_pop=yes ;; #(
  *) :
    with_pop=no-by-default ;;
esac
fi

if test "$with_pop" = yes; then
   printf "%s\n" "#define MAIL_USE_POP 1" >>confdefs.h

fi


# Check whether --with-kerberos was given.
if test ${with_kerberos+y}
then :
  withval=$with_kerberos;
else $as_nop
      with_kerberos=no
fi

if test "$with_kerberos" != no; then
   printf "%s\n" "#define KERBEROS 1" >>confdefs.h

fi


# Check whether --with-kerberos5 was given.
if test ${with_kerberos5+y}
then :
  withval=$with_kerberos5;
else $as_nop
      with_kerberos5=no
fi

if test "${with_kerberos5}" != no; then
  if test "${with_kerberos}" = no; then
    with_kerberos=yes
    printf "%s\n" "#define KERBEROS 1" >>confdefs.h

  fi

printf "%s\n" "#define KERBEROS5 1" >>confdefs.h

fi


# Check whether --with-hesiod was given.
if test ${with_hesiod+y}
then :
  withval=$with_hesiod;
else $as_nop
      with_hesiod=no
fi

if test "$with_hesiod" != no; then

printf "%s\n" "#define HESIOD 1" >>confdefs.h

fi


# Check whether --with-mail-unlink was given.
if test ${with_mail_unlink+y}
then :
  withval=$with_mail_unlink;
else $as_nop
      with_mail_unlink=no
fi

if test "$with_mail_unlink" != no; then

printf "%s\n" "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h

fi


# Check whether --with-mailhost was given.
if test ${with_mailhost+y}
then :
  withval=$with_mailhost;
printf "%s\n" "#define MAILHOST \"$withval\"" >>confdefs.h

fi



# Check whether --with-sound was given.
if test ${with_sound+y}
then :
  withval=$with_sound;  case "${withval}" in
      yes|no|alsa|oss|bsd-ossaudio) val=$withval ;;
      *) as_fn_error $? "'--with-sound=$withval' is invalid;
this option's value should be 'yes', 'no', 'alsa', 'oss', or 'bsd-ossaudio'." "$LINENO" 5
      ;;
    esac
    with_sound=$val

else $as_nop
  with_sound=$with_features
fi



# Check whether --with-pdumper was given.
if test ${with_pdumper+y}
then :
  withval=$with_pdumper;  case "${withval}" in
        yes|no|auto) val=$withval ;;
        *) as_fn_error $? "'--with-pdumper=$withval' is invalid;
this option's value should be 'yes' or 'no'." "$LINENO" 5 ;;
      esac
      with_pdumper=$val

else $as_nop
  with_pdumper=auto
fi



# Check whether --with-unexec was given.
if test ${with_unexec+y}
then :
  withval=$with_unexec;  case "${withval}" in
        yes|no|auto) val=$withval ;;
        *) as_fn_error $? "'--with-unexec=$withval' is invalid;
this option's value should be 'yes' or 'no'." "$LINENO" 5 ;;
      esac
      with_unexec=$val

else $as_nop
  with_unexec=auto
fi



# Check whether --with-dumping was given.
if test ${with_dumping+y}
then :
  withval=$with_dumping;  case "${withval}" in
        pdumper|unexec|none) val=$withval ;;
        *) as_fn_error $? "'--with-dumping=$withval is invalid;
this option's value should be 'pdumper', 'unexec', or 'none'." "$LINENO" 5
        ;;
      esac
      with_dumping=$val

else $as_nop
  with_dumping=pdumper
fi


if test "$with_pdumper" = "auto"; then
  if test "$with_dumping" = "pdumper"; then
    with_pdumper=yes
  else
    with_pdumper=no
  fi
fi

if test "$with_unexec" = "auto"; then
  if test "$with_dumping" = "unexec"; then
    with_unexec=yes
  else
    with_unexec=no
  fi
fi

if test "$with_dumping" = "pdumper" && test "$with_pdumper" = "no"; then
  as_fn_error $? "'--with-dumping=pdumper' requires pdumper support" "$LINENO" 5
fi

if test "$with_dumping" = "unexec" && test "$with_unexec" = "no"; then
  as_fn_error $? "'--with-dumping=unexec' requires unexec support" "$LINENO" 5
fi

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

printf "%s\n" "#define HAVE_PDUMPER 1" >>confdefs.h

  HAVE_PDUMPER=yes
else
  HAVE_PDUMPER=no
fi


DUMPING=$with_dumping



# Check whether --with-x-toolkit was given.
if test ${with_x_toolkit+y}
then :
  withval=$with_x_toolkit; 	  case "${withval}" in
	    y | ye | yes )	val=gtk ;;
	    n | no )		val=no  ;;
	    l | lu | luc | luci | lucid )	val=lucid ;;
	    a | at | ath | athe | athen | athena )	val=athena ;;
	    m | mo | mot | moti | motif )	val=motif ;;
	    g | gt | gtk  )	val=gtk ;;
	    gtk2  )	val=gtk2 ;;
	    gtk3  )	val=gtk3 ;;
	    * )
as_fn_error $? "'--with-x-toolkit=$withval' is invalid;
this option's value should be 'yes', 'no', 'lucid', 'athena', 'motif', 'gtk',
'gtk2' or 'gtk3'.  'yes' and 'gtk' are synonyms.
'athena' and 'lucid' are synonyms." "$LINENO" 5
	    ;;
	  esac
	  with_x_toolkit=$val

fi



# Check whether --with-wide-int was given.
if test ${with_wide_int+y}
then :
  withval=$with_wide_int;
else $as_nop
      with_wide_int=no
fi

if test "$with_wide_int" = yes; then

printf "%s\n" "#define WIDE_EMACS_INT 1" >>confdefs.h

fi

with_xpm_set=${with_xpm+set}

# Check whether --with-xpm was given.
if test ${with_xpm+y}
then :
  withval=$with_xpm;
else $as_nop
     with_xpm=$with_features
fi


# Check whether --with-jpeg was given.
if test ${with_jpeg+y}
then :
  withval=$with_jpeg;
else $as_nop
     with_jpeg=$with_features
fi


# Check whether --with-tiff was given.
if test ${with_tiff+y}
then :
  withval=$with_tiff;
else $as_nop
     with_tiff=$with_features
fi


# Check whether --with-gif was given.
if test ${with_gif+y}
then :
  withval=$with_gif;
else $as_nop
     with_gif=$with_features
fi


# Check whether --with-png was given.
if test ${with_png+y}
then :
  withval=$with_png;
else $as_nop
     with_png=$with_features
fi


# Check whether --with-rsvg was given.
if test ${with_rsvg+y}
then :
  withval=$with_rsvg;
else $as_nop
     with_rsvg=$with_features
fi


# Check whether --with-webp was given.
if test ${with_webp+y}
then :
  withval=$with_webp;
else $as_nop
     with_webp=$with_features
fi


# Check whether --with-sqlite3 was given.
if test ${with_sqlite3+y}
then :
  withval=$with_sqlite3;
else $as_nop
     with_sqlite3=$with_features
fi


# Check whether --with-lcms2 was given.
if test ${with_lcms2+y}
then :
  withval=$with_lcms2;
else $as_nop
     with_lcms2=$with_features
fi


# Check whether --with-libsystemd was given.
if test ${with_libsystemd+y}
then :
  withval=$with_libsystemd;
else $as_nop
     with_libsystemd=$with_features
fi


# Check whether --with-cairo was given.
if test ${with_cairo+y}
then :
  withval=$with_cairo;
else $as_nop
     with_cairo=$with_features
fi


# Check whether --with-cairo-xcb was given.
if test ${with_cairo_xcb+y}
then :
  withval=$with_cairo_xcb;
else $as_nop
      with_cairo_xcb=no
fi


# Check whether --with-xml2 was given.
if test ${with_xml2+y}
then :
  withval=$with_xml2;
else $as_nop
     with_xml2=$with_features
fi


# Check whether --with-imagemagick was given.
if test ${with_imagemagick+y}
then :
  withval=$with_imagemagick;
else $as_nop
      with_imagemagick=no
fi


# Check whether --with-native-image-api was given.
if test ${with_native_image_api+y}
then :
  withval=$with_native_image_api;
else $as_nop
     with_native_image_api=$with_features
fi


# Check whether --with-tree-sitter was given.
if test ${with_tree_sitter+y}
then :
  withval=$with_tree_sitter;
else $as_nop
      if test "$with_features" != no
then :
  with_tree_sitter=ifavailable
else $as_nop
  with_tree_sitter=no
fi
fi



# Check whether --with-xft was given.
if test ${with_xft+y}
then :
  withval=$with_xft;
else $as_nop
     with_xft=$with_features
fi


# Check whether --with-harfbuzz was given.
if test ${with_harfbuzz+y}
then :
  withval=$with_harfbuzz;
else $as_nop
     with_harfbuzz=$with_features
fi


# Check whether --with-libotf was given.
if test ${with_libotf+y}
then :
  withval=$with_libotf;
else $as_nop
     with_libotf=$with_features
fi


# Check whether --with-m17n-flt was given.
if test ${with_m17n_flt+y}
then :
  withval=$with_m17n_flt;
else $as_nop
     with_m17n_flt=$with_features
fi



# Check whether --with-toolkit-scroll-bars was given.
if test ${with_toolkit_scroll_bars+y}
then :
  withval=$with_toolkit_scroll_bars;
else $as_nop
     with_toolkit_scroll_bars=$with_features
fi


# Check whether --with-xaw3d was given.
if test ${with_xaw3d+y}
then :
  withval=$with_xaw3d;
else $as_nop
     with_xaw3d=$with_features
fi


# Check whether --with-xim was given.
if test ${with_xim+y}
then :
  withval=$with_xim;
else $as_nop
     with_xim=$with_features
fi


# Check whether --with-xdbe was given.
if test ${with_xdbe+y}
then :
  withval=$with_xdbe;
else $as_nop
     with_xdbe=$with_features
fi


# Check whether --with-ns was given.
if test ${with_ns+y}
then :
  withval=$with_ns;
else $as_nop
  with_ns=maybe
fi


# Check whether --with-w32 was given.
if test ${with_w32+y}
then :
  withval=$with_w32;
else $as_nop
      with_w32=no
fi


# Check whether --with-pgtk was given.
if test ${with_pgtk+y}
then :
  withval=$with_pgtk;
else $as_nop
      with_pgtk=no
fi



# Check whether --with-gpm was given.
if test ${with_gpm+y}
then :
  withval=$with_gpm;
else $as_nop
     with_gpm=$with_features
fi


# Check whether --with-dbus was given.
if test ${with_dbus+y}
then :
  withval=$with_dbus;
else $as_nop
     with_dbus=$with_features
fi


# Check whether --with-gconf was given.
if test ${with_gconf+y}
then :
  withval=$with_gconf;
else $as_nop
  if test $with_features = yes; then
with_gconf=maybe
else
with_gconf=no
fi
fi


# Check whether --with-gsettings was given.
if test ${with_gsettings+y}
then :
  withval=$with_gsettings;
else $as_nop
     with_gsettings=$with_features
fi


# Check whether --with-selinux was given.
if test ${with_selinux+y}
then :
  withval=$with_selinux;
else $as_nop
     with_selinux=$with_features
fi


# Check whether --with-gnutls was given.
if test ${with_gnutls+y}
then :
  withval=$with_gnutls;
else $as_nop
     with_gnutls=$with_features
fi


# Check whether --with-zlib was given.
if test ${with_zlib+y}
then :
  withval=$with_zlib;
else $as_nop
     with_zlib=$with_features
fi


# Check whether --with-modules was given.
if test ${with_modules+y}
then :
  withval=$with_modules;
else $as_nop
     with_modules=$with_features
fi


# Check whether --with-threads was given.
if test ${with_threads+y}
then :
  withval=$with_threads;
else $as_nop
     with_threads=$with_features
fi


# Check whether --with-cygwin32-native-compilation was given.
if test ${with_cygwin32_native_compilation+y}
then :
  withval=$with_cygwin32_native_compilation;
else $as_nop
      with_cygwin32_native_compilation=no
fi


# Check whether --with-xinput2 was given.
if test ${with_xinput2+y}
then :
  withval=$with_xinput2;
else $as_nop
     with_xinput2=$with_features
fi


# Check whether --with-small-ja-dic was given.
if test ${with_small_ja_dic+y}
then :
  withval=$with_small_ja_dic;
else $as_nop
      with_small_ja_dic=no
fi


# Check whether --with-android was given.
if test ${with_android+y}
then :
  withval=$with_android;
else $as_nop
      with_android=no
fi


# Check whether --with-android-debug was given.
if test ${with_android_debug+y}
then :
  withval=$with_android_debug;
else $as_nop
     with_android_debug=$with_features
fi


# Find out of Android support is enabled and mailutils has defaulted
# to `yes-unless-android'.  Disable it if so.

if test "x$with_mailutils" = "xyes-unless-android"
then :
  if test "x$with_android" != "xno"
then :
  with_mailutils=no
else $as_nop
  with_mailutils=yes
fi
fi

# Clear with_mailutils if it's set to no.

if test "$with_mailutils" = no
then :
  with_mailutils=
fi

if test x"$with_mailutils" = xyes
then :

printf "%s\n" "#define HAVE_MAILUTILS 1" >>confdefs.h

fi




# Check whether --with-shared-user-id was given.
if test ${with_shared_user_id+y}
then :
  withval=$with_shared_user_id;
fi



# Check whether --with-file-notification was given.
if test ${with_file_notification+y}
then :
  withval=$with_file_notification;  case "${withval}" in
    y | ye | yes )	val=yes ;;
    n | no )		val=no  ;;
    i | in | ino | inot | inoti | inotif | inotify )	val=inotify ;;
    k | kq | kqu | kque | kqueu | kqueue )	val=kqueue ;;
    g | gf | gfi | gfil | gfile )	val=gfile ;;
    w | w3 | w32 )	val=w32 ;;
    * ) as_fn_error $? "'--with-file-notification=$withval' is invalid;
this option's value should be 'yes', 'no', 'inotify', 'kqueue', 'gfile' or 'w32'.
'yes' is a synonym for 'w32' on MS-Windows, for 'no' on Nextstep,
otherwise for the first of 'inotify', 'kqueue' or 'gfile' that is usable." "$LINENO" 5
    ;;
   esac
   with_file_notification=$val

else $as_nop
  with_file_notification=$with_features
fi



# Check whether --with-xwidgets was given.
if test ${with_xwidgets+y}
then :
  withval=$with_xwidgets;
else $as_nop
      with_xwidgets=no
fi



# Check whether --with-be-app was given.
if test ${with_be_app+y}
then :
  withval=$with_be_app;
else $as_nop
      with_be_app=no
fi



# Check whether --with-be-cairo was given.
if test ${with_be_cairo+y}
then :
  withval=$with_be_cairo;
else $as_nop
      with_be_cairo=no
fi


## Makefile.in needs the cache file name.


## This is an option because I do not know if all info/man support
## compressed files, nor how to test if they do so.

# Check whether --with-compress-install was given.
if test ${with_compress_install+y}
then :
  withval=$with_compress_install;
else $as_nop
     with_compress_install=$with_features
fi



# Check whether --with-gameuser was given.
if test ${with_gameuser+y}
then :
  withval=$with_gameuser;
fi

gameuser=
gamegroup=
case ${with_gameuser} in
  '' | no) ;;
  yes) gamegroup=games ;;
  :*) gamegroup=${with_gameuser#:} ;;
  *) gameuser=${with_gameuser} ;;
esac


# Check whether --with-gnustep-conf was given.
if test ${with_gnustep_conf+y}
then :
  withval=$with_gnustep_conf;
fi

test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
  GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
test "X$GNUSTEP_CONFIG_FILE" = "X" && \
     GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf

# Check whether --enable-ns-self-contained was given.
if test ${enable_ns_self_contained+y}
then :
  enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval
else $as_nop
  EN_NS_SELF_CONTAINED=yes
fi


locallisppathset=no
# Check whether --enable-locallisppath was given.
if test ${enable_locallisppath+y}
then :
  enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
  locallisppath=
elif test "${enableval}" != "yes"; then
  locallisppath=${enableval} locallisppathset=yes
fi
fi


# Check whether --enable-checking was given.
if test ${enable_checking+y}
then :
  enableval=$enable_checking; ac_checking_flags="${enableval}"
fi

IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS="$IFS,"
CHECK_STRUCTS=false
for check in $ac_checking_flags
do
	case $check in
	# these set all the flags to specific states
	yes)		ac_enable_checking=1 ;;
	no)		ac_enable_checking= ;
			CHECK_STRUCTS=false
			ac_gc_check_stringbytes= ;
	                ac_gc_check_string_overrun= ;
	                ac_gc_check_string_free_list= ;
			ac_glyphs_debug= ;;
	all)		ac_enable_checking=1 ;
			CHECK_STRUCTS=true
			ac_gc_check_stringbytes=1 ;
	                ac_gc_check_string_overrun=1 ;
	                ac_gc_check_string_free_list=1 ;
			ac_glyphs_debug=1 ;;
	# these enable particular checks
	stringbytes)	ac_gc_check_stringbytes=1 ;;
	stringoverrun)	ac_gc_check_string_overrun=1 ;;
	stringfreelist) ac_gc_check_string_free_list=1 ;;
	structs)	CHECK_STRUCTS=true ;;
	glyphs)		ac_glyphs_debug=1 ;;
	*)	as_fn_error $? "unknown check category $check" "$LINENO" 5 ;;
	esac
done
IFS="$ac_save_IFS"

# This environment variable is used to signal that checking should be
# enabled on Android.  When that happens, simply enable checking for
# the cross-compiled Android binary.

if test "x$XCONFIGURE" = "xandroid" \
       && test "x$android_enable_checking" = "xyes"
then :
  ac_enable_checking=yes
fi

# There is little point in enabling checking in the build machine if
# cross-compiling for Android.
if test "$with_android" = no || test -n "$XCONFIGURE"
then :

  if test x$ac_enable_checking != x ; then

printf "%s\n" "#define ENABLE_CHECKING 1" >>confdefs.h

  fi
  if $CHECK_STRUCTS; then

printf "%s\n" "#define CHECK_STRUCTS 1" >>confdefs.h

  fi

  if test x$ac_gc_check_stringbytes != x ; then

printf "%s\n" "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h

  fi
  if test x$ac_gc_check_string_overrun != x ; then

printf "%s\n" "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h

  fi
  if test x$ac_gc_check_string_free_list != x ; then

printf "%s\n" "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h

  fi
  if test x$ac_glyphs_debug != x ; then

printf "%s\n" "#define GLYPH_DEBUG 1" >>confdefs.h

  fi

else $as_nop
  if test "x$ac_enable_checking" != x
then :
  android_enable_checking=yes
     export android_enable_checking
fi
fi

# Check whether --enable-gc-mark-trace was given.
if test ${enable_gc_mark_trace+y}
then :
  enableval=$enable_gc_mark_trace; ac_enable_gc_mark_trace="${enableval}"
else $as_nop
  ac_enable_gc_mark_trace=yes
fi

if test "x$ac_enable_gc_mark_trace" = xyes ; then

printf "%s\n" "#define GC_REMEMBER_LAST_MARKED 1" >>confdefs.h

fi

# Check whether --enable-profiling was given.
if test ${enable_profiling+y}
then :
  enableval=$enable_profiling; ac_enable_profiling="${enableval}"
fi

if test x$ac_enable_profiling != x ; then
   PROFILING_CFLAGS="-DPROFILING=1 -pg"
else
   PROFILING_CFLAGS=
fi


# Check whether --enable-autodepend was given.
if test ${enable_autodepend+y}
then :
  enableval=$enable_autodepend; ac_enable_autodepend="${enableval}"
else $as_nop
  ac_enable_autodepend=yes
fi


# Check whether --enable-gtk-deprecation-warnings was given.
if test ${enable_gtk_deprecation_warnings+y}
then :
  enableval=$enable_gtk_deprecation_warnings; ac_enable_gtk_deprecation_warnings="${enableval}"
fi


BUILD_DETAILS=
# Check whether --enable-build-details was given.
if test ${enable_build_details+y}
then :
  enableval=$enable_build_details; test "$enableval" = no && BUILD_DETAILS=--no-build-details
fi



# JAVA_PUSH_LINT(OPT)
# -------------------
# Check if javac supports the diagnostic flag -Xlint:OPT.
# If it does, add it to WARN_JAVAFLAGS.



# Start Android configuration.  This is done in three steps:

# First, the SDK tools needed to build the Android package on the host
# are found.

# Then, configure is called inside itself with the NDK C and C++
# compilers, and the Makefiles generated, along with config.h, are
# renamed to end with .android.

# Finally, configure continues to configure the Emacs binary that will
# run on the host.

ANDROID=
JAVAC=
AAPT=
JARSIGNER=
APKSIGNER=
ZIPALIGN=
DX=
ANDROID_JAR=
ANDROID_ABI=
WARN_JAVAFLAGS=
ANDROID_SHARED_USER_ID=
ANDROID_SHARED_USER_NAME=
IS_D8_R8=

# This is a list of Makefiles that have alternative versions for
# Android.
android_makefiles="lib/Makefile lib/gnulib.mk lib-src/Makefile src/Makefile"

# This is whether or not to package mailutils into the executable.
emacs_use_mailutils=










if test "$with_android" = "yes"; then
   as_fn_error $? "Please specify the path to the Android.jar file, like so:

  ./configure --with-android=/path/to/android.jar

along with the path to the SDK build-tools (this is the directory with
tools such as aapt, dx, and aidl):

              SDK_BUILD_TOOLS=/path/to/sdk-build-tools

The cross-compiler should then be specified:

              ANDROID_CC=/path/to/armv7a-linux-androideabi19-clang

In addition, you may pass any special arguments to the cross-compiler
via the ANDROID_CFLAGS environment variable." "$LINENO" 5
elif test "$with_android" = "no" || test "$with_android" = ""; then
  ANDROID=no
else
  for ac_prog in javac
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_JAVAC+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$JAVAC"; then
  ac_cv_prog_JAVAC="$JAVAC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_JAVAC="$ac_prog"
    printf "%s\n" "$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
JAVAC=$ac_cv_prog_JAVAC
if test -n "$JAVAC"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
printf "%s\n" "$JAVAC" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$JAVAC" && break
done

  if test "$JAVAC" = ""; then
    as_fn_error $? "The Java compiler required to build Emacs was not found.
Please make sure \`javac' can be found on your path, or alternatively specify
the path to your Java compiler before configuring Emacs, like so:

  JAVAC=/opt/jdk/bin/javac ./configure --with-android" "$LINENO" 5
  fi

  for ac_prog in jarsigner
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_JARSIGNER+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$JARSIGNER"; then
  ac_cv_prog_JARSIGNER="$JARSIGNER" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_JARSIGNER="$ac_prog"
    printf "%s\n" "$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
JARSIGNER=$ac_cv_prog_JARSIGNER
if test -n "$JARSIGNER"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
printf "%s\n" "$JARSIGNER" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$JARSIGNER" && break
done

  if test "$JARSIGNER" = ""; then
    as_fn_error $? "The Java package signing utility was not found.
Please make sure \`jarsigner' can be found on your path, or alternatively
specify its location before configuring Emacs, like so:

  JARSIGNER=/opt/jdk/bin/jarsigner ./configure --with-android" "$LINENO" 5
  fi

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the Java compiler works" >&5
printf %s "checking whether the Java compiler works... " >&6; }
if test ${emacs_cv_working_javac+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if rm -f conftest.class
cat << EOF > conftest.java

import android.app.Activity;
import android.os.Bundle;

class conftest extends Activity
{
  @Override
  public void
  onCreate (Bundle savedInstanceState)
  {
    super.onCreate (savedInstanceState);
  }
}

EOF
("$JAVAC" -classpath "$with_android" -target 1.7 -source 1.7 conftest.java \
  -d . >&5 2>&1) && test -s conftest.class && rm -f conftest.class
then :
  emacs_cv_working_javac=yes
else $as_nop
  emacs_cv_working_javac=no
fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_working_javac" >&5
printf "%s\n" "$emacs_cv_working_javac" >&6; }

  if test "$emacs_cv_working_javac" = "no"; then
    as_fn_error $? "The Java compiler does not work, or you did not specify
a valid path to android.jar.  See config.log for more details." "$LINENO" 5
  fi

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether android.jar is new enough" >&5
printf %s "checking whether android.jar is new enough... " >&6; }
if test ${emacs_cv_android_u_or_later+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if rm -f conftest.class
cat << EOF > conftest.java

import android.os.Build;

class conftest
{
  private static int test = Build.VERSION_CODES.UPSIDE_DOWN_CAKE;
}

EOF
("$JAVAC" -classpath "$with_android" -target 1.7 -source 1.7 conftest.java \
  -d . >&5 2>&1) && test -s conftest.class && rm -f conftest.class
then :
  emacs_cv_android_u_or_later=yes
else $as_nop
  emacs_cv_android_u_or_later=no
fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_android_u_or_later" >&5
printf "%s\n" "$emacs_cv_android_u_or_later" >&6; }

  if test "$emacs_cv_android_u_or_later" = "no"; then
    as_fn_error $? "Emacs must be built with an android.jar file produced for \
Android 14 (Upside Down Cake) or later." "$LINENO" 5
  fi


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether javac accepts --release 7" >&5
printf %s "checking whether javac accepts --release 7... " >&6; }
if test ${emacs_cv_javac_release_7+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if rm -f conftest.class
cat << EOF > conftest.java

class conftest
{

}

EOF
("$JAVAC" --release 7 conftest.java 2>&5) \
  && rm -f conftest.class
then :
  emacs_cv_javac_release_7=yes
else $as_nop
  emacs_cv_javac_release_7=no
fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_javac_release_7" >&5
printf "%s\n" "$emacs_cv_javac_release_7" >&6; }

  if test "$emacs_cv_javac_release_7" = "yes"; then
    WARN_JAVAFLAGS="$WARN_JAVAFLAGS --release 7"
  else
        WARN_JAVAFLAGS="$WARN_JAVAFLAGS -target 1.7 -source 1.7"
  fi


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Java compiler accepts -Xlint:deprecation" >&5
printf %s "checking whether Java compiler accepts -Xlint:deprecation... " >&6; }
if test ${emacs_cv_javac_knows_lint_deprecation+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if rm -f conftest.class
cat << EOF > conftest.java

class conftest
{

}

EOF
("$JAVAC" -Xlint:deprecation conftest.java 2>&5) \
  && rm -f conftest.class
then :
  emacs_cv_javac_knows_lint_deprecation=yes
else $as_nop
  emacs_cv_javac_knows_lint_deprecation=no
fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_javac_knows_lint_deprecation" >&5
printf "%s\n" "$emacs_cv_javac_knows_lint_deprecation" >&6; }

  if test "$emacs_cv_javac_knows_lint_deprecation" = "yes"
then :
  WARN_JAVAFLAGS="$WARN_JAVAFLAGS -Xlint:deprecation"
fi


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Java compiler accepts -Xlint:cast" >&5
printf %s "checking whether Java compiler accepts -Xlint:cast... " >&6; }
if test ${emacs_cv_javac_knows_lint_cast+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if rm -f conftest.class
cat << EOF > conftest.java

class conftest
{

}

EOF
("$JAVAC" -Xlint:cast conftest.java 2>&5) \
  && rm -f conftest.class
then :
  emacs_cv_javac_knows_lint_cast=yes
else $as_nop
  emacs_cv_javac_knows_lint_cast=no
fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_javac_knows_lint_cast" >&5
printf "%s\n" "$emacs_cv_javac_knows_lint_cast" >&6; }

  if test "$emacs_cv_javac_knows_lint_cast" = "yes"
then :
  WARN_JAVAFLAGS="$WARN_JAVAFLAGS -Xlint:cast"
fi


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Java compiler accepts -Xlint:divzero" >&5
printf %s "checking whether Java compiler accepts -Xlint:divzero... " >&6; }
if test ${emacs_cv_javac_knows_lint_divzero+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if rm -f conftest.class
cat << EOF > conftest.java

class conftest
{

}

EOF
("$JAVAC" -Xlint:divzero conftest.java 2>&5) \
  && rm -f conftest.class
then :
  emacs_cv_javac_knows_lint_divzero=yes
else $as_nop
  emacs_cv_javac_knows_lint_divzero=no
fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_javac_knows_lint_divzero" >&5
printf "%s\n" "$emacs_cv_javac_knows_lint_divzero" >&6; }

  if test "$emacs_cv_javac_knows_lint_divzero" = "yes"
then :
  WARN_JAVAFLAGS="$WARN_JAVAFLAGS -Xlint:divzero"
fi


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Java compiler accepts -Xlint:nonempty" >&5
printf %s "checking whether Java compiler accepts -Xlint:nonempty... " >&6; }
if test ${emacs_cv_javac_knows_lint_nonempty+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if rm -f conftest.class
cat << EOF > conftest.java

class conftest
{

}

EOF
("$JAVAC" -Xlint:nonempty conftest.java 2>&5) \
  && rm -f conftest.class
then :
  emacs_cv_javac_knows_lint_nonempty=yes
else $as_nop
  emacs_cv_javac_knows_lint_nonempty=no
fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_javac_knows_lint_nonempty" >&5
printf "%s\n" "$emacs_cv_javac_knows_lint_nonempty" >&6; }

  if test "$emacs_cv_javac_knows_lint_nonempty" = "yes"
then :
  WARN_JAVAFLAGS="$WARN_JAVAFLAGS -Xlint:nonempty"
fi


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Java compiler accepts -Xlint:empty" >&5
printf %s "checking whether Java compiler accepts -Xlint:empty... " >&6; }
if test ${emacs_cv_javac_knows_lint_empty+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if rm -f conftest.class
cat << EOF > conftest.java

class conftest
{

}

EOF
("$JAVAC" -Xlint:empty conftest.java 2>&5) \
  && rm -f conftest.class
then :
  emacs_cv_javac_knows_lint_empty=yes
else $as_nop
  emacs_cv_javac_knows_lint_empty=no
fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_javac_knows_lint_empty" >&5
printf "%s\n" "$emacs_cv_javac_knows_lint_empty" >&6; }

  if test "$emacs_cv_javac_knows_lint_empty" = "yes"
then :
  WARN_JAVAFLAGS="$WARN_JAVAFLAGS -Xlint:empty"
fi


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Java compiler accepts -Xlint:finally" >&5
printf %s "checking whether Java compiler accepts -Xlint:finally... " >&6; }
if test ${emacs_cv_javac_knows_lint_finally+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if rm -f conftest.class
cat << EOF > conftest.java

class conftest
{

}

EOF
("$JAVAC" -Xlint:finally conftest.java 2>&5) \
  && rm -f conftest.class
then :
  emacs_cv_javac_knows_lint_finally=yes
else $as_nop
  emacs_cv_javac_knows_lint_finally=no
fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_javac_knows_lint_finally" >&5
printf "%s\n" "$emacs_cv_javac_knows_lint_finally" >&6; }

  if test "$emacs_cv_javac_knows_lint_finally" = "yes"
then :
  WARN_JAVAFLAGS="$WARN_JAVAFLAGS -Xlint:finally"
fi


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Java compiler accepts -Xlint:overrides" >&5
printf %s "checking whether Java compiler accepts -Xlint:overrides... " >&6; }
if test ${emacs_cv_javac_knows_lint_overrides+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if rm -f conftest.class
cat << EOF > conftest.java

class conftest
{

}

EOF
("$JAVAC" -Xlint:overrides conftest.java 2>&5) \
  && rm -f conftest.class
then :
  emacs_cv_javac_knows_lint_overrides=yes
else $as_nop
  emacs_cv_javac_knows_lint_overrides=no
fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_javac_knows_lint_overrides" >&5
printf "%s\n" "$emacs_cv_javac_knows_lint_overrides" >&6; }

  if test "$emacs_cv_javac_knows_lint_overrides" = "yes"
then :
  WARN_JAVAFLAGS="$WARN_JAVAFLAGS -Xlint:overrides"
fi


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Java compiler accepts -Xlint:path" >&5
printf %s "checking whether Java compiler accepts -Xlint:path... " >&6; }
if test ${emacs_cv_javac_knows_lint_path+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if rm -f conftest.class
cat << EOF > conftest.java

class conftest
{

}

EOF
("$JAVAC" -Xlint:path conftest.java 2>&5) \
  && rm -f conftest.class
then :
  emacs_cv_javac_knows_lint_path=yes
else $as_nop
  emacs_cv_javac_knows_lint_path=no
fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_javac_knows_lint_path" >&5
printf "%s\n" "$emacs_cv_javac_knows_lint_path" >&6; }

  if test "$emacs_cv_javac_knows_lint_path" = "yes"
then :
  WARN_JAVAFLAGS="$WARN_JAVAFLAGS -Xlint:path"
fi


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Java compiler accepts -Xlint:serial" >&5
printf %s "checking whether Java compiler accepts -Xlint:serial... " >&6; }
if test ${emacs_cv_javac_knows_lint_serial+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if rm -f conftest.class
cat << EOF > conftest.java

class conftest
{

}

EOF
("$JAVAC" -Xlint:serial conftest.java 2>&5) \
  && rm -f conftest.class
then :
  emacs_cv_javac_knows_lint_serial=yes
else $as_nop
  emacs_cv_javac_knows_lint_serial=no
fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_javac_knows_lint_serial" >&5
printf "%s\n" "$emacs_cv_javac_knows_lint_serial" >&6; }

  if test "$emacs_cv_javac_knows_lint_serial" = "yes"
then :
  WARN_JAVAFLAGS="$WARN_JAVAFLAGS -Xlint:serial"
fi


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Java compiler accepts -Xlint:unchecked" >&5
printf %s "checking whether Java compiler accepts -Xlint:unchecked... " >&6; }
if test ${emacs_cv_javac_knows_lint_unchecked+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if rm -f conftest.class
cat << EOF > conftest.java

class conftest
{

}

EOF
("$JAVAC" -Xlint:unchecked conftest.java 2>&5) \
  && rm -f conftest.class
then :
  emacs_cv_javac_knows_lint_unchecked=yes
else $as_nop
  emacs_cv_javac_knows_lint_unchecked=no
fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_javac_knows_lint_unchecked" >&5
printf "%s\n" "$emacs_cv_javac_knows_lint_unchecked" >&6; }

  if test "$emacs_cv_javac_knows_lint_unchecked" = "yes"
then :
  WARN_JAVAFLAGS="$WARN_JAVAFLAGS -Xlint:unchecked"
fi


  # Get the name of the android.jar file.
  ANDROID_JAR="$with_android"

  # Substitute this into java/Makefile.


  for ac_prog in aapt
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_AAPT+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  case $AAPT in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_AAPT="$AAPT" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy=""${SDK_BUILD_TOOLS}:$PATH""
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_AAPT="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$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
AAPT=$ac_cv_path_AAPT
if test -n "$AAPT"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AAPT" >&5
printf "%s\n" "$AAPT" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$AAPT" && break
done

  if test "$AAPT" = ""; then
    as_fn_error $? "The Android asset packaging tool was not found.
Please verify that the path to the SDK build tools you specified is correct" "$LINENO" 5
  fi

  for ac_prog in apksigner
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_APKSIGNER+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  case $APKSIGNER in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_APKSIGNER="$APKSIGNER" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy=""${SDK_BUILD_TOOLS}:$PATH""
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_APKSIGNER="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$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
APKSIGNER=$ac_cv_path_APKSIGNER
if test -n "$APKSIGNER"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $APKSIGNER" >&5
printf "%s\n" "$APKSIGNER" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$APKSIGNER" && break
done

  if test "$APKSIGNER" = ""; then
    as_fn_error $? "The Android package signing tool was not found.
Please verify that the path to the SDK build tools you specified is correct" "$LINENO" 5
  fi

  for ac_prog in d8
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_D8+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  case $D8 in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_D8="$D8" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy=""${SDK_BUILD_TOOLS}:$PATH""
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_D8="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$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
D8=$ac_cv_path_D8
if test -n "$D8"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $D8" >&5
printf "%s\n" "$D8" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$D8" && break
done

  if test "$D8" = ""; then
    as_fn_error $? "The Android dexer was not found.
Please verify that the path to the SDK build tools you specified is correct" "$LINENO" 5
  fi

  # Locate any d8.jar within the SDK build tools directory.  The R8
  # optimizing compiler is also present in this bundle, and it generates
  # far superior code.
  emacs_val=`which $D8`
  emacs_val=`$as_dirname -- $emacs_val ||
$as_expr X$emacs_val : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X$emacs_val : 'X\(//\)[^/]' \| \
	 X$emacs_val : 'X\(//\)$' \| \
	 X$emacs_val : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X$emacs_val |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`/lib/d8.jar
  if test -f "$emacs_val"
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether d8.jar coresident with d8 binary provides r8" >&5
printf %s "checking whether d8.jar coresident with d8 binary provides r8... " >&6; }
if test ${emacs_cv_d8_provides_r8+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if java -cp "$emacs_val" com.android.tools.r8.R8 --help &>/dev/null
then :
  emacs_cv_d8_provides_r8=yes
else $as_nop
  emacs_cv_d8_provides_r8=no
fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_d8_provides_r8" >&5
printf "%s\n" "$emacs_cv_d8_provides_r8" >&6; }
fi
  if test "$emacs_cv_d8_provides_r8" = "yes"
then :
  # And substitute it for D8 if present.
    D8="java -cp $emacs_val com.android.tools.r8.R8"
     IS_D8_R8=yes
fi

  for ac_prog in zipalign
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_ZIPALIGN+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  case $ZIPALIGN in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ZIPALIGN="$ZIPALIGN" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy=""${SDK_BUILD_TOOLS}:$PATH""
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_ZIPALIGN="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$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
ZIPALIGN=$ac_cv_path_ZIPALIGN
if test -n "$ZIPALIGN"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ZIPALIGN" >&5
printf "%s\n" "$ZIPALIGN" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$ZIPALIGN" && break
done

  if test "ZIPALIGN" = ""; then
    as_fn_error $? "The Android ZIP archive alignment utility was not found.
Please verify that the path to the SDK build tools you specified is correct" "$LINENO" 5;
  fi


  if test "$ANDROID_CC" = ""; then
    as_fn_error $? "Please specify the path to the Android cross-compiler
for your machine.  For example:

  ANDROID_CC=/path/to/armv7a-linux-androideabi19-clang    \\
    ./configure --with-android" "$LINENO" 5
  fi


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the kind of Android system Emacs is being built for" >&5
printf %s "checking for the kind of Android system Emacs is being built for... " >&6; }
  cc_target=`${ANDROID_CC} -v 2>&1 | sed -n 's/Target: //p'`
  case "$cc_target" in

    *i[3-6]86*) android_abi=x86
      ;;
    *x86_64*) android_abi=x86_64
      ;;
    *aarch64*) android_abi=arm64-v8a
      ;;
    *arm*v7a*) android_abi=armeabi-v7a
      ;;
    *mips64*) android_abi=mips64
      ;;
    *mips*) android_abi=mips
      ;;
    *arm*) android_abi=armeabi
      ;;

    *) as_fn_error $? "configure could not determine the type of Android \
binary Emacs is being configured for.  Please port this configure script \
to your Android system, or verify that you specified the correct compiler \
in the ANDROID_CC variable when you ran configure.

The compiler target is: $cc_target" "$LINENO" 5
      ;;
  esac
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $android_abi" >&5
printf "%s\n" "$android_abi" >&6; }

  ANDROID_ABI=$android_abi


  ANDROID_MIN_SDK=8
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the lowest Android version Emacs can run on" >&5
printf %s "checking for the lowest Android version Emacs can run on... " >&6; }
  android_sdk=`echo "$cc_target" | grep -oE 'android([0-9][0-9]?)'`

  if test -n "$android_sdk"; then
    android_sdk=`echo "$android_sdk" | sed -n 's/android//p'`
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $android_sdk" >&5
printf "%s\n" "$android_sdk" >&6; }
    ANDROID_MIN_SDK=$android_sdk
  else
    # This is probably GCC.
     cat << EOF > conftest.c
#include <android/api-level.h>
extern const char *foo;

int
main (void)
{
#if __ANDROID_API__ < 7
   foo = "emacs_api_6";
#elif __ANDROID_API__ < 8
   foo = "emacs_api_7";
#elif __ANDROID_API__ < 9
   foo = "emacs_api_8";
#elif __ANDROID_API__ < 10
  foo = "emacs_api_9";
#elif __ANDROID_API__ < 11
  foo = "emacs_api_10";
#elif __ANDROID_API__ < 12
  foo = "emacs_api_11";
#elif __ANDROID_API__ < 13
  foo = "emacs_api_12";
#elif __ANDROID_API__ < 14
   foo = "emacs_api_13";
#elif __ANDROID_API__ < 15
   foo = "emacs_api_14";
#elif __ANDROID_API__ < 16
   foo = "emacs_api_15";
#elif __ANDROID_API__ < 17
   foo = "emacs_api_16";
#elif __ANDROID_API__ < 18
   foo = "emacs_api_17";
#elif __ANDROID_API__ < 19
   foo = "emacs_api_18";
#elif __ANDROID_API__ < 20
   foo = "emacs_api_19";
#elif __ANDROID_API__ < 21
   foo = "emacs_api_20";
#elif __ANDROID_API__ < 22
   foo = "emacs_api_21";
#elif __ANDROID_API__ < 23
   foo = "emacs_api_22";
#elif __ANDROID_API__ < 24
   foo = "emacs_api_23";
#elif __ANDROID_API__ < 25
   foo = "emacs_api_24";
#elif __ANDROID_API__ < 26
   foo = "emacs_api_25";
#elif __ANDROID_API__ < 27
   foo = "emacs_api_26";
#elif __ANDROID_API__ < 28
   foo = "emacs_api_27";
#elif __ANDROID_API__ < 29
   foo = "emacs_api_28";
#elif __ANDROID_API__ < 30
   foo = "emacs_api_29";
#elif __ANDROID_API__ < 31
   foo = "emacs_api_30";
#elif __ANDROID_API__ < 32
   foo = "emacs_api_31";
#elif __ANDROID_API__ < 33
   foo = "emacs_api_32";
#elif __ANDROID_API__ < 34
   foo = "emacs_api_33";
#elif __ANDROID_API__ < 35
   foo = "emacs_api_34";
#else
   foo = "emacs_api_future";
#endif
}
EOF

    if test ${emacs_cv_android_api+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  $ANDROID_CC $ANDROID_CFLAGS -c conftest.c -o conftest.o \
		  && emacs_cv_android_api=`grep -ao -E	       		  \
		     "emacs_api_([0-9][0-9]?|future)" conftest.o`
fi

    android_sdk="$emacs_cv_android_api"
    rm -rf conftest.c conftest.o

    # If this version of the NDK requires __ANDROID_API__ to be
    # specified, then complain to the user.
    if test "$android_sdk" = "emacs_api_future"; then
       as_fn_error $? "The version of Android to build for was not specified.
You must tell the Android compiler what version of Android to build for,
by defining the __ANDROID_API__ preprocessor macro in ANDROID_CC, like so:

    ANDROID_CC=\"/path/to/ndk/arm-linux-android-gcc -D__ANDROID_API__=8\"" "$LINENO" 5
    fi

    if test -n "$android_sdk"; then
       android_sdk=`echo $android_sdk | sed -n 's/emacs_api_//p'`
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $android_sdk" >&5
printf "%s\n" "$android_sdk" >&6; }
       ANDROID_MIN_SDK=$android_sdk
    else
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unknown ($cc_target); assuming 8" >&5
printf "%s\n" "unknown ($cc_target); assuming 8" >&6; }
      as_fn_error $? "configure could not determine the versions of Android \
a binary built with this compiler will run on.  The generated application \
package will likely install on older systems but crash on startup." "$LINENO" 5
      android_sdk=8
    fi
  fi


  # Now tell java/Makefile if Emacs is being built for Android 4.3 or
  # earlier.
  ANDROID_SDK_18_OR_EARLIER=
  if test "$android_sdk" -le "18"; then
     ANDROID_SDK_18_OR_EARLIER=yes
  fi


  # Likewise for Android 2.2.
  ANDROID_SDK_8_OR_EARLIER=
  if test "$android_sdk" -le "8"; then
     ANDROID_SDK_8_OR_EARLIER=yes
     for ac_prog in 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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ZIP+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$ZIP"; then
  ac_cv_prog_ZIP="$ZIP" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ZIP="$ac_prog"
    printf "%s\n" "$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
ZIP=$ac_cv_prog_ZIP
if test -n "$ZIP"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
printf "%s\n" "$ZIP" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$ZIP" && break
done

     if test -z "$ZIP"
then :
  as_fn_error $? "The \`zip' utility is required for generating \
packages targeting Android 2.2." "$LINENO" 5
fi
  fi



  # Save confdefs.h and config.log for now.
  mv -f confdefs.h _confdefs.h
  mv -f config.log _config.log

  # Make sure these files are removed upon exit.
  trap "rm -rf _confdefs.h _config.log" 0

  # Figure out what --with-FOO options to pass through.
  passthrough="$passthrough --with-png=$with_png"
  passthrough="$passthrough --with-webp=$with_webp"
  passthrough="$passthrough --with-gif=$with_gif"
  passthrough="$passthrough --with-jpeg=$with_jpeg"
  passthrough="$passthrough --with-xml2=$with_xml2"
  passthrough="$passthrough --with-sqlite3=$with_sqlite3"
  passthrough="$passthrough --with-gnutls=$with_gnutls"
  passthrough="$passthrough --with-tiff=$with_tiff"
  passthrough="$passthrough --with-selinux=$with_selinux"
  passthrough="$passthrough --with-modules=$with_modules"
  passthrough="$passthrough --with-tree-sitter=$with_tree_sitter"
  passthrough="$passthrough --with-imagemagick=$with_imagemagick"
  passthrough="$passthrough --with-lcms2=$with_lcms2"
  passthrough="$passthrough --with-mailutils=$with_mailutils"
  passthrough="$passthrough --with-pop=$with_pop"
  passthrough="$passthrough --with-harfbuzz=$with_harfbuzz"
  passthrough="$passthrough --with-threads=$with_threads"
  passthrough="$passthrough --with-rsvg=$with_rsvg"

  # Now pass through some checking-related options.
  emacs_val="--enable-check-lisp-object-type=$enable_check_lisp_object_type"
  passthrough="$passthrough $emacs_val"

  if test "x$with_mailutils" = "xyes"
then :
  emacs_use_mailutils=yes
fi


  if XCONFIGURE=android ANDROID_CC="$ANDROID_CC"		\
         ANDROID_SDK="$android_sdk" android_abi=$android_abi	\
	 android_ndk_path="$with_ndk_path"		     	\
	 android_ndk_cxx="$android_ndk_cxx"			\
	 $CONFIG_SHELL $0 $passthrough
then :

else $as_nop
  as_fn_error $? "Failed to cross-configure Emacs for android." "$LINENO" 5
fi

  # Now set ANDROID to yes.
  ANDROID=yes

  for makefile in $android_makefiles; do
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Generating $makefile.android" >&5
printf "%s\n" "$as_me: Generating $makefile.android" >&6;}
    mv -f "$makefile" "$makefile.android"
  done

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Generating src/config.h.android" >&5
printf "%s\n" "$as_me: Generating src/config.h.android" >&6;}
  mv -f src/config.h src/config.h.android

  # Tell AndroidManifest.xml whether or not Emacs should be built
  # debug.
  ANDROID_DEBUGGABLE=false
  if test "$with_android_debug" = "yes"; then
    ANDROID_DEBUGGABLE=true
  fi


  # Move confdefs.h back now that the recursive call to configure is
  # complete.
  mv -f _confdefs.h confdefs.h

  # Move the Android config.log to config.log.android.  */
  mv -f config.log config.log.android

  # And _config.log back.
  mv -f _config.log config.log
fi










if test "$XCONFIGURE" = "android"; then
  ANDROID=yes

  # Enable cross compiling.
  cross_compiling=yes
fi



if test "$ANDROID" = "yes"; then
  # When --with-android is specified, almost all build options must be
  # disabled, both within the recursive invocation of configure and
  # outside.
  with_xpm=no

  # Some of these dependencies are now supported within Android, so
  # they can be enabled.
  if test "$XCONFIGURE" != "android"; then
    with_png=no
    with_webp=no
    with_gif=no
    with_jpeg=no
    with_xml2=no
    with_sqlite3=no
    with_gnutls=no
    with_tiff=no
    with_selinux=no
    with_modules=no
    with_tree_sitter=no
    with_imagemagick=no
    with_lcms2=no
    with_mailutils=no
    with_pop=no
    with_harfbuzz=no
    with_native_compilation=no
    with_threads=no
    with_rsvg=no
  fi

  with_libsystemd=no
  with_cairo=no
  with_xft=no
  with_libotf=no
  with_gpm=no
  with_dbus=no
  with_gsettings=no
  with_ns=no

  # zlib is available in android.
fi



### If you add support for a new configuration, add code to this
### switch statement to recognize your configuration name and select
### the appropriate opsys.

### As far as handling version numbers on operating systems is
### concerned, make sure things will fail in a fixable way.  If
### /etc/MACHINES doesn't say anything about version numbers, be
### prepared to handle anything reasonably.  If version numbers
### matter, be sure /etc/MACHINES says something about it.

opsys='' unported=no
case "${canonical}" in

  ## Android
  *linux-android* )
    opsys=android
  ;;

  ## GNU/Linux and similar ports
  *-*-linux* )
    opsys=gnu-linux
  ;;

  ## FreeBSD ports
  *-*-freebsd* )
    opsys=freebsd
  ;;

  ## DragonFly ports
  *-*-dragonfly* )
    opsys=dragonfly
  ;;

  ## FreeBSD kernel + glibc based userland
  *-*-kfreebsd*gnu* )
    opsys=gnu-kfreebsd
  ;;

  ## NetBSD ports
  *-*-netbsd* )
    opsys=netbsd
  ;;

  ## OpenBSD ports
  *-*-openbsd* | *-*-mirbsd* )
    opsys=openbsd
  ;;

  ## Apple Darwin / macOS
  *-apple-darwin* )
    case "${canonical}" in
      *-apple-darwin[0-9].*) unported=yes ;;
      i[3456]86-* | x86_64-* | arm-* | aarch64-* )  ;;
      * )            unported=yes ;;
    esac
    opsys=darwin
    ## FIXME: Find a way to use Fink if available (Bug#11507).
  ;;

  ## Chromium Native Client
  *-nacl )
    opsys=nacl
  ;;

  ## Cygwin ports
  *-*-cygwin )
    opsys=cygwin
  ;;

  ## HP 9000 series 700 and 800, running HP/UX
  hppa*-hp-hpux10.2* )
    opsys=hpux10-20
  ;;
  hppa*-hp-hpux1[1-9]* )
    opsys=hpux11
    CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
  ;;

  ## IBM machines
  rs6000-ibm-aix4.[23]* )
    opsys=aix4-2
  ;;
  powerpc-ibm-aix4.[23]*  )
    opsys=aix4-2
  ;;
  rs6000-ibm-aix[56]* )
    opsys=aix4-2
  ;;
  powerpc-ibm-aix[5-9]* | powerpc-ibm-aix[1-9][0-9]* )
    opsys=aix4-2
  ;;

  ## Solaris
  *-*-solaris* | *-*-sunos*)
    case "${canonical}" in
      i[3456]86-*-* )   ;;
      amd64-*-*|x86_64-*-*) ;;
      sparc* )		;;
      * )		unported=yes ;;
    esac
    opsys=solaris
    ## Watch out for a compiler that we know will not work.
    if [ "$CC" = /usr/ucb/cc ]; then
      ## /usr/ucb/cc doesn't work;
      ## we should find some other compiler that does work.
      unset CC
    fi
  ;;

  ## QNX Neutrino
  *-nto-qnx* )
    opsys=qnxnto
    test -z "$CC" && CC=qcc
    LDFLAGS="-N2M $LDFLAGS"
  ;;

  *-haiku )
    opsys=haiku
  ;;

  ## Intel 386 machines where we don't care about the manufacturer.
  i[3456]86-*-* )
    case "${canonical}" in
      *-darwin* )               opsys=darwin ;;
      *-mingw* )
		opsys=mingw32
		# MinGW overrides and adds some system headers in nt/inc.
		# Also, GCC 14 turns on implicit-function-declaration
		# error by default, which fails configure tests where our
		# emulation of Posix headers defines only the minimal
		# stuff we actually need.
		GCC_TEST_OPTIONS="-I $srcdir/nt/inc -Wno-error=implicit-function-declaration"
		;;
      *-sysv4.2uw* )		opsys=unixware ;;
      *-sysv5uw* )		opsys=unixware ;;
      *-sysv5OpenUNIX* )	opsys=unixware ;;
      ## Otherwise, we'll fall through to the generic opsys code at the bottom.
    esac
  ;;

  # MinGW64
  x86_64-*-* )
    case "${canonical}" in
      *-mingw* )
		opsys=mingw32
		# MinGW overrides and adds some system headers in nt/inc.
		GCC_TEST_OPTIONS="-I $srcdir/nt/inc -Wno-error=implicit-function-declaration"
		;;
      ## Otherwise, we'll fall through to the generic opsys code at the bottom.
    esac
  ;;

  * )
    unported=yes
  ;;
esac

### If the code above didn't choose an operating system, just choose
### an operating system based on the configuration name.  You really
### only want to use this when you have no idea what the right
### operating system is; if you know what operating systems a machine
### runs, it's cleaner to make it explicit in the case statement
### above.
if test x"${opsys}" = x; then
  case "${canonical}" in
    *-gnu* )				opsys=gnu ;;
    * )
      unported=yes
    ;;
  esac
fi



if test $unported = yes; then
  as_fn_error $? "Emacs does not support '${canonical}' systems.
If you think it should, please send a report to ${PACKAGE_BUGREPORT}.
Check 'etc/MACHINES' for recognized configuration names." "$LINENO" 5
fi

#### Choose a compiler.












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
  for ac_prog in gcc cc cl clang "$XCRUN gcc" "$XCRUN clang"
  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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CC+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  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
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
    printf "%s\n" "$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
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
printf "%s\n" "$CC" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


    test -n "$CC" && break
  done
fi
if test -z "$CC"; then
  ac_ct_CC=$CC
  for ac_prog in gcc cc cl clang "$XCRUN gcc" "$XCRUN clang"
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_CC+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  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
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_CC="$ac_prog"
    printf "%s\n" "$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
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
printf "%s\n" "$ac_ct_CC" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "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:)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CC=$ac_ct_CC
  fi
fi


test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$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.
printf "%s\n" "$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 -version; 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\""
printf "%s\n" "$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
  printf "%s\n" "$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 (void)
{

  ;
  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.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
printf %s "checking whether the C compiler works... " >&6; }
ac_link_default=`printf "%s\n" "$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\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_link_default") 2>&5
  ac_status=$?
  printf "%s\n" "$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+y} && 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 $as_nop
  ac_file=''
fi
if test -z "$ac_file"
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$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_nop
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
printf %s "checking for C compiler default output file name... " >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
printf "%s\n" "$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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
printf %s "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\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  printf "%s\n" "$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_nop
  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
printf "%s\n" "$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 (void)
{
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.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
printf %s "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\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  printf "%s\n" "$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\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  printf "%s\n" "$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
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details" "$LINENO" 5; }
    fi
  fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
printf "%s\n" "$cross_compiling" >&6; }

rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
ac_clean_files=$ac_clean_files_save
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
printf %s "checking for suffix of object files... " >&6; }
if test ${ac_cv_objext+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  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\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_compile") 2>&5
  ac_status=$?
  printf "%s\n" "$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_nop
  printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
printf "%s\n" "$ac_cv_objext" >&6; }
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
printf %s "checking whether the compiler supports GNU C... " >&6; }
if test ${ac_cv_c_compiler_gnu+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

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

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

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
ac_compiler_gnu=$ac_cv_c_compiler_gnu

if test $ac_compiler_gnu = yes; then
  GCC=yes
else
  GCC=
fi
ac_test_CFLAGS=${CFLAGS+y}
ac_save_CFLAGS=$CFLAGS
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
printf %s "checking whether $CC accepts -g... " >&6; }
if test ${ac_cv_prog_cc_g+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  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 (void)
{

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

int
main (void)
{

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

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

int
main (void)
{

  ;
  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.beam conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   ac_c_werror_flag=$ac_save_c_werror_flag
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
if test $ac_test_CFLAGS; 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
ac_prog_cc_stdc=no
if test x$ac_prog_cc_stdc = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
printf %s "checking for $CC option to enable C11 features... " >&6; }
if test ${ac_cv_prog_cc_c11+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_cv_prog_cc_c11=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_c_conftest_c11_program
_ACEOF
for ac_arg in '' -std=gnu11
do
  CC="$ac_save_CC $ac_arg"
  if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_prog_cc_c11=$ac_arg
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam
  test "x$ac_cv_prog_cc_c11" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC
fi

if test "x$ac_cv_prog_cc_c11" = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
else $as_nop
  if test "x$ac_cv_prog_cc_c11" = x
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
else $as_nop
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
     CC="$CC $ac_cv_prog_cc_c11"
fi
  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
  ac_prog_cc_stdc=c11
fi
fi
if test x$ac_prog_cc_stdc = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
printf %s "checking for $CC option to enable C99 features... " >&6; }
if test ${ac_cv_prog_cc_c99+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_cv_prog_cc_c99=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_c_conftest_c99_program
_ACEOF
for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
do
  CC="$ac_save_CC $ac_arg"
  if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_prog_cc_c99=$ac_arg
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam
  test "x$ac_cv_prog_cc_c99" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC
fi

if test "x$ac_cv_prog_cc_c99" = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
else $as_nop
  if test "x$ac_cv_prog_cc_c99" = x
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
else $as_nop
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
     CC="$CC $ac_cv_prog_cc_c99"
fi
  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
  ac_prog_cc_stdc=c99
fi
fi
if test x$ac_prog_cc_stdc = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
printf %s "checking for $CC option to enable C89 features... " >&6; }
if test ${ac_cv_prog_cc_c89+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_cv_prog_cc_c89=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_c_conftest_c89_program
_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 conftest.beam
  test "x$ac_cv_prog_cc_c89" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC
fi

if test "x$ac_cv_prog_cc_c89" = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
else $as_nop
  if test "x$ac_cv_prog_cc_c89" = x
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
else $as_nop
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
     CC="$CC $ac_cv_prog_cc_c89"
fi
  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
  ac_prog_cc_stdc=c89
fi
fi

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


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
printf %s "checking whether the compiler is clang... " >&6; }
if test ${gl_cv_compiler_clang+y}
then :
  printf %s "(cached) " >&6
else $as_nop
                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

           #ifdef __clang__
           barfbarf
           #endif

int
main (void)
{

  ;
  return 0;
}

_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_compiler_clang=no
else $as_nop
  gl_cv_compiler_clang=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_clang" >&5
printf "%s\n" "$gl_cv_compiler_clang" >&6; }


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compiler option needed when checking for declarations" >&5
printf %s "checking for compiler option needed when checking for declarations... " >&6; }
if test ${gl_cv_compiler_check_decl_option+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test $gl_cv_compiler_clang = yes; then
                     saved_ac_compile="$ac_compile"
       ac_compile="$ac_compile -Werror=implicit-function-declaration"
                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'
else $as_nop
  gl_cv_compiler_check_decl_option=none
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
       ac_compile="$saved_ac_compile"
     else
       gl_cv_compiler_check_decl_option=none
     fi

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_check_decl_option" >&5
printf "%s\n" "$gl_cv_compiler_check_decl_option" >&6; }
  if test "x$gl_cv_compiler_check_decl_option" != xnone; then
    ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option"
  else
    ac_compile_for_check_decl="$ac_compile"
  fi



if test -n "$XCRUN"; then
  for ac_prog in ar "$XCRUN ar"
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_AR+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  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
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_AR="$ac_prog"
    printf "%s\n" "$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
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
printf "%s\n" "$AR" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$AR" && break
done

  test -n "$AR" && export AR
fi





if test "x$CC" != xcc; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
printf %s "checking whether $CC and cc understand -c and -o together... " >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
printf %s "checking whether cc understands -c and -o together... " >&6; }
fi
set dummy $CC; ac_cc=`printf "%s\n" "$2" |
		      sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
if eval test \${ac_cv_prog_cc_${ac_cc}_c_o+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
# Make sure it works both with $CC and with simple cc.
# We do the test twice because some compilers refuse to overwrite an
# existing .o file with -o, though they will create one.
ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
rm -f conftest2.*
if { { 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\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } &&
   test -f conftest2.$ac_objext && { { 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\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; };
then
  eval ac_cv_prog_cc_${ac_cc}_c_o=yes
  if test "x$CC" != xcc; then
    # Test first that cc exists at all.
    if { ac_try='cc -c conftest.$ac_ext >&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\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; }; then
      ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
      rm -f conftest2.*
      if { { 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\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } &&
	 test -f conftest2.$ac_objext && { { 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\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; };
      then
	# cc works too.
	:
      else
	# cc exists but doesn't like -o.
	eval ac_cv_prog_cc_${ac_cc}_c_o=no
      fi
    fi
  fi
else
  eval ac_cv_prog_cc_${ac_cc}_c_o=no
fi
rm -rf core conftest*

fi
if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

printf "%s\n" "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h

fi


if test x$GCC = xyes; then
  test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
fi

# Avoid gnulib's tests for -lcrypto, so that there's no static dependency on it.

# Avoid gnulib's tests for HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW,
# as we don't use them.

# Avoid gnulib's test for pthread_sigmask.
funcs=
for func in $ac_func_list; do
  test $func = pthread_sigmask || as_fn_append funcs " $func"
done
ac_func_list=$funcs
# Emacs does not use the wchar or wctype-h modules.

# Emacs does not need precise checks for the Solaris 10 MB_CUR_MAX bug.

# Emacs does not need to check for off64_t.


# Initialize gnulib right after choosing the compiler.

ac_header= ac_cache=
for ac_item in $ac_header_c_list
do
  if test $ac_cache; then
    ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
    if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
      printf "%s\n" "#define $ac_item 1" >> confdefs.h
    fi
    ac_header= ac_cache=
  elif test $ac_header; then
    ac_cache=$ac_item
  else
    ac_header=$ac_item
  fi
done








if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
then :

printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h

fi






  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
if test ${ac_cv_safe_to_define___extensions__+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#         define __EXTENSIONS__ 1
          $ac_includes_default
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_safe_to_define___extensions__=yes
else $as_nop
  ac_cv_safe_to_define___extensions__=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
if test ${ac_cv_should_define__xopen_source+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_cv_should_define__xopen_source=no
    if test $ac_cv_header_wchar_h = yes
then :
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

          #include <wchar.h>
          mbstate_t x;
int
main (void)
{

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

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

            #define _XOPEN_SOURCE 500
            #include <wchar.h>
            mbstate_t x;
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_should_define__xopen_source=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }

  printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h

  printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h

  printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h

  printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h

  printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h

  printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h

  printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h

  printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h

  printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h

  printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h

  printf "%s\n" "#define __STDC_WANT_IEC_60559_EXT__ 1" >>confdefs.h

  printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h

  printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h

  printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h

  printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h

  printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h

  if test $ac_cv_header_minix_config_h = yes
then :
  MINIX=yes
    printf "%s\n" "#define _MINIX 1" >>confdefs.h

    printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h

    printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h

else $as_nop
  MINIX=
fi
  if test $ac_cv_safe_to_define___extensions__ = yes
then :
  printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h

fi
  if test $ac_cv_should_define__xopen_source = yes
then :
  printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h

fi





  case "$host_os" in
    openbsd*)

printf "%s\n" "#define _ISOC11_SOURCE 1" >>confdefs.h

      ;;
  esac



ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
printf %s "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 test ${ac_cv_prog_CPP+y}
then :
  printf %s "(cached) " >&6
else $as_nop
      # Double quotes because $CC needs to be expanded
    for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
    do
      ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <limits.h>
		     Syntax error
_ACEOF
if ac_fn_c_try_cpp "$LINENO"
then :

else $as_nop
  # 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 $as_nop
  # 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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
printf "%s\n" "$CPP" >&6; }
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <limits.h>
		     Syntax error
_ACEOF
if ac_fn_c_try_cpp "$LINENO"
then :

else $as_nop
  # 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 $as_nop
  # 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_nop
  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$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


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
printf %s "checking for grep that handles long lines and -e... " >&6; }
if test ${ac_cv_path_GREP+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  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
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_prog in grep ggrep
   do
    for ac_exec_ext in '' $ac_executable_extensions; do
      ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
      as_fn_executable_p "$ac_path_GREP" || continue
# Check for GNU ac_path_GREP and select it if it is found.
  # Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
*GNU*)
  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
*)
  ac_count=0
  printf %s 0123456789 >"conftest.in"
  while :
  do
    cat "conftest.in" "conftest.in" >"conftest.tmp"
    mv "conftest.tmp" "conftest.in"
    cp "conftest.in" "conftest.nl"
    printf "%s\n" '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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
printf "%s\n" "$ac_cv_path_GREP" >&6; }
 GREP="$ac_cv_path_GREP"


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
printf %s "checking for egrep... " >&6; }
if test ${ac_cv_path_EGREP+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  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
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_prog in egrep
   do
    for ac_exec_ext in '' $ac_executable_extensions; do
      ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
      as_fn_executable_p "$ac_path_EGREP" || continue
# Check for GNU ac_path_EGREP and select it if it is found.
  # Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
*GNU*)
  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
*)
  ac_count=0
  printf %s 0123456789 >"conftest.in"
  while :
  do
    cat "conftest.in" "conftest.in" >"conftest.tmp"
    mv "conftest.tmp" "conftest.in"
    cp "conftest.in" "conftest.nl"
    printf "%s\n" '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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
printf "%s\n" "$ac_cv_path_EGREP" >&6; }
 EGREP="$ac_cv_path_EGREP"





  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
printf %s "checking for Minix Amsterdam compiler... " >&6; }
if test ${gl_cv_c_amsterdam_compiler+y}
then :
  printf %s "(cached) " >&6
else $as_nop

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

#ifdef __ACK__
Amsterdam
#endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "Amsterdam" >/dev/null 2>&1
then :
  gl_cv_c_amsterdam_compiler=yes
else $as_nop
  gl_cv_c_amsterdam_compiler=no
fi
rm -rf conftest*


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
printf "%s\n" "$gl_cv_c_amsterdam_compiler" >&6; }

      if test $gl_cv_c_amsterdam_compiler = yes; then
    if test -z "$AR"; then
      AR='cc -c.a'
    fi
    if test -z "$ARFLAGS"; then
      ARFLAGS='-o'
    fi
  else
                                                :
  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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_AR+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  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
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_AR="${ac_tool_prefix}ar"
    printf "%s\n" "$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
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
printf "%s\n" "$AR" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_AR+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  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
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_AR="ar"
    printf "%s\n" "$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
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
printf "%s\n" "$ac_ct_AR" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi

  if test "x$ac_ct_AR" = x; then
    AR="ar"
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
printf "%s\n" "$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

  if test -z "$ARFLAGS"; then
    ARFLAGS='cr'
  fi



  if test -z "$RANLIB"; then
    if test $gl_cv_c_amsterdam_compiler = yes; then
      RANLIB=':'
    else
            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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_RANLIB+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  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
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
    printf "%s\n" "$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
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
printf "%s\n" "$RANLIB" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_RANLIB+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  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
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_RANLIB="ranlib"
    printf "%s\n" "$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
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
printf "%s\n" "$ac_ct_RANLIB" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi

  if test "x$ac_ct_RANLIB" = x; then
    RANLIB=":"
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
printf "%s\n" "$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

    fi
  fi





  # IEEE behaviour is the default on all CPUs except Alpha and SH
  # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
  # and the GCC 4.1.2 manual).
  case "$host_cpu" in
    alpha*)
      # On Alpha systems, a compiler option provides the behaviour.
      # See the ieee(3) manual page, also available at
      # <https://backdrift.org/man/tru64/man3/ieee.3.html>
      if test -n "$GCC"; then
        # GCC has the option -mieee.
        # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
        CPPFLAGS="$CPPFLAGS -mieee"
      else
        # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
        # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
        CPPFLAGS="$CPPFLAGS -ieee"
      fi
      ;;
    sh*)
      if test -n "$GCC"; then
        # GCC has the option -mieee.
        CPPFLAGS="$CPPFLAGS -mieee"
      fi
      ;;
  esac

# Check whether --enable-largefile was given.
if test ${enable_largefile+y}
then :
  enableval=$enable_largefile;
fi
if test "$enable_largefile,$enable_year2038" != no,no
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CPPFLAGS option for large files" >&5
printf %s "checking for $CPPFLAGS option for large files... " >&6; }
if test ${ac_cv_sys_largefile_opts+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_save_CPPFLAGS=$CPPFLAGS
  ac_opt_found=no
  for ac_opt in "none needed" "-D_FILE_OFFSET_BITS=64" "-D_LARGE_FILES=1"; do
    if test x"$ac_opt" != x"none needed"
then :
  CPPFLAGS="$ac_save_CPPFLAGS $ac_opt"
fi
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
#ifndef FTYPE
# define FTYPE off_t
#endif
 /* Check that FTYPE can represent 2**63 - 1 correctly.
    We can't simply define LARGE_FTYPE to be 9223372036854775807,
    since some C++ compilers masquerading as C compilers
    incorrectly reject 9223372036854775807.  */
#define LARGE_FTYPE (((FTYPE) 1 << 31 << 31) - 1 + ((FTYPE) 1 << 31 << 31))
  int FTYPE_is_large[(LARGE_FTYPE % 2147483629 == 721
		       && LARGE_FTYPE % 2147483647 == 1)
		      ? 1 : -1];
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  if test x"$ac_opt" = x"none needed"
then :
  # GNU/Linux s390x and alpha need _FILE_OFFSET_BITS=64 for wide ino_t.
	 CPPFLAGS="$CPPFLAGS -DFTYPE=ino_t"
	 if ac_fn_c_try_compile "$LINENO"
then :

else $as_nop
  CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64"
	    if ac_fn_c_try_compile "$LINENO"
then :
  ac_opt='-D_FILE_OFFSET_BITS=64'
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam
fi
      ac_cv_sys_largefile_opts=$ac_opt
      ac_opt_found=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
    test $ac_opt_found = no || break
  done
  CPPFLAGS=$ac_save_CPPFLAGS


    if test $ac_opt_found != yes; then
      case $host_os in #(
  mingw* | windows*) :
    ac_cv_sys_largefile_opts="supported through gnulib"
           ac_opt_found=yes
       ;; #(
  *) :
     ;;
esac
    fi

  test $ac_opt_found = yes || ac_cv_sys_largefile_opts="support not detected"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_opts" >&5
printf "%s\n" "$ac_cv_sys_largefile_opts" >&6; }

ac_have_largefile=yes
case $ac_cv_sys_largefile_opts in #(
  "none needed") :
     ;; #(
  "supported through gnulib") :
     ;; #(
  "support not detected") :
    ac_have_largefile=no ;; #(
  "-D_FILE_OFFSET_BITS=64") :

printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
 ;; #(
  "-D_LARGE_FILES=1") :

printf "%s\n" "#define _LARGE_FILES 1" >>confdefs.h
 ;; #(
  *) :
    as_fn_error $? "internal error: bad value for \$ac_cv_sys_largefile_opts" "$LINENO" 5 ;;
esac

if test "$enable_year2038" != no
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CPPFLAGS option for timestamps after 2038" >&5
printf %s "checking for $CPPFLAGS option for timestamps after 2038... " >&6; }
if test ${ac_cv_sys_year2038_opts+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_save_CPPFLAGS="$CPPFLAGS"
  ac_opt_found=no
  for ac_opt in "none needed" "-D_TIME_BITS=64" "-D__MINGW_USE_VC2005_COMPAT" "-U_USE_32_BIT_TIME_T -D__MINGW_USE_VC2005_COMPAT"; do
    if test x"$ac_opt" != x"none needed"
then :
  CPPFLAGS="$ac_save_CPPFLAGS $ac_opt"
fi
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

  #include <time.h>
  /* Check that time_t can represent 2**32 - 1 correctly.  */
  #define LARGE_TIME_T \\
    ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30)))
  int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535
                           && LARGE_TIME_T % 65537 == 0)
                          ? 1 : -1];

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_sys_year2038_opts="$ac_opt"
      ac_opt_found=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
    test $ac_opt_found = no || break
  done
  CPPFLAGS="$ac_save_CPPFLAGS"
  test $ac_opt_found = yes || ac_cv_sys_year2038_opts="support not detected"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_year2038_opts" >&5
printf "%s\n" "$ac_cv_sys_year2038_opts" >&6; }

ac_have_year2038=yes
case $ac_cv_sys_year2038_opts in #(
  "none needed") :
     ;; #(
  "support not detected") :
    ac_have_year2038=no ;; #(
  "-D_TIME_BITS=64") :

printf "%s\n" "#define _TIME_BITS 64" >>confdefs.h
 ;; #(
  "-D__MINGW_USE_VC2005_COMPAT") :

printf "%s\n" "#define __MINGW_USE_VC2005_COMPAT 1" >>confdefs.h
 ;; #(
  "-U_USE_32_BIT_TIME_T"*) :
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "the 'time_t' type is currently forced to be 32-bit. It
will stop working after mid-January 2038. Remove
_USE_32BIT_TIME_T from the compiler flags.
See \`config.log' for more details" "$LINENO" 5; } ;; #(
  *) :
    as_fn_error $? "internal error: bad value for \$ac_cv_sys_year2038_opts" "$LINENO" 5 ;;
esac

fi

fi
if test "$enable_year2038,$ac_have_year2038,$cross_compiling" = yes,no,no
then :
  # If we're not cross compiling and 'touch' works with a large
  # timestamp, then we can presume the system supports wider time_t
  # *somehow* and we just weren't able to detect it.  One common
  # case that we deliberately *don't* probe for is a system that
  # supports both 32- and 64-bit ABIs but only the 64-bit ABI offers
  # wide time_t.  (It would be inappropriate for us to override an
  # intentional use of -m32.)  Error out, demanding use of
  # --disable-year2038 if this is intentional.
  if TZ=UTC0 touch -t 210602070628.15 conftest.time 2>/dev/null
then :
  case `TZ=UTC0 LC_ALL=C ls -l conftest.time 2>/dev/null` in #(
  *'Feb  7  2106'* | *'Feb  7 17:10'*) :
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "this system appears to support timestamps after
mid-January 2038, but no mechanism for enabling wide
'time_t' was detected. Did you mean to build a 64-bit
binary? (E.g., 'CC=\"${CC} -m64\"'.) To proceed with
32-bit time_t, configure with '--disable-year2038'.
See \`config.log' for more details" "$LINENO" 5; } ;; #(
  *) :
     ;;
esac
fi
fi


  # Pre-early section.



  # Code from module absolute-header:
  # Code from module acl-permissions:
  # Code from module alignasof:
  # Code from module alloca-opt:
  # Code from module allocator:
  # Code from module assert-h:
  # Code from module at-internal:
  # Code from module attribute:
  # Code from module binary-io:
  # Code from module boot-time:
  # Code from module builtin-expect:
  # Code from module byteswap:
  # Code from module c-ctype:
  # Code from module c-strcase:
  # Code from module c99:
  # Code from module canonicalize-lgpl:
  # Code from module careadlinkat:
  # Code from module clock-time:
  # Code from module cloexec:
  # Code from module close-stream:
  # Code from module copy-file-range:
  # Code from module crypto/md5:
  # Code from module crypto/md5-buffer:
  # Code from module crypto/sha1-buffer:
  # Code from module crypto/sha256-buffer:
  # Code from module crypto/sha512-buffer:
  # Code from module d-type:
  # Code from module diffseq:
  # Code from module dirent:
  # Code from module dirfd:
  # Code from module double-slash-root:
  # Code from module dtoastr:
  # Code from module dtotimespec:
  # Code from module dup2:
  # Code from module eloop-threshold:
  # Code from module endian:
  # Code from module environ:
  # Code from module errno:
  # Code from module euidaccess:
  # Code from module execinfo:
  # Code from module extensions:
  # Code from module extern-inline:
  # Code from module faccessat:
  # Code from module fchmodat:
  # Code from module fcntl:
  # Code from module fcntl-h:
  # Code from module fdopendir:
  # Code from module file-has-acl:
  # Code from module filemode:
  # Code from module filename:
  # Code from module filevercmp:
  # Code from module flexmember:
  # Code from module fpending:
  # Code from module fpieee:

  # Code from module free-posix:
  # Code from module fstatat:
  # Code from module fsusage:
  # Code from module fsync:
  # Code from module futimens:
  # Code from module gen-header:
  # Code from module getdelim:
  # Code from module getdtablesize:
  # Code from module getgroups:
  # Code from module getline:
  # Code from module getloadavg:
  # Code from module getopt-gnu:
  # Code from module getopt-posix:
  # Code from module getrandom:
  # Code from module gettext-h:
  # Code from module gettime:
  # Code from module gettimeofday:
  # Code from module gitlog-to-changelog:
  # Code from module glibc-internal/dynarray:
  # Code from module glibc-internal/scratch_buffer:
  # Code from module group-member:
  # Code from module idx:
  # Code from module ieee754-h:
  # Code from module ignore-value:
  # Code from module include_next:
  # Code from module intprops:
  # Code from module inttypes-incomplete:
  # Code from module largefile:

  # Code from module lchmod:
  # Code from module libc-config:
  # Code from module libgmp:
  # Code from module limits-h:
  # Code from module lstat:
  # Code from module malloc-gnu:
  # Code from module malloc-posix:
  # Code from module manywarnings:
  # Code from module memmem-simple:
  # Code from module mempcpy:
  # Code from module memrchr:
  # Code from module memset_explicit:
  # Code from module minmax:
  # Code from module mkostemp:
  # Code from module mktime:
  # Code from module mktime-internal:
  # Code from module multiarch:
  # Code from module nanosleep:
  # Code from module nocrash:
  # Code from module nproc:
  # Code from module nstrftime:
  # Code from module open:
  # Code from module openat-h:
  # Code from module pathmax:
  # Code from module pipe2:
  # Code from module pselect:
  # Code from module pthread_sigmask:
  # Code from module qcopy-acl:
  # Code from module rawmemchr:
  # Code from module readlink:
  # Code from module readlinkat:
  # Code from module realloc-gnu:
  # Code from module realloc-posix:
  # Code from module regex:
  # Code from module root-uid:
  # Code from module sig2str:
  # Code from module sigdescr_np:
  # Code from module signal-h:
  # Code from module snippet/_Noreturn:
  # Code from module snippet/arg-nonnull:
  # Code from module snippet/c++defs:
  # Code from module snippet/warn-on-use:
  # Code from module socklen:
  # Code from module ssize_t:
  # Code from module stat-time:
  # Code from module std-gnu11:
  # Code from module stdbit-h:
  # Code from module stdbool:
  # Code from module stdc_bit_width:
  # Code from module stdc_count_ones:
  # Code from module stdc_leading_zeros:
  # Code from module stdc_trailing_zeros:
  # Code from module stdckdint:
  # Code from module stddef:
  # Code from module stdint:
  # Code from module stdio:


  printf "%s\n" "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h


  # Code from module stdlib:
  # Code from module stpcpy:
  # Code from module string:
  # Code from module strnlen:
  # Code from module strtoimax:
  # Code from module strtoll:
  # Code from module symlink:
  # Code from module sys_random:
  # Code from module sys_select:
  # Code from module sys_stat:
  # Code from module sys_time:
  # Code from module sys_types:

  # Code from module tempname:
  # Code from module time-h:
  # Code from module time_r:
  # Code from module time_rz:
  # Code from module timegm:
  # Code from module timer-time:
  # Code from module timespec:
  # Code from module timespec-add:
  # Code from module timespec-sub:
  # Code from module u64:
  # Code from module unistd:
  # Code from module unlocked-io:
  # Code from module unlocked-io-internal:
  # Code from module update-copyright:
  # Code from module utimens:
  # Code from module utimensat:
  # Code from module vararrays:
  # Code from module verify:
  # Code from module vla:
  # Code from module warnings:
  # Code from module xalloc-oversized:
  # Code from module year2038:



# ndk_LATE must be enclosed in this conditional to prevent the
# AC_PROG_CXX it indirectly requires from being expanded at top level.
if test "$ndk_INITIALIZED" = "yes"; then
  ndk_save_LDFLAGS="$LDFLAGS"
 LDFLAGS="$LDFLAGS $ndk_CXX_LDFLAGS"
 CXXFLAGS="$CXXFLAGS `ndk_subst_cflags_onto_cxx` $ndk_CXX_STL"






ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
if test -z "$CXX"; then
  if test -n "$CCC"; then
    CXX=$CCC
  else
    if test -n "$ac_tool_prefix"; then
  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++
  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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CXX+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$CXX"; then
  ac_cv_prog_CXX="$CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
CXX=$ac_cv_prog_CXX
if test -n "$CXX"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
printf "%s\n" "$CXX" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


    test -n "$CXX" && break
  done
fi
if test -z "$CXX"; then
  ac_ct_CXX=$CXX
  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_CXX+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$ac_ct_CXX"; then
  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_CXX="$ac_prog"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
if test -n "$ac_ct_CXX"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
printf "%s\n" "$ac_ct_CXX" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$ac_ct_CXX" && break
done

  if test "x$ac_ct_CXX" = x; then
    CXX="g++"
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CXX=$ac_ct_CXX
  fi
fi

  fi
fi
# Provide some information about the compiler.
printf "%s\n" "$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\""
printf "%s\n" "$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
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
done

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C++" >&5
printf %s "checking whether the compiler supports GNU C++... " >&6; }
if test ${ac_cv_cxx_compiler_gnu+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

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

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
  ac_compiler_gnu=yes
else $as_nop
  ac_compiler_gnu=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_cv_cxx_compiler_gnu=$ac_compiler_gnu

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; }
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

if test $ac_compiler_gnu = yes; then
  GXX=yes
else
  GXX=
fi
ac_test_CXXFLAGS=${CXXFLAGS+y}
ac_save_CXXFLAGS=$CXXFLAGS
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
printf %s "checking whether $CXX accepts -g... " >&6; }
if test ${ac_cv_prog_cxx_g+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
   ac_cxx_werror_flag=yes
   ac_cv_prog_cxx_g=no
   CXXFLAGS="-g"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

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

int
main (void)
{

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

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

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
  ac_cv_prog_cxx_g=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
printf "%s\n" "$ac_cv_prog_cxx_g" >&6; }
if test $ac_test_CXXFLAGS; then
  CXXFLAGS=$ac_save_CXXFLAGS
elif test $ac_cv_prog_cxx_g = yes; then
  if test "$GXX" = yes; then
    CXXFLAGS="-g -O2"
  else
    CXXFLAGS="-g"
  fi
else
  if test "$GXX" = yes; then
    CXXFLAGS="-O2"
  else
    CXXFLAGS=
  fi
fi
ac_prog_cxx_stdcxx=no
if test x$ac_prog_cxx_stdcxx = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5
printf %s "checking for $CXX option to enable C++11 features... " >&6; }
if test ${ac_cv_prog_cxx_11+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_cv_prog_cxx_11=no
ac_save_CXX=$CXX
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_cxx_conftest_cxx11_program
_ACEOF
for ac_arg in '' -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x -qlanglvl=extended0x -AA
do
  CXX="$ac_save_CXX $ac_arg"
  if ac_fn_cxx_try_compile "$LINENO"
then :
  ac_cv_prog_cxx_cxx11=$ac_arg
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam
  test "x$ac_cv_prog_cxx_cxx11" != "xno" && break
done
rm -f conftest.$ac_ext
CXX=$ac_save_CXX
fi

if test "x$ac_cv_prog_cxx_cxx11" = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
else $as_nop
  if test "x$ac_cv_prog_cxx_cxx11" = x
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
else $as_nop
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5
printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; }
     CXX="$CXX $ac_cv_prog_cxx_cxx11"
fi
  ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11
  ac_prog_cxx_stdcxx=cxx11
fi
fi
if test x$ac_prog_cxx_stdcxx = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5
printf %s "checking for $CXX option to enable C++98 features... " >&6; }
if test ${ac_cv_prog_cxx_98+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_cv_prog_cxx_98=no
ac_save_CXX=$CXX
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_cxx_conftest_cxx98_program
_ACEOF
for ac_arg in '' -std=gnu++98 -std=c++98 -qlanglvl=extended -AA
do
  CXX="$ac_save_CXX $ac_arg"
  if ac_fn_cxx_try_compile "$LINENO"
then :
  ac_cv_prog_cxx_cxx98=$ac_arg
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam
  test "x$ac_cv_prog_cxx_cxx98" != "xno" && break
done
rm -f conftest.$ac_ext
CXX=$ac_save_CXX
fi

if test "x$ac_cv_prog_cxx_cxx98" = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
else $as_nop
  if test "x$ac_cv_prog_cxx_cxx98" = x
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
else $as_nop
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5
printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; }
     CXX="$CXX $ac_cv_prog_cxx_cxx98"
fi
  ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98
  ac_prog_cxx_stdcxx=cxx98
fi
fi

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


if test "$ndk_INITIALIZED" = "yes"
then :

  if test -n "$CXX"
then :

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

    ac_fn_cxx_check_header_compile "$LINENO" "string" "ac_cv_header_string" "$ac_includes_default"
if test "x$ac_cv_header_string" = xyes
then :
  ndk_working_cxx=yes
else $as_nop
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Your C++ compiler is not properly configured, as \
the standard library headers could not be found." >&5
printf "%s\n" "$as_me: WARNING: Your C++ compiler is not properly configured, as \
the standard library headers could not be found." >&2;}
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

fi
fi
LDFLAGS="$ndk_save_LDFLAGS"

fi

if test "$ac_test_CFLAGS" != set; then
  # It's helpful to have C macros available to GDB, so prefer -g3 to -g
  # if -g3 works and the user does not specify CFLAGS.
  # This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains.
  case $CFLAGS in
    '-g')
      emacs_g3_CFLAGS='-g3';;
    '-g -O2')
      emacs_g3_CFLAGS='-g3 -O2';;
    *)
      emacs_g3_CFLAGS='';;
  esac
  if test -n "$emacs_g3_CFLAGS"; then
    emacs_save_CFLAGS=$CFLAGS
    CFLAGS=$emacs_g3_CFLAGS
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts $emacs_g3_CFLAGS" >&5
printf %s "checking whether $CC accepts $emacs_g3_CFLAGS... " >&6; }
if test ${emacs_cv_prog_cc_g3+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  emacs_cv_prog_cc_g3=yes
else $as_nop
  emacs_cv_prog_cc_g3=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_g3" >&5
printf "%s\n" "$emacs_cv_prog_cc_g3" >&6; }
    if test $emacs_cv_prog_cc_g3 != yes; then
      CFLAGS=$emacs_save_CFLAGS
    fi
    # Haiku also needs -gdwarf-2 because its GDB is too old
    # to understand newer formats.
    if test $opsys = mingw32 || test $opsys = haiku; then
      CFLAGS="$CFLAGS -gdwarf-2"
    fi
  fi

  case $CFLAGS in
    *-O*) ;;
    *)
      # No optimization flag was inferred for this non-GCC compiler.
      # Try -O.  This is needed for xlc on AIX; see Bug#14258.
      emacs_save_CFLAGS=$CFLAGS
      test -z "$CFLAGS" || CFLAGS="$CFLAGS "
      CFLAGS=${CFLAGS}-O
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -O" >&5
printf %s "checking whether $CC accepts -O... " >&6; }
if test ${emacs_cv_prog_cc_o+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  emacs_cv_prog_cc_o=yes
else $as_nop
  emacs_cv_prog_cc_o=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_o" >&5
printf "%s\n" "$emacs_cv_prog_cc_o" >&6; }
      if test $emacs_cv_prog_cc_o != yes; then
	CFLAGS=$emacs_save_CFLAGS
      fi ;;
  esac
fi

# gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
# ---------------------------------------------------------------------------
# If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
# Otherwise, run RUN-IF-NOT-FOUND.


# clang is unduly picky about some things.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
printf %s "checking whether the compiler is clang... " >&6; }
if test ${emacs_cv_clang+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

	  #ifndef __clang__
	    error "not clang";
	  #endif

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  emacs_cv_clang=yes
else $as_nop
  emacs_cv_clang=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_clang" >&5
printf "%s\n" "$emacs_cv_clang" >&6; }

# Check whether --enable-gcc-warnings was given.
if test ${enable_gcc_warnings+y}
then :
  enableval=$enable_gcc_warnings; case $enableval in
     yes|no|warn-only) ;;
     *)      as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
   esac
   gl_gcc_warnings=$enableval
else $as_nop
  # By default, use 'warn-only' if it looks like the invoker of 'configure'
   # is a developer as opposed to a builder.  This is most likely true
   # if GCC is recent enough and there is a .git directory or file;
   # however, if there is also a .tarball-version file it is probably
   # just a release imported into Git for patch management.
   gl_gcc_warnings=no
   if test -d "$srcdir"/.git || test -f "$srcdir"/.git
then :
  if test -f "$srcdir"/.tarball-version
then :

else $as_nop
  # Clang typically identifies itself as GCC 4.2 or something similar
	# even if it is recent enough to accept the warnings we enable.
	if test "$emacs_cv_clang" = yes
then :
  gl_gcc_warnings=warn-only
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#if (5) < __GNUC__ || ((5) == __GNUC__ && (3) <= __GNUC_MINOR__)
/* ok */
#else
# error "your version of gcc is older than 5.3"
#endif

int
main (void)
{

  ;
  return 0;
},

_ACEOF
if ac_fn_c_try_cpp "$LINENO"
then :
  gl_gcc_warnings=warn-only
fi
rm -f conftest.err conftest.i conftest.$ac_ext


fi
fi
fi
fi


NATIVE_COMPILATION_AOT=no

# Check whether --with-native-compilation was given.
if test ${with_native_compilation+y}
then :
  withval=$with_native_compilation;
  case $withval in
     aot)
       withval=yes
       NATIVE_COMPILATION_AOT=yes
       ;;
     yes|no) ;;
     *)      as_fn_error $? "bad value $withval for native-compilation option" "$LINENO" 5 ;;
   esac
   with_native_compilation=$withval
else $as_nop
  with_native_compilation=default

fi



# Check whether --enable-check-lisp-object-type was given.
if test ${enable_check_lisp_object_type+y}
then :
  enableval=$enable_check_lisp_object_type;
fi

if test "$enable_check_lisp_object_type" = yes; then

printf "%s\n" "#define CHECK_LISP_OBJECT_TYPE 1" >>confdefs.h

fi

WERROR_CFLAGS=
# When compiling with GCC, prefer -isystem to -I when including system
# include files, to avoid generating useless diagnostics for the files.

  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


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
printf %s "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
if test ${gl_cv_warn_c__Werror__Wunknown_warning_option+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  gl_saved_compiler_FLAGS="$CFLAGS"
  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  gl_cv_warn_c__Werror__Wunknown_warning_option=yes
else $as_nop
  gl_cv_warn_c__Werror__Wunknown_warning_option=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
  CFLAGS="$gl_saved_compiler_FLAGS"

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
printf "%s\n" "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes
then :
  gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
else $as_nop
  gl_unknown_warnings_are_errors=
fi

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


if test $gl_gcc_warnings = no
then :

  isystem='-I'
  if test "$emacs_cv_clang" = yes
then :

     # Turn off some warnings if supported.


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-pointer-sign" >&5
printf %s "checking whether C compiler handles -Wno-pointer-sign... " >&6; }
if test ${gl_cv_warn_c__Wno_pointer_sign+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  gl_saved_compiler_FLAGS="$CFLAGS"
  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wpointer-sign"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  gl_cv_warn_c__Wno_pointer_sign=yes
else $as_nop
  gl_cv_warn_c__Wno_pointer_sign=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
  CFLAGS="$gl_saved_compiler_FLAGS"

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_pointer_sign" >&5
printf "%s\n" "$gl_cv_warn_c__Wno_pointer_sign" >&6; }
if test "x$gl_cv_warn_c__Wno_pointer_sign" = xyes
then :
  as_fn_append WARN_CFLAGS " -Wno-pointer-sign"
fi




{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-string-plus-int" >&5
printf %s "checking whether C compiler handles -Wno-string-plus-int... " >&6; }
if test ${gl_cv_warn_c__Wno_string_plus_int+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  gl_saved_compiler_FLAGS="$CFLAGS"
  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wstring-plus-int"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  gl_cv_warn_c__Wno_string_plus_int=yes
else $as_nop
  gl_cv_warn_c__Wno_string_plus_int=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
  CFLAGS="$gl_saved_compiler_FLAGS"

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_string_plus_int" >&5
printf "%s\n" "$gl_cv_warn_c__Wno_string_plus_int" >&6; }
if test "x$gl_cv_warn_c__Wno_string_plus_int" = xyes
then :
  as_fn_append WARN_CFLAGS " -Wno-string-plus-int"
fi




{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unknown-attributes" >&5
printf %s "checking whether C compiler handles -Wno-unknown-attributes... " >&6; }
if test ${gl_cv_warn_c__Wno_unknown_attributes+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  gl_saved_compiler_FLAGS="$CFLAGS"
  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunknown-attributes"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  gl_cv_warn_c__Wno_unknown_attributes=yes
else $as_nop
  gl_cv_warn_c__Wno_unknown_attributes=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
  CFLAGS="$gl_saved_compiler_FLAGS"

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unknown_attributes" >&5
printf "%s\n" "$gl_cv_warn_c__Wno_unknown_attributes" >&6; }
if test "x$gl_cv_warn_c__Wno_unknown_attributes" = xyes
then :
  as_fn_append WARN_CFLAGS " -Wno-unknown-attributes"
fi




{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unknown-pragmas" >&5
printf %s "checking whether C compiler handles -Wno-unknown-pragmas... " >&6; }
if test ${gl_cv_warn_c__Wno_unknown_pragmas+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  gl_saved_compiler_FLAGS="$CFLAGS"
  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunknown-pragmas"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  gl_cv_warn_c__Wno_unknown_pragmas=yes
else $as_nop
  gl_cv_warn_c__Wno_unknown_pragmas=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
  CFLAGS="$gl_saved_compiler_FLAGS"

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unknown_pragmas" >&5
printf "%s\n" "$gl_cv_warn_c__Wno_unknown_pragmas" >&6; }
if test "x$gl_cv_warn_c__Wno_unknown_pragmas" = xyes
then :
  as_fn_append WARN_CFLAGS " -Wno-unknown-pragmas"
fi



fi

else $as_nop

  isystem='-isystem '

  # This, $nw, is the list of warnings we disable.
  nw=

  case $with_x_toolkit in
    lucid | athena | motif)
       # Old toolkits mishandle 'const'.
       nw="$nw -Wwrite-strings"
       ;;
  esac
  if test $gl_gcc_warnings = yes
then :
  WERROR_CFLAGS=-Werror
else $as_nop
  # Use -fanalyzer and related options only if --enable-gcc-warnings,
     # as they slow GCC considerably.
     nw="$nw -fanalyzer -Wno-analyzer-double-free -Wno-analyzer-malloc-leak"
     nw="$nw -Wno-analyzer-null-dereference -Wno-analyzer-use-after-free"
     # Use -Wsuggest-attribute=malloc only if --enable-gcc-warnings,
     # as it doesn't flag code that is wrong in any way.
     nw="$nw -Wsuggest-attribute=malloc"
fi

  nw="$nw -Wcast-align=strict"      # Emacs is tricky with pointers.
  nw="$nw -Wduplicated-branches"    # Too many false alarms
  nw="$nw -Wformat-overflow=2"      # False alarms due to GCC bug 110333
  nw="$nw -Wsystem-headers"         # Don't let system headers trigger warnings
  nw="$nw -Woverlength-strings"     # Not a problem these days
  nw="$nw -Wvla"                    # Emacs uses <vla.h>.
  nw="$nw -Wunused-const-variable=2" # lisp.h declares const objects.
  nw="$nw -Winline"                 # OK to ignore 'inline'
  nw="$nw -Wstrict-overflow"        # OK to optimize assuming that
                                    # signed overflow has undefined behavior
  nw="$nw -Wsync-nand"              # irrelevant here, and provokes ObjC warning
  nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations
  nw="$nw -Wbad-function-cast"      # These casts are no worse than others.

  # Emacs doesn't care about shadowing; see
  # <https://lists.gnu.org/r/emacs-diffs/2011-11/msg00265.html>.
  nw="$nw -Wshadow"

  # Emacs's use of alloca inhibits protecting the stack.
  nw="$nw -Wstack-protector"

  # Emacs's use of __attribute__ ((cold)) causes false alarms with this option.
  nw="$nw -Wsuggest-attribute=cold"

  # Emacs's use of partly-const functions such as Fgnutls_available_p
  # make this option problematic.
  nw="$nw -Wsuggest-attribute=const"

  # Emacs's use of partly-pure functions such as CHECK_TYPE make this
  # option problematic.
  nw="$nw -Wsuggest-attribute=pure"

  # Emacs doesn't need this paranoia.
  nw="$nw -Wbidi-chars=any,ucn"

  if test "$emacs_cv_clang" = yes; then
    nw="$nw -Wdouble-promotion"
    nm="$nm -Wunknown-pragmas"
  fi

  # This causes too much noise in the MinGW build.
  if test $opsys = mingw32; then
    nw="$nw -Wsuggest-attribute=format"
  fi

  # If Emacs is being built for Android and many functions are
  # currently stubbed out for operation on the build machine, disable
  # -Wsuggest-attribute=noreturn.

  if test "$ANDROID" = "yes"
then :
  nw="$nw -Wsuggest-attribute=noreturn"
fi


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



  if test -n "$GCC"
then :

    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
printf %s "checking whether -Wno-missing-field-initializers is needed... " >&6; }
if test ${gl_cv_cc_nomfi_needed+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  gl_cv_cc_nomfi_needed=no
       gl_saved_CFLAGS="$CFLAGS"
       CFLAGS="$CFLAGS -Wextra -Werror"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
struct file_data { int desc, name; };
              struct cmp { struct file_data file[1]; };
              void f (struct cmp *r)
              {
                typedef struct { int a; int b; } s_t;
                s_t s1 = { 0, };
                struct cmp cmp = { .file[0].desc = r->file[0].desc + s1.a };
                *r = cmp;
              }

int
main (void)
{

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

else $as_nop
  CFLAGS="$CFLAGS -Wno-missing-field-initializers"
          if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_cc_nomfi_needed=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
       CFLAGS="$gl_saved_CFLAGS"

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
printf "%s\n" "$gl_cv_cc_nomfi_needed" >&6; }

                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
printf %s "checking whether -Wuninitialized is supported... " >&6; }
if test ${gl_cv_cc_uninitialized_supported+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  gl_saved_CFLAGS="$CFLAGS"
       CFLAGS="$CFLAGS -Werror -Wuninitialized"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

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

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }

fi

  # List all gcc warning categories.
  # To compare this list to your installed GCC's, run this Bash command:
  #
  # comm -3 \
  #  <((sed -n 's/^  *\(-[^ 0-9][^ ]*\).*/\1/p' manywarnings.m4; \
  #     awk '/^[^#]/ {print ws}' ../build-aux/gcc-warning.spec) | sort) \
  #  <(LC_ALL=C gcc --help=warnings | sed -n 's/^  \(-[^ ]*\) .*/\1/p' | sort)

  ws=
  for gl_manywarn_item in -fanalyzer -fstrict-flex-arrays \
    -Wall \
    -Warith-conversion \
    -Wbad-function-cast \
    -Wcast-align=strict \
    -Wdate-time \
    -Wdisabled-optimization \
    -Wdouble-promotion \
    -Wduplicated-branches \
    -Wduplicated-cond \
    -Wextra \
    -Wformat-signedness \
    -Wflex-array-member-not-at-end \
    -Winit-self \
    -Winline \
    -Winvalid-pch \
    -Wlogical-op \
    -Wmissing-declarations \
    -Wmissing-include-dirs \
    -Wmissing-prototypes \
    -Wmissing-variable-declarations \
    -Wnested-externs \
    -Wnull-dereference \
    -Wold-style-definition \
    -Wopenmp-simd \
    -Woverlength-strings \
    -Wpacked \
    -Wpointer-arith \
    -Wshadow \
    -Wstack-protector \
    -Wstrict-flex-arrays \
    -Wstrict-overflow \
    -Wstrict-prototypes \
    -Wsuggest-attribute=cold \
    -Wsuggest-attribute=const \
    -Wsuggest-attribute=format \
    -Wsuggest-attribute=malloc \
    -Wsuggest-attribute=noreturn \
    -Wsuggest-attribute=pure \
    -Wsuggest-final-methods \
    -Wsuggest-final-types \
    -Wsync-nand \
    -Wsystem-headers \
    -Wtrampolines \
    -Wuninitialized \
    -Wunknown-pragmas \
    -Wunsafe-loop-optimizations \
    -Wunused-macros \
    -Wvariadic-macros \
    -Wvector-operation-performance \
    -Wvla \
    -Wwrite-strings \
    \
    ; do
    as_fn_append ws " $gl_manywarn_item"
  done

  # gcc --help=warnings outputs an unusual form for these options; list
  # them here so that the above 'comm' command doesn't report a false match.
  as_fn_append ws ' -Warray-bounds=2'
  as_fn_append ws ' -Wattribute-alias=2'
  as_fn_append ws ' -Wbidi-chars=any,ucn'
  as_fn_append ws ' -Wformat-overflow=2'
  as_fn_append ws ' -Wformat=2'
  as_fn_append ws ' -Wformat-truncation=2'
  as_fn_append ws ' -Wimplicit-fallthrough=5'
  as_fn_append ws ' -Wshift-overflow=2'
  as_fn_append ws ' -Wuse-after-free=3'
  as_fn_append ws ' -Wunused-const-variable=2'
  as_fn_append ws ' -Wvla-larger-than=4031'

  # These are needed for older GCC versions.
  if test -n "$GCC" && gl_gcc_version=`($CC --version) 2>/dev/null`; then
    case $gl_gcc_version in
      'gcc (GCC) '[0-3].* | \
      'gcc (GCC) '4.[0-7].*)
        as_fn_append ws ' -fdiagnostics-show-option'
        as_fn_append ws ' -funit-at-a-time'
          ;;
    esac
    case $gl_gcc_version in
      'gcc (GCC) '[0-9].*)
        as_fn_append ws ' -fno-common'
          ;;
    esac
  fi

  # Disable specific options as needed.
  if test "$gl_cv_cc_nomfi_needed" = yes; then
    as_fn_append ws ' -Wno-missing-field-initializers'
  fi

  if test "$gl_cv_cc_uninitialized_supported" = no; then
    as_fn_append ws ' -Wno-uninitialized'
  fi

  # This warning have too many false alarms in GCC 11.2.1.
  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101713
  as_fn_append ws ' -Wno-analyzer-malloc-leak'

  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



  gl_warn_set=
  set x $ws; shift
  for gl_warn_item
  do
    case " $nw " in
      *" $gl_warn_item "*)
        ;;
      *)
        as_fn_append gl_warn_set " $gl_warn_item"
        ;;
    esac
  done
  ws=$gl_warn_set

  for w in $ws; do


as_gl_Warn=`printf "%s\n" "gl_cv_warn_c_$w" | $as_tr_sh`
gl_positive="$w"
case $gl_positive in
  -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
esac
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
printf %s "checking whether C compiler handles $w... " >&6; }
if eval test \${$as_gl_Warn+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  gl_saved_compiler_FLAGS="$CFLAGS"
  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  eval "$as_gl_Warn=yes"
else $as_nop
  eval "$as_gl_Warn=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
  CFLAGS="$gl_saved_compiler_FLAGS"

fi
eval ac_res=\$$as_gl_Warn
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
if eval test \"x\$"$as_gl_Warn"\" = x"yes"
then :
  as_fn_append WARN_CFLAGS " $w"
fi


  done


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wredundant-decls" >&5
printf %s "checking whether C compiler handles -Wredundant-decls... " >&6; }
if test ${gl_cv_warn_c__Wredundant_decls+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  gl_saved_compiler_FLAGS="$CFLAGS"
  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wredundant-decls"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  gl_cv_warn_c__Wredundant_decls=yes
else $as_nop
  gl_cv_warn_c__Wredundant_decls=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
  CFLAGS="$gl_saved_compiler_FLAGS"

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wredundant_decls" >&5
printf "%s\n" "$gl_cv_warn_c__Wredundant_decls" >&6; }
if test "x$gl_cv_warn_c__Wredundant_decls" = xyes
then :
  as_fn_append WARN_CFLAGS " -Wredundant-decls"
fi

     # Prefer this, as we don't use Bison.


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
printf %s "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
if test ${gl_cv_warn_c__Wno_missing_field_initializers+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  gl_saved_compiler_FLAGS="$CFLAGS"
  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wmissing-field-initializers"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  gl_cv_warn_c__Wno_missing_field_initializers=yes
else $as_nop
  gl_cv_warn_c__Wno_missing_field_initializers=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
  CFLAGS="$gl_saved_compiler_FLAGS"

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
printf "%s\n" "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = xyes
then :
  as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers"
fi

 # We need this one


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-override-init" >&5
printf %s "checking whether C compiler handles -Wno-override-init... " >&6; }
if test ${gl_cv_warn_c__Wno_override_init+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  gl_saved_compiler_FLAGS="$CFLAGS"
  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Woverride-init"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  gl_cv_warn_c__Wno_override_init=yes
else $as_nop
  gl_cv_warn_c__Wno_override_init=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
  CFLAGS="$gl_saved_compiler_FLAGS"

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_override_init" >&5
printf "%s\n" "$gl_cv_warn_c__Wno_override_init" >&6; }
if test "x$gl_cv_warn_c__Wno_override_init" = xyes
then :
  as_fn_append WARN_CFLAGS " -Wno-override-init"
fi

    # More trouble than it is worth


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
printf %s "checking whether C compiler handles -Wno-sign-compare... " >&6; }
if test ${gl_cv_warn_c__Wno_sign_compare+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  gl_saved_compiler_FLAGS="$CFLAGS"
  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsign-compare"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  gl_cv_warn_c__Wno_sign_compare=yes
else $as_nop
  gl_cv_warn_c__Wno_sign_compare=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
  CFLAGS="$gl_saved_compiler_FLAGS"

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
printf "%s\n" "$gl_cv_warn_c__Wno_sign_compare" >&6; }
if test "x$gl_cv_warn_c__Wno_sign_compare" = xyes
then :
  as_fn_append WARN_CFLAGS " -Wno-sign-compare"
fi

     # Too many warnings for now


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-type-limits" >&5
printf %s "checking whether C compiler handles -Wno-type-limits... " >&6; }
if test ${gl_cv_warn_c__Wno_type_limits+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  gl_saved_compiler_FLAGS="$CFLAGS"
  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wtype-limits"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  gl_cv_warn_c__Wno_type_limits=yes
else $as_nop
  gl_cv_warn_c__Wno_type_limits=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
  CFLAGS="$gl_saved_compiler_FLAGS"

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_type_limits" >&5
printf "%s\n" "$gl_cv_warn_c__Wno_type_limits" >&6; }
if test "x$gl_cv_warn_c__Wno_type_limits" = xyes
then :
  as_fn_append WARN_CFLAGS " -Wno-type-limits"
fi

      # Too many warnings for now


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
printf %s "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
if test ${gl_cv_warn_c__Wno_unused_parameter+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  gl_saved_compiler_FLAGS="$CFLAGS"
  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-parameter"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  gl_cv_warn_c__Wno_unused_parameter=yes
else $as_nop
  gl_cv_warn_c__Wno_unused_parameter=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
  CFLAGS="$gl_saved_compiler_FLAGS"

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
printf "%s\n" "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
if test "x$gl_cv_warn_c__Wno_unused_parameter" = xyes
then :
  as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
fi

 # Too many warnings for now


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
printf %s "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
if test ${gl_cv_warn_c__Wno_format_nonliteral+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  gl_saved_compiler_FLAGS="$CFLAGS"
  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-nonliteral"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  gl_cv_warn_c__Wno_format_nonliteral=yes
else $as_nop
  gl_cv_warn_c__Wno_format_nonliteral=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
  CFLAGS="$gl_saved_compiler_FLAGS"

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
printf "%s\n" "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
if test "x$gl_cv_warn_c__Wno_format_nonliteral" = xyes
then :
  as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
fi




{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-bidi-chars" >&5
printf %s "checking whether C compiler handles -Wno-bidi-chars... " >&6; }
if test ${gl_cv_warn_c__Wno_bidi_chars+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  gl_saved_compiler_FLAGS="$CFLAGS"
  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wbidi-chars"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  gl_cv_warn_c__Wno_bidi_chars=yes
else $as_nop
  gl_cv_warn_c__Wno_bidi_chars=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
  CFLAGS="$gl_saved_compiler_FLAGS"

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_bidi_chars" >&5
printf "%s\n" "$gl_cv_warn_c__Wno_bidi_chars" >&6; }
if test "x$gl_cv_warn_c__Wno_bidi_chars" = xyes
then :
  as_fn_append WARN_CFLAGS " -Wno-bidi-chars"
fi


  if test $gl_gcc_warnings = yes
then :


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-analyzer-fd-leak" >&5
printf %s "checking whether C compiler handles -Wno-analyzer-fd-leak... " >&6; }
if test ${gl_cv_warn_c__Wno_analyzer_fd_leak+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  gl_saved_compiler_FLAGS="$CFLAGS"
  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wanalyzer-fd-leak"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  gl_cv_warn_c__Wno_analyzer_fd_leak=yes
else $as_nop
  gl_cv_warn_c__Wno_analyzer_fd_leak=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
  CFLAGS="$gl_saved_compiler_FLAGS"

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_analyzer_fd_leak" >&5
printf "%s\n" "$gl_cv_warn_c__Wno_analyzer_fd_leak" >&6; }
if test "x$gl_cv_warn_c__Wno_analyzer_fd_leak" = xyes
then :
  as_fn_append WARN_CFLAGS " -Wno-analyzer-fd-leak"
fi


fi # GCC bug 109839

  # clang is unduly picky about some things.
  if test "$emacs_cv_clang" = yes; then


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-bitwise-instead-of-logical" >&5
printf %s "checking whether C compiler handles -Wno-bitwise-instead-of-logical... " >&6; }
if test ${gl_cv_warn_c__Wno_bitwise_instead_of_logical+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  gl_saved_compiler_FLAGS="$CFLAGS"
  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wbitwise-instead-of-logical"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  gl_cv_warn_c__Wno_bitwise_instead_of_logical=yes
else $as_nop
  gl_cv_warn_c__Wno_bitwise_instead_of_logical=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
  CFLAGS="$gl_saved_compiler_FLAGS"

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_bitwise_instead_of_logical" >&5
printf "%s\n" "$gl_cv_warn_c__Wno_bitwise_instead_of_logical" >&6; }
if test "x$gl_cv_warn_c__Wno_bitwise_instead_of_logical" = xyes
then :
  as_fn_append WARN_CFLAGS " -Wno-bitwise-instead-of-logical"
fi




{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-braces" >&5
printf %s "checking whether C compiler handles -Wno-missing-braces... " >&6; }
if test ${gl_cv_warn_c__Wno_missing_braces+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  gl_saved_compiler_FLAGS="$CFLAGS"
  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wmissing-braces"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  gl_cv_warn_c__Wno_missing_braces=yes
else $as_nop
  gl_cv_warn_c__Wno_missing_braces=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
  CFLAGS="$gl_saved_compiler_FLAGS"

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_braces" >&5
printf "%s\n" "$gl_cv_warn_c__Wno_missing_braces" >&6; }
if test "x$gl_cv_warn_c__Wno_missing_braces" = xyes
then :
  as_fn_append WARN_CFLAGS " -Wno-missing-braces"
fi




{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-null-pointer-arithmetic" >&5
printf %s "checking whether C compiler handles -Wno-null-pointer-arithmetic... " >&6; }
if test ${gl_cv_warn_c__Wno_null_pointer_arithmetic+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  gl_saved_compiler_FLAGS="$CFLAGS"
  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wnull-pointer-arithmetic"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  gl_cv_warn_c__Wno_null_pointer_arithmetic=yes
else $as_nop
  gl_cv_warn_c__Wno_null_pointer_arithmetic=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
  CFLAGS="$gl_saved_compiler_FLAGS"

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_null_pointer_arithmetic" >&5
printf "%s\n" "$gl_cv_warn_c__Wno_null_pointer_arithmetic" >&6; }
if test "x$gl_cv_warn_c__Wno_null_pointer_arithmetic" = xyes
then :
  as_fn_append WARN_CFLAGS " -Wno-null-pointer-arithmetic"
fi




{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-implicit-const-int-float-conversion" >&5
printf %s "checking whether C compiler handles -Wno-implicit-const-int-float-conversion... " >&6; }
if test ${gl_cv_warn_c__Wno_implicit_const_int_float_conversion+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  gl_saved_compiler_FLAGS="$CFLAGS"
  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wimplicit-const-int-float-conversion"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  gl_cv_warn_c__Wno_implicit_const_int_float_conversion=yes
else $as_nop
  gl_cv_warn_c__Wno_implicit_const_int_float_conversion=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
  CFLAGS="$gl_saved_compiler_FLAGS"

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_implicit_const_int_float_conversion" >&5
printf "%s\n" "$gl_cv_warn_c__Wno_implicit_const_int_float_conversion" >&6; }
if test "x$gl_cv_warn_c__Wno_implicit_const_int_float_conversion" = xyes
then :
  as_fn_append WARN_CFLAGS " -Wno-implicit-const-int-float-conversion"
fi




{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-int-in-bool-context" >&5
printf %s "checking whether C compiler handles -Wno-int-in-bool-context... " >&6; }
if test ${gl_cv_warn_c__Wno_int_in_bool_context+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  gl_saved_compiler_FLAGS="$CFLAGS"
  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wint-in-bool-context"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  gl_cv_warn_c__Wno_int_in_bool_context=yes
else $as_nop
  gl_cv_warn_c__Wno_int_in_bool_context=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
  CFLAGS="$gl_saved_compiler_FLAGS"

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_int_in_bool_context" >&5
printf "%s\n" "$gl_cv_warn_c__Wno_int_in_bool_context" >&6; }
if test "x$gl_cv_warn_c__Wno_int_in_bool_context" = xyes
then :
  as_fn_append WARN_CFLAGS " -Wno-int-in-bool-context"
fi




{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-shift-overflow" >&5
printf %s "checking whether C compiler handles -Wno-shift-overflow... " >&6; }
if test ${gl_cv_warn_c__Wno_shift_overflow+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  gl_saved_compiler_FLAGS="$CFLAGS"
  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wshift-overflow"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  gl_cv_warn_c__Wno_shift_overflow=yes
else $as_nop
  gl_cv_warn_c__Wno_shift_overflow=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
  CFLAGS="$gl_saved_compiler_FLAGS"

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_shift_overflow" >&5
printf "%s\n" "$gl_cv_warn_c__Wno_shift_overflow" >&6; }
if test "x$gl_cv_warn_c__Wno_shift_overflow" = xyes
then :
  as_fn_append WARN_CFLAGS " -Wno-shift-overflow"
fi


  fi

  # This causes too much noise in the MinGW build
  if test $opsys = mingw32; then


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-pointer-sign" >&5
printf %s "checking whether C compiler handles -Wno-pointer-sign... " >&6; }
if test ${gl_cv_warn_c__Wno_pointer_sign+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  gl_saved_compiler_FLAGS="$CFLAGS"
  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wpointer-sign"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  gl_cv_warn_c__Wno_pointer_sign=yes
else $as_nop
  gl_cv_warn_c__Wno_pointer_sign=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
  CFLAGS="$gl_saved_compiler_FLAGS"

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_pointer_sign" >&5
printf "%s\n" "$gl_cv_warn_c__Wno_pointer_sign" >&6; }
if test "x$gl_cv_warn_c__Wno_pointer_sign" = xyes
then :
  as_fn_append WARN_CFLAGS " -Wno-pointer-sign"
fi


  fi


printf "%s\n" "#define GCC_LINT 1" >>confdefs.h

  if test $gl_gcc_warnings = yes
then :

printf "%s\n" "#define GNULIB_PORTCHECK 1" >>confdefs.h


fi

fi

# clang is picky about these regardless of whether
# --enable-gcc-warnings is specified.
if test "$emacs_cv_clang" = yes; then


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-initializer-overrides" >&5
printf %s "checking whether C compiler handles -Wno-initializer-overrides... " >&6; }
if test ${gl_cv_warn_c__Wno_initializer_overrides+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  gl_saved_compiler_FLAGS="$CFLAGS"
  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Winitializer-overrides"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  gl_cv_warn_c__Wno_initializer_overrides=yes
else $as_nop
  gl_cv_warn_c__Wno_initializer_overrides=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
  CFLAGS="$gl_saved_compiler_FLAGS"

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_initializer_overrides" >&5
printf "%s\n" "$gl_cv_warn_c__Wno_initializer_overrides" >&6; }
if test "x$gl_cv_warn_c__Wno_initializer_overrides" = xyes
then :
  as_fn_append WARN_CFLAGS " -Wno-initializer-overrides"
fi




{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-tautological-compare" >&5
printf %s "checking whether C compiler handles -Wno-tautological-compare... " >&6; }
if test ${gl_cv_warn_c__Wno_tautological_compare+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  gl_saved_compiler_FLAGS="$CFLAGS"
  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wtautological-compare"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  gl_cv_warn_c__Wno_tautological_compare=yes
else $as_nop
  gl_cv_warn_c__Wno_tautological_compare=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
  CFLAGS="$gl_saved_compiler_FLAGS"

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_tautological_compare" >&5
printf "%s\n" "$gl_cv_warn_c__Wno_tautological_compare" >&6; }
if test "x$gl_cv_warn_c__Wno_tautological_compare" = xyes
then :
  as_fn_append WARN_CFLAGS " -Wno-tautological-compare"
fi




{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-tautological-constant-out-of-range-compare" >&5
printf %s "checking whether C compiler handles -Wno-tautological-constant-out-of-range-compare... " >&6; }
if test ${gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  gl_saved_compiler_FLAGS="$CFLAGS"
  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wtautological-constant-out-of-range-compare"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare=yes
else $as_nop
  gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
  CFLAGS="$gl_saved_compiler_FLAGS"

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" >&5
printf "%s\n" "$gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" >&6; }
if test "x$gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" = xyes
then :
  as_fn_append WARN_CFLAGS " -Wno-tautological-constant-out-of-range-compare"
fi


fi

# Suppress deprecation warnings from using sprintf variants,
# starting with Xcode 14.1 on macOS 13.
# These warnings are false alarms, as Emacs usage of sprintf is safe.
if test $opsys = darwin; then


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-deprecated-declarations" >&5
printf %s "checking whether C compiler handles -Wno-deprecated-declarations... " >&6; }
if test ${gl_cv_warn_c__Wno_deprecated_declarations+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  gl_saved_compiler_FLAGS="$CFLAGS"
  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wdeprecated-declarations"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  gl_cv_warn_c__Wno_deprecated_declarations=yes
else $as_nop
  gl_cv_warn_c__Wno_deprecated_declarations=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
  CFLAGS="$gl_saved_compiler_FLAGS"

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_deprecated_declarations" >&5
printf "%s\n" "$gl_cv_warn_c__Wno_deprecated_declarations" >&6; }
if test "x$gl_cv_warn_c__Wno_deprecated_declarations" = xyes
then :
  as_fn_append WARN_CFLAGS " -Wno-deprecated-declarations"
fi


fi

# Use a slightly smaller set of warning options for lib/.
nw=
nw="$nw -Wunused-macros"

  gl_warn_set=
  set x $WARN_CFLAGS; shift
  for gl_warn_item
  do
    case " $nw " in
      *" $gl_warn_item "*)
        ;;
      *)
        as_fn_append gl_warn_set " $gl_warn_item"
        ;;
    esac
  done
  GNULIB_WARN_CFLAGS=$gl_warn_set





edit_cflags="
  s,///*,/,g
  s/^/ /
  s/ -I/ $isystem/g
  s/^ //
"

# Check whether --enable-link-time-optimization was given.
if test ${enable_link_time_optimization+y}
then :
  enableval=$enable_link_time_optimization; if test "${enableval}" != "no"; then
   ac_lto_supported=no
   if test "$emacs_cv_clang" = yes; then
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether link-time optimization is supported by clang" >&5
printf %s "checking whether link-time optimization is supported by clang... " >&6; }
      GOLD_PLUGIN=`$CC -print-file-name=LLVMgold.so 2>/dev/null`
      if test -x "$GOLD_PLUGIN"; then
	 LTO="-flto"
      fi
   elif test x$GCC = xyes; then
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether link-time optimization is supported by gcc" >&5
printf %s "checking whether link-time optimization is supported by gcc... " >&6; }
      CPUS=`getconf _NPROCESSORS_ONLN 2>/dev/null`
      if test x$CPUS != x; then
	 LTO="-flto=$CPUS"
      else
	 LTO="-flto"
      fi
   else
      as_fn_error $? "Link-time optimization is not supported with your compiler." "$LINENO" 5
   fi
   if test -z "$LTO"; then
      ac_lto_supported=no
   else
      old_CFLAGS=$CFLAGS
      CFLAGS="$CFLAGS $LTO"
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_lto_supported=yes
else $as_nop
  ac_lto_supported=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
         CFLAGS="$old_CFLAGS"
   fi
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_lto_supported" >&5
printf "%s\n" "$ac_lto_supported" >&6; }
   if test "$ac_lto_supported" = "yes"; then
      CFLAGS="$CFLAGS $LTO"
      if test "$emacs_cv_clang" = yes; then
	 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Please read INSTALL before using link-time optimization with clang" >&5
printf "%s\n" "$as_me: WARNING: Please read INSTALL before using link-time optimization with clang" >&2;}
	 # WARNING: 'ar --plugin ...' doesn't work without
	 # command, so plugin name is appended to ARFLAGS.
	 ARFLAGS="cru --plugin $GOLD_PLUGIN"
	 RANLIB="$RANLIB --plugin $GOLD_PLUGIN"
      else

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -ffat-lto-objects" >&5
printf %s "checking whether C compiler handles -ffat-lto-objects... " >&6; }
if test ${gl_cv_warn_c__ffat_lto_objects+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  gl_saved_compiler_FLAGS="$CFLAGS"
  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -ffat-lto-objects"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  gl_cv_warn_c__ffat_lto_objects=yes
else $as_nop
  gl_cv_warn_c__ffat_lto_objects=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
  CFLAGS="$gl_saved_compiler_FLAGS"

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__ffat_lto_objects" >&5
printf "%s\n" "$gl_cv_warn_c__ffat_lto_objects" >&6; }
if test "x$gl_cv_warn_c__ffat_lto_objects" = xyes
then :
  CFLAGS="$CFLAGS -ffat-lto-objects"
fi

      fi
   fi
fi
fi






# Check whether --enable-silent-rules was given.
if test ${enable_silent_rules+y}
then :
  enableval=$enable_silent_rules;
fi

if test "$enable_silent_rules" = no; then
  AM_DEFAULT_VERBOSITY=1
else
  AM_DEFAULT_VERBOSITY=0
fi


  if test "$XCONFIGURE" != "android"
then :
  ac_config_files="$ac_config_files src/verbose.mk"

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.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
printf %s "checking for a BSD-compatible install... " >&6; }
if test -z "$INSTALL"; then
if test ${ac_cv_path_install+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    # Account for fact that we put trailing slashes in our PATH walk.
case $as_dir in #((
  ./ | /[cC]/* | \
  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
  /usr/ucb/* ) ;;
  *)
    # OSF1 and SCO ODT 3.0 have their own names for install.
    # Don't use installbsd from OSF since it installs stuff as root
    # by default.
    for ac_prog in ginstall scoinst install; do
      for ac_exec_ext in '' $ac_executable_extensions; do
	if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
	  if test $ac_prog = install &&
	    grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
	    # AIX install.  It has an incompatible calling convention.
	    :
	  elif test $ac_prog = install &&
	    grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
	    # program-specific install script used by HP pwplus--don't use.
	    :
	  else
	    rm -rf conftest.one conftest.two conftest.dir
	    echo one > conftest.one
	    echo two > conftest.two
	    mkdir conftest.dir
	    if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
	      test -s conftest.one && test -s conftest.two &&
	      test -s conftest.dir/conftest.one &&
	      test -s conftest.dir/conftest.two
	    then
	      ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
	      break 3
	    fi
	  fi
	fi
      done
    done
    ;;
esac

  done
IFS=$as_save_IFS

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

fi
  if test ${ac_cv_path_install+y}; 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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
printf "%s\n" "$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'




{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to symlink files in the same directory" >&5
printf %s "checking command to symlink files in the same directory... " >&6; }
if test ${emacs_cv_ln_s_fileonly+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  rm -f conf$$ conf$$.file

emacs_cv_ln_s_fileonly='cp -p'

if (echo >conf$$.file) 2>/dev/null; then
  if test "$opsys" = "mingw32"; then
    emacs_cv_ln_s_fileonly=/bin/ln
  elif ln -s conf$$.file conf$$ 2>/dev/null; then
    emacs_cv_ln_s_fileonly='ln -s'
  elif ln conf$$.file conf$$ 2>/dev/null; then
    emacs_cv_ln_s_fileonly=ln
  fi
fi

rm -f conf$$ conf$$.file
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_ln_s_fileonly" >&5
printf "%s\n" "$emacs_cv_ln_s_fileonly" >&6; }
LN_S_FILEONLY=$emacs_cv_ln_s_fileonly




if test "$opsys" = "mingw32"; then
  LN_S="/bin/ln"
fi


# Extract the first word of "install-info", so it can be a program name with args.
set dummy install-info; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_INSTALL_INFO+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  case $INSTALL_INFO in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_INSTALL_INFO="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$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_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
  ;;
esac
fi
INSTALL_INFO=$ac_cv_path_INSTALL_INFO
if test -n "$INSTALL_INFO"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
printf "%s\n" "$INSTALL_INFO" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


# Extract the first word of "gzip", so it can be a program name with args.
set dummy gzip; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_GZIP_PROG+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  case $GZIP_PROG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_GZIP_PROG="$GZIP_PROG" # 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
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_GZIP_PROG="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$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_PROG=$ac_cv_path_GZIP_PROG
if test -n "$GZIP_PROG"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5
printf "%s\n" "$GZIP_PROG" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi



test $with_compress_install != yes && test -n "$GZIP_PROG" && \
   GZIP_PROG=" # $GZIP_PROG # (disabled by configure --without-compress-install)"

if test "$with_dumping" = "unexec" && test "$opsys" = "nacl"; then
  as_fn_error $? "nacl is not compatible with --with-dumping=unexec" "$LINENO" 5
fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 'find' args to delete a file" >&5
printf %s "checking for 'find' args to delete a file... " >&6; }
if test ${emacs_cv_find_delete+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if touch conftest.tmp && find conftest.tmp -delete 2>/dev/null &&
      test ! -f conftest.tmp
   then emacs_cv_find_delete="-delete"
   else emacs_cv_find_delete="-exec rm -f {} ';'"
   fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_find_delete" >&5
printf "%s\n" "$emacs_cv_find_delete" >&6; }
FIND_DELETE=$emacs_cv_find_delete


PAXCTL_dumped=
PAXCTL_notdumped=
if test $with_unexec = yes && test $opsys = gnu-linux; then
  if test "${SETFATTR+set}" != set; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for setfattr" >&5
printf %s "checking for setfattr... " >&6; }
if test ${emacs_cv_prog_setfattr+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  touch conftest.tmp
       if (setfattr -n user.pax.flags conftest.tmp) >/dev/null 2>&1; then
	 emacs_cv_prog_setfattr=yes
       else
	 emacs_cv_prog_setfattr=no
       fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_setfattr" >&5
printf "%s\n" "$emacs_cv_prog_setfattr" >&6; }
    if test "$emacs_cv_prog_setfattr" = yes; then
      PAXCTL_notdumped='$(SETFATTR) -n user.pax.flags -v er'
      SETFATTR=setfattr
    else
      SETFATTR=
    fi
  fi
  case $opsys,$PAXCTL_notdumped,$emacs_uname_r in
    gnu-linux,,* | netbsd,,0-7.*)
      # Extract the first word of "paxctl", so it can be a program name with args.
set dummy paxctl; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_PAXCTL+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  case $PAXCTL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PAXCTL="$PAXCTL" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_PAXCTL="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$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
PAXCTL=$ac_cv_path_PAXCTL
if test -n "$PAXCTL"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PAXCTL" >&5
printf "%s\n" "$PAXCTL" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


      if test -n "$PAXCTL"; then
	if test "$opsys" = netbsd; then
	  PAXCTL_dumped='$(PAXCTL) +a'
	  PAXCTL_notdumped=$PAXCTL_dumped
	else
	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether binaries have a PT_PAX_FLAGS header" >&5
printf %s "checking whether binaries have a PT_PAX_FLAGS header... " >&6; }
	  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	     else
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	       PAXCTL=
	     fi
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	  if test -n "$PAXCTL"; then
	    PAXCTL_dumped='$(PAXCTL) -zex'
	    PAXCTL_notdumped='$(PAXCTL) -r'
	  fi
	fi
      fi;;
  esac
fi




# Makeinfo on macOS is ancient, check whether there is a more recent
# version installed by Homebrew.
for ac_prog in brew
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_BREW+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$BREW"; then
  ac_cv_prog_BREW="$BREW" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_BREW="$ac_prog"
    printf "%s\n" "$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
BREW=$ac_cv_prog_BREW
if test -n "$BREW"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BREW" >&5
printf "%s\n" "$BREW" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$BREW" && break
done

if test -n "$BREW"; then
  # Extract the first word of "makeinfo", so it can be a program name with args.
set dummy makeinfo; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_MAKEINFO+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  case $MAKEINFO in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in `$BREW --prefix texinfo 2>/dev/null`/bin$PATH_SEPARATOR$PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_MAKEINFO="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$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
MAKEINFO=$ac_cv_path_MAKEINFO
if test -n "$MAKEINFO"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
printf "%s\n" "$MAKEINFO" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


fi

# Check MacPorts on macOS.
if test $opsys = darwin; then
  # Extract the first word of "port", so it can be a program name with args.
set dummy port; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_HAVE_MACPORTS+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  case $HAVE_MACPORTS in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_HAVE_MACPORTS="$HAVE_MACPORTS" # 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
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_HAVE_MACPORTS="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$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
HAVE_MACPORTS=$ac_cv_path_HAVE_MACPORTS
if test -n "$HAVE_MACPORTS"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_MACPORTS" >&5
printf "%s\n" "$HAVE_MACPORTS" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


fi

## Require makeinfo >= 4.13 (last of the 4.x series) to build the manuals.
: ${MAKEINFO:=makeinfo}
case `($MAKEINFO --version) 2>/dev/null` in
  *' (GNU texinfo) '4.1[3-9]* | \
  *' (GNU texinfo) '[5-9]* | \
  *' (GNU texinfo) '[1-9][0-9]* ) ;;
  *) MAKEINFO=no;;
esac

## Makeinfo is unusual.  For a released Emacs, the manuals are
## pre-built, and not deleted by the normal clean rules.  makeinfo is
## therefore in the category of "special tools" not normally required, which
## configure does not have to check for (eg autoconf itself).
## In a repository checkout on the other hand, the manuals are not included.
## So makeinfo is a requirement to build from the repository, and configure
## should test for it as it does for any other build requirement.
## We use the presence of $srcdir/info/emacs to distinguish a release,
## with pre-built manuals, from a repository checkout.
if test "$MAKEINFO" = "no"; then
  MAKEINFO=makeinfo
  if test ! -e "$srcdir/info/emacs" && test ! -e "$srcdir/info/emacs.info"; then
    as_fn_error $? "You do not seem to have makeinfo >= 4.13, and your
source tree does not seem to have pre-built manuals in the 'info' directory.
Please install a suitable version of makeinfo. " "$LINENO" 5
  else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: You do not seem to have makeinfo >= 4.13.
You will not be able to rebuild the manuals if you delete them or change
their sources. " >&5
printf "%s\n" "$as_me: WARNING: You do not seem to have makeinfo >= 4.13.
You will not be able to rebuild the manuals if you delete them or change
their sources. " >&2;}
  fi
fi


if test $opsys = mingw32; then
   DOCMISC_W32=efaq-w32
else
   DOCMISC_W32=
fi



if test x$GCC = xyes; then
  test "x$GCC_LINK_TEST_OPTIONS" != x && \
    ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
else
  test "x$NON_GCC_LINK_TEST_OPTIONS" != x && \
    ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
fi

if test "$GCC" = yes; then
  LDFLAGS_NOCOMBRELOC="-Wl,-znocombreloc"
else
  LDFLAGS_NOCOMBRELOC="-znocombreloc"
fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5
printf %s "checking for -znocombreloc... " >&6; }
if test ${emacs_cv_znocombreloc+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test $with_unexec = no; then
     emacs_cv_znocombreloc='not needed'
   else
     save_LDFLAGS=$LDFLAGS
     LDFLAGS="$LDFLAGS $LDFLAGS_NOCOMBRELOC"
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  emacs_cv_znocombreloc=yes
else $as_nop
  emacs_cv_znocombreloc=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
     LDFLAGS=$save_LDFLAGS
   fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_znocombreloc" >&5
printf "%s\n" "$emacs_cv_znocombreloc" >&6; }

case $emacs_cv_znocombreloc in
  no*)
    LDFLAGS_NOCOMBRELOC= ;;
esac


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether addresses are sanitized" >&5
printf %s "checking whether addresses are sanitized... " >&6; }
if test ${emacs_cv_sanitize_address+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#ifndef __has_feature
	  #define __has_feature(f) 0
	  #endif
	  #if defined __SANITIZE_ADDRESS__ || __has_feature (address_sanitizer)
	  #else
	   error "Addresses are not sanitized.";
	  #endif

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  emacs_cv_sanitize_address=yes
else $as_nop
  emacs_cv_sanitize_address=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_sanitize_address" >&5
printf "%s\n" "$emacs_cv_sanitize_address" >&6; }

if test $with_unexec = yes; then

printf "%s\n" "#define HAVE_UNEXEC 1" >>confdefs.h

  if test "$emacs_cv_sanitize_address" = yes; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Addresses are sanitized; suggest --without-unexec" >&5
printf "%s\n" "$as_me: WARNING: Addresses are sanitized; suggest --without-unexec" >&2;}
  fi
fi


UNEXEC_OBJ=
test $with_unexec = yes &&
case "$opsys" in
  # MSDOS uses unexcoff.o
  aix4-2)
   UNEXEC_OBJ=unexaix.o
   ;;
  cygwin)
   UNEXEC_OBJ=unexcw.o
   ;;
  darwin)
   UNEXEC_OBJ=unexmacosx.o
   ;;
  hpux10-20 | hpux11)
   UNEXEC_OBJ=unexhp9k800.o
   ;;
  mingw32)
   UNEXEC_OBJ=unexw32.o
   ;;
  solaris)
   # Use the Solaris dldump() function, called from unexsol.c, to dump
   # emacs, instead of the generic ELF dump code found in unexelf.c.
   # The resulting binary has a complete symbol table, and is better
   # for debugging and other observability tools (debuggers, pstack, etc).
   UNEXEC_OBJ=unexsol.o
   ;;
  *)
   UNEXEC_OBJ=unexelf.o
   ;;
esac


LD_SWITCH_SYSTEM=
test "$with_unexec" = no || case "$opsys" in
  freebsd|dragonfly)
   ## Let 'ld' find image libs and similar things in /usr/local/lib.
   ## The system compiler, GCC, has apparently been modified to not
   ## look there, contrary to what a stock GCC would do.
### It's not our place to do this.  See bug#10313#17.
###   LD_SWITCH_SYSTEM=-L/usr/local/lib
      :
   ;;

  gnu-linux)
   ## cpp test was "ifdef __mips__", but presumably this is equivalent...
   case $host_cpu in mips*) LD_SWITCH_SYSTEM="-G 0";; esac
   ;;

  netbsd)
### It's not our place to do this.  See bug#10313#17.
###   LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib"
      :
   ;;

  openbsd)
   ## Han Boetes <han@boetes.org> says this is necessary,
   ## otherwise Emacs dumps core on elf systems.
   LD_SWITCH_SYSTEM="-Z"
   ;;
esac


ac_link="$ac_link $LD_SWITCH_SYSTEM"

## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_RPATH,
## which has not been defined yet.  When this was handled with cpp,
## it was expanded to null when configure sourced the s/*.h file.
## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles.
## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS
## (or somesuch), but because it is supposed to go at the _front_
## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way.
## Compare with the gnu-linux case below, which added to the end
## of LD_SWITCH_SYSTEM, and so can instead go at the front of
## LD_SWITCH_SYSTEM_TEMACS.
case "$opsys" in
  netbsd|openbsd)
   LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_RPATH) $LD_SWITCH_SYSTEM" ;;
esac

C_SWITCH_MACHINE=

test $with_unexec = yes &&
case $canonical in
 alpha*)
    ## With ELF, make sure that all common symbols get allocated to in the
    ## data section.  Otherwise, the dump of temacs may miss variables in
    ## the shared library that have been initialized.  For example, with
    ## GNU libc, __malloc_initialized would normally be resolved to the
    ## shared library's .bss section, which is fatal.
    if test "x$GCC" = "xyes"; then
      C_SWITCH_MACHINE="-fno-common"
    else
      as_fn_error $? "Non-GCC compilers are not supported." "$LINENO" 5
    fi
  ;;
esac


C_SWITCH_SYSTEM=
## Some programs in src produce warnings saying certain subprograms
## are too complex and need a MAXMEM value greater than 2000 for
## additional optimization.  --nils@exp-math.uni-essen.de
test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \
  C_SWITCH_SYSTEM="-ma -qmaxmem=4000"
if test "$opsys" = "mingw32"; then
  case "$canonical" in
    x86_64-*-mingw*) C_SWITCH_SYSTEM="-mtune=generic" ;;
    *) C_SWITCH_SYSTEM="-mtune=pentium4" ;;
  esac
fi
## gnu-linux might need -D_BSD_SOURCE on old libc5 systems.
## It is redundant in glibc2, since we define _GNU_SOURCE.



LIBS_SYSTEM=
case "$opsys" in
  ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2.
  aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;;

  freebsd|dragonfly) LIBS_SYSTEM="-lutil" ;;

  hpux*) LIBS_SYSTEM="-l:libdld.sl" ;;

  qnxnto) LIBS_SYSTEM="-lsocket" ;;

  solaris) LIBS_SYSTEM="-lsocket -lnsl" ;;

  ## Motif needs -lgen.
  unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;;

  # Haiku needs -lbsd for cfsetspeed.
  haiku) LIBS_SYSTEM="-lnetwork -lbsd" ;;
esac



### Make sure subsequent tests use flags consistent with the build flags.

if test x"${OVERRIDE_CPPFLAGS}" != x; then
  CPPFLAGS="${OVERRIDE_CPPFLAGS}"
else
  CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS"
fi

# Suppress obsolescent Autoconf test for size_t; Emacs assumes C99 or better.

# Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them.

ac_cv_type_gid_t=yes # AC_TYPE_GETGROUPS needs this in Autoconf 2.72.

# Check for all math.h functions that Emacs uses; on some platforms,
# -lm is needed for some of these functions.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for math library" >&5
printf %s "checking for math library... " >&6; }
if test ${emacs_cv_lib_math+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  OLD_LIBS=$LIBS
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

	#include <math.h>
	int
	main (int argc, char **argv)
	{
	  double d = argc;
	  float f = argc;
	  int i = argc;
	  long l = argc;
	  d = acos (d);
	  d = asin (d);
	  d = atan (d);
	  d = atan2 (d, d);
	  d = ceil (d);
	  d = copysign (d, d);
	  d = cos (d);
	  d = exp (d);
	  d = fabs (d);
	  d = floor (d);
	  d = fmod (d, d);
	  d = frexp (d, &i);
	  d = ldexp (d, i);
	  d = log (d);
	  d = log10 (d);
	  d = pow (d, d);
	  d = rint (d);
	  d = scalbn (d, l);
	  d = sin (d);
	  d = sqrt (d);
	  d = tan (d);
	  d = trunc (d);
	  f = fabsf (f);
	  f = powf (f, f);
	  i = ilogb (d);
	  i = signbit (d);
	  l = lrint (d);
	  l = lround (d);
	  return d == f && i == l;
	}

_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  emacs_cv_lib_math='none required'
else $as_nop
  LIBS="-lm $LIBS"
      if ac_fn_c_try_link "$LINENO"
then :
  emacs_cv_lib_math=-lm
else $as_nop
  as_fn_error $? "Math library (-lm) not found" "$LINENO" 5
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
   LIBS=$OLD_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lib_math" >&5
printf "%s\n" "$emacs_cv_lib_math" >&6; }
case $emacs_cv_lib_math in
  -*) LIB_MATH=$emacs_cv_lib_math;;
  *)  LIB_MATH=;;
esac

SYSTEM_TYPE=`echo $opsys | sed -e 's/[0-9].*//' -e 's|-|/|'`

case $opsys in
  cygwin )
    LIB_MATH=
    ;;
  darwin )
    ## Adding -lm confuses the dynamic linker, so omit it.
    LIB_MATH=
    ;;
  freebsd | dragonfly )
    SYSTEM_TYPE=berkeley-unix
    ;;
  gnu-linux | gnu-kfreebsd )
    ;;
  hpux10-20 | hpux11 )
    ;;
  mingw32 )
    LIB_MATH=
    SYSTEM_TYPE=windows-nt
    ;;
  netbsd | openbsd )
    SYSTEM_TYPE=berkeley-unix
    ;;

  solaris | unixware )
    SYSTEM_TYPE=usg-unix-v
    ;;

esac



printf "%s\n" "#define SYSTEM_TYPE \"$SYSTEM_TYPE\"" >>confdefs.h



pre_PKG_CONFIG_CFLAGS=$CFLAGS
pre_PKG_CONFIG_LIBS=$LIBS

if test "${ANDROID}" != "yes"; then







if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
	if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_PKG_CONFIG+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  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
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$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
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
printf "%s\n" "$PKG_CONFIG" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


fi
if test -z "$ac_cv_path_PKG_CONFIG"; then
  ac_pt_PKG_CONFIG=$PKG_CONFIG
  # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  case $ac_pt_PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_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
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$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
ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
if test -n "$ac_pt_PKG_CONFIG"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi

  if test "x$ac_pt_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_pt_PKG_CONFIG
  fi
else
  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
fi

fi
if test -n "$PKG_CONFIG"; then
	_pkg_min_version=0.9.0
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; }
	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	else
		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
		PKG_CONFIG=""
	fi
fi
fi





HAVE_SOUND=no
if test "${with_sound}" != "no"; then
  # Sound support for GNU/Linux, the free BSDs, MinGW, and Cygwin.
         for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h mmsystem.h
do :
  as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
    #ifdef __MINGW32__
    #define WIN32_LEAN_AND_MEAN
    #include <windows.h>
    #endif

"
if eval test \"x\$"$as_ac_Header"\" = x"yes"
then :
  cat >>confdefs.h <<_ACEOF
#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
 have_sound_header=yes
fi

done
  test "${with_sound}" = "oss" && test "${have_sound_header}" != "yes" && \
    as_fn_error $? "OSS sound support requested but not found." "$LINENO" 5

  if test "${with_sound}" = "bsd-ossaudio" || test "${with_sound}" = "yes"; then
    # OSS emulation library used on NetBSD and OpenBSD.
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
printf %s "checking for _oss_ioctl in -lossaudio... " >&6; }
if test ${ac_cv_lib_ossaudio__oss_ioctl+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lossaudio  $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.  */
char _oss_ioctl ();
int
main (void)
{
return _oss_ioctl ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_ossaudio__oss_ioctl=yes
else $as_nop
  ac_cv_lib_ossaudio__oss_ioctl=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
printf "%s\n" "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
if test "x$ac_cv_lib_ossaudio__oss_ioctl" = xyes
then :
  LIBSOUND=-lossaudio
else $as_nop
  LIBSOUND=
fi

    test "${with_sound}" = "bsd-ossaudio" && test -z "$LIBSOUND" && \
      as_fn_error $? "bsd-ossaudio sound support requested but not found." "$LINENO" 5
    # On {Net,Open}BSD use the system audio library instead of
    # potentially switching to ALSA below, as ALSA on these appears to
    # just wrap system libraries.
    test "${with_sound}" = "yes" && test "$LIBSOUND" = "-lossaudio" && \
      with_sound="bsd-ossaudio"
  fi


  if test "${with_sound}" = "alsa" || test "${with_sound}" = "yes"; then
    ALSA_REQUIRED=1.0.0
    ALSA_MODULES="alsa >= $ALSA_REQUIRED"
    if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "$ALSA_MODULES"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  ALSA_CFLAGS="$ALSA_CFLAGS $module_cflags $module_includes"
  ALSA_LIBS="$ALSA_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    ALSA_CFLAGS="$ndk_import_includes $ALSA_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_ALSA=yes
else $as_nop
  HAVE_ALSA=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5
printf %s "checking for $ALSA_MODULES... " >&6; }

if test -n "$ALSA_CFLAGS"; then
    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$ALSA_MODULES\""; } >&5
  ($PKG_CONFIG --exists --print-errors "$ALSA_MODULES") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$ALSA_LIBS"; then
    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$ALSA_MODULES\""; } >&5
  ($PKG_CONFIG --exists --print-errors "$ALSA_MODULES") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$ALSA_MODULES" 2>&1`
        else
	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$ALSA_MODULES" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$ALSA_PKG_ERRORS" >&5

	HAVE_ALSA=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_ALSA=no
else
	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
	ALSA_LIBS=$pkg_cv_ALSA_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	ALSA_CFLAGS=`printf "%s\n" "$ALSA_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_ALSA=yes
fi
fi
    if test $HAVE_ALSA = yes; then
      LIBSOUND="$LIBSOUND $ALSA_LIBS"
      CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"

printf "%s\n" "#define HAVE_ALSA 1" >>confdefs.h

    elif test "${with_sound}" = "alsa"; then
      as_fn_error $? "ALSA sound support requested but not found." "$LINENO" 5
    fi
  fi
            if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then
     case "$opsys" in
                     gnu-linux|freebsd|netbsd|mingw32|cygwin)

printf "%s\n" "#define HAVE_SOUND 1" >>confdefs.h

         HAVE_SOUND=yes
         ;;
     esac
  fi


fi
















{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ADDR_NO_RANDOMIZE" >&5
printf %s "checking for ADDR_NO_RANDOMIZE... " >&6; }
if test ${emacs_cv_personality_addr_no_randomize+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/personality.h>
int
main (void)
{
personality (personality (0xffffffff)
				     | ADDR_NO_RANDOMIZE)
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  emacs_cv_personality_addr_no_randomize=yes
else $as_nop
  emacs_cv_personality_addr_no_randomize=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_addr_no_randomize" >&5
printf "%s\n" "$emacs_cv_personality_addr_no_randomize" >&6; }
if test $emacs_cv_personality_addr_no_randomize = yes; then

printf "%s\n" "#define HAVE_PERSONALITY_ADDR_NO_RANDOMIZE 1" >>confdefs.h

fi

# Note that Solaris has sys/sysinfo.h which defines struct
# sysinfo as well.  To make sure that we're using GNU/Linux
# sysinfo, we explicitly set one of its fields.
if test "$ac_cv_header_sys_sysinfo_h" = yes; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Linux sysinfo may be used" >&5
printf %s "checking if Linux sysinfo may be used... " >&6; }
if test ${emacs_cv_linux_sysinfo+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/sysinfo.h>
int
main (void)
{
struct sysinfo si;
                                       si.totalram = 0;
                                       sysinfo (&si)
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  emacs_cv_linux_sysinfo=yes
else $as_nop
  emacs_cv_linux_sysinfo=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_linux_sysinfo" >&5
printf "%s\n" "$emacs_cv_linux_sysinfo" >&6; }

  if test $emacs_cv_linux_sysinfo = yes; then

printf "%s\n" "#define HAVE_LINUX_SYSINFO 1" >>confdefs.h

    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/sysinfo.h>
int
main (void)
{
struct sysinfo si; return si.mem_unit
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :

printf "%s\n" "#define LINUX_SYSINFO_UNIT 1" >>confdefs.h

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

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

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

printf "%s\n" "#define HAVE_TERM_H 1" >>confdefs.h

fi
rm -f conftest.err conftest.i conftest.$ac_ext
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
printf %s "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
if test ${ac_cv_header_sys_wait_h+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
#include <sys/wait.h>
#ifndef WEXITSTATUS
# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
#endif
#ifndef WIFEXITED
# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
#endif

int
main (void)
{
  int s;
  wait (&s);
  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_header_sys_wait_h=yes
else $as_nop
  ac_cv_header_sys_wait_h=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
printf "%s\n" "$ac_cv_header_sys_wait_h" >&6; }
if test $ac_cv_header_sys_wait_h = yes; then

printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h

fi




ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
"
if test "x$ac_cv_header_net_if_h" = xyes
then :
  printf "%s\n" "#define HAVE_NET_IF_H 1" >>confdefs.h

fi

ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
"
if test "x$ac_cv_header_ifaddrs_h" = xyes
then :
  printf "%s\n" "#define HAVE_IFADDRS_H 1" >>confdefs.h

fi

ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
"
if test "x$ac_cv_header_net_if_dl_h" = xyes
then :
  printf "%s\n" "#define HAVE_NET_IF_DL_H 1" >>confdefs.h

fi


ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#if HAVE_NET_IF_H
#include <net/if.h>
#endif
"
if test "x$ac_cv_member_struct_ifreq_ifr_flags" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1" >>confdefs.h


fi
ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#if HAVE_NET_IF_H
#include <net/if.h>
#endif
"
if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1" >>confdefs.h


fi
ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#if HAVE_NET_IF_H
#include <net/if.h>
#endif
"
if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1" >>confdefs.h


fi
ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#if HAVE_NET_IF_H
#include <net/if.h>
#endif
"
if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1" >>confdefs.h


fi
ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#if HAVE_NET_IF_H
#include <net/if.h>
#endif
"
if test "x$ac_cv_member_struct_ifreq_ifr_addr" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_IFREQ_IFR_ADDR 1" >>confdefs.h


fi
ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr.sa_len" "ac_cv_member_struct_ifreq_ifr_addr_sa_len" "$ac_includes_default
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#if HAVE_NET_IF_H
#include <net/if.h>
#endif
"
if test "x$ac_cv_member_struct_ifreq_ifr_addr_sa_len" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN 1" >>confdefs.h


fi




AUTO_DEPEND=no
AUTODEPEND_PARENTS='lib src'
if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5
printf %s "checking whether gcc understands -MMD -MF... " >&6; }
if test ${emacs_cv_autodepend+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  SAVE_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS -MMD -MF deps.d -MP"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  emacs_cv_autodepend=yes
else $as_nop
  emacs_cv_autodepend=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   CFLAGS="$SAVE_CFLAGS"
   test -f deps.d || emacs_cv_autodepend=no
   rm -rf deps.d
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_autodepend" >&5
printf "%s\n" "$emacs_cv_autodepend" >&6; }
   if test $emacs_cv_autodepend = yes; then
      AUTO_DEPEND=yes
   fi
fi


#### Choose a window system.

## We leave window_system equal to none if
## we end up building without one.  Any new window system should
## set window_system to an appropriate value and add objects to
## window-system-specific substs.

window_system=none

ANDROID_OBJ=
ANDROID_LIBS=
# ANDROID_CFLAGS is a precious variable used to pass information to
# the cross-compiler.
ANDROID_BUILD_CFLAGS=
REALLY_ANDROID=
CM_OBJ="cm.o"

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
if test ${ac_cv_c_undeclared_builtin_options+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_save_CFLAGS=$CFLAGS
   ac_cv_c_undeclared_builtin_options='cannot detect'
   for ac_arg in '' -fno-builtin; do
     CFLAGS="$ac_save_CFLAGS $ac_arg"
     # This test program should *not* compile successfully.
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{
(void) strchr;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :

else $as_nop
  # This test program should compile successfully.
        # No library function is consistently available on
        # freestanding implementations, so test against a dummy
        # declaration.  Include always-available headers on the
        # off chance that they somehow elicit warnings.
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <float.h>
#include <limits.h>
#include <stdarg.h>
#include <stddef.h>
extern void ac_decl (int, char *);

int
main (void)
{
(void) ac_decl (0, (char *) 0);
  (void) ac_decl;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  if test x"$ac_arg" = x
then :
  ac_cv_c_undeclared_builtin_options='none needed'
else $as_nop
  ac_cv_c_undeclared_builtin_options=$ac_arg
fi
          break
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
    done
    CFLAGS=$ac_save_CFLAGS

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
  case $ac_cv_c_undeclared_builtin_options in #(
  'cannot detect') :
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot make $CC report undeclared builtins
See \`config.log' for more details" "$LINENO" 5; } ;; #(
  'none needed') :
    ac_c_undeclared_builtin_options='' ;; #(
  *) :
    ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
esac

if test "$ANDROID" = "yes"
then :

  window_system=android
  no_x=yes
  ANDROID_OBJ="androidterm.o androidfns.o androidfont.o androidmenu.o"
  ANDROID_OBJ="$ANDROID_OBJ android.o"
  ANDROID_LIBS=
  CM_OBJ=


printf "%s\n" "#define HAVE_ANDROID 1" >>confdefs.h


  if test "$XCONFIGURE" != "android"
then :


printf "%s\n" "#define ANDROID_STUBIFY 1" >>confdefs.h


    # Now set any shared user ID that was specified.
    if test -n "$with_shared_user_id"
then :
  emacs_val=$with_shared_user_id
       emacs_val=`printf "%s\n" "$with_shared_user_id" \
                  | sed -e 's/"/\\"/'`
       emacs_val="\"$emacs_val\""
       ANDROID_SHARED_USER_ID="android:sharedUserId=$emacs_val"
       # `android:sharedUserName' is required for sharedUserID to work
       # on recent Android releases.  It does not otherwise affect the
       # behavior of any code.
       emacs_val="\"@string/shared_user_name\""
       ANDROID_SHARED_USER_NAME="android:sharedUserLabel=$emacs_val"
fi
else $as_nop

    # Emacs will be built as a shared library, and a wrapper around it
    # will also be built for the benefit of applications.  This
    # requires Emacs be built as a position independent executable.
    ANDROID_BUILD_CFLAGS="-fPIC -fvisibility=hidden"

    # Graphics code in sfntfont-android.c benefits heavily from
    # vectorization.
    ANDROID_BUILD_CFLAGS="$ANDROID_BUILD_CFLAGS -ftree-vectorize"

    # Link with libraries required for Android support.
    # API 9 and later require `-landroid' for the asset manager.
    # API 8 uses an emulation via the JNI.
    if test "$ANDROID_SDK" -lt "9"
then :
  ANDROID_LIBS="-llog -ljnigraphics"
else $as_nop
  ANDROID_LIBS="-landroid -llog -ljnigraphics"
fi

    # This is required to make the system load emacs.apk's libpng
    # (among others) instead of the system's own.  But it doesn't work
    # on all Android versions yet, so for now just suffix shared
    # libraries with _emacs.
    # ANDROID_LDFLAGS="-Wl,-rpath,'\$\$ORIGIN'"

    # Link with the sfnt font library and sfntfont.o, along with
    # sfntfont-android.o.
    ANDROID_OBJ="$ANDROID_OBJ sfnt.o sfntfont.o sfntfont-android.o"

    # Build androidselect.o and androidvfs.o.
    ANDROID_OBJ="$ANDROID_OBJ androidselect.o androidvfs.o"

    # Check for some functions not always present in the NDK.
    ac_fn_check_decl "$LINENO" "android_get_device_api_level" "ac_cv_have_decl_android_get_device_api_level" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_android_get_device_api_level" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_ANDROID_GET_DEVICE_API_LEVEL $ac_have_decl" >>confdefs.h


    # Mention this build is really for Android.
    REALLY_ANDROID=yes
fi
fi









# Check for pw_gecos in struct passwd; this is known to be missing on
# Android.


ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "#include <pwd.h>
"
if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_PASSWD_PW_GECOS 1" >>confdefs.h


fi

if test x"$REALLY_ANDROID" = "xyes"
then :
  printf "%s\n" "#define USER_FULL_NAME android_user_full_name (pw)" >>confdefs.h

else $as_nop
  if test x"$ac_cv_member_struct_passwd_pw_gecos" = "xyes"
then :
  printf "%s\n" "#define USER_FULL_NAME pw->pw_gecos" >>confdefs.h

else $as_nop
  printf "%s\n" "#define USER_FULL_NAME NULL" >>confdefs.h

fi
fi

if test "${with_pgtk}" = "yes"; then
  window_system=pgtk
fi

if test "${ANDROID}" != "yes"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for X" >&5
printf %s "checking for X... " >&6; }


# Check whether --with-x was given.
if test ${with_x+y}
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 test ${ac_cv_have_x+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  # One or both of the vars are not set, and there is no cached value.
ac_x_includes=no
ac_x_libraries=no
# Do we need to do anything special at all?
ac_save_LIBS=$LIBS
LIBS="-lX11 $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <X11/Xlib.h>
int
main (void)
{
XrmInitialize ()
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  # We can compile and link X programs with no special options.
  ac_x_includes=
  ac_x_libraries=
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS="$ac_save_LIBS"
# If that didn't work, only try xmkmf and file system searches
# for native compilation.
if test x"$ac_x_includes" = xno && test "$cross_compiling" = no
then :
  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

/opt/X11/include

/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 $as_nop
  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 (void)
{
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 $as_nop
  LIBS=$ac_save_LIBS
for ac_dir in `printf "%s\n" "$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.beam \
    conftest$ac_exeext conftest.$ac_ext
fi # $ac_x_libraries = no

fi
# Record the results.
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
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
printf "%s\n" "$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'"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
printf "%s\n" "libraries $x_libraries, headers $x_includes" >&6; }
fi

  if test "$no_x" != yes && test "${with_pgtk}" != "yes"; then
    window_system=x11
  fi
fi

LD_SWITCH_X_SITE_RPATH=
if test "${x_libraries}" != NONE; then
  if test -n "${x_libraries}"; then
    LD_SWITCH_X_SITE=-L`printf "%s\n" "$x_libraries" | sed -e 's/:/ -L/g'`
    LD_SWITCH_X_SITE_RPATH=-Wl,-rpath,`
      printf "%s\n" "$x_libraries" | sed -e 's/:/ -Wl,-rpath,/g'
    `
  fi
  x_default_search_path=""
  x_search_path=${x_libraries}
  if test -z "${x_search_path}"; then
    x_search_path=/usr/lib
  fi
  for x_library in `printf "%s\n" "$x_search_path:" | \
		    sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
    x_search_path="\
${x_library}/X11/%L/%T/%N%C%S:\
${x_library}/X11/%l/%T/%N%C%S:\
${x_library}/X11/%T/%N%C%S:\
${x_library}/X11/%L/%T/%N%S:\
${x_library}/X11/%l/%T/%N%S:\
${x_library}/X11/%T/%N%S"
    if test x"${x_default_search_path}" = x; then
      x_default_search_path=${x_search_path}
    else
      x_default_search_path="${x_search_path}:${x_default_search_path}"
    fi
  done
fi


if test "${x_includes}" != NONE && test -n "${x_includes}"; then
  C_SWITCH_X_SITE=$isystem`printf "%s\n" "$x_includes" | sed -e "s/:/ $isystem/g"`
fi

if test x"${x_includes}" = x; then
  bitmapdir=/usr/include/X11/bitmaps
else
  # accumulate include directories that have X11 bitmap subdirectories
  { bmd_acc=; unset bmd_acc;}
  for bmd in `printf "%s\n" "$x_includes" | sed -e 's/:/ /g'`; do
    if test -d "${bmd}/X11/bitmaps"; then
      bmd_acc="${bmd_acc+$bmd_acc:}${bmd}/X11/bitmaps"
    fi
    if test -d "${bmd}/bitmaps"; then
      bmd_acc="${bmd_acc+$bmd_acc:}${bmd}/bitmaps"
    fi
  done
  bitmapdir=$bmd_acc
fi

NATIVE_IMAGE_API=no

test "${with_ns}" = maybe && test "${opsys}" != darwin && with_ns=no
HAVE_NS=no
NS_GNUSTEP_CONFIG=no
NS_IMPL_COCOA=no
NS_IMPL_GNUSTEP=no
tmp_CPPFLAGS="$CPPFLAGS"
tmp_CFLAGS="$CFLAGS"
CPPFLAGS="$CPPFLAGS -x objective-c"
CFLAGS="$CFLAGS -x objective-c"
GNU_OBJC_CFLAGS=""
LIBS_GNUSTEP=
if test "${with_ns}" != no; then
  # macfont.o requires macuvs.h which is absent after 'make extraclean',
  # so avoid NS_IMPL_COCOA if macuvs.h is absent.
  # Even a headless Emacs can build macuvs.h, so this should let you bootstrap.
  if test "${opsys}" = darwin && test -f "$srcdir/src/macuvs.h"; then
     NS_IMPL_COCOA=yes
     ns_appdir=`pwd`/nextstep/Emacs.app
     ns_appbindir=${ns_appdir}/Contents/MacOS
     ns_applibexecdir=${ns_appdir}/Contents/MacOS/libexec
     ns_applibdir=${ns_appdir}/Contents/Frameworks
     ns_appresdir=${ns_appdir}/Contents/Resources
     ns_appsrc=Cocoa/Emacs.base
     ns_fontfile=macfont.o
  elif flags=`(gnustep-config --objc-flags) 2>/dev/null`; then
     NS_IMPL_GNUSTEP=yes
     NS_GNUSTEP_CONFIG=yes
     GNU_OBJC_CFLAGS="$flags"
     LIBS_GNUSTEP=`gnustep-config --gui-libs || exit`
  elif test -f $GNUSTEP_CONFIG_FILE; then
     NS_IMPL_GNUSTEP=yes
          GNUSTEP_SYSTEM_HEADERS=`. $GNUSTEP_CONFIG_FILE \
       && printf "%s\n" "$GNUSTEP_SYSTEM_HEADERS"`
     GNUSTEP_SYSTEM_LIBRARIES=` . $GNUSTEP_CONFIG_FILE \
       && printf "%s\n" "$GNUSTEP_SYSTEM_LIBRARIES"`
          GNUSTEP_LOCAL_HEADERS=`. $GNUSTEP_CONFIG_FILE \
       && printf "%s\n" "$GNUSTEP_LOCAL_HEADERS"`
     GNUSTEP_LOCAL_LIBRARIES=`. $GNUSTEP_CONFIG_FILE \
       && printf "%s\n" "$GNUSTEP_LOCAL_LIBRARIES"`
     test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
       GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
     test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
       GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
     CPPFLAGS="$CPPFLAGS -isystem ${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
     CFLAGS="$CFLAGS -isystem ${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
     LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
     LIBS_GNUSTEP="-lgnustep-gui -lgnustep-base -lobjc -lpthread"
                    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS" >&5
printf %s "checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS... " >&6; }
if test ${emacs_cv_objc_exceptions+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <GNUstepBase/GSConfig.h>
int
main (void)
{
#if defined BASE_NATIVE_OBJC_EXCEPTIONS && BASE_NATIVE_OBJC_EXCEPTIONS > 0
1;
#else
fail;
#endif
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  emacs_cv_objc_exceptions=yes
else $as_nop
  emacs_cv_objc_exceptions=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_objc_exceptions" >&5
printf "%s\n" "$emacs_cv_objc_exceptions" >&6; }
     if test $emacs_cv_objc_exceptions = yes; then

printf "%s\n" "#define _NATIVE_OBJC_EXCEPTIONS 1" >>confdefs.h

       GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fobjc-exceptions"
     fi
  fi
  if test $NS_IMPL_GNUSTEP = yes; then
     ns_appdir=`pwd`/nextstep/Emacs.app
     ns_appbindir=${ns_appdir}
     ns_applibexecdir=${ns_appdir}/libexec
     ns_applibdir=${ns_appdir}/Frameworks
     ns_appresdir=${ns_appdir}/Resources
     ns_appsrc=GNUstep/Emacs.base
     ns_fontfile=nsfont.o
  fi

    CPPFLAGS="$CPPFLAGS $GNU_OBJC_CFLAGS"
  CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS"

  ac_fn_c_check_header_compile "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default"
if test "x$ac_cv_header_AppKit_AppKit_h" = xyes
then :
  HAVE_NS=yes
else $as_nop
  as_fn_error $? "The include files (AppKit/AppKit.h etc) that
are required for a Nextstep build are missing or cannot be compiled.
Either fix this, or re-configure with the option '--without-ns'." "$LINENO" 5
fi


  macfont_file=""
  if test "${NS_IMPL_COCOA}" = "yes"; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Mac OS X 10.6 or newer" >&5
printf %s "checking for Mac OS X 10.6 or newer... " >&6; }
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <AppKit/AppKit.h>
int
main (void)
{

#ifdef MAC_OS_X_VERSION_MAX_ALLOWED
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
 ; /* OK */
#else
 error "Mac OS X 10.6 or newer required";
#endif
#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ns_osx_have_106=yes
else $as_nop
  ns_osx_have_106=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ns_osx_have_106" >&5
printf "%s\n" "$ns_osx_have_106" >&6; }

    if test $ns_osx_have_106 = no; then
       as_fn_error $? "Mac OS X 10.6 or newer is required" "$LINENO" 5;
    fi
  fi

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Mac OS X 12.0 or later" >&5
printf %s "checking for Mac OS X 12.0 or later... " >&6; }
if test ${emacs_cv_macosx_12_0+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <AvailabilityMacros.h>
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 120000
Mac OS X 12.x or later.
#endif

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  emacs_cv_macosx_12_0=no
else $as_nop
  emacs_cv_macosx_12_0=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_macosx_12_0" >&5
printf "%s\n" "$emacs_cv_macosx_12_0" >&6; }

  if test "${with_native_image_api}" = yes; then

printf "%s\n" "#define HAVE_NATIVE_IMAGE_API 1" >>confdefs.h

     NATIVE_IMAGE_API="yes (ns)"
  fi
fi



INSTALL_ARCH_INDEP_EXTRA=install-etc
ns_self_contained=no
NS_OBJ=
NS_OBJC_OBJ=
if test "${HAVE_NS}" = yes; then
  if test "$with_toolkit_scroll_bars" = "no"; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Non-toolkit scroll bars are not implemented for Nextstep." >&5
printf "%s\n" "$as_me: WARNING: Non-toolkit scroll bars are not implemented for Nextstep." >&2;}
  fi

  window_system=nextstep
  # set up packaging dirs
  if test "${EN_NS_SELF_CONTAINED}" = yes; then

printf "%s\n" "#define NS_SELF_CONTAINED 1" >>confdefs.h

     ns_self_contained=yes
     prefix=${ns_appresdir}
     exec_prefix=${ns_appbindir}
          libexecdir="\${ns_applibexecdir}"
     archlibdir="\${ns_applibexecdir}"
     etcdocdir="\${ns_appresdir}/etc"
     etcdir="\${ns_appresdir}/etc"
               infodir="\${ns_appresdir}/info"
     mandir="\${ns_appresdir}/man"
     lispdir="\${ns_appresdir}/lisp"
     lispdirrel="\${ns_appresdir}/lisp"
     test "$locallisppathset" = no && locallisppath="\${ns_appresdir}/site-lisp"
     INSTALL_ARCH_INDEP_EXTRA=
  fi

  NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o $ns_fontfile"
fi
CFLAGS="$tmp_CFLAGS"
CPPFLAGS="$tmp_CPPFLAGS"





if test "${HAVE_NS}" = yes; then
  ac_ext=m
ac_cpp='$OBJCPP $CPPFLAGS'
ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_objc_compiler_gnu

  ac_ext=m
ac_cpp='$OBJCPP $CPPFLAGS'
ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_objc_compiler_gnu
if test -n "$ac_tool_prefix"; then
  for ac_prog in gcc objcc objc cc CC clang
  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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_OBJC+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$OBJC"; then
  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
    printf "%s\n" "$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
OBJC=$ac_cv_prog_OBJC
if test -n "$OBJC"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
printf "%s\n" "$OBJC" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


    test -n "$OBJC" && break
  done
fi
if test -z "$OBJC"; then
  ac_ct_OBJC=$OBJC
  for ac_prog in gcc objcc objc cc CC clang
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_OBJC+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$ac_ct_OBJC"; then
  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_OBJC="$ac_prog"
    printf "%s\n" "$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_OBJC=$ac_cv_prog_ac_ct_OBJC
if test -n "$ac_ct_OBJC"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
printf "%s\n" "$ac_ct_OBJC" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$ac_ct_OBJC" && break
done

  if test "x$ac_ct_OBJC" = x; then
    OBJC="gcc"
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    OBJC=$ac_ct_OBJC
  fi
fi

# Provide some information about the compiler.
printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Objective 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\""
printf "%s\n" "$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
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
done

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU Objective C" >&5
printf %s "checking whether the compiler supports GNU Objective C... " >&6; }
if test ${ac_cv_objc_compiler_gnu+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

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

  ;
  return 0;
}
_ACEOF
if ac_fn_objc_try_compile "$LINENO"
then :
  ac_compiler_gnu=yes
else $as_nop
  ac_compiler_gnu=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_cv_objc_compiler_gnu=$ac_compiler_gnu

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
printf "%s\n" "$ac_cv_objc_compiler_gnu" >&6; }
ac_compiler_gnu=$ac_cv_objc_compiler_gnu

if test $ac_compiler_gnu = yes; then
  GOBJC=yes
else
  GOBJC=
fi
ac_test_OBJCFLAGS=${OBJCFLAGS+y}
ac_save_OBJCFLAGS=$OBJCFLAGS
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
printf %s "checking whether $OBJC accepts -g... " >&6; }
if test ${ac_cv_prog_objc_g+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_save_objc_werror_flag=$ac_objc_werror_flag
   ac_objc_werror_flag=yes
   ac_cv_prog_objc_g=no
   OBJCFLAGS="-g"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_objc_try_compile "$LINENO"
then :
  ac_cv_prog_objc_g=yes
else $as_nop
  OBJCFLAGS=""
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

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

else $as_nop
  ac_objc_werror_flag=$ac_save_objc_werror_flag
	 OBJCFLAGS="-g"
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_objc_try_compile "$LINENO"
then :
  ac_cv_prog_objc_g=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   ac_objc_werror_flag=$ac_save_objc_werror_flag
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
printf "%s\n" "$ac_cv_prog_objc_g" >&6; }
if test $ac_test_OBJCFLAGS; then
  OBJCFLAGS=$ac_save_OBJCFLAGS
elif test $ac_cv_prog_objc_g = yes; then
  if test "$GOBJC" = yes; then
    OBJCFLAGS="-g -O2"
  else
    OBJCFLAGS="-g"
  fi
else
  if test "$GOBJC" = yes; then
    OBJCFLAGS="-O2"
  else
    OBJCFLAGS=
  fi
fi
ac_ext=m
ac_cpp='$OBJCPP $CPPFLAGS'
ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_objc_compiler_gnu


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the Objective C compiler supports instancetype" >&5
printf %s "checking if the Objective C compiler supports instancetype... " >&6; }
if test ${emacs_cv_objc_instancetype+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
@interface Test
                          + (instancetype)test;
                          @end
_ACEOF
if ac_fn_objc_try_compile "$LINENO"
then :
  emacs_cv_objc_instancetype=yes
else $as_nop
  emacs_cv_objc_instancetype=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_objc_instancetype" >&5
printf "%s\n" "$emacs_cv_objc_instancetype" >&6; }

  if test x$emacs_cv_objc_instancetype = xyes ; then

printf "%s\n" "#define NATIVE_OBJC_INSTANCETYPE 1" >>confdefs.h

  fi

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the Objective C compiler defaults to C99" >&5
printf %s "checking if the Objective C compiler defaults to C99... " >&6; }
if test ${emacs_cv_objc_c99+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{
for (int i = 0;;);
  ;
  return 0;
}
_ACEOF
if ac_fn_objc_try_compile "$LINENO"
then :
  emacs_cv_objc_c99=yes
else $as_nop
  emacs_cv_objc_c99=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_objc_c99" >&5
printf "%s\n" "$emacs_cv_objc_c99" >&6; }

  if test x$emacs_cv_objc_c99 = xno ; then
    GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -std=c99"
  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

fi

HAVE_BE_APP=no
if test "${opsys}" = "haiku" && test "${with_be_app}" = "yes"; then
         ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
if test -z "$CXX"; then
  if test -n "$CCC"; then
    CXX=$CCC
  else
    if test -n "$ac_tool_prefix"; then
  for ac_prog in gcc g++
  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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CXX+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$CXX"; then
  ac_cv_prog_CXX="$CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
CXX=$ac_cv_prog_CXX
if test -n "$CXX"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
printf "%s\n" "$CXX" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


    test -n "$CXX" && break
  done
fi
if test -z "$CXX"; then
  ac_ct_CXX=$CXX
  for ac_prog in gcc g++
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_CXX+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$ac_ct_CXX"; then
  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_CXX="$ac_prog"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
if test -n "$ac_ct_CXX"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
printf "%s\n" "$ac_ct_CXX" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$ac_ct_CXX" && break
done

  if test "x$ac_ct_CXX" = x; then
    CXX="g++"
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CXX=$ac_ct_CXX
  fi
fi

  fi
fi
# Provide some information about the compiler.
printf "%s\n" "$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\""
printf "%s\n" "$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
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
done

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C++" >&5
printf %s "checking whether the compiler supports GNU C++... " >&6; }
if test ${ac_cv_cxx_compiler_gnu+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

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

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
  ac_compiler_gnu=yes
else $as_nop
  ac_compiler_gnu=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_cv_cxx_compiler_gnu=$ac_compiler_gnu

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; }
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

if test $ac_compiler_gnu = yes; then
  GXX=yes
else
  GXX=
fi
ac_test_CXXFLAGS=${CXXFLAGS+y}
ac_save_CXXFLAGS=$CXXFLAGS
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
printf %s "checking whether $CXX accepts -g... " >&6; }
if test ${ac_cv_prog_cxx_g+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
   ac_cxx_werror_flag=yes
   ac_cv_prog_cxx_g=no
   CXXFLAGS="-g"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

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

int
main (void)
{

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

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

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
  ac_cv_prog_cxx_g=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
printf "%s\n" "$ac_cv_prog_cxx_g" >&6; }
if test $ac_test_CXXFLAGS; then
  CXXFLAGS=$ac_save_CXXFLAGS
elif test $ac_cv_prog_cxx_g = yes; then
  if test "$GXX" = yes; then
    CXXFLAGS="-g -O2"
  else
    CXXFLAGS="-g"
  fi
else
  if test "$GXX" = yes; then
    CXXFLAGS="-O2"
  else
    CXXFLAGS=
  fi
fi
ac_prog_cxx_stdcxx=no
if test x$ac_prog_cxx_stdcxx = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5
printf %s "checking for $CXX option to enable C++11 features... " >&6; }
if test ${ac_cv_prog_cxx_11+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_cv_prog_cxx_11=no
ac_save_CXX=$CXX
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_cxx_conftest_cxx11_program
_ACEOF
for ac_arg in '' -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x -qlanglvl=extended0x -AA
do
  CXX="$ac_save_CXX $ac_arg"
  if ac_fn_cxx_try_compile "$LINENO"
then :
  ac_cv_prog_cxx_cxx11=$ac_arg
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam
  test "x$ac_cv_prog_cxx_cxx11" != "xno" && break
done
rm -f conftest.$ac_ext
CXX=$ac_save_CXX
fi

if test "x$ac_cv_prog_cxx_cxx11" = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
else $as_nop
  if test "x$ac_cv_prog_cxx_cxx11" = x
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
else $as_nop
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5
printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; }
     CXX="$CXX $ac_cv_prog_cxx_cxx11"
fi
  ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11
  ac_prog_cxx_stdcxx=cxx11
fi
fi
if test x$ac_prog_cxx_stdcxx = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5
printf %s "checking for $CXX option to enable C++98 features... " >&6; }
if test ${ac_cv_prog_cxx_98+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_cv_prog_cxx_98=no
ac_save_CXX=$CXX
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_cxx_conftest_cxx98_program
_ACEOF
for ac_arg in '' -std=gnu++98 -std=c++98 -qlanglvl=extended -AA
do
  CXX="$ac_save_CXX $ac_arg"
  if ac_fn_cxx_try_compile "$LINENO"
then :
  ac_cv_prog_cxx_cxx98=$ac_arg
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam
  test "x$ac_cv_prog_cxx_cxx98" != "xno" && break
done
rm -f conftest.$ac_ext
CXX=$ac_save_CXX
fi

if test "x$ac_cv_prog_cxx_cxx98" = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
else $as_nop
  if test "x$ac_cv_prog_cxx_cxx98" = x
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
else $as_nop
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5
printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; }
     CXX="$CXX $ac_cv_prog_cxx_cxx98"
fi
  ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98
  ac_prog_cxx_stdcxx=cxx98
fi
fi

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

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

   ac_fn_cxx_check_header_compile "$LINENO" "app/Application.h" "ac_cv_header_app_Application_h" "$ac_includes_default"
if test "x$ac_cv_header_app_Application_h" = xyes
then :
  HAVE_BE_APP=yes
else $as_nop
  as_fn_error $? "The Application Kit headers required for building
with the Application Kit were not found or cannot be compiled. Either fix this, or
re-configure with the option '--without-be-app'." "$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

fi



HAVE_W32=no
W32_OBJ=
W32_LIBS=
EMACSRES=
CLIENTRES=
CLIENTW=
W32_RES_LINK=
EMACS_MANIFEST=
if test "${with_w32}" != no; then
  case "${opsys}" in
    cygwin)
      ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
if test "x$ac_cv_header_windows_h" = xyes
then :
  HAVE_W32=yes
else $as_nop
  as_fn_error $? "'--with-w32' was specified, but windows.h
                   cannot be found." "$LINENO" 5
fi

    ;;
    mingw32)
    ## Using --with-w32 with MinGW is a no-op, but we allow it.
    ;;
    *)
      as_fn_error $? "Using w32 with an autotools build is only supported for Cygwin and MinGW32." "$LINENO" 5
    ;;
  esac
fi

if test "${opsys}" = "mingw32"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Windows API headers are recent enough" >&5
printf %s "checking whether Windows API headers are recent enough... " >&6; }
if test ${emacs_cv_w32api+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

     #include <windows.h>
     #include <usp10.h>
int
main (void)
{
PIMAGE_NT_HEADERS pHeader;
     PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader)
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  emacs_cv_w32api=yes
else $as_nop
  emacs_cv_w32api=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_w32api" >&5
printf "%s\n" "$emacs_cv_w32api" >&6; }
  if test "${emacs_cv_w32api}" = "no"; then
    as_fn_error $? "the Windows API headers are too old to support this build." "$LINENO" 5
  fi
  HAVE_W32=${emacs_cv_w32api}
fi

FIRSTFILE_OBJ=
NTDIR=
LIBS_ECLIENT=
LIB_WSOCK32=
NTLIB=
XARGS_LIMIT=
if test "${HAVE_W32}" = "yes"; then

printf "%s\n" "#define HAVE_NTGUI 1" >>confdefs.h

  if test "$with_toolkit_scroll_bars" = "no"; then
    as_fn_error $? "Non-toolkit scroll bars are not implemented for w32 build." "$LINENO" 5
  fi
  if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
set dummy ${ac_tool_prefix}windres; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_WINDRES+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$WINDRES"; then
  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
    printf "%s\n" "$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
WINDRES=$ac_cv_prog_WINDRES
if test -n "$WINDRES"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
printf "%s\n" "$WINDRES" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


fi
if test -z "$ac_cv_prog_WINDRES"; then
  ac_ct_WINDRES=$WINDRES
  # Extract the first word of "windres", so it can be a program name with args.
set dummy windres; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_WINDRES+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$ac_ct_WINDRES"; then
  ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_WINDRES="windres"
    printf "%s\n" "$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_WINDRES=$ac_cv_prog_ac_ct_WINDRES
if test -n "$ac_ct_WINDRES"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
printf "%s\n" "$ac_ct_WINDRES" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi

  if test "x$ac_ct_WINDRES" = x; then
    WINDRES="as_fn_error $? "No resource compiler found." "$LINENO" 5"
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    WINDRES=$ac_ct_WINDRES
  fi
else
  WINDRES="$ac_cv_prog_WINDRES"
fi

  W32_OBJ="w32fns.o w32menu.o w32reg.o w32font.o w32term.o"
  W32_OBJ="$W32_OBJ w32xfns.o w32select.o w32uniscribe.o w32cygwinx.o"
  EMACSRES="emacs.res"
  case "$canonical" in
    x86_64-*-*) EMACS_MANIFEST="emacs-x64.manifest" ;;
    *) EMACS_MANIFEST="emacs-x86.manifest" ;;
  esac
    comma_version=`echo "${PACKAGE_VERSION}.0.0" | sed -e 's/\./,/g' -e 's/^\([^,]*,[^,]*,[^,]*,[^,]*\).*/\1/'`

  comma_space_version=`echo "$comma_version" | sed 's/,/, /g'`


  ac_config_files="$ac_config_files nt/emacs.rc nt/emacsclient.rc"

  if test "${opsys}" = "cygwin"; then
    W32_LIBS="$W32_LIBS -lkernel32 -luser32 -lusp10 -lgdi32"
    W32_LIBS="$W32_LIBS -lole32 -lcomdlg32 -lcomctl32 -lwinspool"
    # Tell the linker that emacs.res is an object (which we compile from
    # the rc file), not a linker script.
    W32_RES_LINK="-Wl,emacs.res"
  else
    W32_OBJ="$W32_OBJ w32.o w32console.o w32heap.o w32inevt.o w32proc.o"
            if test "${with_native_image_api}" = yes; then

printf "%s\n" "#define HAVE_NATIVE_IMAGE_API 1" >>confdefs.h

      NATIVE_IMAGE_API="yes (w32)"
      W32_OBJ="$W32_OBJ w32image.o"
    fi
    W32_LIBS="$W32_LIBS -lwinmm -lgdi32 -lcomdlg32"
    W32_LIBS="$W32_LIBS -lmpr -lwinspool -lole32 -lcomctl32"
    W32_RES_LINK="\$(EMACSRES)"
    CLIENTRES="emacsclient.res"
    CLIENTW="emacsclientw\$(EXEEXT)"
    FIRSTFILE_OBJ=firstfile.o
    NTDIR=nt
    CM_OBJ=
    LIBS_ECLIENT="-lcomctl32"
    LIB_WSOCK32="-lwsock32"
    NTLIB="ntlib.$ac_objext"
    XARGS_LIMIT="-s 10000"
  fi
fi

if test "${HAVE_W32}" = "no" && test "${opsys}" = "cygwin"; then
  W32_LIBS="-lkernel32"
  W32_OBJ="w32cygwinx.o"
fi
















if test "${HAVE_W32}" = "yes"; then
  window_system=w32
  with_xft=no
fi

HAIKU_OBJ=
HAIKU_CXX_OBJ=
HAIKU_LIBS=
HAIKU_CFLAGS=

if test "$opsys" = "haiku"; then
  HAIKU_OBJ="$HAIKU_OBJ haiku.o"
fi

if test "${HAVE_BE_APP}" = "yes"; then

printf "%s\n" "#define HAVE_HAIKU 1" >>confdefs.h

fi

if test "${HAVE_BE_APP}" = "yes"; then
  window_system=haiku
  with_xft=no
  HAIKU_OBJ="$HAIKU_OBJ haikufns.o haikuterm.o haikumenu.o haikufont.o haikuselect.o haiku_io.o"
  HAIKU_CXX_OBJ="haiku_support.o haiku_font_support.o haiku_draw_support.o haiku_select.o"
  HAIKU_LIBS="-lbe -lgame -ltranslation -ltracker" # -lgame is needed for set_mouse_position.

  if test "${with_native_image_api}" = yes; then

printf "%s\n" "#define HAVE_NATIVE_IMAGE_API 1" >>confdefs.h

     NATIVE_IMAGE_API="yes (haiku)"
     HAIKU_OBJ="$HAIKU_OBJ haikuimage.o"
  fi
fi






## $window_system is now set to the window system we will
## ultimately use.

term_header=
HAVE_X_WINDOWS=no
HAVE_X11=no
USE_X_TOOLKIT=none
HAVE_PGTK=no

case "${window_system}" in
  x11 )
    HAVE_X_WINDOWS=yes
    HAVE_X11=yes
    term_header=xterm.h
    case "${with_x_toolkit}" in
      athena | lucid ) USE_X_TOOLKIT=LUCID ;;
      motif ) USE_X_TOOLKIT=MOTIF ;;
      gtk ) with_gtk=yes
            term_header=gtkutil.h
            USE_X_TOOLKIT=none ;;
      gtk2 ) with_gtk2=yes
             term_header=gtkutil.h
             USE_X_TOOLKIT=none ;;
      gtk3 ) with_gtk3=yes
             term_header=gtkutil.h
             USE_X_TOOLKIT=none ;;
      no ) USE_X_TOOLKIT=none ;;
      * ) USE_X_TOOLKIT=maybe ;;
    esac
  ;;
  nextstep )
    term_header=nsterm.h
  ;;
  w32 )
    term_header=w32term.h
  ;;
  pgtk )
    term_header=pgtkterm.h
    with_gtk3=yes
    USE_X_TOOLKIT=none
    HAVE_PGTK=yes

printf "%s\n" "#define HAVE_PGTK 1" >>confdefs.h

  ;;
  haiku )
    term_header=haikuterm.h
  ;;
  android )
    term_header=androidterm.h
  ;;
esac



if test "$window_system" = none && test "X$with_x" != "Xno"; then
   # Extract the first word of "X", so it can be a program name with args.
set dummy X; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_HAVE_XSERVER+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$HAVE_XSERVER"; then
  ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_HAVE_XSERVER="true"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
fi
fi
HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
if test -n "$HAVE_XSERVER"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5
printf "%s\n" "$HAVE_XSERVER" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


   if test "$HAVE_XSERVER" = true ||
      test -n "$DISPLAY" ||
      {
        for emacs_libX11 in /usr/lib/libX11.*; do break; done
        test "$emacs_libX11" != '/usr/lib/libX11.*'
      }
   then
        as_fn_error $? "You seem to be running X, but no X development libraries
were found.  You should install the relevant development files for X
and for the toolkit you want, such as Gtk+ or Motif.  Also make
sure you have development files for image handling, i.e.
tiff, gif, jpeg, png and xpm.
If you are sure you want Emacs compiled without X window support, pass
  --without-x
to configure." "$LINENO" 5
   fi
fi

# Does the opsystem file prohibit the use of the GNU malloc?
# Assume not, until told otherwise.
GNU_MALLOC=yes

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc is Doug Lea style" >&5
printf %s "checking whether malloc is Doug Lea style... " >&6; }
if test ${emacs_cv_var_doug_lea_malloc+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  emacs_cv_var_doug_lea_malloc=no
      if test "$emacs_cv_sanitize_address" != yes; then
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <malloc.h>
	    static void hook (void) {}
int
main (void)
{
malloc_set_state (malloc_get_state ());
	    __after_morecore_hook = hook;
	    __malloc_initialize_hook = hook;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  emacs_cv_var_doug_lea_malloc=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
   fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var_doug_lea_malloc" >&5
printf "%s\n" "$emacs_cv_var_doug_lea_malloc" >&6; }
doug_lea_malloc=$emacs_cv_var_doug_lea_malloc

hybrid_malloc=
system_malloc=yes

ac_func=
for ac_item in $ac_func_c_list
do
  if test $ac_func; then
    ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func
    if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then
      echo "#define $ac_item 1" >> confdefs.h
    fi
    ac_func=
  else
    ac_func=$ac_item
  fi
done


test $with_unexec = yes &&
case "$opsys" in
  ## darwin ld insists on the use of malloc routines in the System framework.
  darwin | mingw32 | nacl | solaris) ;;
  cygwin | qnxnto | freebsd)
	  hybrid_malloc=yes
          system_malloc= ;;
  *) test "$ac_cv_func_sbrk" = yes && system_malloc=$emacs_cv_sanitize_address;;
esac

if test "${system_malloc}" != yes && test "${doug_lea_malloc}" != yes \
   && test "${UNEXEC_OBJ}" = unexelf.o; then
  hybrid_malloc=yes
fi

GMALLOC_OBJ=
HYBRID_MALLOC=
if test "${system_malloc}" = "yes"; then

printf "%s\n" "#define SYSTEM_MALLOC 1" >>confdefs.h

  GNU_MALLOC=no
  GNU_MALLOC_reason="
    (The GNU allocators don't work with this system configuration.)"
  VMLIMIT_OBJ=
elif test "$hybrid_malloc" = yes; then

printf "%s\n" "#define HYBRID_MALLOC 1" >>confdefs.h

  HYBRID_MALLOC=1
  GNU_MALLOC=no
  GNU_MALLOC_reason=" (only before dumping)"
  GMALLOC_OBJ=gmalloc.o
  VMLIMIT_OBJ=
else
  test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o
  VMLIMIT_OBJ=vm-limit.o

  ac_fn_c_check_header_compile "$LINENO" "sys/vlimit.h" "ac_cv_header_sys_vlimit_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_vlimit_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_VLIMIT_H 1" >>confdefs.h

fi

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for data_start" >&5
printf %s "checking for data_start... " >&6; }
if test ${emacs_cv_data_start+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
extern char data_start[]; char ch;
int
main (void)
{
return data_start < &ch;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  emacs_cv_data_start=yes
else $as_nop
  emacs_cv_data_start=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_data_start" >&5
printf "%s\n" "$emacs_cv_data_start" >&6; }
  if test $emacs_cv_data_start = yes; then

printf "%s\n" "#define HAVE_DATA_START 1" >>confdefs.h

  fi
fi




if test "$doug_lea_malloc" = "yes" && test "$hybrid_malloc" != yes; then
  if test "$GNU_MALLOC" = yes ; then
    GNU_MALLOC_reason="
      (Using Doug Lea's new malloc from the GNU C Library.)"
  fi

printf "%s\n" "#define DOUG_LEA_MALLOC 1" >>confdefs.h


  ## Use mmap directly for allocating larger buffers.
  ## FIXME this comes from src/s/{gnu,gnu-linux}.h:
  ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
  ## Does the AC_FUNC_MMAP test below make this check unnecessary?
  case "$opsys" in
    mingw32|gnu*) REL_ALLOC=no ;;
  esac
fi

if test x"${REL_ALLOC}" = x; then
  REL_ALLOC=${GNU_MALLOC}
fi

use_mmap_for_buffers=no
case "$opsys" in
  mingw32) use_mmap_for_buffers=yes ;;
esac





{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
printf %s "checking for working mmap... " >&6; }
if test ${ac_cv_func_mmap_fixed_mapped+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test "$cross_compiling" = yes
then :
  case "$host_os" in # ((
			  # Guess yes on platforms where we know the result.
		  linux*) ac_cv_func_mmap_fixed_mapped=yes ;;
			  # If we don't know, assume the worst.
		  *)      ac_cv_func_mmap_fixed_mapped=no ;;
		esac
else $as_nop
  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>

/* 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 (void)
{
  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);
  free (data);
  free (data3);
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  ac_cv_func_mmap_fixed_mapped=yes
else $as_nop
  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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
printf "%s\n" "$ac_cv_func_mmap_fixed_mapped" >&6; }
if test $ac_cv_func_mmap_fixed_mapped = yes; then

printf "%s\n" "#define HAVE_MMAP 1" >>confdefs.h

fi
rm -f conftest.mmap conftest.txt

if test $use_mmap_for_buffers = yes; then

printf "%s\n" "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h

  REL_ALLOC=no
fi

LIBS="$LIBS_SYSTEM $LIBS"

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5
printf %s "checking for main in -lXbsd... " >&6; }
if test ${ac_cv_lib_Xbsd_main+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lXbsd  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */


int
main (void)
{
return main ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_Xbsd_main=yes
else $as_nop
  ac_cv_lib_Xbsd_main=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5
printf "%s\n" "$ac_cv_lib_Xbsd_main" >&6; }
if test "x$ac_cv_lib_Xbsd_main" = xyes
then :
  LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
fi


LIB_PTHREAD=


if test "$ac_cv_header_pthread_h" && test "$opsys" != "mingw32"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread library" >&5
printf %s "checking for pthread library... " >&6; }
if test ${emacs_cv_pthread_lib+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  emacs_cv_pthread_lib=no
     OLD_LIBS=$LIBS
     for emacs_pthread_lib in 'none needed' -lpthread; do
       case $emacs_pthread_lib in
	 -*) LIBS="$OLD_LIBS $emacs_pthread_lib";;
       esac
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <pthread.h>
	      #include <signal.h>
	      sigset_t old_mask, new_mask;
	      void noop (void) {}
int
main (void)
{
pthread_t th = pthread_self ();
	      int status = 0;
	      status += pthread_create (&th, 0, 0, 0);
	      status += pthread_sigmask (SIG_BLOCK, &new_mask, &old_mask);
	      status += pthread_kill (th, 0);
	      #if ! (defined SYSTEM_MALLOC || defined HYBRID_MALLOC \
		     || defined DOUG_LEA_MALLOC)
	      /* Test for pthread_atfork only if gmalloc uses it,
		 as older-style hosts like MirBSD 10 lack it.  */
	      status += pthread_atfork (noop, noop, noop);
	      #endif
	      return status;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  emacs_cv_pthread_lib=$emacs_pthread_lib
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
       LIBS=$OLD_LIBS
       if test "$emacs_cv_pthread_lib" != no; then
	 break
       fi
     done
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_pthread_lib" >&5
printf "%s\n" "$emacs_cv_pthread_lib" >&6; }
  if test "$emacs_cv_pthread_lib" != no; then

printf "%s\n" "#define HAVE_PTHREAD 1" >>confdefs.h

    case $emacs_cv_pthread_lib in
      -*) LIB_PTHREAD=$emacs_cv_pthread_lib;;
    esac
    ac_cv_func_pthread_sigmask=yes
    # Some systems optimize for single-threaded programs by default, and
    # need special flags to disable these optimizations. For example, the
    # definition of 'errno' in <errno.h>.
    case $opsys in
      hpux* | solaris)

printf "%s\n" "#define _REENTRANT 1" >>confdefs.h
;;
      aix4-2)

printf "%s\n" "#define _THREAD_SAFE 1" >>confdefs.h
;;
    esac
  fi
fi


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thread support" >&5
printf %s "checking for thread support... " >&6; }
threads_enabled=no
if test "$with_threads" = yes; then
   if test "$emacs_cv_pthread_lib" != no; then

printf "%s\n" "#define THREADS_ENABLED 1" >>confdefs.h

      threads_enabled=yes
   elif test "${opsys}" = "mingw32"; then

printf "%s\n" "#define THREADS_ENABLED 1" >>confdefs.h

      threads_enabled=yes
   fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $threads_enabled" >&5
printf "%s\n" "$threads_enabled" >&6; }


case ${host_os} in
aix*)
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
printf %s "checking for -bbigtoc option... " >&6; }
if test ${gdb_cv_bigtoc+y}
then :
  printf %s "(cached) " >&6
else $as_nop

    case $GCC in
    yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
    *) gdb_cv_bigtoc=-bbigtoc ;;
    esac

    LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{
int i;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :

else $as_nop
  gdb_cv_bigtoc=
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
printf "%s\n" "$gdb_cv_bigtoc" >&6; }
  ;;
esac

# Change CFLAGS, CPPFLAGS, and LIBS temporarily so that C_SWITCH_X_SITE
# is for the tests that follow.  We set them back later on.

REAL_CFLAGS="$CFLAGS"
REAL_CPPFLAGS="$CPPFLAGS"
REAL_LIBS="$LIBS"

if test "${HAVE_X11}" = "yes"; then
  DEFS="$C_SWITCH_X_SITE $DEFS"
  LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
  LIBS="-lX11 $LIBS"
  CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
  CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"

  # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
  # This is handled by LD_SWITCH_X_SITE_RPATH during the real build,
  # but it's more convenient here to set LD_RUN_PATH since this
  # also works on hosts that don't understand LD_SWITCH_X_SITE_RPATH.
  if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
    LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
    export LD_RUN_PATH
  fi

  # Reportedly, some broken Solaris systems have XKBlib.h but are missing
  # header files included from there.
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5
printf %s "checking for Xkb... " >&6; }
if test ${emacs_cv_xkb+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <X11/Xlib.h>
#include <X11/XKBlib.h>
int
main (void)
{
XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  emacs_cv_xkb=yes
else $as_nop
  emacs_cv_xkb=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_xkb" >&5
printf "%s\n" "$emacs_cv_xkb" >&6; }
  if test $emacs_cv_xkb = yes; then

printf "%s\n" "#define HAVE_XKB 1" >>confdefs.h

    ac_fn_c_check_func "$LINENO" "XkbRefreshKeyboardMapping" "ac_cv_func_XkbRefreshKeyboardMapping"
if test "x$ac_cv_func_XkbRefreshKeyboardMapping" = xyes
then :
  printf "%s\n" "#define HAVE_XKBREFRESHKEYBOARDMAPPING 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "XkbFreeNames" "ac_cv_func_XkbFreeNames"
if test "x$ac_cv_func_XkbFreeNames" = xyes
then :
  printf "%s\n" "#define HAVE_XKBFREENAMES 1" >>confdefs.h

fi

  fi

  ac_fn_c_check_func "$LINENO" "XrmSetDatabase" "ac_cv_func_XrmSetDatabase"
if test "x$ac_cv_func_XrmSetDatabase" = xyes
then :
  printf "%s\n" "#define HAVE_XRMSETDATABASE 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "XScreenResourceString" "ac_cv_func_XScreenResourceString"
if test "x$ac_cv_func_XScreenResourceString" = xyes
then :
  printf "%s\n" "#define HAVE_XSCREENRESOURCESTRING 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "XScreenNumberOfScreen" "ac_cv_func_XScreenNumberOfScreen"
if test "x$ac_cv_func_XScreenNumberOfScreen" = xyes
then :
  printf "%s\n" "#define HAVE_XSCREENNUMBEROFSCREEN 1" >>confdefs.h

fi

  ac_fn_c_check_func "$LINENO" "XDisplayCells" "ac_cv_func_XDisplayCells"
if test "x$ac_cv_func_XDisplayCells" = xyes
then :
  printf "%s\n" "#define HAVE_XDISPLAYCELLS 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "XDestroySubwindows" "ac_cv_func_XDestroySubwindows"
if test "x$ac_cv_func_XDestroySubwindows" = xyes
then :
  printf "%s\n" "#define HAVE_XDESTROYSUBWINDOWS 1" >>confdefs.h

fi

fi

if test "${window_system}" = "x11"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5
printf %s "checking X11 version 6... " >&6; }
  if test ${emacs_cv_x11_version_6+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <X11/Xlib.h>
int
main (void)
{
#if XlibSpecificationRelease < 6
fail;
#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  emacs_cv_x11_version_6=yes
else $as_nop
  emacs_cv_x11_version_6=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
fi

  if test $emacs_cv_x11_version_6 = yes; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
printf "%s\n" "6 or newer" >&6; }

printf "%s\n" "#define HAVE_X11R6 1" >>confdefs.h


printf "%s\n" "#define HAVE_X_I18N 1" >>confdefs.h

    ac_fn_c_check_member "$LINENO" "XICCallback" "callback" "ac_cv_member_XICCallback_callback" "#include <X11/Xlib.h>
"
if test "x$ac_cv_member_XICCallback_callback" = xyes
then :

printf "%s\n" "#define HAVE_XICCALLBACK_CALLBACK 1" >>confdefs.h


fi

    ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style
    ## XIM support.
    case "$opsys" in
      solaris) : ;;
      *)
printf "%s\n" "#define HAVE_X11R6_XIM 1" >>confdefs.h

         ;;
    esac
  else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
printf "%s\n" "before 6" >&6; }
  fi
fi

### Use -lrsvg-2 if available, unless '--with-rsvg=no' is specified.
HAVE_RSVG=no
if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" \
   || test "${opsys}" = "mingw32" || test "${HAVE_BE_APP}" = "yes" \
   || test "${window_system}" = "pgtk" \
   || test "${REALLY_ANDROID}" = "yes"; then
  if test "${with_rsvg}" != "no"; then
    RSVG_REQUIRED=2.14.0
    if test "${REALLY_ANDROID}" = "yes"
then :
  RSVG_MODULE="librsvg"
else $as_nop
  RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
fi

    if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "$RSVG_MODULE"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  RSVG_CFLAGS="$RSVG_CFLAGS $module_cflags $module_includes"
  RSVG_LIBS="$RSVG_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    RSVG_CFLAGS="$ndk_import_includes $RSVG_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_RSVG=yes
else $as_nop
  HAVE_RSVG=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5
printf %s "checking for $RSVG_MODULE... " >&6; }

if test -n "$RSVG_CFLAGS"; then
    pkg_cv_RSVG_CFLAGS="$RSVG_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$RSVG_MODULE\""; } >&5
  ($PKG_CONFIG --exists --print-errors "$RSVG_MODULE") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$RSVG_LIBS"; then
    pkg_cv_RSVG_LIBS="$RSVG_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$RSVG_MODULE\""; } >&5
  ($PKG_CONFIG --exists --print-errors "$RSVG_MODULE") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        RSVG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$RSVG_MODULE" 2>&1`
        else
	        RSVG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$RSVG_MODULE" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$RSVG_PKG_ERRORS" >&5

	HAVE_RSVG=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_RSVG=no
else
	RSVG_CFLAGS=$pkg_cv_RSVG_CFLAGS
	RSVG_LIBS=$pkg_cv_RSVG_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	RSVG_CFLAGS=`printf "%s\n" "$RSVG_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_RSVG=yes
fi
fi



    if test $HAVE_RSVG = yes; then

printf "%s\n" "#define HAVE_RSVG 1" >>confdefs.h

      CFLAGS="$CFLAGS $RSVG_CFLAGS"
      # Windows loads librsvg dynamically
      if test "${opsys}" = "mingw32"; then
	RSVG_LIBS=
      fi
    fi
  fi
fi

### Use -lwebp if available, unless '--with-webp=no'
HAVE_WEBP=no
if test "${with_webp}" != "no"; then
   if test "${HAVE_X11}" = "yes" || test "${opsys}" = "mingw32" \
   || test "${HAVE_W32}" = "yes" || test "${HAVE_NS}" = "yes" \
   || test "${HAVE_BE_APP}" = "yes" || test "${HAVE_PGTK}" = "yes" \
   || test "${REALLY_ANDROID}" = "yes"; then
      WEBP_REQUIRED=0.6.0
      WEBP_MODULE="libwebpdemux >= $WEBP_REQUIRED"

      if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "$WEBP_MODULE"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  WEBP_CFLAGS="$WEBP_CFLAGS $module_cflags $module_includes"
  WEBP_LIBS="$WEBP_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    WEBP_CFLAGS="$ndk_import_includes $WEBP_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_WEBP=yes
else $as_nop
  HAVE_WEBP=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $WEBP_MODULE" >&5
printf %s "checking for $WEBP_MODULE... " >&6; }

if test -n "$WEBP_CFLAGS"; then
    pkg_cv_WEBP_CFLAGS="$WEBP_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$WEBP_MODULE\""; } >&5
  ($PKG_CONFIG --exists --print-errors "$WEBP_MODULE") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_WEBP_CFLAGS=`$PKG_CONFIG --cflags "$WEBP_MODULE" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$WEBP_LIBS"; then
    pkg_cv_WEBP_LIBS="$WEBP_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$WEBP_MODULE\""; } >&5
  ($PKG_CONFIG --exists --print-errors "$WEBP_MODULE") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_WEBP_LIBS=`$PKG_CONFIG --libs "$WEBP_MODULE" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        WEBP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$WEBP_MODULE" 2>&1`
        else
	        WEBP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$WEBP_MODULE" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$WEBP_PKG_ERRORS" >&5

	HAVE_WEBP=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_WEBP=no
else
	WEBP_CFLAGS=$pkg_cv_WEBP_CFLAGS
	WEBP_LIBS=$pkg_cv_WEBP_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	WEBP_CFLAGS=`printf "%s\n" "$WEBP_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_WEBP=yes
fi
fi

      # WebPGetInfo is sometimes not present inside libwebpdemux, so
      # if it does not link, also check for libwebpdecoder.

      OLD_CFLAGS=$CFLAGS
      OLD_LIBS=$LIBS
      CFLAGS="$CFLAGS $WEBP_CFLAGS"
      LIBS="$LIBS $WEBP_LIBS"

      if test "$REALLY_ANDROID" != "yes"
then :

	ac_fn_c_check_func "$LINENO" "WebPGetInfo" "ac_cv_func_WebPGetInfo"
if test "x$ac_cv_func_WebPGetInfo" = xyes
then :

else $as_nop
  WEBP_MODULE="$WEBP_MODULE libwebpdecoder >= $WEBP_REQUIRED"
	   HAVE_WEBP=no
	   { WEBP_LIBS=; unset WEBP_LIBS;}
	   { WEBP_CFLAGS=; unset WEBP_CFLAGS;}
	   if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "$WEBP_MODULE"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  WEBP_CFLAGS="$WEBP_CFLAGS $module_cflags $module_includes"
  WEBP_LIBS="$WEBP_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    WEBP_CFLAGS="$ndk_import_includes $WEBP_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_WEBP=yes
else $as_nop
  HAVE_WEBP=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $WEBP_MODULE" >&5
printf %s "checking for $WEBP_MODULE... " >&6; }

if test -n "$WEBP_CFLAGS"; then
    pkg_cv_WEBP_CFLAGS="$WEBP_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$WEBP_MODULE\""; } >&5
  ($PKG_CONFIG --exists --print-errors "$WEBP_MODULE") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_WEBP_CFLAGS=`$PKG_CONFIG --cflags "$WEBP_MODULE" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$WEBP_LIBS"; then
    pkg_cv_WEBP_LIBS="$WEBP_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$WEBP_MODULE\""; } >&5
  ($PKG_CONFIG --exists --print-errors "$WEBP_MODULE") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_WEBP_LIBS=`$PKG_CONFIG --libs "$WEBP_MODULE" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        WEBP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$WEBP_MODULE" 2>&1`
        else
	        WEBP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$WEBP_MODULE" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$WEBP_PKG_ERRORS" >&5

	HAVE_WEBP=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_WEBP=no
else
	WEBP_CFLAGS=$pkg_cv_WEBP_CFLAGS
	WEBP_LIBS=$pkg_cv_WEBP_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	WEBP_CFLAGS=`printf "%s\n" "$WEBP_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_WEBP=yes
fi
fi
fi

fi

      CFLAGS=$OLD_CFLAGS
      LIBS=$OLD_LIBS



   fi
   if test $HAVE_WEBP = yes; then

printf "%s\n" "#define HAVE_WEBP 1" >>confdefs.h

      # Windows loads libwebp dynamically
      if test "${opsys}" = "mingw32"; then
	WEBP_LIBS=
      fi
   fi
fi

### Use -lsqlite3 if available, unless '--with-sqlite3=no'
HAVE_SQLITE3=no
SQLITE3_LIBS=
SQLITE3_CFLAGS=
if test "${with_sqlite3}" != "no"; then
   if test "${REALLY_ANDROID}" = "yes"; then

module_name=
ndk_module=sqlite3
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module sqlite3 requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  SQLITE3_CFLAGS="$SQLITE3_CFLAGS $module_cflags $module_includes"
  SQLITE3_LIBS="$SQLITE3_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  HAVE_SQLITE3=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    SQLITE3_CFLAGS="$ndk_import_includes $SQLITE3_CFLAGS"
  done
fi


     if test "$HAVE_SQLITE3" = "yes"; then
       SAVE_CFLAGS="$CFLAGS"
       CFLAGS="$CFLAGS $SQLITE3_CFLAGS"
       ac_fn_check_decl "$LINENO" "sqlite3_open_v2" "ac_cv_have_decl_sqlite3_open_v2" "#include <sqlite3.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_sqlite3_open_v2" = xyes
then :
  HAVE_SQLITE=yes
else $as_nop
  HAVE_SQLITE3=no
fi
       CFLAGS="$SAVE_CFLAGS"
     fi
   else
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sqlite3_open_v2 in -lsqlite3" >&5
printf %s "checking for sqlite3_open_v2 in -lsqlite3... " >&6; }
if test ${ac_cv_lib_sqlite3_sqlite3_open_v2+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lsqlite3  $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.  */
char sqlite3_open_v2 ();
int
main (void)
{
return sqlite3_open_v2 ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_sqlite3_sqlite3_open_v2=yes
else $as_nop
  ac_cv_lib_sqlite3_sqlite3_open_v2=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_open_v2" >&5
printf "%s\n" "$ac_cv_lib_sqlite3_sqlite3_open_v2" >&6; }
if test "x$ac_cv_lib_sqlite3_sqlite3_open_v2" = xyes
then :
  HAVE_SQLITE3=yes
else $as_nop
  HAVE_SQLITE3=no
fi

     if test "$HAVE_SQLITE3" = "yes"; then
       SQLITE3_LIBS=-lsqlite3
       LIBS="$SQLITE3_LIBS $LIBS"
       # Windows loads libsqlite dynamically
       if test "${opsys}" = "mingw32"; then
	  SQLITE3_LIBS=
       fi
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sqlite3_load_extension in -lsqlite3" >&5
printf %s "checking for sqlite3_load_extension in -lsqlite3... " >&6; }
if test ${ac_cv_lib_sqlite3_sqlite3_load_extension+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lsqlite3  $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.  */
char sqlite3_load_extension ();
int
main (void)
{
return sqlite3_load_extension ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_sqlite3_sqlite3_load_extension=yes
else $as_nop
  ac_cv_lib_sqlite3_sqlite3_load_extension=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_load_extension" >&5
printf "%s\n" "$ac_cv_lib_sqlite3_sqlite3_load_extension" >&6; }
if test "x$ac_cv_lib_sqlite3_sqlite3_load_extension" = xyes
then :
  HAVE_SQLITE3_LOAD_EXTENSION=yes
else $as_nop
  HAVE_SQLITE3_LOAD_EXTENSION=no
fi

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

printf "%s\n" "#define HAVE_SQLITE3_LOAD_EXTENSION 1" >>confdefs.h

       fi
     fi
  fi

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

printf "%s\n" "#define HAVE_SQLITE3 1" >>confdefs.h

  fi
fi




HAVE_IMAGEMAGICK=no
if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${HAVE_W32}" = "yes" || \
   test "${HAVE_BE_APP}" = "yes" || test "${window_system}" = "pgtk" || \
   test "${REALLY_ANDROID}" = "yes"; then
  if test "${with_imagemagick}" != "no"; then
    if test -n "$BREW"; then
      # Homebrew doesn't link ImageMagick 6 by default, so make sure
      # pkgconfig can find it.
      export PKG_CONFIG_PATH="$PKG_CONFIG_PATH$PATH_SEPARATOR`$BREW --prefix imagemagick@6 2>/dev/null`/lib/pkgconfig"
    fi

    if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "MagickWand >= 7"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  IMAGEMAGICK_CFLAGS="$IMAGEMAGICK_CFLAGS $module_cflags $module_includes"
  IMAGEMAGICK_LIBS="$IMAGEMAGICK_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    IMAGEMAGICK_CFLAGS="$ndk_import_includes $IMAGEMAGICK_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_IMAGEMAGICK=yes
else $as_nop
  HAVE_IMAGEMAGICK=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MagickWand >= 7" >&5
printf %s "checking for MagickWand >= 7... " >&6; }

if test -n "$IMAGEMAGICK_CFLAGS"; then
    pkg_cv_IMAGEMAGICK_CFLAGS="$IMAGEMAGICK_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"MagickWand >= 7\""; } >&5
  ($PKG_CONFIG --exists --print-errors "MagickWand >= 7") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_IMAGEMAGICK_CFLAGS=`$PKG_CONFIG --cflags "MagickWand >= 7" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$IMAGEMAGICK_LIBS"; then
    pkg_cv_IMAGEMAGICK_LIBS="$IMAGEMAGICK_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"MagickWand >= 7\""; } >&5
  ($PKG_CONFIG --exists --print-errors "MagickWand >= 7") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_IMAGEMAGICK_LIBS=`$PKG_CONFIG --libs "MagickWand >= 7" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        IMAGEMAGICK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "MagickWand >= 7" 2>&1`
        else
	        IMAGEMAGICK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "MagickWand >= 7" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$IMAGEMAGICK_PKG_ERRORS" >&5

	HAVE_IMAGEMAGICK=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_IMAGEMAGICK=no
else
	IMAGEMAGICK_CFLAGS=$pkg_cv_IMAGEMAGICK_CFLAGS
	IMAGEMAGICK_LIBS=$pkg_cv_IMAGEMAGICK_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	IMAGEMAGICK_CFLAGS=`printf "%s\n" "$IMAGEMAGICK_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_IMAGEMAGICK=yes
fi
fi
    if test $HAVE_IMAGEMAGICK = yes; then

printf "%s\n" "#define HAVE_IMAGEMAGICK7 1" >>confdefs.h

    else
       ## 6.3.5 is the earliest version known to work; see Bug#17339.
       ## 6.8.2 makes Emacs crash; see Bug#13867.
       if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "Wand >= 6.3.5 Wand != 6.8.2"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  IMAGEMAGICK_CFLAGS="$IMAGEMAGICK_CFLAGS $module_cflags $module_includes"
  IMAGEMAGICK_LIBS="$IMAGEMAGICK_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    IMAGEMAGICK_CFLAGS="$ndk_import_includes $IMAGEMAGICK_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_IMAGEMAGICK=yes
else $as_nop
  HAVE_IMAGEMAGICK=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Wand >= 6.3.5 Wand != 6.8.2" >&5
printf %s "checking for Wand >= 6.3.5 Wand != 6.8.2... " >&6; }

if test -n "$IMAGEMAGICK_CFLAGS"; then
    pkg_cv_IMAGEMAGICK_CFLAGS="$IMAGEMAGICK_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Wand >= 6.3.5 Wand != 6.8.2\""; } >&5
  ($PKG_CONFIG --exists --print-errors "Wand >= 6.3.5 Wand != 6.8.2") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_IMAGEMAGICK_CFLAGS=`$PKG_CONFIG --cflags "Wand >= 6.3.5 Wand != 6.8.2" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$IMAGEMAGICK_LIBS"; then
    pkg_cv_IMAGEMAGICK_LIBS="$IMAGEMAGICK_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Wand >= 6.3.5 Wand != 6.8.2\""; } >&5
  ($PKG_CONFIG --exists --print-errors "Wand >= 6.3.5 Wand != 6.8.2") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_IMAGEMAGICK_LIBS=`$PKG_CONFIG --libs "Wand >= 6.3.5 Wand != 6.8.2" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        IMAGEMAGICK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "Wand >= 6.3.5 Wand != 6.8.2" 2>&1`
        else
	        IMAGEMAGICK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "Wand >= 6.3.5 Wand != 6.8.2" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$IMAGEMAGICK_PKG_ERRORS" >&5

	HAVE_IMAGEMAGICK=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_IMAGEMAGICK=no
else
	IMAGEMAGICK_CFLAGS=$pkg_cv_IMAGEMAGICK_CFLAGS
	IMAGEMAGICK_LIBS=$pkg_cv_IMAGEMAGICK_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	IMAGEMAGICK_CFLAGS=`printf "%s\n" "$IMAGEMAGICK_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_IMAGEMAGICK=yes
fi
fi
    fi

    if test $HAVE_IMAGEMAGICK = yes; then
      OLD_CFLAGS=$CFLAGS
      OLD_LIBS=$LIBS
      CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
      LIBS="$IMAGEMAGICK_LIBS $LIBS"
      if test "$REALLY_ANDROID" != "yes"; then
	ac_fn_c_check_func "$LINENO" "MagickRelinquishMemory" "ac_cv_func_MagickRelinquishMemory"
if test "x$ac_cv_func_MagickRelinquishMemory" = xyes
then :
  printf "%s\n" "#define HAVE_MAGICKRELINQUISHMEMORY 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "MagickExportImagePixels" "ac_cv_func_MagickExportImagePixels"
if test "x$ac_cv_func_MagickExportImagePixels" = xyes
then :
  printf "%s\n" "#define HAVE_MAGICKEXPORTIMAGEPIXELS 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "MagickMergeImageLayers" "ac_cv_func_MagickMergeImageLayers"
if test "x$ac_cv_func_MagickMergeImageLayers" = xyes
then :
  printf "%s\n" "#define HAVE_MAGICKMERGEIMAGELAYERS 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "MagickAutoOrientImage" "ac_cv_func_MagickAutoOrientImage"
if test "x$ac_cv_func_MagickAutoOrientImage" = xyes
then :
  printf "%s\n" "#define HAVE_MAGICKAUTOORIENTIMAGE 1" >>confdefs.h

fi

      else
        # AC_CHECK_FUNCS doesn't work for Android dependencies because
	# they are built alongside Emacs.
	ac_fn_check_decl "$LINENO" "MagickRelinquishMemory" "ac_cv_have_decl_MagickRelinquishMemory" "#include <MagickWand/MagickWand.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_MagickRelinquishMemory" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_MAGICKRELINQUISHMEMORY $ac_have_decl" >>confdefs.h
ac_fn_check_decl "$LINENO" "MagickExportImagePixels" "ac_cv_have_decl_MagickExportImagePixels" "#include <MagickWand/MagickWand.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_MagickExportImagePixels" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_MAGICKEXPORTIMAGEPIXELS $ac_have_decl" >>confdefs.h
ac_fn_check_decl "$LINENO" "MagickMergeImageLayers" "ac_cv_have_decl_MagickMergeImageLayers" "#include <MagickWand/MagickWand.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_MagickMergeImageLayers" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_MAGICKMERGEIMAGELAYERS $ac_have_decl" >>confdefs.h
ac_fn_check_decl "$LINENO" "MagickAutoOrientImage" "ac_cv_have_decl_MagickAutoOrientImage" "#include <MagickWand/MagickWand.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_MagickAutoOrientImage" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_MAGICKAUTOORIENTIMAGE $ac_have_decl" >>confdefs.h

      fi
      CFLAGS=$OLD_CFLAGS
      LIBS=$OLD_LIBS
      # Check that ImageMagick links.  It does not link on Fedora 25
      # with './configure CC=clang', as pkg-config outputs flags like
      # -lomp that work for GCC but not Clang.
      if test "$ac_cv_func_MagickRelinquishMemory" != yes \
         && test "$REALLY_ANDROID" != "yes"; then
	HAVE_IMAGEMAGICK=no
      fi
    fi
    if test $HAVE_IMAGEMAGICK = yes; then

printf "%s\n" "#define HAVE_IMAGEMAGICK 1" >>confdefs.h

    else
      if test "${with_imagemagick}" != "no"; then
        as_fn_error $? "ImageMagick wanted, but it does not compile.  Maybe some library files are missing?" "$LINENO" 5;
      fi
      IMAGEMAGICK_CFLAGS=
      IMAGEMAGICK_LIBS=
    fi


  fi
fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo_a in -lanl" >&5
printf %s "checking for getaddrinfo_a in -lanl... " >&6; }
if test ${ac_cv_lib_anl_getaddrinfo_a+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lanl  $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.  */
char getaddrinfo_a ();
int
main (void)
{
return getaddrinfo_a ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_anl_getaddrinfo_a=yes
else $as_nop
  ac_cv_lib_anl_getaddrinfo_a=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_anl_getaddrinfo_a" >&5
printf "%s\n" "$ac_cv_lib_anl_getaddrinfo_a" >&6; }
if test "x$ac_cv_lib_anl_getaddrinfo_a" = xyes
then :
  HAVE_GETADDRINFO_A=yes
fi

if test "${HAVE_GETADDRINFO_A}" = "yes"; then

printf "%s\n" "#define HAVE_GETADDRINFO_A 1" >>confdefs.h

  GETADDRINFO_A_LIBS="-lanl"

fi

HAVE_GTK=no
GTK_OBJ=
gtk_term_header=$term_header
check_gtk2=no
gtk3_pkg_errors=
if test "${opsys}" != "mingw32"; then
  if test "${with_gtk3}" = "yes" || test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
    GLIB_REQUIRED=2.37.5
    if test "${window_system}" = "x11"; then
      GTK_REQUIRED=3.10
    else
      GTK_REQUIRED=3.22.23
    fi
    GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"

        if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "$GTK_MODULES"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  GTK_CFLAGS="$GTK_CFLAGS $module_cflags $module_includes"
  GTK_LIBS="$GTK_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    GTK_CFLAGS="$ndk_import_includes $GTK_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  pkg_check_gtk=yes
else $as_nop
  pkg_check_gtk=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
printf %s "checking for $GTK_MODULES... " >&6; }

if test -n "$GTK_CFLAGS"; then
    pkg_cv_GTK_CFLAGS="$GTK_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$GTK_MODULES\""; } >&5
  ($PKG_CONFIG --exists --print-errors "$GTK_MODULES") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$GTK_LIBS"; then
    pkg_cv_GTK_LIBS="$GTK_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$GTK_MODULES\""; } >&5
  ($PKG_CONFIG --exists --print-errors "$GTK_MODULES") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$GTK_MODULES" 2>&1`
        else
	        GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$GTK_MODULES" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$GTK_PKG_ERRORS" >&5

	pkg_check_gtk=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	pkg_check_gtk=no
else
	GTK_CFLAGS=$pkg_cv_GTK_CFLAGS
	GTK_LIBS=$pkg_cv_GTK_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	GTK_CFLAGS=`printf "%s\n" "$GTK_CFLAGS" | sed -e "$edit_cflags"`
        pkg_check_gtk=yes
fi
fi
    if test "$pkg_check_gtk" = "no" && test "$with_gtk3" = "yes"; then
       as_fn_error $? "$GTK_PKG_ERRORS" "$LINENO" 5
    fi
    if test "$pkg_check_gtk" = "yes"; then

printf "%s\n" "#define HAVE_GTK3 1" >>confdefs.h

       GTK_OBJ=emacsgtkfixed.o
       gtk_term_header=gtkutil.h
       USE_GTK_TOOLKIT="GTK3"
       if test "x$ac_enable_gtk_deprecation_warnings" = x; then

printf "%s\n" "#define GDK_DISABLE_DEPRECATION_WARNINGS 1" >>confdefs.h


printf "%s\n" "#define GLIB_DISABLE_DEPRECATION_WARNINGS 1" >>confdefs.h

       fi
    else
       check_gtk2=yes
       gtk3_pkg_errors="$GTK_PKG_ERRORS "
    fi
  fi

  if test "${with_gtk2}" = "yes" || test "$check_gtk2" = "yes"; then
    GLIB_REQUIRED=2.28
    GTK_REQUIRED=2.24
    GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"

        if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "$GTK_MODULES"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  GTK_CFLAGS="$GTK_CFLAGS $module_cflags $module_includes"
  GTK_LIBS="$GTK_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    GTK_CFLAGS="$ndk_import_includes $GTK_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  pkg_check_gtk=yes
else $as_nop
  pkg_check_gtk=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
printf %s "checking for $GTK_MODULES... " >&6; }

if test -n "$GTK_CFLAGS"; then
    pkg_cv_GTK_CFLAGS="$GTK_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$GTK_MODULES\""; } >&5
  ($PKG_CONFIG --exists --print-errors "$GTK_MODULES") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$GTK_LIBS"; then
    pkg_cv_GTK_LIBS="$GTK_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$GTK_MODULES\""; } >&5
  ($PKG_CONFIG --exists --print-errors "$GTK_MODULES") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$GTK_MODULES" 2>&1`
        else
	        GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$GTK_MODULES" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$GTK_PKG_ERRORS" >&5

	pkg_check_gtk=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	pkg_check_gtk=no
else
	GTK_CFLAGS=$pkg_cv_GTK_CFLAGS
	GTK_LIBS=$pkg_cv_GTK_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	GTK_CFLAGS=`printf "%s\n" "$GTK_CFLAGS" | sed -e "$edit_cflags"`
        pkg_check_gtk=yes
fi
fi
    if test "$pkg_check_gtk" = "no" &&
       { test "$with_gtk" = yes || test "$with_gtk2" = "yes"; }
    then
      as_fn_error $? "$gtk3_pkg_errors$GTK_PKG_ERRORS" "$LINENO" 5
    fi
    test "$pkg_check_gtk" = "yes" && USE_GTK_TOOLKIT="GTK2"
  fi
fi

OLD_CFLAGS=$CFLAGS
OLD_LIBS=$LIBS

if test x"$pkg_check_gtk" = xyes; then


  CFLAGS="$CFLAGS $GTK_CFLAGS"
  LIBS="$GTK_LIBS $LIBS"
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether GTK compiles" >&5
printf %s "checking whether GTK compiles... " >&6; }
if test ${emacs_cv_gtk_compiles+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
/* Check the Gtk and Glib APIs.  */
	 #include <gtk/gtk.h>
	 #include <glib-object.h>
	 static void
	 callback (GObject *go, GParamSpec *spec, gpointer user_data)
	 {}

int
main (void)
{

	 GtkSettings *gs = 0;
	 /* Use G_CALLBACK to make sure function pointers can be cast to void *;
	    strict C prohibits this.  Use gtk_main_iteration to test that the
	    libraries are there.  */
	 if (g_signal_handler_find (G_OBJECT (gs), G_SIGNAL_MATCH_FUNC,
				    0, 0, 0, G_CALLBACK (callback), 0))
	   gtk_main_iteration ();

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  emacs_cv_gtk_compiles=yes
else $as_nop
  emacs_cv_gtk_compiles=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_gtk_compiles" >&5
printf "%s\n" "$emacs_cv_gtk_compiles" >&6; }
  if test "${emacs_cv_gtk_compiles}" != "yes"; then
    GTK_OBJ=
    if test "$USE_X_TOOLKIT" != "maybe"; then
      as_fn_error $? "Gtk+ wanted, but it does not compile, see config.log.  Maybe some x11-devel files missing?" "$LINENO" 5;
    fi
  else
    C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
    HAVE_GTK=yes

printf "%s\n" "#define USE_GTK 1" >>confdefs.h

    GTK_OBJ="gtkutil.o $GTK_OBJ"
    term_header=$gtk_term_header
    USE_X_TOOLKIT=none
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with
       closing open displays.  This is no problem if you just use
       one display, but if you use more than one and close one of them
       Emacs may crash.
       See https://gitlab.gnome.org/GNOME/gtk/issues/221" >&5
printf "%s\n" "$as_me: WARNING: Your version of Gtk+ will have problems with
       closing open displays.  This is no problem if you just use
       one display, but if you use more than one and close one of them
       Emacs may crash.
       See https://gitlab.gnome.org/GNOME/gtk/issues/221" >&2;}
  fi

fi



if test "${HAVE_GTK}" = "yes"; then

      if test "$with_toolkit_scroll_bars" != no; then
    with_toolkit_scroll_bars=yes
  fi

  term_header=gtkutil.h

  if test "${USE_GTK_TOOLKIT}" = GTK2; then

                    HAVE_GTK_FILE_SELECTION=no
    ac_fn_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default
#include <gtk/gtk.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = xyes
then :
  HAVE_GTK_FILE_SELECTION=yes
else $as_nop
  HAVE_GTK_FILE_SELECTION=no
fi
    if test "$HAVE_GTK_FILE_SELECTION" = yes; then
      ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new"
if test "x$ac_cv_func_gtk_file_selection_new" = xyes
then :
  printf "%s\n" "#define HAVE_GTK_FILE_SELECTION_NEW 1" >>confdefs.h

fi

    fi

        ac_fn_c_check_func "$LINENO" "gtk_window_set_has_resize_grip" "ac_cv_func_gtk_window_set_has_resize_grip"
if test "x$ac_cv_func_gtk_window_set_has_resize_grip" = xyes
then :
  printf "%s\n" "#define HAVE_GTK_WINDOW_SET_HAS_RESIZE_GRIP 1" >>confdefs.h

fi

  fi
fi

CFLAGS=$OLD_CFLAGS
LIBS=$OLD_LIBS

PGTK_OBJ=
PGTK_LIBS=
if test "$window_system" = "pgtk"; then
  PGTK_OBJ="pgtkfns.o pgtkterm.o pgtkselect.o pgtkmenu.o pgtkim.o xsettings.o"
  PGTK_LIBS="$GTK_LIBS"
fi



ac_fn_c_check_func "$LINENO" "malloc_trim" "ac_cv_func_malloc_trim"
if test "x$ac_cv_func_malloc_trim" = xyes
then :
  printf "%s\n" "#define HAVE_MALLOC_TRIM 1" >>confdefs.h

fi


HAVE_DBUS=no
DBUS_OBJ=
if test "${with_dbus}" = "yes"; then
   if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "dbus-1 >= 1.0"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  DBUS_CFLAGS="$DBUS_CFLAGS $module_cflags $module_includes"
  DBUS_LIBS="$DBUS_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    DBUS_CFLAGS="$ndk_import_includes $DBUS_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_DBUS=yes
else $as_nop
  HAVE_DBUS=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5
printf %s "checking for dbus-1 >= 1.0... " >&6; }

if test -n "$DBUS_CFLAGS"; then
    pkg_cv_DBUS_CFLAGS="$DBUS_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1 >= 1.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "dbus-1 >= 1.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$DBUS_LIBS"; then
    pkg_cv_DBUS_LIBS="$DBUS_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1 >= 1.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "dbus-1 >= 1.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        DBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "dbus-1 >= 1.0" 2>&1`
        else
	        DBUS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "dbus-1 >= 1.0" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$DBUS_PKG_ERRORS" >&5

	HAVE_DBUS=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_DBUS=no
else
	DBUS_CFLAGS=$pkg_cv_DBUS_CFLAGS
	DBUS_LIBS=$pkg_cv_DBUS_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	DBUS_CFLAGS=`printf "%s\n" "$DBUS_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_DBUS=yes
fi
fi
   if test "$HAVE_DBUS" = yes; then

printf "%s\n" "#define HAVE_DBUS 1" >>confdefs.h

                    OLD_LIBS=$LIBS
     LIBS="$LIBS $DBUS_LIBS"
     ac_fn_c_check_func "$LINENO" "dbus_watch_get_unix_fd" "ac_cv_func_dbus_watch_get_unix_fd"
if test "x$ac_cv_func_dbus_watch_get_unix_fd" = xyes
then :
  printf "%s\n" "#define HAVE_DBUS_WATCH_GET_UNIX_FD 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "dbus_type_is_valid" "ac_cv_func_dbus_type_is_valid"
if test "x$ac_cv_func_dbus_type_is_valid" = xyes
then :
  printf "%s\n" "#define HAVE_DBUS_TYPE_IS_VALID 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "dbus_validate_bus_name" "ac_cv_func_dbus_validate_bus_name"
if test "x$ac_cv_func_dbus_validate_bus_name" = xyes
then :
  printf "%s\n" "#define HAVE_DBUS_VALIDATE_BUS_NAME 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "dbus_validate_path" "ac_cv_func_dbus_validate_path"
if test "x$ac_cv_func_dbus_validate_path" = xyes
then :
  printf "%s\n" "#define HAVE_DBUS_VALIDATE_PATH 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "dbus_validate_interface" "ac_cv_func_dbus_validate_interface"
if test "x$ac_cv_func_dbus_validate_interface" = xyes
then :
  printf "%s\n" "#define HAVE_DBUS_VALIDATE_INTERFACE 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "dbus_validate_member" "ac_cv_func_dbus_validate_member"
if test "x$ac_cv_func_dbus_validate_member" = xyes
then :
  printf "%s\n" "#define HAVE_DBUS_VALIDATE_MEMBER 1" >>confdefs.h

fi

     LIBS=$OLD_LIBS
     DBUS_OBJ=dbusbind.o
   fi
fi




HAVE_GSETTINGS=no
if test "${HAVE_X11}" = "yes" -o "${window_system}" = "pgtk" && test "${with_gsettings}" = "yes"; then
   if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "gio-2.0 >= 2.26"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  GSETTINGS_CFLAGS="$GSETTINGS_CFLAGS $module_cflags $module_includes"
  GSETTINGS_LIBS="$GSETTINGS_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    GSETTINGS_CFLAGS="$ndk_import_includes $GSETTINGS_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_GSETTINGS=yes
else $as_nop
  HAVE_GSETTINGS=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.26" >&5
printf %s "checking for gio-2.0 >= 2.26... " >&6; }

if test -n "$GSETTINGS_CFLAGS"; then
    pkg_cv_GSETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0 >= 2.26\""; } >&5
  ($PKG_CONFIG --exists --print-errors "gio-2.0 >= 2.26") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_GSETTINGS_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 >= 2.26" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$GSETTINGS_LIBS"; then
    pkg_cv_GSETTINGS_LIBS="$GSETTINGS_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0 >= 2.26\""; } >&5
  ($PKG_CONFIG --exists --print-errors "gio-2.0 >= 2.26") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_GSETTINGS_LIBS=`$PKG_CONFIG --libs "gio-2.0 >= 2.26" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        GSETTINGS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gio-2.0 >= 2.26" 2>&1`
        else
	        GSETTINGS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gio-2.0 >= 2.26" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$GSETTINGS_PKG_ERRORS" >&5

	HAVE_GSETTINGS=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_GSETTINGS=no
else
	GSETTINGS_CFLAGS=$pkg_cv_GSETTINGS_CFLAGS
	GSETTINGS_LIBS=$pkg_cv_GSETTINGS_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	GSETTINGS_CFLAGS=`printf "%s\n" "$GSETTINGS_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_GSETTINGS=yes
fi
fi
   if test "$HAVE_GSETTINGS" = "yes"; then
      old_CFLAGS=$CFLAGS
      CFLAGS="$CFLAGS $GSETTINGS_CFLAGS"
      old_LIBS=$LIBS
      LIBS="$LIBS $GSETTINGS_LIBS"
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether GSettings is in gio" >&5
printf %s "checking whether GSettings is in gio... " >&6; }
if test ${emacs_cv_gsettings_in_gio+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
/* Check that gsettings really is present.  */
	     #include <glib-object.h>
	     #include <gio/gio.h>

int
main (void)
{

	       GSettings *settings;
	       GVariant *val = g_settings_get_value (settings, "");

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  emacs_cv_gsettings_in_gio=yes
else $as_nop
  emacs_cv_gsettings_in_gio=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_gsettings_in_gio" >&5
printf "%s\n" "$emacs_cv_gsettings_in_gio" >&6; }

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

printf "%s\n" "#define HAVE_GSETTINGS 1" >>confdefs.h

	SETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
	SETTINGS_LIBS="$GSETTINGS_LIBS"
	test "$with_gconf" = "yes" || with_gconf=no
      fi
      CFLAGS=$old_CFLAGS
      LIBS=$old_LIBS
   fi
fi


HAVE_GCONF=no
if test "${HAVE_X11}" = "yes" -o "${window_system}" = "pgtk" && test "${with_gconf}" != "no"; then
   if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "gconf-2.0 >= 2.13"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  GCONF_CFLAGS="$GCONF_CFLAGS $module_cflags $module_includes"
  GCONF_LIBS="$GCONF_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    GCONF_CFLAGS="$ndk_import_includes $GCONF_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_GCONF=yes
else $as_nop
  HAVE_GCONF=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5
printf %s "checking for gconf-2.0 >= 2.13... " >&6; }

if test -n "$GCONF_CFLAGS"; then
    pkg_cv_GCONF_CFLAGS="$GCONF_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gconf-2.0 >= 2.13\""; } >&5
  ($PKG_CONFIG --exists --print-errors "gconf-2.0 >= 2.13") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.13" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$GCONF_LIBS"; then
    pkg_cv_GCONF_LIBS="$GCONF_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gconf-2.0 >= 2.13\""; } >&5
  ($PKG_CONFIG --exists --print-errors "gconf-2.0 >= 2.13") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.13" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        GCONF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gconf-2.0 >= 2.13" 2>&1`
        else
	        GCONF_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gconf-2.0 >= 2.13" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$GCONF_PKG_ERRORS" >&5

	HAVE_GCONF=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_GCONF=no
else
	GCONF_CFLAGS=$pkg_cv_GCONF_CFLAGS
	GCONF_LIBS=$pkg_cv_GCONF_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	GCONF_CFLAGS=`printf "%s\n" "$GCONF_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_GCONF=yes
fi
fi
   if test "$HAVE_GCONF" = yes; then

printf "%s\n" "#define HAVE_GCONF 1" >>confdefs.h

            SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS"
      SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS"
   fi
fi

if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then
    if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "gobject-2.0 >= 2.0"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  GOBJECT_CFLAGS="$GOBJECT_CFLAGS $module_cflags $module_includes"
  GOBJECT_LIBS="$GOBJECT_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    GOBJECT_CFLAGS="$ndk_import_includes $GOBJECT_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_GOBJECT=yes
else $as_nop
  HAVE_GOBJECT=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gobject-2.0 >= 2.0" >&5
printf %s "checking for gobject-2.0 >= 2.0... " >&6; }

if test -n "$GOBJECT_CFLAGS"; then
    pkg_cv_GOBJECT_CFLAGS="$GOBJECT_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-2.0 >= 2.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "gobject-2.0 >= 2.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_GOBJECT_CFLAGS=`$PKG_CONFIG --cflags "gobject-2.0 >= 2.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$GOBJECT_LIBS"; then
    pkg_cv_GOBJECT_LIBS="$GOBJECT_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-2.0 >= 2.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "gobject-2.0 >= 2.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_GOBJECT_LIBS=`$PKG_CONFIG --libs "gobject-2.0 >= 2.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        GOBJECT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gobject-2.0 >= 2.0" 2>&1`
        else
	        GOBJECT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gobject-2.0 >= 2.0" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$GOBJECT_PKG_ERRORS" >&5

	HAVE_GOBJECT=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_GOBJECT=no
else
	GOBJECT_CFLAGS=$pkg_cv_GOBJECT_CFLAGS
	GOBJECT_LIBS=$pkg_cv_GOBJECT_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	GOBJECT_CFLAGS=`printf "%s\n" "$GOBJECT_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_GOBJECT=yes
fi
fi
    if test "$HAVE_GOBJECT" = "yes"; then
       SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GOBJECT_CFLAGS"
       SETTINGS_LIBS="$SETTINGS_LIBS $GOBJECT_LIBS"
    fi
    SAVE_CFLAGS="$CFLAGS"
    SAVE_LIBS="$LIBS"
    CFLAGS="$SETTINGS_CFLAGS $CFLAGS"
    LIBS="$SETTINGS_LIBS $LIBS"
    CFLAGS="$SAVE_CFLAGS"
    LIBS="$SAVE_LIBS"
fi



USE_STARTUP_NOTIFICATION=no
if test "${HAVE_GTK}" = "yes"; then
    USE_STARTUP_NOTIFICATION=yes
fi


HAVE_LIBSELINUX=no
LIBSELINUX_LIBS=
LIBSELINUX_CFLAGS=
if test "${with_selinux}" = "yes"; then
   if test "$REALLY_ANDROID" = "yes"; then

module_name=
ndk_module=libselinux
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module libselinux requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  LIBSELINUX_CFLAGS="$LIBSELINUX_CFLAGS $module_cflags $module_includes"
  LIBSELINUX_LIBS="$LIBSELINUX_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  HAVE_LIBSELINUX=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    LIBSELINUX_CFLAGS="$ndk_import_includes $LIBSELINUX_CFLAGS"
  done
fi

   else
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5
printf %s "checking for lgetfilecon in -lselinux... " >&6; }
if test ${ac_cv_lib_selinux_lgetfilecon+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lselinux  $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.  */
char lgetfilecon ();
int
main (void)
{
return lgetfilecon ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_selinux_lgetfilecon=yes
else $as_nop
  ac_cv_lib_selinux_lgetfilecon=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5
printf "%s\n" "$ac_cv_lib_selinux_lgetfilecon" >&6; }
if test "x$ac_cv_lib_selinux_lgetfilecon" = xyes
then :
  HAVE_LIBSELINUX=yes
else $as_nop
  HAVE_LIBSELINUX=no
fi

   fi
   if test "$HAVE_LIBSELINUX" = yes; then

printf "%s\n" "#define HAVE_LIBSELINUX 1" >>confdefs.h

      if test "$REALLY_ANDROID" != "yes"; then
        LIBSELINUX_LIBS=-lselinux
      fi
   fi
fi



HAVE_GNUTLS=no
if test "${with_gnutls}" != "no" ; then
  if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "gnutls >= 2.12.2"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  LIBGNUTLS_CFLAGS="$LIBGNUTLS_CFLAGS $module_cflags $module_includes"
  LIBGNUTLS_LIBS="$LIBGNUTLS_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    LIBGNUTLS_CFLAGS="$ndk_import_includes $LIBGNUTLS_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_GNUTLS=yes
else $as_nop
  HAVE_GNUTLS=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.12.2" >&5
printf %s "checking for gnutls >= 2.12.2... " >&6; }

if test -n "$LIBGNUTLS_CFLAGS"; then
    pkg_cv_LIBGNUTLS_CFLAGS="$LIBGNUTLS_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnutls >= 2.12.2\""; } >&5
  ($PKG_CONFIG --exists --print-errors "gnutls >= 2.12.2") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBGNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls >= 2.12.2" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$LIBGNUTLS_LIBS"; then
    pkg_cv_LIBGNUTLS_LIBS="$LIBGNUTLS_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnutls >= 2.12.2\""; } >&5
  ($PKG_CONFIG --exists --print-errors "gnutls >= 2.12.2") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBGNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls >= 2.12.2" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        LIBGNUTLS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gnutls >= 2.12.2" 2>&1`
        else
	        LIBGNUTLS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gnutls >= 2.12.2" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$LIBGNUTLS_PKG_ERRORS" >&5

	HAVE_GNUTLS=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_GNUTLS=no
else
	LIBGNUTLS_CFLAGS=$pkg_cv_LIBGNUTLS_CFLAGS
	LIBGNUTLS_LIBS=$pkg_cv_LIBGNUTLS_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	LIBGNUTLS_CFLAGS=`printf "%s\n" "$LIBGNUTLS_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_GNUTLS=yes
fi
fi
  if test "${HAVE_GNUTLS}" = "yes"; then

printf "%s\n" "#define HAVE_GNUTLS 1" >>confdefs.h

  fi

  # Windows loads GnuTLS dynamically
  if test "${opsys}" = "mingw32"; then
    LIBGNUTLS_LIBS=
  fi
fi




HAVE_LIBSYSTEMD=no
if test "${with_libsystemd}" = "yes" ; then
        if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "libsystemd >= 222"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  LIBSYSTEMD_CFLAGS="$LIBSYSTEMD_CFLAGS $module_cflags $module_includes"
  LIBSYSTEMD_LIBS="$LIBSYSTEMD_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    LIBSYSTEMD_CFLAGS="$ndk_import_includes $LIBSYSTEMD_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_LIBSYSTEMD=yes
else $as_nop
  HAVE_LIBSYSTEMD=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsystemd >= 222" >&5
printf %s "checking for libsystemd >= 222... " >&6; }

if test -n "$LIBSYSTEMD_CFLAGS"; then
    pkg_cv_LIBSYSTEMD_CFLAGS="$LIBSYSTEMD_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 222\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libsystemd >= 222") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBSYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd >= 222" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$LIBSYSTEMD_LIBS"; then
    pkg_cv_LIBSYSTEMD_LIBS="$LIBSYSTEMD_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 222\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libsystemd >= 222") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBSYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd >= 222" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        LIBSYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd >= 222" 2>&1`
        else
	        LIBSYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd >= 222" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$LIBSYSTEMD_PKG_ERRORS" >&5

	HAVE_LIBSYSTEMD=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_LIBSYSTEMD=no
else
	LIBSYSTEMD_CFLAGS=$pkg_cv_LIBSYSTEMD_CFLAGS
	LIBSYSTEMD_LIBS=$pkg_cv_LIBSYSTEMD_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	LIBSYSTEMD_CFLAGS=`printf "%s\n" "$LIBSYSTEMD_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_LIBSYSTEMD=yes
fi
fi
  if test "${HAVE_LIBSYSTEMD}" = "yes"; then

printf "%s\n" "#define HAVE_LIBSYSTEMD 1" >>confdefs.h

  fi
fi




HAVE_TREE_SITTER=no
TREE_SITTER_OBJ=
NEED_DYNLIB=no

if test "${with_tree_sitter}" != "no"; then
                    if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "tree-sitter >= 0.20.2"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  TREE_SITTER_CFLAGS="$TREE_SITTER_CFLAGS $module_cflags $module_includes"
  TREE_SITTER_LIBS="$TREE_SITTER_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    TREE_SITTER_CFLAGS="$ndk_import_includes $TREE_SITTER_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_TREE_SITTER=yes
else $as_nop
  HAVE_TREE_SITTER=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tree-sitter >= 0.20.2" >&5
printf %s "checking for tree-sitter >= 0.20.2... " >&6; }

if test -n "$TREE_SITTER_CFLAGS"; then
    pkg_cv_TREE_SITTER_CFLAGS="$TREE_SITTER_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"tree-sitter >= 0.20.2\""; } >&5
  ($PKG_CONFIG --exists --print-errors "tree-sitter >= 0.20.2") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_TREE_SITTER_CFLAGS=`$PKG_CONFIG --cflags "tree-sitter >= 0.20.2" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$TREE_SITTER_LIBS"; then
    pkg_cv_TREE_SITTER_LIBS="$TREE_SITTER_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"tree-sitter >= 0.20.2\""; } >&5
  ($PKG_CONFIG --exists --print-errors "tree-sitter >= 0.20.2") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_TREE_SITTER_LIBS=`$PKG_CONFIG --libs "tree-sitter >= 0.20.2" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        TREE_SITTER_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "tree-sitter >= 0.20.2" 2>&1`
        else
	        TREE_SITTER_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "tree-sitter >= 0.20.2" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$TREE_SITTER_PKG_ERRORS" >&5

	HAVE_TREE_SITTER=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_TREE_SITTER=no
else
	TREE_SITTER_CFLAGS=$pkg_cv_TREE_SITTER_CFLAGS
	TREE_SITTER_LIBS=$pkg_cv_TREE_SITTER_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	TREE_SITTER_CFLAGS=`printf "%s\n" "$TREE_SITTER_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_TREE_SITTER=yes
fi
fi
  if test "${HAVE_TREE_SITTER}" = yes; then

printf "%s\n" "#define HAVE_TREE_SITTER 1" >>confdefs.h

    NEED_DYNLIB=yes
  else
    if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "tree-sitter >= 0.6.3"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  TREE_SITTER_CFLAGS="$TREE_SITTER_CFLAGS $module_cflags $module_includes"
  TREE_SITTER_LIBS="$TREE_SITTER_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    TREE_SITTER_CFLAGS="$ndk_import_includes $TREE_SITTER_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_TREE_SITTER=yes
else $as_nop
  HAVE_TREE_SITTER=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tree-sitter >= 0.6.3" >&5
printf %s "checking for tree-sitter >= 0.6.3... " >&6; }

if test -n "$TREE_SITTER_CFLAGS"; then
    pkg_cv_TREE_SITTER_CFLAGS="$TREE_SITTER_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"tree-sitter >= 0.6.3\""; } >&5
  ($PKG_CONFIG --exists --print-errors "tree-sitter >= 0.6.3") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_TREE_SITTER_CFLAGS=`$PKG_CONFIG --cflags "tree-sitter >= 0.6.3" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$TREE_SITTER_LIBS"; then
    pkg_cv_TREE_SITTER_LIBS="$TREE_SITTER_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"tree-sitter >= 0.6.3\""; } >&5
  ($PKG_CONFIG --exists --print-errors "tree-sitter >= 0.6.3") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_TREE_SITTER_LIBS=`$PKG_CONFIG --libs "tree-sitter >= 0.6.3" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        TREE_SITTER_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "tree-sitter >= 0.6.3" 2>&1`
        else
	        TREE_SITTER_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "tree-sitter >= 0.6.3" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$TREE_SITTER_PKG_ERRORS" >&5

	HAVE_TREE_SITTER=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_TREE_SITTER=no
else
	TREE_SITTER_CFLAGS=$pkg_cv_TREE_SITTER_CFLAGS
	TREE_SITTER_LIBS=$pkg_cv_TREE_SITTER_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	TREE_SITTER_CFLAGS=`printf "%s\n" "$TREE_SITTER_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_TREE_SITTER=yes
fi
fi
    if test "${HAVE_TREE_SITTER}" = yes; then
      OLD_CFLAGS=$CFLAGS
      OLD_LIBS=$LIBS
      CFLAGS="$CFLAGS $TREE_SITTER_CFLAGS"
      LIBS="$TREE_SITTER_LIBS $LIBS"
      ac_fn_c_check_func "$LINENO" "ts_set_allocator" "ac_cv_func_ts_set_allocator"
if test "x$ac_cv_func_ts_set_allocator" = xyes
then :
  printf "%s\n" "#define HAVE_TS_SET_ALLOCATOR 1" >>confdefs.h

fi

      CFLAGS=$OLD_CFLAGS
      LIBS=$OLD_LIBS
      if test "$ac_cv_func_ts_set_allocator" = yes; then

printf "%s\n" "#define HAVE_TREE_SITTER 1" >>confdefs.h

	NEED_DYNLIB=yes
      else
        as_fn_error $? "Tree-sitter library exists but its version is too old" "$LINENO" 5;
        TREE_SITTER_CFLAGS=
        TREE_SITTER_LIBS=
      fi
    fi
  fi

  # Windows loads tree-sitter dynamically
  if test "${opsys}" = "mingw32"; then
    TREE_SITTER_LIBS=
  fi
fi




NOTIFY_OBJ=
NOTIFY_SUMMARY=no

case $with_file_notification,$opsys in
  w32,cygwin)
    as_fn_error $? "'--with-file-notification=w32' was specified, but
    this is only supported on MS-Windows native and MinGW32 builds.
    Consider using gfile instead." "$LINENO" 5
    ;;
  w32,* | yes,mingw32)
    ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
if test "x$ac_cv_header_windows_h" = xyes
then :

fi

    if test "$ac_cv_header_windows_h" = yes ; then

printf "%s\n" "#define HAVE_W32NOTIFY 1" >>confdefs.h

       NOTIFY_OBJ=w32notify.o
       NOTIFY_SUMMARY="yes (w32)"
    fi ;;
esac

case $with_file_notification,$NOTIFY_OBJ in
  inotify, | yes,)
    ac_fn_c_check_header_compile "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_inotify_h" = xyes
then :

fi

    if test "$ac_cv_header_sys_inotify_h" = yes ; then
	ac_fn_c_check_func "$LINENO" "inotify_init" "ac_cv_func_inotify_init"
if test "x$ac_cv_func_inotify_init" = xyes
then :
  printf "%s\n" "#define HAVE_INOTIFY_INIT 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "inotify_init1" "ac_cv_func_inotify_init1"
if test "x$ac_cv_func_inotify_init1" = xyes
then :
  printf "%s\n" "#define HAVE_INOTIFY_INIT1 1" >>confdefs.h

fi

	if test "$ac_cv_func_inotify_init" = yes; then

printf "%s\n" "#define HAVE_INOTIFY 1" >>confdefs.h

	  NOTIFY_OBJ=inotify.o
	  NOTIFY_SUMMARY="yes (inotify)"
       fi
    fi ;;
esac

if test "$opsys" != "haiku"
then :

   case $with_file_notification,$NOTIFY_OBJ in
   kqueue,* | yes,)
     if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "libkqueue"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  KQUEUE_CFLAGS="$KQUEUE_CFLAGS $module_cflags $module_includes"
  KQUEUE_LIBS="$KQUEUE_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    KQUEUE_CFLAGS="$ndk_import_includes $KQUEUE_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_KQUEUE=yes
else $as_nop
  HAVE_KQUEUE=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libkqueue" >&5
printf %s "checking for libkqueue... " >&6; }

if test -n "$KQUEUE_CFLAGS"; then
    pkg_cv_KQUEUE_CFLAGS="$KQUEUE_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libkqueue\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libkqueue") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_KQUEUE_CFLAGS=`$PKG_CONFIG --cflags "libkqueue" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$KQUEUE_LIBS"; then
    pkg_cv_KQUEUE_LIBS="$KQUEUE_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libkqueue\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libkqueue") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_KQUEUE_LIBS=`$PKG_CONFIG --libs "libkqueue" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        KQUEUE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libkqueue" 2>&1`
        else
	        KQUEUE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libkqueue" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$KQUEUE_PKG_ERRORS" >&5

	HAVE_KQUEUE=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_KQUEUE=no
else
	KQUEUE_CFLAGS=$pkg_cv_KQUEUE_CFLAGS
	KQUEUE_LIBS=$pkg_cv_KQUEUE_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	KQUEUE_CFLAGS=`printf "%s\n" "$KQUEUE_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_KQUEUE=yes
fi
fi
     if test "$HAVE_KQUEUE" = "yes"; then

printf "%s\n" "#define HAVE_KQUEUE 1" >>confdefs.h

	CPPFLAGS="$CPPFLAGS -I/usr/include/kqueue"
	NOTIFY_CFLAGS=$KQUEUE_CFLAGS
	NOTIFY_LIBS=$KQUEUE_LIBS
	NOTIFY_OBJ=kqueue.o
	NOTIFY_SUMMARY="yes -lkqueue"
     else
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing kqueue" >&5
printf %s "checking for library containing kqueue... " >&6; }
if test ${ac_cv_search_kqueue+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  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.  */
char kqueue ();
int
main (void)
{
return kqueue ();
  ;
  return 0;
}
_ACEOF
for ac_lib in ''
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_kqueue=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext
  if test ${ac_cv_search_kqueue+y}
then :
  break
fi
done
if test ${ac_cv_search_kqueue+y}
then :

else $as_nop
  ac_cv_search_kqueue=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kqueue" >&5
printf "%s\n" "$ac_cv_search_kqueue" >&6; }
ac_res=$ac_cv_search_kqueue
if test "$ac_res" != no
then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"

fi

	if test "$ac_cv_search_kqueue" != no; then

printf "%s\n" "#define HAVE_KQUEUE 1" >>confdefs.h

	  NOTIFY_OBJ=kqueue.o
	  NOTIFY_SUMMARY="yes (kqueue)"
	fi
     fi ;;
 esac
fi

case $with_file_notification,$NOTIFY_OBJ in
  gfile,* | yes,)
    if test "${HAVE_NS}" = yes; then
       as_fn_error $? "'--with-file-notification=gfile' is not supported in NextStep builds.
Consider kqueue instead." "$LINENO" 5
    else
       if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "gio-2.0 >= 2.24"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  GFILENOTIFY_CFLAGS="$GFILENOTIFY_CFLAGS $module_cflags $module_includes"
  GFILENOTIFY_LIBS="$GFILENOTIFY_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    GFILENOTIFY_CFLAGS="$ndk_import_includes $GFILENOTIFY_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_GFILENOTIFY=yes
else $as_nop
  HAVE_GFILENOTIFY=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.24" >&5
printf %s "checking for gio-2.0 >= 2.24... " >&6; }

if test -n "$GFILENOTIFY_CFLAGS"; then
    pkg_cv_GFILENOTIFY_CFLAGS="$GFILENOTIFY_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0 >= 2.24\""; } >&5
  ($PKG_CONFIG --exists --print-errors "gio-2.0 >= 2.24") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_GFILENOTIFY_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 >= 2.24" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$GFILENOTIFY_LIBS"; then
    pkg_cv_GFILENOTIFY_LIBS="$GFILENOTIFY_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0 >= 2.24\""; } >&5
  ($PKG_CONFIG --exists --print-errors "gio-2.0 >= 2.24") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_GFILENOTIFY_LIBS=`$PKG_CONFIG --libs "gio-2.0 >= 2.24" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        GFILENOTIFY_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gio-2.0 >= 2.24" 2>&1`
        else
	        GFILENOTIFY_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gio-2.0 >= 2.24" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$GFILENOTIFY_PKG_ERRORS" >&5

	HAVE_GFILENOTIFY=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_GFILENOTIFY=no
else
	GFILENOTIFY_CFLAGS=$pkg_cv_GFILENOTIFY_CFLAGS
	GFILENOTIFY_LIBS=$pkg_cv_GFILENOTIFY_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	GFILENOTIFY_CFLAGS=`printf "%s\n" "$GFILENOTIFY_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_GFILENOTIFY=yes
fi
fi
       if test "$HAVE_GFILENOTIFY" = "yes"; then

printf "%s\n" "#define HAVE_GFILENOTIFY 1" >>confdefs.h

	  NOTIFY_CFLAGS=$GFILENOTIFY_CFLAGS
	  NOTIFY_LIBS=$GFILENOTIFY_LIBS
	  NOTIFY_OBJ=gfilenotify.o
	  NOTIFY_SUMMARY="yes -lgio (gfile)"
       fi
    fi ;;
esac

case $with_file_notification,$NOTIFY_OBJ in
  yes,* | no,* | *,?*) ;;
  *) as_fn_error $? "File notification '$with_file_notification' requested but requirements not found." "$LINENO" 5 ;;
esac

if test -n "$NOTIFY_OBJ"; then

printf "%s\n" "#define USE_FILE_NOTIFY 1" >>confdefs.h

fi




HAVE_XAW3D=no
LUCID_LIBW=
if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
  if test "$with_xaw3d" != no; then
    if test ${emacs_cv_xaw3d+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <X11/Intrinsic.h>
#include <X11/Xaw3d/Simple.h>
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5
printf %s "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; }
if test ${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lXaw3d  $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.  */
char XawScrollbarSetThumb ();
int
main (void)
{
return XawScrollbarSetThumb ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
else $as_nop
  ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
printf "%s\n" "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; }
if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = xyes
then :
  emacs_cv_xaw3d=yes
else $as_nop
  emacs_cv_xaw3d=no
fi

else $as_nop
  emacs_cv_xaw3d=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
fi

  else
    emacs_cv_xaw3d=no
  fi
  if test $emacs_cv_xaw3d = yes; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
printf %s "checking for xaw3d... " >&6; }
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
printf "%s\n" "yes; using Lucid toolkit" >&6; }
    USE_X_TOOLKIT=LUCID
    HAVE_XAW3D=yes
    LUCID_LIBW=-lXaw3d

printf "%s\n" "#define HAVE_XAW3D 1" >>confdefs.h

  else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
printf %s "checking for xaw3d... " >&6; }
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5
printf %s "checking for libXaw... " >&6; }
    if test ${emacs_cv_xaw+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <X11/Intrinsic.h>
#include <X11/Xaw/Simple.h>
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  emacs_cv_xaw=yes
else $as_nop
  emacs_cv_xaw=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
fi

    if test $emacs_cv_xaw = yes; then
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
printf "%s\n" "yes; using Lucid toolkit" >&6; }
      USE_X_TOOLKIT=LUCID
      LUCID_LIBW=-lXaw
    elif test x"${USE_X_TOOLKIT}" = xLUCID; then
      as_fn_error $? "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
    else
      as_fn_error $? "No X toolkit could be found.
If you are sure you want Emacs compiled without an X toolkit, pass
  --with-x-toolkit=no
to configure.  Otherwise, install the development libraries for the toolkit
that you want to use (e.g. Gtk+) and re-run configure." "$LINENO" 5
    fi
  fi
fi

X_TOOLKIT_TYPE=$USE_X_TOOLKIT

LIBXTR6=
LIBXMU=
if test "${USE_X_TOOLKIT}" != "none"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5
printf %s "checking X11 toolkit version... " >&6; }
  if test ${emacs_cv_x11_toolkit_version_6+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <X11/Intrinsic.h>
int
main (void)
{
#if XtSpecificationRelease < 6
fail;
#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  emacs_cv_x11_toolkit_version_6=yes
else $as_nop
  emacs_cv_x11_toolkit_version_6=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
fi

  HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
  if test $emacs_cv_x11_toolkit_version_6 = yes; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
printf "%s\n" "6 or newer" >&6; }

printf "%s\n" "#define HAVE_X11XTR6 1" >>confdefs.h

    LIBXTR6="-lSM -lICE"
    case "$opsys" in
      ## Use libw.a along with X11R6 Xt.
      unixware) LIBXTR6="$LIBXTR6 -lw" ;;
    esac
  else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
printf "%s\n" "before 6" >&6; }
  fi

  OLDLIBS="$LIBS"
  if test x$HAVE_X11XTR6 = xyes; then
    OTHERLIBS='-lXt -lSM -lICE'
  else
    OTHERLIBS='-lXt'
  fi
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing XmuConvertStandardSelection" >&5
printf %s "checking for library containing XmuConvertStandardSelection... " >&6; }
if test ${ac_cv_search_XmuConvertStandardSelection+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  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.  */
char XmuConvertStandardSelection ();
int
main (void)
{
return XmuConvertStandardSelection ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' Xmu
do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib $OTHERLIBS $ac_func_search_save_LIBS"
  fi
  if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_search_XmuConvertStandardSelection=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext
  if test ${ac_cv_search_XmuConvertStandardSelection+y}
then :
  break
fi
done
if test ${ac_cv_search_XmuConvertStandardSelection+y}
then :

else $as_nop
  ac_cv_search_XmuConvertStandardSelection=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_XmuConvertStandardSelection" >&5
printf "%s\n" "$ac_cv_search_XmuConvertStandardSelection" >&6; }
ac_res=$ac_cv_search_XmuConvertStandardSelection
if test "$ac_res" != no
then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"

fi

  if test "X$LIBS" != "X$OLDLIBS"; then
    LIBXMU=$ac_cv_search_XmuConvertStandardSelection
  fi
  LIBS=$OLDLIBS
  fi



LIBXP=
if test "${USE_X_TOOLKIT}" = "MOTIF"; then
  # OpenMotif may be installed in such a way on some GNU/Linux systems.
  if test -d /usr/include/openmotif; then
    CPPFLAGS="-I/usr/include/openmotif $CPPFLAGS"
    emacs_cv_openmotif=yes
    case "$canonical" in
      x86_64-*-linux-gnu* | powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*)
      test -d /usr/lib64/openmotif && LDFLAGS="-L/usr/lib64/openmotif $LDFLAGS"
      ;;
      *)
      test -d /usr/lib/openmotif && LDFLAGS="-L/usr/lib/openmotif $LDFLAGS"
    esac
  else
    emacs_cv_openmotif=no
  fi
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for (Open)Motif version 2.1" >&5
printf %s "checking for (Open)Motif version 2.1... " >&6; }
if test ${emacs_cv_motif_version_2_1+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <Xm/Xm.h>
int
main (void)
{
#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
int x = 5;
#else
Motif version prior to 2.1.
#endif
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  emacs_cv_motif_version_2_1=yes
else $as_nop
  emacs_cv_motif_version_2_1=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5
printf "%s\n" "$emacs_cv_motif_version_2_1" >&6; }
  if test $emacs_cv_motif_version_2_1 = yes; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5
printf %s "checking for XpCreateContext in -lXp... " >&6; }
if test ${ac_cv_lib_Xp_XpCreateContext+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lXp  $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.  */
char XpCreateContext ();
int
main (void)
{
return XpCreateContext ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_Xp_XpCreateContext=yes
else $as_nop
  ac_cv_lib_Xp_XpCreateContext=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5
printf "%s\n" "$ac_cv_lib_Xp_XpCreateContext" >&6; }
if test "x$ac_cv_lib_Xp_XpCreateContext" = xyes
then :
  LIBXP=-lXp
fi

    if test x$emacs_cv_openmotif = xyes; then
      REAL_CPPFLAGS="-I/usr/include/openmotif $REAL_CPPFLAGS"
    fi
  else
    # We put this in CFLAGS temporarily to precede other -I options
    # that might be in CFLAGS temporarily.
    # We put this in CPPFLAGS where it precedes the other -I options.
    OLD_CPPFLAGS=$CPPFLAGS
    OLD_CFLAGS=$CFLAGS
    CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
    CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5
printf %s "checking for LessTif where some systems put it... " >&6; }
if test ${emacs_cv_lesstif+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>

int
main (void)
{
int x = 5;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  emacs_cv_lesstif=yes
else $as_nop
  emacs_cv_lesstif=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5
printf "%s\n" "$emacs_cv_lesstif" >&6; }
    if test $emacs_cv_lesstif = yes; then
      # Make sure this -I option remains in CPPFLAGS after it is set
      # back to REAL_CPPFLAGS.
      # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
      # have those other -I options anyway.  Ultimately, having this
      # directory ultimately in CPPFLAGS will be enough.
      REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
      LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
    else
      CFLAGS=$OLD_CFLAGS
      CPPFLAGS=$OLD_CPPFLAGS
    fi
  fi
  ac_fn_c_check_header_compile "$LINENO" "Xm/BulletinB.h" "ac_cv_header_Xm_BulletinB_h" "$ac_includes_default"
if test "x$ac_cv_header_Xm_BulletinB_h" = xyes
then :

else $as_nop
  as_fn_error $? "Motif toolkit requested but requirements not found." "$LINENO" 5
fi

fi


USE_TOOLKIT_SCROLL_BARS=no
if test "${with_toolkit_scroll_bars}" != "no"; then
  if test "${USE_X_TOOLKIT}" != "none"; then
    if test "${USE_X_TOOLKIT}" = "MOTIF"; then
      printf "%s\n" "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h

      HAVE_XAW3D=no
      USE_TOOLKIT_SCROLL_BARS=yes
    elif test "${HAVE_XAW3D}" = "yes" || test "${USE_X_TOOLKIT}" = "LUCID"; then
      printf "%s\n" "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h

      USE_TOOLKIT_SCROLL_BARS=yes
    fi
  elif test "${HAVE_GTK}" = "yes"; then
    printf "%s\n" "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h

    USE_TOOLKIT_SCROLL_BARS=yes
  elif test "${HAVE_NS}" = "yes"; then
    printf "%s\n" "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h

    USE_TOOLKIT_SCROLL_BARS=yes
  elif test "${HAVE_W32}" = "yes"; then
    printf "%s\n" "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h

    USE_TOOLKIT_SCROLL_BARS=yes
  elif test "${HAVE_BE_APP}" = "yes"; then
    printf "%s\n" "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h

    USE_TOOLKIT_SCROLL_BARS=yes
  fi
elif test "${window_system}" != "x11" && test "${window_system}" != "none"; then
  as_fn_error $? "Non-toolkit scroll bars are not implemented for your system" "$LINENO" 5
fi

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

	  #include <X11/Xlib.h>
	  #include <X11/Xresource.h>
int
main (void)
{
XIMProc  callback;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  HAVE_XIM=yes

printf "%s\n" "#define HAVE_XIM 1" >>confdefs.h

else $as_nop
  HAVE_XIM=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext

if test "${with_xim}" != "no"; then

printf "%s\n" "#define USE_XIM 1" >>confdefs.h

fi

# Check for XRender
HAVE_XRENDER=no
if test "${HAVE_X11}" = "yes"; then
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <X11/Intrinsic.h>
	 #include <X11/extensions/Xrender.h>

int
main (void)
{
return !XRenderQueryExtension;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
printf %s "checking for XRenderQueryExtension in -lXrender... " >&6; }
if test ${ac_cv_lib_Xrender_XRenderQueryExtension+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lXrender  $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.  */
char XRenderQueryExtension ();
int
main (void)
{
return XRenderQueryExtension ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_Xrender_XRenderQueryExtension=yes
else $as_nop
  ac_cv_lib_Xrender_XRenderQueryExtension=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
printf "%s\n" "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = xyes
then :
  HAVE_XRENDER=yes
fi

fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
  if test $HAVE_XRENDER = yes; then
    XRENDER_LIBS="-lXrender"


printf "%s\n" "#define HAVE_XRENDER 1" >>confdefs.h

  fi
fi

HAVE_CAIRO=no
if test "${HAVE_X11}" = "yes"; then
  if test "${with_cairo}" != "no"; then
    CAIRO_REQUIRED=1.8.0
    CAIRO_MODULE="cairo >= $CAIRO_REQUIRED"
    if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "$CAIRO_MODULE"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  CAIRO_CFLAGS="$CAIRO_CFLAGS $module_cflags $module_includes"
  CAIRO_LIBS="$CAIRO_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    CAIRO_CFLAGS="$ndk_import_includes $CAIRO_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_CAIRO=yes
else $as_nop
  HAVE_CAIRO=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CAIRO_MODULE" >&5
printf %s "checking for $CAIRO_MODULE... " >&6; }

if test -n "$CAIRO_CFLAGS"; then
    pkg_cv_CAIRO_CFLAGS="$CAIRO_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$CAIRO_MODULE\""; } >&5
  ($PKG_CONFIG --exists --print-errors "$CAIRO_MODULE") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_CAIRO_CFLAGS=`$PKG_CONFIG --cflags "$CAIRO_MODULE" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$CAIRO_LIBS"; then
    pkg_cv_CAIRO_LIBS="$CAIRO_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$CAIRO_MODULE\""; } >&5
  ($PKG_CONFIG --exists --print-errors "$CAIRO_MODULE") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_CAIRO_LIBS=`$PKG_CONFIG --libs "$CAIRO_MODULE" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        CAIRO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$CAIRO_MODULE" 2>&1`
        else
	        CAIRO_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$CAIRO_MODULE" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$CAIRO_PKG_ERRORS" >&5

	HAVE_CAIRO=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_CAIRO=no
else
	CAIRO_CFLAGS=$pkg_cv_CAIRO_CFLAGS
	CAIRO_LIBS=$pkg_cv_CAIRO_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	CAIRO_CFLAGS=`printf "%s\n" "$CAIRO_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_CAIRO=yes
fi
fi
    if test $HAVE_CAIRO = yes; then
      if test "x$with_cairo_xcb" = "xyes"
then :

	CAIRO_XCB_MODULE="cairo-xcb >= $CAIRO_REQUIRED"
	if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "$CAIRO_XCB_MODULE"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  CAIRO_XCB_CFLAGS="$CAIRO_XCB_CFLAGS $module_cflags $module_includes"
  CAIRO_XCB_LIBS="$CAIRO_XCB_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    CAIRO_XCB_CFLAGS="$ndk_import_includes $CAIRO_XCB_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_CAIRO_XCB=yes
else $as_nop
  HAVE_CAIRO_XCB=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CAIRO_XCB_MODULE" >&5
printf %s "checking for $CAIRO_XCB_MODULE... " >&6; }

if test -n "$CAIRO_XCB_CFLAGS"; then
    pkg_cv_CAIRO_XCB_CFLAGS="$CAIRO_XCB_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$CAIRO_XCB_MODULE\""; } >&5
  ($PKG_CONFIG --exists --print-errors "$CAIRO_XCB_MODULE") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_CAIRO_XCB_CFLAGS=`$PKG_CONFIG --cflags "$CAIRO_XCB_MODULE" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$CAIRO_XCB_LIBS"; then
    pkg_cv_CAIRO_XCB_LIBS="$CAIRO_XCB_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$CAIRO_XCB_MODULE\""; } >&5
  ($PKG_CONFIG --exists --print-errors "$CAIRO_XCB_MODULE") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_CAIRO_XCB_LIBS=`$PKG_CONFIG --libs "$CAIRO_XCB_MODULE" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        CAIRO_XCB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$CAIRO_XCB_MODULE" 2>&1`
        else
	        CAIRO_XCB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$CAIRO_XCB_MODULE" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$CAIRO_XCB_PKG_ERRORS" >&5

	HAVE_CAIRO_XCB=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_CAIRO_XCB=no
else
	CAIRO_XCB_CFLAGS=$pkg_cv_CAIRO_XCB_CFLAGS
	CAIRO_XCB_LIBS=$pkg_cv_CAIRO_XCB_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	CAIRO_XCB_CFLAGS=`printf "%s\n" "$CAIRO_XCB_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_CAIRO_XCB=yes
fi
fi
	if test "x$HAVE_CAIRO_XCB" = "xyes"
then :

	  CAIRO_CFLAGS="$CAIRO_CFLAGS $CAIRO_XCB_CFLAGS"
	  CAIRO_LIBS="$CAIRO_LIBS $CAIRO_XCB_LIBS"

printf "%s\n" "#define USE_CAIRO_XCB 1" >>confdefs.h

fi
fi

printf "%s\n" "#define USE_CAIRO 1" >>confdefs.h

      CFLAGS="$CFLAGS $CAIRO_CFLAGS"
      LIBS="$LIBS $CAIRO_LIBS"


    else
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cairo requested but not found." >&5
printf "%s\n" "$as_me: WARNING: cairo requested but not found." >&2;}
    fi
  fi
fi

HAVE_XWIDGETS=no
XWIDGETS_OBJ=
if test "$with_xwidgets" != "no"; then
  if test "$USE_GTK_TOOLKIT" = "GTK3" && test "$window_system" != "none"; then
    WEBKIT_REQUIRED=2.12
    WEBKIT_BROKEN=2.41.92
    WEBKIT_MODULES="webkit2gtk-4.1 >= $WEBKIT_REQUIRED webkit2gtk-4.1 < $WEBKIT_BROKEN"
    if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "$WEBKIT_MODULES"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  WEBKIT_CFLAGS="$WEBKIT_CFLAGS $module_cflags $module_includes"
  WEBKIT_LIBS="$WEBKIT_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    WEBKIT_CFLAGS="$ndk_import_includes $WEBKIT_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_WEBKIT=yes
else $as_nop
  HAVE_WEBKIT=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $WEBKIT_MODULES" >&5
printf %s "checking for $WEBKIT_MODULES... " >&6; }

if test -n "$WEBKIT_CFLAGS"; then
    pkg_cv_WEBKIT_CFLAGS="$WEBKIT_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$WEBKIT_MODULES\""; } >&5
  ($PKG_CONFIG --exists --print-errors "$WEBKIT_MODULES") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_WEBKIT_CFLAGS=`$PKG_CONFIG --cflags "$WEBKIT_MODULES" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$WEBKIT_LIBS"; then
    pkg_cv_WEBKIT_LIBS="$WEBKIT_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$WEBKIT_MODULES\""; } >&5
  ($PKG_CONFIG --exists --print-errors "$WEBKIT_MODULES") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_WEBKIT_LIBS=`$PKG_CONFIG --libs "$WEBKIT_MODULES" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        WEBKIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$WEBKIT_MODULES" 2>&1`
        else
	        WEBKIT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$WEBKIT_MODULES" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$WEBKIT_PKG_ERRORS" >&5

	HAVE_WEBKIT=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_WEBKIT=no
else
	WEBKIT_CFLAGS=$pkg_cv_WEBKIT_CFLAGS
	WEBKIT_LIBS=$pkg_cv_WEBKIT_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	WEBKIT_CFLAGS=`printf "%s\n" "$WEBKIT_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_WEBKIT=yes
fi
fi
    if test "$HAVE_WEBKIT" = "no"; then
      WEBKIT_MODULES="webkit2gtk-4.0 >= $WEBKIT_REQUIRED webkit2gtk-4.0 < $WEBKIT_BROKEN"
      if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "$WEBKIT_MODULES"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  WEBKIT_CFLAGS="$WEBKIT_CFLAGS $module_cflags $module_includes"
  WEBKIT_LIBS="$WEBKIT_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    WEBKIT_CFLAGS="$ndk_import_includes $WEBKIT_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_WEBKIT=yes
else $as_nop
  HAVE_WEBKIT=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $WEBKIT_MODULES" >&5
printf %s "checking for $WEBKIT_MODULES... " >&6; }

if test -n "$WEBKIT_CFLAGS"; then
    pkg_cv_WEBKIT_CFLAGS="$WEBKIT_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$WEBKIT_MODULES\""; } >&5
  ($PKG_CONFIG --exists --print-errors "$WEBKIT_MODULES") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_WEBKIT_CFLAGS=`$PKG_CONFIG --cflags "$WEBKIT_MODULES" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$WEBKIT_LIBS"; then
    pkg_cv_WEBKIT_LIBS="$WEBKIT_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$WEBKIT_MODULES\""; } >&5
  ($PKG_CONFIG --exists --print-errors "$WEBKIT_MODULES") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_WEBKIT_LIBS=`$PKG_CONFIG --libs "$WEBKIT_MODULES" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        WEBKIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$WEBKIT_MODULES" 2>&1`
        else
	        WEBKIT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$WEBKIT_MODULES" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$WEBKIT_PKG_ERRORS" >&5

	HAVE_WEBKIT=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_WEBKIT=no
else
	WEBKIT_CFLAGS=$pkg_cv_WEBKIT_CFLAGS
	WEBKIT_LIBS=$pkg_cv_WEBKIT_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	WEBKIT_CFLAGS=`printf "%s\n" "$WEBKIT_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_WEBKIT=yes
fi
fi
    fi
    HAVE_XWIDGETS=$HAVE_WEBKIT
    XWIDGETS_OBJ="xwidget.o"
    if test "$HAVE_X_WINDOWS" = "yes" && test "${with_cairo}" = "no"; then
      CAIRO_XLIB_MODULES="cairo >= 1.8.0 cairo-xlib >= 1.8.0"
      if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "$CAIRO_XLIB_MODULES"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  CAIRO_XLIB_CFLAGS="$CAIRO_XLIB_CFLAGS $module_cflags $module_includes"
  CAIRO_XLIB_LIBS="$CAIRO_XLIB_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    CAIRO_XLIB_CFLAGS="$ndk_import_includes $CAIRO_XLIB_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_CAIRO_XLIB=yes
else $as_nop
  HAVE_CAIRO_XLIB=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CAIRO_XLIB_MODULES" >&5
printf %s "checking for $CAIRO_XLIB_MODULES... " >&6; }

if test -n "$CAIRO_XLIB_CFLAGS"; then
    pkg_cv_CAIRO_XLIB_CFLAGS="$CAIRO_XLIB_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$CAIRO_XLIB_MODULES\""; } >&5
  ($PKG_CONFIG --exists --print-errors "$CAIRO_XLIB_MODULES") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_CAIRO_XLIB_CFLAGS=`$PKG_CONFIG --cflags "$CAIRO_XLIB_MODULES" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$CAIRO_XLIB_LIBS"; then
    pkg_cv_CAIRO_XLIB_LIBS="$CAIRO_XLIB_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$CAIRO_XLIB_MODULES\""; } >&5
  ($PKG_CONFIG --exists --print-errors "$CAIRO_XLIB_MODULES") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_CAIRO_XLIB_LIBS=`$PKG_CONFIG --libs "$CAIRO_XLIB_MODULES" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        CAIRO_XLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$CAIRO_XLIB_MODULES" 2>&1`
        else
	        CAIRO_XLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$CAIRO_XLIB_MODULES" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$CAIRO_XLIB_PKG_ERRORS" >&5

	HAVE_CAIRO_XLIB=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_CAIRO_XLIB=no
else
	CAIRO_XLIB_CFLAGS=$pkg_cv_CAIRO_XLIB_CFLAGS
	CAIRO_XLIB_LIBS=$pkg_cv_CAIRO_XLIB_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	CAIRO_XLIB_CFLAGS=`printf "%s\n" "$CAIRO_XLIB_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_CAIRO_XLIB=yes
fi
fi
      if test $HAVE_CAIRO_XLIB = "yes"; then
        CAIRO_CFLAGS="$CAIRO_XLIB_CFLAGS"
	CAIRO_LIBS="$CAIRO_XLIB_LIBS"


      else
        as_fn_error $? "xwidgets requested, but a suitable cairo installation wasn't found" "$LINENO" 5
      fi
    fi
  elif test "${NS_IMPL_COCOA}" = "yes"; then
            WEBKIT_LIBS="-Wl,-framework -Wl,WebKit"
    WEBKIT_CFLAGS="-I/System/Library/Frameworks/WebKit.framework/Headers"
    HAVE_WEBKIT="yes"
    HAVE_XWIDGETS=$HAVE_WEBKIT
    XWIDGETS_OBJ="xwidget.o"
    NS_OBJC_OBJ="$NS_OBJC_OBJ nsxwidget.o"

  else
    as_fn_error $? "xwidgets requested, it requires GTK3 as X window toolkit or macOS Cocoa as window system." "$LINENO" 5
  fi

  test $HAVE_XWIDGETS = yes ||
    as_fn_error $? "xwidgets requested but WebKitGTK+ or WebKit framework not found." "$LINENO" 5


printf "%s\n" "#define HAVE_XWIDGETS 1" >>confdefs.h

fi


if test "$window_system" = "pgtk"; then
  CAIRO_REQUIRED=1.12.0
  CAIRO_MODULE="cairo >= $CAIRO_REQUIRED"
  if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "$CAIRO_MODULE"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  CAIRO_CFLAGS="$CAIRO_CFLAGS $module_cflags $module_includes"
  CAIRO_LIBS="$CAIRO_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    CAIRO_CFLAGS="$ndk_import_includes $CAIRO_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_CAIRO=yes
else $as_nop
  HAVE_CAIRO=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CAIRO_MODULE" >&5
printf %s "checking for $CAIRO_MODULE... " >&6; }

if test -n "$CAIRO_CFLAGS"; then
    pkg_cv_CAIRO_CFLAGS="$CAIRO_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$CAIRO_MODULE\""; } >&5
  ($PKG_CONFIG --exists --print-errors "$CAIRO_MODULE") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_CAIRO_CFLAGS=`$PKG_CONFIG --cflags "$CAIRO_MODULE" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$CAIRO_LIBS"; then
    pkg_cv_CAIRO_LIBS="$CAIRO_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$CAIRO_MODULE\""; } >&5
  ($PKG_CONFIG --exists --print-errors "$CAIRO_MODULE") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_CAIRO_LIBS=`$PKG_CONFIG --libs "$CAIRO_MODULE" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        CAIRO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$CAIRO_MODULE" 2>&1`
        else
	        CAIRO_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$CAIRO_MODULE" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$CAIRO_PKG_ERRORS" >&5

	HAVE_CAIRO=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_CAIRO=no
else
	CAIRO_CFLAGS=$pkg_cv_CAIRO_CFLAGS
	CAIRO_LIBS=$pkg_cv_CAIRO_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	CAIRO_CFLAGS=`printf "%s\n" "$CAIRO_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_CAIRO=yes
fi
fi
  if test $HAVE_CAIRO = yes; then

printf "%s\n" "#define USE_CAIRO 1" >>confdefs.h

  else
    as_fn_error $? "cairo required but not found." "$LINENO" 5
  fi

  CFLAGS="$CFLAGS $CAIRO_CFLAGS"
  LIBS="$LIBS $CAIRO_LIBS"


fi

if test "${HAVE_BE_APP}" = "yes"; then
  if test "${with_be_cairo}" != "no"; then
    CAIRO_REQUIRED=1.8.0
    CAIRO_MODULE="cairo >= $CAIRO_REQUIRED"
    if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "$CAIRO_MODULE"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  CAIRO_CFLAGS="$CAIRO_CFLAGS $module_cflags $module_includes"
  CAIRO_LIBS="$CAIRO_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    CAIRO_CFLAGS="$ndk_import_includes $CAIRO_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_CAIRO=yes
else $as_nop
  HAVE_CAIRO=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CAIRO_MODULE" >&5
printf %s "checking for $CAIRO_MODULE... " >&6; }

if test -n "$CAIRO_CFLAGS"; then
    pkg_cv_CAIRO_CFLAGS="$CAIRO_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$CAIRO_MODULE\""; } >&5
  ($PKG_CONFIG --exists --print-errors "$CAIRO_MODULE") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_CAIRO_CFLAGS=`$PKG_CONFIG --cflags "$CAIRO_MODULE" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$CAIRO_LIBS"; then
    pkg_cv_CAIRO_LIBS="$CAIRO_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$CAIRO_MODULE\""; } >&5
  ($PKG_CONFIG --exists --print-errors "$CAIRO_MODULE") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_CAIRO_LIBS=`$PKG_CONFIG --libs "$CAIRO_MODULE" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        CAIRO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$CAIRO_MODULE" 2>&1`
        else
	        CAIRO_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$CAIRO_MODULE" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$CAIRO_PKG_ERRORS" >&5

	HAVE_CAIRO=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_CAIRO=no
else
	CAIRO_CFLAGS=$pkg_cv_CAIRO_CFLAGS
	CAIRO_LIBS=$pkg_cv_CAIRO_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	CAIRO_CFLAGS=`printf "%s\n" "$CAIRO_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_CAIRO=yes
fi
fi
    if test $HAVE_CAIRO = yes; then

printf "%s\n" "#define USE_BE_CAIRO 1" >>confdefs.h

      CFLAGS="$CFLAGS $CAIRO_CFLAGS"
      LIBS="$LIBS $CAIRO_LIBS"


    else
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cairo requested but not found." >&5
printf "%s\n" "$as_me: WARNING: cairo requested but not found." >&2;}
    fi
  fi
fi

### Start of font-backend (under any platform) section.
# (nothing here yet -- this is a placeholder)
### End of font-backend (under any platform) section.

### Start of font-backend (under X11) section.
if test "${HAVE_X11}" = "yes"; then
  if test $HAVE_CAIRO = yes; then
                    if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "freetype2"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  FREETYPE_CFLAGS="$FREETYPE_CFLAGS $module_cflags $module_includes"
  FREETYPE_LIBS="$FREETYPE_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    FREETYPE_CFLAGS="$ndk_import_includes $FREETYPE_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_FREETYPE=yes
else $as_nop
  HAVE_FREETYPE=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
printf %s "checking for freetype2... " >&6; }

if test -n "$FREETYPE_CFLAGS"; then
    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$FREETYPE_LIBS"; then
    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "freetype2" 2>&1`
        else
	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "freetype2" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$FREETYPE_PKG_ERRORS" >&5

	HAVE_FREETYPE=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_FREETYPE=no
else
	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	FREETYPE_CFLAGS=`printf "%s\n" "$FREETYPE_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_FREETYPE=yes
fi
fi

    test "$HAVE_FREETYPE" = "no" && as_fn_error $? "cairo requires libfreetype" "$LINENO" 5

    if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "fontconfig >= 2.2.0"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  FONTCONFIG_CFLAGS="$FONTCONFIG_CFLAGS $module_cflags $module_includes"
  FONTCONFIG_LIBS="$FONTCONFIG_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    FONTCONFIG_CFLAGS="$ndk_import_includes $FONTCONFIG_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_FONTCONFIG=yes
else $as_nop
  HAVE_FONTCONFIG=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
printf %s "checking for fontconfig >= 2.2.0... " >&6; }

if test -n "$FONTCONFIG_CFLAGS"; then
    pkg_cv_FONTCONFIG_CFLAGS="$FONTCONFIG_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fontconfig >= 2.2.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "fontconfig >= 2.2.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$FONTCONFIG_LIBS"; then
    pkg_cv_FONTCONFIG_LIBS="$FONTCONFIG_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fontconfig >= 2.2.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "fontconfig >= 2.2.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "fontconfig >= 2.2.0" 2>&1`
        else
	        FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "fontconfig >= 2.2.0" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$FONTCONFIG_PKG_ERRORS" >&5

	HAVE_FONTCONFIG=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_FONTCONFIG=no
else
	FONTCONFIG_CFLAGS=$pkg_cv_FONTCONFIG_CFLAGS
	FONTCONFIG_LIBS=$pkg_cv_FONTCONFIG_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	FONTCONFIG_CFLAGS=`printf "%s\n" "$FONTCONFIG_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_FONTCONFIG=yes
fi
fi

    test "$HAVE_FONTCONFIG" = "no" &&
      as_fn_error $? "cairo requires libfontconfig" "$LINENO" 5
        HAVE_XFT=no
  else
    ## Use -lXft if available, unless '--with-xft=no'.
    HAVE_XFT=maybe
    if test "x${with_x}" = "xno"; then
      with_xft="no";
    fi

    if test "$with_xft" != no; then
      if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "fontconfig >= 2.2.0"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  FONTCONFIG_CFLAGS="$FONTCONFIG_CFLAGS $module_cflags $module_includes"
  FONTCONFIG_LIBS="$FONTCONFIG_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    FONTCONFIG_CFLAGS="$ndk_import_includes $FONTCONFIG_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_FONTCONFIG=yes
else $as_nop
  HAVE_FONTCONFIG=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
printf %s "checking for fontconfig >= 2.2.0... " >&6; }

if test -n "$FONTCONFIG_CFLAGS"; then
    pkg_cv_FONTCONFIG_CFLAGS="$FONTCONFIG_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fontconfig >= 2.2.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "fontconfig >= 2.2.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$FONTCONFIG_LIBS"; then
    pkg_cv_FONTCONFIG_LIBS="$FONTCONFIG_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fontconfig >= 2.2.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "fontconfig >= 2.2.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "fontconfig >= 2.2.0" 2>&1`
        else
	        FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "fontconfig >= 2.2.0" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$FONTCONFIG_PKG_ERRORS" >&5

	HAVE_FONTCONFIG=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_FONTCONFIG=no
else
	FONTCONFIG_CFLAGS=$pkg_cv_FONTCONFIG_CFLAGS
	FONTCONFIG_LIBS=$pkg_cv_FONTCONFIG_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	FONTCONFIG_CFLAGS=`printf "%s\n" "$FONTCONFIG_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_FONTCONFIG=yes
fi
fi
      with_xft=$HAVE_FONTCONFIG
    fi

    if test "x${with_xft}" != "xno"; then

      if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "xft >= 0.13.0"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  XFT_CFLAGS="$XFT_CFLAGS $module_cflags $module_includes"
  XFT_LIBS="$XFT_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    XFT_CFLAGS="$ndk_import_includes $XFT_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_XFT=yes
else $as_nop
  HAVE_XFT=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5
printf %s "checking for xft >= 0.13.0... " >&6; }

if test -n "$XFT_CFLAGS"; then
    pkg_cv_XFT_CFLAGS="$XFT_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xft >= 0.13.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "xft >= 0.13.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$XFT_LIBS"; then
    pkg_cv_XFT_LIBS="$XFT_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xft >= 0.13.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "xft >= 0.13.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        XFT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xft >= 0.13.0" 2>&1`
        else
	        XFT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xft >= 0.13.0" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$XFT_PKG_ERRORS" >&5

	HAVE_XFT=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_XFT=no
else
	XFT_CFLAGS=$pkg_cv_XFT_CFLAGS
	XFT_LIBS=$pkg_cv_XFT_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	XFT_CFLAGS=`printf "%s\n" "$XFT_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_XFT=yes
fi
fi
      ## Because xterm.c uses XRenderQueryExtension when XFT is
      ## enabled, we also need to link to -lXrender.
      if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
	OLD_CPPFLAGS="$CPPFLAGS"
	OLD_CFLAGS="$CFLAGS"
	OLD_LIBS="$LIBS"
	CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
	CFLAGS="$CFLAGS $XFT_CFLAGS"
	LIBS="$XFT_LIBS $LIBS"
	ac_fn_c_check_header_compile "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "#include <X11/X.h>
"
if test "x$ac_cv_header_X11_Xft_Xft_h" = xyes
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5
printf %s "checking for XftFontOpen in -lXft... " >&6; }
if test ${ac_cv_lib_Xft_XftFontOpen+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lXft $XFT_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.  */
char XftFontOpen ();
int
main (void)
{
return XftFontOpen ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_Xft_XftFontOpen=yes
else $as_nop
  ac_cv_lib_Xft_XftFontOpen=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5
printf "%s\n" "$ac_cv_lib_Xft_XftFontOpen" >&6; }
if test "x$ac_cv_lib_Xft_XftFontOpen" = xyes
then :
  HAVE_XFT=yes
fi

fi


	if test "${HAVE_XFT}" = "yes"; then

printf "%s\n" "#define HAVE_XFT 1" >>confdefs.h


	  C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
	fi                        # "${HAVE_XFT}" = "yes"
	CPPFLAGS=$OLD_CPPFLAGS
	CFLAGS=$OLD_CFLAGS
	LIBS=$OLD_LIBS
      else
      # Make sure XFT is disabled if we found XFT but not XRender
	HAVE_XFT=no
      fi                          # "$HAVE_XFT" != no
    fi                            # "x${with_xft}" != "xno"

    if test "$HAVE_XFT" != "yes"; then
              HAVE_XFT=no
       HAVE_FREETYPE=no
    else
                                   if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "freetype2"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  FREETYPE_CFLAGS="$FREETYPE_CFLAGS $module_cflags $module_includes"
  FREETYPE_LIBS="$FREETYPE_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    FREETYPE_CFLAGS="$ndk_import_includes $FREETYPE_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_FREETYPE=yes
else $as_nop
  HAVE_FREETYPE=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
printf %s "checking for freetype2... " >&6; }

if test -n "$FREETYPE_CFLAGS"; then
    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$FREETYPE_LIBS"; then
    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "freetype2" 2>&1`
        else
	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "freetype2" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$FREETYPE_PKG_ERRORS" >&5

	HAVE_FREETYPE=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_FREETYPE=no
else
	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	FREETYPE_CFLAGS=`printf "%s\n" "$FREETYPE_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_FREETYPE=yes
fi
fi

       test "$HAVE_FREETYPE" = "no" &&
	 as_fn_error $? "libxft requires libfreetype" "$LINENO" 5
    fi
  fi				  # $HAVE_CAIRO != yes

  HAVE_LIBOTF=no
  if test "${HAVE_FREETYPE}" = "yes"; then

printf "%s\n" "#define HAVE_FREETYPE 1" >>confdefs.h

    OLD_CFLAGS=$CFLAGS
    OLD_LIBS=$LIBS
    CFLAGS="$CFLAGS $FREETYPE_CFLAGS"
    LIBS="$FREETYPE_LIBS $LIBS"
    ac_fn_c_check_func "$LINENO" "FT_Face_GetCharVariantIndex" "ac_cv_func_FT_Face_GetCharVariantIndex"
if test "x$ac_cv_func_FT_Face_GetCharVariantIndex" = xyes
then :
  printf "%s\n" "#define HAVE_FT_FACE_GETCHARVARIANTINDEX 1" >>confdefs.h

fi

    CFLAGS=$OLD_CFLAGS
    LIBS=$OLD_LIBS
    if test "${with_libotf}" != "no"; then
      if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "libotf"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  LIBOTF_CFLAGS="$LIBOTF_CFLAGS $module_cflags $module_includes"
  LIBOTF_LIBS="$LIBOTF_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    LIBOTF_CFLAGS="$ndk_import_includes $LIBOTF_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_LIBOTF=yes
else $as_nop
  HAVE_LIBOTF=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
printf %s "checking for libotf... " >&6; }

if test -n "$LIBOTF_CFLAGS"; then
    pkg_cv_LIBOTF_CFLAGS="$LIBOTF_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libotf\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libotf") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$LIBOTF_LIBS"; then
    pkg_cv_LIBOTF_LIBS="$LIBOTF_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libotf\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libotf") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        LIBOTF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libotf" 2>&1`
        else
	        LIBOTF_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libotf" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$LIBOTF_PKG_ERRORS" >&5

	HAVE_LIBOTF=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_LIBOTF=no
else
	LIBOTF_CFLAGS=$pkg_cv_LIBOTF_CFLAGS
	LIBOTF_LIBS=$pkg_cv_LIBOTF_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	LIBOTF_CFLAGS=`printf "%s\n" "$LIBOTF_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_LIBOTF=yes
fi
fi
      if test "$HAVE_LIBOTF" = "yes"; then

printf "%s\n" "#define HAVE_LIBOTF 1" >>confdefs.h

	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
printf %s "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
if test ${ac_cv_lib_otf_OTF_get_variation_glyphs+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lotf  $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.  */
char OTF_get_variation_glyphs ();
int
main (void)
{
return OTF_get_variation_glyphs ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_otf_OTF_get_variation_glyphs=yes
else $as_nop
  ac_cv_lib_otf_OTF_get_variation_glyphs=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
printf "%s\n" "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = xyes
then :
  HAVE_OTF_GET_VARIATION_GLYPHS=yes
else $as_nop
  HAVE_OTF_GET_VARIATION_GLYPHS=no
fi

	if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then

printf "%s\n" "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h

	fi
	if $PKG_CONFIG --atleast-version=0.9.16 libotf; then :; else

printf "%s\n" "#define HAVE_OTF_KANNADA_BUG 1" >>confdefs.h

	fi
      fi
    fi
      fi

  HAVE_M17N_FLT=no
  if test "${HAVE_LIBOTF}" = yes; then
    if test "${with_m17n_flt}" != "no"; then
      if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "m17n-flt"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  M17N_FLT_CFLAGS="$M17N_FLT_CFLAGS $module_cflags $module_includes"
  M17N_FLT_LIBS="$M17N_FLT_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    M17N_FLT_CFLAGS="$ndk_import_includes $M17N_FLT_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_M17N_FLT=yes
else $as_nop
  HAVE_M17N_FLT=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5
printf %s "checking for m17n-flt... " >&6; }

if test -n "$M17N_FLT_CFLAGS"; then
    pkg_cv_M17N_FLT_CFLAGS="$M17N_FLT_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"m17n-flt\""; } >&5
  ($PKG_CONFIG --exists --print-errors "m17n-flt") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$M17N_FLT_LIBS"; then
    pkg_cv_M17N_FLT_LIBS="$M17N_FLT_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"m17n-flt\""; } >&5
  ($PKG_CONFIG --exists --print-errors "m17n-flt") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "m17n-flt" 2>&1`
        else
	        M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "m17n-flt" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$M17N_FLT_PKG_ERRORS" >&5

	HAVE_M17N_FLT=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_M17N_FLT=no
else
	M17N_FLT_CFLAGS=$pkg_cv_M17N_FLT_CFLAGS
	M17N_FLT_LIBS=$pkg_cv_M17N_FLT_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	M17N_FLT_CFLAGS=`printf "%s\n" "$M17N_FLT_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_M17N_FLT=yes
fi
fi
      if test "$HAVE_M17N_FLT" = "yes"; then

printf "%s\n" "#define HAVE_M17N_FLT 1" >>confdefs.h

      fi
    fi
  fi
else # "${HAVE_X11}" != "yes"
  if test $window_system = pgtk; then
    if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "fontconfig >= 2.2.0"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  FONTCONFIG_CFLAGS="$FONTCONFIG_CFLAGS $module_cflags $module_includes"
  FONTCONFIG_LIBS="$FONTCONFIG_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    FONTCONFIG_CFLAGS="$ndk_import_includes $FONTCONFIG_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_FONTCONFIG=yes
else $as_nop
  HAVE_FONTCONFIG=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
printf %s "checking for fontconfig >= 2.2.0... " >&6; }

if test -n "$FONTCONFIG_CFLAGS"; then
    pkg_cv_FONTCONFIG_CFLAGS="$FONTCONFIG_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fontconfig >= 2.2.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "fontconfig >= 2.2.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$FONTCONFIG_LIBS"; then
    pkg_cv_FONTCONFIG_LIBS="$FONTCONFIG_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fontconfig >= 2.2.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "fontconfig >= 2.2.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "fontconfig >= 2.2.0" 2>&1`
        else
	        FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "fontconfig >= 2.2.0" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$FONTCONFIG_PKG_ERRORS" >&5

	HAVE_FONTCONFIG=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_FONTCONFIG=no
else
	FONTCONFIG_CFLAGS=$pkg_cv_FONTCONFIG_CFLAGS
	FONTCONFIG_LIBS=$pkg_cv_FONTCONFIG_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	FONTCONFIG_CFLAGS=`printf "%s\n" "$FONTCONFIG_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_FONTCONFIG=yes
fi
fi
    if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "freetype2"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  FREETYPE_CFLAGS="$FREETYPE_CFLAGS $module_cflags $module_includes"
  FREETYPE_LIBS="$FREETYPE_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    FREETYPE_CFLAGS="$ndk_import_includes $FREETYPE_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_FREETYPE=yes
else $as_nop
  HAVE_FREETYPE=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
printf %s "checking for freetype2... " >&6; }

if test -n "$FREETYPE_CFLAGS"; then
    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$FREETYPE_LIBS"; then
    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "freetype2" 2>&1`
        else
	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "freetype2" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$FREETYPE_PKG_ERRORS" >&5

	HAVE_FREETYPE=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_FREETYPE=no
else
	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	FREETYPE_CFLAGS=`printf "%s\n" "$FREETYPE_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_FREETYPE=yes
fi
fi
    if test "$HAVE_FONTCONFIG" != yes -o "$HAVE_FREETYPE" != yes; then
      as_fn_error $? "fontconfig and freetype is required." "$LINENO" 5
    fi
    HAVE_LIBOTF=no

printf "%s\n" "#define HAVE_FREETYPE 1" >>confdefs.h

    if test "${with_libotf}" != "no"; then
      if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "libotf"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  LIBOTF_CFLAGS="$LIBOTF_CFLAGS $module_cflags $module_includes"
  LIBOTF_LIBS="$LIBOTF_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    LIBOTF_CFLAGS="$ndk_import_includes $LIBOTF_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_LIBOTF=yes
else $as_nop
  HAVE_LIBOTF=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
printf %s "checking for libotf... " >&6; }

if test -n "$LIBOTF_CFLAGS"; then
    pkg_cv_LIBOTF_CFLAGS="$LIBOTF_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libotf\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libotf") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$LIBOTF_LIBS"; then
    pkg_cv_LIBOTF_LIBS="$LIBOTF_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libotf\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libotf") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        LIBOTF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libotf" 2>&1`
        else
	        LIBOTF_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libotf" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$LIBOTF_PKG_ERRORS" >&5

	HAVE_LIBOTF=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_LIBOTF=no
else
	LIBOTF_CFLAGS=$pkg_cv_LIBOTF_CFLAGS
	LIBOTF_LIBS=$pkg_cv_LIBOTF_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	LIBOTF_CFLAGS=`printf "%s\n" "$LIBOTF_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_LIBOTF=yes
fi
fi
      if test "$HAVE_LIBOTF" = "yes"; then

printf "%s\n" "#define HAVE_LIBOTF 1" >>confdefs.h

	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
printf %s "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
if test ${ac_cv_lib_otf_OTF_get_variation_glyphs+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lotf  $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.  */
char OTF_get_variation_glyphs ();
int
main (void)
{
return OTF_get_variation_glyphs ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_otf_OTF_get_variation_glyphs=yes
else $as_nop
  ac_cv_lib_otf_OTF_get_variation_glyphs=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
printf "%s\n" "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = xyes
then :
  HAVE_OTF_GET_VARIATION_GLYPHS=yes
else $as_nop
  HAVE_OTF_GET_VARIATION_GLYPHS=no
fi

	if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then

printf "%s\n" "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h

	fi
      fi
    fi
  else
    HAVE_XFT=no
    HAVE_FREETYPE=no
    HAVE_LIBOTF=no
    HAVE_M17N_FLT=no
  fi
fi   # "${HAVE_X11}" != "yes"

HAVE_HARFBUZZ=no
### On MS-Windows we use hb_font_get_nominal_glyph, which appeared
### in HarfBuzz version 1.2.3
if test "${HAVE_W32}" = "yes"; then
  harfbuzz_required_ver=1.2.3
else
  harfbuzz_required_ver=0.9.42
fi
if test "${HAVE_X11}" = "yes" && test "${HAVE_FREETYPE}" = "yes" \
        || test "$window_system" = "pgtk" \
        || test "${HAVE_W32}" = "yes" \
	|| test "$REALLY_ANDROID" = "yes"; then
  if test "${with_harfbuzz}" != "no"; then
    if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "harfbuzz >= $harfbuzz_required_ver"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  HARFBUZZ_CFLAGS="$HARFBUZZ_CFLAGS $module_cflags $module_includes"
  HARFBUZZ_LIBS="$HARFBUZZ_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    HARFBUZZ_CFLAGS="$ndk_import_includes $HARFBUZZ_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_HARFBUZZ=yes
else $as_nop
  HAVE_HARFBUZZ=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for harfbuzz >= $harfbuzz_required_ver" >&5
printf %s "checking for harfbuzz >= $harfbuzz_required_ver... " >&6; }

if test -n "$HARFBUZZ_CFLAGS"; then
    pkg_cv_HARFBUZZ_CFLAGS="$HARFBUZZ_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"harfbuzz >= \$harfbuzz_required_ver\""; } >&5
  ($PKG_CONFIG --exists --print-errors "harfbuzz >= $harfbuzz_required_ver") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_HARFBUZZ_CFLAGS=`$PKG_CONFIG --cflags "harfbuzz >= $harfbuzz_required_ver" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$HARFBUZZ_LIBS"; then
    pkg_cv_HARFBUZZ_LIBS="$HARFBUZZ_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"harfbuzz >= \$harfbuzz_required_ver\""; } >&5
  ($PKG_CONFIG --exists --print-errors "harfbuzz >= $harfbuzz_required_ver") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_HARFBUZZ_LIBS=`$PKG_CONFIG --libs "harfbuzz >= $harfbuzz_required_ver" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        HARFBUZZ_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "harfbuzz >= $harfbuzz_required_ver" 2>&1`
        else
	        HARFBUZZ_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "harfbuzz >= $harfbuzz_required_ver" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$HARFBUZZ_PKG_ERRORS" >&5

	HAVE_HARFBUZZ=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_HARFBUZZ=no
else
	HARFBUZZ_CFLAGS=$pkg_cv_HARFBUZZ_CFLAGS
	HARFBUZZ_LIBS=$pkg_cv_HARFBUZZ_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	HARFBUZZ_CFLAGS=`printf "%s\n" "$HARFBUZZ_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_HARFBUZZ=yes
fi
fi
    if test "$HAVE_HARFBUZZ" = "yes"
then :


printf "%s\n" "#define HAVE_HARFBUZZ 1" >>confdefs.h

      ### mingw32 and Cygwin-w32 don't use -lharfbuzz, since they load
      ### the library dynamically.
      if test "${HAVE_W32}" = "yes"
then :
  HARFBUZZ_LIBS=
fi
      ## Now check for `hb_font_set_var_named_instance'.
      OLD_CFLAGS=$CFLAGS
      CFLAGS="$HARFBUZZ_CFLAGS $CFLAGS"
      if test -n "$ndk_INITIALIZED"
then :
  ac_fn_check_decl "$LINENO" "hb_font_set_var_named_instance" "ac_cv_have_decl_hb_font_set_var_named_instance" "#include <hb.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_hb_font_set_var_named_instance" = xyes
then :

printf "%s\n" "#define HAVE_HB_FONT_SET_VAR_NAMED_INSTANCE 1" >>confdefs.h

fi
else $as_nop
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for hb_font_set_var_named_instance in -lharfbuzz" >&5
printf %s "checking for hb_font_set_var_named_instance in -lharfbuzz... " >&6; }
if test ${ac_cv_lib_harfbuzz_hb_font_set_var_named_instance+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lharfbuzz $HARFBUZZ_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.  */
char hb_font_set_var_named_instance ();
int
main (void)
{
return hb_font_set_var_named_instance ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_harfbuzz_hb_font_set_var_named_instance=yes
else $as_nop
  ac_cv_lib_harfbuzz_hb_font_set_var_named_instance=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_harfbuzz_hb_font_set_var_named_instance" >&5
printf "%s\n" "$ac_cv_lib_harfbuzz_hb_font_set_var_named_instance" >&6; }
if test "x$ac_cv_lib_harfbuzz_hb_font_set_var_named_instance" = xyes
then :

printf "%s\n" "#define HAVE_HB_FONT_SET_VAR_NAMED_INSTANCE 1" >>confdefs.h

fi

fi
      CFLAGS=$OLD_CFLAGS
fi
  fi
fi

### Start of font-backend (under Haiku) selectionn.
if test "${HAVE_BE_APP}" = "yes"; then
  if test $HAVE_CAIRO = "yes"; then
      if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "freetype2 >= 2.5.0"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  FREETYPE_CFLAGS="$FREETYPE_CFLAGS $module_cflags $module_includes"
  FREETYPE_LIBS="$FREETYPE_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    FREETYPE_CFLAGS="$ndk_import_includes $FREETYPE_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_FREETYPE=yes
else $as_nop
  HAVE_FREETYPE=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for freetype2 >= 2.5.0" >&5
printf %s "checking for freetype2 >= 2.5.0... " >&6; }

if test -n "$FREETYPE_CFLAGS"; then
    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2 >= 2.5.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "freetype2 >= 2.5.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2 >= 2.5.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$FREETYPE_LIBS"; then
    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2 >= 2.5.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "freetype2 >= 2.5.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2 >= 2.5.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "freetype2 >= 2.5.0" 2>&1`
        else
	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "freetype2 >= 2.5.0" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$FREETYPE_PKG_ERRORS" >&5

	HAVE_FREETYPE=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_FREETYPE=no
else
	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	FREETYPE_CFLAGS=`printf "%s\n" "$FREETYPE_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_FREETYPE=yes
fi
fi
      test "$HAVE_FREETYPE" = "no" &&
	as_fn_error $? "cairo on Haiku requires libfreetype" "$LINENO" 5
      if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "fontconfig >= 2.2.0"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  FONTCONFIG_CFLAGS="$FONTCONFIG_CFLAGS $module_cflags $module_includes"
  FONTCONFIG_LIBS="$FONTCONFIG_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    FONTCONFIG_CFLAGS="$ndk_import_includes $FONTCONFIG_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_FONTCONFIG=yes
else $as_nop
  HAVE_FONTCONFIG=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
printf %s "checking for fontconfig >= 2.2.0... " >&6; }

if test -n "$FONTCONFIG_CFLAGS"; then
    pkg_cv_FONTCONFIG_CFLAGS="$FONTCONFIG_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fontconfig >= 2.2.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "fontconfig >= 2.2.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$FONTCONFIG_LIBS"; then
    pkg_cv_FONTCONFIG_LIBS="$FONTCONFIG_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fontconfig >= 2.2.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "fontconfig >= 2.2.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "fontconfig >= 2.2.0" 2>&1`
        else
	        FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "fontconfig >= 2.2.0" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$FONTCONFIG_PKG_ERRORS" >&5

	HAVE_FONTCONFIG=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_FONTCONFIG=no
else
	FONTCONFIG_CFLAGS=$pkg_cv_FONTCONFIG_CFLAGS
	FONTCONFIG_LIBS=$pkg_cv_FONTCONFIG_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	FONTCONFIG_CFLAGS=`printf "%s\n" "$FONTCONFIG_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_FONTCONFIG=yes
fi
fi
      test "$HAVE_FONTCONFIG" = "no" &&
	as_fn_error $? "cairo on Haiku requires libfontconfig" "$LINENO" 5
  fi

  HAVE_LIBOTF=no

  if test "${HAVE_FREETYPE}" = "yes"; then

printf "%s\n" "#define HAVE_FREETYPE 1" >>confdefs.h

    OLD_CFLAGS=$CFLAGS
    OLD_LIBS=$LIBS
    CFLAGS="$CFLAGS $FREETYPE_CFLAGS"
    LIBS="$FREETYPE_LIBS $LIBS"
    ac_fn_c_check_func "$LINENO" "FT_Face_GetCharVariantIndex" "ac_cv_func_FT_Face_GetCharVariantIndex"
if test "x$ac_cv_func_FT_Face_GetCharVariantIndex" = xyes
then :
  printf "%s\n" "#define HAVE_FT_FACE_GETCHARVARIANTINDEX 1" >>confdefs.h

fi

    CFLAGS=$OLD_CFLAGS
    LIBS=$OLD_LIBS
    if test "${with_libotf}" != "no"; then
      if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "libotf"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  LIBOTF_CFLAGS="$LIBOTF_CFLAGS $module_cflags $module_includes"
  LIBOTF_LIBS="$LIBOTF_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    LIBOTF_CFLAGS="$ndk_import_includes $LIBOTF_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_LIBOTF=yes
else $as_nop
  HAVE_LIBOTF=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
printf %s "checking for libotf... " >&6; }

if test -n "$LIBOTF_CFLAGS"; then
    pkg_cv_LIBOTF_CFLAGS="$LIBOTF_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libotf\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libotf") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$LIBOTF_LIBS"; then
    pkg_cv_LIBOTF_LIBS="$LIBOTF_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libotf\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libotf") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        LIBOTF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libotf" 2>&1`
        else
	        LIBOTF_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libotf" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$LIBOTF_PKG_ERRORS" >&5

	HAVE_LIBOTF=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_LIBOTF=no
else
	LIBOTF_CFLAGS=$pkg_cv_LIBOTF_CFLAGS
	LIBOTF_LIBS=$pkg_cv_LIBOTF_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	LIBOTF_CFLAGS=`printf "%s\n" "$LIBOTF_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_LIBOTF=yes
fi
fi
      if test "$HAVE_LIBOTF" = "yes"; then

printf "%s\n" "#define HAVE_LIBOTF 1" >>confdefs.h

	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
printf %s "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
if test ${ac_cv_lib_otf_OTF_get_variation_glyphs+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lotf  $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.  */
char OTF_get_variation_glyphs ();
int
main (void)
{
return OTF_get_variation_glyphs ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_otf_OTF_get_variation_glyphs=yes
else $as_nop
  ac_cv_lib_otf_OTF_get_variation_glyphs=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
printf "%s\n" "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = xyes
then :
  HAVE_OTF_GET_VARIATION_GLYPHS=yes
else $as_nop
  HAVE_OTF_GET_VARIATION_GLYPHS=no
fi

	if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then

printf "%s\n" "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h

	fi
	if $PKG_CONFIG --atleast-version=0.9.16 libotf; then :; else

printf "%s\n" "#define HAVE_OTF_KANNADA_BUG 1" >>confdefs.h

	fi
      fi
    fi
      fi
fi

if test "${HAVE_BE_APP}" = "yes" && test "${HAVE_FREETYPE}" = "yes"; then
  if test "${with_harfbuzz}" != "no"; then
    if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "harfbuzz >= $harfbuzz_required_ver"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  HARFBUZZ_CFLAGS="$HARFBUZZ_CFLAGS $module_cflags $module_includes"
  HARFBUZZ_LIBS="$HARFBUZZ_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    HARFBUZZ_CFLAGS="$ndk_import_includes $HARFBUZZ_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_HARFBUZZ=yes
else $as_nop
  HAVE_HARFBUZZ=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for harfbuzz >= $harfbuzz_required_ver" >&5
printf %s "checking for harfbuzz >= $harfbuzz_required_ver... " >&6; }

if test -n "$HARFBUZZ_CFLAGS"; then
    pkg_cv_HARFBUZZ_CFLAGS="$HARFBUZZ_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"harfbuzz >= \$harfbuzz_required_ver\""; } >&5
  ($PKG_CONFIG --exists --print-errors "harfbuzz >= $harfbuzz_required_ver") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_HARFBUZZ_CFLAGS=`$PKG_CONFIG --cflags "harfbuzz >= $harfbuzz_required_ver" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$HARFBUZZ_LIBS"; then
    pkg_cv_HARFBUZZ_LIBS="$HARFBUZZ_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"harfbuzz >= \$harfbuzz_required_ver\""; } >&5
  ($PKG_CONFIG --exists --print-errors "harfbuzz >= $harfbuzz_required_ver") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_HARFBUZZ_LIBS=`$PKG_CONFIG --libs "harfbuzz >= $harfbuzz_required_ver" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        HARFBUZZ_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "harfbuzz >= $harfbuzz_required_ver" 2>&1`
        else
	        HARFBUZZ_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "harfbuzz >= $harfbuzz_required_ver" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$HARFBUZZ_PKG_ERRORS" >&5

	HAVE_HARFBUZZ=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_HARFBUZZ=no
else
	HARFBUZZ_CFLAGS=$pkg_cv_HARFBUZZ_CFLAGS
	HARFBUZZ_LIBS=$pkg_cv_HARFBUZZ_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	HARFBUZZ_CFLAGS=`printf "%s\n" "$HARFBUZZ_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_HARFBUZZ=yes
fi
fi
    if test "$HAVE_HARFBUZZ" = "yes"; then

printf "%s\n" "#define HAVE_HARFBUZZ 1" >>confdefs.h

    fi
  fi
fi

### End of font-backend section.












XCB_LIBS=
if test "${HAVE_X11}" = "yes"; then
  ac_fn_c_check_header_compile "$LINENO" "X11/Xlib-xcb.h" "ac_cv_header_X11_Xlib_xcb_h" "$ac_includes_default"
if test "x$ac_cv_header_X11_Xlib_xcb_h" = xyes
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for xcb_translate_coordinates in -lxcb" >&5
printf %s "checking for xcb_translate_coordinates in -lxcb... " >&6; }
if test ${ac_cv_lib_xcb_xcb_translate_coordinates+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lxcb  $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.  */
char xcb_translate_coordinates ();
int
main (void)
{
return xcb_translate_coordinates ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_xcb_xcb_translate_coordinates=yes
else $as_nop
  ac_cv_lib_xcb_xcb_translate_coordinates=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xcb_xcb_translate_coordinates" >&5
printf "%s\n" "$ac_cv_lib_xcb_xcb_translate_coordinates" >&6; }
if test "x$ac_cv_lib_xcb_xcb_translate_coordinates" = xyes
then :
  HAVE_XCB=yes
fi

fi

  if test "${HAVE_XCB}" = "yes"; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XGetXCBConnection in -lX11-xcb" >&5
printf %s "checking for XGetXCBConnection in -lX11-xcb... " >&6; }
if test ${ac_cv_lib_X11_xcb_XGetXCBConnection+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lX11-xcb  $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.  */
char XGetXCBConnection ();
int
main (void)
{
return XGetXCBConnection ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_X11_xcb_XGetXCBConnection=yes
else $as_nop
  ac_cv_lib_X11_xcb_XGetXCBConnection=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_X11_xcb_XGetXCBConnection" >&5
printf "%s\n" "$ac_cv_lib_X11_xcb_XGetXCBConnection" >&6; }
if test "x$ac_cv_lib_X11_xcb_XGetXCBConnection" = xyes
then :
  HAVE_X11_XCB=yes
fi

    if test "${HAVE_X11_XCB}" = "yes"; then

printf "%s\n" "#define USE_XCB 1" >>confdefs.h

      XCB_LIBS="-lX11-xcb -lxcb"
    fi
  fi
fi


### Use -lXpm if available, unless '--with-xpm=no'.
### mingw32 doesn't use -lXpm, since it loads the library dynamically.
### The Cygwin-w32 build uses <noX/xpm.h> instead of <X11/xpm.h>, so
### we need to set LDFLAGS accordingly.
HAVE_XPM=no
LIBXPM=
if test "${HAVE_W32}" = "yes" && test "${opsys}" = "cygwin"; then
  if test "${with_xpm}" != "no"; then
    SAVE_LDFLAGS="$LDFLAGS"
    LDFLAGS="$LDFLAGS -L/usr/lib/noX"
    ac_fn_c_check_header_compile "$LINENO" "noX/xpm.h" "ac_cv_header_noX_xpm_h" "$ac_includes_default"
if test "x$ac_cv_header_noX_xpm_h" = xyes
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToImage in -lXpm" >&5
printf %s "checking for XpmReadFileToImage in -lXpm... " >&6; }
if test ${ac_cv_lib_Xpm_XpmReadFileToImage+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lXpm  $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.  */
char XpmReadFileToImage ();
int
main (void)
{
return XpmReadFileToImage ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_Xpm_XpmReadFileToImage=yes
else $as_nop
  ac_cv_lib_Xpm_XpmReadFileToImage=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToImage" >&5
printf "%s\n" "$ac_cv_lib_Xpm_XpmReadFileToImage" >&6; }
if test "x$ac_cv_lib_Xpm_XpmReadFileToImage" = xyes
then :
  HAVE_XPM=yes
fi

fi

    if test "${HAVE_XPM}" = "yes"; then
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
printf %s "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
if test ${emacs_cv_cpp_xpm_return_alloc_pixels+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include "noX/xpm.h"
#ifndef XpmReturnAllocPixels
no_return_alloc_pixels
#endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "no_return_alloc_pixels" >/dev/null 2>&1
then :
  emacs_cv_cpp_xpm_return_alloc_pixels=no
else $as_nop
  emacs_cv_cpp_xpm_return_alloc_pixels=yes
fi
rm -rf conftest*

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_cpp_xpm_return_alloc_pixels" >&5
printf "%s\n" "$emacs_cv_cpp_xpm_return_alloc_pixels" >&6; }

      if test "$emacs_cv_cpp_xpm_return_alloc_pixels" = "no"; then
        HAVE_XPM=no
        LDFLAGS="$SAVE_LDFLAGS"
      fi
    fi
  fi

  if test "${HAVE_XPM}" = "yes"; then

printf "%s\n" "#define HAVE_XPM 1" >>confdefs.h

    LIBXPM=-lXpm
  fi
fi

if test "${HAVE_X11}" = "yes"; then
    case $opsys,$with_xpm_set,$with_xpm in
    aix4-2,set,yes) ;;
    aix4-2,*) with_xpm=no;;
  esac

  if test "${with_xpm}" != "no"; then
    ac_fn_c_check_header_compile "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
if test "x$ac_cv_header_X11_xpm_h" = xyes
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5
printf %s "checking for XpmReadFileToPixmap in -lXpm... " >&6; }
if test ${ac_cv_lib_Xpm_XpmReadFileToPixmap+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lXpm -lX11 $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.  */
char XpmReadFileToPixmap ();
int
main (void)
{
return XpmReadFileToPixmap ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
else $as_nop
  ac_cv_lib_Xpm_XpmReadFileToPixmap=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
printf "%s\n" "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = xyes
then :
  HAVE_XPM=yes
fi

fi

    if test "${HAVE_XPM}" = "yes"; then
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
printf %s "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
if test ${emacs_cv_cpp_xpm_return_alloc_pixels+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include "X11/xpm.h"
#ifndef XpmReturnAllocPixels
no_return_alloc_pixels
#endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "no_return_alloc_pixels" >/dev/null 2>&1
then :
  emacs_cv_cpp_xpm_return_alloc_pixels=no
else $as_nop
  emacs_cv_cpp_xpm_return_alloc_pixels=yes
fi
rm -rf conftest*

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_cpp_xpm_return_alloc_pixels" >&5
printf "%s\n" "$emacs_cv_cpp_xpm_return_alloc_pixels" >&6; }

      if test "$emacs_cv_cpp_xpm_return_alloc_pixels" = "no"; then
	HAVE_XPM=no
      fi
    fi
  fi

  if test "${HAVE_XPM}" = "yes"; then

printf "%s\n" "#define HAVE_XPM 1" >>confdefs.h

    LIBXPM=-lXpm
  elif test "$opsys,$LUCID_LIBW" = aix4-2,-lXaw; then
        LIBXPM=-lXpm
  fi
fi

### FIXME: Perhaps regroup to minimize code duplication due to MinGW's
### slightly different requirements wrt image libraries (it doesn't
### use -lXpm because it loads the xpm shared library dynamically at
### run time).
if test "${opsys}" = "mingw32"; then
  if test "${with_xpm}" != "no"; then
    ac_fn_c_check_header_compile "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "
#define FOR_MSW 1
"
if test "x$ac_cv_header_X11_xpm_h" = xyes
then :
  HAVE_XPM=yes
else $as_nop
  HAVE_XPM=no
fi

  fi

  if test "${HAVE_XPM}" = "yes"; then

printf "%s\n" "#define HAVE_XPM 1" >>confdefs.h

  fi
fi



### Use -ljpeg if available, unless '--with-jpeg=no'.
HAVE_JPEG=no
LIBJPEG=
JPEG_CFLAGS=
if test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes" \
   || test "${HAVE_NS}" = "yes" || test "${HAVE_BE_APP}" = "yes" \
   || test "$window_system" = "pgtk" \
   || test "${REALLY_ANDROID}" = "yes"; then
  if test "${with_jpeg}" != "no"; then
    if test "${REALLY_ANDROID}" = "yes"; then
      # Look for libjpeg using the NDK.

module_name=
ndk_module=libjpeg
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module libjpeg requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  JPEG_CFLAGS="$JPEG_CFLAGS $module_cflags $module_includes"
  JPEG_LIBS="$JPEG_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  HAVE_JPEG=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    JPEG_CFLAGS="$ndk_import_includes $JPEG_CFLAGS"
  done
fi


      if test "$HAVE_JPEG" = "yes"; then
        LIBJPEG="$JPEG_LIBS"


printf "%s\n" "#define HAVE_JPEG 1" >>confdefs.h

      fi
    else
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for jpeglib 6b or later" >&5
printf %s "checking for jpeglib 6b or later... " >&6; }
if test ${emacs_cv_jpeglib+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  OLD_LIBS=$LIBS
	 for emacs_cv_jpeglib in yes -ljpeg no; do
	   case $emacs_cv_jpeglib in
	     yes) ;;
	     no) break;;
	     *) LIBS="$LIBS $emacs_cv_jpeglib";;
	   esac
	   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#undef HAVE_STDLIB_H /* Avoid config.h/jpeglib.h collision.  */
		  #include <stdio.h> /* jpeglib.h needs FILE and size_t.  */
		  #include <jpeglib.h>
		  #include <jerror.h>
		  char verify[JPEG_LIB_VERSION < 62 ? -1 : 1];
		  struct jpeg_decompress_struct cinfo;

int
main (void)
{

		  jpeg_create_decompress (&cinfo);
		  WARNMS (&cinfo, JWRN_JPEG_EOF);
		  jpeg_destroy_decompress (&cinfo);

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  emacs_link_ok=yes
else $as_nop
  emacs_link_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	   LIBS=$OLD_LIBS
	   test $emacs_link_ok = yes && break
	 done
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_jpeglib" >&5
printf "%s\n" "$emacs_cv_jpeglib" >&6; }
      if test "$emacs_cv_jpeglib" != no; then
	HAVE_JPEG=yes

printf "%s\n" "#define HAVE_JPEG 1" >>confdefs.h

	### mingw32 doesn't use -ljpeg, since it loads the library
	### dynamically when needed, and doesn't want a run-time
	### dependency on the jpeglib DLL.
	test "$emacs_cv_jpeglib" != yes && test "${opsys}" != "mingw32" \
	&& LIBJPEG=$emacs_cv_jpeglib
      fi
    fi
  fi
fi



HAVE_LCMS2=no
LCMS2_CFLAGS=
LCMS2_LIBS=
if test "${with_lcms2}" != "no"; then
  if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "lcms2"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  LCMS2_CFLAGS="$LCMS2_CFLAGS $module_cflags $module_includes"
  LCMS2_LIBS="$LCMS2_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    LCMS2_CFLAGS="$ndk_import_includes $LCMS2_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_LCMS2=yes
else $as_nop
  HAVE_LCMS2=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lcms2" >&5
printf %s "checking for lcms2... " >&6; }

if test -n "$LCMS2_CFLAGS"; then
    pkg_cv_LCMS2_CFLAGS="$LCMS2_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LCMS2_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$LCMS2_LIBS"; then
    pkg_cv_LCMS2_LIBS="$LCMS2_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LCMS2_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        LCMS2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "lcms2" 2>&1`
        else
	        LCMS2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "lcms2" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$LCMS2_PKG_ERRORS" >&5

	HAVE_LCMS2=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_LCMS2=no
else
	LCMS2_CFLAGS=$pkg_cv_LCMS2_CFLAGS
	LCMS2_LIBS=$pkg_cv_LCMS2_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	LCMS2_CFLAGS=`printf "%s\n" "$LCMS2_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_LCMS2=yes
fi
fi
fi
if test "${HAVE_LCMS2}" = "yes"; then

printf "%s\n" "#define HAVE_LCMS2 1" >>confdefs.h

  ### mingw32 doesn't use -llcms2, since it loads the library dynamically.
  if test "${opsys}" = "mingw32"; then
     LCMS2_LIBS=
  fi
fi



HAVE_ZLIB=no
LIBZ=
if test "${with_zlib}" != "no"; then
  OLIBS=$LIBS
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inflateEnd" >&5
printf %s "checking for library containing inflateEnd... " >&6; }
if test ${ac_cv_search_inflateEnd+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  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.  */
char inflateEnd ();
int
main (void)
{
return inflateEnd ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' z
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_inflateEnd=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext
  if test ${ac_cv_search_inflateEnd+y}
then :
  break
fi
done
if test ${ac_cv_search_inflateEnd+y}
then :

else $as_nop
  ac_cv_search_inflateEnd=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inflateEnd" >&5
printf "%s\n" "$ac_cv_search_inflateEnd" >&6; }
ac_res=$ac_cv_search_inflateEnd
if test "$ac_res" != no
then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  HAVE_ZLIB=yes
fi

  LIBS=$OLIBS
  case $ac_cv_search_inflateEnd in
    -*) LIBZ=$ac_cv_search_inflateEnd ;;
  esac
fi
if test "${HAVE_ZLIB}" = "yes"; then

printf "%s\n" "#define HAVE_ZLIB 1" >>confdefs.h

  ### mingw32 doesn't use -lz, since it loads the library dynamically.
  if test "${opsys}" = "mingw32"; then
     LIBZ=
  fi
fi


### Dynamic library support
case $opsys in
  cygwin|mingw32) DYNAMIC_LIB_SUFFIX=".dll" ;;
  darwin) DYNAMIC_LIB_SUFFIX=".dylib" ;;
  *) DYNAMIC_LIB_SUFFIX=".so" ;;
esac
case "${opsys}" in
  darwin) DYNAMIC_LIB_SECONDARY_SUFFIX='.so' ;;
  *) DYNAMIC_LIB_SECONDARY_SUFFIX='' ;;
esac

printf "%s\n" "#define DYNAMIC_LIB_SUFFIX \"$DYNAMIC_LIB_SUFFIX\"" >>confdefs.h


printf "%s\n" "#define DYNAMIC_LIB_SECONDARY_SUFFIX \"$DYNAMIC_LIB_SECONDARY_SUFFIX\"" >>confdefs.h





### Dynamic modules support
LIBMODULES=
HAVE_MODULES=no
MODULES_OBJ=
MODULES_SUFFIX="${DYNAMIC_LIB_SUFFIX}"
MODULES_SECONDARY_SUFFIX="${DYNAMIC_LIB_SECONDARY_SUFFIX}"

# pgtkterm.c uses dlsym
if test $window_system = pgtk; then
  case $opsys in
    gnu|gnu-linux)
    LIBMODULES="-ldl"
    ;;
  esac
fi

if test "x$with_modules" != "xno"
then :
  case "$opsys" in #(
  gnu|gnu-linux) :
    LIBMODULES="-ldl"
       HAVE_MODULES=yes ;; #(
  cygwin|mingw32|darwin) :
    HAVE_MODULES=yes ;; #(
  *) :
    # BSD systems have dlopen in libc.
    ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
if test "x$ac_cv_func_dlopen" = xyes
then :
  HAVE_MODULES=yes
fi
 ;;
esac

  if test "x$HAVE_MODULES" = "xno"
then :
  if test "$with_modules" = "ifavailable"
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Dynamic modules are not supported on your system" >&5
printf "%s\n" "$as_me: WARNING: Dynamic modules are not supported on your system" >&2;}
else $as_nop
  as_fn_error $? "Dynamic modules are not supported on your system" "$LINENO" 5
fi
else $as_nop
  SAVE_LIBS=$LIBS
     LIBS="$LIBS $LIBMODULES"
     ac_fn_c_check_func "$LINENO" "dladdr" "ac_cv_func_dladdr"
if test "x$ac_cv_func_dladdr" = xyes
then :
  printf "%s\n" "#define HAVE_DLADDR 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "dlfunc" "ac_cv_func_dlfunc"
if test "x$ac_cv_func_dlfunc" = xyes
then :
  printf "%s\n" "#define HAVE_DLFUNC 1" >>confdefs.h

fi

     LIBS=$SAVE_LIBS
fi
fi

if test "x$HAVE_MODULES" = xyes
then :
  MODULES_OBJ="emacs-module.o"
    NEED_DYNLIB=yes

printf "%s\n" "#define HAVE_MODULES 1" >>confdefs.h


printf "%s\n" "#define MODULES_SUFFIX \"$MODULES_SUFFIX\"" >>confdefs.h

    if test -n "$MODULES_SECONDARY_SUFFIX"
then :

printf "%s\n" "#define MODULES_SECONDARY_SUFFIX \"$MODULES_SECONDARY_SUFFIX\"" >>confdefs.h

fi
fi








  if test "$XCONFIGURE" != "android"
then :
  ac_config_files="$ac_config_files src/emacs-module.h"

fi






module_env_snippet_25="$srcdir/src/module-env-25.h"
module_env_snippet_26="$srcdir/src/module-env-26.h"
module_env_snippet_27="$srcdir/src/module-env-27.h"
module_env_snippet_28="$srcdir/src/module-env-28.h"
module_env_snippet_29="$srcdir/src/module-env-29.h"
module_env_snippet_30="$srcdir/src/module-env-30.h"
emacs_major_version=`printf "%s\n" $PACKAGE_VERSION | sed 's/[.].*//'`


### Emacs Lisp native compiler support









HAVE_NATIVE_COMP=no
LIBGCCJIT_LIBS=
LIBGCCJIT_CFLAGS=
if test "$canonical" = i686-pc-cygwin; then
  if test "${with_cygwin32_native_compilation}" = yes; then
    with_native_compilation=yes
  elif test "${with_native_compilation}" != no; then
    as_fn_error $? "Native compilation is not supported on 32-bit Cygwin.
If you really want to try it anyway, use the configure option
'--with-cygwin32-native-compilation'." "$LINENO" 5
  fi
fi







if test "$with_features" = "no" \
   && test "${with_native_compilation}" = "default"; then
  with_native_compilation=no
fi

if test "${with_native_compilation}" = "default"; then
    # Check if libgccjit is available.
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gcc_jit_context_acquire in -lgccjit" >&5
printf %s "checking for gcc_jit_context_acquire in -lgccjit... " >&6; }
if test ${ac_cv_lib_gccjit_gcc_jit_context_acquire+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lgccjit  $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.  */
char gcc_jit_context_acquire ();
int
main (void)
{
return gcc_jit_context_acquire ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_gccjit_gcc_jit_context_acquire=yes
else $as_nop
  ac_cv_lib_gccjit_gcc_jit_context_acquire=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gccjit_gcc_jit_context_acquire" >&5
printf "%s\n" "$ac_cv_lib_gccjit_gcc_jit_context_acquire" >&6; }
if test "x$ac_cv_lib_gccjit_gcc_jit_context_acquire" = xyes
then :
  printf "%s\n" "#define HAVE_LIBGCCJIT 1" >>confdefs.h

  LIBS="-lgccjit $LIBS"

else $as_nop

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Elisp native compiler can't be enabled as libgccjit was not
found.
Please try installing libgccjit or a similar package if you want to have it
enabled." >&5
printf "%s\n" "$as_me: WARNING: Elisp native compiler can't be enabled as libgccjit was not
found.
Please try installing libgccjit or a similar package if you want to have it
enabled." >&2;}

  with_native_compilation=no

fi

           for ac_header in libgccjit.h
do :
  ac_fn_c_check_header_compile "$LINENO" "libgccjit.h" "ac_cv_header_libgccjit_h" "$ac_includes_default"
if test "x$ac_cv_header_libgccjit_h" = xyes
then :
  printf "%s\n" "#define HAVE_LIBGCCJIT_H 1" >>confdefs.h

else $as_nop

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Elisp native compiler can't be enabled as libgccjit header files
were not found.
Please try installing libgccjit-dev or a similar package if you want to have it
enabled." >&5
printf "%s\n" "$as_me: WARNING: Elisp native compiler can't be enabled as libgccjit header files
were not found.
Please try installing libgccjit-dev or a similar package if you want to have it
enabled." >&2;}

  with_native_compilation=no

fi

done
    if test "${with_native_compilation}" != "no"; then
      # Check if libgccjit really works.
      if test "$cross_compiling" = yes
then :
  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run test program while cross compiling
See \`config.log' for more details" "$LINENO" 5; }
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

  #include <libgccjit.h>
      #include <stdlib.h>
      #include <stdio.h>
      int
      main (int argc, char **argv)
      {
        gcc_jit_context *ctxt;
        gcc_jit_result *result;
        ctxt = gcc_jit_context_acquire ();
        if (!ctxt)
          exit (1);
        gcc_jit_type *int_type =
          gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_INT);
        gcc_jit_function *func =
          gcc_jit_context_new_function (ctxt, NULL,
                                        GCC_JIT_FUNCTION_EXPORTED,
                                        int_type, "foo", 0, NULL, 0);
        gcc_jit_block *block = gcc_jit_function_new_block (func, "foo");
        gcc_jit_block_end_with_return (
          block,
          NULL,
          gcc_jit_context_new_rvalue_from_int (ctxt, int_type, 1));
        result = gcc_jit_context_compile (ctxt);
        if (!result)
          exit (1);
        typedef int (*fn_type) (void);
        fn_type foo =
          (fn_type)gcc_jit_result_get_code (result, "foo");
        if (!foo)
          exit (1);
        if (foo () != 1)
          exit (1);
        gcc_jit_context_release (ctxt);
        gcc_jit_result_release (result);
        return 0;
      }
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :

else $as_nop

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Elisp native compiler can't be enabled as the installed libgccjit
failed to compile and run a test program using the libgccjit library; see
config.log for the details of the failure.
The test program can be found here:
<https://gcc.gnu.org/onlinedocs/jit/intro/tutorial01.html>.
You can try compiling it yourself to investigate the issues.
Please report the issue to your distribution if libgccjit was installed
through that.
You can find the instructions on how to compile and install libgccjit from
source on this site:
<https://gcc.gnu.org/wiki/JIT>." >&5
printf "%s\n" "$as_me: WARNING: Elisp native compiler can't be enabled as the installed libgccjit
failed to compile and run a test program using the libgccjit library; see
config.log for the details of the failure.
The test program can be found here:
<https://gcc.gnu.org/onlinedocs/jit/intro/tutorial01.html>.
You can try compiling it yourself to investigate the issues.
Please report the issue to your distribution if libgccjit was installed
through that.
You can find the instructions on how to compile and install libgccjit from
source on this site:
<https://gcc.gnu.org/wiki/JIT>." >&2;}

  with_native_compilation=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
    if test "$with_unexec" = yes; then
      with_native_compilation=no
    fi
fi

if test "${with_native_compilation}" != "no"; then
    if test "$with_unexec" = yes; then
       as_fn_error $? "'--with-native-compilation' is not compatible with unexec" "$LINENO" 5
    fi
    if test "${HAVE_ZLIB}" = no; then
       as_fn_error $? "'--with-native-compilation' requires zlib" "$LINENO" 5
    fi

    SAVE_CFLAGS=$CFLAGS
    SAVE_LIBS=$LIBS

    if test "${opsys}" = "darwin"; then
      # Ensure libgccjit installed by Homebrew or macports can be found.
      if test -n "$BREW"; then
        if test -n "`$BREW --prefix --installed libgccjit 2>/dev/null`"; then
          MAC_CFLAGS="-I$(dirname $($BREW ls -v libgccjit | \
                                                grep libgccjit.h))"
          MAC_LIBS="-L$(dirname $($BREW ls -v libgccjit \
                                  | grep -m1 -E 'libgccjit\.(so|dylib)$'))"
        fi
      fi

      if test -n "$HAVE_MACPORTS"; then
        # Determine which gcc version has been installed (gcc11, for
        # instance). Use the latest version, if more than one is
        # available.  (We filter out the gcc4 packages, because they
        # don't support jit, and they have names like "gcc49" that
        # sort later than "gcc11".)
        PORT_PACKAGE=`port installed active | grep '^ *gcc[0-9]* ' | \
                            awk '{ print $1; }' | grep -v 'gcc4[0-9]' | \
                            sort -V | tail -n 1`
        if test -n "$PORT_PACKAGE"; then
	  emacs_val=`port contents $PORT_PACKAGE | grep libgccjit.h`
	  emacs_val=`dirname $emacs_val`
          MAC_CFLAGS="-I$emacs_val"
	  emacs_val=`port contents $PORT_PACKAGE | grep libgccjit.dylib`
	  emacs_val=`dirname $emacs_val`
          MAC_LIBS="-L$emacs_val"
        fi
      fi

      if test -n "$MAC_CFLAGS" && test -n "$MAC_LIBS"; then
        CFLAGS="$CFLAGS ${MAC_CFLAGS}"
        LIBS="$LIBS ${MAC_LIBS}"
      fi
    fi

    # In the default case we already checked
    if test "${with_native_compilation}" != "default"; then
      # Check if libgccjit is available.
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gcc_jit_context_acquire in -lgccjit" >&5
printf %s "checking for gcc_jit_context_acquire in -lgccjit... " >&6; }
if test ${ac_cv_lib_gccjit_gcc_jit_context_acquire+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lgccjit  $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.  */
char gcc_jit_context_acquire ();
int
main (void)
{
return gcc_jit_context_acquire ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_gccjit_gcc_jit_context_acquire=yes
else $as_nop
  ac_cv_lib_gccjit_gcc_jit_context_acquire=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gccjit_gcc_jit_context_acquire" >&5
printf "%s\n" "$ac_cv_lib_gccjit_gcc_jit_context_acquire" >&6; }
if test "x$ac_cv_lib_gccjit_gcc_jit_context_acquire" = xyes
then :
  printf "%s\n" "#define HAVE_LIBGCCJIT 1" >>confdefs.h

  LIBS="-lgccjit $LIBS"

else $as_nop

  as_fn_error $? "ELisp native compiler was requested, but libgccjit was not found.
Please try installing libgccjit or a similar package.
If you are sure you want Emacs be compiled without ELisp native compiler,
pass the --without-native-compilation option to configure." "$LINENO" 5
fi

             for ac_header in libgccjit.h
do :
  ac_fn_c_check_header_compile "$LINENO" "libgccjit.h" "ac_cv_header_libgccjit_h" "$ac_includes_default"
if test "x$ac_cv_header_libgccjit_h" = xyes
then :
  printf "%s\n" "#define HAVE_LIBGCCJIT_H 1" >>confdefs.h

else $as_nop

  as_fn_error $? "ELisp native compiler was requested, but libgccjit header files were
not found.
Please try installing libgccjit-dev or a similar package.
If you are sure you want Emacs be compiled without ELisp native compiler,
pass the --without-native-compilation option to configure." "$LINENO" 5
fi

done
      # Check if libgccjit really works.
      if test "$cross_compiling" = yes
then :
  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run test program while cross compiling
See \`config.log' for more details" "$LINENO" 5; }
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

  #include <libgccjit.h>
      #include <stdlib.h>
      #include <stdio.h>
      int
      main (int argc, char **argv)
      {
        gcc_jit_context *ctxt;
        gcc_jit_result *result;
        ctxt = gcc_jit_context_acquire ();
        if (!ctxt)
          exit (1);
        gcc_jit_type *int_type =
          gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_INT);
        gcc_jit_function *func =
          gcc_jit_context_new_function (ctxt, NULL,
                                        GCC_JIT_FUNCTION_EXPORTED,
                                        int_type, "foo", 0, NULL, 0);
        gcc_jit_block *block = gcc_jit_function_new_block (func, "foo");
        gcc_jit_block_end_with_return (
          block,
          NULL,
          gcc_jit_context_new_rvalue_from_int (ctxt, int_type, 1));
        result = gcc_jit_context_compile (ctxt);
        if (!result)
          exit (1);
        typedef int (*fn_type) (void);
        fn_type foo =
          (fn_type)gcc_jit_result_get_code (result, "foo");
        if (!foo)
          exit (1);
        if (foo () != 1)
          exit (1);
        gcc_jit_context_release (ctxt);
        gcc_jit_result_release (result);
        return 0;
      }
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :

else $as_nop

  as_fn_error $? "The installed libgccjit failed to compile and run a test program using
the libgccjit library; see config.log for the details of the failure.
The test program can be found here:
<https://gcc.gnu.org/onlinedocs/jit/intro/tutorial01.html>.
You can try compiling it yourself to investigate the issues.
Please report the issue to your distribution if libgccjit was installed
through that.
You can find the instructions on how to compile and install libgccjit from
source on this site:
<https://gcc.gnu.org/wiki/JIT>." "$LINENO" 5
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

    fi
    HAVE_NATIVE_COMP=yes
    case "${opsys}" in
      # mingw32 loads the library dynamically.
      mingw32) ;;
      # Neither NetBSD, OpenBSD nor Haiku have libdl, with all dynamic
      # linker functions placed within libc.
      netbsd|openbsd|haiku)
        LIBGCCJIT_LIBS="-lgccjit" ;;
      darwin)
        LIBGCCJIT_CFLAGS="${MAC_CFLAGS}"
        LIBGCCJIT_LIBS="${MAC_LIBS} -lgccjit -ldl";;
      *)
        LIBGCCJIT_LIBS="-lgccjit -ldl" ;;
    esac
    NEED_DYNLIB=yes

printf "%s\n" "#define HAVE_NATIVE_COMP 1" >>confdefs.h


    CFLAGS=$SAVE_CFLAGS
    LIBS=$SAVE_LIBS
fi

printf "%s\n" "#define NATIVE_ELISP_SUFFIX \".eln\"" >>confdefs.h





DYNLIB_OBJ=
if test "${NEED_DYNLIB}" = yes; then
  DYNLIB_OBJ="dynlib.o"
fi


### Use -lpng if available, unless '--with-png=no'.
HAVE_PNG=no
LIBPNG=
PNG_CFLAGS=
if test "${with_png}" != no; then
  # mingw32 loads the library dynamically.
  if test "$opsys" = mingw32; then
    ac_fn_c_check_header_compile "$LINENO" "png.h" "ac_cv_header_png_h" "$ac_includes_default"
if test "x$ac_cv_header_png_h" = xyes
then :
  HAVE_PNG=yes
fi

  elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes" \
       || test "${HAVE_NS}" = "yes" || test "${HAVE_BE_APP}" = "yes" \
       || test "$window_system" = "pgtk" \
       || test "${REALLY_ANDROID}" = "yes"; then
    if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "libpng >= 1.0.0"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  PNG_CFLAGS="$PNG_CFLAGS $module_cflags $module_includes"
  PNG_LIBS="$PNG_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    PNG_CFLAGS="$ndk_import_includes $PNG_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_PNG=yes
else $as_nop
  HAVE_PNG=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libpng >= 1.0.0" >&5
printf %s "checking for libpng >= 1.0.0... " >&6; }

if test -n "$PNG_CFLAGS"; then
    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng >= 1.0.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libpng >= 1.0.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng >= 1.0.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$PNG_LIBS"; then
    pkg_cv_PNG_LIBS="$PNG_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng >= 1.0.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libpng >= 1.0.0") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng >= 1.0.0" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libpng >= 1.0.0" 2>&1`
        else
	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libpng >= 1.0.0" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$PNG_PKG_ERRORS" >&5

	HAVE_PNG=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_PNG=no
else
	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
	PNG_LIBS=$pkg_cv_PNG_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	PNG_CFLAGS=`printf "%s\n" "$PNG_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_PNG=yes
fi
fi
    if test $HAVE_PNG = yes; then
      LIBPNG=$PNG_LIBS
    else
      # Test old way in case pkg-config doesn't have it (older machines).
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libpng not configured by pkg-config" >&5
printf %s "checking for libpng not configured by pkg-config... " >&6; }

      png_cflags=`(libpng-config --cflags) 2>&5` &&
      png_ldflags=`(libpng-config --ldflags) 2>&5` || {
	# libpng-config does not work; configure by hand.
	# Debian unstable as of July 2003 has multiple libpngs, and puts png.h
	# in /usr/include/libpng.
	if test -r /usr/include/libpng/png.h &&
	   test ! -r /usr/include/png.h; then
	  png_cflags=-I/usr/include/libpng
	else
	  png_cflags=
	fi
	png_ldflags='-lpng'
      }
      SAVE_CFLAGS=$CFLAGS
      SAVE_LIBS=$LIBS
      CFLAGS="$CFLAGS $png_cflags"
      LIBS="$png_ldflags -lz -lm $LIBS"
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <png.h>
int
main (void)
{
return !png_get_channels (0, 0);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  HAVE_PNG=yes
	 PNG_CFLAGS=`printf "%s\n" "$png_cflags" | sed -e "$edit_cflags"`
	 LIBPNG=$png_ldflags
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
      CFLAGS=$SAVE_CFLAGS
      LIBS=$SAVE_LIBS
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_PNG" >&5
printf "%s\n" "$HAVE_PNG" >&6; }
    fi

    # $LIBPNG requires explicit -lz in some cases.
    # We don't know what those cases are, exactly, so play it safe and
    # append -lz to any nonempty $LIBPNG, unless we're already using LIBZ.
    case " $LIBPNG ",$LIBZ in
      *' -lz '*, | *' ',?*) ;;
      *) LIBPNG="$LIBPNG -lz" ;;
    esac
  fi
fi
if test $HAVE_PNG = yes; then

printf "%s\n" "#define HAVE_PNG 1" >>confdefs.h


  SAVE_CFLAGS=$CFLAGS
  CFLAGS="$CFLAGS $PNG_CFLAGS"
  ac_fn_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#include <png.h>

" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_png_longjmp" = xyes
then :

else $as_nop

printf "%s\n" "#define PNG_DEPSTRUCT /**/" >>confdefs.h

fi
  CFLAGS=$SAVE_CFLAGS
fi



### Use -ltiff if available, unless '--with-tiff=no'.
### mingw32 doesn't use -ltiff, since it loads the library dynamically.
HAVE_TIFF=no
LIBTIFF=
TIFF_CFLAGS=
if test "${opsys}" = "mingw32"; then
  if test "${with_tiff}" != "no"; then
    ac_fn_c_check_header_compile "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
if test "x$ac_cv_header_tiffio_h" = xyes
then :
  HAVE_TIFF=yes
else $as_nop
  HAVE_TIFF=no
fi

  fi
  if test "${HAVE_TIFF}" = "yes"; then

printf "%s\n" "#define HAVE_TIFF 1" >>confdefs.h

  fi
elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes" \
     || test "${HAVE_NS}" = "yes" || test "${HAVE_BE_APP}" = "yes" \
     || test "$window_system" = "pgtk" \
     || test "${REALLY_ANDROID}" = "yes"; then
  if test "${with_tiff}" != "no"; then
    if test "${REALLY_ANDROID}" != "yes"; then
      ac_fn_c_check_header_compile "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
if test "x$ac_cv_header_tiffio_h" = xyes
then :
  tifflibs="-lz -lm"
	# At least one tiff package requires the jpeg library.
	if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5
printf %s "checking for TIFFGetVersion in -ltiff... " >&6; }
if test ${ac_cv_lib_tiff_TIFFGetVersion+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ltiff $tifflibs $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.  */
char TIFFGetVersion ();
int
main (void)
{
return TIFFGetVersion ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_tiff_TIFFGetVersion=yes
else $as_nop
  ac_cv_lib_tiff_TIFFGetVersion=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
printf "%s\n" "$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
if test "x$ac_cv_lib_tiff_TIFFGetVersion" = xyes
then :
  HAVE_TIFF=yes
fi

fi

    else

module_name=
ndk_module=libtiff
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module libtiff requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  TIFF_CFLAGS="$TIFF_CFLAGS $module_cflags $module_includes"
  TIFF_LIBS="$TIFF_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  HAVE_TIFF=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    TIFF_CFLAGS="$ndk_import_includes $TIFF_CFLAGS"
  done
fi


      if test "$HAVE_TIFF" = "yes"; then
        LIBTIFF="$TIFF_LIBS"
      fi
    fi
  fi

  if test "${HAVE_TIFF}" = "yes"; then

printf "%s\n" "#define HAVE_TIFF 1" >>confdefs.h


    if test "$REALLY_ANDROID" != "yes"; then
            LIBTIFF=-ltiff
    fi
  fi
fi



### Use -lgif or -lungif if available, unless '--with-gif=no'.
### mingw32 doesn't use -lgif/-lungif, since it loads the library dynamically.
HAVE_GIF=no
GIF_CFLAGS=
LIBGIF=
if test "${opsys}" = "mingw32"; then
  if test "${with_gif}" != "no"; then
    ac_fn_c_check_header_compile "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
if test "x$ac_cv_header_gif_lib_h" = xyes
then :
  HAVE_GIF=yes
else $as_nop
  HAVE_GIF=no
fi

  fi
  if test "${HAVE_GIF}" = "yes"; then

printf "%s\n" "#define HAVE_GIF 1" >>confdefs.h

  fi
elif test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no" \
        || test "${HAVE_W32}" = "yes" || test "${HAVE_NS}" = "yes" \
	|| test "${HAVE_BE_APP}" = "yes" || test "$window_system" = "pgtk" \
	|| test "${REALLY_ANDROID}" = "yes" \
	&& test "${with_gif}" != "no"; then
  ac_fn_c_check_header_compile "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
if test "x$ac_cv_header_gif_lib_h" = xyes
then :
  # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
# Earlier versions can crash Emacs, but version 5.0 removes EGifPutExtensionLast.
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GifMakeMapObject in -lgif" >&5
printf %s "checking for GifMakeMapObject in -lgif... " >&6; }
if test ${ac_cv_lib_gif_GifMakeMapObject+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lgif  $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.  */
char GifMakeMapObject ();
int
main (void)
{
return GifMakeMapObject ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_gif_GifMakeMapObject=yes
else $as_nop
  ac_cv_lib_gif_GifMakeMapObject=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_GifMakeMapObject" >&5
printf "%s\n" "$ac_cv_lib_gif_GifMakeMapObject" >&6; }
if test "x$ac_cv_lib_gif_GifMakeMapObject" = xyes
then :
  HAVE_GIF=yes
else $as_nop
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5
printf %s "checking for EGifPutExtensionLast in -lgif... " >&6; }
if test ${ac_cv_lib_gif_EGifPutExtensionLast+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lgif  $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.  */
char EGifPutExtensionLast ();
int
main (void)
{
return EGifPutExtensionLast ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_gif_EGifPutExtensionLast=yes
else $as_nop
  ac_cv_lib_gif_EGifPutExtensionLast=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
printf "%s\n" "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = xyes
then :
  HAVE_GIF=yes
else $as_nop
  HAVE_GIF=maybe
fi

fi

fi


  if test "$HAVE_GIF" = yes; then
    LIBGIF=-lgif
  elif test "$HAVE_GIF" = maybe; then
# If gif_lib.h but no libgif, try libungif.
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5
printf %s "checking for EGifPutExtensionLast in -lungif... " >&6; }
if test ${ac_cv_lib_ungif_EGifPutExtensionLast+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lungif  $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.  */
char EGifPutExtensionLast ();
int
main (void)
{
return EGifPutExtensionLast ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_ungif_EGifPutExtensionLast=yes
else $as_nop
  ac_cv_lib_ungif_EGifPutExtensionLast=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
printf "%s\n" "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = xyes
then :
  HAVE_GIF=yes
else $as_nop
  HAVE_GIF=no
fi

    test "$HAVE_GIF" = yes && LIBGIF=-lungif
  fi

# Finally, try ndk-build on Android.
  if test "$REALLY_ANDROID" = "yes"; then

module_name=
ndk_module=libgif
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  HAVE_GIF=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module libgif requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  GIF_CFLAGS="$GIF_CFLAGS $module_cflags $module_includes"
  GIF_LIBS="$GIF_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  HAVE_GIF=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    GIF_CFLAGS="$ndk_import_includes $GIF_CFLAGS"
  done
fi

    test "$HAVE_GIF" = yes && LIBGIF="$GIF_LIBS"
  fi

  if test "${HAVE_GIF}" = "yes"; then

printf "%s\n" "#define HAVE_GIF 1" >>confdefs.h

  fi
fi



MISSING=
WITH_IFAVAILABLE=
if test "${HAVE_X11}" = "yes"; then
  case $with_xpm,$HAVE_XPM in
    no,* | ifavailable,* | *,yes) ;;
    *) MISSING="libXpm"
       WITH_IFAVAILABLE="--with-xpm=ifavailable";;
  esac
  case $with_jpeg,$HAVE_JPEG in
    no,* | ifavailable,* | *,yes) ;;
    *) MISSING="$MISSING libjpeg"
       WITH_IFAVAILABLE="$WITH_IFAVAILABLE --with-jpeg=ifavailable";;
  esac
  case $with_png,$HAVE_PNG in
    no,* | ifavailable,* | *,yes) ;;
    *) MISSING="$MISSING libpng"
       WITH_IFAVAILABLE="$WITH_IFAVAILABLE --with-png=ifavailable";;
  esac
  case $with_gif,$HAVE_GIF in
    no,* | ifavailable,* | *,yes) ;;
    *) MISSING="$MISSING libgif/libungif"
       WITH_IFAVAILABLE="$WITH_IFAVAILABLE --with-gif=ifavailable";;
  esac
  case $with_tiff,$HAVE_TIFF in
    no,* | ifavailable,* | *,yes) ;;
    *) MISSING="$MISSING libtiff"
       WITH_IFAVAILABLE="$WITH_IFAVAILABLE --with-tiff=ifavailable";;
  esac
fi
case $with_gnutls,$HAVE_GNUTLS in
  no,* | ifavailable,* | *,yes) ;;
  *) MISSING="$MISSING gnutls"
     WITH_IFAVAILABLE="$WITH_IFAVAILABLE --with-gnutls=ifavailable";;
esac
case $with_tree_sitter,$HAVE_TREE_SITTER in
  no,* | ifavailable,* | *,yes) ;;
  *) MISSING="$MISSING tree-sitter"
     WITH_IFAVAILABLE="$WITH_IFAVAILABLE --with-tree-sitter=ifavailable";;
esac

if test "X${MISSING}" != X; then
  # If we have a missing library, and we don't have pkg-config installed,
  # the missing pkg-config may be the reason.  Give the user a hint.
  if test "X${PKG_CONFIG}" = X; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Unable to locate a usable pkg-config" >&5
printf "%s\n" "$as_me: WARNING: Unable to locate a usable pkg-config" >&2;}
  fi
  as_fn_error $? "The following required libraries were not found:
    $MISSING
Maybe some development libraries/packages are missing?
To build anyway, give:
    $WITH_IFAVAILABLE
as options to configure." "$LINENO" 5
fi

### Use -lgpm if available, unless '--with-gpm=no'.
HAVE_GPM=no
LIBGPM=
if test "${with_gpm}" != "no"; then
  ac_fn_c_check_header_compile "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default"
if test "x$ac_cv_header_gpm_h" = xyes
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
printf %s "checking for Gpm_Open in -lgpm... " >&6; }
if test ${ac_cv_lib_gpm_Gpm_Open+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  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.  */
char Gpm_Open ();
int
main (void)
{
return Gpm_Open ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_gpm_Gpm_Open=yes
else $as_nop
  ac_cv_lib_gpm_Gpm_Open=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5
printf "%s\n" "$ac_cv_lib_gpm_Gpm_Open" >&6; }
if test "x$ac_cv_lib_gpm_Gpm_Open" = xyes
then :
  HAVE_GPM=yes
fi

fi


  if test "${HAVE_GPM}" = "yes"; then

printf "%s\n" "#define HAVE_GPM 1" >>confdefs.h

    LIBGPM=-lgpm
  fi
fi





GNUSTEP_CFLAGS=
### Use NeXTstep API to implement GUI.
if test "${HAVE_NS}" = "yes"; then

printf "%s\n" "#define HAVE_NS 1" >>confdefs.h

  if test "${NS_IMPL_COCOA}" = "yes"; then

printf "%s\n" "#define NS_IMPL_COCOA 1" >>confdefs.h

  fi
  if test "${NS_IMPL_GNUSTEP}" = "yes"; then

printf "%s\n" "#define NS_IMPL_GNUSTEP 1" >>confdefs.h

    if test $NS_GNUSTEP_CONFIG != yes; then
      # See also .m.o rule in src/Makefile.in.  */
      # FIXME: are all these flags really needed?  Document here why.  */
      GNUSTEP_CFLAGS="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
      ## Extra CFLAGS applied to src/*.m files.
      GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
    fi
  fi
  OTHER_FILES=ns-app
fi

### Use session management (-lSM -lICE) if available
HAVE_X_SM=no
LIBXSM=
if test "${HAVE_X11}" = "yes"; then
  ac_fn_c_check_header_compile "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
if test "x$ac_cv_header_X11_SM_SMlib_h" = xyes
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5
printf %s "checking for SmcOpenConnection in -lSM... " >&6; }
if test ${ac_cv_lib_SM_SmcOpenConnection+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lSM -lICE $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.  */
char SmcOpenConnection ();
int
main (void)
{
return SmcOpenConnection ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_SM_SmcOpenConnection=yes
else $as_nop
  ac_cv_lib_SM_SmcOpenConnection=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
printf "%s\n" "$ac_cv_lib_SM_SmcOpenConnection" >&6; }
if test "x$ac_cv_lib_SM_SmcOpenConnection" = xyes
then :
  HAVE_X_SM=yes
fi

fi


  if test "${HAVE_X_SM}" = "yes"; then

printf "%s\n" "#define HAVE_X_SM 1" >>confdefs.h

    LIBXSM="-lSM -lICE"
  fi
fi


### Use XRandr (-lXrandr) if available
HAVE_XRANDR=no
if test "${HAVE_X11}" = "yes"; then
  XRANDR_REQUIRED=1.2.2
  XRANDR_MODULES="xrandr >= $XRANDR_REQUIRED"
  if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "$XRANDR_MODULES"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  XRANDR_CFLAGS="$XRANDR_CFLAGS $module_cflags $module_includes"
  XRANDR_LIBS="$XRANDR_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    XRANDR_CFLAGS="$ndk_import_includes $XRANDR_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_XRANDR=yes
else $as_nop
  HAVE_XRANDR=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $XRANDR_MODULES" >&5
printf %s "checking for $XRANDR_MODULES... " >&6; }

if test -n "$XRANDR_CFLAGS"; then
    pkg_cv_XRANDR_CFLAGS="$XRANDR_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XRANDR_MODULES\""; } >&5
  ($PKG_CONFIG --exists --print-errors "$XRANDR_MODULES") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_XRANDR_CFLAGS=`$PKG_CONFIG --cflags "$XRANDR_MODULES" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$XRANDR_LIBS"; then
    pkg_cv_XRANDR_LIBS="$XRANDR_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XRANDR_MODULES\""; } >&5
  ($PKG_CONFIG --exists --print-errors "$XRANDR_MODULES") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_XRANDR_LIBS=`$PKG_CONFIG --libs "$XRANDR_MODULES" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        XRANDR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$XRANDR_MODULES" 2>&1`
        else
	        XRANDR_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$XRANDR_MODULES" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$XRANDR_PKG_ERRORS" >&5

	HAVE_XRANDR=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_XRANDR=no
else
	XRANDR_CFLAGS=$pkg_cv_XRANDR_CFLAGS
	XRANDR_LIBS=$pkg_cv_XRANDR_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	XRANDR_CFLAGS=`printf "%s\n" "$XRANDR_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_XRANDR=yes
fi
fi
  if test $HAVE_XRANDR = no; then
    # Test old way in case pkg-config doesn't have it (older machines).
    # Include Xrender.h by hand to work around bug in older Xrandr.h
    # (e.g. RHEL5) and silence (harmless) configure warning (bug#18465).
    ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xrandr.h" "ac_cv_header_X11_extensions_Xrandr_h" "$ac_includes_default
#include <X11/extensions/Xrender.h>
"
if test "x$ac_cv_header_X11_extensions_Xrandr_h" = xyes
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenResources in -lXrandr" >&5
printf %s "checking for XRRGetScreenResources in -lXrandr... " >&6; }
if test ${ac_cv_lib_Xrandr_XRRGetScreenResources+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lXrandr  $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.  */
char XRRGetScreenResources ();
int
main (void)
{
return XRRGetScreenResources ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_Xrandr_XRRGetScreenResources=yes
else $as_nop
  ac_cv_lib_Xrandr_XRRGetScreenResources=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrandr_XRRGetScreenResources" >&5
printf "%s\n" "$ac_cv_lib_Xrandr_XRRGetScreenResources" >&6; }
if test "x$ac_cv_lib_Xrandr_XRRGetScreenResources" = xyes
then :
  HAVE_XRANDR=yes
fi

fi

    if test $HAVE_XRANDR = yes; then
      XRANDR_LIBS=-lXrandr
    fi
  fi
  if test $HAVE_XRANDR = yes; then

printf "%s\n" "#define HAVE_XRANDR 1" >>confdefs.h

  fi
fi



### Use Xinerama (-lXinerama) if available
HAVE_XINERAMA=no
if test "${HAVE_X11}" = "yes"; then
  XINERAMA_REQUIRED=1.0.2
  XINERAMA_MODULES="xinerama >= $XINERAMA_REQUIRED"
  if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "$XINERAMA_MODULES"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  XINERAMA_CFLAGS="$XINERAMA_CFLAGS $module_cflags $module_includes"
  XINERAMA_LIBS="$XINERAMA_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    XINERAMA_CFLAGS="$ndk_import_includes $XINERAMA_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_XINERAMA=yes
else $as_nop
  HAVE_XINERAMA=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $XINERAMA_MODULES" >&5
printf %s "checking for $XINERAMA_MODULES... " >&6; }

if test -n "$XINERAMA_CFLAGS"; then
    pkg_cv_XINERAMA_CFLAGS="$XINERAMA_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XINERAMA_MODULES\""; } >&5
  ($PKG_CONFIG --exists --print-errors "$XINERAMA_MODULES") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_XINERAMA_CFLAGS=`$PKG_CONFIG --cflags "$XINERAMA_MODULES" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$XINERAMA_LIBS"; then
    pkg_cv_XINERAMA_LIBS="$XINERAMA_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XINERAMA_MODULES\""; } >&5
  ($PKG_CONFIG --exists --print-errors "$XINERAMA_MODULES") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_XINERAMA_LIBS=`$PKG_CONFIG --libs "$XINERAMA_MODULES" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        XINERAMA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$XINERAMA_MODULES" 2>&1`
        else
	        XINERAMA_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$XINERAMA_MODULES" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$XINERAMA_PKG_ERRORS" >&5

	HAVE_XINERAMA=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_XINERAMA=no
else
	XINERAMA_CFLAGS=$pkg_cv_XINERAMA_CFLAGS
	XINERAMA_LIBS=$pkg_cv_XINERAMA_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	XINERAMA_CFLAGS=`printf "%s\n" "$XINERAMA_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_XINERAMA=yes
fi
fi
  if test $HAVE_XINERAMA = no; then
    # Test old way in case pkg-config doesn't have it (older machines).
    ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xinerama.h" "ac_cv_header_X11_extensions_Xinerama_h" "$ac_includes_default"
if test "x$ac_cv_header_X11_extensions_Xinerama_h" = xyes
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XineramaQueryExtension in -lXinerama" >&5
printf %s "checking for XineramaQueryExtension in -lXinerama... " >&6; }
if test ${ac_cv_lib_Xinerama_XineramaQueryExtension+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lXinerama  $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.  */
char XineramaQueryExtension ();
int
main (void)
{
return XineramaQueryExtension ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_Xinerama_XineramaQueryExtension=yes
else $as_nop
  ac_cv_lib_Xinerama_XineramaQueryExtension=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xinerama_XineramaQueryExtension" >&5
printf "%s\n" "$ac_cv_lib_Xinerama_XineramaQueryExtension" >&6; }
if test "x$ac_cv_lib_Xinerama_XineramaQueryExtension" = xyes
then :
  HAVE_XINERAMA=yes
fi

fi

    if test $HAVE_XINERAMA = yes; then
      XINERAMA_LIBS=-lXinerama
    fi
  fi
  if test $HAVE_XINERAMA = yes; then

printf "%s\n" "#define HAVE_XINERAMA 1" >>confdefs.h

  fi
fi



### Use Xfixes (-lXfixes) if available
HAVE_XFIXES=no
if test "${HAVE_X11}" = "yes"; then
  XFIXES_REQUIRED=1.0.0
  XFIXES_MODULES="xfixes >= $XFIXES_REQUIRED"
  if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "$XFIXES_MODULES"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  XFIXES_CFLAGS="$XFIXES_CFLAGS $module_cflags $module_includes"
  XFIXES_LIBS="$XFIXES_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    XFIXES_CFLAGS="$ndk_import_includes $XFIXES_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_XFIXES=yes
else $as_nop
  HAVE_XFIXES=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $XFIXES_MODULES" >&5
printf %s "checking for $XFIXES_MODULES... " >&6; }

if test -n "$XFIXES_CFLAGS"; then
    pkg_cv_XFIXES_CFLAGS="$XFIXES_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XFIXES_MODULES\""; } >&5
  ($PKG_CONFIG --exists --print-errors "$XFIXES_MODULES") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_XFIXES_CFLAGS=`$PKG_CONFIG --cflags "$XFIXES_MODULES" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$XFIXES_LIBS"; then
    pkg_cv_XFIXES_LIBS="$XFIXES_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XFIXES_MODULES\""; } >&5
  ($PKG_CONFIG --exists --print-errors "$XFIXES_MODULES") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_XFIXES_LIBS=`$PKG_CONFIG --libs "$XFIXES_MODULES" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        XFIXES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$XFIXES_MODULES" 2>&1`
        else
	        XFIXES_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$XFIXES_MODULES" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$XFIXES_PKG_ERRORS" >&5

	HAVE_XFIXES=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_XFIXES=no
else
	XFIXES_CFLAGS=$pkg_cv_XFIXES_CFLAGS
	XFIXES_LIBS=$pkg_cv_XFIXES_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	XFIXES_CFLAGS=`printf "%s\n" "$XFIXES_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_XFIXES=yes
fi
fi
  if test $HAVE_XFIXES = no; then
    # Test old way in case pkg-config doesn't have it (older machines).
    ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xfixes.h" "ac_cv_header_X11_extensions_Xfixes_h" "$ac_includes_default"
if test "x$ac_cv_header_X11_extensions_Xfixes_h" = xyes
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XFixesHideCursor in -lXfixes" >&5
printf %s "checking for XFixesHideCursor in -lXfixes... " >&6; }
if test ${ac_cv_lib_Xfixes_XFixesHideCursor+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lXfixes  $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.  */
char XFixesHideCursor ();
int
main (void)
{
return XFixesHideCursor ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_Xfixes_XFixesHideCursor=yes
else $as_nop
  ac_cv_lib_Xfixes_XFixesHideCursor=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xfixes_XFixesHideCursor" >&5
printf "%s\n" "$ac_cv_lib_Xfixes_XFixesHideCursor" >&6; }
if test "x$ac_cv_lib_Xfixes_XFixesHideCursor" = xyes
then :
  HAVE_XFIXES=yes
fi

fi

    if test $HAVE_XFIXES = yes; then
      XFIXES_LIBS=-lXfixes
    fi
  fi
  if test $HAVE_XFIXES = yes; then

printf "%s\n" "#define HAVE_XFIXES 1" >>confdefs.h

  fi
fi



## Use XInput 2.0 if available
HAVE_XINPUT2=no
if test "${HAVE_X11}" = "yes" && test "${with_xinput2}" != "no"; then
   if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "xi"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  XINPUT_CFLAGS="$XINPUT_CFLAGS $module_cflags $module_includes"
  XINPUT_LIBS="$XINPUT_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    XINPUT_CFLAGS="$ndk_import_includes $XINPUT_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_XINPUT=yes
else $as_nop
  HAVE_XINPUT=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for xi" >&5
printf %s "checking for xi... " >&6; }

if test -n "$XINPUT_CFLAGS"; then
    pkg_cv_XINPUT_CFLAGS="$XINPUT_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xi\""; } >&5
  ($PKG_CONFIG --exists --print-errors "xi") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_XINPUT_CFLAGS=`$PKG_CONFIG --cflags "xi" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$XINPUT_LIBS"; then
    pkg_cv_XINPUT_LIBS="$XINPUT_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xi\""; } >&5
  ($PKG_CONFIG --exists --print-errors "xi") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_XINPUT_LIBS=`$PKG_CONFIG --libs "xi" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        XINPUT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xi" 2>&1`
        else
	        XINPUT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xi" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$XINPUT_PKG_ERRORS" >&5

	HAVE_XINPUT=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_XINPUT=no
else
	XINPUT_CFLAGS=$pkg_cv_XINPUT_CFLAGS
	XINPUT_LIBS=$pkg_cv_XINPUT_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	XINPUT_CFLAGS=`printf "%s\n" "$XINPUT_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_XINPUT=yes
fi
fi
   if test $HAVE_XINPUT = yes; then
     # Now check for XInput2.h
     ac_fn_c_check_header_compile "$LINENO" "X11/extensions/XInput2.h" "ac_cv_header_X11_extensions_XInput2_h" "$ac_includes_default"
if test "x$ac_cv_header_X11_extensions_XInput2_h" = xyes
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XIGrabButton in -lXi" >&5
printf %s "checking for XIGrabButton in -lXi... " >&6; }
if test ${ac_cv_lib_Xi_XIGrabButton+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lXi  $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.  */
char XIGrabButton ();
int
main (void)
{
return XIGrabButton ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_Xi_XIGrabButton=yes
else $as_nop
  ac_cv_lib_Xi_XIGrabButton=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xi_XIGrabButton" >&5
printf "%s\n" "$ac_cv_lib_Xi_XIGrabButton" >&6; }
if test "x$ac_cv_lib_Xi_XIGrabButton" = xyes
then :
  HAVE_XINPUT2=yes
fi

fi

   fi
   if test $HAVE_XINPUT2 = yes; then

printf "%s\n" "#define HAVE_XINPUT2 1" >>confdefs.h

     if test "$USE_GTK_TOOLKIT" = "GTK2"; then
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: You are building Emacs with GTK+ 2 and the X Input Extension version 2.
This might lead to problems if your version of GTK+ is not built with support for XInput 2." >&5
printf "%s\n" "$as_me: WARNING: You are building Emacs with GTK+ 2 and the X Input Extension version 2.
This might lead to problems if your version of GTK+ is not built with support for XInput 2." >&2;}
     fi

     # Now check for some members (which used in conjunction with
     # protocol definitions) can be used to determine the version of
     # XInput supported.
     ac_fn_c_check_member "$LINENO" "XIScrollClassInfo" "type" "ac_cv_member_XIScrollClassInfo_type" "#include <X11/extensions/XInput2.h>
"
if test "x$ac_cv_member_XIScrollClassInfo_type" = xyes
then :

printf "%s\n" "#define HAVE_XISCROLLCLASSINFO_TYPE 1" >>confdefs.h


fi
ac_fn_c_check_member "$LINENO" "XITouchClassInfo" "type" "ac_cv_member_XITouchClassInfo_type" "#include <X11/extensions/XInput2.h>
"
if test "x$ac_cv_member_XITouchClassInfo_type" = xyes
then :

printf "%s\n" "#define HAVE_XITOUCHCLASSINFO_TYPE 1" >>confdefs.h


fi
ac_fn_c_check_member "$LINENO" "XIBarrierReleasePointerInfo" "deviceid" "ac_cv_member_XIBarrierReleasePointerInfo_deviceid" "#include <X11/extensions/XInput2.h>
"
if test "x$ac_cv_member_XIBarrierReleasePointerInfo_deviceid" = xyes
then :

printf "%s\n" "#define HAVE_XIBARRIERRELEASEPOINTERINFO_DEVICEID 1" >>confdefs.h


fi
ac_fn_c_check_member "$LINENO" "XIGestureClassInfo" "type" "ac_cv_member_XIGestureClassInfo_type" "#include <X11/extensions/XInput2.h>
"
if test "x$ac_cv_member_XIGestureClassInfo_type" = xyes
then :

printf "%s\n" "#define HAVE_XIGESTURECLASSINFO_TYPE 1" >>confdefs.h


fi

   fi
fi



XSYNC_LIBS=
XSYNC_CFLAGS=
HAVE_XSYNC=no
if test "${HAVE_X11}" = "yes"; then
   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/sync.h" "ac_cv_header_X11_extensions_sync_h" "#include <X11/Xlib.h>
"
if test "x$ac_cv_header_X11_extensions_sync_h" = xyes
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XSyncQueryExtension in -lXext" >&5
printf %s "checking for XSyncQueryExtension in -lXext... " >&6; }
if test ${ac_cv_lib_Xext_XSyncQueryExtension+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  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.  */
char XSyncQueryExtension ();
int
main (void)
{
return XSyncQueryExtension ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_Xext_XSyncQueryExtension=yes
else $as_nop
  ac_cv_lib_Xext_XSyncQueryExtension=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XSyncQueryExtension" >&5
printf "%s\n" "$ac_cv_lib_Xext_XSyncQueryExtension" >&6; }
if test "x$ac_cv_lib_Xext_XSyncQueryExtension" = xyes
then :
  HAVE_XSYNC=yes
fi

fi


  if test "${HAVE_XSYNC}" = "yes"; then

printf "%s\n" "#define HAVE_XSYNC 1" >>confdefs.h

    XSYNC_LIBS="-lXext"
    OLDLIBS="$LIBS"
    LIBS="-lXext $LIBS" # Set this temporarily for AC_CHECK_FUNC
    ac_fn_c_check_func "$LINENO" "XSyncTriggerFence" "ac_cv_func_XSyncTriggerFence"
if test "x$ac_cv_func_XSyncTriggerFence" = xyes
then :
  printf "%s\n" "#define HAVE_XSYNCTRIGGERFENCE 1" >>confdefs.h

fi
 # Check for version 3.1
    LIBS="$OLDLIBS"
  fi
fi



### Use Xdbe (-lXdbe) if available
HAVE_XDBE=no
if test "${HAVE_X11}" = "yes"; then
  if test "${with_xdbe}" != "no"; then
    ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xdbe.h" "ac_cv_header_X11_extensions_Xdbe_h" "#include <X11/Xlib.h>

"
if test "x$ac_cv_header_X11_extensions_Xdbe_h" = xyes
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XdbeAllocateBackBufferName in -lXext" >&5
printf %s "checking for XdbeAllocateBackBufferName in -lXext... " >&6; }
if test ${ac_cv_lib_Xext_XdbeAllocateBackBufferName+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  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.  */
char XdbeAllocateBackBufferName ();
int
main (void)
{
return XdbeAllocateBackBufferName ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_Xext_XdbeAllocateBackBufferName=yes
else $as_nop
  ac_cv_lib_Xext_XdbeAllocateBackBufferName=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XdbeAllocateBackBufferName" >&5
printf "%s\n" "$ac_cv_lib_Xext_XdbeAllocateBackBufferName" >&6; }
if test "x$ac_cv_lib_Xext_XdbeAllocateBackBufferName" = xyes
then :
  HAVE_XDBE=yes
fi

fi

  fi
  if test $HAVE_XDBE = yes; then
    XDBE_LIBS=-lXext
  fi
  if test $HAVE_XDBE = yes; then

printf "%s\n" "#define HAVE_XDBE 1" >>confdefs.h

  fi
fi



### Use the Nonrectangular Window Shape extension if available.
HAVE_XSHAPE=no
HAVE_XCB_SHAPE=no
if test "${HAVE_X11}" = "yes"; then
  ac_fn_c_check_header_compile "$LINENO" "X11/extensions/shape.h" "ac_cv_header_X11_extensions_shape_h" "#include <X11/extensions/shape.h>

"
if test "x$ac_cv_header_X11_extensions_shape_h" = xyes
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryVersion in -lXext" >&5
printf %s "checking for XShapeQueryVersion in -lXext... " >&6; }
if test ${ac_cv_lib_Xext_XShapeQueryVersion+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  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.  */
char XShapeQueryVersion ();
int
main (void)
{
return XShapeQueryVersion ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_Xext_XShapeQueryVersion=yes
else $as_nop
  ac_cv_lib_Xext_XShapeQueryVersion=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryVersion" >&5
printf "%s\n" "$ac_cv_lib_Xext_XShapeQueryVersion" >&6; }
if test "x$ac_cv_lib_Xext_XShapeQueryVersion" = xyes
then :
  HAVE_XSHAPE=yes
fi

fi

  if test $HAVE_XSHAPE = yes; then
    XSHAPE_LIBS=-lXext
    ac_fn_c_check_header_compile "$LINENO" "xcb/shape.h" "ac_cv_header_xcb_shape_h" "#include <xcb/shape.h>
"
if test "x$ac_cv_header_xcb_shape_h" = xyes
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for xcb_shape_combine in -lxcb-shape" >&5
printf %s "checking for xcb_shape_combine in -lxcb-shape... " >&6; }
if test ${ac_cv_lib_xcb_shape_xcb_shape_combine+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lxcb-shape  $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.  */
char xcb_shape_combine ();
int
main (void)
{
return xcb_shape_combine ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_xcb_shape_xcb_shape_combine=yes
else $as_nop
  ac_cv_lib_xcb_shape_xcb_shape_combine=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xcb_shape_xcb_shape_combine" >&5
printf "%s\n" "$ac_cv_lib_xcb_shape_xcb_shape_combine" >&6; }
if test "x$ac_cv_lib_xcb_shape_xcb_shape_combine" = xyes
then :
  HAVE_XCB_SHAPE=yes
fi

fi


    if test $HAVE_XCB_SHAPE = yes && test "$XCB_LIBS" != ""; then
      XSHAPE_LIBS="$XSHAPE_LIBS -lxcb-shape"

printf "%s\n" "#define HAVE_XCB_SHAPE 1" >>confdefs.h

    fi
  fi
  if test $HAVE_XSHAPE = yes; then

printf "%s\n" "#define HAVE_XSHAPE 1" >>confdefs.h

  fi
fi



### Use Xcomposite (-lXcomposite) if available
HAVE_XCOMPOSITE=no
if test "${HAVE_X11}" = "yes"; then
  ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xcomposite.h" "ac_cv_header_X11_extensions_Xcomposite_h" "#include <X11/extensions/Xcomposite.h>

"
if test "x$ac_cv_header_X11_extensions_Xcomposite_h" = xyes
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XCompositeRedirectWindow in -lXcomposite" >&5
printf %s "checking for XCompositeRedirectWindow in -lXcomposite... " >&6; }
if test ${ac_cv_lib_Xcomposite_XCompositeRedirectWindow+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lXcomposite  $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.  */
char XCompositeRedirectWindow ();
int
main (void)
{
return XCompositeRedirectWindow ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_Xcomposite_XCompositeRedirectWindow=yes
else $as_nop
  ac_cv_lib_Xcomposite_XCompositeRedirectWindow=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xcomposite_XCompositeRedirectWindow" >&5
printf "%s\n" "$ac_cv_lib_Xcomposite_XCompositeRedirectWindow" >&6; }
if test "x$ac_cv_lib_Xcomposite_XCompositeRedirectWindow" = xyes
then :
  HAVE_XCOMPOSITE=yes
fi

fi

  if test $HAVE_XCOMPOSITE = yes; then
    XCOMPOSITE_LIBS=-lXcomposite
  fi
  if test $HAVE_XCOMPOSITE = yes; then

printf "%s\n" "#define HAVE_XCOMPOSITE 1" >>confdefs.h

  fi
fi



### Use libxml (-lxml2) if available
### mingw32 doesn't use -lxml2, since it loads the library dynamically.
HAVE_LIBXML2=no
if test "${with_xml2}" != "no"; then
  ### I'm not sure what the version number should be, so I just guessed.
  if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "libxml-2.0 > 2.6.17"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  LIBXML2_CFLAGS="$LIBXML2_CFLAGS $module_cflags $module_includes"
  LIBXML2_LIBS="$LIBXML2_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    LIBXML2_CFLAGS="$ndk_import_includes $LIBXML2_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_LIBXML2=yes
else $as_nop
  HAVE_LIBXML2=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.6.17" >&5
printf %s "checking for libxml-2.0 > 2.6.17... " >&6; }

if test -n "$LIBXML2_CFLAGS"; then
    pkg_cv_LIBXML2_CFLAGS="$LIBXML2_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 > 2.6.17\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libxml-2.0 > 2.6.17") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBXML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 > 2.6.17" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$LIBXML2_LIBS"; then
    pkg_cv_LIBXML2_LIBS="$LIBXML2_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 > 2.6.17\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libxml-2.0 > 2.6.17") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBXML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 > 2.6.17" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        LIBXML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 > 2.6.17" 2>&1`
        else
	        LIBXML2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 > 2.6.17" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$LIBXML2_PKG_ERRORS" >&5

	HAVE_LIBXML2=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_LIBXML2=no
else
	LIBXML2_CFLAGS=$pkg_cv_LIBXML2_CFLAGS
	LIBXML2_LIBS=$pkg_cv_LIBXML2_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	LIBXML2_CFLAGS=`printf "%s\n" "$LIBXML2_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_LIBXML2=yes
fi
fi
  # Built-in libxml2 on OS X 10.8 lacks libxml-2.0.pc.
  if test "${HAVE_LIBXML2}" != "yes" && test "$opsys" = "darwin"; then
    SAVE_CPPFLAGS="$CPPFLAGS"
    if test -z "$xcsdkdir" -a -n "$XCRUN" -a ! -d /usr/include; then
            xcsdkdir=`$XCRUN --show-sdk-path 2>/dev/null`
      case $xcsdkdir in
	*[\\\"\#\$\&\'\`$am_lf\ \	]*)
	xcsdkdir="" ;;
      esac
    fi
    CPPFLAGS="$CPPFLAGS -isystem${xcsdkdir}/usr/include/libxml2"
    ac_fn_c_check_header_compile "$LINENO" "libxml/HTMLparser.h" "ac_cv_header_libxml_HTMLparser_h" "$ac_includes_default"
if test "x$ac_cv_header_libxml_HTMLparser_h" = xyes
then :
  ac_fn_check_decl "$LINENO" "HTML_PARSE_RECOVER" "ac_cv_have_decl_HTML_PARSE_RECOVER" "#include <libxml/HTMLparser.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_HTML_PARSE_RECOVER" = xyes
then :
  HAVE_LIBXML2=yes
fi
fi

    CPPFLAGS="$SAVE_CPPFLAGS"
    if test "${HAVE_LIBXML2}" = "yes"; then
      LIBXML2_CFLAGS="-isystem${xcsdkdir}/usr/include/libxml2"
      LIBXML2_LIBS="-lxml2"
    fi
  fi
  if test "${HAVE_LIBXML2}" = "yes"; then
    if test "${opsys}" != "mingw32"; then
      SAVE_CFLAGS=$CFLAGS
      CFLAGS="$CFLAGS $LIBXML2_CFLAGS"
      if test -n "$ndk_INITIALIZED"
then :
  ac_fn_check_decl "$LINENO" "htmlReadMemory" "ac_cv_have_decl_htmlReadMemory" "#include <libxml/HTMLparser.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_htmlReadMemory" = xyes
then :
  HAVE_LIBXML2=yes
else $as_nop
  HAVE_LIBXML2=no
fi
else $as_nop
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5
printf %s "checking for htmlReadMemory in -lxml2... " >&6; }
if test ${ac_cv_lib_xml2_htmlReadMemory+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lxml2 $LIBXML2_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.  */
char htmlReadMemory ();
int
main (void)
{
return htmlReadMemory ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_xml2_htmlReadMemory=yes
else $as_nop
  ac_cv_lib_xml2_htmlReadMemory=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5
printf "%s\n" "$ac_cv_lib_xml2_htmlReadMemory" >&6; }
if test "x$ac_cv_lib_xml2_htmlReadMemory" = xyes
then :
  HAVE_LIBXML2=yes
else $as_nop
  HAVE_LIBXML2=no
fi

fi
      CFLAGS="$SAVE_CFLAGS"
    else
      LIBXML2_LIBS=""
    fi
    if test "${HAVE_LIBXML2}" = "yes"; then

printf "%s\n" "#define HAVE_LIBXML2 1" >>confdefs.h

    else
      LIBXML2_LIBS=""
      LIBXML2_CFLAGS=""
    fi
  fi
fi



BLESSMAIL_TARGET=
LIBS_MAIL=
if test ! "$with_mailutils"; then
  # Check for mail-locking functions in a "mail" library.  Probably this should
  # have the same check as for liblockfile below.
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5
printf %s "checking for maillock in -lmail... " >&6; }
if test ${ac_cv_lib_mail_maillock+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lmail  $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.  */
char maillock ();
int
main (void)
{
return maillock ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_mail_maillock=yes
else $as_nop
  ac_cv_lib_mail_maillock=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5
printf "%s\n" "$ac_cv_lib_mail_maillock" >&6; }
if test "x$ac_cv_lib_mail_maillock" = xyes
then :
  have_mail=yes
else $as_nop
  have_mail=no
fi

  if test $have_mail = yes; then
    LIBS_MAIL=-lmail

printf "%s\n" "#define HAVE_LIBMAIL 1" >>confdefs.h


    OLD_LIBS=$LIBS
    LIBS="$LIBS_MAIL $LIBS"
    ac_fn_c_check_func "$LINENO" "touchlock" "ac_cv_func_touchlock"
if test "x$ac_cv_func_touchlock" = xyes
then :
  printf "%s\n" "#define HAVE_TOUCHLOCK 1" >>confdefs.h

fi

    LIBS=$OLD_LIBS
  fi
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5
printf %s "checking for maillock in -llockfile... " >&6; }
if test ${ac_cv_lib_lockfile_maillock+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-llockfile  $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.  */
char maillock ();
int
main (void)
{
return maillock ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_lockfile_maillock=yes
else $as_nop
  ac_cv_lib_lockfile_maillock=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5
printf "%s\n" "$ac_cv_lib_lockfile_maillock" >&6; }
if test "x$ac_cv_lib_lockfile_maillock" = xyes
then :
  have_lockfile=yes
else $as_nop
  have_lockfile=no
fi

  if test $have_lockfile = yes; then
     LIBS_MAIL=-llockfile

printf "%s\n" "#define HAVE_LIBLOCKFILE 1" >>confdefs.h

  else
    # If we have the shared liblockfile, assume we must use it for mail
    # locking (e.g. Debian).  If we couldn't link against liblockfile
    # (no liblockfile.a installed), ensure that we don't need to.
            # Extract the first word of "liblockfile.so", so it can be a program name with args.
set dummy liblockfile.so; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_liblockfile+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$liblockfile"; then
  ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_liblockfile="yes"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
fi
fi
liblockfile=$ac_cv_prog_liblockfile
if test -n "$liblockfile"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5
printf "%s\n" "$liblockfile" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


    if test "$ac_cv_prog_liblockfile" = yes; then
      as_fn_error $? "Shared liblockfile found but can't link against it.
This probably means that movemail could lose mail.
There may be a 'development' package to install containing liblockfile." "$LINENO" 5
    fi
  fi
  ac_fn_c_check_header_compile "$LINENO" "maillock.h" "ac_cv_header_maillock_h" "$ac_includes_default"
if test "x$ac_cv_header_maillock_h" = xyes
then :
  printf "%s\n" "#define HAVE_MAILLOCK_H 1" >>confdefs.h

fi


  ## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to
  ## interlock access to the mail spool.  The alternative is a lock file named
  ## /usr/spool/mail/$USER.lock.
  mail_lock=no
  case $opsys in
    aix4-2) mail_lock="lockf" ;;

    gnu|freebsd|dragonfly|netbsd|openbsd|darwin) mail_lock="flock" ;;

    ## On GNU/Linux systems, both methods are used by various mail programs.
    ## I assume most people are using newer mailers that have heard of flock.
    ## Change this if you need to.
    ## Debian contains a patch which says: "On Debian/GNU/Linux systems,
    ## configure gets the right answers, and that means *NOT* using flock.
    ## Using flock is guaranteed to be the wrong thing. See Debian Policy
    ## for details." and then uses '#ifdef DEBIAN'.  Unfortunately the
    ## Debian maintainer hasn't provided a clean fix for Emacs.
    ## movemail.c will use 'maillock' when MAILDIR, HAVE_LIBMAIL and
    ## HAVE_MAILLOCK_H are defined, so the following appears to be the
    ## correct logic.  -- fx
    ## We must check for HAVE_LIBLOCKFILE too, as movemail does.
    ## liblockfile is a Free Software replacement for libmail, used on
    ## Debian systems and elsewhere. -rfr.
    gnu-*)
      mail_lock="flock"
      if test $have_mail = yes || test $have_lockfile = yes; then
	test $ac_cv_header_maillock_h = yes && mail_lock=no
      fi ;;

    mingw32)
      mail_lock="none-needed" ;;
  esac

  case $mail_lock in
    flock)
printf "%s\n" "#define MAIL_USE_FLOCK 1" >>confdefs.h
;;

    lockf)
printf "%s\n" "#define MAIL_USE_LOCKF 1" >>confdefs.h
;;

    none-needed) ;;

    *) BLESSMAIL_TARGET="need-blessmail" ;;
  esac
fi



HAVE_SECCOMP=no
       for ac_header in linux/seccomp.h linux/filter.h
do :
  as_ac_Header=`printf "%s\n" "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 `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
 ac_fn_check_decl "$LINENO" "SECCOMP_SET_MODE_FILTER" "ac_cv_have_decl_SECCOMP_SET_MODE_FILTER" "
    #include <linux/seccomp.h>

" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_SECCOMP_SET_MODE_FILTER" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_SECCOMP_SET_MODE_FILTER $ac_have_decl" >>confdefs.h
if test $ac_have_decl = 1
then :
  HAVE_SECCOMP=yes
fi
ac_fn_check_decl "$LINENO" "SECCOMP_FILTER_FLAG_TSYNC" "ac_cv_have_decl_SECCOMP_FILTER_FLAG_TSYNC" "
    #include <linux/seccomp.h>

" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_SECCOMP_FILTER_FLAG_TSYNC" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_SECCOMP_FILTER_FLAG_TSYNC $ac_have_decl" >>confdefs.h
if test $ac_have_decl = 1
then :
  HAVE_SECCOMP=yes
fi

fi

done


if test -n "$ndk_INITIALIZED"
then :

  ndk_modules=
  ndk_parse_pkg_config_string "libseccomp >= 2.5.2"
  ndk_found=no

  for module in $ndk_modules; do

module_name=
ndk_module=$module
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  ndk_found=no
else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module $module requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  LIBSECCOMP_CFLAGS="$LIBSECCOMP_CFLAGS $module_cflags $module_includes"
  LIBSECCOMP_LIBS="$LIBSECCOMP_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  ndk_found=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    LIBSECCOMP_CFLAGS="$ndk_import_includes $LIBSECCOMP_CFLAGS"
  done
fi

  done

  if test "$ndk_found" = "yes"
then :
  HAVE_LIBSECCOMP=yes
else $as_nop
  HAVE_LIBSECCOMP=no
fi

else $as_nop

pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libseccomp >= 2.5.2" >&5
printf %s "checking for libseccomp >= 2.5.2... " >&6; }

if test -n "$LIBSECCOMP_CFLAGS"; then
    pkg_cv_LIBSECCOMP_CFLAGS="$LIBSECCOMP_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libseccomp >= 2.5.2\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libseccomp >= 2.5.2") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBSECCOMP_CFLAGS=`$PKG_CONFIG --cflags "libseccomp >= 2.5.2" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$LIBSECCOMP_LIBS"; then
    pkg_cv_LIBSECCOMP_LIBS="$LIBSECCOMP_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libseccomp >= 2.5.2\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libseccomp >= 2.5.2") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBSECCOMP_LIBS=`$PKG_CONFIG --libs "libseccomp >= 2.5.2" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        LIBSECCOMP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libseccomp >= 2.5.2" 2>&1`
        else
	        LIBSECCOMP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libseccomp >= 2.5.2" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$LIBSECCOMP_PKG_ERRORS" >&5

	HAVE_LIBSECCOMP=no
elif test $pkg_failed = untried; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
	HAVE_LIBSECCOMP=no
else
	LIBSECCOMP_CFLAGS=$pkg_cv_LIBSECCOMP_CFLAGS
	LIBSECCOMP_LIBS=$pkg_cv_LIBSECCOMP_LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	LIBSECCOMP_CFLAGS=`printf "%s\n" "$LIBSECCOMP_CFLAGS" | sed -e "$edit_cflags"`
        HAVE_LIBSECCOMP=yes
fi
fi




# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
printf %s "checking size of long... " >&6; }
if test ${ac_cv_sizeof_long+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"
then :

else $as_nop
  if test "$ac_cv_type_long" = yes; then
     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
printf "%s\n" "$ac_cv_sizeof_long" >&6; }



printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h


SIZEOF_LONG="$ac_cv_sizeof_long"


OLD_LIBS=$LIBS
LIBS="$LIB_PTHREAD $LIB_MATH $LIBS"
ac_fn_c_check_func "$LINENO" "accept4" "ac_cv_func_accept4"
if test "x$ac_cv_func_accept4" = xyes
then :
  printf "%s\n" "#define HAVE_ACCEPT4 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "fchdir" "ac_cv_func_fchdir"
if test "x$ac_cv_func_fchdir" = xyes
then :
  printf "%s\n" "#define HAVE_FCHDIR 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "gethostname" "ac_cv_func_gethostname"
if test "x$ac_cv_func_gethostname" = xyes
then :
  printf "%s\n" "#define HAVE_GETHOSTNAME 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
if test "x$ac_cv_func_getrusage" = xyes
then :
  printf "%s\n" "#define HAVE_GETRUSAGE 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "get_current_dir_name" "ac_cv_func_get_current_dir_name"
if test "x$ac_cv_func_get_current_dir_name" = xyes
then :
  printf "%s\n" "#define HAVE_GET_CURRENT_DIR_NAME 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "lrand48" "ac_cv_func_lrand48"
if test "x$ac_cv_func_lrand48" = xyes
then :
  printf "%s\n" "#define HAVE_LRAND48 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
if test "x$ac_cv_func_random" = xyes
then :
  printf "%s\n" "#define HAVE_RANDOM 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
if test "x$ac_cv_func_rint" = xyes
then :
  printf "%s\n" "#define HAVE_RINT 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "tcdrain" "ac_cv_func_tcdrain"
if test "x$ac_cv_func_tcdrain" = xyes
then :
  printf "%s\n" "#define HAVE_TCDRAIN 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "trunc" "ac_cv_func_trunc"
if test "x$ac_cv_func_trunc" = xyes
then :
  printf "%s\n" "#define HAVE_TRUNC 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select"
if test "x$ac_cv_func_select" = xyes
then :
  printf "%s\n" "#define HAVE_SELECT 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
if test "x$ac_cv_func_getpagesize" = xyes
then :
  printf "%s\n" "#define HAVE_GETPAGESIZE 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale"
if test "x$ac_cv_func_setlocale" = xyes
then :
  printf "%s\n" "#define HAVE_SETLOCALE 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "newlocale" "ac_cv_func_newlocale"
if test "x$ac_cv_func_newlocale" = xyes
then :
  printf "%s\n" "#define HAVE_NEWLOCALE 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "getrlimit" "ac_cv_func_getrlimit"
if test "x$ac_cv_func_getrlimit" = xyes
then :
  printf "%s\n" "#define HAVE_GETRLIMIT 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "setrlimit" "ac_cv_func_setrlimit"
if test "x$ac_cv_func_setrlimit" = xyes
then :
  printf "%s\n" "#define HAVE_SETRLIMIT 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
if test "x$ac_cv_func_shutdown" = xyes
then :
  printf "%s\n" "#define HAVE_SHUTDOWN 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
if test "x$ac_cv_func_pthread_sigmask" = xyes
then :
  printf "%s\n" "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "strsignal" "ac_cv_func_strsignal"
if test "x$ac_cv_func_strsignal" = xyes
then :
  printf "%s\n" "#define HAVE_STRSIGNAL 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "setitimer" "ac_cv_func_setitimer"
if test "x$ac_cv_func_setitimer" = xyes
then :
  printf "%s\n" "#define HAVE_SETITIMER 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "sendto" "ac_cv_func_sendto"
if test "x$ac_cv_func_sendto" = xyes
then :
  printf "%s\n" "#define HAVE_SENDTO 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "recvfrom" "ac_cv_func_recvfrom"
if test "x$ac_cv_func_recvfrom" = xyes
then :
  printf "%s\n" "#define HAVE_RECVFROM 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "getsockname" "ac_cv_func_getsockname"
if test "x$ac_cv_func_getsockname" = xyes
then :
  printf "%s\n" "#define HAVE_GETSOCKNAME 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
if test "x$ac_cv_func_getifaddrs" = xyes
then :
  printf "%s\n" "#define HAVE_GETIFADDRS 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "freeifaddrs" "ac_cv_func_freeifaddrs"
if test "x$ac_cv_func_freeifaddrs" = xyes
then :
  printf "%s\n" "#define HAVE_FREEIFADDRS 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "gai_strerror" "ac_cv_func_gai_strerror"
if test "x$ac_cv_func_gai_strerror" = xyes
then :
  printf "%s\n" "#define HAVE_GAI_STRERROR 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "sync" "ac_cv_func_sync"
if test "x$ac_cv_func_sync" = xyes
then :
  printf "%s\n" "#define HAVE_SYNC 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "endpwent" "ac_cv_func_endpwent"
if test "x$ac_cv_func_endpwent" = xyes
then :
  printf "%s\n" "#define HAVE_ENDPWENT 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "getgrent" "ac_cv_func_getgrent"
if test "x$ac_cv_func_getgrent" = xyes
then :
  printf "%s\n" "#define HAVE_GETGRENT 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "endgrent" "ac_cv_func_endgrent"
if test "x$ac_cv_func_endgrent" = xyes
then :
  printf "%s\n" "#define HAVE_ENDGRENT 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "cfmakeraw" "ac_cv_func_cfmakeraw"
if test "x$ac_cv_func_cfmakeraw" = xyes
then :
  printf "%s\n" "#define HAVE_CFMAKERAW 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "cfsetspeed" "ac_cv_func_cfsetspeed"
if test "x$ac_cv_func_cfsetspeed" = xyes
then :
  printf "%s\n" "#define HAVE_CFSETSPEED 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "__executable_start" "ac_cv_func___executable_start"
if test "x$ac_cv_func___executable_start" = xyes
then :
  printf "%s\n" "#define HAVE___EXECUTABLE_START 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "log2" "ac_cv_func_log2"
if test "x$ac_cv_func_log2" = xyes
then :
  printf "%s\n" "#define HAVE_LOG2 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "pthread_setname_np" "ac_cv_func_pthread_setname_np"
if test "x$ac_cv_func_pthread_setname_np" = xyes
then :
  printf "%s\n" "#define HAVE_PTHREAD_SETNAME_NP 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "pthread_set_name_np" "ac_cv_func_pthread_set_name_np"
if test "x$ac_cv_func_pthread_set_name_np" = xyes
then :
  printf "%s\n" "#define HAVE_PTHREAD_SET_NAME_NP 1" >>confdefs.h

fi


# getpwent is not present in older versions of Android.  (bug#65319)


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getpwent" >&5
printf %s "checking for getpwent... " >&6; }
if test ${gl_cv_onwards_func_getpwent+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  exec 9>&6 6>/dev/null

       case "$host_os" in

         linux*-android*)
           ac_fn_check_decl "$LINENO" "getpwent" "ac_cv_have_decl_getpwent" "#include <pwd.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_getpwent" = xyes
then :

fi
           if test $ac_cv_have_decl_getpwent = yes; then
             ac_fn_c_check_func "$LINENO" "getpwent" "ac_cv_func_getpwent"
if test "x$ac_cv_func_getpwent" = xyes
then :

fi

             if test $ac_cv_func_getpwent = yes; then
               gl_cv_onwards_func_getpwent=yes
             else
                                                            gl_cv_onwards_func_getpwent='future OS version'
             fi
           else
             gl_cv_onwards_func_getpwent='future OS version'
           fi
           ;;


         *)
           ac_fn_c_check_func "$LINENO" "getpwent" "ac_cv_func_getpwent"
if test "x$ac_cv_func_getpwent" = xyes
then :

fi

           gl_cv_onwards_func_getpwent=$ac_cv_func_getpwent
           ;;

       esac

  exec 6>&9 9>&-


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_getpwent" >&5
printf "%s\n" "$gl_cv_onwards_func_getpwent" >&6; }

  case "$gl_cv_onwards_func_getpwent" in
    future*) ac_cv_func_getpwent=no ;;
    *)       ac_cv_func_getpwent=$gl_cv_onwards_func_getpwent ;;
  esac
  if test $ac_cv_func_getpwent = yes; then

printf "%s\n" "#define HAVE_GETPWENT 1" >>confdefs.h

  fi



# renameat2 is not present in older versions of Android.


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for renameat2" >&5
printf %s "checking for renameat2... " >&6; }
if test ${gl_cv_onwards_func_renameat2+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  exec 9>&6 6>/dev/null

       case "$host_os" in

         linux*-android*)
           ac_fn_check_decl "$LINENO" "renameat2" "ac_cv_have_decl_renameat2" "#include <stdio.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_renameat2" = xyes
then :

fi
           if test $ac_cv_have_decl_renameat2 = yes; then
             ac_fn_c_check_func "$LINENO" "renameat2" "ac_cv_func_renameat2"
if test "x$ac_cv_func_renameat2" = xyes
then :

fi

             if test $ac_cv_func_renameat2 = yes; then
               gl_cv_onwards_func_renameat2=yes
             else
                                                            gl_cv_onwards_func_renameat2='future OS version'
             fi
           else
             gl_cv_onwards_func_renameat2='future OS version'
           fi
           ;;


         *)
           ac_fn_c_check_func "$LINENO" "renameat2" "ac_cv_func_renameat2"
if test "x$ac_cv_func_renameat2" = xyes
then :

fi

           gl_cv_onwards_func_renameat2=$ac_cv_func_renameat2
           ;;

       esac

  exec 6>&9 9>&-


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_renameat2" >&5
printf "%s\n" "$gl_cv_onwards_func_renameat2" >&6; }

  case "$gl_cv_onwards_func_renameat2" in
    future*) ac_cv_func_renameat2=no ;;
    *)       ac_cv_func_renameat2=$gl_cv_onwards_func_renameat2 ;;
  esac
  if test $ac_cv_func_renameat2 = yes; then

printf "%s\n" "#define HAVE_RENAMEAT2 1" >>confdefs.h

  fi



if test "$ac_cv_func_cfmakeraw" != "yes"; then
  # On some systems (Android), cfmakeraw is inline, so AC_CHECK_FUNCS
  # cannot find it.  Check if some code including termios.h and using
  # cfmakeraw builds.
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether cfmakeraw is inline" >&5
printf %s "checking whether cfmakeraw is inline... " >&6; }
if test ${emacs_cv_func_cfmakeraw_inline+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <termios.h>
int
main (void)
{
&cfmakeraw;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  emacs_cv_func_cfmakeraw_inline=yes
else $as_nop
  emacs_cv_func_cfmakeraw_inline=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func_cfmakeraw_inline" >&5
printf "%s\n" "$emacs_cv_func_cfmakeraw_inline" >&6; }

  if test "$emacs_cv_func_cfmakeraw_inline" = "yes"; then
     # Define HAVE_CFMAKERAW again.
     printf "%s\n" "#define HAVE_CFMAKERAW 1" >>confdefs.h

  fi
fi

if test "$ac_cv_func_cfsetspeed" != "yes"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether cfsetspeed is inline" >&5
printf %s "checking whether cfsetspeed is inline... " >&6; }
if test ${emacs_cv_func_cfsetspeed_inline+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <termios.h>
int
main (void)
{
&cfsetspeed;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  emacs_cv_func_cfsetspeed_inline=yes
else $as_nop
  emacs_cv_func_cfsetspeed_inline=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func_cfsetspeed_inline" >&5
printf "%s\n" "$emacs_cv_func_cfsetspeed_inline" >&6; }

  if test "$emacs_cv_func_cfsetspeed_inline" = "yes"; then
     # Define HAVE_CFSETSPEED again.
     printf "%s\n" "#define HAVE_CFSETSPEED 1" >>confdefs.h

  fi
fi

LIBS=$OLD_LIBS

if test "$ac_cv_func_pthread_setname_np" = "yes"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_setname_np takes a single argument" >&5
printf %s "checking whether pthread_setname_np takes a single argument... " >&6; }
if test ${emacs_cv_pthread_setname_np_1arg+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <pthread.h>
int
main (void)
{
pthread_setname_np ("a");
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  emacs_cv_pthread_setname_np_1arg=yes
else $as_nop
  emacs_cv_pthread_setname_np_1arg=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_pthread_setname_np_1arg" >&5
printf "%s\n" "$emacs_cv_pthread_setname_np_1arg" >&6; }
  if test "$emacs_cv_pthread_setname_np_1arg" = "yes"; then

printf "%s\n" "#define HAVE_PTHREAD_SETNAME_NP_1ARG 1" >>confdefs.h

  else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_setname_np takes three arguments" >&5
printf %s "checking whether pthread_setname_np takes three arguments... " >&6; }
if test ${emacs_cv_pthread_setname_np_3arg+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <pthread.h>
int
main (void)
{
pthread_setname_np (0, "%s", "a");
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  emacs_cv_pthread_setname_np_3arg=yes
else $as_nop
  emacs_cv_pthread_setname_np_3arg=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_pthread_setname_np_3arg" >&5
printf "%s\n" "$emacs_cv_pthread_setname_np_3arg" >&6; }
     if test "$emacs_cv_pthread_setname_np_3arg" = "yes"; then

printf "%s\n" "#define HAVE_PTHREAD_SETNAME_NP_3ARG 1" >>confdefs.h

     fi
  fi
fi


  for ac_func in aligned_alloc posix_memalign
do :
  as_ac_var=`printf "%s\n" "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 `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
 break
fi

done
ac_fn_check_decl "$LINENO" "aligned_alloc" "ac_cv_have_decl_aligned_alloc" "#include <stdlib.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_aligned_alloc" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_ALIGNED_ALLOC $ac_have_decl" >>confdefs.h


case $with_unexec,$canonical in
  yes,alpha*)
    ac_fn_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl___ELF__" = xyes
then :

else $as_nop
  as_fn_error $? "Non-ELF systems are not supported on this platform." "$LINENO" 5
fi;;
esac

if test "$with_unexec" = yes && test "$opsys" = "haiku"; then
      as_fn_error $? "Haiku is not supported by the legacy unexec dumper.
Please use the portable dumper instead." "$LINENO" 5
fi

# Dump loading.  Android lacks posix_madvise.
ac_fn_c_check_func "$LINENO" "posix_madvise" "ac_cv_func_posix_madvise"
if test "x$ac_cv_func_posix_madvise" = xyes
then :
  printf "%s\n" "#define HAVE_POSIX_MADVISE 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "madvise" "ac_cv_func_madvise"
if test "x$ac_cv_func_madvise" = xyes
then :
  printf "%s\n" "#define HAVE_MADVISE 1" >>confdefs.h

fi


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_frame_address" >&5
printf %s "checking for __builtin_frame_address... " >&6; }
if test ${emacs_cv_func___builtin_frame_address+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{
__builtin_frame_address (0);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  emacs_cv_func___builtin_frame_address=yes
else $as_nop
  emacs_cv_func___builtin_frame_address=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func___builtin_frame_address" >&5
printf "%s\n" "$emacs_cv_func___builtin_frame_address" >&6; }
if test $emacs_cv_func___builtin_frame_address = yes; then

printf "%s\n" "#define HAVE___BUILTIN_FRAME_ADDRESS 1" >>confdefs.h

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5
printf %s "checking for __builtin_unwind_init... " >&6; }
if test ${emacs_cv_func___builtin_unwind_init+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{
__builtin_unwind_init ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  emacs_cv_func___builtin_unwind_init=yes
else $as_nop
  emacs_cv_func___builtin_unwind_init=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func___builtin_unwind_init" >&5
printf "%s\n" "$emacs_cv_func___builtin_unwind_init" >&6; }
if test $emacs_cv_func___builtin_unwind_init = yes; then

printf "%s\n" "#define HAVE___BUILTIN_UNWIND_INIT 1" >>confdefs.h

fi




{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
printf %s "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
if test ${ac_cv_sys_largefile_source+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  while :; do
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h> /* for off_t */
     #include <stdio.h>
int
main (void)
{
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.beam \
    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 (void)
{
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.beam \
    conftest$ac_exeext conftest.$ac_ext
  ac_cv_sys_largefile_source=unknown
  break
done
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
printf "%s\n" "$ac_cv_sys_largefile_source" >&6; }
case $ac_cv_sys_largefile_source in #(
  no | unknown) ;;
  *)
printf "%s\n" "#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source" >>confdefs.h
;;
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

printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h

fi


# UNIX98 PTYs.
ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
if test "x$ac_cv_func_grantpt" = xyes
then :
  printf "%s\n" "#define HAVE_GRANTPT 1" >>confdefs.h

fi


# PTY-related GNU extensions.
ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt"
if test "x$ac_cv_func_getpt" = xyes
then :
  printf "%s\n" "#define HAVE_GETPT 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "posix_openpt" "ac_cv_func_posix_openpt"
if test "x$ac_cv_func_posix_openpt" = xyes
then :
  printf "%s\n" "#define HAVE_POSIX_OPENPT 1" >>confdefs.h

fi



# Check this now, so that we will NOT find the above functions in ncurses.
# That is because we have not set up to link ncurses in lib-src.
# It's better to believe a function is not available
# than to expect to find it in ncurses.
# Also we need tputs and friends to be able to build at all.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5
printf %s "checking for library containing tputs... " >&6; }
if test ${emacs_cv_tputs_lib+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test "${opsys}" = "mingw32" || test x"$REALLY_ANDROID" = "xyes"; then
  emacs_cv_tputs_lib='none required'
else
  # curses precedes termcap because of AIX (Bug#9736#35) and OpenIndiana.
  tputs_libraries='tinfo ncurses terminfo curses termcap tinfow ncursesw'
  for tputs_library in '' $tputs_libraries; do
    OLIBS=$LIBS
    if test -z "$tputs_library"; then
      emacs_cv_tputs_lib='none required'
    else
      emacs_cv_tputs_lib=-l$tputs_library
      LIBS="$emacs_cv_tputs_lib $LIBS"
    fi
    if test "$cross_compiling" = yes
then :
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

  extern void tputs (const char *, int, int (*)(int));
       int main (int argc, char **argv)
       {
	  if (argc == 10000)
	    tputs (argv[0], 0, 0);
	  return 0;
       }

_ACEOF
if ac_fn_c_try_link "$LINENO"
then :

else $as_nop
  emacs_cv_tputs_lib=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

  extern void tputs (const char *, int, int (*)(int));
       int main (int argc, char **argv)
       {
	  if (argc == 10000)
	    tputs (argv[0], 0, 0);
	  return 0;
       }

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :

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

    LIBS=$OLIBS
    if test "X$emacs_cv_tputs_lib" != Xno; then
      break
    fi
  done
fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_tputs_lib" >&5
printf "%s\n" "$emacs_cv_tputs_lib" >&6; }
case "$emacs_cv_tputs_lib" in #(
  no) :
    as_fn_error $? "The required function 'tputs' was not found in any library.
The following libraries were tried (in order):
  libtinfo, libncurses, libterminfo, libcurses, libtermcap
Please try installing whichever of these libraries is most appropriate
for your system, together with its header files.
For example, a libncurses-dev(el) or similar package." "$LINENO" 5 ;; #(
  -l*) :
    LIBS_TERMCAP=$emacs_cv_tputs_lib ;; #(
  *) :
    LIBS_TERMCAP= ;; #(
  *) :
     ;;
esac

## Use termcap instead of terminfo?
## Only true for: freebsd < 40000, ms-w32, msdos, netbsd < 599002500.
TERMINFO=yes
## FIXME?  In the cases below where we unconditionally set
## LIBS_TERMCAP="-lncurses", this overrides LIBS_TERMCAP = -ltinfo,
## if that was found above to have tputs.
## Should we use the gnu* logic everywhere?
case "$opsys$REALLY_ANDROID" in
  ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
  ##  The ncurses library has been moved out of the System framework in
  ##  Mac OS X 10.2.  So if configure detects it, set the command-line
  ##  option to use it.
  darwin) LIBS_TERMCAP="-lncurses" ;;

  gnu*) test -z "$LIBS_TERMCAP" && LIBS_TERMCAP="-lncurses" ;;

  freebsd)
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5
printf %s "checking whether FreeBSD is new enough to use terminfo... " >&6; }
    if test ${emacs_cv_freebsd_terminfo+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <osreldate.h>
int
main (void)
{
#if __FreeBSD_version < 400000
fail;
#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  emacs_cv_freebsd_terminfo=yes
else $as_nop
  emacs_cv_freebsd_terminfo=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
fi


    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5
printf "%s\n" "$emacs_cv_freebsd_terminfo" >&6; }

    if test $emacs_cv_freebsd_terminfo = yes; then
      LIBS_TERMCAP="-lncurses"
    else
      TERMINFO=no
      LIBS_TERMCAP="-ltermcap"
    fi
    ;;

  # The case condition is a concatenation of both $opsys and
  # $REALLY_ANDROID.  Only disable termcap if building a GUI program.
  # (bug#65340)
  mingw32 | androidyes)
    TERMINFO=no
    LIBS_TERMCAP=
    ;;

  netbsd)
    # NetBSD versions prior to 6.0 lack native terminfo, but have a
    # tputs() built on top of termcap in these libraries. Use native
    # termcap instead in this case. NetBSD >= 6.0 has native terminfo
    # implementation in -lterminfo.
    if test "x$LIBS_TERMCAP" = "x-ltermcap" -o "x$LIBS_TERMCAP" = "x-lcurses"; then
      TERMINFO=no
      LIBS_TERMCAP="-ltermcap"
    fi
    ;;

  openbsd | dragonfly) LIBS_TERMCAP="-lncurses" ;;

  ## hpux: Make sure we get select from libc rather than from libcurses
  ##  because libcurses on HPUX 10.10 has a broken version of select.
  ##  We used to use -lc -lcurses, but this may be cleaner.
  ## FIXME?  But TERMINFO = yes on hpux (it used to be explicitly
  # set that way, now it uses the default).  Isn't this a contradiction?
  hpux*) LIBS_TERMCAP="-ltermcap" ;;

esac

TERMCAP_OBJ=tparam.o
if test $TERMINFO = yes; then

printf "%s\n" "#define TERMINFO 1" >>confdefs.h

  TERMCAP_OBJ=terminfo.o
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $LIBS_TERMCAP library defines BC" >&5
printf %s "checking whether $LIBS_TERMCAP library defines BC... " >&6; }
if test ${emacs_cv_terminfo_defines_BC+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  OLD_LIBS=$LIBS
     LIBS="$LIBS $LIBS_TERMCAP"
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
extern char *BC;
int
main (void)
{
return !*BC;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  emacs_cv_terminfo_defines_BC=yes
else $as_nop
  emacs_cv_terminfo_defines_BC=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
     LIBS=$OLD_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_terminfo_defines_BC" >&5
printf "%s\n" "$emacs_cv_terminfo_defines_BC" >&6; }
  if test "$emacs_cv_terminfo_defines_BC" = yes; then

printf "%s\n" "#define TERMINFO_DEFINES_BC 1" >>confdefs.h

  fi
fi
if test "X$LIBS_TERMCAP" = "X-lncurses"; then

printf "%s\n" "#define USE_NCURSES 1" >>confdefs.h

fi



# GNU/Linux-specific timer functions.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for timerfd interface" >&5
printf %s "checking for timerfd interface... " >&6; }
if test ${emacs_cv_have_timerfd+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/timerfd.h>

int
main (void)
{
timerfd_create (CLOCK_REALTIME,
					TFD_CLOEXEC | TFD_NONBLOCK);
			timerfd_settime (0, TFD_TIMER_ABSTIME, 0, 0);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  emacs_cv_have_timerfd=yes
else $as_nop
  emacs_cv_have_timerfd=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_have_timerfd" >&5
printf "%s\n" "$emacs_cv_have_timerfd" >&6; }
if test "$emacs_cv_have_timerfd" = yes; then

printf "%s\n" "#define HAVE_TIMERFD 1" >>confdefs.h

fi

# Alternate stack for signal handlers.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether signals can be handled on alternate stack" >&5
printf %s "checking whether signals can be handled on alternate stack... " >&6; }
if test ${emacs_cv_alternate_stack+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <signal.h>
			#include <stdlib.h>

int
main (void)
{
stack_t ss;
			struct sigaction sa;
			ss.ss_sp = malloc (SIGSTKSZ);
			ss.ss_size = SIGSTKSZ;
			sa.sa_flags = SA_SIGINFO | SA_ONSTACK;
			sigaltstack (&ss, 0);
			sigaction (SIGSEGV, &sa, 0);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  emacs_cv_alternate_stack=yes
else $as_nop
  emacs_cv_alternate_stack=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_alternate_stack" >&5
printf "%s\n" "$emacs_cv_alternate_stack" >&6; }

# Do we need the Hesiod library to provide the support routines?
LIBHESIOD=
LIBRESOLV=
if test "$with_hesiod" != no ; then
  # Don't set $LIBS here -- see comments above.  FIXME which comments?
  resolv=no
  ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
if test "x$ac_cv_func_res_send" = xyes
then :

else $as_nop
  ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
if test "x$ac_cv_func___res_send" = xyes
then :

else $as_nop
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
printf %s "checking for res_send in -lresolv... " >&6; }
if test ${ac_cv_lib_resolv_res_send+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lresolv  $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.  */
char res_send ();
int
main (void)
{
return res_send ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_resolv_res_send=yes
else $as_nop
  ac_cv_lib_resolv_res_send=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
printf "%s\n" "$ac_cv_lib_resolv_res_send" >&6; }
if test "x$ac_cv_lib_resolv_res_send" = xyes
then :
  resolv=yes
else $as_nop
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
printf %s "checking for __res_send in -lresolv... " >&6; }
if test ${ac_cv_lib_resolv___res_send+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lresolv  $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.  */
char __res_send ();
int
main (void)
{
return __res_send ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_resolv___res_send=yes
else $as_nop
  ac_cv_lib_resolv___res_send=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5
printf "%s\n" "$ac_cv_lib_resolv___res_send" >&6; }
if test "x$ac_cv_lib_resolv___res_send" = xyes
then :
  resolv=yes
fi

fi

fi

fi

  if test "$resolv" = yes ; then
    RESOLVLIB=-lresolv
  else
    RESOLVLIB=
  fi
  hesiod=no
  ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
if test "x$ac_cv_func_hes_getmailhost" = xyes
then :

else $as_nop
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
printf %s "checking for hes_getmailhost in -lhesiod... " >&6; }
if test ${ac_cv_lib_hesiod_hes_getmailhost+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lhesiod $RESOLVLIB $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.  */
char hes_getmailhost ();
int
main (void)
{
return hes_getmailhost ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_hesiod_hes_getmailhost=yes
else $as_nop
  ac_cv_lib_hesiod_hes_getmailhost=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
printf "%s\n" "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
if test "x$ac_cv_lib_hesiod_hes_getmailhost" = xyes
then :
  hesiod=yes
else $as_nop
  :
fi

fi


  if test x"$hesiod" = xyes; then
    LIBHESIOD=-lhesiod
    LIBRESOLV=$RESOLVLIB
  fi
fi



# These tell us which Kerberos-related libraries to use.
COM_ERRLIB=
CRYPTOLIB=
KRB5LIB=
DESLIB=
KRB4LIB=

if test "${with_kerberos}" != no; then
  OLD_LIBS=$LIBS
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
printf %s "checking for com_err in -lcom_err... " >&6; }
if test ${ac_cv_lib_com_err_com_err+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lcom_err  $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.  */
char com_err ();
int
main (void)
{
return com_err ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_com_err_com_err=yes
else $as_nop
  ac_cv_lib_com_err_com_err=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
printf "%s\n" "$ac_cv_lib_com_err_com_err" >&6; }
if test "x$ac_cv_lib_com_err_com_err" = xyes
then :
  have_com_err=yes
else $as_nop
  have_com_err=no
fi

  if test $have_com_err = yes; then
    COM_ERRLIB=-lcom_err
    LIBS="$COM_ERRLIB $LIBS"
  fi
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
printf %s "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
if test ${ac_cv_lib_crypto_mit_des_cbc_encrypt+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lcrypto  $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.  */
char mit_des_cbc_encrypt ();
int
main (void)
{
return mit_des_cbc_encrypt ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
else $as_nop
  ac_cv_lib_crypto_mit_des_cbc_encrypt=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
printf "%s\n" "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = xyes
then :
  have_crypto=yes
else $as_nop
  have_crypto=no
fi

  if test $have_crypto = yes; then
    CRYPTOLIB=-lcrypto
    LIBS="$CRYPTOLIB $LIBS"
  fi
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
printf %s "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
if test ${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lk5crypto  $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.  */
char mit_des_cbc_encrypt ();
int
main (void)
{
return mit_des_cbc_encrypt ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
else $as_nop
  ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
printf "%s\n" "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = xyes
then :
  have_k5crypto=yes
else $as_nop
  have_k5crypto=no
fi

  if test $have_k5crypto = yes; then
    CRYPTOLIB=-lk5crypto
    LIBS="$CRYPTOLIB $LIBS"
  fi
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
printf %s "checking for krb5_init_context in -lkrb5... " >&6; }
if test ${ac_cv_lib_krb5_krb5_init_context+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lkrb5  $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.  */
char krb5_init_context ();
int
main (void)
{
return krb5_init_context ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_krb5_krb5_init_context=yes
else $as_nop
  ac_cv_lib_krb5_krb5_init_context=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
printf "%s\n" "$ac_cv_lib_krb5_krb5_init_context" >&6; }
if test "x$ac_cv_lib_krb5_krb5_init_context" = xyes
then :
  have_krb5=yes
else $as_nop
  have_krb5=no
fi

  if test $have_krb5=yes; then
    KRB5LIB=-lkrb5
    LIBS="$KRB5LIB $LIBS"
  fi
    if test "${with_kerberos5}" = no; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
printf %s "checking for des_cbc_encrypt in -ldes425... " >&6; }
if test ${ac_cv_lib_des425_des_cbc_encrypt+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldes425  $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.  */
char des_cbc_encrypt ();
int
main (void)
{
return des_cbc_encrypt ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_des425_des_cbc_encrypt=yes
else $as_nop
  ac_cv_lib_des425_des_cbc_encrypt=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
printf "%s\n" "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
if test "x$ac_cv_lib_des425_des_cbc_encrypt" = xyes
then :
  have_des425=yes
else $as_nop
  have_des425=no
fi

    if test $have_des425 = yes; then
      DESLIB=-ldes425
      LIBS="$DESLIB $LIBS"
    else
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
printf %s "checking for des_cbc_encrypt in -ldes... " >&6; }
if test ${ac_cv_lib_des_des_cbc_encrypt+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldes  $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.  */
char des_cbc_encrypt ();
int
main (void)
{
return des_cbc_encrypt ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_des_des_cbc_encrypt=yes
else $as_nop
  ac_cv_lib_des_des_cbc_encrypt=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
printf "%s\n" "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
if test "x$ac_cv_lib_des_des_cbc_encrypt" = xyes
then :
  have_des=yes
else $as_nop
  have_des=no
fi

      if test $have_des = yes; then
        DESLIB=-ldes
        LIBS="$DESLIB $LIBS"
      fi
    fi
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
printf %s "checking for krb_get_cred in -lkrb4... " >&6; }
if test ${ac_cv_lib_krb4_krb_get_cred+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lkrb4  $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.  */
char krb_get_cred ();
int
main (void)
{
return krb_get_cred ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_krb4_krb_get_cred=yes
else $as_nop
  ac_cv_lib_krb4_krb_get_cred=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
printf "%s\n" "$ac_cv_lib_krb4_krb_get_cred" >&6; }
if test "x$ac_cv_lib_krb4_krb_get_cred" = xyes
then :
  have_krb4=yes
else $as_nop
  have_krb4=no
fi

    if test $have_krb4 = yes; then
      KRB4LIB=-lkrb4
      LIBS="$KRB4LIB $LIBS"
    else
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
printf %s "checking for krb_get_cred in -lkrb... " >&6; }
if test ${ac_cv_lib_krb_krb_get_cred+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lkrb  $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.  */
char krb_get_cred ();
int
main (void)
{
return krb_get_cred ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_krb_krb_get_cred=yes
else $as_nop
  ac_cv_lib_krb_krb_get_cred=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
printf "%s\n" "$ac_cv_lib_krb_krb_get_cred" >&6; }
if test "x$ac_cv_lib_krb_krb_get_cred" = xyes
then :
  have_krb=yes
else $as_nop
  have_krb=no
fi

      if test $have_krb = yes; then
        KRB4LIB=-lkrb
        LIBS="$KRB4LIB $LIBS"
      fi
    fi
  fi

  if test "${with_kerberos5}" != no; then
           for ac_header in krb5.h
do :
  ac_fn_c_check_header_compile "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
if test "x$ac_cv_header_krb5_h" = xyes
then :
  printf "%s\n" "#define HAVE_KRB5_H 1" >>confdefs.h
 ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
"
if test "x$ac_cv_member_krb5_error_text" = xyes
then :

printf "%s\n" "#define HAVE_KRB5_ERROR_TEXT 1" >>confdefs.h


fi
ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
"
if test "x$ac_cv_member_krb5_error_e_text" = xyes
then :

printf "%s\n" "#define HAVE_KRB5_ERROR_E_TEXT 1" >>confdefs.h


fi

fi

done
  else
           for ac_header in krb.h
do :
  ac_fn_c_check_header_compile "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
if test "x$ac_cv_header_krb_h" = xyes
then :
  printf "%s\n" "#define HAVE_KRB_H 1" >>confdefs.h

else $as_nop
         for ac_header in kerberosIV/krb.h
do :
  ac_fn_c_check_header_compile "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
if test "x$ac_cv_header_kerberosIV_krb_h" = xyes
then :
  printf "%s\n" "#define HAVE_KERBEROSIV_KRB_H 1" >>confdefs.h

else $as_nop
  ac_fn_c_check_header_compile "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
if test "x$ac_cv_header_kerberos_krb_h" = xyes
then :
  printf "%s\n" "#define HAVE_KERBEROS_KRB_H 1" >>confdefs.h

fi

fi

done
fi

done
  fi
  ac_fn_c_check_header_compile "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
if test "x$ac_cv_header_com_err_h" = xyes
then :
  printf "%s\n" "#define HAVE_COM_ERR_H 1" >>confdefs.h

fi

  LIBS=$OLD_LIBS
fi







ac_fn_c_check_header_compile "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
if test "x$ac_cv_header_valgrind_valgrind_h" = xyes
then :
  printf "%s\n" "#define HAVE_VALGRIND_VALGRIND_H 1" >>confdefs.h

fi


ac_fn_c_check_member "$LINENO" "struct unipair" "unicode" "ac_cv_member_struct_unipair_unicode" "#include <linux/kd.h>
"
if test "x$ac_cv_member_struct_unipair_unicode" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_UNIPAIR_UNICODE 1" >>confdefs.h


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

          #if defined _WIN64 && !defined __CYGWIN__
          LLP64
          #endif

int
main (void)
{

  ;
  return 0;
}

_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_pid_type='int'
else $as_nop
  ac_pid_type='__int64'
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext

printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h


fi







if test "x$ac_cv_func_fork" = xyes; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
printf %s "checking for working fork... " >&6; }
if test ${ac_cv_func_fork_works+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test "$cross_compiling" = yes
then :
  ac_cv_func_fork_works=cross
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_includes_default
int
main (void)
{

	  /* By Ruediger Kuhlmann. */
	  return fork () < 0;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  ac_cv_func_fork_works=yes
else $as_nop
  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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
printf "%s\n" "$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
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
printf "%s\n" "$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
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
printf %s "checking for working vfork... " >&6; }
if test ${ac_cv_func_vfork_works+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test "$cross_compiling" = yes
then :
  ac_cv_func_vfork_works=cross
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
/* Thanks to Paul Eggert for this test.  */
$ac_includes_default
#include <signal.h>
#include <sys/wait.h>
#ifdef HAVE_VFORK_H
# include <vfork.h>
#endif

static void
do_nothing (int sig)
{
  (void) sig;
}

/* 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
sparc_address_test (int arg)
{
  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 (void)
{
  pid_t parent = getpid ();
  pid_t child;

  sparc_address_test (0);

  /* On Solaris 2.4, changes by the child to the signal handler
     also munge signal handlers in the parent.  To detect this,
     start by putting the parent's handler in a known state.  */
  signal (SIGTERM, SIG_DFL);

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

    /* Alter the child's signal handler.  */
    if (signal (SIGTERM, do_nothing) != SIG_DFL)
      _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 munge the parent's signal handler?  */
	 || signal (SIGTERM, SIG_DFL) != SIG_DFL

	 /* 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 $as_nop
  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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
printf "%s\n" "$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
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
printf "%s\n" "$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

printf "%s\n" "#define HAVE_WORKING_VFORK 1" >>confdefs.h

else

printf "%s\n" "#define vfork fork" >>confdefs.h

fi
if test "x$ac_cv_func_fork_works" = xyes; then

printf "%s\n" "#define HAVE_WORKING_FORK 1" >>confdefs.h

fi


ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
if test "x$ac_cv_func_snprintf" = xyes
then :
  printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "open_memstream" "ac_cv_func_open_memstream"
if test "x$ac_cv_func_open_memstream" = xyes
then :
  printf "%s\n" "#define HAVE_OPEN_MEMSTREAM 1" >>confdefs.h

fi


ac_fn_c_check_header_compile "$LINENO" "spawn.h" "ac_cv_header_spawn_h" "$ac_includes_default"
if test "x$ac_cv_header_spawn_h" = xyes
then :
  printf "%s\n" "#define HAVE_SPAWN_H 1" >>confdefs.h

fi


ac_fn_c_check_func "$LINENO" "posix_spawn" "ac_cv_func_posix_spawn"
if test "x$ac_cv_func_posix_spawn" = xyes
then :
  printf "%s\n" "#define HAVE_POSIX_SPAWN 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "posix_spawn_file_actions_addchdir" "ac_cv_func_posix_spawn_file_actions_addchdir"
if test "x$ac_cv_func_posix_spawn_file_actions_addchdir" = xyes
then :
  printf "%s\n" "#define HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "posix_spawn_file_actions_addchdir_np" "ac_cv_func_posix_spawn_file_actions_addchdir_np"
if test "x$ac_cv_func_posix_spawn_file_actions_addchdir_np" = xyes
then :
  printf "%s\n" "#define HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR_NP 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "posix_spawnattr_setflags" "ac_cv_func_posix_spawnattr_setflags"
if test "x$ac_cv_func_posix_spawnattr_setflags" = xyes
then :
  printf "%s\n" "#define HAVE_POSIX_SPAWNATTR_SETFLAGS 1" >>confdefs.h

fi





ac_fn_check_decl "$LINENO" "POSIX_SPAWN_SETSID" "ac_cv_have_decl_POSIX_SPAWN_SETSID" "
               #include <spawn.h>

" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_POSIX_SPAWN_SETSID" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_POSIX_SPAWN_SETSID $ac_have_decl" >>confdefs.h



XGSELOBJ=
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether GLib is linked in" >&5
printf %s "checking whether GLib is linked in... " >&6; }
if test ${emacs_cv_links_glib+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  OLDCFLAGS="$CFLAGS"
OLDLIBS="$LIBS"
CFLAGS="$CFLAGS $GTK_CFLAGS $RSVG_CFLAGS $DBUS_CFLAGS $SETTINGS_CFLAGS"
LIBS="$LIBS $GTK_LIBS $RSVG_LIBS $DBUS_LIBS $SETTINGS_LIBS"
CFLAGS="$CFLAGS $NOTIFY_CFLAGS $CAIRO_CFLAGS"
LIBS="$LIBS $NOTIFY_LIBS $CAIRO_LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <glib.h>

int
main (void)
{
g_print ("Hello world");
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  emacs_cv_links_glib=yes
else $as_nop
  emacs_cv_links_glib=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
CFLAGS="$OLDCFLAGS"
LIBS="$OLDLIBS"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_links_glib" >&5
printf "%s\n" "$emacs_cv_links_glib" >&6; }
if test "${emacs_cv_links_glib}" = "yes"; then

printf "%s\n" "#define HAVE_GLIB 1" >>confdefs.h

  if test "$HAVE_NS" = no ; then
    XGSELOBJ=xgselect.o
  fi
fi




  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
printf %s "checking for nl_langinfo and CODESET... " >&6; }
if test ${am_cv_langinfo_codeset+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <langinfo.h>
int
main (void)
{
char* cs = nl_langinfo(CODESET); return !cs;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  am_cv_langinfo_codeset=yes
else $as_nop
  am_cv_langinfo_codeset=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
printf "%s\n" "$am_cv_langinfo_codeset" >&6; }
  if test $am_cv_langinfo_codeset = yes; then

printf "%s\n" "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h

  fi


   if test "$am_cv_langinfo_codeset" = yes
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and _NL_PAPER_WIDTH" >&5
printf %s "checking for nl_langinfo and _NL_PAPER_WIDTH... " >&6; }
if test ${emacs_cv_langinfo__nl_paper_width+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <langinfo.h>
int
main (void)
{
char *cs = nl_langinfo (_NL_PAPER_WIDTH);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  emacs_cv_langinfo__nl_paper_width=yes
else $as_nop
  emacs_cv_langinfo__nl_paper_width=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo__nl_paper_width" >&5
printf "%s\n" "$emacs_cv_langinfo__nl_paper_width" >&6; }
      if test "$emacs_cv_langinfo__nl_paper_width" = yes
then :

printf "%s\n" "#define HAVE_LANGINFO__NL_PAPER_WIDTH 1" >>confdefs.h

fi
fi



   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
printf %s "checking for mbstate_t... " >&6; }
if test ${ac_cv_type_mbstate_t+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_includes_default
             #include <wchar.h>
int
main (void)
{
mbstate_t x; return sizeof x;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_type_mbstate_t=yes
else $as_nop
  ac_cv_type_mbstate_t=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
printf "%s\n" "$ac_cv_type_mbstate_t" >&6; }
   if test $ac_cv_type_mbstate_t = yes; then

printf "%s\n" "#define HAVE_MBSTATE_T 1" >>confdefs.h

   else

printf "%s\n" "#define mbstate_t int" >>confdefs.h

   fi



if test "${opsys}" != "mingw32"; then

printf "%s\n" "#define AMPERSAND_FULL_NAME 1" >>confdefs.h

fi

## Note: PTYs are broken on darwin <6.  Use at your own risk.
if test "${opsys}" != "mingw32"; then

printf "%s\n" "#define HAVE_PTYS 1" >>confdefs.h

fi


printf "%s\n" "#define HAVE_SOCKETS 1" >>confdefs.h





if test "${opsys}" = "mingw32"; then
  printf "%s\n" "#define NULL_DEVICE \"NUL:\"" >>confdefs.h

else
  printf "%s\n" "#define NULL_DEVICE \"/dev/null\"" >>confdefs.h

fi

if test "${opsys}" = "mingw32"; then
  SEPCHAR=';'
else
  SEPCHAR=':'
fi

printf "%s\n" "#define SEPCHAR '$SEPCHAR'" >>confdefs.h




printf "%s\n" "#define subprocesses 1" >>confdefs.h



printf "%s\n" "#define DIRECTORY_SEP '/'" >>confdefs.h


if test "${opsys}" = "mingw32"; then

printf "%s\n" "#define IS_DEVICE_SEP(_c_) ((_c_) == ':')" >>confdefs.h



printf "%s\n" "#define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\\\')" >>confdefs.h



printf "%s\n" "#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_))" >>confdefs.h

else

printf "%s\n" "#define IS_DEVICE_SEP(_c_) 0" >>confdefs.h



printf "%s\n" "#define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP)" >>confdefs.h



printf "%s\n" "#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_))" >>confdefs.h

fi

if test "$USE_X_TOOLKIT" != "none"; then
  have_editres=yes
  case $opsys in
    hpux*)
                  have_editres=no
    ;;
  esac
  if test "$have_editres" != no && test ! -z "$LIBXMU"; then
    OLDLIBS="$LIBS"
        if test x$HAVE_X11XTR6 = xyes; then
      LIBS="-lXt -lSM -lICE $LIBXMU"
    else
      OTHERLIBS="-lXt -$LIBXMU"
    fi
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <X11/Intrinsic.h>
       #include <X11/Xmu/Editres.h>
int
main (void)
{
_XEditResCheckMessages (0, 0, 0, 0);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :

printf "%s\n" "#define X_TOOLKIT_EDITRES 1" >>confdefs.h

fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
    LIBS=$OLDLIBS
  fi
fi

case $opsys in
  solaris | unixware )

printf "%s\n" "#define NSIG_MINIMUM 32" >>confdefs.h

    ;;
esac

emacs_broken_SIGIO=no

case $opsys in
    hpux* | nacl | solaris | unixware )
    emacs_broken_SIGIO=yes
    ;;

  aix4-2)

printf "%s\n" "#define BROKEN_GET_CURRENT_DIR_NAME 1" >>confdefs.h

    ;;

  freebsd)

printf "%s\n" "#define BROKEN_PTY_READ_AFTER_EAGAIN 1" >>confdefs.h

    ;;
esac

case $opsys in
  gnu-* | android | solaris | cygwin )

printf "%s\n" "#define HAVE_PROCFS 1" >>confdefs.h

  ;;
esac

case $opsys in
  darwin | dragonfly | freebsd | netbsd | openbsd )

printf "%s\n" "#define DONT_REOPEN_PTY 1" >>confdefs.h

  ;;
esac

case $opsys in
  netbsd | openbsd) sound_device="/dev/audio" ;;
  *) sound_device="/dev/dsp" ;;
esac


printf "%s\n" "#define DEFAULT_SOUND_DEVICE \"$sound_device\"" >>confdefs.h



case $opsys in
  darwin | gnu-linux | gnu-kfreebsd)

printf "%s\n" "#define INTERRUPT_INPUT 1" >>confdefs.h

  ;;
esac


case $opsys in
  cygwin|gnu|gnu-linux|gnu-kfreebsd|freebsd|netbsd|openbsd)

printf "%s\n" "#define NARROWPROTO 1" >>confdefs.h

  ;;
esac








case $opsys in
  aix4-2 )
    printf "%s\n" "#define PTY_ITERATION int c; for (c = 0; !c ; c++)" >>confdefs.h

            printf "%s\n" "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptc\");" >>confdefs.h

    printf "%s\n" "#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd));" >>confdefs.h

    ;;

  cygwin )
    printf "%s\n" "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h

        printf "%s\n" "#define PTY_OPEN  do { int dummy; sigset_t blocked, procmask; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, &procmask); if (-1 == openpty (&fd, &dummy, pty_name, 0, 0)) fd = -1; pthread_sigmask (SIG_SETMASK, &procmask, 0); if (fd >= 0) emacs_close (dummy); } while (false)" >>confdefs.h

    printf "%s\n" "#define PTY_NAME_SPRINTF /**/" >>confdefs.h

    printf "%s\n" "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h

    ;;

  gnu | qnxnto )
    printf "%s\n" "#define FIRST_PTY_LETTER 'p'" >>confdefs.h

    ;;

  android )
    printf "%s\n" "#define PTY_ITERATION int i; for (i = 0; i < 1; ++i)" >>confdefs.h

                ac_fn_check_decl "$LINENO" "grantpt" "ac_cv_have_decl_grantpt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_grantpt" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_GRANTPT $ac_have_decl" >>confdefs.h
ac_fn_check_decl "$LINENO" "posix_openpt" "ac_cv_have_decl_posix_openpt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_posix_openpt" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_POSIX_OPENPT $ac_have_decl" >>confdefs.h

    if test "x$ac_cv_have_decl_grantpt" = xyes
then :
  printf "%s\n" "#define PTY_TTY_NAME_SPRINTF { char *ptyname = 0; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); if (grantpt (fd) != -1 && unlockpt (fd) != -1) ptyname = ptsname(fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (!ptyname) { emacs_close (fd); return -1; } snprintf (pty_name, PTY_NAME_SIZE, \"%s\", ptyname); }" >>confdefs.h

else $as_nop
  printf "%s\n" "#define PTY_TTY_NAME_SPRINTF { char *ptyname = 0; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); if (unlockpt (fd) != -1) ptyname = ptsname(fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (!ptyname) { emacs_close (fd); return -1; } snprintf (pty_name, PTY_NAME_SIZE, \"%s\", ptyname); }" >>confdefs.h

fi
    if test "x$ac_cv_have_decl_posix_openpt" = xyes
then :
  printf "%s\n" "#define PTY_OPEN do { fd = posix_openpt (O_RDWR | O_CLOEXEC | O_NOCTTY); if (fd < 0 && errno == EINVAL) fd = posix_openpt (O_RDWR | O_NOCTTY); } while (false)" >>confdefs.h

       printf "%s\n" "#define PTY_NAME_SPRINTF /**/" >>confdefs.h

else $as_nop
  printf "%s\n" "#define PTY_NAME_SPRINTF /**/" >>confdefs.h

       printf "%s\n" "#define PTY_OPEN fd = getpt ()" >>confdefs.h

fi
    ;;

  gnu-linux | gnu-kfreebsd | dragonfly | freebsd | openbsd | netbsd | darwin | nacl )
        if test "x$ac_cv_func_grantpt" = xyes; then

printf "%s\n" "#define UNIX98_PTYS 1" >>confdefs.h

      printf "%s\n" "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h

                  printf "%s\n" "#define PTY_TTY_NAME_SPRINTF { char *ptyname = 0; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); if (grantpt (fd) != -1 && unlockpt (fd) != -1) ptyname = ptsname(fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (!ptyname) { emacs_close (fd); return -1; } snprintf (pty_name, PTY_NAME_SIZE, \"%s\", ptyname); }" >>confdefs.h

            if test "x$ac_cv_func_posix_openpt" = xyes; then
	printf "%s\n" "#define PTY_OPEN do { fd = posix_openpt (O_RDWR | O_CLOEXEC | O_NOCTTY); if (fd < 0 && errno == EINVAL) fd = posix_openpt (O_RDWR | O_NOCTTY); } while (false)" >>confdefs.h

	printf "%s\n" "#define PTY_NAME_SPRINTF /**/" >>confdefs.h

            elif test "x$ac_cv_func_getpt" = xyes; then
	printf "%s\n" "#define PTY_OPEN fd = getpt ()" >>confdefs.h

	printf "%s\n" "#define PTY_NAME_SPRINTF /**/" >>confdefs.h

      else
	printf "%s\n" "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h

      fi
    else
      printf "%s\n" "#define FIRST_PTY_LETTER 'p'" >>confdefs.h

    fi
    ;;

  hpux*)
    printf "%s\n" "#define FIRST_PTY_LETTER 'p'" >>confdefs.h

    printf "%s\n" "#define PTY_NAME_SPRINTF sprintf (pty_name, \"/dev/ptym/pty%c%x\", c, i);" >>confdefs.h

    printf "%s\n" "#define PTY_TTY_NAME_SPRINTF sprintf (pty_name, \"/dev/pty/tty%c%x\", c, i);" >>confdefs.h

    ;;

  solaris )
                    printf "%s\n" "#define PTY_OPEN fd = open (pty_name, O_RDWR | O_NONBLOCK)" >>confdefs.h

    printf "%s\n" "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; int grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); grantpt_result = grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1 || unlockpt (fd) == -1 || !(ptyname = ptsname (fd))) { emacs_close (fd); return -1; } snprintf (pty_name, PTY_NAME_SIZE, \"%s\", ptyname); }" >>confdefs.h

    ;;

  unixware )
        printf "%s\n" "#define PTY_OPEN fd = open (pty_name, O_RDWR | O_NONBLOCK)" >>confdefs.h

    printf "%s\n" "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; int grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); grantpt_result = grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1) fatal(\"could not grant slave pty\"); if (unlockpt(fd) == -1) fatal(\"could not unlock slave pty\"); if (!(ptyname = ptsname(fd))) fatal (\"could not enable slave pty\"); snprintf (pty_name, PTY_NAME_SIZE, \"%s\", ptyname); }" >>confdefs.h

    ;;

  haiku*)
    printf "%s\n" "#define FIRST_PTY_LETTER 's'" >>confdefs.h

    printf "%s\n" "#define PTY_NAME_SPRINTF /**/" >>confdefs.h

        printf "%s\n" "#define PTY_OPEN fd = posix_openpt (O_RDWR | O_NONBLOCK)" >>confdefs.h

    printf "%s\n" "#define PTY_TTY_NAME_SPRINTF { char *ptyname; int grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); grantpt_result = grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1) fatal(\"could not grant slave pty\"); if (unlockpt(fd) == -1) fatal(\"could not unlock slave pty\"); if (!(ptyname = ptsname(fd))) fatal (\"could not enable slave pty\"); snprintf (pty_name, PTY_NAME_SIZE, \"%s\", ptyname); }" >>confdefs.h

    ;;
esac


case $opsys in
  solaris | unixware )
            printf "%s\n" "#define FIRST_PTY_LETTER 'z'" >>confdefs.h

    printf "%s\n" "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h


printf "%s\n" "#define SETUP_SLAVE_PTY if (ioctl (std_in, I_PUSH, \"ptem\") == -1) fatal (\"ioctl I_PUSH ptem\"); if (ioctl (std_in, I_PUSH, \"ldterm\") == -1) fatal (\"ioctl I_PUSH ldterm\"); if (ioctl (std_in, I_PUSH, \"ttcompat\") == -1) fatal (\"ioctl I_PUSH ttcompat\");" >>confdefs.h

    ;;
esac




case $opsys in
    aix4-2 | cygwin | gnu | dragonfly | freebsd | netbsd | openbsd | darwin )
    printf "%s\n" "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h

    ;;

      gnu-linux | gnu-kfreebsd )

    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for signals via characters" >&5
printf %s "checking for signals via characters... " >&6; }
if test ${emacs_cv_signals_via_chars+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <linux/version.h>
#if LINUX_VERSION_CODE < 0x20400
# error "Linux version too old"
#endif

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_cpp "$LINENO"
then :
  emacs_cv_signals_via_chars=yes
else $as_nop
  emacs_cv_signals_via_chars=no
fi
rm -f conftest.err conftest.i conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_signals_via_chars" >&5
printf "%s\n" "$emacs_cv_signals_via_chars" >&6; }

    test "$emacs_cv_signals_via_chars" = yes &&
      printf "%s\n" "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h

    ;;
esac




case $opsys in
  darwin) printf "%s\n" "#define TAB3 OXTABS" >>confdefs.h
 ;;

  gnu | dragonfly | freebsd | netbsd | openbsd )

printf "%s\n" "#define TABDLY OXTABS" >>confdefs.h

    printf "%s\n" "#define TAB3 OXTABS" >>confdefs.h

    ;;

  gnu-linux | gnu-kfreebsd )
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifndef __ia64__
# error "not ia64"
#endif

int
main (void)
{

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

printf "%s\n" "#define GC_MARK_SECONDARY_STACK() do { extern void *__libc_ia64_register_backing_store_base; __builtin_ia64_flushrs (); mark_memory (__libc_ia64_register_backing_store_base, __builtin_ia64_bsp ());} while (false)" >>confdefs.h

fi
rm -f conftest.err conftest.i conftest.$ac_ext
    ;;

  hpux*)

printf "%s\n" "#define RUN_TIME_REMAP 1" >>confdefs.h

    ;;
esac





case $opsys in
          gnu-linux | gnu-kfreebsd )
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#if defined __i386__ || defined __sparc__ || defined __mc68000__ \
  || defined __alpha__ || defined __mips__ || defined __s390__ \
  || defined __arm__ || defined __powerpc__ || defined __amd64__ \
  || defined __x86_64__ \
  || defined __ia64__ || defined __sh__
/* ok */
#else
# error "setjmp not known to work on this arch"
#endif

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_cpp "$LINENO"
then :
  printf "%s\n" "#define GC_SETJMP_WORKS 1" >>confdefs.h

fi
rm -f conftest.err conftest.i conftest.$ac_ext
    ;;
esac


if test x$GCC = xyes; then
      printf "%s\n" "#define GC_SETJMP_WORKS 1" >>confdefs.h

else
  case $opsys in
    aix* | dragonfly | freebsd | netbsd | openbsd | solaris )
      printf "%s\n" "#define GC_SETJMP_WORKS 1" >>confdefs.h

      ;;
  esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _setjmp" >&5
printf %s "checking for _setjmp... " >&6; }
if test ${emacs_cv_func__setjmp+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <setjmp.h>
         #ifdef __MINGW32__
         # define _longjmp longjmp
         #endif

int
main (void)
{
jmp_buf j;
	 if (! _setjmp (j))
	   _longjmp (j, 1);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  emacs_cv_func__setjmp=yes
else $as_nop
  emacs_cv_func__setjmp=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func__setjmp" >&5
printf "%s\n" "$emacs_cv_func__setjmp" >&6; }
if test $emacs_cv_func__setjmp = yes; then

printf "%s\n" "#define HAVE__SETJMP 1" >>confdefs.h

fi

# We need to preserve signal mask to handle C stack overflows.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
printf %s "checking for sigsetjmp... " >&6; }
if test ${emacs_cv_func_sigsetjmp+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <setjmp.h>

int
main (void)
{
sigjmp_buf j;
         if (! sigsetjmp (j, 1))
	   siglongjmp (j, 1);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  emacs_cv_func_sigsetjmp=yes
else $as_nop
  emacs_cv_func_sigsetjmp=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func_sigsetjmp" >&5
printf "%s\n" "$emacs_cv_func_sigsetjmp" >&6; }
if test $emacs_cv_func_sigsetjmp = yes; then

printf "%s\n" "#define HAVE_SIGSETJMP 1" >>confdefs.h

fi

case $emacs_cv_func_sigsetjmp,$emacs_cv_alternate_stack,$opsys in
  yes,yes,* | *,*,mingw32)

printf "%s\n" "#define HAVE_STACK_OVERFLOW_HANDLING 1" >>confdefs.h
;;
esac

case $opsys in
  solaris | unixware )

printf "%s\n" "#define TIOCSIGSEND TIOCSIGNAL" >>confdefs.h

    ;;
esac


case $opsys in
  hpux* | solaris )

printf "%s\n" "#define XOS_NEEDS_TIME_H 1" >>confdefs.h

    ;;
esac







case $opsys in
  aix4-2)
    printf "%s\n" "#define USG /**/" >>confdefs.h

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

#ifndef _AIX
# error "_AIX not defined"
#endif

int
main (void)
{

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

else $as_nop

printf "%s\n" "#define _AIX /**/" >>confdefs.h

fi
rm -f conftest.err conftest.i conftest.$ac_ext
    ;;

  cygwin)

printf "%s\n" "#define CYGWIN 1" >>confdefs.h

    ;;

  darwin)

printf "%s\n" "#define DARWIN_OS /**/" >>confdefs.h

    ;;

  gnu-linux | gnu-kfreebsd )
    printf "%s\n" "#define USG /**/" >>confdefs.h


printf "%s\n" "#define GNU_LINUX /**/" >>confdefs.h

    ;;

  hpux*)
    printf "%s\n" "#define USG /**/" >>confdefs.h


printf "%s\n" "#define HPUX /**/" >>confdefs.h

    ;;

  mingw32)
    printf "%s\n" "#define DOS_NT /**/" >>confdefs.h


printf "%s\n" "#define WINDOWSNT 1" >>confdefs.h

    if test "x$ac_enable_checking" != "x" ; then

printf "%s\n" "#define EMACSDEBUG 1" >>confdefs.h

    fi
    ;;

  solaris)
    printf "%s\n" "#define USG /**/" >>confdefs.h

    printf "%s\n" "#define USG5_4 /**/" >>confdefs.h


printf "%s\n" "#define SOLARIS2 /**/" >>confdefs.h

    ;;

  unixware)
    printf "%s\n" "#define USG /**/" >>confdefs.h

    printf "%s\n" "#define USG5_4 /**/" >>confdefs.h

    ;;

  haiku)

printf "%s\n" "#define HAIKU /**/" >>confdefs.h

    ;;
esac

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking POSIX termios" >&5
printf %s "checking POSIX termios... " >&6; }
if test ${ac_cv_sys_posix_termios+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
#include <unistd.h>
#include <termios.h>

int
main (void)
{
/* SunOS 4.0.3 has termios.h but not the library calls.  */
   tcgetattr(0, 0);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_sys_posix_termios=yes
else $as_nop
  ac_cv_sys_posix_termios=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_posix_termios" >&5
printf "%s\n" "$ac_cv_sys_posix_termios" >&6; }

if test $ac_cv_sys_posix_termios = yes; then
  # The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of speed_t" >&5
printf %s "checking size of speed_t... " >&6; }
if test ${ac_cv_sizeof_speed_t+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (speed_t))" "ac_cv_sizeof_speed_t"        "#include <termios.h>
"
then :

else $as_nop
  if test "$ac_cv_type_speed_t" = yes; then
     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (speed_t)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_speed_t=0
   fi
fi

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_speed_t" >&5
printf "%s\n" "$ac_cv_sizeof_speed_t" >&6; }



printf "%s\n" "#define SIZEOF_SPEED_T $ac_cv_sizeof_speed_t" >>confdefs.h



  if test ${ac_cv_sizeof_speed_t} -lt 2; then

printf "%s\n" "#define HAVE_TINY_SPEED_T 1" >>confdefs.h

  fi
fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for usable FIONREAD" >&5
printf %s "checking for usable FIONREAD... " >&6; }
if test ${emacs_cv_usable_FIONREAD+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  case $opsys in
     aix4-2 | nacl)
              emacs_cv_usable_FIONREAD=no
       ;;

     mingw32)
       emacs_cv_usable_FIONREAD=yes
       ;;

     *)
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
			    #include <sys/ioctl.h>
			    #ifdef USG5_4
			    # include <sys/filio.h>
			    #endif

int
main (void)
{
int foo = ioctl (0, FIONREAD, &foo);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  emacs_cv_usable_FIONREAD=yes
else $as_nop
  emacs_cv_usable_FIONREAD=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
       ;;
   esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_FIONREAD" >&5
printf "%s\n" "$emacs_cv_usable_FIONREAD" >&6; }
if test $emacs_cv_usable_FIONREAD = yes; then

printf "%s\n" "#define USABLE_FIONREAD 1" >>confdefs.h


  if test $emacs_broken_SIGIO = no; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for usable SIGIO" >&5
printf %s "checking for usable SIGIO... " >&6; }
if test ${emacs_cv_usable_SIGIO+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <fcntl.h>
			    #include <signal.h>

int
main (void)
{
int foo = SIGIO | F_SETFL | FASYNC;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  emacs_cv_usable_SIGIO=yes
else $as_nop
  emacs_cv_usable_SIGIO=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_SIGIO" >&5
printf "%s\n" "$emacs_cv_usable_SIGIO" >&6; }
    if test $emacs_cv_usable_SIGIO = yes; then

printf "%s\n" "#define USABLE_SIGIO 1" >>confdefs.h

    fi
  fi

  if test $emacs_broken_SIGIO = no && test $emacs_cv_usable_SIGIO = no; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for usable SIGPOLL" >&5
printf %s "checking for usable SIGPOLL... " >&6; }
if test ${emacs_cv_usable_SIGPOLL+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <fcntl.h>
			    #include <signal.h>

int
main (void)
{
int foo = SIGPOLL | F_SETFL;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  emacs_cv_usable_SIGPOLL=yes
else $as_nop
  emacs_cv_usable_SIGPOLL=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_SIGPOLL" >&5
printf "%s\n" "$emacs_cv_usable_SIGPOLL" >&6; }
    if test $emacs_cv_usable_SIGPOLL = yes; then

printf "%s\n" "#define USABLE_SIGPOLL 1" >>confdefs.h

    fi
  fi
fi

case $opsys in
  hpux11)

printf "%s\n" "#define USG_SUBTTY_WORKS 1" >>confdefs.h

    ;;

  solaris)

printf "%s\n" "#define _STRUCTURED_PROC 1" >>confdefs.h

    ;;
esac

# Set up the CFLAGS for real compilation, so we can substitute it.
CFLAGS="$REAL_CFLAGS"
CPPFLAGS="$REAL_CPPFLAGS"
LIBS="$REAL_LIBS"

## Hack to detect a buggy GCC version.
if test "$GCC" = yes && \
   $CC --version 2> /dev/null | grep 'gcc.* 4.5.0' >/dev/null; then
  case $CFLAGS in
    *-fno-optimize-sibling-calls*) ;;
    *-O[23]*)
      as_fn_error $? "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS." "$LINENO" 5;;
  esac
fi

version=$PACKAGE_VERSION

copyright="Copyright (C) 2025 Free Software Foundation, Inc."

printf "%s\n" "#define COPYRIGHT \"$copyright\"" >>confdefs.h



### Specify what sort of things we'll be editing into Makefile and config.h.
### Use configuration here uncanonicalized to avoid exceeding size limits.


## Unused?
























## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
## end of LIBX_BASE, but nothing ever set it.




## Used in lwlib/Makefile.in.










if test -n "${term_header}"; then

printf "%s\n" "#define TERM_HEADER \"${term_header}\"" >>confdefs.h

fi


printf "%s\n" "#define EMACS_CONFIGURATION \"${canonical}\"" >>confdefs.h


printf "%s\n" "#define EMACS_CONFIG_OPTIONS \"${emacs_config_options}\"" >>confdefs.h


XMENU_OBJ=
XOBJ=
FONT_OBJ=
if test "${HAVE_X_WINDOWS}" = "yes" ; then

printf "%s\n" "#define HAVE_X_WINDOWS 1" >>confdefs.h

  XMENU_OBJ=xmenu.o
  XOBJ="xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o"
  FONT_OBJ=xfont.o
  if test "$HAVE_CAIRO" = "yes"; then
    FONT_OBJ="$FONT_OBJ ftfont.o ftcrfont.o"
  elif test "$HAVE_XFT" = "yes"; then
    FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o"
  elif test "$HAVE_FREETYPE" = "yes"; then
    FONT_OBJ="$FONT_OBJ ftfont.o"
  fi
fi

if test "${window_system}" = "pgtk"; then
   FONT_OBJ="ftfont.o ftcrfont.o"
fi

if test "${HAVE_BE_APP}" = "yes" ; then
  if test "${HAVE_CAIRO}" = "yes"; then
    FONT_OBJ="$FONT_OBJ ftfont.o ftcrfont.o"
  fi
fi

if test "${HAVE_HARFBUZZ}" = "yes" ; then
  FONT_OBJ="$FONT_OBJ hbfont.o"
fi





WIDGET_OBJ=
MOTIF_LIBW=
if test "${USE_X_TOOLKIT}" != "none" ; then
  WIDGET_OBJ=widget.o

printf "%s\n" "#define USE_X_TOOLKIT 1" >>confdefs.h

  if test "${USE_X_TOOLKIT}" = "LUCID"; then

printf "%s\n" "#define USE_LUCID 1" >>confdefs.h

  elif test "${USE_X_TOOLKIT}" = "MOTIF"; then

printf "%s\n" "#define USE_MOTIF 1" >>confdefs.h

    MOTIF_LIBW=-lXm
    case "$opsys" in
      gnu-linux)
        ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
        MOTIF_LIBW="$MOTIF_LIBW -lXpm"
        ;;

      unixware)
        ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
        ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
        MOTIF_LIBW="MOTIF_LIBW -lXimp"
        ;;

      aix4-2)
        ## olson@mcs.anl.gov says -li18n is needed by -lXm.
        MOTIF_LIBW="$MOTIF_LIBW -li18n"
        ;;
    esac
    MOTIF_LIBW="$MOTIF_LIBW $LIBXP"
  fi
fi


TOOLKIT_LIBW=
case "$USE_X_TOOLKIT" in
  MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
  LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
  none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
esac
if test "$HAVE_XWIDGETS" = "yes"; then
  TOOLKIT_LIBW="$TOOLKIT_LIBW -lXcomposite"
fi


if test "${opsys}" != "mingw32"; then
  if test "$USE_X_TOOLKIT" = "none"; then
    LIBXT_OTHER="\$(LIBXSM)"
  else
    LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
  fi
fi


if test "${HAVE_X11}" = "yes" ; then

printf "%s\n" "#define HAVE_X11 1" >>confdefs.h

  LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
else
  LIBX_OTHER=
fi


HAVE_OLDXMENU=no
if test "$HAVE_GTK" = yes || test "$HAVE_X11" != yes; then
  LIBXMENU=
elif test "$USE_X_TOOLKIT" = none; then
  HAVE_OLDXMENU=yes
  LIBXMENU='$(oldXMenudir)/libXMenu11.a'
  AUTODEPEND_PARENTS="$AUTODEPEND_PARENTS oldXMenu"
else
  LIBXMENU='$(lwlibdir)/liblw.a'
  AUTODEPEND_PARENTS="$AUTODEPEND_PARENTS lwlib"
fi


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct alignment" >&5
printf %s "checking for struct alignment... " >&6; }
if test ${emacs_cv_struct_alignment+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stddef.h>
			struct s { char c; } __attribute__ ((aligned (8)));
			struct t { char c; struct s s; };
			char verify[offsetof (struct t, s) == 8 ? 1 : -1];

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  emacs_cv_struct_alignment=yes
else $as_nop
  emacs_cv_struct_alignment=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_alignment" >&5
printf "%s\n" "$emacs_cv_struct_alignment" >&6; }
if test "$emacs_cv_struct_alignment" = yes; then

printf "%s\n" "#define HAVE_STRUCT_ATTRIBUTE_ALIGNED 1" >>confdefs.h

fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
printf %s "checking for C/C++ restrict keyword... " >&6; }
if test ${ac_cv_c_restrict+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_cv_c_restrict=no
   # Put '__restrict__' first, to avoid problems with glibc and non-GCC; see:
   # https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html
   # Put 'restrict' last, because C++ lacks it.
   for ac_kw in __restrict__ __restrict _Restrict restrict; do
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
typedef int *int_ptr;
	   int foo (int_ptr $ac_kw ip) { return ip[0]; }
	   int bar (int [$ac_kw]); /* Catch GCC bug 14050.  */
	   int bar (int ip[$ac_kw]) { return ip[0]; }

int
main (void)
{
int s[1];
	   int *$ac_kw t = s;
	   t[0] = 0;
	   return foo (t) + bar (t);

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

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
printf "%s\n" "$ac_cv_c_restrict" >&6; }

 case $ac_cv_c_restrict in
   restrict) ;;
   no) printf "%s\n" "#define restrict /**/" >>confdefs.h
 ;;
   *)  printf "%s\n" "#define restrict $ac_cv_c_restrict" >>confdefs.h
 ;;
 esac


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for typeof syntax and keyword spelling" >&5
printf %s "checking for typeof syntax and keyword spelling... " >&6; }
if test ${ac_cv_c_typeof+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_cv_c_typeof=no
     for ac_kw in typeof __typeof__ no; do
       test $ac_kw = no && break
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

	   int value;
	   typedef struct {
		   char a [1
			   + ! (($ac_kw (value))
				(($ac_kw (value)) 0 < ($ac_kw (value)) -1
				 ? ($ac_kw (value)) - 1
				 : ~ (~ ($ac_kw (value)) 0
				      << sizeof ($ac_kw (value)))))]; }
	      ac__typeof_type_;
	   return
	     (! ((void) ((ac__typeof_type_ *) 0), 0));

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_c_typeof=$ac_kw
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
       test $ac_cv_c_typeof != no && break
     done
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_typeof" >&5
printf "%s\n" "$ac_cv_c_typeof" >&6; }
  if test $ac_cv_c_typeof != no; then

printf "%s\n" "#define HAVE_TYPEOF 1" >>confdefs.h

    if test $ac_cv_c_typeof != typeof; then

printf "%s\n" "#define typeof $ac_cv_c_typeof" >>confdefs.h

    fi
  fi


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for statement expressions" >&5
printf %s "checking for statement expressions... " >&6; }
if test ${emacs_cv_statement_expressions+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{
return ({ int x = 5; x-x; });
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  emacs_cv_statement_expressions=yes
else $as_nop
  emacs_cv_statement_expressions=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_statement_expressions" >&5
printf "%s\n" "$emacs_cv_statement_expressions" >&6; }
if test "$emacs_cv_statement_expressions" = yes; then

printf "%s\n" "#define HAVE_STATEMENT_EXPRESSIONS 1" >>confdefs.h

fi

if test "${GNU_MALLOC}" = "yes" ; then

printf "%s\n" "#define GNU_MALLOC 1" >>confdefs.h

fi

RALLOC_OBJ=
if test "${REL_ALLOC}" = "yes" ; then

printf "%s\n" "#define REL_ALLOC 1" >>confdefs.h


  test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o
fi


if test "$opsys" = "cygwin"; then
  CYGWIN_OBJ="cygw32.o"
  ## Cygwin differs because of its unexec().
  PRE_ALLOC_OBJ=
  POST_ALLOC_OBJ=lastfile.o
elif test "$opsys" = "mingw32"; then
  CYGWIN_OBJ=
  PRE_ALLOC_OBJ=
  POST_ALLOC_OBJ=lastfile.o
else
  CYGWIN_OBJ=
  PRE_ALLOC_OBJ=lastfile.o
  POST_ALLOC_OBJ=
fi






# If user asks to omit features, disable optional features that gnulib
# might otherwise enable.
if test "$with_features" = no && test "$enable_acl" != yes; then
  enable_acl=no
fi

# Configure gnulib.  Although this does not affect CFLAGS or LIBS permanently.
# it temporarily reverts them to their pre-pkg-config values,
# because gnulib needs to work with both src (which uses the
# pkg-config stuff) and lib-src (which does not).  For example, gnulib
# may need to determine whether CLOCK_TIME_LIB should contain -lrt,
# and it therefore needs to run in an environment where LIBS does not
# already contain -lrt merely because 'pkg-config --libs' printed '-lrt'
# for some package unrelated to lib-src.
SAVE_CFLAGS=$CFLAGS
SAVE_LIBS=$LIBS
CFLAGS=$pre_PKG_CONFIG_CFLAGS
LIBS="$LIB_PTHREAD $pre_PKG_CONFIG_LIBS"








    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc (0) returns nonnull" >&5
printf %s "checking whether malloc (0) returns nonnull... " >&6; }
if test ${ac_cv_func_malloc_0_nonnull+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test "$cross_compiling" = yes
then :
  case "$host_os" in
          # Guess yes on platforms where we know the result.
          *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
          | gnu* | *-musl* | midipix* | midnightbsd* \
          | hpux* | solaris* | cygwin* | mingw* | windows* | msys* )
            ac_cv_func_malloc_0_nonnull="guessing yes" ;;
          # If we don't know, obey --enable-cross-guesses.
          *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
        esac

else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdlib.h>

int
main (void)
{
void *p = malloc (0);
            void * volatile vp = p;
            int result = !vp;
            free (p);
            return result;
  ;
  return 0;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  ac_cv_func_malloc_0_nonnull=yes
else $as_nop
  ac_cv_func_malloc_0_nonnull=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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
  case $ac_cv_func_malloc_0_nonnull in #(
  *yes) :
    gl_cv_func_malloc_0_nonnull=1 ;; #(
  *) :
    gl_cv_func_malloc_0_nonnull=0 ;;
esac


printf "%s\n" "#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull" >>confdefs.h












                        # Check whether --enable-cross-guesses was given.
if test ${enable_cross_guesses+y}
then :
  enableval=$enable_cross_guesses; if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-cross-guesses" >&5
printf "%s\n" "$as_me: WARNING: invalid argument supplied to --enable-cross-guesses" >&2;}
       enableval=conservative
     fi
     gl_cross_guesses="$enableval"
else $as_nop
  gl_cross_guesses=conservative
fi

  if test $gl_cross_guesses = risky; then
    gl_cross_guess_normal="guessing yes"
    gl_cross_guess_inverted="guessing no"
  else
    gl_cross_guess_normal="guessing no"
    gl_cross_guess_inverted="guessing yes"
  fi
          LIBC_FATAL_STDERR_=1
  export LIBC_FATAL_STDERR_



  gl_need_lib_has_acl=
  # Check whether --enable-acl was given.
if test ${enable_acl+y}
then :
  enableval=$enable_acl;
else $as_nop
  enable_acl=auto
fi






  LIB_ACL=
  use_acl=0
  if test "$enable_acl" != no; then
        ac_fn_c_check_header_compile "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_acl_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_ACL_H 1" >>confdefs.h

fi

    if test $ac_cv_header_sys_acl_h = yes; then
      gl_saved_LIBS=$LIBS

                        if test $use_acl = 0; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing acl_get_file" >&5
printf %s "checking for library containing acl_get_file... " >&6; }
if test ${ac_cv_search_acl_get_file+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  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.  */
char acl_get_file ();
int
main (void)
{
return acl_get_file ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' acl pacl
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_acl_get_file=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext
  if test ${ac_cv_search_acl_get_file+y}
then :
  break
fi
done
if test ${ac_cv_search_acl_get_file+y}
then :

else $as_nop
  ac_cv_search_acl_get_file=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_get_file" >&5
printf "%s\n" "$ac_cv_search_acl_get_file" >&6; }
ac_res=$ac_cv_search_acl_get_file
if test "$ac_res" != no
then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  if test "$ac_cv_search_acl_get_file" != "none required"; then
             LIB_ACL=$ac_cv_search_acl_get_file
           fi
           ac_fn_c_check_func "$LINENO" "acl_get_file" "ac_cv_func_acl_get_file"
if test "x$ac_cv_func_acl_get_file" = xyes
then :
  printf "%s\n" "#define HAVE_ACL_GET_FILE 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "acl_get_fd" "ac_cv_func_acl_get_fd"
if test "x$ac_cv_func_acl_get_fd" = xyes
then :
  printf "%s\n" "#define HAVE_ACL_GET_FD 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "acl_set_file" "ac_cv_func_acl_set_file"
if test "x$ac_cv_func_acl_set_file" = xyes
then :
  printf "%s\n" "#define HAVE_ACL_SET_FILE 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "acl_set_fd" "ac_cv_func_acl_set_fd"
if test "x$ac_cv_func_acl_set_fd" = xyes
then :
  printf "%s\n" "#define HAVE_ACL_SET_FD 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "acl_free" "ac_cv_func_acl_free"
if test "x$ac_cv_func_acl_free" = xyes
then :
  printf "%s\n" "#define HAVE_ACL_FREE 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "acl_from_mode" "ac_cv_func_acl_from_mode"
if test "x$ac_cv_func_acl_from_mode" = xyes
then :
  printf "%s\n" "#define HAVE_ACL_FROM_MODE 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "acl_from_text" "ac_cv_func_acl_from_text"
if test "x$ac_cv_func_acl_from_text" = xyes
then :
  printf "%s\n" "#define HAVE_ACL_FROM_TEXT 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "acl_delete_def_file" "ac_cv_func_acl_delete_def_file"
if test "x$ac_cv_func_acl_delete_def_file" = xyes
then :
  printf "%s\n" "#define HAVE_ACL_DELETE_DEF_FILE 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "acl_extended_file" "ac_cv_func_acl_extended_file"
if test "x$ac_cv_func_acl_extended_file" = xyes
then :
  printf "%s\n" "#define HAVE_ACL_EXTENDED_FILE 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "acl_delete_fd_np" "ac_cv_func_acl_delete_fd_np"
if test "x$ac_cv_func_acl_delete_fd_np" = xyes
then :
  printf "%s\n" "#define HAVE_ACL_DELETE_FD_NP 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "acl_delete_file_np" "ac_cv_func_acl_delete_file_np"
if test "x$ac_cv_func_acl_delete_file_np" = xyes
then :
  printf "%s\n" "#define HAVE_ACL_DELETE_FILE_NP 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "acl_copy_ext_native" "ac_cv_func_acl_copy_ext_native"
if test "x$ac_cv_func_acl_copy_ext_native" = xyes
then :
  printf "%s\n" "#define HAVE_ACL_COPY_EXT_NATIVE 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "acl_create_entry_np" "ac_cv_func_acl_create_entry_np"
if test "x$ac_cv_func_acl_create_entry_np" = xyes
then :
  printf "%s\n" "#define HAVE_ACL_CREATE_ENTRY_NP 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "acl_to_short_text" "ac_cv_func_acl_to_short_text"
if test "x$ac_cv_func_acl_to_short_text" = xyes
then :
  printf "%s\n" "#define HAVE_ACL_TO_SHORT_TEXT 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "acl_free_text" "ac_cv_func_acl_free_text"
if test "x$ac_cv_func_acl_free_text" = xyes
then :
  printf "%s\n" "#define HAVE_ACL_FREE_TEXT 1" >>confdefs.h

fi

           # If the acl_get_file bug is detected, don't enable the ACL support.

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working acl_get_file" >&5
printf %s "checking for working acl_get_file... " >&6; }
if test ${gl_cv_func_working_acl_get_file+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  gl_cv_func_working_acl_get_file=no
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
           #include <sys/acl.h>
           #include <errno.h>

int
main (void)
{
acl_t acl = acl_get_file (".", ACL_TYPE_ACCESS);
            return acl ? acl_free (acl) != 0 : errno == ENOENT;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  if test $cross_compiling = yes; then
          gl_cv_func_working_acl_get_file="guessing yes"
        elif ./conftest$ac_exeext; then
          gl_cv_func_working_acl_get_file=yes
        fi
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_acl_get_file" >&5
printf "%s\n" "$gl_cv_func_working_acl_get_file" >&6; }
  if test "$gl_cv_func_working_acl_get_file" != no
then :
  use_acl=1
fi

           if test $use_acl = 1; then
                          ac_fn_c_check_header_compile "$LINENO" "acl/libacl.h" "ac_cv_header_acl_libacl_h" "$ac_includes_default"
if test "x$ac_cv_header_acl_libacl_h" = xyes
then :
  printf "%s\n" "#define HAVE_ACL_LIBACL_H 1" >>confdefs.h

fi










  for ac_func in acl_entries
do :
  ac_fn_c_check_func "$LINENO" "acl_entries" "ac_cv_func_acl_entries"
if test "x$ac_cv_func_acl_entries" = xyes
then :
  printf "%s\n" "#define HAVE_ACL_ENTRIES 1" >>confdefs.h

else $as_nop

    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"

fi

done

             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ACL_FIRST_ENTRY" >&5
printf %s "checking for ACL_FIRST_ENTRY... " >&6; }
if test ${gl_cv_acl_ACL_FIRST_ENTRY+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
#include <sys/acl.h>
int type = ACL_FIRST_ENTRY;
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_acl_ACL_FIRST_ENTRY=yes
else $as_nop
  gl_cv_acl_ACL_FIRST_ENTRY=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_FIRST_ENTRY" >&5
printf "%s\n" "$gl_cv_acl_ACL_FIRST_ENTRY" >&6; }
             if test $gl_cv_acl_ACL_FIRST_ENTRY = yes; then

printf "%s\n" "#define HAVE_ACL_FIRST_ENTRY 1" >>confdefs.h

             fi
                          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ACL_TYPE_EXTENDED" >&5
printf %s "checking for ACL_TYPE_EXTENDED... " >&6; }
if test ${gl_cv_acl_ACL_TYPE_EXTENDED+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
#include <sys/acl.h>
int type = ACL_TYPE_EXTENDED;
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_acl_ACL_TYPE_EXTENDED=yes
else $as_nop
  gl_cv_acl_ACL_TYPE_EXTENDED=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_TYPE_EXTENDED" >&5
printf "%s\n" "$gl_cv_acl_ACL_TYPE_EXTENDED" >&6; }
             if test $gl_cv_acl_ACL_TYPE_EXTENDED = yes; then

printf "%s\n" "#define HAVE_ACL_TYPE_EXTENDED 1" >>confdefs.h

             fi
           else
             LIB_ACL=
           fi

fi

      fi

            if test $use_acl = 0; then
        ac_fn_c_check_func "$LINENO" "facl" "ac_cv_func_facl"
if test "x$ac_cv_func_facl" = xyes
then :
  printf "%s\n" "#define HAVE_FACL 1" >>confdefs.h

fi

        if test $ac_cv_func_facl = yes; then
          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing acl_trivial" >&5
printf %s "checking for library containing acl_trivial... " >&6; }
if test ${ac_cv_search_acl_trivial+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  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.  */
char acl_trivial ();
int
main (void)
{
return acl_trivial ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' sec
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_acl_trivial=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext
  if test ${ac_cv_search_acl_trivial+y}
then :
  break
fi
done
if test ${ac_cv_search_acl_trivial+y}
then :

else $as_nop
  ac_cv_search_acl_trivial=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_trivial" >&5
printf "%s\n" "$ac_cv_search_acl_trivial" >&6; }
ac_res=$ac_cv_search_acl_trivial
if test "$ac_res" != no
then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  if test "$ac_cv_search_acl_trivial" != "none required"; then
               LIB_ACL=$ac_cv_search_acl_trivial
             fi

fi

          ac_fn_c_check_func "$LINENO" "acl_trivial" "ac_cv_func_acl_trivial"
if test "x$ac_cv_func_acl_trivial" = xyes
then :
  printf "%s\n" "#define HAVE_ACL_TRIVIAL 1" >>confdefs.h

fi

          use_acl=1
        fi
      fi

            if test $use_acl = 0; then
        ac_fn_c_check_func "$LINENO" "getacl" "ac_cv_func_getacl"
if test "x$ac_cv_func_getacl" = xyes
then :
  printf "%s\n" "#define HAVE_GETACL 1" >>confdefs.h

fi

        if test $ac_cv_func_getacl = yes; then
          use_acl=1
        fi
                ac_fn_c_check_header_compile "$LINENO" "aclv.h" "ac_cv_header_aclv_h" "#include <sys/types.h>
"
if test "x$ac_cv_header_aclv_h" = xyes
then :
  printf "%s\n" "#define HAVE_ACLV_H 1" >>confdefs.h

fi

      fi

            if test $use_acl = 0; then
        ac_fn_c_check_func "$LINENO" "aclx_get" "ac_cv_func_aclx_get"
if test "x$ac_cv_func_aclx_get" = xyes
then :
  printf "%s\n" "#define HAVE_ACLX_GET 1" >>confdefs.h

fi

        if test $ac_cv_func_aclx_get = yes; then
          use_acl=1
        fi
      fi

            if test $use_acl = 0 || test "$ac_cv_func_aclx_get" = yes; then
        ac_fn_c_check_func "$LINENO" "statacl" "ac_cv_func_statacl"
if test "x$ac_cv_func_statacl" = xyes
then :
  printf "%s\n" "#define HAVE_STATACL 1" >>confdefs.h

fi

        if test $ac_cv_func_statacl = yes; then
          use_acl=1
        fi
      fi

            if test $use_acl = 0; then
        ac_fn_c_check_func "$LINENO" "aclsort" "ac_cv_func_aclsort"
if test "x$ac_cv_func_aclsort" = xyes
then :
  printf "%s\n" "#define HAVE_ACLSORT 1" >>confdefs.h

fi

        if test $ac_cv_func_aclsort = yes; then
          use_acl=1
        fi
      fi

      LIBS=$gl_saved_LIBS
    fi

    if test "$enable_acl$use_acl" = yes0; then
      as_fn_error $? "ACLs enabled but support not detected" "$LINENO" 5
    elif test "$enable_acl$use_acl" = auto0; then
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: libacl development library was not found or not usable." >&5
printf "%s\n" "$as_me: WARNING: libacl development library was not found or not usable." >&2;}
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: GNU Emacs will be built without ACL support." >&5
printf "%s\n" "$as_me: WARNING: GNU Emacs will be built without ACL support." >&2;}
    fi
  fi
  if test -n "$gl_need_lib_has_acl"; then
    FILE_HAS_ACL_LIB=$LIB_ACL
  fi


printf "%s\n" "#define USE_ACL $use_acl" >>confdefs.h

  USE_ACL=$use_acl



# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments.  Useless!
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
printf %s "checking for working alloca.h... " >&6; }
if test ${ac_cv_working_alloca_h+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <alloca.h>
int
main (void)
{
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 $as_nop
  ac_cv_working_alloca_h=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
printf "%s\n" "$ac_cv_working_alloca_h" >&6; }
if test $ac_cv_working_alloca_h = yes; then

printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h

fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
printf %s "checking for alloca... " >&6; }
if test ${ac_cv_func_alloca_works+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test $ac_cv_working_alloca_h = yes; then
  ac_cv_func_alloca_works=yes
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdlib.h>
#include <stddef.h>
#ifndef alloca
# ifdef __GNUC__
#  define alloca __builtin_alloca
# elif defined _MSC_VER
#  include <malloc.h>
#  define alloca _alloca
# else
#  ifdef  __cplusplus
extern "C"
#  endif
void *alloca (size_t);
# endif
#endif

int
main (void)
{
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 $as_nop
  ac_cv_func_alloca_works=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
printf "%s\n" "$ac_cv_func_alloca_works" >&6; }
fi

if test $ac_cv_func_alloca_works = yes; then

printf "%s\n" "#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

printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h


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

int
main (int argc, char **argv)
{
  return find_stack_direction (0, argc + !argv + 20) < 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  ac_cv_c_stack_direction=1
else $as_nop
  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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
printf "%s\n" "$ac_cv_c_stack_direction" >&6; }
printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h


fi


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
printf %s "checking for a race-free mkdir -p... " >&6; }
if test -z "$MKDIR_P"; then
  if test ${ac_cv_path_mkdir+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_prog in mkdir gmkdir; do
	 for ac_exec_ext in '' $ac_executable_extensions; do
	   as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
	   case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
	     'mkdir ('*'coreutils) '* | \
	     'BusyBox '* | \
	     'mkdir (fileutils) '4.1*)
	       ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
	       break 3;;
	   esac
	 done
       done
  done
IFS=$as_save_IFS

fi

  test -d ./--version && rmdir ./--version
  if test ${ac_cv_path_mkdir+y}; then
    MKDIR_P="$ac_cv_path_mkdir -p"
  else
    # As a last resort, use the slow shell script.  Don't cache a
    # value for MKDIR_P 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.
    MKDIR_P="$ac_install_sh -d"
  fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
printf "%s\n" "$MKDIR_P" >&6; }



  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
printf %s "checking whether the preprocessor supports include_next... " >&6; }
if test ${gl_cv_have_include_next+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  rm -rf conftestd1a conftestd1b conftestd2
     mkdir conftestd1a conftestd1b conftestd2
                                                  cat <<EOF > conftestd1a/conftest.h
#define DEFINED_IN_CONFTESTD1
#include_next <conftest.h>
#ifdef DEFINED_IN_CONFTESTD2
int foo;
#else
#error "include_next doesn't work"
#endif
EOF
     cat <<EOF > conftestd1b/conftest.h
#define DEFINED_IN_CONFTESTD1
#include <stdio.h>
#include_next <conftest.h>
#ifdef DEFINED_IN_CONFTESTD2
int foo;
#else
#error "include_next doesn't work"
#endif
EOF
     cat <<EOF > conftestd2/conftest.h
#ifndef DEFINED_IN_CONFTESTD1
#error "include_next test doesn't work"
#endif
#define DEFINED_IN_CONFTESTD2
EOF
     gl_saved_CPPFLAGS="$CPPFLAGS"
     CPPFLAGS="$gl_saved_CPPFLAGS -Iconftestd1b -Iconftestd2"
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <conftest.h>
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_have_include_next=yes
else $as_nop
  CPPFLAGS="$gl_saved_CPPFLAGS -Iconftestd1a -Iconftestd2"
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <conftest.h>
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_have_include_next=buggy
else $as_nop
  gl_cv_have_include_next=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext

fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
     CPPFLAGS="$gl_saved_CPPFLAGS"
     rm -rf conftestd1a conftestd1b conftestd2

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
printf "%s\n" "$gl_cv_have_include_next" >&6; }
  PRAGMA_SYSTEM_HEADER=
  if test $gl_cv_have_include_next = yes; then
    INCLUDE_NEXT=include_next
    INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
    if test -n "$GCC"; then
      PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
    fi
  else
    if test $gl_cv_have_include_next = buggy; then
      INCLUDE_NEXT=include
      INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
    else
      INCLUDE_NEXT=include
      INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
    fi
  fi




      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether source code line length is unlimited" >&5
printf %s "checking whether source code line length is unlimited... " >&6; }
if test ${gl_cv_source_line_length_unlimited+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef __TANDEM
choke me
#endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "choke me" >/dev/null 2>&1
then :
  gl_cv_source_line_length_unlimited=no
else $as_nop
  gl_cv_source_line_length_unlimited=yes
fi
rm -rf conftest*


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_source_line_length_unlimited" >&5
printf "%s\n" "$gl_cv_source_line_length_unlimited" >&6; }
  if test $gl_cv_source_line_length_unlimited = no; then
    PRAGMA_COLUMNS="#pragma COLUMNS 10000"
  else
    PRAGMA_COLUMNS=
  fi











  if test $ac_cv_header_utmp_h = yes || test $ac_cv_header_utmpx_h = yes; then

    ac_fn_check_decl "$LINENO" "endutent" "ac_cv_have_decl_endutent" "
/* <sys/types.h> is a prerequisite of <utmp.h> on FreeBSD 8.0, OpenBSD 4.6.  */
#include <sys/types.h>
#ifdef HAVE_UTMP_H
# include <utmp.h>
#endif

" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_endutent" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_ENDUTENT $ac_have_decl" >>confdefs.h

    utmp_includes="\
$ac_includes_default
#ifdef HAVE_UTMPX_H
# include <utmpx.h>
#endif
#ifdef HAVE_UTMP_H
# if defined _THREAD_SAFE && defined UTMP_DATA_INIT
   /* When including both utmp.h and utmpx.h on AIX 4.3, with _THREAD_SAFE
      defined, work around the duplicate struct utmp_data declaration.  */
#  define utmp_data gl_aix_4_3_workaround_utmp_data
# endif
# include <utmp.h>
#endif
"
    ac_fn_c_check_member "$LINENO" "struct utmpx" "ut_user" "ac_cv_member_struct_utmpx_ut_user" "$utmp_includes
"
if test "x$ac_cv_member_struct_utmpx_ut_user" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_UTMPX_UT_USER 1" >>confdefs.h


fi

    ac_fn_c_check_member "$LINENO" "struct utmp" "ut_user" "ac_cv_member_struct_utmp_ut_user" "$utmp_includes
"
if test "x$ac_cv_member_struct_utmp_ut_user" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_UTMP_UT_USER 1" >>confdefs.h


fi

    ac_fn_c_check_member "$LINENO" "struct utmpx" "ut_name" "ac_cv_member_struct_utmpx_ut_name" "$utmp_includes
"
if test "x$ac_cv_member_struct_utmpx_ut_name" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_UTMPX_UT_NAME 1" >>confdefs.h


fi

    ac_fn_c_check_member "$LINENO" "struct utmp" "ut_name" "ac_cv_member_struct_utmp_ut_name" "$utmp_includes
"
if test "x$ac_cv_member_struct_utmp_ut_name" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_UTMP_UT_NAME 1" >>confdefs.h


fi

    ac_fn_c_check_member "$LINENO" "struct utmpx" "ut_type" "ac_cv_member_struct_utmpx_ut_type" "$utmp_includes
"
if test "x$ac_cv_member_struct_utmpx_ut_type" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_UTMPX_UT_TYPE 1" >>confdefs.h


fi

    ac_fn_c_check_member "$LINENO" "struct utmp" "ut_type" "ac_cv_member_struct_utmp_ut_type" "$utmp_includes
"
if test "x$ac_cv_member_struct_utmp_ut_type" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_UTMP_UT_TYPE 1" >>confdefs.h


fi

    ac_fn_c_check_member "$LINENO" "struct utmpx" "ut_pid" "ac_cv_member_struct_utmpx_ut_pid" "$utmp_includes
"
if test "x$ac_cv_member_struct_utmpx_ut_pid" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_UTMPX_UT_PID 1" >>confdefs.h


fi

    ac_fn_c_check_member "$LINENO" "struct utmp" "ut_pid" "ac_cv_member_struct_utmp_ut_pid" "$utmp_includes
"
if test "x$ac_cv_member_struct_utmp_ut_pid" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_UTMP_UT_PID 1" >>confdefs.h


fi

    ac_fn_c_check_member "$LINENO" "struct utmp" "ut_tv" "ac_cv_member_struct_utmp_ut_tv" "$utmp_includes
"
if test "x$ac_cv_member_struct_utmp_ut_tv" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_UTMP_UT_TV 1" >>confdefs.h


fi

    ac_fn_c_check_member "$LINENO" "struct utmpx" "ut_host" "ac_cv_member_struct_utmpx_ut_host" "$utmp_includes
"
if test "x$ac_cv_member_struct_utmpx_ut_host" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_UTMPX_UT_HOST 1" >>confdefs.h


fi

    ac_fn_c_check_member "$LINENO" "struct utmp" "ut_host" "ac_cv_member_struct_utmp_ut_host" "$utmp_includes
"
if test "x$ac_cv_member_struct_utmp_ut_host" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_UTMP_UT_HOST 1" >>confdefs.h


fi

    ac_fn_c_check_member "$LINENO" "struct utmpx" "ut_id" "ac_cv_member_struct_utmpx_ut_id" "$utmp_includes
"
if test "x$ac_cv_member_struct_utmpx_ut_id" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_UTMPX_UT_ID 1" >>confdefs.h


fi

    ac_fn_c_check_member "$LINENO" "struct utmp" "ut_id" "ac_cv_member_struct_utmp_ut_id" "$utmp_includes
"
if test "x$ac_cv_member_struct_utmp_ut_id" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_UTMP_UT_ID 1" >>confdefs.h


fi

    ac_fn_c_check_member "$LINENO" "struct utmpx" "ut_session" "ac_cv_member_struct_utmpx_ut_session" "$utmp_includes
"
if test "x$ac_cv_member_struct_utmpx_ut_session" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_UTMPX_UT_SESSION 1" >>confdefs.h


fi

    ac_fn_c_check_member "$LINENO" "struct utmp" "ut_session" "ac_cv_member_struct_utmp_ut_session" "$utmp_includes
"
if test "x$ac_cv_member_struct_utmp_ut_session" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_UTMP_UT_SESSION 1" >>confdefs.h


fi

    ac_fn_c_check_member "$LINENO" "struct utmpx" "ut_exit" "ac_cv_member_struct_utmpx_ut_exit" "$utmp_includes
"
if test "x$ac_cv_member_struct_utmpx_ut_exit" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_UTMPX_UT_EXIT 1" >>confdefs.h


fi

    ac_fn_c_check_member "$LINENO" "struct utmp" "ut_exit" "ac_cv_member_struct_utmp_ut_exit" "$utmp_includes
"
if test "x$ac_cv_member_struct_utmp_ut_exit" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_UTMP_UT_EXIT 1" >>confdefs.h


fi


    ac_fn_c_check_member "$LINENO" "struct utmpx" "ut_exit.ut_exit" "ac_cv_member_struct_utmpx_ut_exit_ut_exit" "$utmp_includes
"
if test "x$ac_cv_member_struct_utmpx_ut_exit_ut_exit" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_UTMPX_UT_EXIT_UT_EXIT 1" >>confdefs.h


fi

    ac_fn_c_check_member "$LINENO" "struct utmpx" "ut_exit.e_exit" "ac_cv_member_struct_utmpx_ut_exit_e_exit" "$utmp_includes
"
if test "x$ac_cv_member_struct_utmpx_ut_exit_e_exit" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_UTMPX_UT_EXIT_E_EXIT 1" >>confdefs.h


fi

    ac_fn_c_check_member "$LINENO" "struct utmp" "ut_exit.e_exit" "ac_cv_member_struct_utmp_ut_exit_e_exit" "$utmp_includes
"
if test "x$ac_cv_member_struct_utmp_ut_exit_e_exit" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_UTMP_UT_EXIT_E_EXIT 1" >>confdefs.h


fi


    ac_fn_c_check_member "$LINENO" "struct utmpx" "ut_exit.ut_termination" "ac_cv_member_struct_utmpx_ut_exit_ut_termination" "$utmp_includes
"
if test "x$ac_cv_member_struct_utmpx_ut_exit_ut_termination" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_UTMPX_UT_EXIT_UT_TERMINATION 1" >>confdefs.h


fi

    ac_fn_c_check_member "$LINENO" "struct utmpx" "ut_exit.e_termination" "ac_cv_member_struct_utmpx_ut_exit_e_termination" "$utmp_includes
"
if test "x$ac_cv_member_struct_utmpx_ut_exit_e_termination" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_UTMPX_UT_EXIT_E_TERMINATION 1" >>confdefs.h


fi

    ac_fn_c_check_member "$LINENO" "struct utmp" "ut_exit.e_termination" "ac_cv_member_struct_utmp_ut_exit_e_termination" "$utmp_includes
"
if test "x$ac_cv_member_struct_utmp_ut_exit_e_termination" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_UTMP_UT_EXIT_E_TERMINATION 1" >>confdefs.h


fi

  fi

  ac_fn_check_decl "$LINENO" "sysinfo" "ac_cv_have_decl_sysinfo" "
    #include <sys/sysinfo.h>

" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_sysinfo" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_SYSINFO $ac_have_decl" >>confdefs.h



    ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default
     #if HAVE_SYS_PARAM_H
     # include <sys/param.h>
     #endif

"
if test "x$ac_cv_header_sys_sysctl_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_SYSCTL_H 1" >>confdefs.h

fi

  ac_fn_c_check_func "$LINENO" "sysctl" "ac_cv_func_sysctl"
if test "x$ac_cv_func_sysctl" = xyes
then :
  printf "%s\n" "#define HAVE_SYSCTL 1" >>confdefs.h

fi






    HAVE__EXIT=1;
  HAVE_ALIGNED_ALLOC=1;
  HAVE_ATOLL=1;
  HAVE_CANONICALIZE_FILE_NAME=1;
  HAVE_DECL_ECVT=1;
  HAVE_DECL_FCVT=1;
  HAVE_DECL_GCVT=1;
  HAVE_DECL_GETLOADAVG=1;
  HAVE_DECL_PROGRAM_INVOCATION_NAME=1;
  HAVE_GETPROGNAME=1;
  HAVE_GETSUBOPT=1;
  HAVE_GRANTPT=1;
  HAVE_INITSTATE=1;
  HAVE_DECL_INITSTATE=1;
  HAVE_MBTOWC=1;
  HAVE_MKDTEMP=1;
  HAVE_MKOSTEMP=1;
  HAVE_MKOSTEMPS=1;
  HAVE_MKSTEMP=1;
  HAVE_MKSTEMPS=1;
  HAVE_POSIX_MEMALIGN=1;
  HAVE_POSIX_OPENPT=1;
  HAVE_PTSNAME=1;
  HAVE_PTSNAME_R=1;
  HAVE_QSORT_R=1;
  HAVE_RANDOM=1;
  HAVE_RANDOM_H=1;
  HAVE_RANDOM_R=1;
  HAVE_REALLOCARRAY=1;
  HAVE_REALPATH=1;
  HAVE_RPMATCH=1;
  HAVE_SECURE_GETENV=1;
  HAVE_SETENV=1;
  HAVE_DECL_SETENV=1;
  HAVE_SETSTATE=1;
  HAVE_DECL_SETSTATE=1;
  HAVE_STRTOD=1;
  HAVE_STRTOF=1;
  HAVE_STRTOL=1;
  HAVE_STRTOLD=1;
  HAVE_STRTOLL=1;
  HAVE_STRTOUL=1;
  HAVE_STRTOULL=1;
  HAVE_STRUCT_RANDOM_DATA=1;
  HAVE_SYS_LOADAVG_H=0;
  HAVE_UNLOCKPT=1;
  HAVE_DECL_UNSETENV=1;
  REPLACE__EXIT=0;
  REPLACE_ABORT=0;
  REPLACE_ALIGNED_ALLOC=0;
  REPLACE_CALLOC_FOR_CALLOC_GNU=0;
  REPLACE_CALLOC_FOR_CALLOC_POSIX=0;
  REPLACE_CANONICALIZE_FILE_NAME=0;
  REPLACE_FREE=0;
  REPLACE_GETLOADAVG=0;
  REPLACE_GETPROGNAME=0;
  REPLACE_GETSUBOPT=0;
  REPLACE_INITSTATE=0;
  REPLACE_MALLOC_FOR_MALLOC_GNU=0;
  REPLACE_MALLOC_FOR_MALLOC_POSIX=0;
  REPLACE_MB_CUR_MAX=0;
  REPLACE_MBSTOWCS=0;
  REPLACE_MBTOWC=0;
  REPLACE_MKOSTEMP=0;
  REPLACE_MKOSTEMPS=0;
  REPLACE_MKSTEMP=0;
  REPLACE_POSIX_MEMALIGN=0;
  REPLACE_POSIX_OPENPT=0;
  REPLACE_PTSNAME=0;
  REPLACE_PTSNAME_R=0;
  REPLACE_PUTENV=0;
  REPLACE_QSORT_R=0;
  REPLACE_RAND=0;
  REPLACE_RANDOM=0;
  REPLACE_RANDOM_R=0;
  REPLACE_REALLOC_FOR_REALLOC_GNU=0;
  REPLACE_REALLOC_FOR_REALLOC_POSIX=0;
  REPLACE_REALLOCARRAY=0;
  REPLACE_REALPATH=0;
  REPLACE_SETENV=0;
  REPLACE_SETSTATE=0;
  REPLACE_STRTOD=0;
  REPLACE_STRTOF=0;
  REPLACE_STRTOL=0;
  REPLACE_STRTOLD=0;
  REPLACE_STRTOLL=0;
  REPLACE_STRTOUL=0;
  REPLACE_STRTOULL=0;
  REPLACE_UNSETENV=0;
  REPLACE_WCTOMB=0;


         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
printf %s "checking whether lstat correctly handles trailing slash... " >&6; }
if test ${gl_cv_func_lstat_dereferences_slashed_symlink+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  rm -f conftest.sym conftest.file
     echo >conftest.file
     if test "$cross_compiling" = yes
then :
  case "$host_os" in
          linux-* | linux)
            # Guess yes on Linux systems.
            gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
          midipix*)
            # Guess yes on systems that emulate the Linux system calls.
            gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
          *-gnu* | gnu*)
            # Guess yes on glibc systems.
            gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
          mingw* | windows*)
            # Guess no on native Windows.
            gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
          *)
            # If we don't know, obey --enable-cross-guesses.
            gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;;
        esac

else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_includes_default
int
main (void)
{
struct stat sbuf;
            if (symlink ("conftest.file", "conftest.sym") != 0)
              return 1;
            /* Linux will dereference the symlink and fail, as required by
               POSIX.  That is better in the sense that it means we will not
               have to compile and use the lstat wrapper.  */
            return lstat ("conftest.sym/", &sbuf) == 0;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  gl_cv_func_lstat_dereferences_slashed_symlink=yes
else $as_nop
  gl_cv_func_lstat_dereferences_slashed_symlink=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 conftest.sym conftest.file

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
printf "%s\n" "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
  case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
    *yes)

printf "%s\n" "#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1" >>confdefs.h

      ;;
  esac




  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
printf %s "checking whether // is distinct from /... " >&6; }
if test ${gl_cv_double_slash_root+y}
then :
  printf %s "(cached) " >&6
else $as_nop
   if test x"$cross_compiling" = xyes ; then
        # When cross-compiling, there is no way to tell whether // is special
        # short of a list of hosts.  However, the only known hosts to date
        # that have a distinct // are Apollo DomainOS (too old to port to),
        # Cygwin, and z/OS.  If anyone knows of another system for which // has
        # special semantics and is distinct from /, please report it to
        # <bug-gnulib@gnu.org>.
        case $host in
          *-cygwin | i370-ibm-openedition)
            gl_cv_double_slash_root=yes ;;
          *)
            # Be optimistic and assume that / and // are the same when we
            # don't know.
            gl_cv_double_slash_root='unknown, assuming no' ;;
        esac
      else
        set x `ls -di / // 2>/dev/null`
        if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
          gl_cv_double_slash_root=no
        else
          gl_cv_double_slash_root=yes
        fi
      fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
printf "%s\n" "$gl_cv_double_slash_root" >&6; }
  if test "$gl_cv_double_slash_root" = yes; then

printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h

  fi





     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
printf %s "checking whether realpath works... " >&6; }
if test ${gl_cv_func_realpath_works+y}
then :
  printf %s "(cached) " >&6
else $as_nop

    rm -rf conftest.a conftest.d
    touch conftest.a
    # Assume that if we have lstat, we can also check symlinks.
    if test $ac_cv_func_lstat = yes; then
      ln -s conftest.a conftest.l
    fi
    mkdir conftest.d
    if test "$cross_compiling" = yes
then :
  case "$host_os" in
                           # Guess yes on glibc systems.
        *-gnu* | gnu*)     gl_cv_func_realpath_works="guessing yes" ;;
                           # Guess 'nearly' on musl systems.
        *-musl*)           gl_cv_func_realpath_works="guessing nearly" ;;
                           # Guess no on Cygwin.
        cygwin*)           gl_cv_func_realpath_works="guessing no" ;;
                           # Guess no on native Windows.
        mingw* | windows*) gl_cv_func_realpath_works="guessing no" ;;
                           # If we don't know, obey --enable-cross-guesses.
        *)                 gl_cv_func_realpath_works="$gl_cross_guess_normal" ;;
      esac

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



#include <stdlib.h>
#if defined __MACH__ && defined __APPLE__
/* Avoid a crash on Mac OS X.  */
#include <mach/mach.h>
#include <mach/mach_error.h>
#include <mach/thread_status.h>
#include <mach/exception.h>
#include <mach/task.h>
#include <pthread.h>
/* The exception port on which our thread listens.  */
static mach_port_t our_exception_port;
/* The main function of the thread listening for exceptions of type
   EXC_BAD_ACCESS.  */
static void *
mach_exception_thread (void *arg)
{
  /* Buffer for a message to be received.  */
  struct {
    mach_msg_header_t head;
    mach_msg_body_t msgh_body;
    char data[1024];
  } msg;
  mach_msg_return_t retval;
  /* Wait for a message on the exception port.  */
  retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
                     our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
  if (retval != MACH_MSG_SUCCESS)
    abort ();
  exit (1);
}
static void
nocrash_init (void)
{
  mach_port_t self = mach_task_self ();
  /* Allocate a port on which the thread shall listen for exceptions.  */
  if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
      == KERN_SUCCESS) {
    /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
    if (mach_port_insert_right (self, our_exception_port, our_exception_port,
                                MACH_MSG_TYPE_MAKE_SEND)
        == KERN_SUCCESS) {
      /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
         for us.  */
      exception_mask_t mask = EXC_MASK_BAD_ACCESS;
      /* Create the thread listening on the exception port.  */
      pthread_attr_t attr;
      pthread_t thread;
      if (pthread_attr_init (&attr) == 0
          && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
          && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
        pthread_attr_destroy (&attr);
        /* Replace the exception port info for these exceptions with our own.
           Note that we replace the exception port for the entire task, not only
           for a particular thread.  This has the effect that when our exception
           port gets the message, the thread specific exception port has already
           been asked, and we don't need to bother about it.
           See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
        task_set_exception_ports (self, mask, our_exception_port,
                                  EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
      }
    }
  }
}
#elif defined _WIN32 && ! defined __CYGWIN__
/* Avoid a crash on native Windows.  */
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <winerror.h>
static LONG WINAPI
exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
{
  switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
    {
    case EXCEPTION_ACCESS_VIOLATION:
    case EXCEPTION_IN_PAGE_ERROR:
    case EXCEPTION_STACK_OVERFLOW:
    case EXCEPTION_GUARD_PAGE:
    case EXCEPTION_PRIV_INSTRUCTION:
    case EXCEPTION_ILLEGAL_INSTRUCTION:
    case EXCEPTION_DATATYPE_MISALIGNMENT:
    case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
    case EXCEPTION_NONCONTINUABLE_EXCEPTION:
      exit (1);
    }
  return EXCEPTION_CONTINUE_SEARCH;
}
static void
nocrash_init (void)
{
  SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
}
#else
/* Avoid a crash on POSIX systems.  */
#include <signal.h>
#include <unistd.h>
/* A POSIX signal handler.  */
static void
exception_handler (int sig)
{
  _exit (1);
}
static void
nocrash_init (void)
{
#ifdef SIGSEGV
  signal (SIGSEGV, exception_handler);
#endif
#ifdef SIGBUS
  signal (SIGBUS, exception_handler);
#endif
}
#endif

        #include <errno.h>
        #include <stdlib.h>
        #include <string.h>

int
main (void)
{

        int result = 0;
        /* This test fails on Solaris 10.  */
        {
          char *name = realpath ("conftest.a", NULL);
          if (!(name && *name == '/'))
            result |= 1;
          free (name);
        }
        /* This test fails on older versions of Cygwin.  */
        {
          char *name = realpath ("conftest.b/../conftest.a", NULL);
          if (name != NULL)
            result |= 2;
          free (name);
        }
        /* This test fails on Cygwin 2.9.  */
        #if HAVE_LSTAT
        {
          char *name = realpath ("conftest.l/../conftest.a", NULL);
          if (name != NULL || errno != ENOTDIR)
            result |= 4;
          free (name);
        }
        #endif
        /* This test fails on Mac OS X 10.13, OpenBSD 6.0.  */
        {
          char *name = realpath ("conftest.a/", NULL);
          if (name != NULL)
            result |= 8;
          free (name);
        }
        /* This test fails on AIX 7, Solaris 10.  */
        {
          char *name1 = realpath (".", NULL);
          char *name2 = realpath ("conftest.d//./..", NULL);
          if (! name1 || ! name2 || strcmp (name1, name2))
            result |= 16;
          free (name1);
          free (name2);
        }
        #ifdef __linux__
        /* On Linux, // is the same as /. See also double-slash-root.m4.
           realpath() should respect this.
           This test fails on musl libc 1.2.2.  */
        {
          char *name = realpath ("//", NULL);
          if (! name || strcmp (name, "/"))
            result |= 32;
          free (name);
        }
        #endif
        return result;

  ;
  return 0;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  gl_cv_func_realpath_works=yes
else $as_nop
  case $? in
        32) gl_cv_func_realpath_works=nearly ;;
        *)  gl_cv_func_realpath_works=no ;;
      esac

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

    rm -rf conftest.a conftest.l conftest.d

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
printf "%s\n" "$gl_cv_func_realpath_works" >&6; }
  case "$gl_cv_func_realpath_works" in
    *yes)

printf "%s\n" "#define FUNC_REALPATH_WORKS 1" >>confdefs.h

      ;;
    *nearly)

printf "%s\n" "#define FUNC_REALPATH_NEARLY_WORKS 1" >>confdefs.h

      ;;
  esac







  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for faccessat" >&5
printf %s "checking for faccessat... " >&6; }
if test ${gl_cv_onwards_func_faccessat+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  exec 9>&6 6>/dev/null

       case "$host_os" in

         linux*-android*)
           ac_fn_check_decl "$LINENO" "faccessat" "ac_cv_have_decl_faccessat" "#include <unistd.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_faccessat" = xyes
then :

fi
           if test $ac_cv_have_decl_faccessat = yes; then
             ac_fn_c_check_func "$LINENO" "faccessat" "ac_cv_func_faccessat"
if test "x$ac_cv_func_faccessat" = xyes
then :

fi

             if test $ac_cv_func_faccessat = yes; then
               gl_cv_onwards_func_faccessat=yes
             else
                                                            gl_cv_onwards_func_faccessat='future OS version'
             fi
           else
             gl_cv_onwards_func_faccessat='future OS version'
           fi
           ;;


         *)
           ac_fn_c_check_func "$LINENO" "faccessat" "ac_cv_func_faccessat"
if test "x$ac_cv_func_faccessat" = xyes
then :

fi

           gl_cv_onwards_func_faccessat=$ac_cv_func_faccessat
           ;;

       esac

  exec 6>&9 9>&-


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_faccessat" >&5
printf "%s\n" "$gl_cv_onwards_func_faccessat" >&6; }

  case "$gl_cv_onwards_func_faccessat" in
    future*) ac_cv_func_faccessat=no ;;
    *)       ac_cv_func_faccessat=$gl_cv_onwards_func_faccessat ;;
  esac
  if test $ac_cv_func_faccessat = yes; then

printf "%s\n" "#define HAVE_FACCESSAT 1" >>confdefs.h

  fi




  case "$host_os" in
    mingw* | windows*) ;;
    *) ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
if test "x$ac_cv_func_getcwd" = xyes
then :
  printf "%s\n" "#define HAVE_GETCWD 1" >>confdefs.h

fi
 ;;
  esac







  GL_GNULIB__EXIT=0



  GL_GNULIB_ABORT_DEBUG=0



  GL_GNULIB_ALIGNED_ALLOC=0



  GL_GNULIB_ATOLL=0



  GL_GNULIB_CALLOC_GNU=0



  GL_GNULIB_CALLOC_POSIX=0



  GL_GNULIB_CANONICALIZE_FILE_NAME=0



  GL_GNULIB_FREE_POSIX=0



  GL_GNULIB_GETLOADAVG=0



  GL_GNULIB_GETPROGNAME=0



  GL_GNULIB_GETSUBOPT=0



  GL_GNULIB_GRANTPT=0



  GL_GNULIB_MALLOC_GNU=0



  GL_GNULIB_MALLOC_POSIX=0



  GL_GNULIB_MBSTOWCS=0



  GL_GNULIB_MBTOWC=0



  GL_GNULIB_MKDTEMP=0



  GL_GNULIB_MKOSTEMP=0



  GL_GNULIB_MKOSTEMPS=0



  GL_GNULIB_MKSTEMP=0



  GL_GNULIB_MKSTEMPS=0



  GL_GNULIB_POSIX_MEMALIGN=0



  GL_GNULIB_POSIX_OPENPT=0



  GL_GNULIB_PTSNAME=0



  GL_GNULIB_PTSNAME_R=0



  GL_GNULIB_PUTENV=0



  GL_GNULIB_QSORT_R=0



  GL_GNULIB_RAND=0



  GL_GNULIB_RANDOM=0



  GL_GNULIB_RANDOM_R=0



  GL_GNULIB_REALLOCARRAY=0



  GL_GNULIB_REALLOC_GNU=0



  GL_GNULIB_REALLOC_POSIX=0



  GL_GNULIB_REALPATH=0



  GL_GNULIB_RPMATCH=0



  GL_GNULIB_SECURE_GETENV=0



  GL_GNULIB_SETENV=0



  GL_GNULIB_STRTOD=0



  GL_GNULIB_STRTOF=0



  GL_GNULIB_STRTOL=0



  GL_GNULIB_STRTOLD=0



  GL_GNULIB_STRTOLL=0



  GL_GNULIB_STRTOUL=0



  GL_GNULIB_STRTOULL=0



  GL_GNULIB_SYSTEM_POSIX=0



  GL_GNULIB_UNLOCKPT=0



  GL_GNULIB_UNSETENV=0



  GL_GNULIB_WCTOMB=0



  GL_GNULIB_MDA_ECVT=1



  GL_GNULIB_MDA_FCVT=1



  GL_GNULIB_MDA_GCVT=1



  GL_GNULIB_MDA_MKTEMP=1



  GL_GNULIB_MDA_PUTENV=1




    HAVE_CHOWN=1;
  HAVE_COPY_FILE_RANGE=1;
  HAVE_DUP3=1;
  HAVE_EUIDACCESS=1;
  HAVE_EXECVPE=1;
  HAVE_FACCESSAT=1;
  HAVE_FCHDIR=1;
  HAVE_FCHOWNAT=1;
  HAVE_FDATASYNC=1;
  HAVE_FSYNC=1;
  HAVE_FTRUNCATE=1;
  HAVE_GETDTABLESIZE=1;
  HAVE_GETENTROPY=1;
  HAVE_GETGROUPS=1;
  HAVE_GETHOSTNAME=1;
  HAVE_GETLOGIN=1;
  HAVE_GETPAGESIZE=1;
  HAVE_GETPASS=1;
  HAVE_GROUP_MEMBER=1;
  HAVE_LCHOWN=1;
  HAVE_LINK=1;
  HAVE_LINKAT=1;
  HAVE_PIPE=1;
  HAVE_PIPE2=1;
  HAVE_PREAD=1;
  HAVE_PWRITE=1;
  HAVE_READLINK=1;
  HAVE_READLINKAT=1;
  HAVE_SETHOSTNAME=1;
  HAVE_SLEEP=1;
  HAVE_SYMLINK=1;
  HAVE_SYMLINKAT=1;
  HAVE_UNLINKAT=1;
  HAVE_USLEEP=1;
  HAVE_DECL_ENVIRON=1;
  HAVE_DECL_EXECVPE=1;
  HAVE_DECL_FCHDIR=1;
  HAVE_DECL_FDATASYNC=1;
  HAVE_DECL_GETDOMAINNAME=1;
  HAVE_DECL_GETLOGIN=1;
  HAVE_DECL_GETLOGIN_R=1;
  HAVE_DECL_GETPAGESIZE=1;
  HAVE_DECL_GETUSERSHELL=1;
  HAVE_DECL_SETHOSTNAME=1;
  HAVE_DECL_TRUNCATE=1;
  HAVE_DECL_TTYNAME_R=1;
  HAVE_OS_H=0;
  HAVE_SYS_PARAM_H=0;
  REPLACE_ACCESS=0;
  REPLACE_CHOWN=0;
  REPLACE_CLOSE=0;
  REPLACE_COPY_FILE_RANGE=0;
  REPLACE_DUP=0;
  REPLACE_DUP2=0;
  REPLACE_DUP3=0;
  REPLACE_EXECL=0;
  REPLACE_EXECLE=0;
  REPLACE_EXECLP=0;
  REPLACE_EXECV=0;
  REPLACE_EXECVE=0;
  REPLACE_EXECVP=0;
  REPLACE_EXECVPE=0;
  REPLACE_FACCESSAT=0;
  REPLACE_FCHDIR=0;
  REPLACE_FCHOWNAT=0;
  REPLACE_FDATASYNC=0;
  REPLACE_FTRUNCATE=0;
  REPLACE_GETCWD=0;
  REPLACE_GETDOMAINNAME=0;
  REPLACE_GETDTABLESIZE=0;
  REPLACE_GETENTROPY=0;
  REPLACE_GETLOGIN_R=0;
  REPLACE_GETGROUPS=0;
  REPLACE_GETPAGESIZE=0;
  REPLACE_GETPASS=0;
  REPLACE_GETPASS_FOR_GETPASS_GNU=0;
  REPLACE_GETUSERSHELL=0;
  REPLACE_ISATTY=0;
  REPLACE_LCHOWN=0;
  REPLACE_LINK=0;
  REPLACE_LINKAT=0;
  REPLACE_LSEEK=0;
  REPLACE_PIPE2=0;
  REPLACE_PREAD=0;
  REPLACE_PWRITE=0;
  REPLACE_READ=0;
  REPLACE_READLINK=0;
  REPLACE_READLINKAT=0;
  REPLACE_RMDIR=0;
  REPLACE_SETHOSTNAME=0;
  REPLACE_SLEEP=0;
  REPLACE_SYMLINK=0;
  REPLACE_SYMLINKAT=0;
  REPLACE_TRUNCATE=0;
  REPLACE_TTYNAME_R=0;
  REPLACE_UNLINK=0;
  REPLACE_UNLINKAT=0;
  REPLACE_USLEEP=0;
  REPLACE_WRITE=0;
  UNISTD_H_HAVE_SYS_RANDOM_H=0;
  UNISTD_H_HAVE_WINSOCK2_H=0;
  UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;




  GL_GNULIB_ACCESS=0



  GL_GNULIB_CHDIR=0



  GL_GNULIB_CHOWN=0



  GL_GNULIB_CLOSE=0



  GL_GNULIB_COPY_FILE_RANGE=0



  GL_GNULIB_DUP=0



  GL_GNULIB_DUP2=0



  GL_GNULIB_DUP3=0



  GL_GNULIB_ENVIRON=0



  GL_GNULIB_EUIDACCESS=0



  GL_GNULIB_EXECL=0



  GL_GNULIB_EXECLE=0



  GL_GNULIB_EXECLP=0



  GL_GNULIB_EXECV=0



  GL_GNULIB_EXECVE=0



  GL_GNULIB_EXECVP=0



  GL_GNULIB_EXECVPE=0



  GL_GNULIB_FACCESSAT=0



  GL_GNULIB_FCHDIR=0



  GL_GNULIB_FCHOWNAT=0



  GL_GNULIB_FDATASYNC=0



  GL_GNULIB_FSYNC=0



  GL_GNULIB_FTRUNCATE=0



  GL_GNULIB_GETCWD=0



  GL_GNULIB_GETDOMAINNAME=0



  GL_GNULIB_GETDTABLESIZE=0



  GL_GNULIB_GETENTROPY=0



  GL_GNULIB_GETGROUPS=0



  GL_GNULIB_GETHOSTNAME=0



  GL_GNULIB_GETLOGIN=0



  GL_GNULIB_GETLOGIN_R=0



  GL_GNULIB_GETOPT_POSIX=0



  GL_GNULIB_GETPAGESIZE=0



  GL_GNULIB_GETPASS=0



  GL_GNULIB_GETPASS_GNU=0



  GL_GNULIB_GETUSERSHELL=0



  GL_GNULIB_GROUP_MEMBER=0



  GL_GNULIB_ISATTY=0



  GL_GNULIB_LCHOWN=0



  GL_GNULIB_LINK=0



  GL_GNULIB_LINKAT=0



  GL_GNULIB_LSEEK=0



  GL_GNULIB_PIPE=0



  GL_GNULIB_PIPE2=0



  GL_GNULIB_PREAD=0



  GL_GNULIB_PWRITE=0



  GL_GNULIB_READ=0



  GL_GNULIB_READLINK=0



  GL_GNULIB_READLINKAT=0



  GL_GNULIB_RMDIR=0



  GL_GNULIB_SETHOSTNAME=0



  GL_GNULIB_SLEEP=0



  GL_GNULIB_SYMLINK=0



  GL_GNULIB_SYMLINKAT=0



  GL_GNULIB_TRUNCATE=0



  GL_GNULIB_TTYNAME_R=0



  GL_GNULIB_UNISTD_H_GETOPT=0



  GL_GNULIB_UNISTD_H_NONBLOCKING=0



  GL_GNULIB_UNISTD_H_SIGPIPE=0



  GL_GNULIB_UNLINK=0



  GL_GNULIB_UNLINKAT=0



  GL_GNULIB_USLEEP=0



  GL_GNULIB_WRITE=0



  GL_GNULIB_MDA_ACCESS=1



  GL_GNULIB_MDA_CHDIR=1



  GL_GNULIB_MDA_CLOSE=1



  GL_GNULIB_MDA_DUP=1



  GL_GNULIB_MDA_DUP2=1



  GL_GNULIB_MDA_EXECL=1



  GL_GNULIB_MDA_EXECLE=1



  GL_GNULIB_MDA_EXECLP=1



  GL_GNULIB_MDA_EXECV=1



  GL_GNULIB_MDA_EXECVE=1



  GL_GNULIB_MDA_EXECVP=1



  GL_GNULIB_MDA_EXECVPE=1



  GL_GNULIB_MDA_GETCWD=1



  GL_GNULIB_MDA_GETPID=1



  GL_GNULIB_MDA_ISATTY=1



  GL_GNULIB_MDA_LSEEK=1



  GL_GNULIB_MDA_READ=1



  GL_GNULIB_MDA_RMDIR=1



  GL_GNULIB_MDA_SWAB=1



  GL_GNULIB_MDA_UNLINK=1



  GL_GNULIB_MDA_WRITE=1




   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
printf %s "checking whether byte ordering is bigendian... " >&6; }
if test ${ac_cv_c_bigendian+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_cv_c_bigendian=unknown
    # See if we're dealing with a universal compiler.
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#ifndef __APPLE_CC__
	       not a universal capable compiler
	     #endif
	     typedef int dummy;

_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :

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

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

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

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

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_c_bigendian=yes
else $as_nop
  ac_cv_c_bigendian=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
    fi
    if test $ac_cv_c_bigendian = unknown; then
      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <limits.h>

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

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

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

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_c_bigendian=yes
else $as_nop
  ac_cv_c_bigendian=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
    fi
    if test $ac_cv_c_bigendian = unknown; then
      # Compile a test program.
      if test "$cross_compiling" = yes
then :
  # Try to guess by grepping values from an object file.
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
unsigned short int ascii_mm[] =
		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
		unsigned short int ascii_ii[] =
		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
		int use_ascii (int i) {
		  return ascii_mm[i] + ascii_ii[i];
		}
		unsigned short int ebcdic_ii[] =
		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
		unsigned short int ebcdic_mm[] =
		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
		int use_ebcdic (int i) {
		  return ebcdic_mm[i] + ebcdic_ii[i];
		}
		extern int foo;

int
main (void)
{
return use_ascii (foo) == use_ebcdic (foo);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
	      ac_cv_c_bigendian=yes
	    fi
	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
	      if test "$ac_cv_c_bigendian" = unknown; then
		ac_cv_c_bigendian=no
	      else
		# finding both strings is unlikely to happen, but who knows?
		ac_cv_c_bigendian=unknown
	      fi
	    fi
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_includes_default
int
main (void)
{

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

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  ac_cv_c_bigendian=no
else $as_nop
  ac_cv_c_bigendian=yes
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

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

printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h

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



    HAVE_OPENDIR=1;
  HAVE_READDIR=1;
  HAVE_REWINDDIR=1;
  HAVE_CLOSEDIR=1;
  HAVE_DECL_DIRFD=1;
  HAVE_DECL_FDOPENDIR=1;
  HAVE_FDOPENDIR=1;
  HAVE_SCANDIR=1;
  HAVE_ALPHASORT=1;
  REPLACE_OPENDIR=0;
  REPLACE_READDIR=0;
  REPLACE_REWINDDIR=0;
  REPLACE_CLOSEDIR=0;
  REPLACE_DIRFD=0;
  REPLACE_FDOPENDIR=0;




  case "$host_os" in
    mingw* | windows* | os2*) DIR_HAS_FD_MEMBER=0 ;;
    *)                        DIR_HAS_FD_MEMBER=1 ;;
  esac














     if test $gl_cv_have_include_next = yes; then
       gl_cv_next_dirent_h='<'dirent.h'>'
     else
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
printf %s "checking absolute name of <dirent.h>... " >&6; }
if test ${gl_cv_next_dirent_h+y}
then :
  printf %s "(cached) " >&6
else $as_nop

             if test $ac_cv_header_dirent_h = yes; then




  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <dirent.h>
_ACEOF
                case "$host_os" in
    aix*) gl_absname_cpp="$ac_cpp -C" ;;
    *)    gl_absname_cpp="$ac_cpp" ;;
  esac

  case "$host_os" in
    mingw* | windows*)
                                          gl_dirsep_regex='[/\\]'
      ;;
    *)
      gl_dirsep_regex='\/'
      ;;
  esac
      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  gl_header_literal_regex=`echo 'dirent.h' \
                           | sed -e "$gl_make_literal_regex_sed"`
  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
      s|^/[^/]|//&|
      p
      q
    }'

        gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  sed -n "$gl_absolute_header_sed"`

          gl_header=$gl_cv_absolute_dirent_h
          gl_cv_next_dirent_h='"'$gl_header'"'
          else
               gl_cv_next_dirent_h='<'dirent.h'>'
             fi


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
printf "%s\n" "$gl_cv_next_dirent_h" >&6; }
     fi
     NEXT_DIRENT_H=$gl_cv_next_dirent_h

     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
       gl_next_as_first_directive='<'dirent.h'>'
     else
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
       gl_next_as_first_directive=$gl_cv_next_dirent_h
     fi
     NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive




  if test $ac_cv_header_dirent_h = yes; then
    HAVE_DIRENT_H=1
  else
    HAVE_DIRENT_H=0
  fi












  GL_GNULIB_OPENDIR=0



  GL_GNULIB_READDIR=0



  GL_GNULIB_REWINDDIR=0



  GL_GNULIB_CLOSEDIR=0



  GL_GNULIB_DIRFD=0



  GL_GNULIB_FDOPENDIR=0



  GL_GNULIB_SCANDIR=0



  GL_GNULIB_ALPHASORT=0



gl_mda_defines='
#if defined _WIN32 && !defined __CYGWIN__
#define access    _access
#define chdir     _chdir
#define chmod     _chmod
#define close     _close
#define creat     _creat
#define dup       _dup
#define dup2      _dup2
#define ecvt      _ecvt
#define execl     _execl
#define execle    _execle
#define execlp    _execlp
#define execv     _execv
#define execve    _execve
#define execvp    _execvp
#define execvpe   _execvpe
#define fcloseall _fcloseall
#define fcvt      _fcvt
#define fdopen    _fdopen
#define fileno    _fileno
#define gcvt      _gcvt
#define getcwd    _getcwd
#define getpid    _getpid
#define getw      _getw
#define isatty    _isatty
#define j0        _j0
#define j1        _j1
#define jn        _jn
#define lfind     _lfind
#define lsearch   _lsearch
#define lseek     _lseek
#define memccpy   _memccpy
#define mkdir     _mkdir
#define mktemp    _mktemp
#define open      _open
#define putenv    _putenv
#define putw      _putw
#define read      _read
#define rmdir     _rmdir
#define strdup    _strdup
#define swab      _swab
#define tempnam   _tempnam
#define tzset     _tzset
#define umask     _umask
#define unlink    _unlink
#define utime     _utime
#define wcsdup    _wcsdup
#define write     _write
#define y0        _y0
#define y1        _y1
#define yn        _yn
#endif
'








  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
printf %s "checking if environ is properly declared... " >&6; }
if test ${gt_cv_var_environ_declaration+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#if HAVE_UNISTD_H
     #include <unistd.h>
     #endif
     /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>.  */
     #include <stdlib.h>

            typedef struct { int foo; } foo_t;
            extern foo_t environ;
int
main (void)
{
environ.foo = 1;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gt_cv_var_environ_declaration=no
else $as_nop
  gt_cv_var_environ_declaration=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
printf "%s\n" "$gt_cv_var_environ_declaration" >&6; }
  if test $gt_cv_var_environ_declaration = yes; then

printf "%s\n" "#define HAVE_ENVIRON_DECL 1" >>confdefs.h

  fi


  if test $gt_cv_var_environ_declaration != yes; then
    HAVE_DECL_ENVIRON=0
  fi



  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
printf %s "checking for complete errno.h... " >&6; }
if test ${gl_cv_header_errno_h_complete+y}
then :
  printf %s "(cached) " >&6
else $as_nop

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

#include <errno.h>
#if !defined ETXTBSY
booboo
#endif
#if !defined ENOMSG
booboo
#endif
#if !defined EIDRM
booboo
#endif
#if !defined ENOLINK
booboo
#endif
#if !defined EPROTO
booboo
#endif
#if !defined EMULTIHOP
booboo
#endif
#if !defined EBADMSG
booboo
#endif
#if !defined EOVERFLOW
booboo
#endif
#if !defined ENOTSUP
booboo
#endif
#if !defined ENETRESET
booboo
#endif
#if !defined ECONNABORTED
booboo
#endif
#if !defined ESTALE
booboo
#endif
#if !defined EDQUOT
booboo
#endif
#if !defined ECANCELED
booboo
#endif
#if !defined EOWNERDEAD
booboo
#endif
#if !defined ENOTRECOVERABLE
booboo
#endif
#if !defined EILSEQ
booboo
#endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "booboo" >/dev/null 2>&1
then :
  gl_cv_header_errno_h_complete=no
else $as_nop
  gl_cv_header_errno_h_complete=yes
fi
rm -rf conftest*


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
printf "%s\n" "$gl_cv_header_errno_h_complete" >&6; }
  if test $gl_cv_header_errno_h_complete = yes; then
    GL_GENERATE_ERRNO_H=false
  else








     if test $gl_cv_have_include_next = yes; then
       gl_cv_next_errno_h='<'errno.h'>'
     else
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
printf %s "checking absolute name of <errno.h>... " >&6; }
if test ${gl_cv_next_errno_h+y}
then :
  printf %s "(cached) " >&6
else $as_nop



  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <errno.h>
_ACEOF
                case "$host_os" in
    aix*) gl_absname_cpp="$ac_cpp -C" ;;
    *)    gl_absname_cpp="$ac_cpp" ;;
  esac

  case "$host_os" in
    mingw* | windows*)
                                          gl_dirsep_regex='[/\\]'
      ;;
    *)
      gl_dirsep_regex='\/'
      ;;
  esac
      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  gl_header_literal_regex=`echo 'errno.h' \
                           | sed -e "$gl_make_literal_regex_sed"`
  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
      s|^/[^/]|//&|
      p
      q
    }'

        gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  sed -n "$gl_absolute_header_sed"`

          gl_header=$gl_cv_absolute_errno_h
          gl_cv_next_errno_h='"'$gl_header'"'


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
printf "%s\n" "$gl_cv_next_errno_h" >&6; }
     fi
     NEXT_ERRNO_H=$gl_cv_next_errno_h

     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
       gl_next_as_first_directive='<'errno.h'>'
     else
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
       gl_next_as_first_directive=$gl_cv_next_errno_h
     fi
     NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive




    GL_GENERATE_ERRNO_H=true
  fi

  if $GL_GENERATE_ERRNO_H; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
printf %s "checking for EMULTIHOP value... " >&6; }
if test ${gl_cv_header_errno_h_EMULTIHOP+y}
then :
  printf %s "(cached) " >&6
else $as_nop

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

#include <errno.h>
#ifdef EMULTIHOP
yes
#endif

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

      if test $gl_cv_header_errno_h_EMULTIHOP = no; then
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#define _XOPEN_SOURCE_EXTENDED 1
#include <errno.h>
#ifdef EMULTIHOP
yes
#endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "yes" >/dev/null 2>&1
then :
  gl_cv_header_errno_h_EMULTIHOP=hidden
fi
rm -rf conftest*

        if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
                              if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP"        "
#define _XOPEN_SOURCE_EXTENDED 1
#include <errno.h>
/* The following two lines are a workaround against an autoconf-2.52 bug.  */
#include <stdio.h>
#include <stdlib.h>
"
then :

fi

        fi
      fi

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
printf "%s\n" "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
    case $gl_cv_header_errno_h_EMULTIHOP in
      yes | no)
        EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
        ;;
      *)
        EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
        ;;
    esac


  fi


  if $GL_GENERATE_ERRNO_H; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
printf %s "checking for ENOLINK value... " >&6; }
if test ${gl_cv_header_errno_h_ENOLINK+y}
then :
  printf %s "(cached) " >&6
else $as_nop

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

#include <errno.h>
#ifdef ENOLINK
yes
#endif

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

      if test $gl_cv_header_errno_h_ENOLINK = no; then
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#define _XOPEN_SOURCE_EXTENDED 1
#include <errno.h>
#ifdef ENOLINK
yes
#endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "yes" >/dev/null 2>&1
then :
  gl_cv_header_errno_h_ENOLINK=hidden
fi
rm -rf conftest*

        if test $gl_cv_header_errno_h_ENOLINK = hidden; then
                              if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK"        "
#define _XOPEN_SOURCE_EXTENDED 1
#include <errno.h>
/* The following two lines are a workaround against an autoconf-2.52 bug.  */
#include <stdio.h>
#include <stdlib.h>
"
then :

fi

        fi
      fi

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
printf "%s\n" "$gl_cv_header_errno_h_ENOLINK" >&6; }
    case $gl_cv_header_errno_h_ENOLINK in
      yes | no)
        ENOLINK_HIDDEN=0; ENOLINK_VALUE=
        ;;
      *)
        ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
        ;;
    esac


  fi


  if $GL_GENERATE_ERRNO_H; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
printf %s "checking for EOVERFLOW value... " >&6; }
if test ${gl_cv_header_errno_h_EOVERFLOW+y}
then :
  printf %s "(cached) " >&6
else $as_nop

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

#include <errno.h>
#ifdef EOVERFLOW
yes
#endif

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

      if test $gl_cv_header_errno_h_EOVERFLOW = no; then
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#define _XOPEN_SOURCE_EXTENDED 1
#include <errno.h>
#ifdef EOVERFLOW
yes
#endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "yes" >/dev/null 2>&1
then :
  gl_cv_header_errno_h_EOVERFLOW=hidden
fi
rm -rf conftest*

        if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
                              if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW"        "
#define _XOPEN_SOURCE_EXTENDED 1
#include <errno.h>
/* The following two lines are a workaround against an autoconf-2.52 bug.  */
#include <stdio.h>
#include <stdlib.h>
"
then :

fi

        fi
      fi

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
printf "%s\n" "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
    case $gl_cv_header_errno_h_EOVERFLOW in
      yes | no)
        EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
        ;;
      *)
        EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
        ;;
    esac


  fi




  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ctype.h defines __header_inline" >&5
printf %s "checking whether ctype.h defines __header_inline... " >&6; }
if test ${gl_cv_have___header_inline+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ctype.h>
                         #ifndef __header_inline
                          #error "<ctype.h> does not define __header_inline"
                         #endif

_ACEOF
if ac_fn_c_try_cpp "$LINENO"
then :
  gl_cv_have___header_inline=yes
else $as_nop
  gl_cv_have___header_inline=no
fi
rm -f conftest.err conftest.i conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have___header_inline" >&5
printf "%s\n" "$gl_cv_have___header_inline" >&6; }
  if test "$gl_cv_have___header_inline" = yes; then

printf "%s\n" "#define HAVE___HEADER_INLINE 1" >>confdefs.h

  fi




    HAVE_FCHMODAT=1;
  HAVE_FSTATAT=1;
  HAVE_FUTIMENS=1;
  HAVE_GETUMASK=1;
  HAVE_LCHMOD=1;
  HAVE_LSTAT=1;
  HAVE_MKDIRAT=1;
  HAVE_MKFIFO=1;
  HAVE_MKFIFOAT=1;
  HAVE_MKNOD=1;
  HAVE_MKNODAT=1;
  HAVE_UTIMENSAT=1;
  REPLACE_CHMOD=0;
  REPLACE_FCHMODAT=0;
  REPLACE_FSTAT=0;
  REPLACE_FSTATAT=0;
  REPLACE_FUTIMENS=0;
  REPLACE_LSTAT=0;
  REPLACE_MKDIR=0;
  REPLACE_MKFIFO=0;
  REPLACE_MKFIFOAT=0;
  REPLACE_MKNOD=0;
  REPLACE_MKNODAT=0;
  REPLACE_STAT=0;
  REPLACE_UTIMENSAT=0;









  GL_GNULIB_CHMOD=0



  GL_GNULIB_FCHMODAT=0



  GL_GNULIB_FSTAT=0



  GL_GNULIB_FSTATAT=0



  GL_GNULIB_FUTIMENS=0



  GL_GNULIB_GETUMASK=0



  GL_GNULIB_LCHMOD=0



  GL_GNULIB_LSTAT=0



  GL_GNULIB_MKDIR=0



  GL_GNULIB_MKDIRAT=0



  GL_GNULIB_MKFIFO=0



  GL_GNULIB_MKFIFOAT=0



  GL_GNULIB_MKNOD=0



  GL_GNULIB_MKNODAT=0



  GL_GNULIB_STAT=0



  GL_GNULIB_UTIMENSAT=0



  GL_GNULIB_OVERRIDES_STRUCT_STAT=0



  GL_GNULIB_MDA_CHMOD=1



  GL_GNULIB_MDA_MKDIR=1



  GL_GNULIB_MDA_UMASK=1




    HAVE_FCNTL=1;
  HAVE_OPENAT=1;
  REPLACE_CREAT=0;
  REPLACE_FCNTL=0;
  REPLACE_OPEN=0;
  REPLACE_OPENAT=0;




  GL_GNULIB_CREAT=0



  GL_GNULIB_FCNTL=0



  GL_GNULIB_NONBLOCKING=0



  GL_GNULIB_OPEN=0



  GL_GNULIB_OPENAT=0



  GL_GNULIB_MDA_CREAT=1



  GL_GNULIB_MDA_OPEN=1




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 $as_nop

printf "%s\n" "#define mode_t int" >>confdefs.h

fi












     if test $gl_cv_have_include_next = yes; then
       gl_cv_next_fcntl_h='<'fcntl.h'>'
     else
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
printf %s "checking absolute name of <fcntl.h>... " >&6; }
if test ${gl_cv_next_fcntl_h+y}
then :
  printf %s "(cached) " >&6
else $as_nop



  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <fcntl.h>
_ACEOF
                case "$host_os" in
    aix*) gl_absname_cpp="$ac_cpp -C" ;;
    *)    gl_absname_cpp="$ac_cpp" ;;
  esac

  case "$host_os" in
    mingw* | windows*)
                                          gl_dirsep_regex='[/\\]'
      ;;
    *)
      gl_dirsep_regex='\/'
      ;;
  esac
      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  gl_header_literal_regex=`echo 'fcntl.h' \
                           | sed -e "$gl_make_literal_regex_sed"`
  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
      s|^/[^/]|//&|
      p
      q
    }'

        gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  sed -n "$gl_absolute_header_sed"`

          gl_header=$gl_cv_absolute_fcntl_h
          gl_cv_next_fcntl_h='"'$gl_header'"'


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
printf "%s\n" "$gl_cv_next_fcntl_h" >&6; }
     fi
     NEXT_FCNTL_H=$gl_cv_next_fcntl_h

     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
       gl_next_as_first_directive='<'fcntl.h'>'
     else
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
       gl_next_as_first_directive=$gl_cv_next_fcntl_h
     fi
     NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive














ac_fn_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_strmode" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_STRMODE $ac_have_decl" >>confdefs.h







    HAVE_DECL_FCLOSEALL=1;
  HAVE_DECL_FPURGE=1;
  HAVE_DECL_FSEEKO=1;
  HAVE_DECL_FTELLO=1;
  HAVE_DECL_GETDELIM=1;
  HAVE_DECL_GETLINE=1;
  HAVE_DECL_GETW=1;
  HAVE_DECL_OBSTACK_PRINTF=1;
  HAVE_DECL_PUTW=1;
  HAVE_DECL_SNPRINTF=1;
  HAVE_DECL_VSNPRINTF=1;
  HAVE_DPRINTF=1;
  HAVE_FSEEKO=1;
  HAVE_FTELLO=1;
  HAVE_PCLOSE=1;
  HAVE_POPEN=1;
  HAVE_RENAMEAT=1;
  HAVE_VASPRINTF=1;
  HAVE_VDPRINTF=1;
  REPLACE_DPRINTF=0;
  REPLACE_FCLOSE=0;
  REPLACE_FDOPEN=0;
  REPLACE_FFLUSH=0;
  REPLACE_FOPEN=0;
  REPLACE_FOPEN_FOR_FOPEN_GNU=0;
  REPLACE_FPRINTF=0;
  REPLACE_FPURGE=0;
  REPLACE_FREOPEN=0;
  REPLACE_FSEEK=0;
  REPLACE_FSEEKO=0;
  REPLACE_FTELL=0;
  REPLACE_FTELLO=0;
  REPLACE_GETDELIM=0;
  REPLACE_GETLINE=0;
  REPLACE_OBSTACK_PRINTF=0;
  REPLACE_PERROR=0;
  REPLACE_POPEN=0;
  REPLACE_PRINTF=0;
  REPLACE_REMOVE=0;
  REPLACE_RENAME=0;
  REPLACE_RENAMEAT=0;
  REPLACE_SNPRINTF=0;
  REPLACE_SPRINTF=0;
  REPLACE_STDIO_READ_FUNCS=0;
  REPLACE_STDIO_WRITE_FUNCS=0;
  REPLACE_TMPFILE=0;
  REPLACE_VASPRINTF=0;
  REPLACE_VDPRINTF=0;
  REPLACE_VFPRINTF=0;
  REPLACE_VPRINTF=0;
  REPLACE_VSNPRINTF=0;
  REPLACE_VSPRINTF=0;

ac_fn_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_getline" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_GETLINE $ac_have_decl" >>confdefs.h



  GL_GNULIB_DPRINTF=0



  GL_GNULIB_FCLOSE=0



  GL_GNULIB_FDOPEN=0



  GL_GNULIB_FFLUSH=0



  GL_GNULIB_FGETC=0



  GL_GNULIB_FGETS=0



  GL_GNULIB_FOPEN=0



  GL_GNULIB_FOPEN_GNU=0



  GL_GNULIB_FPRINTF=0



  GL_GNULIB_FPRINTF_POSIX=0



  GL_GNULIB_FPURGE=0



  GL_GNULIB_FPUTC=0



  GL_GNULIB_FPUTS=0



  GL_GNULIB_FREAD=0



  GL_GNULIB_FREOPEN=0



  GL_GNULIB_FSCANF=0



  GL_GNULIB_FSEEK=0



  GL_GNULIB_FSEEKO=0



  GL_GNULIB_FTELL=0



  GL_GNULIB_FTELLO=0



  GL_GNULIB_FWRITE=0



  GL_GNULIB_GETC=0



  GL_GNULIB_GETCHAR=0



  GL_GNULIB_GETDELIM=0



  GL_GNULIB_GETLINE=0



  GL_GNULIB_OBSTACK_PRINTF=0



  GL_GNULIB_OBSTACK_PRINTF_POSIX=0



  GL_GNULIB_PCLOSE=0



  GL_GNULIB_PERROR=0



  GL_GNULIB_POPEN=0



  GL_GNULIB_PRINTF=0



  GL_GNULIB_PRINTF_POSIX=0



  GL_GNULIB_PUTC=0



  GL_GNULIB_PUTCHAR=0



  GL_GNULIB_PUTS=0



  GL_GNULIB_REMOVE=0



  GL_GNULIB_RENAME=0



  GL_GNULIB_RENAMEAT=0



  GL_GNULIB_SCANF=0



  GL_GNULIB_SNPRINTF=0



  GL_GNULIB_SPRINTF_POSIX=0



  GL_GNULIB_STDIO_H_NONBLOCKING=0



  GL_GNULIB_STDIO_H_SIGPIPE=0



  GL_GNULIB_TMPFILE=0



  GL_GNULIB_VASPRINTF=0



  GL_GNULIB_VFSCANF=0



  GL_GNULIB_VSCANF=0



  GL_GNULIB_VDPRINTF=0



  GL_GNULIB_VFPRINTF=0



  GL_GNULIB_VFPRINTF_POSIX=0



  GL_GNULIB_VPRINTF=0



  GL_GNULIB_VPRINTF_POSIX=0



  GL_GNULIB_VSNPRINTF=0



  GL_GNULIB_VSPRINTF_POSIX=0



  GL_GNULIB_MDA_FCLOSEALL=1



  GL_GNULIB_MDA_FDOPEN=1



  GL_GNULIB_MDA_FILENO=1



  GL_GNULIB_MDA_GETW=1



  GL_GNULIB_MDA_PUTW=1



  GL_GNULIB_MDA_TEMPNAM=1



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

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


  test -n "$AWK" && break
done















     if test $gl_cv_have_include_next = yes; then
       gl_cv_next_getopt_h='<'getopt.h'>'
     else
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
printf %s "checking absolute name of <getopt.h>... " >&6; }
if test ${gl_cv_next_getopt_h+y}
then :
  printf %s "(cached) " >&6
else $as_nop

             if test $ac_cv_header_getopt_h = yes; then




  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <getopt.h>
_ACEOF
                case "$host_os" in
    aix*) gl_absname_cpp="$ac_cpp -C" ;;
    *)    gl_absname_cpp="$ac_cpp" ;;
  esac

  case "$host_os" in
    mingw* | windows*)
                                          gl_dirsep_regex='[/\\]'
      ;;
    *)
      gl_dirsep_regex='\/'
      ;;
  esac
      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  gl_header_literal_regex=`echo 'getopt.h' \
                           | sed -e "$gl_make_literal_regex_sed"`
  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
      s|^/[^/]|//&|
      p
      q
    }'

        gl_cv_absolute_getopt_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  sed -n "$gl_absolute_header_sed"`

          gl_header=$gl_cv_absolute_getopt_h
          gl_cv_next_getopt_h='"'$gl_header'"'
          else
               gl_cv_next_getopt_h='<'getopt.h'>'
             fi


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
printf "%s\n" "$gl_cv_next_getopt_h" >&6; }
     fi
     NEXT_GETOPT_H=$gl_cv_next_getopt_h

     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
       gl_next_as_first_directive='<'getopt.h'>'
     else
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
       gl_next_as_first_directive=$gl_cv_next_getopt_h
     fi
     NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive




  if test $ac_cv_header_getopt_h = yes; then
    HAVE_GETOPT_H=1
  else
    HAVE_GETOPT_H=0
  fi


  gl_replace_getopt=

    if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
           for ac_header in getopt.h
do :
  ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
if test "x$ac_cv_header_getopt_h" = xyes
then :
  printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h

else $as_nop
  gl_replace_getopt=yes
fi

done
  fi

    if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then

  for ac_func in getopt_long_only
do :
  ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
if test "x$ac_cv_func_getopt_long_only" = xyes
then :
  printf "%s\n" "#define HAVE_GETOPT_LONG_ONLY 1" >>confdefs.h

else $as_nop
  gl_replace_getopt=yes
fi

done
  fi

          if test -z "$gl_replace_getopt"; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
printf %s "checking whether getopt is POSIX compatible... " >&6; }
if test ${gl_cv_func_getopt_posix+y}
then :
  printf %s "(cached) " >&6
else $as_nop

                                                if test $cross_compiling = no; then
                              if test "$cross_compiling" = yes
then :
  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run test program while cross compiling
See \`config.log' for more details" "$LINENO" 5; }
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <unistd.h>
#include <stdlib.h>
#include <string.h>

int
main ()
{
  static char program[] = "program";
  static char a[] = "-a";
  static char foo[] = "foo";
  static char bar[] = "bar";
  char *argv[] = { program, a, foo, bar, NULL };
  int c;

  c = getopt (4, argv, "ab");
  if (!(c == 'a'))
    return 1;
  c = getopt (4, argv, "ab");
  if (!(c == -1))
    return 2;
  if (!(optind == 2))
    return 3;
  return 0;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  gl_cv_func_getopt_posix=maybe
else $as_nop
  gl_cv_func_getopt_posix=no
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 $gl_cv_func_getopt_posix = maybe; then
                                    if test "$cross_compiling" = yes
then :
  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run test program while cross compiling
See \`config.log' for more details" "$LINENO" 5; }
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <unistd.h>
#include <stdlib.h>
#include <string.h>

int
main ()
{
  static char program[] = "program";
  static char donald[] = "donald";
  static char p[] = "-p";
  static char billy[] = "billy";
  static char duck[] = "duck";
  static char a[] = "-a";
  static char bar[] = "bar";
  char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
  int c;

  c = getopt (7, argv, "+abp:q:");
  if (!(c == -1))
    return 4;
  if (!(strcmp (argv[0], "program") == 0))
    return 5;
  if (!(strcmp (argv[1], "donald") == 0))
    return 6;
  if (!(strcmp (argv[2], "-p") == 0))
    return 7;
  if (!(strcmp (argv[3], "billy") == 0))
    return 8;
  if (!(strcmp (argv[4], "duck") == 0))
    return 9;
  if (!(strcmp (argv[5], "-a") == 0))
    return 10;
  if (!(strcmp (argv[6], "bar") == 0))
    return 11;
  if (!(optind == 1))
    return 12;
  return 0;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  gl_cv_func_getopt_posix=maybe
else $as_nop
  gl_cv_func_getopt_posix=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
          if test $gl_cv_func_getopt_posix = maybe; then
                        if test "$cross_compiling" = yes
then :
  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run test program while cross compiling
See \`config.log' for more details" "$LINENO" 5; }
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <unistd.h>
#include <stdlib.h>
#include <string.h>

int
main ()
{
  static char program[] = "program";
  static char ab[] = "-ab";
  char *argv[3] = { program, ab, NULL };
  if (getopt (2, argv, "ab:") != 'a')
    return 13;
  if (getopt (2, argv, "ab:") != '?')
    return 14;
  if (optopt != 'b')
    return 15;
  if (optind != 2)
    return 16;
  return 0;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  gl_cv_func_getopt_posix=yes
else $as_nop
  gl_cv_func_getopt_posix=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
        else
          case "$host_os" in
            darwin* | aix* | mingw* | windows*) gl_cv_func_getopt_posix="guessing no";;
            *)                                  gl_cv_func_getopt_posix="guessing yes";;
          esac
        fi

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
printf "%s\n" "$gl_cv_func_getopt_posix" >&6; }
    case "$gl_cv_func_getopt_posix" in
      *no) gl_replace_getopt=yes ;;
    esac
  fi

  if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
printf %s "checking for working GNU getopt function... " >&6; }
if test ${gl_cv_func_getopt_gnu+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
       # optstring is necessary for programs like m4 that have POSIX-mandated
       # semantics for supporting options interspersed with files.
       # Also, since getopt_long is a GNU extension, we require optind=0.
       # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
       # so take care to revert to the correct (non-)export state.
       gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
       case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
         xx) gl_had_POSIXLY_CORRECT=exported ;;
         x)  gl_had_POSIXLY_CORRECT=yes      ;;
         *)  gl_had_POSIXLY_CORRECT=         ;;
       esac
       POSIXLY_CORRECT=1
       export POSIXLY_CORRECT
       if test "$cross_compiling" = yes
then :
                             gl_cv_func_getopt_gnu="$gl_cross_guess_normal"

else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <getopt.h>
                           #include <stddef.h>
                           #include <string.h>

#include <stdlib.h>
#if defined __MACH__ && defined __APPLE__
/* Avoid a crash on Mac OS X.  */
#include <mach/mach.h>
#include <mach/mach_error.h>
#include <mach/thread_status.h>
#include <mach/exception.h>
#include <mach/task.h>
#include <pthread.h>
/* The exception port on which our thread listens.  */
static mach_port_t our_exception_port;
/* The main function of the thread listening for exceptions of type
   EXC_BAD_ACCESS.  */
static void *
mach_exception_thread (void *arg)
{
  /* Buffer for a message to be received.  */
  struct {
    mach_msg_header_t head;
    mach_msg_body_t msgh_body;
    char data[1024];
  } msg;
  mach_msg_return_t retval;
  /* Wait for a message on the exception port.  */
  retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
                     our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
  if (retval != MACH_MSG_SUCCESS)
    abort ();
  exit (1);
}
static void
nocrash_init (void)
{
  mach_port_t self = mach_task_self ();
  /* Allocate a port on which the thread shall listen for exceptions.  */
  if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
      == KERN_SUCCESS) {
    /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
    if (mach_port_insert_right (self, our_exception_port, our_exception_port,
                                MACH_MSG_TYPE_MAKE_SEND)
        == KERN_SUCCESS) {
      /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
         for us.  */
      exception_mask_t mask = EXC_MASK_BAD_ACCESS;
      /* Create the thread listening on the exception port.  */
      pthread_attr_t attr;
      pthread_t thread;
      if (pthread_attr_init (&attr) == 0
          && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
          && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
        pthread_attr_destroy (&attr);
        /* Replace the exception port info for these exceptions with our own.
           Note that we replace the exception port for the entire task, not only
           for a particular thread.  This has the effect that when our exception
           port gets the message, the thread specific exception port has already
           been asked, and we don't need to bother about it.
           See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
        task_set_exception_ports (self, mask, our_exception_port,
                                  EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
      }
    }
  }
}
#elif defined _WIN32 && ! defined __CYGWIN__
/* Avoid a crash on native Windows.  */
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <winerror.h>
static LONG WINAPI
exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
{
  switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
    {
    case EXCEPTION_ACCESS_VIOLATION:
    case EXCEPTION_IN_PAGE_ERROR:
    case EXCEPTION_STACK_OVERFLOW:
    case EXCEPTION_GUARD_PAGE:
    case EXCEPTION_PRIV_INSTRUCTION:
    case EXCEPTION_ILLEGAL_INSTRUCTION:
    case EXCEPTION_DATATYPE_MISALIGNMENT:
    case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
    case EXCEPTION_NONCONTINUABLE_EXCEPTION:
      exit (1);
    }
  return EXCEPTION_CONTINUE_SEARCH;
}
static void
nocrash_init (void)
{
  SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
}
#else
/* Avoid a crash on POSIX systems.  */
#include <signal.h>
#include <unistd.h>
/* A POSIX signal handler.  */
static void
exception_handler (int sig)
{
  _exit (1);
}
static void
nocrash_init (void)
{
#ifdef SIGSEGV
  signal (SIGSEGV, exception_handler);
#endif
#ifdef SIGBUS
  signal (SIGBUS, exception_handler);
#endif
}
#endif


int
main (void)
{

             int result = 0;

             nocrash_init();

             /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
                and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
                OSF/1 5.1, Solaris 10.  */
             {
               static char conftest[] = "conftest";
               static char plus[] = "-+";
               char *argv[3] = { conftest, plus, NULL };
               opterr = 0;
               if (getopt (2, argv, "+a") != '?')
                 result |= 1;
             }
             /* This code succeeds on glibc 2.8, mingw,
                and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
                IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x.  */
             {
               static char program[] = "program";
               static char p[] = "-p";
               static char foo[] = "foo";
               static char bar[] = "bar";
               char *argv[] = { program, p, foo, bar, NULL };

               optind = 1;
               if (getopt (4, argv, "p::") != 'p')
                 result |= 2;
               else if (optarg != NULL)
                 result |= 4;
               else if (getopt (4, argv, "p::") != -1)
                 result |= 6;
               else if (optind != 2)
                 result |= 8;
             }
             /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0.  */
             {
               static char program[] = "program";
               static char foo[] = "foo";
               static char p[] = "-p";
               char *argv[] = { program, foo, p, NULL };
               optind = 0;
               if (getopt (3, argv, "-p") != 1)
                 result |= 16;
               else if (getopt (3, argv, "-p") != 'p')
                 result |= 16;
             }
             /* This code fails on glibc 2.11.  */
             {
               static char program[] = "program";
               static char b[] = "-b";
               static char a[] = "-a";
               char *argv[] = { program, b, a, NULL };
               optind = opterr = 0;
               if (getopt (3, argv, "+:a:b") != 'b')
                 result |= 32;
               else if (getopt (3, argv, "+:a:b") != ':')
                 result |= 32;
             }
             /* This code dumps core on glibc 2.14.  */
             {
               static char program[] = "program";
               static char w[] = "-W";
               static char dummy[] = "dummy";
               char *argv[] = { program, w, dummy, NULL };
               optind = opterr = 1;
               if (getopt (3, argv, "W;") != 'W')
                 result |= 64;
             }
             return result;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  gl_cv_func_getopt_gnu=yes
else $as_nop
  gl_cv_func_getopt_gnu=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

       case $gl_had_POSIXLY_CORRECT in
         exported) ;;
         yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
         *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
       esac

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
printf "%s\n" "$gl_cv_func_getopt_gnu" >&6; }
    if test "$gl_cv_func_getopt_gnu" != yes; then
      gl_replace_getopt=yes
    else
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
printf %s "checking for working GNU getopt_long function... " >&6; }
if test ${gl_cv_func_getopt_long_gnu+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test "$cross_compiling" = yes
then :
              case "$host_os" in
              openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
              *)        gl_cv_func_getopt_long_gnu="guessing yes";;
            esac

else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <getopt.h>
                #include <stddef.h>
                #include <string.h>

int
main (void)
{
static const struct option long_options[] =
                  {
                    { "xtremely-",no_argument,       NULL, 1003 },
                    { "xtra",     no_argument,       NULL, 1001 },
                    { "xtreme",   no_argument,       NULL, 1002 },
                    { "xtremely", no_argument,       NULL, 1003 },
                    { NULL,       0,                 NULL, 0 }
                  };
                /* This code fails on OpenBSD 5.0.  */
                {
                  static char program[] = "program";
                  static char xtremel[] = "--xtremel";
                  char *argv[] = { program, xtremel, NULL };
                  int option_index;
                  optind = 1; opterr = 0;
                  if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
                    return 1;
                }
                return 0;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  gl_cv_func_getopt_long_gnu=yes
else $as_nop
  gl_cv_func_getopt_long_gnu=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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
printf "%s\n" "$gl_cv_func_getopt_long_gnu" >&6; }
      case "$gl_cv_func_getopt_long_gnu" in
        *yes) ;;
        *) gl_replace_getopt=yes ;;
      esac
    fi
  fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for glibc-compatible sys/cdefs.h" >&5
printf %s "checking for glibc-compatible sys/cdefs.h... " >&6; }
if test ${gl_cv_header_sys_cdefs_h+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

         #include <sys/cdefs.h>
          enum { foo = __GNUC_PREREQ (14, 1) } bar;

_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_header_sys_cdefs_h=yes
else $as_nop
  gl_cv_header_sys_cdefs_h=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_cdefs_h" >&5
printf "%s\n" "$gl_cv_header_sys_cdefs_h" >&6; }
   if test "$gl_cv_header_sys_cdefs_h" = yes; then
     HAVE_SYS_CDEFS_H=1
   else
     HAVE_SYS_CDEFS_H=0
   fi


    HAVE_GETRANDOM=1;
  REPLACE_GETRANDOM=0;



  GL_GNULIB_GETRANDOM=0



:





          ac_fn_check_decl "$LINENO" "timespec_get" "ac_cv_have_decl_timespec_get" "#include <time.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_timespec_get" = xyes
then :

fi
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for timespec_get" >&5
printf %s "checking for timespec_get... " >&6; }
if test ${gl_cv_onwards_func_timespec_get+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test $ac_cv_have_decl_timespec_get = yes; then
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <time.h>
              struct timespec ts;

int
main (void)
{
return timespec_get (&ts, 0);
  ;
  return 0;
}

_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  gl_cv_onwards_func_timespec_get=yes
else $as_nop
  gl_cv_onwards_func_timespec_get=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
     else
       gl_cv_onwards_func_timespec_get=no
     fi
     case "$host_os" in
       linux*-android*)
         if test $gl_cv_onwards_func_timespec_get = no; then
           gl_cv_onwards_func_timespec_get='future OS version'
         fi
         ;;
     esac

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_timespec_get" >&5
printf "%s\n" "$gl_cv_onwards_func_timespec_get" >&6; }
  case "$gl_cv_onwards_func_timespec_get" in
    future*) gl_cv_func_timespec_get=no ;;
    *)       gl_cv_func_timespec_get=$gl_cv_onwards_func_timespec_get ;;
  esac


    HAVE_GETTIMEOFDAY=1;
  HAVE_STRUCT_TIMEVAL=1;
  HAVE_SYS_TIME_H=1;
  REPLACE_GETTIMEOFDAY=0;
  REPLACE_STRUCT_TIMEVAL=0;















     if test $gl_cv_have_include_next = yes; then
       gl_cv_next_sys_time_h='<'sys/time.h'>'
     else
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
printf %s "checking absolute name of <sys/time.h>... " >&6; }
if test ${gl_cv_next_sys_time_h+y}
then :
  printf %s "(cached) " >&6
else $as_nop

             if test $ac_cv_header_sys_time_h = yes; then




  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/time.h>
_ACEOF
                case "$host_os" in
    aix*) gl_absname_cpp="$ac_cpp -C" ;;
    *)    gl_absname_cpp="$ac_cpp" ;;
  esac

  case "$host_os" in
    mingw* | windows*)
                                          gl_dirsep_regex='[/\\]'
      ;;
    *)
      gl_dirsep_regex='\/'
      ;;
  esac
      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  gl_header_literal_regex=`echo 'sys/time.h' \
                           | sed -e "$gl_make_literal_regex_sed"`
  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
      s|^/[^/]|//&|
      p
      q
    }'

        gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  sed -n "$gl_absolute_header_sed"`

          gl_header=$gl_cv_absolute_sys_time_h
          gl_cv_next_sys_time_h='"'$gl_header'"'
          else
               gl_cv_next_sys_time_h='<'sys/time.h'>'
             fi


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
printf "%s\n" "$gl_cv_next_sys_time_h" >&6; }
     fi
     NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h

     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
       gl_next_as_first_directive='<'sys/time.h'>'
     else
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
       gl_next_as_first_directive=$gl_cv_next_sys_time_h
     fi
     NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive





  if test $ac_cv_header_sys_time_h != yes; then
    HAVE_SYS_TIME_H=0
  fi





  if test $ac_cv_header_sys_socket_h != yes; then
                    ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
if test "x$ac_cv_header_winsock2_h" = xyes
then :
  printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h

fi

  fi
  if test "$ac_cv_header_winsock2_h" = yes; then
    HAVE_WINSOCK2_H=1
    UNISTD_H_HAVE_WINSOCK2_H=1
    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
  else
    HAVE_WINSOCK2_H=0
  fi


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
printf %s "checking for struct timeval... " >&6; }
if test ${gl_cv_sys_struct_timeval+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#if HAVE_SYS_TIME_H
             #include <sys/time.h>
            #endif
            #include <time.h>
            #if HAVE_WINSOCK2_H
            # include <winsock2.h>
            #endif

int
main (void)
{
static struct timeval x; x.tv_sec = x.tv_usec;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_sys_struct_timeval=yes
else $as_nop
  gl_cv_sys_struct_timeval=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
printf "%s\n" "$gl_cv_sys_struct_timeval" >&6; }
  if test $gl_cv_sys_struct_timeval != yes; then
    HAVE_STRUCT_TIMEVAL=0
  else
                            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
printf %s "checking for wide-enough struct timeval.tv_sec member... " >&6; }
if test ${gl_cv_sys_struct_timeval_tv_sec+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#if HAVE_SYS_TIME_H
               #include <sys/time.h>
              #endif
              #include <time.h>
              #if HAVE_WINSOCK2_H
              # include <winsock2.h>
              #endif

int
main (void)
{
static struct timeval x;
              typedef int verify_tv_sec_type[
                sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
              ];

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

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
printf "%s\n" "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
    if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
      REPLACE_STRUCT_TIMEVAL=1
    fi
  fi






  GL_GNULIB_GETTIMEOFDAY=0















     if test $gl_cv_have_include_next = yes; then
       gl_cv_next_limits_h='<'limits.h'>'
     else
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
printf %s "checking absolute name of <limits.h>... " >&6; }
if test ${gl_cv_next_limits_h+y}
then :
  printf %s "(cached) " >&6
else $as_nop

             if test $ac_cv_header_limits_h = yes; then




  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <limits.h>
_ACEOF
                case "$host_os" in
    aix*) gl_absname_cpp="$ac_cpp -C" ;;
    *)    gl_absname_cpp="$ac_cpp" ;;
  esac

  case "$host_os" in
    mingw* | windows*)
                                          gl_dirsep_regex='[/\\]'
      ;;
    *)
      gl_dirsep_regex='\/'
      ;;
  esac
      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  gl_header_literal_regex=`echo 'limits.h' \
                           | sed -e "$gl_make_literal_regex_sed"`
  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
      s|^/[^/]|//&|
      p
      q
    }'

        gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  sed -n "$gl_absolute_header_sed"`

          gl_header=$gl_cv_absolute_limits_h
          gl_cv_next_limits_h='"'$gl_header'"'
          else
               gl_cv_next_limits_h='<'limits.h'>'
             fi


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
printf "%s\n" "$gl_cv_next_limits_h" >&6; }
     fi
     NEXT_LIMITS_H=$gl_cv_next_limits_h

     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
       gl_next_as_first_directive='<'limits.h'>'
     else
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
       gl_next_as_first_directive=$gl_cv_next_limits_h
     fi
     NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive





  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether limits.h has WORD_BIT, BOOL_WIDTH etc." >&5
printf %s "checking whether limits.h has WORD_BIT, BOOL_WIDTH etc.... " >&6; }
if test ${gl_cv_header_limits_width+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
             #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
            #endif
            #include <limits.h>
            long long llm = LLONG_MAX;
            int wb = WORD_BIT;
            int ullw = ULLONG_WIDTH;
            int bw = BOOL_WIDTH;
            int bm = BOOL_MAX;
            int mblm = MB_LEN_MAX;

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_header_limits_width=yes
else $as_nop
  gl_cv_header_limits_width=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
printf "%s\n" "$gl_cv_header_limits_width" >&6; }
  GL_GENERATE_LIMITS_H=true
  if test "$gl_cv_header_limits_width" = yes
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether limits.h has SSIZE_MAX" >&5
printf %s "checking whether limits.h has SSIZE_MAX... " >&6; }
if test ${gl_cv_header_limits_ssize_max+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <limits.h>
               #ifndef SSIZE_MAX
                 #error "SSIZE_MAX is not defined"
               #endif

_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_header_limits_ssize_max=yes
else $as_nop
  gl_cv_header_limits_ssize_max=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_ssize_max" >&5
printf "%s\n" "$gl_cv_header_limits_ssize_max" >&6; }
     if test "$gl_cv_header_limits_ssize_max" = yes; then
       GL_GENERATE_LIMITS_H=false
     fi
fi

GNULIBHEADERS_OVERRIDE_WINT_T=0


    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler produces multi-arch binaries" >&5
printf %s "checking whether the compiler produces multi-arch binaries... " >&6; }
if test ${gl_cv_c_multiarch+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  gl_cv_c_multiarch=no
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#ifndef __APPLE_CC__
            not a universal capable compiler
           #endif
           typedef int dummy;

_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :

                        arch=
        prev=
        for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
          if test -n "$prev"; then
            case $word in
              i?86 | x86_64 | ppc | ppc64 | arm | arm64)
                if test -z "$arch" || test "$arch" = "$word"; then
                  arch="$word"
                else
                  gl_cv_c_multiarch=yes
                fi
                ;;
            esac
            prev=
          else
            if test "x$word" = "x-arch"; then
              prev=arch
            fi
          fi
        done

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

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_multiarch" >&5
printf "%s\n" "$gl_cv_c_multiarch" >&6; }
  if test $gl_cv_c_multiarch = yes; then
    APPLE_UNIVERSAL_BUILD=1
  else
    APPLE_UNIVERSAL_BUILD=0
  fi








printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h


printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h



  if test $ac_cv_header_wchar_h = yes; then
    HAVE_WCHAR_H=1
  else
    HAVE_WCHAR_H=0
  fi



  if test $ac_cv_header_inttypes_h = yes; then
    HAVE_INTTYPES_H=1
  else
    HAVE_INTTYPES_H=0
  fi



  if test $ac_cv_header_sys_types_h = yes; then
    HAVE_SYS_TYPES_H=1
  else
    HAVE_SYS_TYPES_H=0
  fi











     if test $gl_cv_have_include_next = yes; then
       gl_cv_next_stdint_h='<'stdint.h'>'
     else
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
printf %s "checking absolute name of <stdint.h>... " >&6; }
if test ${gl_cv_next_stdint_h+y}
then :
  printf %s "(cached) " >&6
else $as_nop

             if test $ac_cv_header_stdint_h = yes; then




  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdint.h>
_ACEOF
                case "$host_os" in
    aix*) gl_absname_cpp="$ac_cpp -C" ;;
    *)    gl_absname_cpp="$ac_cpp" ;;
  esac

  case "$host_os" in
    mingw* | windows*)
                                          gl_dirsep_regex='[/\\]'
      ;;
    *)
      gl_dirsep_regex='\/'
      ;;
  esac
      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  gl_header_literal_regex=`echo 'stdint.h' \
                           | sed -e "$gl_make_literal_regex_sed"`
  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
      s|^/[^/]|//&|
      p
      q
    }'

        gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  sed -n "$gl_absolute_header_sed"`

          gl_header=$gl_cv_absolute_stdint_h
          gl_cv_next_stdint_h='"'$gl_header'"'
          else
               gl_cv_next_stdint_h='<'stdint.h'>'
             fi


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
printf "%s\n" "$gl_cv_next_stdint_h" >&6; }
     fi
     NEXT_STDINT_H=$gl_cv_next_stdint_h

     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
       gl_next_as_first_directive='<'stdint.h'>'
     else
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
       gl_next_as_first_directive=$gl_cv_next_stdint_h
     fi
     NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive




  if test $ac_cv_header_stdint_h = yes; then
    HAVE_STDINT_H=1
  else
    HAVE_STDINT_H=0
  fi


    if test $ac_cv_header_stdint_h = yes; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
printf %s "checking whether stdint.h conforms to C99... " >&6; }
if test ${gl_cv_header_working_stdint_h+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  gl_cv_header_working_stdint_h=no
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */


#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
#define __STDC_CONSTANT_MACROS 1
#define __STDC_LIMIT_MACROS 1
#include <stdint.h>
/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
#if !(defined WCHAR_MIN && defined WCHAR_MAX)
#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
#endif


  #include <stddef.h>
  #include <signal.h>
  #if HAVE_WCHAR_H
  # include <wchar.h>
  #endif


#ifdef INT8_MAX
int8_t a1 = INT8_MAX;
int8_t a1min = INT8_MIN;
#endif
#ifdef INT16_MAX
int16_t a2 = INT16_MAX;
int16_t a2min = INT16_MIN;
#endif
#ifdef INT32_MAX
int32_t a3 = INT32_MAX;
int32_t a3min = INT32_MIN;
#endif
#ifdef INT64_MAX
int64_t a4 = INT64_MAX;
int64_t a4min = INT64_MIN;
#endif
#ifdef UINT8_MAX
uint8_t b1 = UINT8_MAX;
#else
typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
#endif
#ifdef UINT16_MAX
uint16_t b2 = UINT16_MAX;
#endif
#ifdef UINT32_MAX
uint32_t b3 = UINT32_MAX;
#endif
#ifdef UINT64_MAX
uint64_t b4 = UINT64_MAX;
#endif
int_least8_t c1 = INT8_C (0x7f);
int_least8_t c1max = INT_LEAST8_MAX;
int_least8_t c1min = INT_LEAST8_MIN;
int_least16_t c2 = INT16_C (0x7fff);
int_least16_t c2max = INT_LEAST16_MAX;
int_least16_t c2min = INT_LEAST16_MIN;
int_least32_t c3 = INT32_C (0x7fffffff);
int_least32_t c3max = INT_LEAST32_MAX;
int_least32_t c3min = INT_LEAST32_MIN;
int_least64_t c4 = INT64_C (0x7fffffffffffffff);
int_least64_t c4max = INT_LEAST64_MAX;
int_least64_t c4min = INT_LEAST64_MIN;
uint_least8_t d1 = UINT8_C (0xff);
uint_least8_t d1max = UINT_LEAST8_MAX;
uint_least16_t d2 = UINT16_C (0xffff);
uint_least16_t d2max = UINT_LEAST16_MAX;
uint_least32_t d3 = UINT32_C (0xffffffff);
uint_least32_t d3max = UINT_LEAST32_MAX;
uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
uint_least64_t d4max = UINT_LEAST64_MAX;
int_fast8_t e1 = INT_FAST8_MAX;
int_fast8_t e1min = INT_FAST8_MIN;
int_fast16_t e2 = INT_FAST16_MAX;
int_fast16_t e2min = INT_FAST16_MIN;
int_fast32_t e3 = INT_FAST32_MAX;
int_fast32_t e3min = INT_FAST32_MIN;
int_fast64_t e4 = INT_FAST64_MAX;
int_fast64_t e4min = INT_FAST64_MIN;
uint_fast8_t f1 = UINT_FAST8_MAX;
uint_fast16_t f2 = UINT_FAST16_MAX;
uint_fast32_t f3 = UINT_FAST32_MAX;
uint_fast64_t f4 = UINT_FAST64_MAX;
#ifdef INTPTR_MAX
intptr_t g = INTPTR_MAX;
intptr_t gmin = INTPTR_MIN;
#endif
#ifdef UINTPTR_MAX
uintptr_t h = UINTPTR_MAX;
#endif
intmax_t i = INTMAX_MAX;
uintmax_t j = UINTMAX_MAX;

/* Check that SIZE_MAX has the correct type, if possible.  */
/* ISO C 11 mandates _Generic, but GCC versions < 4.9 lack it.  */
#if 201112 <= __STDC_VERSION__ \
    && (!defined __GNUC__ || 4 < __GNUC__ + (9 <= __GNUC_MINOR__) \
        || defined __clang__)
int k = _Generic (SIZE_MAX, size_t: 0);
#elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \
       || (0x5110 <= __SUNPRO_C && !__STDC__))
extern size_t k;
extern __typeof__ (SIZE_MAX) k;
#endif

#include <limits.h> /* for CHAR_BIT */
#define TYPE_MINIMUM(t) \
  ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
#define TYPE_MAXIMUM(t) \
  ((t) ((t) 0 < (t) -1 \
        ? (t) -1 \
        : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
struct s {
  int check_PTRDIFF:
      PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
      && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
      ? 1 : -1;
  /* Detect bug in FreeBSD 6.0/ia64 and FreeBSD 13.0/arm64.  */
  int check_SIG_ATOMIC:
      SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
      && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
      ? 1 : -1;
  int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
  int check_WCHAR:
      WCHAR_MIN == TYPE_MINIMUM (wchar_t)
      && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
      ? 1 : -1;
  /* Detect bug in mingw.  */
  int check_WINT:
      WINT_MIN == TYPE_MINIMUM (wint_t)
      && WINT_MAX == TYPE_MAXIMUM (wint_t)
      ? 1 : -1;

  /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
  int check_UINT8_C:
        (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
  int check_UINT16_C:
        (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;

  /* Detect bugs in OpenBSD 3.9 stdint.h.  */
#ifdef UINT8_MAX
  int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
#endif
#ifdef UINT16_MAX
  int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
#endif
#ifdef UINT32_MAX
  int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
#endif
#ifdef UINT64_MAX
  int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
#endif
  int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
  int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
  int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
  int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
  int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
  int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
  int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
  int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
  int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
  int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
  int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
};

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
                                                    if test "$cross_compiling" = yes
then :
  case "$host_os" in
                                    # Guess yes on native Windows.
                 mingw* | windows*) gl_cv_header_working_stdint_h="guessing yes" ;;
                                    # In general, assume it works.
                 *)                 gl_cv_header_working_stdint_h="guessing yes" ;;
               esac

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


#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
#define __STDC_CONSTANT_MACROS 1
#define __STDC_LIMIT_MACROS 1
#include <stdint.h>


  #include <stddef.h>
  #include <signal.h>
  #if HAVE_WCHAR_H
  # include <wchar.h>
  #endif


#include <stdio.h>
#include <string.h>
#define MVAL(macro) MVAL1(macro)
#define MVAL1(expression) #expression
static const char *macro_values[] =
  {
#ifdef INT8_MAX
    MVAL (INT8_MAX),
#endif
#ifdef INT16_MAX
    MVAL (INT16_MAX),
#endif
#ifdef INT32_MAX
    MVAL (INT32_MAX),
#endif
#ifdef INT64_MAX
    MVAL (INT64_MAX),
#endif
#ifdef UINT8_MAX
    MVAL (UINT8_MAX),
#endif
#ifdef UINT16_MAX
    MVAL (UINT16_MAX),
#endif
#ifdef UINT32_MAX
    MVAL (UINT32_MAX),
#endif
#ifdef UINT64_MAX
    MVAL (UINT64_MAX),
#endif
    NULL
  };

int
main (void)
{

  const char **mv;
  for (mv = macro_values; *mv != NULL; mv++)
    {
      const char *value = *mv;
      /* Test whether it looks like a cast expression.  */
      if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
          || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
          || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
          || strncmp (value, "((int)"/*)*/, 6) == 0
          || strncmp (value, "((signed short)"/*)*/, 15) == 0
          || strncmp (value, "((signed char)"/*)*/, 14) == 0)
        return mv - macro_values + 1;
    }
  return 0;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  gl_cv_header_working_stdint_h=yes
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi


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

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
printf "%s\n" "$gl_cv_header_working_stdint_h" >&6; }
  fi

  HAVE_C99_STDINT_H=0
  HAVE_SYS_BITYPES_H=0
  HAVE_SYS_INTTYPES_H=0
  GL_GENERATE_STDINT_H=true
  case "$gl_cv_header_working_stdint_h" in
    *yes)
      HAVE_C99_STDINT_H=1
                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h works without ISO C predefines" >&5
printf %s "checking whether stdint.h works without ISO C predefines... " >&6; }
if test ${gl_cv_header_stdint_without_STDC_macros+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  gl_cv_header_stdint_without_STDC_macros=no
         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */


#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
#include <stdint.h>


  #include <stddef.h>
  #include <signal.h>
  #if HAVE_WCHAR_H
  # include <wchar.h>
  #endif


intmax_t im = INTMAX_MAX;
int32_t i32 = INT32_C (0x7fffffff);

int
main (void)
{

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

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_without_STDC_macros" >&5
printf "%s\n" "$gl_cv_header_stdint_without_STDC_macros" >&6; }

      if test $gl_cv_header_stdint_without_STDC_macros = no; then

printf "%s\n" "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h


printf "%s\n" "#define __STDC_LIMIT_MACROS 1" >>confdefs.h

      fi
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
printf %s "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
if test ${gl_cv_header_stdint_width+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  gl_cv_header_stdint_width=no
         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

              /* Work if build is not clean.  */
              #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
              #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
               #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
              #endif
              #include <stdint.h>

  #include <stddef.h>
  #include <signal.h>
  #if HAVE_WCHAR_H
  # include <wchar.h>
  #endif

              int iw = UINTMAX_WIDTH;

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_header_stdint_width=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
printf "%s\n" "$gl_cv_header_stdint_width" >&6; }
      if test "$gl_cv_header_stdint_width" = yes; then
        GL_GENERATE_STDINT_H=false
      fi
      ;;
    *)
                  ac_fn_c_check_header_compile "$LINENO" "sys/inttypes.h" "ac_cv_header_sys_inttypes_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_inttypes_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_INTTYPES_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "sys/bitypes.h" "ac_cv_header_sys_bitypes_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_bitypes_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_BITYPES_H 1" >>confdefs.h

fi

      if test $ac_cv_header_sys_inttypes_h = yes; then
        HAVE_SYS_INTTYPES_H=1
      fi
      if test $ac_cv_header_sys_bitypes_h = yes; then
        HAVE_SYS_BITYPES_H=1
      fi


  if test $APPLE_UNIVERSAL_BUILD = 0; then


  for gltype in ptrdiff_t size_t ; do
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
printf %s "checking for bit size of $gltype... " >&6; }
if eval test \${gl_cv_bitsizeof_${gltype}+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
  #include <stddef.h>
  #include <signal.h>
  #if HAVE_WCHAR_H
  # include <wchar.h>
  #endif

#include <limits.h>"
then :

else $as_nop
  result=unknown
fi

       eval gl_cv_bitsizeof_${gltype}=\$result

fi
eval ac_res=\$gl_cv_bitsizeof_${gltype}
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
    eval result=\$gl_cv_bitsizeof_${gltype}
    if test $result = unknown; then
                                                result=0
    fi
    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
    printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h

    eval BITSIZEOF_${GLTYPE}=\$result
  done


  fi


  for gltype in sig_atomic_t wchar_t wint_t ; do
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
printf %s "checking for bit size of $gltype... " >&6; }
if eval test \${gl_cv_bitsizeof_${gltype}+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
  #include <stddef.h>
  #include <signal.h>
  #if HAVE_WCHAR_H
  # include <wchar.h>
  #endif

#include <limits.h>"
then :

else $as_nop
  result=unknown
fi

       eval gl_cv_bitsizeof_${gltype}=\$result

fi
eval ac_res=\$gl_cv_bitsizeof_${gltype}
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
    eval result=\$gl_cv_bitsizeof_${gltype}
    if test $result = unknown; then
                                                result=0
    fi
    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
    printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h

    eval BITSIZEOF_${GLTYPE}=\$result
  done




  for gltype in sig_atomic_t wchar_t wint_t ; do
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
printf %s "checking whether $gltype is signed... " >&6; }
if eval test \${gl_cv_type_${gltype}_signed+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

  #include <stddef.h>
  #include <signal.h>
  #if HAVE_WCHAR_H
  # include <wchar.h>
  #endif

            int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  result=yes
else $as_nop
  result=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
       eval gl_cv_type_${gltype}_signed=\$result

fi
eval ac_res=\$gl_cv_type_${gltype}_signed
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
    eval result=\$gl_cv_type_${gltype}_signed
    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
    if test "$result" = yes; then
      printf "%s\n" "#define HAVE_SIGNED_${GLTYPE} 1" >>confdefs.h

      eval HAVE_SIGNED_${GLTYPE}=1
    else
      eval HAVE_SIGNED_${GLTYPE}=0
    fi
  done


  gl_cv_type_ptrdiff_t_signed=yes
  gl_cv_type_size_t_signed=no
  if test $APPLE_UNIVERSAL_BUILD = 0; then


  for gltype in ptrdiff_t size_t ; do
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
printf %s "checking for $gltype integer literal suffix... " >&6; }
if eval test \${gl_cv_type_${gltype}_suffix+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  eval gl_cv_type_${gltype}_suffix=no
       eval result=\$gl_cv_type_${gltype}_signed
       if test "$result" = yes; then
         glsufu=
       else
         glsufu=u
       fi
       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
         case $glsuf in
           '')  gltype1='int';;
           l)   gltype1='long int';;
           ll)  gltype1='long long int';;
           i64) gltype1='__int64';;
           u)   gltype1='unsigned int';;
           ul)  gltype1='unsigned long int';;
           ull) gltype1='unsigned long long int';;
           ui64)gltype1='unsigned __int64';;
         esac
         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

  #include <stddef.h>
  #include <signal.h>
  #if HAVE_WCHAR_H
  # include <wchar.h>
  #endif

              extern $gltype foo;
              extern $gltype1 foo;
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  eval gl_cv_type_${gltype}_suffix=\$glsuf
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
         eval result=\$gl_cv_type_${gltype}_suffix
         test "$result" != no && break
       done
fi
eval ac_res=\$gl_cv_type_${gltype}_suffix
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
    eval result=\$gl_cv_type_${gltype}_suffix
    test "$result" = no && result=
    eval ${GLTYPE}_SUFFIX=\$result
    printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h

  done


  fi


  for gltype in sig_atomic_t wchar_t wint_t ; do
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
printf %s "checking for $gltype integer literal suffix... " >&6; }
if eval test \${gl_cv_type_${gltype}_suffix+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  eval gl_cv_type_${gltype}_suffix=no
       eval result=\$gl_cv_type_${gltype}_signed
       if test "$result" = yes; then
         glsufu=
       else
         glsufu=u
       fi
       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
         case $glsuf in
           '')  gltype1='int';;
           l)   gltype1='long int';;
           ll)  gltype1='long long int';;
           i64) gltype1='__int64';;
           u)   gltype1='unsigned int';;
           ul)  gltype1='unsigned long int';;
           ull) gltype1='unsigned long long int';;
           ui64)gltype1='unsigned __int64';;
         esac
         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

  #include <stddef.h>
  #include <signal.h>
  #if HAVE_WCHAR_H
  # include <wchar.h>
  #endif

              extern $gltype foo;
              extern $gltype1 foo;
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  eval gl_cv_type_${gltype}_suffix=\$glsuf
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
         eval result=\$gl_cv_type_${gltype}_suffix
         test "$result" != no && break
       done
fi
eval ac_res=\$gl_cv_type_${gltype}_suffix
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
    eval result=\$gl_cv_type_${gltype}_suffix
    test "$result" = no && result=
    eval ${GLTYPE}_SUFFIX=\$result
    printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h

  done



          if test $GNULIBHEADERS_OVERRIDE_WINT_T = 1; then
    BITSIZEOF_WINT_T=32
  fi

      ;;
  esac



  GL_GENERATE_LIMITS_H=true







    HAVE_DECL_IMAXABS=1;
  HAVE_DECL_IMAXDIV=1;
  HAVE_DECL_STRTOIMAX=1;
  HAVE_DECL_STRTOUMAX=1;
  HAVE_IMAXDIV_T=1;
  HAVE_IMAXABS=1;
  HAVE_IMAXDIV=1;
  REPLACE_IMAXABS=0;
  REPLACE_IMAXDIV=0;
  REPLACE_STRTOIMAX=0;
  REPLACE_STRTOUMAX=0;
  INT32_MAX_LT_INTMAX_MAX=1;
  INT64_MAX_EQ_LONG_MAX='defined _LP64';
  PRIPTR_PREFIX=__PRIPTR_PREFIX;
  UINT32_MAX_LT_UINTMAX_MAX=1;
  UINT64_MAX_EQ_ULONG_MAX='defined _LP64';















     if test $gl_cv_have_include_next = yes; then
       gl_cv_next_inttypes_h='<'inttypes.h'>'
     else
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
printf %s "checking absolute name of <inttypes.h>... " >&6; }
if test ${gl_cv_next_inttypes_h+y}
then :
  printf %s "(cached) " >&6
else $as_nop

             if test $ac_cv_header_inttypes_h = yes; then




  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <inttypes.h>
_ACEOF
                case "$host_os" in
    aix*) gl_absname_cpp="$ac_cpp -C" ;;
    *)    gl_absname_cpp="$ac_cpp" ;;
  esac

  case "$host_os" in
    mingw* | windows*)
                                          gl_dirsep_regex='[/\\]'
      ;;
    *)
      gl_dirsep_regex='\/'
      ;;
  esac
      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  gl_header_literal_regex=`echo 'inttypes.h' \
                           | sed -e "$gl_make_literal_regex_sed"`
  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
      s|^/[^/]|//&|
      p
      q
    }'

        gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  sed -n "$gl_absolute_header_sed"`

          gl_header=$gl_cv_absolute_inttypes_h
          gl_cv_next_inttypes_h='"'$gl_header'"'
          else
               gl_cv_next_inttypes_h='<'inttypes.h'>'
             fi


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
printf "%s\n" "$gl_cv_next_inttypes_h" >&6; }
     fi
     NEXT_INTTYPES_H=$gl_cv_next_inttypes_h

     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
       gl_next_as_first_directive='<'inttypes.h'>'
     else
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
       gl_next_as_first_directive=$gl_cv_next_inttypes_h
     fi
     NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive













  GL_GNULIB_IMAXABS=0



  GL_GNULIB_IMAXDIV=0



  GL_GNULIB_STRTOIMAX=0



  GL_GNULIB_STRTOUMAX=0





  case "$host_os" in
    mingw* | windows*)
                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
printf %s "checking for 64-bit off_t... " >&6; }
if test ${gl_cv_type_off_t_64+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
                int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];

int
main (void)
{

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

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
printf "%s\n" "$gl_cv_type_off_t_64" >&6; }
      if test $gl_cv_type_off_t_64 = no; then
        WINDOWS_64_BIT_OFF_T=1
      else
        WINDOWS_64_BIT_OFF_T=0
      fi
                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5
printf %s "checking for 64-bit st_size... " >&6; }
if test ${gl_cv_member_st_size_64+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
                struct stat buf;
                int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];

int
main (void)
{

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

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
printf "%s\n" "$gl_cv_member_st_size_64" >&6; }
      if test $gl_cv_member_st_size_64 = no; then
        WINDOWS_64_BIT_ST_SIZE=1
      else
        WINDOWS_64_BIT_ST_SIZE=0
      fi
      ;;
    *)
                                                      WINDOWS_64_BIT_OFF_T=0
      WINDOWS_64_BIT_ST_SIZE=0
      ;;
  esac


  HAVE_MBSLEN=0;
    HAVE_EXPLICIT_BZERO=1;
  HAVE_FFSL=1;
  HAVE_FFSLL=1;
  HAVE_DECL_MEMMEM=1;
  HAVE_MEMPCPY=1;
  HAVE_MEMSET_EXPLICIT=1;
  HAVE_DECL_MEMRCHR=1;
  HAVE_RAWMEMCHR=1;
  HAVE_STPCPY=1;
  HAVE_STPNCPY=1;
  HAVE_STRCHRNUL=1;
  HAVE_DECL_STRDUP=1;
  HAVE_DECL_STRNDUP=1;
  HAVE_DECL_STRNLEN=1;
  HAVE_STRPBRK=1;
  HAVE_STRSEP=1;
  HAVE_STRCASESTR=1;
  HAVE_DECL_STRTOK_R=1;
  HAVE_DECL_STRERROR_R=1;
  HAVE_STRERRORNAME_NP=1;
  HAVE_SIGABBREV_NP=1;
  HAVE_SIGDESCR_NP=1;
  HAVE_DECL_STRSIGNAL=1;
  HAVE_STRVERSCMP=1;
  REPLACE_FFSLL=0;
  REPLACE_MEMCHR=0;
  REPLACE_MEMMEM=0;
  REPLACE_MEMPCPY=0;
  REPLACE_MEMSET_EXPLICIT=0;
  REPLACE_STPCPY=0;
  REPLACE_STPNCPY=0;
  REPLACE_STRCHRNUL=0;
  REPLACE_STRDUP=0;
  REPLACE_STRNCAT=0;
  REPLACE_STRNDUP=0;
  REPLACE_STRNLEN=0;
  REPLACE_STRSTR=0;
  REPLACE_STRCASESTR=0;
  REPLACE_STRTOK_R=0;
  REPLACE_STRERROR=0;
  REPLACE_STRERROR_R=0;
  REPLACE_STRERRORNAME_NP=0;
  REPLACE_STRSIGNAL=0;
  REPLACE_STRVERSCMP=0;
  UNDEFINE_STRTOK_R=0;

ac_fn_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_memmem" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_MEMMEM $ac_have_decl" >>confdefs.h



  GL_GNULIB_EXPLICIT_BZERO=0



  GL_GNULIB_FFSL=0



  GL_GNULIB_FFSLL=0



  GL_GNULIB_MEMCHR=0



  GL_GNULIB_MEMMEM=0



  GL_GNULIB_MEMPCPY=0



  GL_GNULIB_MEMRCHR=0



  GL_GNULIB_MEMSET_EXPLICIT=0



  GL_GNULIB_RAWMEMCHR=0



  GL_GNULIB_STPCPY=0



  GL_GNULIB_STPNCPY=0



  GL_GNULIB_STRCHRNUL=0



  GL_GNULIB_STRDUP=0



  GL_GNULIB_STRNCAT=0



  GL_GNULIB_STRNDUP=0



  GL_GNULIB_STRNLEN=0



  GL_GNULIB_STRPBRK=0



  GL_GNULIB_STRSEP=0



  GL_GNULIB_STRSTR=0



  GL_GNULIB_STRCASESTR=0



  GL_GNULIB_STRTOK_R=0



  GL_GNULIB_MBSLEN=0



  GL_GNULIB_MBSNLEN=0



  GL_GNULIB_MBSCHR=0



  GL_GNULIB_MBSRCHR=0



  GL_GNULIB_MBSSTR=0



  GL_GNULIB_MBSCASECMP=0



  GL_GNULIB_MBSNCASECMP=0



  GL_GNULIB_MBSPCASECMP=0



  GL_GNULIB_MBSCASESTR=0



  GL_GNULIB_MBSCSPN=0



  GL_GNULIB_MBSPBRK=0



  GL_GNULIB_MBSSPN=0



  GL_GNULIB_MBSSEP=0



  GL_GNULIB_MBSTOK_R=0



  GL_GNULIB_STRERROR=0



  GL_GNULIB_STRERROR_R=0



  GL_GNULIB_STRERRORNAME_NP=0



  GL_GNULIB_SIGABBREV_NP=0



  GL_GNULIB_SIGDESCR_NP=0



  GL_GNULIB_STRSIGNAL=0



  GL_GNULIB_STRVERSCMP=0



  GL_GNULIB_MDA_MEMCCPY=1



  GL_GNULIB_MDA_STRDUP=1



ac_fn_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_memrchr" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_MEMRCHR $ac_have_decl" >>confdefs.h






  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5
printf %s "checking whether <limits.h> defines MIN and MAX... " >&6; }
if test ${gl_cv_minmax_in_limits_h+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <limits.h>
            int x = MIN (42, 17);
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_minmax_in_limits_h=yes
else $as_nop
  gl_cv_minmax_in_limits_h=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5
printf "%s\n" "$gl_cv_minmax_in_limits_h" >&6; }
  if test $gl_cv_minmax_in_limits_h = yes; then

printf "%s\n" "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h

  fi






  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5
printf %s "checking whether <sys/param.h> defines MIN and MAX... " >&6; }
if test ${gl_cv_minmax_in_sys_param_h+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/param.h>
            int x = MIN (42, 17);
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_minmax_in_sys_param_h=yes
else $as_nop
  gl_cv_minmax_in_sys_param_h=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5
printf "%s\n" "$gl_cv_minmax_in_sys_param_h" >&6; }
  if test $gl_cv_minmax_in_sys_param_h = yes; then

printf "%s\n" "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h

  fi





    HAVE_DECL_LOCALTIME_R=1;
  HAVE_NANOSLEEP=1;
  HAVE_STRPTIME=1;
  HAVE_TIMEGM=1;
  HAVE_TIMESPEC_GET=1;
  HAVE_TIMESPEC_GETRES=1;
    HAVE_TIMEZONE_T=0;
  REPLACE_CTIME=0;
  REPLACE_GMTIME=0;
  REPLACE_LOCALTIME=0;
  REPLACE_LOCALTIME_R=0;
  REPLACE_MKTIME=0;
  REPLACE_NANOSLEEP=0;
  REPLACE_STRFTIME=0;
  REPLACE_TIME=0;
  REPLACE_TIMEGM=0;
  REPLACE_TIMESPEC_GET=0;
  REPLACE_TIMESPEC_GETRES=0;
  REPLACE_TZSET=0;


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether time_t is signed" >&5
printf %s "checking whether time_t is signed... " >&6; }
if test ${gl_cv_time_t_is_signed+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <time.h>
                          char time_t_signed[(time_t) -1 < 0 ? 1 : -1];
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_time_t_is_signed=yes
else $as_nop
  gl_cv_time_t_is_signed=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_t_is_signed" >&5
printf "%s\n" "$gl_cv_time_t_is_signed" >&6; }
  if test $gl_cv_time_t_is_signed = yes; then

printf "%s\n" "#define TIME_T_IS_SIGNED 1" >>confdefs.h

  fi

ac_fn_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_alarm" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_ALARM $ac_have_decl" >>confdefs.h







  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
printf %s "checking for working mktime... " >&6; }
if test ${gl_cv_func_working_mktime+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test $APPLE_UNIVERSAL_BUILD = 1; then
       # A universal build on Apple Mac OS X platforms.
       # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
       # But we need a configuration result that is valid in both modes.
       gl_cv_func_working_mktime="guessing no"
     else
       if test "$cross_compiling" = yes
then :
  case "$host_os" in
                               # Guess no on native Windows.
            mingw* | windows*) gl_cv_func_working_mktime="guessing no" ;;
            *)                 gl_cv_func_working_mktime="$gl_cross_guess_normal" ;;
          esac

else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
/* Test program from Paul Eggert and Tony Leneis.  */
#include <limits.h>
#include <stdlib.h>
#include <time.h>

#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif

#if HAVE_DECL_ALARM
# include <signal.h>
#endif



$gl_mda_defines


#ifndef TIME_T_IS_SIGNED
# define TIME_T_IS_SIGNED 0
#endif

static time_t time_t_max;
static time_t time_t_min;

/* Values we'll use to set the TZ environment variable.  */
static char *tz_strings[] = {
  (char *) 0, "TZ=GMT0", "TZ=JST-9",
  "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
};
#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))

/* Return 0 if mktime fails to convert a date in the spring-forward gap.
   Based on a problem report from Andreas Jaeger.  */
static int
spring_forward_gap ()
{
  /* glibc (up to about 1998-10-07) failed this test. */
  struct tm tm;

  /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
     instead of "TZ=America/Vancouver" in order to detect the bug even
     on systems that don't support the Olson extension, or don't have the
     full zoneinfo tables installed.  */
  if (putenv ("TZ=PST8PDT,M4.1.0,M10.5.0") != 0)
    return -1;

  tm.tm_year = 98;
  tm.tm_mon = 3;
  tm.tm_mday = 5;
  tm.tm_hour = 2;
  tm.tm_min = 0;
  tm.tm_sec = 0;
  tm.tm_isdst = -1;
  return mktime (&tm) != (time_t) -1;
}

static int
mktime_test1 (time_t now)
{
  struct tm *lt;
  return ! (lt = localtime (&now)) || mktime (lt) == now;
}

static int
mktime_test (time_t now)
{
  return (mktime_test1 (now)
          && mktime_test1 ((time_t) (time_t_max - now))
          && mktime_test1 ((time_t) (time_t_min + now)));
}

static int
irix_6_4_bug ()
{
  /* Based on code from Ariel Faigon.  */
  struct tm tm;
  tm.tm_year = 96;
  tm.tm_mon = 3;
  tm.tm_mday = 0;
  tm.tm_hour = 0;
  tm.tm_min = 0;
  tm.tm_sec = 0;
  tm.tm_isdst = -1;
  mktime (&tm);
  return tm.tm_mon == 2 && tm.tm_mday == 31;
}

static int
bigtime_test (int j)
{
  struct tm tm;
  time_t now;
  tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
  now = mktime (&tm);
  if (now != (time_t) -1)
    {
      struct tm *lt = localtime (&now);
      if (! (lt
             && lt->tm_year == tm.tm_year
             && lt->tm_mon == tm.tm_mon
             && lt->tm_mday == tm.tm_mday
             && lt->tm_hour == tm.tm_hour
             && lt->tm_min == tm.tm_min
             && lt->tm_sec == tm.tm_sec
             && lt->tm_yday == tm.tm_yday
             && lt->tm_wday == tm.tm_wday
             && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
                  == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
        return 0;
    }
  return 1;
}

static int
year_2050_test ()
{
  /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
     ignoring leap seconds.  */
  unsigned long int answer = 2527315200UL;

  struct tm tm;
  time_t t;
  tm.tm_year = 2050 - 1900;
  tm.tm_mon = 2 - 1;
  tm.tm_mday = 1;
  tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
  tm.tm_isdst = -1;

  /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
     instead of "TZ=America/Vancouver" in order to detect the bug even
     on systems that don't support the Olson extension, or don't have the
     full zoneinfo tables installed.  */
  if (putenv ("TZ=PST8PDT,M4.1.0,M10.5.0") != 0)
    return -1;

  t = mktime (&tm);

  /* Check that the result is either a failure, or close enough
     to the correct answer that we can assume the discrepancy is
     due to leap seconds.  */
  return (t == (time_t) -1
          || (0 < t && answer - 120 <= t && t <= answer + 120));
}

static int
indiana_test ()
{
  if (putenv ("TZ=America/Indiana/Indianapolis") != 0)
    return -1;
  struct tm tm;
  tm.tm_year = 1986 - 1900; tm.tm_mon = 4 - 1; tm.tm_mday = 28;
  tm.tm_hour = 16; tm.tm_min = 24; tm.tm_sec = 50; tm.tm_isdst = 0;
  time_t std = mktime (&tm);
  if (! (std == 515107490 || std == 515107503))
    return 1;

  /* This platform supports TZDB, either without or with leap seconds.
     Return true if GNU Bug#48085 is absent.  */
  tm.tm_isdst = 1;
  time_t dst = mktime (&tm);
  return std - dst == 60 * 60;
}

int
main ()
{
  int result = 0;
  time_t t, delta;
  int i, j;
  int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;

#if HAVE_DECL_ALARM
  /* This test makes some buggy mktime implementations loop.
     Give up after 60 seconds; a mktime slower than that
     isn't worth using anyway.  */
  signal (SIGALRM, SIG_DFL);
  alarm (60);
#endif

  time_t_max = (! TIME_T_IS_SIGNED
                ? (time_t) -1
                : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
                   * 2 + 1));
  time_t_min = (! TIME_T_IS_SIGNED
                ? (time_t) 0
                : time_t_signed_magnitude
                ? ~ (time_t) 0
                : ~ time_t_max);

  delta = time_t_max / 997; /* a suitable prime number */
  for (i = 0; i < N_STRINGS; i++)
    {
      if (tz_strings[i])
        putenv (tz_strings[i]);

      for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
        if (! mktime_test (t))
          result |= 1;
      if ((result & 2) == 0
          && ! (mktime_test ((time_t) 1)
                && mktime_test ((time_t) (60 * 60))
                && mktime_test ((time_t) (60 * 60 * 24))))
        result |= 2;

      for (j = 1; (result & 4) == 0; j <<= 1)
        {
          if (! bigtime_test (j))
            result |= 4;
          if (INT_MAX / 2 < j)
            break;
        }
      if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
        result |= 8;
    }
  if (! irix_6_4_bug ())
    result |= 16;
  if (! spring_forward_gap ())
    result |= 32;
  if (! year_2050_test () || ! indiana_test ())
    result |= 64;
  return result;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  gl_cv_func_working_mktime=yes
else $as_nop
  gl_cv_func_working_mktime=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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
printf "%s\n" "$gl_cv_func_working_mktime" >&6; }



  GL_GNULIB_CTIME=0



  GL_GNULIB_MKTIME=0



  GL_GNULIB_LOCALTIME=0



  GL_GNULIB_NANOSLEEP=0



  GL_GNULIB_STRFTIME=0



  GL_GNULIB_STRPTIME=0



  GL_GNULIB_TIME=0



  GL_GNULIB_TIMEGM=0



  GL_GNULIB_TIMESPEC_GET=0



  GL_GNULIB_TIMESPEC_GETRES=0



  GL_GNULIB_TIME_R=0



  GL_GNULIB_TIME_RZ=0



  GL_GNULIB_TZSET=0



  GL_GNULIB_MDA_TZSET=1



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; }
if test ${ac_cv_struct_tm+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
#include <time.h>

int
main (void)
{
struct tm tm;
				     int *p = &tm.tm_sec;
				     return !p;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_struct_tm=time.h
else $as_nop
  ac_cv_struct_tm=sys/time.h
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
printf "%s\n" "$ac_cv_struct_tm" >&6; }
if test $ac_cv_struct_tm = sys/time.h; then

printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h

fi

ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
#include <$ac_cv_struct_tm>

"
if test "x$ac_cv_member_struct_tm_tm_zone" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_TM_TM_ZONE 1" >>confdefs.h


fi

if test "$ac_cv_member_struct_tm_tm_zone" = yes; then

printf "%s\n" "#define HAVE_TM_ZONE 1" >>confdefs.h

else
  ac_fn_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_tzname" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_TZNAME $ac_have_decl" >>confdefs.h

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
printf %s "checking for tzname... " >&6; }
if test ${ac_cv_var_tzname+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <time.h>
#if !HAVE_DECL_TZNAME
extern char *tzname[];
#endif

int
main (void)
{
return tzname[0][0];
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_var_tzname=yes
else $as_nop
  ac_cv_var_tzname=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
printf "%s\n" "$ac_cv_var_tzname" >&6; }
  if test $ac_cv_var_tzname = yes; then

printf "%s\n" "#define HAVE_TZNAME 1" >>confdefs.h

  fi
fi


 ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
"
if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes
then :

printf "%s\n" "#define HAVE_TM_GMTOFF 1" >>confdefs.h

fi



    HAVE_PSELECT=1;
  REPLACE_PSELECT=0;
  REPLACE_SELECT=0;





  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
printf %s "checking whether <sys/select.h> is self-contained... " >&6; }
if test ${gl_cv_header_sys_select_h_selfcontained+y}
then :
  printf %s "(cached) " >&6
else $as_nop

                                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/select.h>
int
main (void)
{
struct timeval b;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_header_sys_select_h_selfcontained=yes
else $as_nop
  gl_cv_header_sys_select_h_selfcontained=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
                        if test $gl_cv_header_sys_select_h_selfcontained = yes; then
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/select.h>
int
main (void)
{
int memset; int bzero;
  ;
  return 0;
}

_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/select.h>
int
main (void)
{

                  #undef memset
                  #define memset nonexistent_memset
                  extern
                  #ifdef __cplusplus
                  "C"
                  #endif
                  void *memset (void *, int, unsigned long);
                  #undef bzero
                  #define bzero nonexistent_bzero
                  extern
                  #ifdef __cplusplus
                  "C"
                  #endif
                  void bzero (void *, unsigned long);
                  fd_set fds;
                  FD_ZERO (&fds);

  ;
  return 0;
}

_ACEOF
if ac_fn_c_try_link "$LINENO"
then :

else $as_nop
  gl_cv_header_sys_select_h_selfcontained=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext

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

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
printf "%s\n" "$gl_cv_header_sys_select_h_selfcontained" >&6; }









     if test $gl_cv_have_include_next = yes; then
       gl_cv_next_sys_select_h='<'sys/select.h'>'
     else
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
printf %s "checking absolute name of <sys/select.h>... " >&6; }
if test ${gl_cv_next_sys_select_h+y}
then :
  printf %s "(cached) " >&6
else $as_nop

             if test $ac_cv_header_sys_select_h = yes; then




  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/select.h>
_ACEOF
                case "$host_os" in
    aix*) gl_absname_cpp="$ac_cpp -C" ;;
    *)    gl_absname_cpp="$ac_cpp" ;;
  esac

  case "$host_os" in
    mingw* | windows*)
                                          gl_dirsep_regex='[/\\]'
      ;;
    *)
      gl_dirsep_regex='\/'
      ;;
  esac
      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  gl_header_literal_regex=`echo 'sys/select.h' \
                           | sed -e "$gl_make_literal_regex_sed"`
  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
      s|^/[^/]|//&|
      p
      q
    }'

        gl_cv_absolute_sys_select_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  sed -n "$gl_absolute_header_sed"`

          gl_header=$gl_cv_absolute_sys_select_h
          gl_cv_next_sys_select_h='"'$gl_header'"'
          else
               gl_cv_next_sys_select_h='<'sys/select.h'>'
             fi


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
printf "%s\n" "$gl_cv_next_sys_select_h" >&6; }
     fi
     NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h

     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
       gl_next_as_first_directive='<'sys/select.h'>'
     else
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
       gl_next_as_first_directive=$gl_cv_next_sys_select_h
     fi
     NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive




  if test $ac_cv_header_sys_select_h = yes; then
    HAVE_SYS_SELECT_H=1
  else
    HAVE_SYS_SELECT_H=0
  fi





  if test $ac_cv_header_sys_socket_h != yes; then
                    ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
if test "x$ac_cv_header_winsock2_h" = xyes
then :
  printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h

fi

  fi
  if test "$ac_cv_header_winsock2_h" = yes; then
    HAVE_WINSOCK2_H=1
    UNISTD_H_HAVE_WINSOCK2_H=1
    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
  else
    HAVE_WINSOCK2_H=0
  fi








  GL_GNULIB_PSELECT=0



  GL_GNULIB_SELECT=0




    HAVE_POSIX_SIGNALBLOCKING=1;
  HAVE_PTHREAD_SIGMASK=1;
  HAVE_RAISE=1;
  HAVE_SIGSET_T=1;
  HAVE_SIGINFO_T=1;
  HAVE_SIGACTION=1;
  HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;

  HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;

  HAVE_SIGHANDLER_T=1;
  REPLACE_PTHREAD_SIGMASK=0;
  REPLACE_RAISE=0;




  GL_GNULIB_PTHREAD_SIGMASK=0



  GL_GNULIB_RAISE=0



  GL_GNULIB_SIGNAL_H_SIGPIPE=0



  GL_GNULIB_SIGPROCMASK=0



  GL_GNULIB_SIGACTION=0




{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
printf %s "checking for inline... " >&6; }
if test ${ac_cv_c_inline+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  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 (void) {return 0; }
$ac_kw foo_t foo (void) {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.beam conftest.$ac_ext
  test "$ac_cv_c_inline" != no && break
done

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
printf "%s\n" "$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" "sigset_t" "ac_cv_type_sigset_t" "
      #include <signal.h>
      /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
      #include <sys/types.h>

"
if test "x$ac_cv_type_sigset_t" = xyes
then :

printf "%s\n" "#define HAVE_SIGSET_T 1" >>confdefs.h

gl_cv_type_sigset_t=yes
else $as_nop
  gl_cv_type_sigset_t=no
fi

  if test $gl_cv_type_sigset_t != yes; then
    HAVE_SIGSET_T=0
  fi













     if test $gl_cv_have_include_next = yes; then
       gl_cv_next_signal_h='<'signal.h'>'
     else
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
printf %s "checking absolute name of <signal.h>... " >&6; }
if test ${gl_cv_next_signal_h+y}
then :
  printf %s "(cached) " >&6
else $as_nop



  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <signal.h>
_ACEOF
                case "$host_os" in
    aix*) gl_absname_cpp="$ac_cpp -C" ;;
    *)    gl_absname_cpp="$ac_cpp" ;;
  esac

  case "$host_os" in
    mingw* | windows*)
                                          gl_dirsep_regex='[/\\]'
      ;;
    *)
      gl_dirsep_regex='\/'
      ;;
  esac
      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  gl_header_literal_regex=`echo 'signal.h' \
                           | sed -e "$gl_make_literal_regex_sed"`
  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
      s|^/[^/]|//&|
      p
      q
    }'

        gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  sed -n "$gl_absolute_header_sed"`

          gl_header=$gl_cv_absolute_signal_h
          gl_cv_next_signal_h='"'$gl_header'"'


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
printf "%s\n" "$gl_cv_next_signal_h" >&6; }
     fi
     NEXT_SIGNAL_H=$gl_cv_next_signal_h

     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
       gl_next_as_first_directive='<'signal.h'>'
     else
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
       gl_next_as_first_directive=$gl_cv_next_signal_h
     fi
     NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive





# AIX declares sig_atomic_t to already include volatile, and C89 compilers
# then choke on 'volatile sig_atomic_t'.  C99 requires that it compile.
  ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
#include <signal.h>

"
if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes
then :

else $as_nop
  HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
fi







  ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
#include <signal.h>

"
if test "x$ac_cv_type_sighandler_t" = xyes
then :

else $as_nop
  HAVE_SIGHANDLER_T=0
fi







   if test $ac_cv_header_sys_socket_h = no; then
                         ac_fn_c_check_header_compile "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
if test "x$ac_cv_header_ws2tcpip_h" = xyes
then :
  printf "%s\n" "#define HAVE_WS2TCPIP_H 1" >>confdefs.h

fi

   fi






  if test $ac_cv_header_stdbit_h = yes; then
    GL_GENERATE_STDBIT_H=false
  else
    GL_GENERATE_STDBIT_H=true
  fi

      GL_STDC_LEADING_ZEROS=0;
  GL_STDC_LEADING_ONES=0;
  GL_STDC_TRAILING_ZEROS=0;
  GL_STDC_TRAILING_ONES=0;
  GL_STDC_FIRST_LEADING_ZERO=0;
  GL_STDC_FIRST_LEADING_ONE=0;
  GL_STDC_FIRST_TRAILING_ZERO=0;
  GL_STDC_FIRST_TRAILING_ONE=0;
  GL_STDC_COUNT_ZEROS=0;
  GL_STDC_COUNT_ONES=0;
  GL_STDC_HAS_SINGLE_BIT=0;
  GL_STDC_BIT_WIDTH=0;
  GL_STDC_BIT_FLOOR=0;
  GL_STDC_BIT_CEIL=0;




    NULLPTR_T_NEEDS_STDDEF=1;
  STDDEF_NOT_IDEMPOTENT=0;
  REPLACE_NULL=0;
  HAVE_MAX_ALIGN_T=1;
  HAVE_WCHAR_T=1;


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
printf %s "checking for wchar_t... " >&6; }
if test ${gt_cv_c_wchar_t+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stddef.h>
            wchar_t foo = (wchar_t)'\0';
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gt_cv_c_wchar_t=yes
else $as_nop
  gt_cv_c_wchar_t=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
printf "%s\n" "$gt_cv_c_wchar_t" >&6; }
  if test $gt_cv_c_wchar_t = yes; then

printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h

  fi







  GL_GENERATE_STDDEF_H=false

      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
printf %s "checking for good max_align_t... " >&6; }
if test ${gl_cv_type_max_align_t+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
/* On FreeBSD 12.0/x86, max_align_t defined by <stddef.h> has
               the correct alignment with the default (wrong) definition of
               _Alignof, but a wrong alignment as soon as we activate an
               ISO C compliant _Alignof definition.  */
            #if ((defined __GNUC__ && 4 <= __GNUC__) || defined __clang__) && !defined __cplusplus
             #define _Alignof(type) __builtin_offsetof (struct { char __a; type __b; }, __b)
            #endif
            #include <stddef.h>
            unsigned int s = sizeof (max_align_t);
            #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
            int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
            int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
            #endif
            typedef struct { char a; max_align_t b; } max_helper;
            typedef struct { char a; long b; } long_helper;
            typedef struct { char a; double b; } double_helper;
            typedef struct { char a; long double b; } long_double_helper;
            int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
            int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
            int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];

int
main (void)
{

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

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
printf "%s\n" "$gl_cv_type_max_align_t" >&6; }
  if test $gl_cv_type_max_align_t = no; then
    HAVE_MAX_ALIGN_T=0
    GL_GENERATE_STDDEF_H=true
  fi

  if test $gt_cv_c_wchar_t = no; then
    HAVE_WCHAR_T=0
    GL_GENERATE_STDDEF_H=true
  fi

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
printf %s "checking whether NULL can be used in arbitrary expressions... " >&6; }
if test ${gl_cv_decl_null_works+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stddef.h>
      int test[2 * (sizeof NULL == sizeof (void *)) -1];

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_decl_null_works=yes
else $as_nop
  gl_cv_decl_null_works=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
printf "%s\n" "$gl_cv_decl_null_works" >&6; }
  if test $gl_cv_decl_null_works = no; then
    REPLACE_NULL=1
    GL_GENERATE_STDDEF_H=true
  fi

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unreachable" >&5
printf %s "checking for unreachable... " >&6; }
if test ${gl_cv_func_unreachable+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stddef.h>

int
main (void)
{
unreachable ();

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  gl_cv_func_unreachable=yes
else $as_nop
  gl_cv_func_unreachable=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unreachable" >&5
printf "%s\n" "$gl_cv_func_unreachable" >&6; }
  if test $gl_cv_func_unreachable = no; then
    GL_GENERATE_STDDEF_H=true
  fi

    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether nullptr_t needs <stddef.h>" >&5
printf %s "checking whether nullptr_t needs <stddef.h>... " >&6; }
if test ${gl_cv_nullptr_t_needs_stddef+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
nullptr_t x;
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_nullptr_t_needs_stddef=no
else $as_nop
  gl_cv_nullptr_t_needs_stddef=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_nullptr_t_needs_stddef" >&5
printf "%s\n" "$gl_cv_nullptr_t_needs_stddef" >&6; }
  if test "$gl_cv_nullptr_t_needs_stddef" = no; then
    NULLPTR_T_NEEDS_STDDEF=0
    GL_GENERATE_STDDEF_H=true
  fi

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clean definition of __STDC_VERSION_STDDEF_H__" >&5
printf %s "checking for clean definition of __STDC_VERSION_STDDEF_H__... " >&6; }
if test ${gl_cv_clean_version_stddef+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
/* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114870 */
            #include <stddef.h>
            #undef __STDC_VERSION_STDDEF_H__
            #include <time.h>
            #ifdef __STDC_VERSION_STDDEF_H__
            # error "<time.h> defines __STDC_VERSION_STDDEF_H__"
            #endif

_ACEOF
if ac_fn_c_try_cpp "$LINENO"
then :
  gl_cv_clean_version_stddef=yes
else $as_nop
  gl_cv_clean_version_stddef=no
fi
rm -f conftest.err conftest.i conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_clean_version_stddef" >&5
printf "%s\n" "$gl_cv_clean_version_stddef" >&6; }
  if test "$gl_cv_clean_version_stddef" = no; then
    STDDEF_NOT_IDEMPOTENT=1
    GL_GENERATE_STDDEF_H=true
  fi

  if $GL_GENERATE_STDDEF_H; then








     if test $gl_cv_have_include_next = yes; then
       gl_cv_next_stddef_h='<'stddef.h'>'
     else
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
printf %s "checking absolute name of <stddef.h>... " >&6; }
if test ${gl_cv_next_stddef_h+y}
then :
  printf %s "(cached) " >&6
else $as_nop



  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stddef.h>
_ACEOF
                case "$host_os" in
    aix*) gl_absname_cpp="$ac_cpp -C" ;;
    *)    gl_absname_cpp="$ac_cpp" ;;
  esac

  case "$host_os" in
    mingw* | windows*)
                                          gl_dirsep_regex='[/\\]'
      ;;
    *)
      gl_dirsep_regex='\/'
      ;;
  esac
      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  gl_header_literal_regex=`echo 'stddef.h' \
                           | sed -e "$gl_make_literal_regex_sed"`
  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
      s|^/[^/]|//&|
      p
      q
    }'

        gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  sed -n "$gl_absolute_header_sed"`

          gl_header=$gl_cv_absolute_stddef_h
          gl_cv_next_stddef_h='"'$gl_header'"'


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
printf "%s\n" "$gl_cv_next_stddef_h" >&6; }
     fi
     NEXT_STDDEF_H=$gl_cv_next_stddef_h

     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
       gl_next_as_first_directive='<'stddef.h'>'
     else
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
       gl_next_as_first_directive=$gl_cv_next_stddef_h
     fi
     NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive




  fi





  case "$host_os" in
    *-musl* | midipix*)

printf "%s\n" "#define MUSL_LIBC 1" >>confdefs.h

      ;;
  esac

ac_fn_check_decl "$LINENO" "fcloseall" "ac_cv_have_decl_fcloseall" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_fcloseall" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_FCLOSEALL $ac_have_decl" >>confdefs.h

ac_fn_check_decl "$LINENO" "getw" "ac_cv_have_decl_getw" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_getw" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_GETW $ac_have_decl" >>confdefs.h

ac_fn_check_decl "$LINENO" "putw" "ac_cv_have_decl_putw" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_putw" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_PUTW $ac_have_decl" >>confdefs.h











     if test $gl_cv_have_include_next = yes; then
       gl_cv_next_stdio_h='<'stdio.h'>'
     else
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
printf %s "checking absolute name of <stdio.h>... " >&6; }
if test ${gl_cv_next_stdio_h+y}
then :
  printf %s "(cached) " >&6
else $as_nop



  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
_ACEOF
                case "$host_os" in
    aix*) gl_absname_cpp="$ac_cpp -C" ;;
    *)    gl_absname_cpp="$ac_cpp" ;;
  esac

  case "$host_os" in
    mingw* | windows*)
                                          gl_dirsep_regex='[/\\]'
      ;;
    *)
      gl_dirsep_regex='\/'
      ;;
  esac
      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  gl_header_literal_regex=`echo 'stdio.h' \
                           | sed -e "$gl_make_literal_regex_sed"`
  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
      s|^/[^/]|//&|
      p
      q
    }'

        gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  sed -n "$gl_absolute_header_sed"`

          gl_header=$gl_cv_absolute_stdio_h
          gl_cv_next_stdio_h='"'$gl_header'"'


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
printf "%s\n" "$gl_cv_next_stdio_h" >&6; }
     fi
     NEXT_STDIO_H=$gl_cv_next_stdio_h

     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
       gl_next_as_first_directive='<'stdio.h'>'
     else
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
       gl_next_as_first_directive=$gl_cv_next_stdio_h
     fi
     NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive





        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
printf %s "checking which flavor of printf attribute matches inttypes macros... " >&6; }
if test ${gl_cv_func_printf_attribute_flavor+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

       #define __STDC_FORMAT_MACROS 1
       #include <stdio.h>
       #include <inttypes.h>
       /* For non-mingw systems, compilation will trivially succeed.
          For mingw, compilation will succeed for older mingw (system
          printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
       #if (defined _WIN32 && ! defined __CYGWIN__) && \
         (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
       extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
       #endif

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_func_printf_attribute_flavor=system
else $as_nop
  gl_cv_func_printf_attribute_flavor=gnu
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
printf "%s\n" "$gl_cv_func_printf_attribute_flavor" >&6; }
  if test "$gl_cv_func_printf_attribute_flavor" = gnu; then

printf "%s\n" "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h

  fi













  if test $ac_cv_have_decl_fcloseall = no; then
    HAVE_DECL_FCLOSEALL=0
  fi


  if test $ac_cv_have_decl_getw = no; then
    HAVE_DECL_GETW=0
  fi


  if test $ac_cv_have_decl_putw = no; then
    HAVE_DECL_PUTW=0
  fi










     if test $gl_cv_have_include_next = yes; then
       gl_cv_next_stdlib_h='<'stdlib.h'>'
     else
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
printf %s "checking absolute name of <stdlib.h>... " >&6; }
if test ${gl_cv_next_stdlib_h+y}
then :
  printf %s "(cached) " >&6
else $as_nop



  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdlib.h>
_ACEOF
                case "$host_os" in
    aix*) gl_absname_cpp="$ac_cpp -C" ;;
    *)    gl_absname_cpp="$ac_cpp" ;;
  esac

  case "$host_os" in
    mingw* | windows*)
                                          gl_dirsep_regex='[/\\]'
      ;;
    *)
      gl_dirsep_regex='\/'
      ;;
  esac
      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  gl_header_literal_regex=`echo 'stdlib.h' \
                           | sed -e "$gl_make_literal_regex_sed"`
  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
      s|^/[^/]|//&|
      p
      q
    }'

        gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  sed -n "$gl_absolute_header_sed"`

          gl_header=$gl_cv_absolute_stdlib_h
          gl_cv_next_stdlib_h='"'$gl_header'"'


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
printf "%s\n" "$gl_cv_next_stdlib_h" >&6; }
     fi
     NEXT_STDLIB_H=$gl_cv_next_stdlib_h

     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
       gl_next_as_first_directive='<'stdlib.h'>'
     else
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
       gl_next_as_first_directive=$gl_cv_next_stdlib_h
     fi
     NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive














     if test $gl_cv_have_include_next = yes; then
       gl_cv_next_string_h='<'string.h'>'
     else
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
printf %s "checking absolute name of <string.h>... " >&6; }
if test ${gl_cv_next_string_h+y}
then :
  printf %s "(cached) " >&6
else $as_nop



  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <string.h>
_ACEOF
                case "$host_os" in
    aix*) gl_absname_cpp="$ac_cpp -C" ;;
    *)    gl_absname_cpp="$ac_cpp" ;;
  esac

  case "$host_os" in
    mingw* | windows*)
                                          gl_dirsep_regex='[/\\]'
      ;;
    *)
      gl_dirsep_regex='\/'
      ;;
  esac
      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  gl_header_literal_regex=`echo 'string.h' \
                           | sed -e "$gl_make_literal_regex_sed"`
  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
      s|^/[^/]|//&|
      p
      q
    }'

        gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  sed -n "$gl_absolute_header_sed"`

          gl_header=$gl_cv_absolute_string_h
          gl_cv_next_string_h='"'$gl_header'"'


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
printf "%s\n" "$gl_cv_next_string_h" >&6; }
     fi
     NEXT_STRING_H=$gl_cv_next_string_h

     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
       gl_next_as_first_directive='<'string.h'>'
     else
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
       gl_next_as_first_directive=$gl_cv_next_string_h
     fi
     NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive









ac_fn_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_strnlen" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_STRNLEN $ac_have_decl" >>confdefs.h


ac_fn_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_strtoimax" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_STRTOIMAX $ac_have_decl" >>confdefs.h














     if test $gl_cv_have_include_next = yes; then
       gl_cv_next_sys_random_h='<'sys/random.h'>'
     else
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/random.h>" >&5
printf %s "checking absolute name of <sys/random.h>... " >&6; }
if test ${gl_cv_next_sys_random_h+y}
then :
  printf %s "(cached) " >&6
else $as_nop

             if test $ac_cv_header_sys_random_h = yes; then




  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/random.h>
_ACEOF
                case "$host_os" in
    aix*) gl_absname_cpp="$ac_cpp -C" ;;
    *)    gl_absname_cpp="$ac_cpp" ;;
  esac

  case "$host_os" in
    mingw* | windows*)
                                          gl_dirsep_regex='[/\\]'
      ;;
    *)
      gl_dirsep_regex='\/'
      ;;
  esac
      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  gl_header_literal_regex=`echo 'sys/random.h' \
                           | sed -e "$gl_make_literal_regex_sed"`
  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
      s|^/[^/]|//&|
      p
      q
    }'

        gl_cv_absolute_sys_random_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  sed -n "$gl_absolute_header_sed"`

          gl_header=$gl_cv_absolute_sys_random_h
          gl_cv_next_sys_random_h='"'$gl_header'"'
          else
               gl_cv_next_sys_random_h='<'sys/random.h'>'
             fi


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_random_h" >&5
printf "%s\n" "$gl_cv_next_sys_random_h" >&6; }
     fi
     NEXT_SYS_RANDOM_H=$gl_cv_next_sys_random_h

     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
       gl_next_as_first_directive='<'sys/random.h'>'
     else
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
       gl_next_as_first_directive=$gl_cv_next_sys_random_h
     fi
     NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H=$gl_next_as_first_directive




  if test $ac_cv_header_sys_random_h = yes; then
    HAVE_SYS_RANDOM_H=1
  else
    HAVE_SYS_RANDOM_H=0
  fi



  if test $ac_cv_header_sys_random_h = yes; then
    UNISTD_H_HAVE_SYS_RANDOM_H=1
  fi



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
printf %s "checking whether stat file-mode macros are broken... " >&6; }
if test ${ac_cv_header_stat_broken+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
#include <sys/stat.h>

#if defined S_ISBLK && defined S_IFDIR
extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
#endif

#if defined S_ISBLK && defined S_IFCHR
extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
#endif

#if defined S_ISLNK && defined S_IFREG
extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
#endif

#if defined S_ISSOCK && defined S_IFREG
extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
#endif

_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_header_stat_broken=no
else $as_nop
  ac_cv_header_stat_broken=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
printf "%s\n" "$ac_cv_header_stat_broken" >&6; }
if test $ac_cv_header_stat_broken = yes; then

printf "%s\n" "#define STAT_MACROS_BROKEN 1" >>confdefs.h

fi















     if test $gl_cv_have_include_next = yes; then
       gl_cv_next_sys_stat_h='<'sys/stat.h'>'
     else
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
printf %s "checking absolute name of <sys/stat.h>... " >&6; }
if test ${gl_cv_next_sys_stat_h+y}
then :
  printf %s "(cached) " >&6
else $as_nop

             if test $ac_cv_header_sys_stat_h = yes; then




  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/stat.h>
_ACEOF
                case "$host_os" in
    aix*) gl_absname_cpp="$ac_cpp -C" ;;
    *)    gl_absname_cpp="$ac_cpp" ;;
  esac

  case "$host_os" in
    mingw* | windows*)
                                          gl_dirsep_regex='[/\\]'
      ;;
    *)
      gl_dirsep_regex='\/'
      ;;
  esac
      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  gl_header_literal_regex=`echo 'sys/stat.h' \
                           | sed -e "$gl_make_literal_regex_sed"`
  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
      s|^/[^/]|//&|
      p
      q
    }'

        gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  sed -n "$gl_absolute_header_sed"`

          gl_header=$gl_cv_absolute_sys_stat_h
          gl_cv_next_sys_stat_h='"'$gl_header'"'
          else
               gl_cv_next_sys_stat_h='<'sys/stat.h'>'
             fi


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
     fi
     NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h

     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
       gl_next_as_first_directive='<'sys/stat.h'>'
     else
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
       gl_next_as_first_directive=$gl_cv_next_sys_stat_h
     fi
     NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive








    WINDOWS_STAT_TIMESPEC=0








      ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
     #include <sys/stat.h>
"
if test "x$ac_cv_type_nlink_t" = xyes
then :

else $as_nop

printf "%s\n" "#define nlink_t int" >>confdefs.h

fi














HAVE_OFF64_T=1





printf "%s\n" "#define _USE_STD_STAT 1" >>confdefs.h










     if test $gl_cv_have_include_next = yes; then
       gl_cv_next_sys_types_h='<'sys/types.h'>'
     else
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
printf %s "checking absolute name of <sys/types.h>... " >&6; }
if test ${gl_cv_next_sys_types_h+y}
then :
  printf %s "(cached) " >&6
else $as_nop



  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
_ACEOF
                case "$host_os" in
    aix*) gl_absname_cpp="$ac_cpp -C" ;;
    *)    gl_absname_cpp="$ac_cpp" ;;
  esac

  case "$host_os" in
    mingw* | windows*)
                                          gl_dirsep_regex='[/\\]'
      ;;
    *)
      gl_dirsep_regex='\/'
      ;;
  esac
      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  gl_header_literal_regex=`echo 'sys/types.h' \
                           | sed -e "$gl_make_literal_regex_sed"`
  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
      s|^/[^/]|//&|
      p
      q
    }'

        gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  sed -n "$gl_absolute_header_sed"`

          gl_header=$gl_cv_absolute_sys_types_h
          gl_cv_next_sys_types_h='"'$gl_header'"'


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
printf "%s\n" "$gl_cv_next_sys_types_h" >&6; }
     fi
     NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h

     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
       gl_next_as_first_directive='<'sys/types.h'>'
     else
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
       gl_next_as_first_directive=$gl_cv_next_sys_types_h
     fi
     NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive














    WINDOWS_STAT_INODES=0







  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
printf %s "checking for struct timespec in <time.h>... " >&6; }
if test ${gl_cv_sys_struct_timespec_in_time_h+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <time.h>

int
main (void)
{
static struct timespec x; x.tv_sec = x.tv_nsec;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_sys_struct_timespec_in_time_h=yes
else $as_nop
  gl_cv_sys_struct_timespec_in_time_h=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
printf "%s\n" "$gl_cv_sys_struct_timespec_in_time_h" >&6; }

  TIME_H_DEFINES_STRUCT_TIMESPEC=0
  SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
  PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
  UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
  if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
    TIME_H_DEFINES_STRUCT_TIMESPEC=1
  else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
printf %s "checking for struct timespec in <sys/time.h>... " >&6; }
if test ${gl_cv_sys_struct_timespec_in_sys_time_h+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/time.h>

int
main (void)
{
static struct timespec x; x.tv_sec = x.tv_nsec;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_sys_struct_timespec_in_sys_time_h=yes
else $as_nop
  gl_cv_sys_struct_timespec_in_sys_time_h=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
printf "%s\n" "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
    if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
      SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
    else
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
printf %s "checking for struct timespec in <pthread.h>... " >&6; }
if test ${gl_cv_sys_struct_timespec_in_pthread_h+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <pthread.h>

int
main (void)
{
static struct timespec x; x.tv_sec = x.tv_nsec;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_sys_struct_timespec_in_pthread_h=yes
else $as_nop
  gl_cv_sys_struct_timespec_in_pthread_h=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
printf "%s\n" "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
      if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
        PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
      else
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
printf %s "checking for struct timespec in <unistd.h>... " >&6; }
if test ${gl_cv_sys_struct_timespec_in_unistd_h+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <unistd.h>

int
main (void)
{
static struct timespec x; x.tv_sec = x.tv_nsec;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_sys_struct_timespec_in_unistd_h=yes
else $as_nop
  gl_cv_sys_struct_timespec_in_unistd_h=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
printf "%s\n" "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
        if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
          UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
        fi
      fi
    fi
  fi
















     if test $gl_cv_have_include_next = yes; then
       gl_cv_next_time_h='<'time.h'>'
     else
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
printf %s "checking absolute name of <time.h>... " >&6; }
if test ${gl_cv_next_time_h+y}
then :
  printf %s "(cached) " >&6
else $as_nop



  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <time.h>
_ACEOF
                case "$host_os" in
    aix*) gl_absname_cpp="$ac_cpp -C" ;;
    *)    gl_absname_cpp="$ac_cpp" ;;
  esac

  case "$host_os" in
    mingw* | windows*)
                                          gl_dirsep_regex='[/\\]'
      ;;
    *)
      gl_dirsep_regex='\/'
      ;;
  esac
      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  gl_header_literal_regex=`echo 'time.h' \
                           | sed -e "$gl_make_literal_regex_sed"`
  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
      s|^/[^/]|//&|
      p
      q
    }'

        gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  sed -n "$gl_absolute_header_sed"`

          gl_header=$gl_cv_absolute_time_h
          gl_cv_next_time_h='"'$gl_header'"'


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
printf "%s\n" "$gl_cv_next_time_h" >&6; }
     fi
     NEXT_TIME_H=$gl_cv_next_time_h

     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
       gl_next_as_first_directive='<'time.h'>'
     else
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
       gl_next_as_first_directive=$gl_cv_next_time_h
     fi
     NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive










  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TIME_UTC in <time.h>" >&5
printf %s "checking for TIME_UTC in <time.h>... " >&6; }
if test ${gl_cv_time_h_has_TIME_UTC+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <time.h>

int
main (void)
{
static int x = TIME_UTC; x++;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_time_h_has_TIME_UTC=yes
else $as_nop
  gl_cv_time_h_has_TIME_UTC=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_h_has_TIME_UTC" >&5
printf "%s\n" "$gl_cv_time_h_has_TIME_UTC" >&6; }
  if test $gl_cv_time_h_has_TIME_UTC = yes; then
    TIME_H_DEFINES_TIME_UTC=1
  else
    TIME_H_DEFINES_TIME_UTC=0
  fi



ac_fn_check_decl "$LINENO" "execvpe" "ac_cv_have_decl_execvpe" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_execvpe" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_EXECVPE $ac_have_decl" >>confdefs.h













     if test $gl_cv_have_include_next = yes; then
       gl_cv_next_unistd_h='<'unistd.h'>'
     else
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
printf %s "checking absolute name of <unistd.h>... " >&6; }
if test ${gl_cv_next_unistd_h+y}
then :
  printf %s "(cached) " >&6
else $as_nop

             if test $ac_cv_header_unistd_h = yes; then




  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <unistd.h>
_ACEOF
                case "$host_os" in
    aix*) gl_absname_cpp="$ac_cpp -C" ;;
    *)    gl_absname_cpp="$ac_cpp" ;;
  esac

  case "$host_os" in
    mingw* | windows*)
                                          gl_dirsep_regex='[/\\]'
      ;;
    *)
      gl_dirsep_regex='\/'
      ;;
  esac
      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  gl_header_literal_regex=`echo 'unistd.h' \
                           | sed -e "$gl_make_literal_regex_sed"`
  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
      s|^/[^/]|//&|
      p
      q
    }'

        gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  sed -n "$gl_absolute_header_sed"`

          gl_header=$gl_cv_absolute_unistd_h
          gl_cv_next_unistd_h='"'$gl_header'"'
          else
               gl_cv_next_unistd_h='<'unistd.h'>'
             fi


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
printf "%s\n" "$gl_cv_next_unistd_h" >&6; }
     fi
     NEXT_UNISTD_H=$gl_cv_next_unistd_h

     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
       gl_next_as_first_directive='<'unistd.h'>'
     else
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
       gl_next_as_first_directive=$gl_cv_next_unistd_h
     fi
     NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive




  if test $ac_cv_header_unistd_h = yes; then
    HAVE_UNISTD_H=1
  else
    HAVE_UNISTD_H=0
  fi











  if test $ac_cv_have_decl_execvpe = no; then
    HAVE_DECL_EXECVPE=0
  fi

ac_fn_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl" >>confdefs.h

ac_fn_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_feof_unlocked" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl" >>confdefs.h

ac_fn_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_ferror_unlocked" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl" >>confdefs.h

ac_fn_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_fflush_unlocked" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl" >>confdefs.h

ac_fn_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_fgets_unlocked" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl" >>confdefs.h

ac_fn_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_fputc_unlocked" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl" >>confdefs.h

ac_fn_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_fputs_unlocked" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl" >>confdefs.h

ac_fn_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_fread_unlocked" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl" >>confdefs.h

ac_fn_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl" >>confdefs.h

ac_fn_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_getc_unlocked" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl" >>confdefs.h

ac_fn_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_getchar_unlocked" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl" >>confdefs.h

ac_fn_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_putc_unlocked" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl" >>confdefs.h

ac_fn_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_putchar_unlocked" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl" >>confdefs.h















     if test $gl_cv_have_include_next = yes; then
       gl_cv_next_endian_h='<'endian.h'>'
     else
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <endian.h>" >&5
printf %s "checking absolute name of <endian.h>... " >&6; }
if test ${gl_cv_next_endian_h+y}
then :
  printf %s "(cached) " >&6
else $as_nop

             if test $ac_cv_header_endian_h = yes; then




  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <endian.h>
_ACEOF
                case "$host_os" in
    aix*) gl_absname_cpp="$ac_cpp -C" ;;
    *)    gl_absname_cpp="$ac_cpp" ;;
  esac

  case "$host_os" in
    mingw* | windows*)
                                          gl_dirsep_regex='[/\\]'
      ;;
    *)
      gl_dirsep_regex='\/'
      ;;
  esac
      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  gl_header_literal_regex=`echo 'endian.h' \
                           | sed -e "$gl_make_literal_regex_sed"`
  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
      s|^/[^/]|//&|
      p
      q
    }'

        gl_cv_absolute_endian_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  sed -n "$gl_absolute_header_sed"`

          gl_header=$gl_cv_absolute_endian_h
          gl_cv_next_endian_h='"'$gl_header'"'
          else
               gl_cv_next_endian_h='<'endian.h'>'
             fi


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_endian_h" >&5
printf "%s\n" "$gl_cv_next_endian_h" >&6; }
     fi
     NEXT_ENDIAN_H=$gl_cv_next_endian_h

     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
       gl_next_as_first_directive='<'endian.h'>'
     else
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
       gl_next_as_first_directive=$gl_cv_next_endian_h
     fi
     NEXT_AS_FIRST_DIRECTIVE_ENDIAN_H=$gl_next_as_first_directive




  if test $ac_cv_header_endian_h = yes; then
    HAVE_ENDIAN_H=1
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if endian.h defines stdint types" >&5
printf %s "checking if endian.h defines stdint types... " >&6; }
if test ${gl_cv_header_endian_h_stdint_types+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <endian.h>

int
main (void)
{
uint16_t t1 = 0;
              uint32_t t2 = 0;
              uint64_t t3 = 0;
              return !(t1 + t2 + t3);

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

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_endian_h_stdint_types" >&5
printf "%s\n" "$gl_cv_header_endian_h_stdint_types" >&6; }
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if endian.h defines functions and macros" >&5
printf %s "checking if endian.h defines functions and macros... " >&6; }
if test ${gl_cv_header_working_endian_h+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  gl_cv_header_working_endian_h=no
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <endian.h>

int
main (void)
{

#if LITTLE_ENDIAN == BIG_ENDIAN
# error "Endian macros not unique."
#endif
#if BYTE_ORDER != LITTLE_ENDIAN && BYTE_ORDER != BIG_ENDIAN
# error "Byte order not defined."
#endif

/* Big endian to host.  */
int value16_1 = be16toh (0.0);
int value32_1 = be32toh (0.0);
int value64_1 = be64toh (0.0);

/* Host to big endian.  */
int value16_2 = htobe16 (0.0);
int value32_2 = htobe32 (0.0);
int value64_2 = htobe64 (0.0);

/* Little endian to host.  */
int value16_3 = le16toh (0.0);
int value32_3 = le32toh (0.0);
int value64_3 = le64toh (0.0);

/* Host to little endian.  */
int value16_4 = htole16 (0.0);
int value32_4 = htole32 (0.0);
int value64_4 = htole64 (0.0);

/* Make sure the variables get used.  */
return !(value16_1 + value32_1 + value64_1
         + value16_2 + value32_2 + value64_2
         + value16_3 + value32_3 + value64_3
         + value16_4 + value32_4 + value64_4);

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

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_endian_h" >&5
printf "%s\n" "$gl_cv_header_working_endian_h" >&6; }
  else
    HAVE_ENDIAN_H=0
  fi

    if test "$gl_cv_header_endian_h_stdint_types" = yes \
     && test "$gl_cv_header_working_endian_h" = yes; then
    GL_GENERATE_ENDIAN_H=false
  else
    GL_GENERATE_ENDIAN_H=true
  fi

    if test $GL_GENERATE_ENDIAN_H; then
    if test "$gl_cv_header_working_endian_h" = yes; then
      ENDIAN_H_JUST_MISSING_STDINT=1
    else
      ENDIAN_H_JUST_MISSING_STDINT=0
    fi
  else
    ENDIAN_H_JUST_MISSING_STDINT=0
  fi




{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
printf %s "checking type of array argument to getgroups... " >&6; }
if test ${ac_cv_type_getgroups+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test "$cross_compiling" = yes
then :
  ac_cv_type_getgroups=cross
else $as_nop
  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 (void)
{
  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 $as_nop
  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 $as_nop
  ac_cv_type_getgroups=int
fi
rm -rf conftest*

fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5
printf "%s\n" "$ac_cv_type_getgroups" >&6; }

printf "%s\n" "#define GETGROUPS_T $ac_cv_type_getgroups" >>confdefs.h


ac_fn_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_getdelim" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_GETDELIM $ac_have_decl" >>confdefs.h


ac_fn_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_getdtablesize" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_GETDTABLESIZE $ac_have_decl" >>confdefs.h


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc is ptrdiff_t safe" >&5
printf %s "checking whether malloc is ptrdiff_t safe... " >&6; }
if test ${gl_cv_malloc_ptrdiff+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdint.h>

int
main (void)
{
/* 64-bit ptrdiff_t is so wide that no practical platform
               can exceed it.  */
            #define WIDE_PTRDIFF (PTRDIFF_MAX >> 31 >> 31 != 0)

            /* On rare machines where size_t fits in ptrdiff_t there
               is no problem.  */
            #define NARROW_SIZE (SIZE_MAX <= PTRDIFF_MAX)

            /* glibc 2.30 and later malloc refuses to exceed ptrdiff_t
               bounds even on 32-bit platforms.  We don't know which
               non-glibc systems are safe.  */
            #define KNOWN_SAFE (2 < __GLIBC__ + (30 <= __GLIBC_MINOR__))

            #if WIDE_PTRDIFF || NARROW_SIZE || KNOWN_SAFE
              return 0;
            #else
              #error "malloc might not be ptrdiff_t safe"
              syntax error
            #endif

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

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_malloc_ptrdiff" >&5
printf "%s\n" "$gl_cv_malloc_ptrdiff" >&6; }




  test "$gl_cv_malloc_ptrdiff" = yes || REPLACE_MALLOC_FOR_MALLOC_POSIX=1



  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc set errno on failure" >&5
printf %s "checking whether malloc, realloc, calloc set errno on failure... " >&6; }
if test ${gl_cv_func_malloc_posix+y}
then :
  printf %s "(cached) " >&6
else $as_nop

                                    case "$host_os" in
        mingw* | windows*)
          gl_cv_func_malloc_posix=no ;;
        irix* | solaris*)

          gl_cv_func_malloc_posix=no ;;
        *)
          gl_cv_func_malloc_posix=yes ;;
      esac

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
printf "%s\n" "$gl_cv_func_malloc_posix" >&6; }





  if test "$gl_cv_func_malloc_posix" = yes; then

printf "%s\n" "#define HAVE_MALLOC_POSIX 1" >>confdefs.h

  else
    REPLACE_MALLOC_FOR_MALLOC_POSIX=1
  fi


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
printf %s "checking for O_CLOEXEC... " >&6; }
if test ${gl_cv_macro_O_CLOEXEC+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <fcntl.h>
                          #ifndef O_CLOEXEC
                            choke me;
                          #endif

int
main (void)
{
return O_CLOEXEC;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_macro_O_CLOEXEC=yes
else $as_nop
  gl_cv_macro_O_CLOEXEC=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
printf "%s\n" "$gl_cv_macro_O_CLOEXEC" >&6; }



  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
printf %s "checking for promoted mode_t type... " >&6; }
if test ${gl_cv_promoted_mode_t+y}
then :
  printf %s "(cached) " >&6
else $as_nop

                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
int
main (void)
{
typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_promoted_mode_t='int'
else $as_nop
  gl_cv_promoted_mode_t='mode_t'
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
printf "%s\n" "$gl_cv_promoted_mode_t" >&6; }

printf "%s\n" "#define PROMOTED_MODE_T $gl_cv_promoted_mode_t" >>confdefs.h





  if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
    REPLACE_REALLOC_FOR_REALLOC_POSIX=1
  fi


     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
printf %s "checking whether the utimes function works... " >&6; }
if test ${gl_cv_func_working_utimes+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test "$cross_compiling" = yes
then :
  case "$host_os" in
                             # Guess yes on musl systems.
          *-musl*)           gl_cv_func_working_utimes="guessing yes" ;;
                             # Guess no on native Windows.
          mingw* | windows*) gl_cv_func_working_utimes="guessing no" ;;
          *)                 gl_cv_func_working_utimes="$gl_cross_guess_normal" ;;
        esac

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

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/time.h>
#include <time.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <utime.h>
#include <errno.h>


$gl_mda_defines


static int
inorder (time_t a, time_t b, time_t c)
{
  return a <= b && b <= c;
}

int
main ()
{
  int result = 0;
  char const *file = "conftest.utimes";
  /* On OS/2, file timestamps must be on or after 1980 in local time,
     with an even number of seconds.  */
  static struct timeval timeval[2] = {{315620000 + 10, 10},
                                      {315620000 + 1000000, 999998}};

  /* Test whether utimes() essentially works.  */
  {
    struct stat sbuf;
    FILE *f = fopen (file, "w");
    if (f == NULL)
      result |= 1;
    else if (fclose (f) != 0)
      result |= 1;
    else if (utimes (file, timeval) != 0)
      result |= 2;
    else if (lstat (file, &sbuf) != 0)
      result |= 1;
    else if (!(sbuf.st_atime == timeval[0].tv_sec
               && sbuf.st_mtime == timeval[1].tv_sec))
      result |= 4;
    if (unlink (file) != 0)
      result |= 1;
  }

  /* Test whether utimes() with a NULL argument sets the file's timestamp
     to the current time.  Use 'fstat' as well as 'time' to
     determine the "current" time, to accommodate NFS file systems
     if there is a time skew between the host and the NFS server.  */
  {
    int fd = open (file, O_WRONLY|O_CREAT, 0644);
    if (fd < 0)
      result |= 1;
    else
      {
        time_t t0, t2;
        struct stat st0, st1, st2;
        if (time (&t0) == (time_t) -1)
          result |= 1;
        else if (fstat (fd, &st0) != 0)
          result |= 1;
        else if (utimes (file, timeval) != 0
                 && (errno != EACCES
                     /* OS/2 kLIBC utimes fails on opened files.  */
                     || close (fd) != 0
                     || utimes (file, timeval) != 0
                     || (fd = open (file, O_WRONLY)) < 0))
          result |= 2;
        else if (utimes (file, NULL) != 0
                 && (errno != EACCES
                     /* OS/2 kLIBC utimes fails on opened files.  */
                     || close (fd) != 0
                     || utimes (file, NULL) != 0
                     || (fd = open (file, O_WRONLY)) < 0))
          result |= 8;
        else if (fstat (fd, &st1) != 0)
          result |= 1;
        else if (write (fd, "\n", 1) != 1)
          result |= 1;
        else if (fstat (fd, &st2) != 0)
          result |= 1;
        else if (time (&t2) == (time_t) -1)
          result |= 1;
        else
          {
            int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
            int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
            if (! (st1.st_atime == st1.st_mtime))
              result |= 16;
            if (! (m_ok_POSIX || m_ok_NFS))
              result |= 32;
          }
        if (close (fd) != 0)
          result |= 1;
      }
    if (unlink (file) != 0)
      result |= 1;
  }

  /* Test whether utimes() with a NULL argument works on read-only files.  */
  {
    int fd = open (file, O_WRONLY|O_CREAT, 0444);
    if (fd < 0)
      result |= 1;
    else if (close (fd) != 0)
      result |= 1;
    else if (utimes (file, NULL) != 0)
      result |= 64;
    if (unlink (file) != 0)
      result |= 1;
  }

  return result;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  gl_cv_func_working_utimes=yes
else $as_nop
  gl_cv_func_working_utimes=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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
printf "%s\n" "$gl_cv_func_working_utimes" >&6; }

  case "$gl_cv_func_working_utimes" in
    *yes)

printf "%s\n" "#define HAVE_WORKING_UTIMES 1" >>confdefs.h

      ;;
  esac



  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler option to allow warnings" >&5
printf %s "checking for C compiler option to allow warnings... " >&6; }
if test ${gl_cv_cc_wallow+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  rm -f conftest*
     echo 'int dummy;' > conftest.c
     { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c 2>conftest1.err'
  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; } >/dev/null
     { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -Wno-error -c conftest.c 2>conftest2.err'
  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; } >/dev/null
                         if test $? = 0 && test `wc -l < conftest1.err` = `wc -l < conftest2.err`; then
       gl_cv_cc_wallow='-Wno-error'
     else
       gl_cv_cc_wallow=none
     fi
     rm -f conftest*

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_wallow" >&5
printf "%s\n" "$gl_cv_cc_wallow" >&6; }
  case "$gl_cv_cc_wallow" in
    none) GL_CFLAG_ALLOW_WARNINGS='' ;;
    *)    GL_CFLAG_ALLOW_WARNINGS="$gl_cv_cc_wallow" ;;
  esac




      GL_CFLAG_GNULIB_WARNINGS=''
  if test -n "$GL_CFLAG_ALLOW_WARNINGS"; then
                                                                            cat > conftest.c <<\EOF
      #if __GNUC__ >= 3 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
      -Wno-cast-qual
      -Wno-conversion
      -Wno-float-equal
      -Wno-sign-compare
      -Wno-undef
      -Wno-unused-function
      -Wno-unused-parameter
      #endif
      #if __GNUC__ + (__GNUC_MINOR__ >= 9) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
      -Wno-float-conversion
      #endif
      #if __GNUC__ >= 7 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
      -Wimplicit-fallthrough
      #endif
      #if __GNUC__ + (__GNUC_MINOR__ >= 8) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
      -Wno-pedantic
      #endif
      #if 3 < __clang_major__ + (9 <= __clang_minor__)
      -Wno-tautological-constant-out-of-range-compare
      #endif
      #if __GNUC__ + (__GNUC_MINOR__ >= 3) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
      -Wno-sign-conversion
      -Wno-type-limits
      #endif
      #if __GNUC__ + (__GNUC_MINOR__ >= 5) > 4
      -Wno-unsuffixed-float-constants
      #endif
EOF
    gl_command="$CC $CFLAGS $CPPFLAGS -E conftest.c > conftest.out"
    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gl_command\""; } >&5
  (eval $gl_command) 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
      gl_options=`grep -v '#' conftest.out`
      for word in $gl_options; do
        GL_CFLAG_GNULIB_WARNINGS="$GL_CFLAG_GNULIB_WARNINGS $word"
      done
    fi
    rm -f conftest.c conftest.out
  fi



  false && GL_COND_LIBTOOL_CONDITION=1 || GL_COND_LIBTOOL_CONDITION=

  gl_cond_libtool=false
  gl_libdeps=
  gl_ltlibdeps=
  gl_m4_base='m4'












  gl_source_base='lib'
  gl_source_base_prefix=


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alignas and alignof" >&5
printf %s "checking for alignas and alignof... " >&6; }
if test ${gl_cv_header_working_stdalign_h+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  gl_saved_CFLAGS=$CFLAGS
     for gl_working in "yes, keywords" "yes, <stdalign.h> macros"; do
      case $gl_working in #(
  *stdalign.h*) :
    CFLAGS="$gl_saved_CFLAGS -DINCLUDE_STDALIGN_H" ;; #(
  *) :
     ;;
esac
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdint.h>
            #ifdef INCLUDE_STDALIGN_H
             #include <stdalign.h>
            #endif
            #include <stddef.h>

            /* Test that alignof yields a result consistent with offsetof.
               This catches GCC bug 52023
               <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.  */
            #ifdef __cplusplus
               template <class t> struct alignof_helper { char a; t b; };
            # define ao(type) offsetof (alignof_helper<type>, b)
            #else
            # define ao(type) offsetof (struct { char a; type b; }, b)
            #endif
            char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
            char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
            char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];

            /* Test alignas only on platforms where gnulib can help.  */
            #if \
                ((defined __cplusplus && 201103 <= __cplusplus) \
                 || (__TINYC__ && defined __attribute__) \
                 || (defined __APPLE__ && defined __MACH__ \
                     ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
                     : __GNUC__) \
                 || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
                 || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \
                 || 1300 <= _MSC_VER)
              struct alignas_test { char c; char alignas (8) alignas_8; };
              char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
                                ? 1 : -1];
            #endif

int
main (void)
{

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

      CFLAGS=$gl_saved_CFLAGS
      test "$gl_cv_header_working_stdalign_h" != no && break
     done
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
printf "%s\n" "$gl_cv_header_working_stdalign_h" >&6; }

  case $gl_cv_header_working_stdalign_h in #(
  yes*keyword*) :

printf "%s\n" "#define HAVE_C_ALIGNASOF 1" >>confdefs.h
 ;; #(
  *) :
     ;;
esac





  if test $ac_cv_func_alloca_works = no; then
    :
  fi

  # Define an additional variable used in the Makefile substitution.
  if test $ac_cv_working_alloca_h = yes; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
printf %s "checking for alloca as a compiler built-in... " >&6; }
if test ${gl_cv_rpl_alloca+y}
then :
  printf %s "(cached) " >&6
else $as_nop

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

#if defined __GNUC__ || defined _AIX || defined _MSC_VER
        Need own alloca
#endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "Need own alloca" >/dev/null 2>&1
then :
  gl_cv_rpl_alloca=yes
else $as_nop
  gl_cv_rpl_alloca=no
fi
rm -rf conftest*


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
printf "%s\n" "$gl_cv_rpl_alloca" >&6; }
    if test $gl_cv_rpl_alloca = yes; then

printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h

      GL_GENERATE_ALLOCA_H=true
    else
                  GL_GENERATE_ALLOCA_H=false
    fi
  else
    GL_GENERATE_ALLOCA_H=true
  fi

  if test $ac_cv_working_alloca_h = yes; then
    HAVE_ALLOCA_H=1
  else
    HAVE_ALLOCA_H=0
  fi






  case "$GL_GENERATE_ALLOCA_H" in
    false) ALLOCA_H='' ;;
    true)
                  if test -z "$ALLOCA_H"; then
        ALLOCA_H="${gl_source_base_prefix}alloca.h"
      fi
      ;;
    *) echo "*** GL_GENERATE_ALLOCA_H is not set correctly" 1>&2; exit 1 ;;
  esac


    $GL_GENERATE_ALLOCA_H && GL_GENERATE_ALLOCA_H_CONDITION=1 || GL_GENERATE_ALLOCA_H_CONDITION=

    if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
    GL_GENERATE_ALLOCA_H_TRUE='#'
    GL_GENERATE_ALLOCA_H_FALSE='#'
  fi







  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for static_assert" >&5
printf %s "checking for static_assert... " >&6; }
if test ${gl_cv_static_assert+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  gl_saved_CFLAGS=$CFLAGS
     for gl_working in "yes, a keyword" "yes, an <assert.h> macro"; do
      case $gl_working in #(
  *assert.h*) :
    CFLAGS="$gl_saved_CFLAGS -DINCLUDE_ASSERT_H" ;; #(
  *) :
     ;;
esac

      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#if defined __clang__ && __STDC_VERSION__ < 202311
             #pragma clang diagnostic error "-Wc2x-extensions"
             #pragma clang diagnostic error "-Wc++1z-extensions"
            #endif
            #ifdef INCLUDE_ASSERT_H
             #include <assert.h>
            #endif
            static_assert (2 + 2 == 4, "arithmetic does not work");
            static_assert (2 + 2 == 4);

int
main (void)
{

            static_assert (sizeof (char) == 1, "sizeof does not work");
            static_assert (sizeof (char) == 1);

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_static_assert=$gl_working
else $as_nop
  gl_cv_static_assert=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
      CFLAGS=$gl_saved_CFLAGS
      test "$gl_cv_static_assert" != no && break
     done
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_static_assert" >&5
printf "%s\n" "$gl_cv_static_assert" >&6; }

  GL_GENERATE_ASSERT_H=false
  case $gl_cv_static_assert in #(
  yes*keyword*) :

printf "%s\n" "#define HAVE_C_STATIC_ASSERT 1" >>confdefs.h
 ;; #(
  no) :
    GL_GENERATE_ASSERT_H=true








     if test $gl_cv_have_include_next = yes; then
       gl_cv_next_assert_h='<'assert.h'>'
     else
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <assert.h>" >&5
printf %s "checking absolute name of <assert.h>... " >&6; }
if test ${gl_cv_next_assert_h+y}
then :
  printf %s "(cached) " >&6
else $as_nop



  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <assert.h>
_ACEOF
                case "$host_os" in
    aix*) gl_absname_cpp="$ac_cpp -C" ;;
    *)    gl_absname_cpp="$ac_cpp" ;;
  esac

  case "$host_os" in
    mingw* | windows*)
                                          gl_dirsep_regex='[/\\]'
      ;;
    *)
      gl_dirsep_regex='\/'
      ;;
  esac
      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  gl_header_literal_regex=`echo 'assert.h' \
                           | sed -e "$gl_make_literal_regex_sed"`
  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
      s|^/[^/]|//&|
      p
      q
    }'

        gl_cv_absolute_assert_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
  sed -n "$gl_absolute_header_sed"`

          gl_header=$gl_cv_absolute_assert_h
          gl_cv_next_assert_h='"'$gl_header'"'


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_assert_h" >&5
printf "%s\n" "$gl_cv_next_assert_h" >&6; }
     fi
     NEXT_ASSERT_H=$gl_cv_next_assert_h

     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
       gl_next_as_first_directive='<'assert.h'>'
     else
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
       gl_next_as_first_directive=$gl_cv_next_assert_h
     fi
     NEXT_AS_FIRST_DIRECTIVE_ASSERT_H=$gl_next_as_first_directive



 ;; #(
  *) :
     ;;
esac







  case "$GL_GENERATE_ASSERT_H" in
    false) ASSERT_H='' ;;
    true)
                  if test -z "$ASSERT_H"; then
        ASSERT_H="${gl_source_base_prefix}assert.h"
      fi
      ;;
    *) echo "*** GL_GENERATE_ASSERT_H is not set correctly" 1>&2; exit 1 ;;
  esac


    $GL_GENERATE_ASSERT_H && GL_GENERATE_ASSERT_H_CONDITION=1 || GL_GENERATE_ASSERT_H_CONDITION=

    if test -z "${GL_GENERATE_ASSERT_H_TRUE}" && test -z "${GL_GENERATE_ASSERT_H_FALSE}"; then
    GL_GENERATE_ASSERT_H_TRUE='#'
    GL_GENERATE_ASSERT_H_FALSE='#'
  fi








  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
printf %s "checking for __builtin_expect... " >&6; }
if test ${gl_cv___builtin_expect+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

         int
         main (int argc, char **argv)
         {
           argc = __builtin_expect (argc, 100);
           return argv[argc != 100][0];
         }
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  gl_cv___builtin_expect=yes
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

             #include <builtins.h>
             int
             main (int argc, char **argv)
             {
               argc = __builtin_expect (argc, 100);
               return argv[argc != 100][0];
             }
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  gl_cv___builtin_expect="in <builtins.h>"
else $as_nop
  gl_cv___builtin_expect=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5
printf "%s\n" "$gl_cv___builtin_expect" >&6; }
  if test "$gl_cv___builtin_expect" = yes; then
    printf "%s\n" "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h

  elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
    printf "%s\n" "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h

  fi




  if test $ac_cv_header_byteswap_h = yes; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working bswap_16, bswap_32, bswap_64" >&5
printf %s "checking for working bswap_16, bswap_32, bswap_64... " >&6; }
if test ${gl_cv_header_working_byteswap_h+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  gl_cv_header_working_byteswap_h=no
                                   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <byteswap.h>

int
main (void)
{
int value_16 = bswap_16 (0.0);
              int value_32 = bswap_32 (0.0);
              int value_64 = bswap_64 (0.0);
              return !(value_16 + value_32 + value_64);

  ;
  return 0;
}

_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_header_working_byteswap_h=yes
else $as_nop
  gl_cv_header_working_byteswap_h=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_byteswap_h" >&5
printf "%s\n" "$gl_cv_header_working_byteswap_h" >&6; }
  fi
  if test "$gl_cv_header_working_byteswap_h" = yes; then
    GL_GENERATE_BYTESWAP_H=false
  else
    GL_GENERATE_BYTESWAP_H=true
  fi





  case "$GL_GENERATE_BYTESWAP_H" in
    false) BYTESWAP_H='' ;;
    true)
                  if test -z "$BYTESWAP_H"; then
        BYTESWAP_H="${gl_source_base_prefix}byteswap.h"
      fi
      ;;
    *) echo "*** GL_GENERATE_BYTESWAP_H is not set correctly" 1>&2; exit 1 ;;
  esac


    $GL_GENERATE_BYTESWAP_H && GL_GENERATE_BYTESWAP_H_CONDITION=1 || GL_GENERATE_BYTESWAP_H_CONDITION=

    if test -z "${GL_GENERATE_BYTESWAP_H_TRUE}" && test -z "${GL_GENERATE_BYTESWAP_H_FALSE}"; then
    GL_GENERATE_BYTESWAP_H_TRUE='#'
    GL_GENERATE_BYTESWAP_H_FALSE='#'
  fi









  if test $ac_cv_func_canonicalize_file_name = no; then
    HAVE_CANONICALIZE_FILE_NAME=0
    if test $ac_cv_func_realpath = no; then
      HAVE_REALPATH=0
    else
      case "$gl_cv_func_realpath_works" in
        *yes) ;;
        *)    REPLACE_REALPATH=1 ;;
      esac
    fi
  else
    case "$gl_cv_func_realpath_works" in
      *yes)
        ;;
      *)
        REPLACE_CANONICALIZE_FILE_NAME=1
        REPLACE_REALPATH=1
        ;;
    esac
  fi


    test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1 && GL_COND_OBJ_CANONICALIZE_LGPL_CONDITION=1 || GL_COND_OBJ_CANONICALIZE_LGPL_CONDITION=

    if test -z "${GL_COND_OBJ_CANONICALIZE_LGPL_TRUE}" && test -z "${GL_COND_OBJ_CANONICALIZE_LGPL_FALSE}"; then
    GL_COND_OBJ_CANONICALIZE_LGPL_TRUE='#'
    GL_COND_OBJ_CANONICALIZE_LGPL_FALSE='#'
  fi



printf "%s\n" "#define GNULIB_CANONICALIZE_LGPL 1" >>confdefs.h











          GL_GNULIB_CANONICALIZE_FILE_NAME=1














          GL_GNULIB_REALPATH=1








  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for readlinkat" >&5
printf %s "checking for readlinkat... " >&6; }
if test ${gl_cv_onwards_func_readlinkat+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  exec 9>&6 6>/dev/null

       case "$host_os" in

         linux*-android*)
           ac_fn_check_decl "$LINENO" "readlinkat" "ac_cv_have_decl_readlinkat" "#include <unistd.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_readlinkat" = xyes
then :

fi
           if test $ac_cv_have_decl_readlinkat = yes; then
             ac_fn_c_check_func "$LINENO" "readlinkat" "ac_cv_func_readlinkat"
if test "x$ac_cv_func_readlinkat" = xyes
then :

fi

             if test $ac_cv_func_readlinkat = yes; then
               gl_cv_onwards_func_readlinkat=yes
             else
                                                            gl_cv_onwards_func_readlinkat='future OS version'
             fi
           else
             gl_cv_onwards_func_readlinkat='future OS version'
           fi
           ;;


         *)
           ac_fn_c_check_func "$LINENO" "readlinkat" "ac_cv_func_readlinkat"
if test "x$ac_cv_func_readlinkat" = xyes
then :

fi

           gl_cv_onwards_func_readlinkat=$ac_cv_func_readlinkat
           ;;

       esac

  exec 6>&9 9>&-


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_readlinkat" >&5
printf "%s\n" "$gl_cv_onwards_func_readlinkat" >&6; }

  case "$gl_cv_onwards_func_readlinkat" in
    future*) ac_cv_func_readlinkat=no ;;
    *)       ac_cv_func_readlinkat=$gl_cv_onwards_func_readlinkat ;;
  esac
  if test $ac_cv_func_readlinkat = yes; then

printf "%s\n" "#define HAVE_READLINKAT 1" >>confdefs.h

  fi







  # On mingw, these functions are defined in the libwinpthread library,
  # which is better avoided.  In fact, the clock_gettime function is buggy
  # in 32-bit mingw, when -D__MINGW_USE_VC2005_COMPAT is used (which Gnulib's
  # year2038 module does): It leaves the upper 32 bits of the tv_sec field
  # of the result uninitialized.

  # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
  # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.

  # Save and restore LIBS so e.g., -lrt, isn't added to it.  Otherwise, *all*
  # programs in the package would end up linked with that potentially-shared
  # library, inducing unnecessary run-time overhead.
  CLOCK_TIME_LIB=

  case "$host_os" in
    mingw* | windows*)
      ac_cv_func_clock_getres=no
      ac_cv_func_clock_gettime=no
      ac_cv_func_clock_settime=no
      ;;
    *)
      gl_saved_libs=$LIBS
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
printf %s "checking for library containing clock_gettime... " >&6; }
if test ${ac_cv_search_clock_gettime+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  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.  */
char clock_gettime ();
int
main (void)
{
return clock_gettime ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' rt posix4
do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_search_clock_gettime=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext
  if test ${ac_cv_search_clock_gettime+y}
then :
  break
fi
done
if test ${ac_cv_search_clock_gettime+y}
then :

else $as_nop
  ac_cv_search_clock_gettime=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
ac_res=$ac_cv_search_clock_gettime
if test "$ac_res" != no
then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  test "$ac_cv_search_clock_gettime" = "none required" ||
                        CLOCK_TIME_LIB=$ac_cv_search_clock_gettime
fi

        ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
if test "x$ac_cv_func_clock_getres" = xyes
then :
  printf "%s\n" "#define HAVE_CLOCK_GETRES 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
if test "x$ac_cv_func_clock_gettime" = xyes
then :
  printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
if test "x$ac_cv_func_clock_settime" = xyes
then :
  printf "%s\n" "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h

fi

      LIBS=$gl_saved_libs
      ;;
  esac

  # For backward compatibility.
  LIB_CLOCK_GETTIME="$CLOCK_TIME_LIB"




printf "%s\n" "#define GNULIB_CLOSE_STREAM 1" >>confdefs.h








            case "$host_os" in
    *-gnu* | gnu*)
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for copy_file_range" >&5
printf %s "checking for copy_file_range... " >&6; }
if test ${gl_cv_func_copy_file_range+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <unistd.h>

int
main (void)
{
ssize_t (*func) (int, off_t *, int, off_t *, size_t, unsigned)
                  = copy_file_range;
                return func (0, 0, 0, 0, 0, 0) & 127;

  ;
  return 0;
}

_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  gl_cv_func_copy_file_range=yes
else $as_nop
  gl_cv_func_copy_file_range=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copy_file_range" >&5
printf "%s\n" "$gl_cv_func_copy_file_range" >&6; }
      gl_cv_onwards_func_copy_file_range="$gl_cv_func_copy_file_range"
      ;;
    *)


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for copy_file_range" >&5
printf %s "checking for copy_file_range... " >&6; }
if test ${gl_cv_onwards_func_copy_file_range+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  exec 9>&6 6>/dev/null

       case "$host_os" in

         linux*-android*)
           ac_fn_check_decl "$LINENO" "copy_file_range" "ac_cv_have_decl_copy_file_range" "#include <unistd.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_copy_file_range" = xyes
then :

fi
           if test $ac_cv_have_decl_copy_file_range = yes; then
             ac_fn_c_check_func "$LINENO" "copy_file_range" "ac_cv_func_copy_file_range"
if test "x$ac_cv_func_copy_file_range" = xyes
then :

fi

             if test $ac_cv_func_copy_file_range = yes; then
               gl_cv_onwards_func_copy_file_range=yes
             else
                                                            gl_cv_onwards_func_copy_file_range='future OS version'
             fi
           else
             gl_cv_onwards_func_copy_file_range='future OS version'
           fi
           ;;


         *)
           ac_fn_c_check_func "$LINENO" "copy_file_range" "ac_cv_func_copy_file_range"
if test "x$ac_cv_func_copy_file_range" = xyes
then :

fi

           gl_cv_onwards_func_copy_file_range=$ac_cv_func_copy_file_range
           ;;

       esac

  exec 6>&9 9>&-


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_copy_file_range" >&5
printf "%s\n" "$gl_cv_onwards_func_copy_file_range" >&6; }

  case "$gl_cv_onwards_func_copy_file_range" in
    future*) ac_cv_func_copy_file_range=no ;;
    *)       ac_cv_func_copy_file_range=$gl_cv_onwards_func_copy_file_range ;;
  esac
  if test $ac_cv_func_copy_file_range = yes; then

printf "%s\n" "#define HAVE_COPY_FILE_RANGE 1" >>confdefs.h

  fi


      gl_cv_func_copy_file_range="$ac_cv_func_copy_file_range"
      ;;
  esac
  if test "$gl_cv_func_copy_file_range" != yes; then
    HAVE_COPY_FILE_RANGE=0
    case "$gl_cv_onwards_func_copy_file_range" in
      future*) REPLACE_COPY_FILE_RANGE=1 ;;
    esac
  else

printf "%s\n" "#define HAVE_COPY_FILE_RANGE 1" >>confdefs.h


    case $host_os in
      linux*)
        # See copy-file-range.c comment re pre-5.3 Linux kernel bugs.
        # We should be able to remove this hack in 2025.
        REPLACE_COPY_FILE_RANGE=1;;
    esac
  fi


    test $HAVE_COPY_FILE_RANGE = 0 ||
                  test $REPLACE_COPY_FILE_RANGE = 1 && GL_COND_OBJ_COPY_FILE_RANGE_CONDITION=1 || GL_COND_OBJ_COPY_FILE_RANGE_CONDITION=

    if test -z "${GL_COND_OBJ_COPY_FILE_RANGE_TRUE}" && test -z "${GL_COND_OBJ_COPY_FILE_RANGE_FALSE}"; then
    GL_COND_OBJ_COPY_FILE_RANGE_TRUE='#'
    GL_COND_OBJ_COPY_FILE_RANGE_FALSE='#'
  fi










          GL_GNULIB_COPY_FILE_RANGE=1





























  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
printf %s "checking for d_type member in directory struct... " >&6; }
if test ${gl_cv_struct_dirent_d_type+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

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

int
main (void)
{
struct dirent dp; dp.d_type = 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  gl_cv_struct_dirent_d_type=yes
else $as_nop
  gl_cv_struct_dirent_d_type=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5
printf "%s\n" "$gl_cv_struct_dirent_d_type" >&6; }
   if test $gl_cv_struct_dirent_d_type = yes; then

printf "%s\n" "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h

   fi











  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
printf %s "checking whether // is distinct from /... " >&6; }
if test ${gl_cv_double_slash_root+y}
then :
  printf %s "(cached) " >&6
else $as_nop
   if test x"$cross_compiling" = xyes ; then
        # When cross-compiling, there is no way to tell whether // is special
        # short of a list of hosts.  However, the only known hosts to date
        # that have a distinct // are Apollo DomainOS (too old to port to),
        # Cygwin, and z/OS.  If anyone knows of another system for which // has
        # special semantics and is distinct from /, please report it to
        # <bug-gnulib@gnu.org>.
        case $host in
          *-cygwin | i370-ibm-openedition)
            gl_cv_double_slash_root=yes ;;
          *)
            # Be optimistic and assume that / and // are the same when we
            # don't know.
            gl_cv_double_slash_root='unknown, assuming no' ;;
        esac
      else
        set x `ls -di / // 2>/dev/null`
        if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
          gl_cv_double_slash_root=no
        else
          gl_cv_double_slash_root=yes
        fi
      fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
printf "%s\n" "$gl_cv_double_slash_root" >&6; }
  if test "$gl_cv_double_slash_root" = yes; then

printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h

  fi




  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
printf %s "checking whether dup2 works... " >&6; }
if test ${gl_cv_func_dup2_works+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test "$cross_compiling" = yes
then :
  case "$host_os" in
         mingw* | windows*) # on this platform, dup2 always returns 0 for success
           gl_cv_func_dup2_works="guessing no" ;;
         cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
           gl_cv_func_dup2_works="guessing no" ;;
         aix* | freebsd*)
                 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
                 # not EBADF.
           gl_cv_func_dup2_works="guessing no" ;;
         haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
           gl_cv_func_dup2_works="guessing no" ;;
         *-android*) # implemented using dup3(), which fails if oldfd == newfd
           gl_cv_func_dup2_works="guessing no" ;;
         os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
           gl_cv_func_dup2_works="guessing no" ;;
         *) gl_cv_func_dup2_works="guessing yes" ;;
       esac
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

       #include <errno.h>
           #include <fcntl.h>
           #include <limits.h>
           #include <sys/resource.h>
           #include <unistd.h>


$gl_mda_defines

           #ifndef RLIM_SAVED_CUR
           # define RLIM_SAVED_CUR RLIM_INFINITY
           #endif
           #ifndef RLIM_SAVED_MAX
           # define RLIM_SAVED_MAX RLIM_INFINITY
           #endif

int
main (void)
{
int result = 0;
           int bad_fd = INT_MAX;
           struct rlimit rlim;
           if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
               && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
               && rlim.rlim_cur != RLIM_INFINITY
               && rlim.rlim_cur != RLIM_SAVED_MAX
               && rlim.rlim_cur != RLIM_SAVED_CUR)
             bad_fd = rlim.rlim_cur;
           #ifdef FD_CLOEXEC
             if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
               result |= 1;
           #endif
           if (dup2 (1, 1) != 1)
             result |= 2;
           #ifdef FD_CLOEXEC
             if (fcntl (1, F_GETFD) != FD_CLOEXEC)
               result |= 4;
           #endif
           close (0);
           if (dup2 (0, 0) != -1)
             result |= 8;
           /* Many gnulib modules require POSIX conformance of EBADF.  */
           if (dup2 (2, bad_fd) == -1 && errno != EBADF)
             result |= 16;
           /* Flush out some cygwin core dumps.  */
           if (dup2 (2, -1) != -1 || errno != EBADF)
             result |= 32;
           dup2 (2, 255);
           dup2 (2, 256);
           /* On OS/2 kLIBC, dup2() does not work on a directory fd.  */
           {
             int fd = open (".", O_RDONLY);
             if (fd == -1)
               result |= 64;
             else if (dup2 (fd, fd + 1) == -1)
               result |= 128;
             close (fd);
           }
           return result;
  ;
  return 0;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  gl_cv_func_dup2_works=yes
else $as_nop
  gl_cv_func_dup2_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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
printf "%s\n" "$gl_cv_func_dup2_works" >&6; }
  case "$gl_cv_func_dup2_works" in
    *yes) ;;
    *)
      REPLACE_DUP2=1
      ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
if test "x$ac_cv_func_setdtablesize" = xyes
then :
  printf "%s\n" "#define HAVE_SETDTABLESIZE 1" >>confdefs.h

fi

      ;;
  esac



    test $REPLACE_DUP2 = 1 && GL_COND_OBJ_DUP2_CONDITION=1 || GL_COND_OBJ_DUP2_CONDITION=

    if test -z "${GL_COND_OBJ_DUP2_TRUE}" && test -z "${GL_COND_OBJ_DUP2_FALSE}"; then
    GL_COND_OBJ_DUP2_TRUE='#'
    GL_COND_OBJ_DUP2_FALSE='#'
  fi

  if test "$GL_COND_OBJ_DUP2_CONDITION"
then :



fi









          GL_GNULIB_DUP2=1















          GL_GNULIB_ENVIRON=1










  case "$GL_GENERATE_ERRNO_H" in
    false) ERRNO_H='' ;;
    true)
                  if test -z "$ERRNO_H"; then
        ERRNO_H="${gl_source_base_prefix}errno.h"
      fi
      ;;
    *) echo "*** GL_GENERATE_ERRNO_H is not set correctly" 1>&2; exit 1 ;;
  esac


    $GL_GENERATE_ERRNO_H && GL_GENERATE_ERRNO_H_CONDITION=1 || GL_GENERATE_ERRNO_H_CONDITION=

    if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
    GL_GENERATE_ERRNO_H_TRUE='#'
    GL_GENERATE_ERRNO_H_FALSE='#'
  fi









  LIB_EXECINFO=''
  GL_GENERATE_EXECINFO_H=true

  if test $ac_cv_header_execinfo_h = yes; then
    gl_saved_libs=$LIBS
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols_fd" >&5
printf %s "checking for library containing backtrace_symbols_fd... " >&6; }
if test ${ac_cv_search_backtrace_symbols_fd+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  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.  */
char backtrace_symbols_fd ();
int
main (void)
{
return backtrace_symbols_fd ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' execinfo
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_backtrace_symbols_fd=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext
  if test ${ac_cv_search_backtrace_symbols_fd+y}
then :
  break
fi
done
if test ${ac_cv_search_backtrace_symbols_fd+y}
then :

else $as_nop
  ac_cv_search_backtrace_symbols_fd=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols_fd" >&5
printf "%s\n" "$ac_cv_search_backtrace_symbols_fd" >&6; }
ac_res=$ac_cv_search_backtrace_symbols_fd
if test "$ac_res" != no
then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  test "$ac_cv_search_backtrace_symbols_fd" = "none required" ||
         LIB_EXECINFO=$ac_cv_search_backtrace_symbols_fd
fi

    LIBS=$gl_saved_libs
    if test "$ac_cv_search_backtrace_symbols_fd" != no; then
      GL_GENERATE_EXECINFO_H=false
    fi
  fi







  case "$GL_GENERATE_EXECINFO_H" in
    false) EXECINFO_H='' ;;
    true)
                  if test -z "$EXECINFO_H"; then
        EXECINFO_H="${gl_source_base_prefix}execinfo.h"
      fi
      ;;
    *) echo "*** GL_GENERATE_EXECINFO_H is not set correctly" 1>&2; exit 1 ;;
  esac


    $GL_GENERATE_EXECINFO_H && GL_GENERATE_EXECINFO_H_CONDITION=1 || GL_GENERATE_EXECINFO_H_CONDITION=

    if test -z "${GL_GENERATE_EXECINFO_H_TRUE}" && test -z "${GL_GENERATE_EXECINFO_H_FALSE}"; then
    GL_GENERATE_EXECINFO_H_TRUE='#'
    GL_GENERATE_EXECINFO_H_FALSE='#'
  fi







    $GL_GENERATE_EXECINFO_H && GL_COND_OBJ_EXECINFO_CONDITION=1 || GL_COND_OBJ_EXECINFO_CONDITION=

    if test -z "${GL_COND_OBJ_EXECINFO_TRUE}" && test -z "${GL_COND_OBJ_EXECINFO_FALSE}"; then
    GL_COND_OBJ_EXECINFO_TRUE='#'
    GL_COND_OBJ_EXECINFO_FALSE='#'
  fi










  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for faccessat" >&5
printf %s "checking for faccessat... " >&6; }
if test ${gl_cv_onwards_func_faccessat+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  exec 9>&6 6>/dev/null

       case "$host_os" in

         linux*-android*)
           ac_fn_check_decl "$LINENO" "faccessat" "ac_cv_have_decl_faccessat" "#include <unistd.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_faccessat" = xyes
then :

fi
           if test $ac_cv_have_decl_faccessat = yes; then
             ac_fn_c_check_func "$LINENO" "faccessat" "ac_cv_func_faccessat"
if test "x$ac_cv_func_faccessat" = xyes
then :

fi

             if test $ac_cv_func_faccessat = yes; then
               gl_cv_onwards_func_faccessat=yes
             else
                                                            gl_cv_onwards_func_faccessat='future OS version'
             fi
           else
             gl_cv_onwards_func_faccessat='future OS version'
           fi
           ;;


         *)
           ac_fn_c_check_func "$LINENO" "faccessat" "ac_cv_func_faccessat"
if test "x$ac_cv_func_faccessat" = xyes
then :

fi

           gl_cv_onwards_func_faccessat=$ac_cv_func_faccessat
           ;;

       esac

  exec 6>&9 9>&-


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_faccessat" >&5
printf "%s\n" "$gl_cv_onwards_func_faccessat" >&6; }

  case "$gl_cv_onwards_func_faccessat" in
    future*) ac_cv_func_faccessat=no ;;
    *)       ac_cv_func_faccessat=$gl_cv_onwards_func_faccessat ;;
  esac
  if test $ac_cv_func_faccessat = yes; then

printf "%s\n" "#define HAVE_FACCESSAT 1" >>confdefs.h

  fi


  if test $ac_cv_func_faccessat = no; then
    HAVE_FACCESSAT=0
    case "$gl_cv_onwards_func_faccessat" in
      future*) REPLACE_FACCESSAT=1 ;;
    esac
  else
    case $gl_cv_func_lstat_dereferences_slashed_symlink in
      *yes) ;;
      *)    REPLACE_FACCESSAT=1 ;;
    esac
  fi


    test $HAVE_FACCESSAT = 0 || test $REPLACE_FACCESSAT = 1 && GL_COND_OBJ_FACCESSAT_CONDITION=1 || GL_COND_OBJ_FACCESSAT_CONDITION=

    if test -z "${GL_COND_OBJ_FACCESSAT_TRUE}" && test -z "${GL_COND_OBJ_FACCESSAT_FALSE}"; then
    GL_COND_OBJ_FACCESSAT_TRUE='#'
    GL_COND_OBJ_FACCESSAT_FALSE='#'
  fi

  if test "$GL_COND_OBJ_FACCESSAT_CONDITION"
then :


  ac_fn_c_check_func "$LINENO" "access" "ac_cv_func_access"
if test "x$ac_cv_func_access" = xyes
then :
  printf "%s\n" "#define HAVE_ACCESS 1" >>confdefs.h

fi



fi


printf "%s\n" "#define GNULIB_FACCESSAT 1" >>confdefs.h











          GL_GNULIB_FACCESSAT=1









  if test $ac_cv_func_fchmodat != yes; then
    HAVE_FCHMODAT=0
  else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fchmodat works" >&5
printf %s "checking whether fchmodat works... " >&6; }
if test ${gl_cv_func_fchmodat_works+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test "$cross_compiling" = yes
then :
  case "$host_os" in
                                  # Guess no on Linux with glibc and Cygwin.
            linux-gnu* | cygwin*) gl_cv_func_fchmodat_works="guessing no" ;;
                                  # Guess 'nearly' on AIX.
            aix*)                 gl_cv_func_fchmodat_works="guessing nearly" ;;
                                  # If we don't know, obey --enable-cross-guesses.
            *)                    gl_cv_func_fchmodat_works="$gl_cross_guess_normal" ;;
          esac

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

              $ac_includes_default
              #include <fcntl.h>
              #ifndef S_IRUSR
               #define S_IRUSR 0400
              #endif
              #ifndef S_IWUSR
               #define S_IWUSR 0200
              #endif
              #ifndef S_IRWXU
               #define S_IRWXU 0700
              #endif
              #ifndef S_IRWXG
               #define S_IRWXG 0070
              #endif
              #ifndef S_IRWXO
               #define S_IRWXO 0007
              #endif


$gl_mda_defines

int
main (void)
{

              int permissive = S_IRWXU | S_IRWXG | S_IRWXO;
              int desired = S_IRUSR | S_IWUSR;
              int result = 0;
              #define file "conftest.fchmodat"
              struct stat st;
              if (creat (file, permissive) < 0)
                return 1;
              /* Test whether fchmodat rejects a trailing slash on a non-directory.
                 This test fails on AIX 7.2.  */
              if (fchmodat (AT_FDCWD, file "/", desired, 0) == 0)
                result |= 2;
              /* Test whether fchmodat+AT_SYMLINK_NOFOLLOW works on non-symlinks.
                 This test fails on GNU/Linux with glibc 2.31 (but not on
                 GNU/kFreeBSD nor GNU/Hurd) and Cygwin 2.9.  */
              if (fchmodat (AT_FDCWD, file, desired, AT_SYMLINK_NOFOLLOW) != 0)
                result |= 4;
              if (stat (file, &st) != 0)
                return 1;
              if ((st.st_mode & permissive) != desired)
                result |= 4;
              return result;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  gl_cv_func_fchmodat_works=yes
else $as_nop
  case $? in
            2) gl_cv_func_fchmodat_works='nearly' ;;
            *) gl_cv_func_fchmodat_works=no ;;
          esac

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 conftest.fchmodat
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchmodat_works" >&5
printf "%s\n" "$gl_cv_func_fchmodat_works" >&6; }
    case "$gl_cv_func_fchmodat_works" in
      *yes) ;;
      *nearly)

printf "%s\n" "#define HAVE_NEARLY_WORKING_FCHMODAT 1" >>confdefs.h

        REPLACE_FCHMODAT=1
        ;;
      *)

printf "%s\n" "#define NEED_FCHMODAT_NONSYMLINK_FIX 1" >>confdefs.h

        REPLACE_FCHMODAT=1
        ;;
    esac
  fi


    test $HAVE_FCHMODAT = 0 || test $REPLACE_FCHMODAT = 1 && GL_COND_OBJ_FCHMODAT_CONDITION=1 || GL_COND_OBJ_FCHMODAT_CONDITION=

    if test -z "${GL_COND_OBJ_FCHMODAT_TRUE}" && test -z "${GL_COND_OBJ_FCHMODAT_FALSE}"; then
    GL_COND_OBJ_FCHMODAT_TRUE='#'
    GL_COND_OBJ_FCHMODAT_FALSE='#'
  fi

  if test "$GL_COND_OBJ_FCHMODAT_CONDITION"
then :




  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for readlinkat" >&5
printf %s "checking for readlinkat... " >&6; }
if test ${gl_cv_onwards_func_readlinkat+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  exec 9>&6 6>/dev/null

       case "$host_os" in

         linux*-android*)
           ac_fn_check_decl "$LINENO" "readlinkat" "ac_cv_have_decl_readlinkat" "#include <unistd.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_readlinkat" = xyes
then :

fi
           if test $ac_cv_have_decl_readlinkat = yes; then
             ac_fn_c_check_func "$LINENO" "readlinkat" "ac_cv_func_readlinkat"
if test "x$ac_cv_func_readlinkat" = xyes
then :

fi

             if test $ac_cv_func_readlinkat = yes; then
               gl_cv_onwards_func_readlinkat=yes
             else
                                                            gl_cv_onwards_func_readlinkat='future OS version'
             fi
           else
             gl_cv_onwards_func_readlinkat='future OS version'
           fi
           ;;


         *)
           ac_fn_c_check_func "$LINENO" "readlinkat" "ac_cv_func_readlinkat"
if test "x$ac_cv_func_readlinkat" = xyes
then :

fi

           gl_cv_onwards_func_readlinkat=$ac_cv_func_readlinkat
           ;;

       esac

  exec 6>&9 9>&-


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_readlinkat" >&5
printf "%s\n" "$gl_cv_onwards_func_readlinkat" >&6; }

  case "$gl_cv_onwards_func_readlinkat" in
    future*) ac_cv_func_readlinkat=no ;;
    *)       ac_cv_func_readlinkat=$gl_cv_onwards_func_readlinkat ;;
  esac
  if test $ac_cv_func_readlinkat = yes; then

printf "%s\n" "#define HAVE_READLINKAT 1" >>confdefs.h

  fi


  :


fi









          GL_GNULIB_FCHMODAT=1










  if test $ac_cv_func_fcntl = no; then



  if test $ac_cv_func_fcntl = no; then
    HAVE_FCNTL=0
  else
    REPLACE_FCNTL=1
  fi

  else
            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
printf %s "checking whether fcntl handles F_DUPFD correctly... " >&6; }
if test ${gl_cv_func_fcntl_f_dupfd_works+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test "$cross_compiling" = yes
then :
  case $host_os in
            aix* | cygwin* | haiku*)
               gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
            *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
          esac
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <errno.h>
              #include <fcntl.h>
              #include <limits.h>
              #include <sys/resource.h>
              #include <unistd.h>


$gl_mda_defines

              #ifndef RLIM_SAVED_CUR
              # define RLIM_SAVED_CUR RLIM_INFINITY
              #endif
              #ifndef RLIM_SAVED_MAX
              # define RLIM_SAVED_MAX RLIM_INFINITY
              #endif

int
main (void)
{
int result = 0;
              int bad_fd = INT_MAX;
              struct rlimit rlim;
              if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
                  && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
                  && rlim.rlim_cur != RLIM_INFINITY
                  && rlim.rlim_cur != RLIM_SAVED_MAX
                  && rlim.rlim_cur != RLIM_SAVED_CUR)
                bad_fd = rlim.rlim_cur;
              if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
              if (errno != EINVAL) result |= 2;
              if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
              if (errno != EINVAL) result |= 8;
              /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
              {
                int fd;
                fd = open (".", O_RDONLY);
                if (fd == -1)
                  result |= 16;
                else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
                  result |= 32;

                close (fd);
              }
              return result;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  gl_cv_func_fcntl_f_dupfd_works=yes
else $as_nop
  gl_cv_func_fcntl_f_dupfd_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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
    case $gl_cv_func_fcntl_f_dupfd_works in
      *yes) ;;
      *)


  if test $ac_cv_func_fcntl = no; then
    HAVE_FCNTL=0
  else
    REPLACE_FCNTL=1
  fi


printf "%s\n" "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
 ;;
    esac

            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
printf %s "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
if test ${gl_cv_func_fcntl_f_dupfd_cloexec+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test "$cross_compiling" = yes
then :
  case "$host_os" in
                     # Guess no on NetBSD.
            netbsd*) gl_cv_func_fcntl_f_dupfd_cloexec="guessing no" ;;
            *)       gl_cv_func_fcntl_f_dupfd_cloexec="$gl_cross_guess_normal" ;;
          esac

else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <fcntl.h>
              #include <unistd.h>
              int main (int argc, char *argv[])
              {
                if (argc == 1)
                  /* parent process */
                  {
                    if (fcntl (1, F_DUPFD_CLOEXEC, 10) < 0)
                      return 1;
                    return execl ("./conftest", "./conftest", "child", NULL);
                  }
                else
                  /* child process */
                  return (fcntl (10, F_GETFL) < 0 ? 0 : 42);
              }


_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef __linux__
/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
   it to support the semantics on older kernels that failed with EINVAL.  */
choke me
#endif

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_func_fcntl_f_dupfd_cloexec=yes
else $as_nop
  gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext

else $as_nop
  gl_cv_func_fcntl_f_dupfd_cloexec=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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
    case "$gl_cv_func_fcntl_f_dupfd_cloexec" in
      *yes) ;;
      *)


  if test $ac_cv_func_fcntl = no; then
    HAVE_FCNTL=0
  else
    REPLACE_FCNTL=1
  fi

                        ;;
    esac
  fi



    test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1 && GL_COND_OBJ_FCNTL_CONDITION=1 || GL_COND_OBJ_FCNTL_CONDITION=

    if test -z "${GL_COND_OBJ_FCNTL_TRUE}" && test -z "${GL_COND_OBJ_FCNTL_FALSE}"; then
    GL_COND_OBJ_FCNTL_TRUE='#'
    GL_COND_OBJ_FCNTL_FALSE='#'
  fi










          GL_GNULIB_FCNTL=1

















    ac_fn_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
#include <dirent.h>

" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_fdopendir" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_FDOPENDIR $ac_have_decl" >>confdefs.h
if test $ac_have_decl = 1
then :

else $as_nop
  HAVE_DECL_FDOPENDIR=0
fi


  if test $ac_cv_func_fdopendir = no; then
    HAVE_FDOPENDIR=0
  else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
printf %s "checking whether fdopendir works... " >&6; }
if test ${gl_cv_func_fdopendir_works+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test "$cross_compiling" = yes
then :
  case "$host_os" in
                                # Guess yes on glibc systems.
            *-gnu*)             gl_cv_func_fdopendir_works="guessing yes" ;;
                                # Guess yes on musl systems.
            *-musl* | midipix*) gl_cv_func_fdopendir_works="guessing yes" ;;
                                # If we don't know, obey --enable-cross-guesses.
            *)                  gl_cv_func_fdopendir_works="$gl_cross_guess_normal" ;;
          esac

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

#include <dirent.h>
#include <fcntl.h>
#include <unistd.h>


$gl_mda_defines

#if !HAVE_DECL_FDOPENDIR
extern
# ifdef __cplusplus
"C"
# endif
DIR *fdopendir (int);
#endif

int
main (void)
{
int result = 0;
              int fd = open ("conftest.c", O_RDONLY);
              if (fd < 0) result |= 1;
              if (fdopendir (fd)) result |= 2;
              if (close (fd)) result |= 4;
              return result;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  gl_cv_func_fdopendir_works=yes
else $as_nop
  gl_cv_func_fdopendir_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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
printf "%s\n" "$gl_cv_func_fdopendir_works" >&6; }
    case "$gl_cv_func_fdopendir_works" in
      *yes) ;;
      *)
        REPLACE_FDOPENDIR=1
        ;;
    esac
  fi


    test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1 && GL_COND_OBJ_FDOPENDIR_CONDITION=1 || GL_COND_OBJ_FDOPENDIR_CONDITION=

    if test -z "${GL_COND_OBJ_FDOPENDIR_TRUE}" && test -z "${GL_COND_OBJ_FDOPENDIR_FALSE}"; then
    GL_COND_OBJ_FDOPENDIR_TRUE='#'
    GL_COND_OBJ_FDOPENDIR_FALSE='#'
  fi










          GL_GNULIB_FDOPENDIR=1







printf "%s\n" "#define GNULIB_FDOPENDIR 1" >>confdefs.h






  FILE_HAS_ACL_LIB=
  case $enable_acl,$ac_cv_header_linux_xattr_h,$ac_cv_func_listxattr in #(
  no,*,*) :
     ;; #(
  *,yes,yes) :
     ;; #(
  *) :
                  gl_need_lib_has_acl=1
       FILE_HAS_ACL_LIB=$LIB_ACL ;; #(
  *) :
     ;;
esac






  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
printf %s "checking for flexible array member... " >&6; }
if test ${ac_cv_c_flexmember+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdlib.h>
            #include <stdio.h>
            #include <stddef.h>
            struct m { struct m *next, **list; char name[]; };
            struct s { struct s *p; struct m *m; int n; double d[]; };
int
main (void)
{
int m = getchar ();
            size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
            nbytes += sizeof (struct s) - 1;
            nbytes -= nbytes % sizeof (struct s);
            struct s *p = malloc (nbytes);
            p->p = p;
            p->m = NULL;
            p->d[0] = 0.0;
            return p->d != (double *) NULL;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_c_flexmember=yes
else $as_nop
  ac_cv_c_flexmember=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
printf "%s\n" "$ac_cv_c_flexmember" >&6; }
  if test $ac_cv_c_flexmember = yes; then

printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h

  else
    printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h

  fi



  fp_headers='
    #include <stdio.h>
    #if HAVE_STDIO_EXT_H
    # include <stdio_ext.h>
    #endif
  '
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __fpending" >&5
printf %s "checking for __fpending... " >&6; }
if test ${gl_cv_func___fpending+y}
then :
  printf %s "(cached) " >&6
else $as_nop

      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$fp_headers
int
main (void)
{
return ! __fpending (stdin);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  gl_cv_func___fpending=yes
else $as_nop
  gl_cv_func___fpending=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func___fpending" >&5
printf "%s\n" "$gl_cv_func___fpending" >&6; }
  if test $gl_cv_func___fpending = yes; then
    ac_fn_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl___fpending" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL___FPENDING $ac_have_decl" >>confdefs.h

  fi


    test $gl_cv_func___fpending = no && GL_COND_OBJ_FPENDING_CONDITION=1 || GL_COND_OBJ_FPENDING_CONDITION=

    if test -z "${GL_COND_OBJ_FPENDING_TRUE}" && test -z "${GL_COND_OBJ_FPENDING_FALSE}"; then
    GL_COND_OBJ_FPENDING_TRUE='#'
    GL_COND_OBJ_FPENDING_FALSE='#'
  fi




                          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether free is known to preserve errno" >&5
printf %s "checking whether free is known to preserve errno... " >&6; }
if test ${gl_cv_func_free_preserves_errno+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdlib.h>

int
main (void)
{
#if 2 < __GLIBC__ + (33 <= __GLIBC_MINOR__)
            #elif defined __OpenBSD__
            #elif defined __sun
            #else
              #error "'free' is not known to preserve errno"
            #endif

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

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_free_preserves_errno" >&5
printf "%s\n" "$gl_cv_func_free_preserves_errno" >&6; }

  case $gl_cv_func_free_preserves_errno in
   *yes)

printf "%s\n" "#define HAVE_FREE_POSIX 1" >>confdefs.h

    ;;
   *) REPLACE_FREE=1 ;;
  esac


    test $REPLACE_FREE = 1 && GL_COND_OBJ_FREE_CONDITION=1 || GL_COND_OBJ_FREE_CONDITION=

    if test -z "${GL_COND_OBJ_FREE_TRUE}" && test -z "${GL_COND_OBJ_FREE_FALSE}"; then
    GL_COND_OBJ_FREE_TRUE='#'
    GL_COND_OBJ_FREE_FALSE='#'
  fi

  if test "$GL_COND_OBJ_FREE_CONDITION"
then :

    :

fi









          GL_GNULIB_FREE_POSIX=1












  if test $ac_cv_func_fstatat = no; then
    HAVE_FSTATAT=0
  else
            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
printf %s "checking whether fstatat (..., 0) works... " >&6; }
if test ${gl_cv_func_fstatat_zero_flag+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test "$cross_compiling" = yes
then :
  case "$host_os" in
            aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
            *)    gl_cv_func_fstatat_zero_flag="guessing yes";;
          esac

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

              #include <fcntl.h>
              #include <sys/stat.h>
              int
              main (void)
              {
                struct stat a;
                return fstatat (AT_FDCWD, ".", &a, 0) != 0;
              }

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  gl_cv_func_fstatat_zero_flag=yes
else $as_nop
  gl_cv_func_fstatat_zero_flag=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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
printf "%s\n" "$gl_cv_func_fstatat_zero_flag" >&6; }

    case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
    *yes+*yes) ;;
    *) REPLACE_FSTATAT=1 ;;
    esac

    case $host_os in
      darwin* | solaris*)
        REPLACE_FSTATAT=1 ;;
    esac

    case $REPLACE_FSTATAT,$gl_cv_func_fstatat_zero_flag in
      1,*yes)

printf "%s\n" "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h

         ;;
    esac
  fi


    test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1 && GL_COND_OBJ_FSTATAT_CONDITION=1 || GL_COND_OBJ_FSTATAT_CONDITION=

    if test -z "${GL_COND_OBJ_FSTATAT_TRUE}" && test -z "${GL_COND_OBJ_FSTATAT_FALSE}"; then
    GL_COND_OBJ_FSTATAT_TRUE='#'
    GL_COND_OBJ_FSTATAT_FALSE='#'
  fi










          GL_GNULIB_FSTATAT=1








  ac_fn_c_check_header_compile "$LINENO" "sys/mount.h" "ac_cv_header_sys_mount_h" "$ac_includes_default
     #if HAVE_SYS_PARAM_H
       #include <sys/param.h>
      #endif
"
if test "x$ac_cv_header_sys_mount_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_MOUNT_H 1" >>confdefs.h

fi




  ac_fsusage_space=no

  # Perform only the link test since it seems there are no variants of the
  # statvfs function.  This check is more than just AC_CHECK_FUNCS([statvfs])
  # because that got a false positive on SCO OSR5.  Adding the declaration
  # of a 'struct statvfs' causes this test to fail (as it should) on such
  # systems.  That system is reported to work fine with STAT_STATFS4 which
  # is what it gets when this test fails.
  if test $ac_fsusage_space = no; then
    # glibc/{Hurd,kFreeBSD}, FreeBSD >= 5.0, NetBSD >= 3.0,
    # OpenBSD >= 4.4, AIX, HP-UX, IRIX, Solaris, Cygwin, Interix, BeOS.
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for statvfs function (SVR4)" >&5
printf %s "checking for statvfs function (SVR4)... " >&6; }
if test ${fu_cv_sys_stat_statvfs+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <sys/types.h>
#ifdef __osf__
"Do not use Tru64's statvfs implementation"
#endif

#include <sys/statvfs.h>

struct statvfs fsd;

#if defined __APPLE__ && defined __MACH__
#include <limits.h>
/* On Mac OS X >= 10.5, f_blocks in 'struct statvfs' is a 32-bit quantity;
   that commonly limits file systems to 4 TiB.  Whereas f_blocks in
   'struct statfs' is a 64-bit type, thanks to the large-file support
   that was enabled above.  In this case, don't use statvfs(); use statfs()
   instead.  */
int check_f_blocks_size[sizeof fsd.f_blocks * CHAR_BIT <= 32 ? -1 : 1];
#endif

int
main (void)
{
statvfs (0, &fsd);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  fu_cv_sys_stat_statvfs=yes
else $as_nop
  fu_cv_sys_stat_statvfs=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_stat_statvfs" >&5
printf "%s\n" "$fu_cv_sys_stat_statvfs" >&6; }
    if test $fu_cv_sys_stat_statvfs = yes; then
      ac_fsusage_space=yes
      # AIX >= 5.2 has statvfs64 that has a wider f_blocks field than statvfs.
      # glibc, HP-UX, IRIX, Solaris have statvfs64 as well, but on these systems
      # statvfs with large-file support is already equivalent to statvfs64.
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use statvfs64" >&5
printf %s "checking whether to use statvfs64... " >&6; }
if test ${fu_cv_sys_stat_statvfs64+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
                #include <sys/statvfs.h>
                struct statvfs64 fsd;
                int check_f_blocks_larger_in_statvfs64
                  [sizeof (((struct statvfs64 *) 0)->f_blocks)
                   > sizeof (((struct statvfs *) 0)->f_blocks)
                   ? 1 : -1];

int
main (void)
{
statvfs64 (0, &fsd);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  fu_cv_sys_stat_statvfs64=yes
else $as_nop
  fu_cv_sys_stat_statvfs64=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_stat_statvfs64" >&5
printf "%s\n" "$fu_cv_sys_stat_statvfs64" >&6; }
      if test $fu_cv_sys_stat_statvfs64 = yes; then

printf "%s\n" "#define STAT_STATVFS64 1" >>confdefs.h

      else

printf "%s\n" "#define STAT_STATVFS 1" >>confdefs.h

      fi
    fi
  fi

  # Check for this unconditionally so we have a
  # good fallback on glibc/Linux > 2.6 < 2.6.36
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for two-argument statfs with statfs.f_frsize member" >&5
printf %s "checking for two-argument statfs with statfs.f_frsize member... " >&6; }
if test ${fu_cv_sys_stat_statfs2_frsize+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test "$cross_compiling" = yes
then :
  fu_cv_sys_stat_statfs2_frsize=no
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_MOUNT_H
#include <sys/mount.h>
#endif
#ifdef HAVE_SYS_VFS_H
#include <sys/vfs.h>
#endif
  int
  main ()
  {
    struct statfs fsd;
    fsd.f_frsize = 0;
    return statfs (".", &fsd) != 0;
  }
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  fu_cv_sys_stat_statfs2_frsize=yes
else $as_nop
  fu_cv_sys_stat_statfs2_frsize=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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_stat_statfs2_frsize" >&5
printf "%s\n" "$fu_cv_sys_stat_statfs2_frsize" >&6; }
  if test $fu_cv_sys_stat_statfs2_frsize = yes; then
    ac_fsusage_space=yes

printf "%s\n" "#define STAT_STATFS2_FRSIZE 1" >>confdefs.h

  fi

  if test $ac_fsusage_space = no; then
    # DEC Alpha running OSF/1
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 3-argument statfs function (DEC OSF/1)" >&5
printf %s "checking for 3-argument statfs function (DEC OSF/1)... " >&6; }
if test ${fu_cv_sys_stat_statfs3_osf1+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test "$cross_compiling" = yes
then :
  fu_cv_sys_stat_statfs3_osf1=no
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <sys/param.h>
#include <sys/types.h>
#include <sys/mount.h>
  int
  main ()
  {
    struct statfs fsd;
    fsd.f_fsize = 0;
    return statfs (".", &fsd, sizeof (struct statfs)) != 0;
  }
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  fu_cv_sys_stat_statfs3_osf1=yes
else $as_nop
  fu_cv_sys_stat_statfs3_osf1=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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_stat_statfs3_osf1" >&5
printf "%s\n" "$fu_cv_sys_stat_statfs3_osf1" >&6; }
    if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
      ac_fsusage_space=yes

printf "%s\n" "#define STAT_STATFS3_OSF1 1" >>confdefs.h

    fi
  fi

  if test $ac_fsusage_space = no; then
    # glibc/Linux, Mac OS X, FreeBSD < 5.0, NetBSD < 3.0, OpenBSD < 4.4.
    # (glibc/{Hurd,kFreeBSD}, FreeBSD >= 5.0, NetBSD >= 3.0,
    # OpenBSD >= 4.4, AIX, HP-UX, OSF/1, Cygwin already handled above.)
    # (On IRIX you need to include <sys/statfs.h>, not only <sys/mount.h> and
    # <sys/vfs.h>.)
    # (On Solaris, statfs has 4 arguments.)
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for two-argument statfs with statfs.f_bsize member (AIX, 4.3BSD)" >&5
printf %s "checking for two-argument statfs with statfs.f_bsize member (AIX, 4.3BSD)... " >&6; }
if test ${fu_cv_sys_stat_statfs2_bsize+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test "$cross_compiling" = yes
then :
  fu_cv_sys_stat_statfs2_bsize=no
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_MOUNT_H
#include <sys/mount.h>
#endif
#ifdef HAVE_SYS_VFS_H
#include <sys/vfs.h>
#endif
  int
  main ()
  {
    struct statfs fsd;
    fsd.f_bsize = 0;
    return statfs (".", &fsd) != 0;
  }
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  fu_cv_sys_stat_statfs2_bsize=yes
else $as_nop
  fu_cv_sys_stat_statfs2_bsize=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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_stat_statfs2_bsize" >&5
printf "%s\n" "$fu_cv_sys_stat_statfs2_bsize" >&6; }
    if test $fu_cv_sys_stat_statfs2_bsize = yes; then
      ac_fsusage_space=yes

printf "%s\n" "#define STAT_STATFS2_BSIZE 1" >>confdefs.h

    fi
  fi

  if test $ac_fsusage_space = no; then
    # SVR3
    # (Solaris already handled above.)
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for four-argument statfs (SVR3)" >&5
printf %s "checking for four-argument statfs (SVR3)... " >&6; }
if test ${fu_cv_sys_stat_statfs4+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test "$cross_compiling" = yes
then :
  fu_cv_sys_stat_statfs4=no
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <sys/types.h>
#include <sys/statfs.h>
  int
  main ()
  {
    struct statfs fsd;
    return statfs (".", &fsd, sizeof fsd, 0) != 0;
  }
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  fu_cv_sys_stat_statfs4=yes
else $as_nop
  fu_cv_sys_stat_statfs4=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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_stat_statfs4" >&5
printf "%s\n" "$fu_cv_sys_stat_statfs4" >&6; }
    if test $fu_cv_sys_stat_statfs4 = yes; then
      ac_fsusage_space=yes

printf "%s\n" "#define STAT_STATFS4 1" >>confdefs.h

    fi
  fi

  if test $ac_fsusage_space = no; then
    # 4.4BSD and older NetBSD
    # (OSF/1 already handled above.)
    # (On AIX, you need to include <sys/statfs.h>, not only <sys/mount.h>.)
    # (On Solaris, statfs has 4 arguments and 'struct statfs' is not declared in
    # <sys/mount.h>.)
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for two-argument statfs with statfs.f_fsize member (4.4BSD and NetBSD)" >&5
printf %s "checking for two-argument statfs with statfs.f_fsize member (4.4BSD and NetBSD)... " >&6; }
if test ${fu_cv_sys_stat_statfs2_fsize+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test "$cross_compiling" = yes
then :
  fu_cv_sys_stat_statfs2_fsize=no
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <sys/types.h>
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_MOUNT_H
#include <sys/mount.h>
#endif
  int
  main ()
  {
    struct statfs fsd;
    fsd.f_fsize = 0;
    return statfs (".", &fsd) != 0;
  }
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  fu_cv_sys_stat_statfs2_fsize=yes
else $as_nop
  fu_cv_sys_stat_statfs2_fsize=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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_stat_statfs2_fsize" >&5
printf "%s\n" "$fu_cv_sys_stat_statfs2_fsize" >&6; }
    if test $fu_cv_sys_stat_statfs2_fsize = yes; then
      ac_fsusage_space=yes

printf "%s\n" "#define STAT_STATFS2_FSIZE 1" >>confdefs.h

    fi
  fi

  if test $ac_fsusage_space = yes
then :
  gl_cv_fs_space=yes
else $as_nop
  gl_cv_fs_space=no
fi




    test $gl_cv_fs_space = yes && GL_COND_OBJ_FSUSAGE_CONDITION=1 || GL_COND_OBJ_FSUSAGE_CONDITION=

    if test -z "${GL_COND_OBJ_FSUSAGE_TRUE}" && test -z "${GL_COND_OBJ_FSUSAGE_FALSE}"; then
    GL_COND_OBJ_FSUSAGE_TRUE='#'
    GL_COND_OBJ_FSUSAGE_FALSE='#'
  fi

  if test "$GL_COND_OBJ_FSUSAGE_CONDITION"
then :


  ac_fn_c_check_header_compile "$LINENO" "sys/fs/s5param.h" "ac_cv_header_sys_fs_s5param_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_fs_s5param_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_FS_S5PARAM_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "sys/statfs.h" "ac_cv_header_sys_statfs_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_statfs_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_STATFS_H 1" >>confdefs.h

fi


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for statfs that truncates block counts" >&5
printf %s "checking for statfs that truncates block counts... " >&6; }
if test ${fu_cv_sys_truncating_statfs+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#if !defined(sun) && !defined(__sun)
choke -- this is a workaround for a Sun-specific problem
#endif
#include <sys/types.h>
#include <sys/vfs.h>

int
main (void)
{
struct statfs t; long c = *(t.f_spare);
           if (c) return 0;

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

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_truncating_statfs" >&5
printf "%s\n" "$fu_cv_sys_truncating_statfs" >&6; }
  if test $fu_cv_sys_truncating_statfs = yes; then

printf "%s\n" "#define STATFS_TRUNCATES_BLOCK_COUNTS 1" >>confdefs.h

  fi



fi



  if test $ac_cv_func_fsync = no; then
    HAVE_FSYNC=0
  fi


    test $HAVE_FSYNC = 0 && GL_COND_OBJ_FSYNC_CONDITION=1 || GL_COND_OBJ_FSYNC_CONDITION=

    if test -z "${GL_COND_OBJ_FSYNC_TRUE}" && test -z "${GL_COND_OBJ_FSYNC_FALSE}"; then
    GL_COND_OBJ_FSYNC_TRUE='#'
    GL_COND_OBJ_FSYNC_FALSE='#'
  fi

  if test "$GL_COND_OBJ_FSYNC_CONDITION"
then :

    :

fi









          GL_GNULIB_FSYNC=1










  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for futimens" >&5
printf %s "checking for futimens... " >&6; }
if test ${gl_cv_onwards_func_futimens+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  exec 9>&6 6>/dev/null

       case "$host_os" in

         linux*-android*)
           ac_fn_check_decl "$LINENO" "futimens" "ac_cv_have_decl_futimens" "#include <sys/stat.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_futimens" = xyes
then :

fi
           if test $ac_cv_have_decl_futimens = yes; then
             ac_fn_c_check_func "$LINENO" "futimens" "ac_cv_func_futimens"
if test "x$ac_cv_func_futimens" = xyes
then :

fi

             if test $ac_cv_func_futimens = yes; then
               gl_cv_onwards_func_futimens=yes
             else
                                                            gl_cv_onwards_func_futimens='future OS version'
             fi
           else
             gl_cv_onwards_func_futimens='future OS version'
           fi
           ;;


         *)
           ac_fn_c_check_func "$LINENO" "futimens" "ac_cv_func_futimens"
if test "x$ac_cv_func_futimens" = xyes
then :

fi

           gl_cv_onwards_func_futimens=$ac_cv_func_futimens
           ;;

       esac

  exec 6>&9 9>&-


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_futimens" >&5
printf "%s\n" "$gl_cv_onwards_func_futimens" >&6; }

  case "$gl_cv_onwards_func_futimens" in
    future*) ac_cv_func_futimens=no ;;
    *)       ac_cv_func_futimens=$gl_cv_onwards_func_futimens ;;
  esac
  if test $ac_cv_func_futimens = yes; then

printf "%s\n" "#define HAVE_FUTIMENS 1" >>confdefs.h

  fi


  if test $ac_cv_func_futimens = no; then
    HAVE_FUTIMENS=0
    case "$gl_cv_onwards_func_futimens" in
      future*) REPLACE_FUTIMENS=1 ;;
    esac
  else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether futimens works" >&5
printf %s "checking whether futimens works... " >&6; }
if test ${gl_cv_func_futimens_works+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test "$cross_compiling" = yes
then :
  case "$host_os" in
                           # Guess no on glibc systems.
            *-gnu* | gnu*) gl_cv_func_futimens_works="guessing no" ;;
                           # Guess no on musl systems.
            *-musl*)       gl_cv_func_futimens_works="guessing no" ;;
                           # Guess yes otherwise.
            *)             gl_cv_func_futimens_works="guessing yes" ;;
          esac

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

#include <fcntl.h>
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>


$gl_mda_defines

int
main (void)
{
struct timespec ts[2];
      int fd = creat ("conftest.file", 0600);
      struct stat st;
      if (fd < 0) return 1;
      ts[0].tv_sec = 1;
      ts[0].tv_nsec = UTIME_OMIT;
      ts[1].tv_sec = 1;
      ts[1].tv_nsec = UTIME_NOW;
      errno = 0;
      if (futimens (AT_FDCWD, NULL) == 0) return 2;
      if (errno != EBADF) return 3;
      if (futimens (fd, ts)) return 4;
      sleep (1);
      ts[0].tv_nsec = UTIME_NOW;
      ts[1].tv_nsec = UTIME_OMIT;
      if (futimens (fd, ts)) return 5;
      if (fstat (fd, &st)) return 6;
      if (st.st_ctime < st.st_atime) return 7;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  gl_cv_func_futimens_works=yes
else $as_nop
  gl_cv_func_futimens_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

      rm -f conftest.file
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimens_works" >&5
printf "%s\n" "$gl_cv_func_futimens_works" >&6; }
    case "$gl_cv_func_futimens_works" in
      *yes) ;;
      *)
        REPLACE_FUTIMENS=1
        ;;
    esac
  fi


    test $HAVE_FUTIMENS = 0 || test $REPLACE_FUTIMENS = 1 && GL_COND_OBJ_FUTIMENS_CONDITION=1 || GL_COND_OBJ_FUTIMENS_CONDITION=

    if test -z "${GL_COND_OBJ_FUTIMENS_TRUE}" && test -z "${GL_COND_OBJ_FUTIMENS_FALSE}"; then
    GL_COND_OBJ_FUTIMENS_TRUE='#'
    GL_COND_OBJ_FUTIMENS_FALSE='#'
  fi










          GL_GNULIB_FUTIMENS=1














  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getline" >&5
printf %s "checking for getline... " >&6; }
if test ${gl_cv_onwards_func_getline+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  exec 9>&6 6>/dev/null

       case "$host_os" in

         linux*-android*)
           ac_fn_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "#include <stdio.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_getline" = xyes
then :

fi
           if test $ac_cv_have_decl_getline = yes; then
             ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline"
if test "x$ac_cv_func_getline" = xyes
then :

fi

             if test $ac_cv_func_getline = yes; then
               gl_cv_onwards_func_getline=yes
             else
                                                            gl_cv_onwards_func_getline='future OS version'
             fi
           else
             gl_cv_onwards_func_getline='future OS version'
           fi
           ;;


         *)
           ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline"
if test "x$ac_cv_func_getline" = xyes
then :

fi

           gl_cv_onwards_func_getline=$ac_cv_func_getline
           ;;

       esac

  exec 6>&9 9>&-


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_getline" >&5
printf "%s\n" "$gl_cv_onwards_func_getline" >&6; }

  case "$gl_cv_onwards_func_getline" in
    future*) ac_cv_func_getline=no ;;
    *)       ac_cv_func_getline=$gl_cv_onwards_func_getline ;;
  esac
  if test $ac_cv_func_getline = yes; then

printf "%s\n" "#define HAVE_GETLINE 1" >>confdefs.h

  fi


  if test $ac_cv_func_getline = yes; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working getline function" >&5
printf %s "checking for working getline function... " >&6; }
if test ${am_cv_func_working_getline+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
       if test "$cross_compiling" = yes
then :
                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <features.h>
#ifdef __GNU_LIBRARY__
 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
  Lucky GNU user
 #endif
#endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "Lucky GNU user" >/dev/null 2>&1
then :
  am_cv_func_working_getline="guessing yes"
else $as_nop
  case "$host_os" in
               *-musl* | midipix*) am_cv_func_working_getline="guessing yes" ;;
               *)                  am_cv_func_working_getline="$gl_cross_guess_normal" ;;
             esac

fi
rm -rf conftest*


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

#    include <stdio.h>
#    include <stdlib.h>
#    include <string.h>
    int main ()
    {
      FILE *in = fopen ("./conftest.data", "r");
      if (!in)
        return 1;
      {
        /* Test result for a NULL buffer and a zero size.
           Based on a test program from Karl Heuer.  */
        char *line = NULL;
        size_t siz = 0;
        int len = getline (&line, &siz, in);
        if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
          { free (line); fclose (in); return 2; }
        free (line);
      }
      {
        /* Test result for a NULL buffer and a non-zero size.
           This crashes on FreeBSD 8.0.  */
        char *line = NULL;
        size_t siz = (size_t)(~0) / 4;
        if (getline (&line, &siz, in) == -1)
          { fclose (in); return 3; }
        free (line);
      }
      fclose (in);
      return 0;
    }

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  am_cv_func_working_getline=yes
else $as_nop
  am_cv_func_working_getline=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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_working_getline" >&5
printf "%s\n" "$am_cv_func_working_getline" >&6; }
  else
    am_cv_func_working_getline=no
    case "$gl_cv_onwards_func_getline" in
      future*) REPLACE_GETLINE=1 ;;
    esac
  fi

  if test $ac_cv_have_decl_getline = no; then
    HAVE_DECL_GETLINE=0
  fi

  case "$am_cv_func_working_getline" in
    *yes) ;;
    *)
                        REPLACE_GETLINE=1
      ;;
  esac


    test $REPLACE_GETLINE = 1 && GL_COND_OBJ_GETLINE_CONDITION=1 || GL_COND_OBJ_GETLINE_CONDITION=

    if test -z "${GL_COND_OBJ_GETLINE_TRUE}" && test -z "${GL_COND_OBJ_GETLINE_FALSE}"; then
    GL_COND_OBJ_GETLINE_TRUE='#'
    GL_COND_OBJ_GETLINE_FALSE='#'
  fi

  if test "$GL_COND_OBJ_GETLINE_CONDITION"
then :


  :


fi









          GL_GNULIB_GETLINE=1








# Persuade glibc <stdlib.h> to declare getloadavg().


gl_saved_LIBS=$LIBS

# getloadavg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0,
# NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7.
HAVE_GETLOADAVG=1


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getloadavg" >&5
printf %s "checking for getloadavg... " >&6; }
if test ${gl_cv_onwards_func_getloadavg+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  exec 9>&6 6>/dev/null

       case "$host_os" in

         linux*-android*)
           ac_fn_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#include <stdlib.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_getloadavg" = xyes
then :

fi
           if test $ac_cv_have_decl_getloadavg = yes; then
             ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
if test "x$ac_cv_func_getloadavg" = xyes
then :

fi

             if test $ac_cv_func_getloadavg = yes; then
               gl_cv_onwards_func_getloadavg=yes
             else
                                                            gl_cv_onwards_func_getloadavg='future OS version'
             fi
           else
             gl_cv_onwards_func_getloadavg='future OS version'
           fi
           ;;


         *)
           ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
if test "x$ac_cv_func_getloadavg" = xyes
then :

fi

           gl_cv_onwards_func_getloadavg=$ac_cv_func_getloadavg
           ;;

       esac

  exec 6>&9 9>&-


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_getloadavg" >&5
printf "%s\n" "$gl_cv_onwards_func_getloadavg" >&6; }

  case "$gl_cv_onwards_func_getloadavg" in
    future*) ac_cv_func_getloadavg=no ;;
    *)       ac_cv_func_getloadavg=$gl_cv_onwards_func_getloadavg ;;
  esac
  if test $ac_cv_func_getloadavg = yes; then

printf "%s\n" "#define HAVE_GETLOADAVG 1" >>confdefs.h

  fi


if test $ac_cv_func_getloadavg != yes; then
   case "$gl_cv_onwards_func_getloadavg" in
     future*) REPLACE_GETLOADAVG=1 ;;
   esac

   gl_func_getloadavg_done=no

   # Some systems with -lutil have (and need) -lkvm as well, some do not.
   # On Solaris, -lkvm requires nlist from -lelf, so check that first
   # to get the right answer into the cache.
   # For kstat on solaris, we need to test for libelf and libkvm to force the
   # definition of SVR4 below.
   if test $gl_func_getloadavg_done = no; then
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5
printf %s "checking for elf_begin in -lelf... " >&6; }
if test ${ac_cv_lib_elf_elf_begin+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lelf  $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.  */
char elf_begin ();
int
main (void)
{
return elf_begin ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_elf_elf_begin=yes
else $as_nop
  ac_cv_lib_elf_elf_begin=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5
printf "%s\n" "$ac_cv_lib_elf_elf_begin" >&6; }
if test "x$ac_cv_lib_elf_elf_begin" = xyes
then :
  LIBS="-lelf $LIBS"
fi

     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5
printf %s "checking for kvm_open in -lkvm... " >&6; }
if test ${ac_cv_lib_kvm_kvm_open+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lkvm  $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.  */
char kvm_open ();
int
main (void)
{
return kvm_open ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_kvm_kvm_open=yes
else $as_nop
  ac_cv_lib_kvm_kvm_open=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5
printf "%s\n" "$ac_cv_lib_kvm_kvm_open" >&6; }
if test "x$ac_cv_lib_kvm_kvm_open" = xyes
then :
  LIBS="-lkvm $LIBS"
fi

     # Check for the 4.4BSD definition of getloadavg.
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5
printf %s "checking for getloadavg in -lutil... " >&6; }
if test ${ac_cv_lib_util_getloadavg+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lutil  $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.  */
char getloadavg ();
int
main (void)
{
return getloadavg ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_util_getloadavg=yes
else $as_nop
  ac_cv_lib_util_getloadavg=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5
printf "%s\n" "$ac_cv_lib_util_getloadavg" >&6; }
if test "x$ac_cv_lib_util_getloadavg" = xyes
then :
  LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes
fi

   fi

   if test $gl_func_getloadavg_done = no; then
     # There is a commonly available library for RS/6000 AIX.
     # Since it is not a standard part of AIX, it might be installed locally.
     gl_getloadavg_LIBS=$LIBS
     if test $cross_compiling != yes; then
       LIBS="-L/usr/local/lib $LIBS"
     fi
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5
printf %s "checking for getloadavg in -lgetloadavg... " >&6; }
if test ${ac_cv_lib_getloadavg_getloadavg+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lgetloadavg  $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.  */
char getloadavg ();
int
main (void)
{
return getloadavg ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_getloadavg_getloadavg=yes
else $as_nop
  ac_cv_lib_getloadavg_getloadavg=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5
printf "%s\n" "$ac_cv_lib_getloadavg_getloadavg" >&6; }
if test "x$ac_cv_lib_getloadavg_getloadavg" = xyes
then :
  LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes
else $as_nop
  LIBS=$gl_getloadavg_LIBS
fi

   fi

   # Set up the replacement function if necessary.
   if test $gl_func_getloadavg_done = no; then
     HAVE_GETLOADAVG=0

     # Solaris has libkstat which does not require root.
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
printf %s "checking for kstat_open in -lkstat... " >&6; }
if test ${ac_cv_lib_kstat_kstat_open+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lkstat  $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.  */
char kstat_open ();
int
main (void)
{
return kstat_open ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_kstat_kstat_open=yes
else $as_nop
  ac_cv_lib_kstat_kstat_open=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5
printf "%s\n" "$ac_cv_lib_kstat_kstat_open" >&6; }
if test "x$ac_cv_lib_kstat_kstat_open" = xyes
then :
  printf "%s\n" "#define HAVE_LIBKSTAT 1" >>confdefs.h

  LIBS="-lkstat $LIBS"

fi

     test $ac_cv_lib_kstat_kstat_open = yes && gl_func_getloadavg_done=yes

     # AIX has libperfstat which does not require root
     if test $gl_func_getloadavg_done = no; then
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5
printf %s "checking for perfstat_cpu_total in -lperfstat... " >&6; }
if test ${ac_cv_lib_perfstat_perfstat_cpu_total+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lperfstat  $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.  */
char perfstat_cpu_total ();
int
main (void)
{
return perfstat_cpu_total ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_perfstat_perfstat_cpu_total=yes
else $as_nop
  ac_cv_lib_perfstat_perfstat_cpu_total=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5
printf "%s\n" "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; }
if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = xyes
then :
  printf "%s\n" "#define HAVE_LIBPERFSTAT 1" >>confdefs.h

  LIBS="-lperfstat $LIBS"

fi

       test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_func_getloadavg_done=yes
     fi

     if test $gl_func_getloadavg_done = no; then
       ac_fn_c_check_header_compile "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_dg_sys_info_h" = xyes
then :
  gl_func_getloadavg_done=yes

printf "%s\n" "#define DGUX 1" >>confdefs.h

          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5
printf %s "checking for dg_sys_info in -ldgc... " >&6; }
if test ${ac_cv_lib_dgc_dg_sys_info+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldgc  $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.  */
char dg_sys_info ();
int
main (void)
{
return dg_sys_info ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_dgc_dg_sys_info=yes
else $as_nop
  ac_cv_lib_dgc_dg_sys_info=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5
printf "%s\n" "$ac_cv_lib_dgc_dg_sys_info" >&6; }
if test "x$ac_cv_lib_dgc_dg_sys_info" = xyes
then :
  printf "%s\n" "#define HAVE_LIBDGC 1" >>confdefs.h

  LIBS="-ldgc $LIBS"

fi

fi

     fi
   fi
fi

if test "x$gl_saved_LIBS" = x; then
  GETLOADAVG_LIBS=$LIBS
else
  GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_saved_LIBS!!"`
fi
LIBS=$gl_saved_LIBS


# Test whether the system declares getloadavg. Solaris has the function
# but declares it in <sys/loadavg.h>, not <stdlib.h>.
ac_fn_c_check_header_compile "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_loadavg_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_LOADAVG_H 1" >>confdefs.h

fi

if test $ac_cv_header_sys_loadavg_h = yes; then
  HAVE_SYS_LOADAVG_H=1
else
  HAVE_SYS_LOADAVG_H=0
fi
ac_fn_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H
    /* OpenIndiana has a bug: <sys/time.h> must be included before
       <sys/loadavg.h>.  */
    # include <sys/time.h>
    # include <sys/loadavg.h>
    #endif
    #include <stdlib.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_getloadavg" = xyes
then :

else $as_nop
  HAVE_DECL_GETLOADAVG=0
fi


    test $HAVE_GETLOADAVG = 0 || test $REPLACE_GETLOADAVG = 1 && GL_COND_OBJ_GETLOADAVG_CONDITION=1 || GL_COND_OBJ_GETLOADAVG_CONDITION=

    if test -z "${GL_COND_OBJ_GETLOADAVG_TRUE}" && test -z "${GL_COND_OBJ_GETLOADAVG_FALSE}"; then
    GL_COND_OBJ_GETLOADAVG_TRUE='#'
    GL_COND_OBJ_GETLOADAVG_FALSE='#'
  fi

  if test "$GL_COND_OBJ_GETLOADAVG_CONDITION"
then :


# Figure out what our getloadavg.c needs.



# On HPUX9, an unprivileged user can get load averages this way.
if test $gl_func_getloadavg_done = no; then

  for ac_func in pstat_getdynamic
do :
  ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
if test "x$ac_cv_func_pstat_getdynamic" = xyes
then :
  printf "%s\n" "#define HAVE_PSTAT_GETDYNAMIC 1" >>confdefs.h
 gl_func_getloadavg_done=yes
fi

done
fi

# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
# uses stabs), but it is still SVR4.  We cannot check for <elf.h> because
# Irix 4.0.5F has the header but not the library.
if test $gl_func_getloadavg_done = no && test "$ac_cv_lib_elf_elf_begin" = yes \
    && test "$ac_cv_lib_kvm_kvm_open" = yes; then
  gl_func_getloadavg_done=yes

printf "%s\n" "#define SVR4 1" >>confdefs.h

fi

if test $gl_func_getloadavg_done = no; then
  ac_fn_c_check_header_compile "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default"
if test "x$ac_cv_header_inq_stats_cpustats_h" = xyes
then :
  gl_func_getloadavg_done=yes

printf "%s\n" "#define UMAX 1" >>confdefs.h


printf "%s\n" "#define UMAX4_3 1" >>confdefs.h

fi

fi

if test $gl_func_getloadavg_done = no; then
  ac_fn_c_check_header_compile "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_cpustats_h" = xyes
then :
  gl_func_getloadavg_done=yes; printf "%s\n" "#define UMAX 1" >>confdefs.h

fi

fi

if test $gl_func_getloadavg_done = no; then
  ac_fn_c_check_header_compile "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
if test "x$ac_cv_header_mach_mach_h" = xyes
then :
  printf "%s\n" "#define HAVE_MACH_MACH_H 1" >>confdefs.h

fi

fi

       for ac_header in nlist.h
do :
  ac_fn_c_check_header_compile "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
if test "x$ac_cv_header_nlist_h" = xyes
then :
  printf "%s\n" "#define HAVE_NLIST_H 1" >>confdefs.h
 ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h>
"
if test "x$ac_cv_member_struct_nlist_n_un_n_name" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1" >>confdefs.h


fi

 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <nlist.h>
int
main (void)
{
struct nlist x;
                    #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
                    x.n_un.n_name = "";
                    #else
                    x.n_name = "";
                    #endif
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :

printf "%s\n" "#define N_NAME_POINTER 1" >>confdefs.h

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

fi

done

fi









          GL_GNULIB_GETLOADAVG=1














    REPLACE_GETOPT=0
    if test -n "$gl_replace_getopt"; then
      REPLACE_GETOPT=1
    fi

  GL_GENERATE_GETOPT_H=false
  GL_GENERATE_GETOPT_CDEFS_H=false
  if test $REPLACE_GETOPT = 1; then



printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h

  GL_GENERATE_GETOPT_H=true
  GL_GENERATE_GETOPT_CDEFS_H=true

  fi





  case "$GL_GENERATE_GETOPT_H" in
    false) GETOPT_H='' ;;
    true)
                  if test -z "$GETOPT_H"; then
        GETOPT_H="${gl_source_base_prefix}getopt.h"
      fi
      ;;
    *) echo "*** GL_GENERATE_GETOPT_H is not set correctly" 1>&2; exit 1 ;;
  esac


    $GL_GENERATE_GETOPT_H && GL_GENERATE_GETOPT_H_CONDITION=1 || GL_GENERATE_GETOPT_H_CONDITION=

    if test -z "${GL_GENERATE_GETOPT_H_TRUE}" && test -z "${GL_GENERATE_GETOPT_H_FALSE}"; then
    GL_GENERATE_GETOPT_H_TRUE='#'
    GL_GENERATE_GETOPT_H_FALSE='#'
  fi









  case "$GL_GENERATE_GETOPT_CDEFS_H" in
    false) GETOPT_CDEFS_H='' ;;
    true)
                  if test -z "$GETOPT_CDEFS_H"; then
        GETOPT_CDEFS_H="${gl_source_base_prefix}getopt-cdefs.h"
      fi
      ;;
    *) echo "*** GL_GENERATE_GETOPT_CDEFS_H is not set correctly" 1>&2; exit 1 ;;
  esac


    $GL_GENERATE_GETOPT_CDEFS_H && GL_GENERATE_GETOPT_CDEFS_H_CONDITION=1 || GL_GENERATE_GETOPT_CDEFS_H_CONDITION=

    if test -z "${GL_GENERATE_GETOPT_CDEFS_H_TRUE}" && test -z "${GL_GENERATE_GETOPT_CDEFS_H_FALSE}"; then
    GL_GENERATE_GETOPT_CDEFS_H_TRUE='#'
    GL_GENERATE_GETOPT_CDEFS_H_FALSE='#'
  fi







    test $REPLACE_GETOPT = 1 && GL_COND_OBJ_GETOPT_CONDITION=1 || GL_COND_OBJ_GETOPT_CONDITION=

    if test -z "${GL_COND_OBJ_GETOPT_TRUE}" && test -z "${GL_COND_OBJ_GETOPT_FALSE}"; then
    GL_COND_OBJ_GETOPT_TRUE='#'
    GL_COND_OBJ_GETOPT_FALSE='#'
  fi

  if test "$GL_COND_OBJ_GETOPT_CONDITION"
then :







  GL_GNULIB_UNISTD_H_GETOPT=1



fi









          GL_GNULIB_GETOPT_POSIX=1












  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getrandom" >&5
printf %s "checking for getrandom... " >&6; }
if test ${gl_cv_onwards_func_getrandom+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  exec 9>&6 6>/dev/null

       case "$host_os" in

         linux*-android*)
           ac_fn_check_decl "$LINENO" "getrandom" "ac_cv_have_decl_getrandom" "/* Additional includes are needed before <sys/random.h> on uClibc
         and Mac OS X.  */
      #include <sys/types.h>
      #include <stdlib.h>
      #include <sys/random.h>

" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_getrandom" = xyes
then :

fi
           if test $ac_cv_have_decl_getrandom = yes; then
             ac_fn_c_check_func "$LINENO" "getrandom" "ac_cv_func_getrandom"
if test "x$ac_cv_func_getrandom" = xyes
then :

fi

             if test $ac_cv_func_getrandom = yes; then
               gl_cv_onwards_func_getrandom=yes
             else
                                                            gl_cv_onwards_func_getrandom='future OS version'
             fi
           else
             gl_cv_onwards_func_getrandom='future OS version'
           fi
           ;;


         *)
           ac_fn_c_check_func "$LINENO" "getrandom" "ac_cv_func_getrandom"
if test "x$ac_cv_func_getrandom" = xyes
then :

fi

           gl_cv_onwards_func_getrandom=$ac_cv_func_getrandom
           ;;

       esac

  exec 6>&9 9>&-


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_getrandom" >&5
printf "%s\n" "$gl_cv_onwards_func_getrandom" >&6; }

  case "$gl_cv_onwards_func_getrandom" in
    future*) ac_cv_func_getrandom=no ;;
    *)       ac_cv_func_getrandom=$gl_cv_onwards_func_getrandom ;;
  esac
  if test $ac_cv_func_getrandom = yes; then

printf "%s\n" "#define HAVE_GETRANDOM 1" >>confdefs.h

  fi


  if test "$ac_cv_func_getrandom" != yes; then
    HAVE_GETRANDOM=0
    case "$gl_cv_onwards_func_getrandom" in
      future*) REPLACE_GETRANDOM=1 ;;
    esac
  else
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getrandom is compatible with its GNU+BSD signature" >&5
printf %s "checking whether getrandom is compatible with its GNU+BSD signature... " >&6; }
if test ${gl_cv_func_getrandom_ok+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
/* Additional includes are needed before <sys/random.h> on uClibc
                 and Mac OS X.  */
              #include <sys/types.h>
              #include <stdlib.h>
              #include <sys/random.h>
              ssize_t getrandom (void *, size_t, unsigned int);

int
main (void)
{

  ;
  return 0;
}

_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_func_getrandom_ok=yes
else $as_nop
  gl_cv_func_getrandom_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getrandom_ok" >&5
printf "%s\n" "$gl_cv_func_getrandom_ok" >&6; }
    if test $gl_cv_func_getrandom_ok = no; then
      REPLACE_GETRANDOM=1
    fi
  fi

  case "$host_os" in
    mingw* | windows*)
      ac_fn_c_check_header_compile "$LINENO" "bcrypt.h" "ac_cv_header_bcrypt_h" "#include <windows.h>

"
if test "x$ac_cv_header_bcrypt_h" = xyes
then :
  printf "%s\n" "#define HAVE_BCRYPT_H 1" >>confdefs.h

fi

      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the bcrypt library is guaranteed to be present" >&5
printf %s "checking whether the bcrypt library is guaranteed to be present... " >&6; }
if test ${gl_cv_lib_assume_bcrypt+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <windows.h>
int
main (void)
{
#if !(_WIN32_WINNT >= _WIN32_WINNT_WIN7)
                  cannot assume it
                #endif

  ;
  return 0;
}

_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_lib_assume_bcrypt=yes
else $as_nop
  gl_cv_lib_assume_bcrypt=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_assume_bcrypt" >&5
printf "%s\n" "$gl_cv_lib_assume_bcrypt" >&6; }
      if test $gl_cv_lib_assume_bcrypt = yes; then

printf "%s\n" "#define HAVE_LIB_BCRYPT 1" >>confdefs.h

        GETRANDOM_LIB='-lbcrypt'
      else
        GETRANDOM_LIB='-ladvapi32'
      fi
      ;;
    *)
      GETRANDOM_LIB= ;;
  esac

    LIB_GETRANDOM="$GETRANDOM_LIB"



    test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1 && GL_COND_OBJ_GETRANDOM_CONDITION=1 || GL_COND_OBJ_GETRANDOM_CONDITION=

    if test -z "${GL_COND_OBJ_GETRANDOM_TRUE}" && test -z "${GL_COND_OBJ_GETRANDOM_FALSE}"; then
    GL_COND_OBJ_GETRANDOM_TRUE='#'
    GL_COND_OBJ_GETRANDOM_FALSE='#'
  fi










          GL_GNULIB_GETRANDOM=1










  if test $gl_cv_func_timespec_get = yes; then

printf "%s\n" "#define HAVE_TIMESPEC_GET 1" >>confdefs.h

  fi








  gl_gettimeofday_timezone=void
  if test $ac_cv_func_gettimeofday != yes; then
    HAVE_GETTIMEOFDAY=0
  else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
printf %s "checking for gettimeofday with POSIX signature... " >&6; }
if test ${gl_cv_func_gettimeofday_posix_signature+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/time.h>
              struct timeval c;
              int gettimeofday (struct timeval *restrict, void *restrict);

int
main (void)
{
/* glibc uses struct timezone * rather than the POSIX void *
                 if _GNU_SOURCE is defined.  However, since the only portable
                 use of gettimeofday uses NULL as the second parameter, and
                 since the glibc definition is actually more typesafe, it is
                 not worth wrapping this to get a compliant signature.  */
              int (*f) (struct timeval *restrict, void *restrict)
                = gettimeofday;
              int x = f (&c, 0);
              return !(x | c.tv_sec | c.tv_usec);

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_func_gettimeofday_posix_signature=yes
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/time.h>
int gettimeofday (struct timeval *restrict, struct timezone *restrict);

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_func_gettimeofday_posix_signature=almost
else $as_nop
  gl_cv_func_gettimeofday_posix_signature=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
printf "%s\n" "$gl_cv_func_gettimeofday_posix_signature" >&6; }
    if test $gl_cv_func_gettimeofday_posix_signature = almost; then
      gl_gettimeofday_timezone='struct timezone'
    elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
      REPLACE_GETTIMEOFDAY=1
    fi
        if test $REPLACE_STRUCT_TIMEVAL = 1; then
      REPLACE_GETTIMEOFDAY=1
    fi
            case "$host_os" in
      mingw* | windows*) REPLACE_GETTIMEOFDAY=1 ;;
    esac
  fi

printf "%s\n" "#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone" >>confdefs.h



    test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1 && GL_COND_OBJ_GETTIMEOFDAY_CONDITION=1 || GL_COND_OBJ_GETTIMEOFDAY_CONDITION=

    if test -z "${GL_COND_OBJ_GETTIMEOFDAY_TRUE}" && test -z "${GL_COND_OBJ_GETTIMEOFDAY_FALSE}"; then
    GL_COND_OBJ_GETTIMEOFDAY_TRUE='#'
    GL_COND_OBJ_GETTIMEOFDAY_FALSE='#'
  fi

  if test "$GL_COND_OBJ_GETTIMEOFDAY_CONDITION"
then :

    :

fi









          GL_GNULIB_GETTIMEOFDAY=1








  if test $ac_cv_header_ieee754_h = yes; then
    GL_GENERATE_IEEE754_H=false
  else
    GL_GENERATE_IEEE754_H=true

printf "%s\n" "#define _GL_REPLACE_IEEE754_H 1" >>confdefs.h

  fi





  case "$GL_GENERATE_IEEE754_H" in
    false) IEEE754_H='' ;;
    true)
                  if test -z "$IEEE754_H"; then
        IEEE754_H="${gl_source_base_prefix}ieee754.h"
      fi
      ;;
    *) echo "*** GL_GENERATE_IEEE754_H is not set correctly" 1>&2; exit 1 ;;
  esac


    $GL_GENERATE_IEEE754_H && GL_GENERATE_IEEE754_H_CONDITION=1 || GL_GENERATE_IEEE754_H_CONDITION=

    if test -z "${GL_GENERATE_IEEE754_H_TRUE}" && test -z "${GL_GENERATE_IEEE754_H_FALSE}"; then
    GL_GENERATE_IEEE754_H_TRUE='#'
    GL_GENERATE_IEEE754_H_FALSE='#'
  fi















  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5
printf %s "checking whether the compiler supports the __inline keyword... " >&6; }
if test ${gl_cv_c___inline+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
typedef int foo_t;
           static __inline foo_t foo (void) { return 0; }
int
main (void)
{
return foo ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_c___inline=yes
else $as_nop
  gl_cv_c___inline=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5
printf "%s\n" "$gl_cv_c___inline" >&6; }
  if test $gl_cv_c___inline = yes; then

printf "%s\n" "#define HAVE___INLINE 1" >>confdefs.h

  fi



# Check whether --with-libgmp was given.
if test ${with_libgmp+y}
then :
  withval=$with_libgmp;
fi

  HAVE_LIBGMP=no
  LIBGMP=
  LTLIBGMP=
  if test "$with_libgmp" != no
then :
         for ac_header in gmp.h gmp/gmp.h
do :
  as_ac_Header=`printf "%s\n" "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 `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
 break
fi

done
          if test "$ac_cv_header_gmp_h" = yes ||
            test "$ac_cv_header_gmp_gmp_h" = yes
then :
  gl_saved_LIBS=$LIBS
           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing __gmpz_roinit_n" >&5
printf %s "checking for library containing __gmpz_roinit_n... " >&6; }
if test ${ac_cv_search___gmpz_roinit_n+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  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.  */
char __gmpz_roinit_n ();
int
main (void)
{
return __gmpz_roinit_n ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' gmp
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___gmpz_roinit_n=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext
  if test ${ac_cv_search___gmpz_roinit_n+y}
then :
  break
fi
done
if test ${ac_cv_search___gmpz_roinit_n+y}
then :

else $as_nop
  ac_cv_search___gmpz_roinit_n=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search___gmpz_roinit_n" >&5
printf "%s\n" "$ac_cv_search___gmpz_roinit_n" >&6; }
ac_res=$ac_cv_search___gmpz_roinit_n
if test "$ac_res" != no
then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"

fi

           LIBS=$gl_saved_LIBS
           case $ac_cv_search___gmpz_roinit_n in
             'none needed')
               HAVE_LIBGMP=yes;;
             -*)
               HAVE_LIBGMP=yes
               LIBGMP=$ac_cv_search___gmpz_roinit_n
               LTLIBGMP=$LIBGMP;;
           esac



fi
     if test "$with_libgmp,$HAVE_LIBGMP" = yes,no; then
       as_fn_error $? "GMP not found, although --with-libgmp was specified." "$LINENO" 5
     fi
fi
  if test $HAVE_LIBGMP = yes && test "$ac_cv_header_gmp_h" = yes; then
    GL_GENERATE_GMP_H=false
  else
    GL_GENERATE_GMP_H=true
  fi

    test $HAVE_LIBGMP != yes && GL_GENERATE_MINI_GMP_H_CONDITION=1 || GL_GENERATE_MINI_GMP_H_CONDITION=

    if test -z "${GL_GENERATE_MINI_GMP_H_TRUE}" && test -z "${GL_GENERATE_MINI_GMP_H_FALSE}"; then
    GL_GENERATE_MINI_GMP_H_TRUE='#'
    GL_GENERATE_MINI_GMP_H_FALSE='#'
  fi


    test $HAVE_LIBGMP = yes && test "$ac_cv_header_gmp_h" != yes && GL_GENERATE_GMP_GMP_H_CONDITION=1 || GL_GENERATE_GMP_GMP_H_CONDITION=

    if test -z "${GL_GENERATE_GMP_GMP_H_TRUE}" && test -z "${GL_GENERATE_GMP_GMP_H_FALSE}"; then
    GL_GENERATE_GMP_GMP_H_TRUE='#'
    GL_GENERATE_GMP_GMP_H_FALSE='#'
  fi






  case "$GL_GENERATE_GMP_H" in
    false) GMP_H='' ;;
    true)
                  if test -z "$GMP_H"; then
        GMP_H="${gl_source_base_prefix}gmp.h"
      fi
      ;;
    *) echo "*** GL_GENERATE_GMP_H is not set correctly" 1>&2; exit 1 ;;
  esac


    $GL_GENERATE_GMP_H && GL_GENERATE_GMP_H_CONDITION=1 || GL_GENERATE_GMP_H_CONDITION=

    if test -z "${GL_GENERATE_GMP_H_TRUE}" && test -z "${GL_GENERATE_GMP_H_FALSE}"; then
    GL_GENERATE_GMP_H_TRUE='#'
    GL_GENERATE_GMP_H_FALSE='#'
  fi







    test $HAVE_LIBGMP != yes && GL_COND_OBJ_MINI_GMP_GNULIB_CONDITION=1 || GL_COND_OBJ_MINI_GMP_GNULIB_CONDITION=

    if test -z "${GL_COND_OBJ_MINI_GMP_GNULIB_TRUE}" && test -z "${GL_COND_OBJ_MINI_GMP_GNULIB_FALSE}"; then
    GL_COND_OBJ_MINI_GMP_GNULIB_TRUE='#'
    GL_COND_OBJ_MINI_GMP_GNULIB_FALSE='#'
  fi






  case "$GL_GENERATE_LIMITS_H" in
    false) LIMITS_H='' ;;
    true)
                  if test -z "$LIMITS_H"; then
        LIMITS_H="${gl_source_base_prefix}limits.h"
      fi
      ;;
    *) echo "*** GL_GENERATE_LIMITS_H is not set correctly" 1>&2; exit 1 ;;
  esac


    $GL_GENERATE_LIMITS_H && GL_GENERATE_LIMITS_H_CONDITION=1 || GL_GENERATE_LIMITS_H_CONDITION=

    if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
    GL_GENERATE_LIMITS_H_TRUE='#'
    GL_GENERATE_LIMITS_H_FALSE='#'
  fi










  if test $ac_cv_func_lstat = yes; then

    case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
      darwin* | solaris* | *no)
        REPLACE_LSTAT=1
        ;;
    esac
  else
    HAVE_LSTAT=0
  fi


    test $REPLACE_LSTAT = 1 && GL_COND_OBJ_LSTAT_CONDITION=1 || GL_COND_OBJ_LSTAT_CONDITION=

    if test -z "${GL_COND_OBJ_LSTAT_TRUE}" && test -z "${GL_COND_OBJ_LSTAT_FALSE}"; then
    GL_COND_OBJ_LSTAT_TRUE='#'
    GL_COND_OBJ_LSTAT_FALSE='#'
  fi

  if test "$GL_COND_OBJ_LSTAT_CONDITION"
then :

    :

fi









          GL_GNULIB_LSTAT=1









  ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
if test "x$ac_cv_func_memmem" = xyes
then :
  printf "%s\n" "#define HAVE_MEMMEM 1" >>confdefs.h

fi

  if test $ac_cv_func_memmem = yes; then
    HAVE_MEMMEM=1
  else
    HAVE_MEMMEM=0
  fi

  if test $ac_cv_have_decl_memmem = no; then
    HAVE_DECL_MEMMEM=0
  else
            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
printf %s "checking whether memmem works... " >&6; }
if test ${gl_cv_func_memmem_works_always+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test "$cross_compiling" = yes
then :
                                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <string.h> /* for __GNU_LIBRARY__ */
#ifdef __GNU_LIBRARY__
 #include <features.h>
 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
                          || __GLIBC_MINOR__ > 12)) \
      || (__GLIBC__ > 2)) \
     || defined __UCLIBC__
  Lucky user
 #endif
#elif defined __CYGWIN__
 #include <cygwin/version.h>
 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
  Lucky user
 #endif
#else
  Lucky user
#endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "Lucky user" >/dev/null 2>&1
then :
  gl_cv_func_memmem_works_always="guessing yes"
else $as_nop
  gl_cv_func_memmem_works_always="$gl_cross_guess_normal"
fi
rm -rf conftest*


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

#include <string.h> /* for memmem */
#define P "_EF_BF_BD"
#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
#define NEEDLE P P P P P

int
main (void)
{

    int result = 0;
    if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
      result |= 1;
    /* Check for empty needle behavior.  */
    {
      const char *haystack = "AAA";
      if (memmem (haystack, 3, (const char *) 1, 0) != haystack)
        result |= 2;
    }
    return result;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  gl_cv_func_memmem_works_always=yes
else $as_nop
  gl_cv_func_memmem_works_always=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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
printf "%s\n" "$gl_cv_func_memmem_works_always" >&6; }
    case "$gl_cv_func_memmem_works_always" in
      *yes) ;;
      *)
        REPLACE_MEMMEM=1
        ;;
    esac
  fi
  :

  if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then








  gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"

  fi














          GL_GNULIB_MEMMEM=1













  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mempcpy" >&5
printf %s "checking for mempcpy... " >&6; }
if test ${gl_cv_onwards_func_mempcpy+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  exec 9>&6 6>/dev/null

       case "$host_os" in

         linux*-android*)
           ac_fn_check_decl "$LINENO" "mempcpy" "ac_cv_have_decl_mempcpy" "#include <string.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_mempcpy" = xyes
then :

fi
           if test $ac_cv_have_decl_mempcpy = yes; then
             ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
if test "x$ac_cv_func_mempcpy" = xyes
then :

fi

             if test $ac_cv_func_mempcpy = yes; then
               gl_cv_onwards_func_mempcpy=yes
             else
                                                            gl_cv_onwards_func_mempcpy='future OS version'
             fi
           else
             gl_cv_onwards_func_mempcpy='future OS version'
           fi
           ;;


         *)
           ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
if test "x$ac_cv_func_mempcpy" = xyes
then :

fi

           gl_cv_onwards_func_mempcpy=$ac_cv_func_mempcpy
           ;;

       esac

  exec 6>&9 9>&-


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_mempcpy" >&5
printf "%s\n" "$gl_cv_onwards_func_mempcpy" >&6; }

  case "$gl_cv_onwards_func_mempcpy" in
    future*) ac_cv_func_mempcpy=no ;;
    *)       ac_cv_func_mempcpy=$gl_cv_onwards_func_mempcpy ;;
  esac
  if test $ac_cv_func_mempcpy = yes; then

printf "%s\n" "#define HAVE_MEMPCPY 1" >>confdefs.h

  fi


  if test $ac_cv_func_mempcpy = no; then
    HAVE_MEMPCPY=0
    case "$gl_cv_onwards_func_mempcpy" in
      future*) REPLACE_MEMPCPY=1 ;;
    esac
  fi


    test $HAVE_MEMPCPY = 0 || test $REPLACE_MEMPCPY = 1 && GL_COND_OBJ_MEMPCPY_CONDITION=1 || GL_COND_OBJ_MEMPCPY_CONDITION=

    if test -z "${GL_COND_OBJ_MEMPCPY_TRUE}" && test -z "${GL_COND_OBJ_MEMPCPY_FALSE}"; then
    GL_COND_OBJ_MEMPCPY_TRUE='#'
    GL_COND_OBJ_MEMPCPY_FALSE='#'
  fi

  if test "$GL_COND_OBJ_MEMPCPY_CONDITION"
then :


  :


fi














          GL_GNULIB_MEMPCPY=1










  if test $ac_cv_have_decl_memrchr = no; then
    HAVE_DECL_MEMRCHR=0
  fi

  ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
if test "x$ac_cv_func_memrchr" = xyes
then :
  printf "%s\n" "#define HAVE_MEMRCHR 1" >>confdefs.h

fi



    test $ac_cv_func_memrchr = no && GL_COND_OBJ_MEMRCHR_CONDITION=1 || GL_COND_OBJ_MEMRCHR_CONDITION=

    if test -z "${GL_COND_OBJ_MEMRCHR_TRUE}" && test -z "${GL_COND_OBJ_MEMRCHR_FALSE}"; then
    GL_COND_OBJ_MEMRCHR_TRUE='#'
    GL_COND_OBJ_MEMRCHR_FALSE='#'
  fi

  if test "$GL_COND_OBJ_MEMRCHR_CONDITION"
then :

    :

fi














          GL_GNULIB_MEMRCHR=1











  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for memset_explicit" >&5
printf %s "checking for memset_explicit... " >&6; }
if test ${gl_cv_onwards_func_memset_explicit+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  exec 9>&6 6>/dev/null

       case "$host_os" in

         linux*-android*)
           ac_fn_check_decl "$LINENO" "memset_explicit" "ac_cv_have_decl_memset_explicit" "#include <string.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_memset_explicit" = xyes
then :

fi
           if test $ac_cv_have_decl_memset_explicit = yes; then
             ac_fn_c_check_func "$LINENO" "memset_explicit" "ac_cv_func_memset_explicit"
if test "x$ac_cv_func_memset_explicit" = xyes
then :

fi

             if test $ac_cv_func_memset_explicit = yes; then
               gl_cv_onwards_func_memset_explicit=yes
             else
                                                            gl_cv_onwards_func_memset_explicit='future OS version'
             fi
           else
             gl_cv_onwards_func_memset_explicit='future OS version'
           fi
           ;;


         *)
           ac_fn_c_check_func "$LINENO" "memset_explicit" "ac_cv_func_memset_explicit"
if test "x$ac_cv_func_memset_explicit" = xyes
then :

fi

           gl_cv_onwards_func_memset_explicit=$ac_cv_func_memset_explicit
           ;;

       esac

  exec 6>&9 9>&-


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_memset_explicit" >&5
printf "%s\n" "$gl_cv_onwards_func_memset_explicit" >&6; }

  case "$gl_cv_onwards_func_memset_explicit" in
    future*) ac_cv_func_memset_explicit=no ;;
    *)       ac_cv_func_memset_explicit=$gl_cv_onwards_func_memset_explicit ;;
  esac
  if test $ac_cv_func_memset_explicit = yes; then

printf "%s\n" "#define HAVE_MEMSET_EXPLICIT 1" >>confdefs.h

  fi


  if test $ac_cv_func_memset_explicit = no; then
    HAVE_MEMSET_EXPLICIT=0
    case "$gl_cv_onwards_func_memset_explicit" in
      future*) REPLACE_MEMSET_EXPLICIT=1 ;;
    esac
  fi


    test $HAVE_MEMSET_EXPLICIT = 0 || test $REPLACE_MEMSET_EXPLICIT = 1 && GL_COND_OBJ_MEMSET_EXPLICIT_CONDITION=1 || GL_COND_OBJ_MEMSET_EXPLICIT_CONDITION=

    if test -z "${GL_COND_OBJ_MEMSET_EXPLICIT_TRUE}" && test -z "${GL_COND_OBJ_MEMSET_EXPLICIT_FALSE}"; then
    GL_COND_OBJ_MEMSET_EXPLICIT_TRUE='#'
    GL_COND_OBJ_MEMSET_EXPLICIT_FALSE='#'
  fi

  if test "$GL_COND_OBJ_MEMSET_EXPLICIT_CONDITION"
then :


  ac_fn_c_check_func "$LINENO" "explicit_memset" "ac_cv_func_explicit_memset"
if test "x$ac_cv_func_explicit_memset" = xyes
then :
  printf "%s\n" "#define HAVE_EXPLICIT_MEMSET 1" >>confdefs.h

fi




fi














          GL_GNULIB_MEMSET_EXPLICIT=1















  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mkostemp" >&5
printf %s "checking for mkostemp... " >&6; }
if test ${gl_cv_onwards_func_mkostemp+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  exec 9>&6 6>/dev/null

       case "$host_os" in

         linux*-android*)
           ac_fn_check_decl "$LINENO" "mkostemp" "ac_cv_have_decl_mkostemp" "#include <stdlib.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_mkostemp" = xyes
then :

fi
           if test $ac_cv_have_decl_mkostemp = yes; then
             ac_fn_c_check_func "$LINENO" "mkostemp" "ac_cv_func_mkostemp"
if test "x$ac_cv_func_mkostemp" = xyes
then :

fi

             if test $ac_cv_func_mkostemp = yes; then
               gl_cv_onwards_func_mkostemp=yes
             else
                                                            gl_cv_onwards_func_mkostemp='future OS version'
             fi
           else
             gl_cv_onwards_func_mkostemp='future OS version'
           fi
           ;;


         *)
           ac_fn_c_check_func "$LINENO" "mkostemp" "ac_cv_func_mkostemp"
if test "x$ac_cv_func_mkostemp" = xyes
then :

fi

           gl_cv_onwards_func_mkostemp=$ac_cv_func_mkostemp
           ;;

       esac

  exec 6>&9 9>&-


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_mkostemp" >&5
printf "%s\n" "$gl_cv_onwards_func_mkostemp" >&6; }

  case "$gl_cv_onwards_func_mkostemp" in
    future*) ac_cv_func_mkostemp=no ;;
    *)       ac_cv_func_mkostemp=$gl_cv_onwards_func_mkostemp ;;
  esac
  if test $ac_cv_func_mkostemp = yes; then

printf "%s\n" "#define HAVE_MKOSTEMP 1" >>confdefs.h

  fi


  if test $ac_cv_func_mkostemp != yes; then
    HAVE_MKOSTEMP=0
    case "$gl_cv_onwards_func_mkostemp" in
      future*) REPLACE_MKOSTEMP=1 ;;
    esac
  fi


    test $HAVE_MKOSTEMP = 0 || test $REPLACE_MKOSTEMP = 1 && GL_COND_OBJ_MKOSTEMP_CONDITION=1 || GL_COND_OBJ_MKOSTEMP_CONDITION=

    if test -z "${GL_COND_OBJ_MKOSTEMP_TRUE}" && test -z "${GL_COND_OBJ_MKOSTEMP_FALSE}"; then
    GL_COND_OBJ_MKOSTEMP_TRUE='#'
    GL_COND_OBJ_MKOSTEMP_FALSE='#'
  fi

  if test "$GL_COND_OBJ_MKOSTEMP_CONDITION"
then :




fi


printf "%s\n" "#define GNULIB_MKOSTEMP 1" >>confdefs.h











          GL_GNULIB_MKOSTEMP=1










  if test "$gl_cv_func_working_mktime" != yes; then
    REPLACE_MKTIME=1

printf "%s\n" "#define NEED_MKTIME_WORKING 1" >>confdefs.h

  fi
  case "$host_os" in
    mingw* | windows*)
      REPLACE_MKTIME=1

printf "%s\n" "#define NEED_MKTIME_WINDOWS 1" >>confdefs.h

      ;;
  esac

  if test $REPLACE_MKTIME = 1; then








  gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"

    :
  fi









          GL_GNULIB_MKTIME=1













 gl_saved_LIBS=$LIBS

 # Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
 NANOSLEEP_LIB=

 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5
printf %s "checking for library containing nanosleep... " >&6; }
if test ${ac_cv_search_nanosleep+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  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.  */
char nanosleep ();
int
main (void)
{
return nanosleep ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' rt posix4
do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_search_nanosleep=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext
  if test ${ac_cv_search_nanosleep+y}
then :
  break
fi
done
if test ${ac_cv_search_nanosleep+y}
then :

else $as_nop
  ac_cv_search_nanosleep=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5
printf "%s\n" "$ac_cv_search_nanosleep" >&6; }
ac_res=$ac_cv_search_nanosleep
if test "$ac_res" != no
then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  test "$ac_cv_search_nanosleep" = "none required" ||
                 NANOSLEEP_LIB=$ac_cv_search_nanosleep
fi

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


   if test $APPLE_UNIVERSAL_BUILD = 1; then
     # A universal build on Apple Mac OS X platforms.
     # The test result would be 'no (mishandles large arguments)' in 64-bit
     # mode but 'yes' in 32-bit mode. But we need a configuration result that
     # is valid in both modes.
     gl_cv_func_nanosleep='no (mishandles large arguments)'
   fi

   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working nanosleep" >&5
printf %s "checking for working nanosleep... " >&6; }
if test ${gl_cv_func_nanosleep+y}
then :
  printf %s "(cached) " >&6
else $as_nop

     if test "$cross_compiling" = yes
then :
  case "$host_os" in
            # Guess it halfway works when the kernel is Linux.
          linux*)
            gl_cv_func_nanosleep='guessing no (mishandles large arguments)' ;;
            # Midipix generally emulates the Linux system calls,
            # but here it handles large arguments correctly.
          midipix*)
            gl_cv_func_nanosleep='guessing yes' ;;
            # Guess no on native Windows.
          mingw* | windows*)
            gl_cv_func_nanosleep='guessing no' ;;
            # If we don't know, obey --enable-cross-guesses.
          *)
            gl_cv_func_nanosleep="$gl_cross_guess_normal" ;;
        esac

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

          #include <errno.h>
          #include <limits.h>
          #include <signal.h>
          #include <time.h>
          #include <unistd.h>
          #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
          #define TYPE_MAXIMUM(t) \
            ((t) (! TYPE_SIGNED (t) \
                  ? (t) -1 \
                  : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))

          #if HAVE_DECL_ALARM
          static void
          check_for_SIGALRM (int sig)
          {
            if (sig != SIGALRM)
              _exit (1);
          }
          #endif

          int
          main ()
          {
            static struct timespec ts_sleep;
            static struct timespec ts_remaining;
            /* Test for major problems first.  */
            if (! nanosleep)
              return 2;
            ts_sleep.tv_sec = 0;
            ts_sleep.tv_nsec = 1;
            #if HAVE_DECL_ALARM
            {
              static struct sigaction act;
              act.sa_handler = check_for_SIGALRM;
              sigemptyset (&act.sa_mask);
              sigaction (SIGALRM, &act, NULL);
              alarm (1);
              if (nanosleep (&ts_sleep, NULL) != 0)
                return 3;
              /* Test for a minor problem: the handling of large arguments.  */
              ts_sleep.tv_sec = TYPE_MAXIMUM (time_t);
              ts_sleep.tv_nsec = 999999999;
              alarm (1);
              if (nanosleep (&ts_sleep, &ts_remaining) != -1)
                return 4;
              if (errno != EINTR)
                return 5;
              if (ts_remaining.tv_sec <= TYPE_MAXIMUM (time_t) - 10)
                return 6;
            }
            #else /* A simpler test for native Windows.  */
            if (nanosleep (&ts_sleep, &ts_remaining) < 0)
              return 3;
            /* Test for 32-bit mingw bug: negative nanosecond values do not
               cause failure.  */
            ts_sleep.tv_sec = 1;
            ts_sleep.tv_nsec = -1;
            if (nanosleep (&ts_sleep, &ts_remaining) != -1)
              return 7;
            #endif
            return 0;
          }
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  gl_cv_func_nanosleep=yes
else $as_nop
  case $? in
        4|5|6) gl_cv_func_nanosleep='no (mishandles large arguments)' ;;
        7)     gl_cv_func_nanosleep='no (mishandles negative tv_nsec)' ;;
        *)     gl_cv_func_nanosleep=no ;;
        esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nanosleep" >&5
printf "%s\n" "$gl_cv_func_nanosleep" >&6; }
   case "$gl_cv_func_nanosleep" in
     *yes) ;;
     *)
       REPLACE_NANOSLEEP=1
       case "$gl_cv_func_nanosleep" in
         *"mishandles large arguments"*)

printf "%s\n" "#define HAVE_BUG_BIG_NANOSLEEP 1" >>confdefs.h

           ;;
       esac
       ;;
   esac
 else
   HAVE_NANOSLEEP=0
 fi
 LIBS=$gl_saved_LIBS

 # For backward compatibility.
 LIB_NANOSLEEP="$NANOSLEEP_LIB"



    test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1 && GL_COND_OBJ_NANOSLEEP_CONDITION=1 || GL_COND_OBJ_NANOSLEEP_CONDITION=

    if test -z "${GL_COND_OBJ_NANOSLEEP_TRUE}" && test -z "${GL_COND_OBJ_NANOSLEEP_FALSE}"; then
    GL_COND_OBJ_NANOSLEEP_TRUE='#'
    GL_COND_OBJ_NANOSLEEP_FALSE='#'
  fi










          GL_GNULIB_NANOSLEEP=1









  ac_fn_c_check_header_compile "$LINENO" "sys/pstat.h" "ac_cv_header_sys_pstat_h" "$ac_includes_default
"
if test "x$ac_cv_header_sys_pstat_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_PSTAT_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "sys/sysmp.h" "ac_cv_header_sys_sysmp_h" "$ac_includes_default
"
if test "x$ac_cv_header_sys_sysmp_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_SYSMP_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default
"
if test "x$ac_cv_header_sys_param_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h

fi

    ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default
     #if HAVE_SYS_PARAM_H
     # include <sys/param.h>
     #endif

"
if test "x$ac_cv_header_sys_sysctl_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_SYSCTL_H 1" >>confdefs.h

fi


  ac_fn_c_check_func "$LINENO" "sched_getaffinity_np" "ac_cv_func_sched_getaffinity_np"
if test "x$ac_cv_func_sched_getaffinity_np" = xyes
then :
  printf "%s\n" "#define HAVE_SCHED_GETAFFINITY_NP 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
if test "x$ac_cv_func_pstat_getdynamic" = xyes
then :
  printf "%s\n" "#define HAVE_PSTAT_GETDYNAMIC 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "sysmp" "ac_cv_func_sysmp"
if test "x$ac_cv_func_sysmp" = xyes
then :
  printf "%s\n" "#define HAVE_SYSMP 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "sysctl" "ac_cv_func_sysctl"
if test "x$ac_cv_func_sysctl" = xyes
then :
  printf "%s\n" "#define HAVE_SYSCTL 1" >>confdefs.h

fi



  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_getaffinity" >&5
printf %s "checking for sched_getaffinity... " >&6; }
if test ${gl_cv_onwards_func_sched_getaffinity+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  exec 9>&6 6>/dev/null

       case "$host_os" in

         linux*-android*)
           ac_fn_check_decl "$LINENO" "sched_getaffinity" "ac_cv_have_decl_sched_getaffinity" "#include <sched.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_sched_getaffinity" = xyes
then :

fi
           if test $ac_cv_have_decl_sched_getaffinity = yes; then
             ac_fn_c_check_func "$LINENO" "sched_getaffinity" "ac_cv_func_sched_getaffinity"
if test "x$ac_cv_func_sched_getaffinity" = xyes
then :

fi

             if test $ac_cv_func_sched_getaffinity = yes; then
               gl_cv_onwards_func_sched_getaffinity=yes
             else
                                                            gl_cv_onwards_func_sched_getaffinity='future OS version'
             fi
           else
             gl_cv_onwards_func_sched_getaffinity='future OS version'
           fi
           ;;


         *)
           ac_fn_c_check_func "$LINENO" "sched_getaffinity" "ac_cv_func_sched_getaffinity"
if test "x$ac_cv_func_sched_getaffinity" = xyes
then :

fi

           gl_cv_onwards_func_sched_getaffinity=$ac_cv_func_sched_getaffinity
           ;;

       esac

  exec 6>&9 9>&-


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_sched_getaffinity" >&5
printf "%s\n" "$gl_cv_onwards_func_sched_getaffinity" >&6; }

  case "$gl_cv_onwards_func_sched_getaffinity" in
    future*) ac_cv_func_sched_getaffinity=no ;;
    *)       ac_cv_func_sched_getaffinity=$gl_cv_onwards_func_sched_getaffinity ;;
  esac
  if test $ac_cv_func_sched_getaffinity = yes; then

printf "%s\n" "#define HAVE_SCHED_GETAFFINITY 1" >>confdefs.h

  fi



                if test $ac_cv_func_sched_getaffinity = yes; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for glibc compatible sched_getaffinity" >&5
printf %s "checking for glibc compatible sched_getaffinity... " >&6; }
if test ${gl_cv_func_sched_getaffinity3+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <errno.h>
              #include <sched.h>
int
main (void)
{
sched_getaffinity (0, 0, (cpu_set_t *) 0);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_func_sched_getaffinity3=yes
else $as_nop
  gl_cv_func_sched_getaffinity3=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sched_getaffinity3" >&5
printf "%s\n" "$gl_cv_func_sched_getaffinity3" >&6; }
    if test $gl_cv_func_sched_getaffinity3 = yes; then

printf "%s\n" "#define HAVE_SCHED_GETAFFINITY_LIKE_GLIBC 1" >>confdefs.h

    fi
  fi





 # This defines (or not) HAVE_TZNAME and HAVE_STRUCT_TM_TM_ZONE.














  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pipe2" >&5
printf %s "checking for pipe2... " >&6; }
if test ${gl_cv_onwards_func_pipe2+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  exec 9>&6 6>/dev/null

       case "$host_os" in

         linux*-android*)
           ac_fn_check_decl "$LINENO" "pipe2" "ac_cv_have_decl_pipe2" "#include <unistd.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_pipe2" = xyes
then :

fi
           if test $ac_cv_have_decl_pipe2 = yes; then
             ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
if test "x$ac_cv_func_pipe2" = xyes
then :

fi

             if test $ac_cv_func_pipe2 = yes; then
               gl_cv_onwards_func_pipe2=yes
             else
                                                            gl_cv_onwards_func_pipe2='future OS version'
             fi
           else
             gl_cv_onwards_func_pipe2='future OS version'
           fi
           ;;


         *)
           ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
if test "x$ac_cv_func_pipe2" = xyes
then :

fi

           gl_cv_onwards_func_pipe2=$ac_cv_func_pipe2
           ;;

       esac

  exec 6>&9 9>&-


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_pipe2" >&5
printf "%s\n" "$gl_cv_onwards_func_pipe2" >&6; }

  case "$gl_cv_onwards_func_pipe2" in
    future*) ac_cv_func_pipe2=no ;;
    *)       ac_cv_func_pipe2=$gl_cv_onwards_func_pipe2 ;;
  esac
  if test $ac_cv_func_pipe2 = yes; then

printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h

  fi


  if test $ac_cv_func_pipe2 != yes; then
    HAVE_PIPE2=0
    case "$gl_cv_onwards_func_pipe2" in
      future*) REPLACE_PIPE2=1 ;;
    esac
  else
    REPLACE_PIPE2=1
  fi










          GL_GNULIB_PIPE2=1










  if test $ac_cv_func_pselect = yes; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether signature of pselect conforms to POSIX" >&5
printf %s "checking whether signature of pselect conforms to POSIX... " >&6; }
if test ${gl_cv_sig_pselect+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/select.h>

int
main (void)
{
int (*p) (int, fd_set *, fd_set *, fd_set *restrict,
                          struct timespec const *restrict,
                          sigset_t const *restrict) = pselect;
                return !p;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  gl_cv_sig_pselect=yes
else $as_nop
  gl_cv_sig_pselect=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sig_pselect" >&5
printf "%s\n" "$gl_cv_sig_pselect" >&6; }

        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pselect detects invalid fds" >&5
printf %s "checking whether pselect detects invalid fds... " >&6; }
if test ${gl_cv_func_pselect_detects_ebadf+y}
then :
  printf %s "(cached) " >&6
else $as_nop

        if test "$cross_compiling" = yes
then :

           case "$host_os" in
                             # Guess yes on Linux systems.
            linux-* | linux) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
                             # Guess yes on systems that emulate the Linux system calls.
            midipix*)        gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
                             # Guess yes on glibc systems.
            *-gnu* | gnu*)   gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
                             # If we don't know, obey --enable-cross-guesses.
            *)               gl_cv_func_pselect_detects_ebadf="$gl_cross_guess_normal" ;;
           esac

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

#include <sys/types.h>
#include <sys/time.h>
#if HAVE_SYS_SELECT_H
# include <sys/select.h>
#endif
#include <unistd.h>
#include <errno.h>


$gl_mda_defines

int
main (void)
{

  fd_set set;
  dup2(0, 16);
  FD_ZERO(&set);
  FD_SET(16, &set);
  close(16);
  struct timespec timeout;
  timeout.tv_sec = 0;
  timeout.tv_nsec = 5000;
  return pselect (17, &set, NULL, NULL, &timeout, NULL) != -1 || errno != EBADF;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  gl_cv_func_pselect_detects_ebadf=yes
else $as_nop
  gl_cv_func_pselect_detects_ebadf=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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pselect_detects_ebadf" >&5
printf "%s\n" "$gl_cv_func_pselect_detects_ebadf" >&6; }
    case $gl_cv_func_pselect_detects_ebadf in
      *yes) ;;
      *) REPLACE_PSELECT=1 ;;
    esac
  fi

  if test $ac_cv_func_pselect = no || test $gl_cv_sig_pselect = no; then
    REPLACE_PSELECT=1
  fi


    test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1 && GL_COND_OBJ_PSELECT_CONDITION=1 || GL_COND_OBJ_PSELECT_CONDITION=

    if test -z "${GL_COND_OBJ_PSELECT_TRUE}" && test -z "${GL_COND_OBJ_PSELECT_FALSE}"; then
    GL_COND_OBJ_PSELECT_TRUE='#'
    GL_COND_OBJ_PSELECT_FALSE='#'
  fi










          GL_GNULIB_PSELECT=1










      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask is a macro" >&5
printf %s "checking whether pthread_sigmask is a macro... " >&6; }
if test ${gl_cv_func_pthread_sigmask_macro+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <pthread.h>
#include <signal.h>
#ifdef pthread_sigmask
 headers_define_pthread_sigmask
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "headers_define_pthread_sigmask" >/dev/null 2>&1
then :
  gl_cv_func_pthread_sigmask_macro=yes
else $as_nop
  gl_cv_func_pthread_sigmask_macro=no
fi
rm -rf conftest*


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_macro" >&5
printf "%s\n" "$gl_cv_func_pthread_sigmask_macro" >&6; }

  PTHREAD_SIGMASK_LIB=

  if test $gl_cv_func_pthread_sigmask_macro = yes; then
        HAVE_PTHREAD_SIGMASK=0
        REPLACE_PTHREAD_SIGMASK=1
  else

                              if test $ac_cv_func_pthread_sigmask = yes; then
                        :
      else
                HAVE_PTHREAD_SIGMASK=0
                                REPLACE_PTHREAD_SIGMASK=1
      fi

  fi


    LIB_PTHREAD_SIGMASK="$PTHREAD_SIGMASK_LIB"


    if test $HAVE_PTHREAD_SIGMASK = 1; then


                if test -z "$PTHREAD_SIGMASK_LIB"; then
      case " $LIBS " in
        *' -pthread '*) ;;
        *' -lpthread '*) ;;
        *)
          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask works without -lpthread" >&5
printf %s "checking whether pthread_sigmask works without -lpthread... " >&6; }
if test ${gl_cv_func_pthread_sigmask_in_libc_works+y}
then :
  printf %s "(cached) " >&6
else $as_nop

              if test "$cross_compiling" = yes
then :

                                  case "$host_os" in
                   freebsd* | midnightbsd* | hpux* | solaris | solaris2.[2-9]*)
                     gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
                   *)
                     gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
                 esac

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

                   #include <pthread.h>
                   #include <signal.h>
                   #include <stddef.h>
                   int main ()
                   {
                     sigset_t set;
                     sigemptyset (&set);
                     return pthread_sigmask (1729, &set, NULL) != 0;
                   }
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  gl_cv_func_pthread_sigmask_in_libc_works=no
else $as_nop
  gl_cv_func_pthread_sigmask_in_libc_works=yes
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_libc_works" >&5
printf "%s\n" "$gl_cv_func_pthread_sigmask_in_libc_works" >&6; }
          case "$gl_cv_func_pthread_sigmask_in_libc_works" in
            *no)
              REPLACE_PTHREAD_SIGMASK=1

printf "%s\n" "#define PTHREAD_SIGMASK_INEFFECTIVE 1" >>confdefs.h

              ;;
          esac;;
      esac
    fi

            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask returns error numbers" >&5
printf %s "checking whether pthread_sigmask returns error numbers... " >&6; }
if test ${gl_cv_func_pthread_sigmask_return_works+y}
then :
  printf %s "(cached) " >&6
else $as_nop

        gl_saved_LIBS="$LIBS"
        LIBS="$LIBS $PTHREAD_SIGMASK_LIB"
        if test "$cross_compiling" = yes
then :
  case "$host_os" in
             cygwin*)
               gl_cv_func_pthread_sigmask_return_works="guessing no";;
             *)
               gl_cv_func_pthread_sigmask_return_works="guessing yes";;
           esac

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

#include <pthread.h>
#include <signal.h>
#include <stddef.h>
int main ()
{
  sigset_t set;
  sigemptyset (&set);
  if (pthread_sigmask (1729, &set, NULL) == -1)
    return 1;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  gl_cv_func_pthread_sigmask_return_works=yes
else $as_nop
  gl_cv_func_pthread_sigmask_return_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

        LIBS="$gl_saved_LIBS"

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_return_works" >&5
printf "%s\n" "$gl_cv_func_pthread_sigmask_return_works" >&6; }
    case "$gl_cv_func_pthread_sigmask_return_works" in
      *no)
        REPLACE_PTHREAD_SIGMASK=1

printf "%s\n" "#define PTHREAD_SIGMASK_FAILS_WITH_ERRNO 1" >>confdefs.h

        ;;
    esac

                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask unblocks signals correctly" >&5
printf %s "checking whether pthread_sigmask unblocks signals correctly... " >&6; }
if test ${gl_cv_func_pthread_sigmask_unblock_works+y}
then :
  printf %s "(cached) " >&6
else $as_nop

        case "$host_os" in
          irix*)
            gl_cv_func_pthread_sigmask_unblock_works="guessing no";;
          *)
            gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
        esac

        if test "$cross_compiling" = yes
then :
  :
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <limits.h>
#include <pthread.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>


$gl_mda_defines

static volatile int sigint_occurred;
static void
sigint_handler (int sig)
{
  sigint_occurred++;
}
int main ()
{
  sigset_t set;
  pid_t pid = getpid ();
  char command[80];
  if (LONG_MAX < pid)
    return 6;
  signal (SIGINT, sigint_handler);
  sigemptyset (&set);
  sigaddset (&set, SIGINT);
  if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0))
    return 1;
  sprintf (command, "sh -c 'sleep 1; kill -INT %ld' &", (long) pid);
  if (!(system (command) == 0))
    return 2;
  sleep (2);
  if (!(sigint_occurred == 0))
    return 3;
  if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0))
    return 4;
  if (!(sigint_occurred == 1)) /* This fails on IRIX.  */
    return 5;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  :
else $as_nop
  gl_cv_func_pthread_sigmask_unblock_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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_unblock_works" >&5
printf "%s\n" "$gl_cv_func_pthread_sigmask_unblock_works" >&6; }
    case "$gl_cv_func_pthread_sigmask_unblock_works" in
      *no)
        REPLACE_PTHREAD_SIGMASK=1

printf "%s\n" "#define PTHREAD_SIGMASK_UNBLOCK_BUG 1" >>confdefs.h

        ;;
    esac
  fi


    test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1 && GL_COND_OBJ_PTHREAD_SIGMASK_CONDITION=1 || GL_COND_OBJ_PTHREAD_SIGMASK_CONDITION=

    if test -z "${GL_COND_OBJ_PTHREAD_SIGMASK_TRUE}" && test -z "${GL_COND_OBJ_PTHREAD_SIGMASK_FALSE}"; then
    GL_COND_OBJ_PTHREAD_SIGMASK_TRUE='#'
    GL_COND_OBJ_PTHREAD_SIGMASK_FALSE='#'
  fi

  if test "$GL_COND_OBJ_PTHREAD_SIGMASK_CONDITION"
then :


  if test $HAVE_PTHREAD_SIGMASK = 1; then

printf "%s\n" "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h

  fi


fi









          GL_GNULIB_PTHREAD_SIGMASK=1






  # Check whether --enable-xattr was given.
if test ${enable_xattr+y}
then :
  enableval=$enable_xattr; use_xattr=$enableval
else $as_nop
  use_xattr=yes
fi


  LIB_XATTR=


  if test "$use_xattr" = yes; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for xattr library with ATTR_ACTION_PERMISSIONS" >&5
printf %s "checking for xattr library with ATTR_ACTION_PERMISSIONS... " >&6; }
if test ${gl_cv_xattr_lib+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  gl_cv_xattr_lib=no
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <attr/error_context.h>
              #include <attr/libattr.h>
              static int
              is_attr_permissions (const char *name, struct error_context *ctx)
              {
                return attr_copy_action (name, ctx) == ATTR_ACTION_PERMISSIONS;
              }

int
main (void)
{
return attr_copy_fd ("/", 0, "/", 0, is_attr_permissions, 0);

  ;
  return 0;
}
_ACEOF
       if ac_fn_c_try_link "$LINENO"
then :
  gl_cv_xattr_lib='none required'
else $as_nop
  xattr_saved_LIBS=$LIBS
          LIBS="-lattr $LIBS"
          if ac_fn_c_try_link "$LINENO"
then :
  gl_cv_xattr_lib=-lattr
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext
          LIBS=$xattr_saved_LIBS
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_xattr_lib" >&5
printf "%s\n" "$gl_cv_xattr_lib" >&6; }
    if test "$gl_cv_xattr_lib" = no; then
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: libattr development library was not found or not usable." >&5
printf "%s\n" "$as_me: WARNING: libattr development library was not found or not usable." >&2;}
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: GNU Emacs will be built without xattr support." >&5
printf "%s\n" "$as_me: WARNING: GNU Emacs will be built without xattr support." >&2;}
      use_xattr=no
    elif test "$gl_cv_xattr_lib" != 'none required'; then
      LIB_XATTR=$gl_cv_xattr_lib
    fi
  fi
  if test "$use_xattr" = yes; then

printf "%s\n" "#define USE_XATTR 1" >>confdefs.h

  fi


  if test "$use_xattr" = yes; then
    QCOPY_ACL_LIB="$LIB_XATTR"
  else
    QCOPY_ACL_LIB="$LIB_ACL"
  fi





  if test $ac_cv_func_readlink = no; then
    HAVE_READLINK=0
  else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
printf %s "checking whether readlink signature is correct... " >&6; }
if test ${gl_cv_decl_readlink_works+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <unistd.h>
             /* Cause compilation failure if original declaration has
                wrong type.  */
             ssize_t readlink (const char *, char *, size_t);

int
main (void)
{

  ;
  return 0;
}

_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_decl_readlink_works=yes
else $as_nop
  gl_cv_decl_readlink_works=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
printf "%s\n" "$gl_cv_decl_readlink_works" >&6; }

            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
printf %s "checking whether readlink handles trailing slash correctly... " >&6; }
if test ${gl_cv_func_readlink_trailing_slash+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  # We have readlink, so assume ln -s works.
       ln -s conftest.no-such conftest.link
       ln -s conftest.link conftest.lnk2
       if test "$cross_compiling" = yes
then :
  case "$host_os" in
            # Guess yes on Linux or glibc systems.
            linux-* | linux | *-gnu* | gnu*)
              gl_cv_func_readlink_trailing_slash="guessing yes" ;;
            # Guess yes on systems that emulate the Linux system calls.
            midipix*)
              gl_cv_func_readlink_trailing_slash="guessing yes" ;;
            # Guess no on AIX or HP-UX.
            aix* | hpux*)
              gl_cv_func_readlink_trailing_slash="guessing no" ;;
            # If we don't know, obey --enable-cross-guesses.
            *)
              gl_cv_func_readlink_trailing_slash="$gl_cross_guess_normal" ;;
          esac

else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <unistd.h>

int
main (void)
{
char buf[20];
             return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;

  ;
  return 0;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  gl_cv_func_readlink_trailing_slash=yes
else $as_nop
  gl_cv_func_readlink_trailing_slash=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 conftest.link conftest.lnk2
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_trailing_slash" >&5
printf "%s\n" "$gl_cv_func_readlink_trailing_slash" >&6; }
    case "$gl_cv_func_readlink_trailing_slash" in
      *yes)
        if test "$gl_cv_decl_readlink_works" != yes; then
          REPLACE_READLINK=1
        fi
        ;;
      *)

printf "%s\n" "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h

        REPLACE_READLINK=1
        ;;
    esac

    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink truncates results correctly" >&5
printf %s "checking whether readlink truncates results correctly... " >&6; }
if test ${gl_cv_func_readlink_truncate+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  # We have readlink, so assume ln -s works.
       ln -s ab conftest.link
       if test "$cross_compiling" = yes
then :
  case "$host_os" in
            # Guess yes on Linux or glibc systems.
            linux-* | linux | *-gnu* | gnu*)
              gl_cv_func_readlink_truncate="guessing yes" ;;
            # Guess yes on systems that emulate the Linux system calls.
            midipix*)
              gl_cv_func_readlink_truncate="guessing yes" ;;
            # Guess no on AIX or HP-UX.
            aix* | hpux*)
              gl_cv_func_readlink_truncate="guessing no" ;;
            # If we don't know, obey --enable-cross-guesses.
            *)
              gl_cv_func_readlink_truncate="$gl_cross_guess_normal" ;;
          esac

else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <unistd.h>

int
main (void)
{
char c;
             return readlink ("conftest.link", &c, 1) != 1;

  ;
  return 0;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  gl_cv_func_readlink_truncate=yes
else $as_nop
  gl_cv_func_readlink_truncate=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 conftest.link conftest.lnk2
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_truncate" >&5
printf "%s\n" "$gl_cv_func_readlink_truncate" >&6; }
    case $gl_cv_func_readlink_truncate in
      *yes)
        if test "$gl_cv_decl_readlink_works" != yes; then
          REPLACE_READLINK=1
        fi
        ;;
      *)

printf "%s\n" "#define READLINK_TRUNCATE_BUG 1" >>confdefs.h

        REPLACE_READLINK=1
        ;;
    esac

            case "$host_os" in
      cygwin*)
        REPLACE_READLINK=1
        ;;
    esac
  fi


    test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1 && GL_COND_OBJ_READLINK_CONDITION=1 || GL_COND_OBJ_READLINK_CONDITION=

    if test -z "${GL_COND_OBJ_READLINK_TRUE}" && test -z "${GL_COND_OBJ_READLINK_FALSE}"; then
    GL_COND_OBJ_READLINK_TRUE='#'
    GL_COND_OBJ_READLINK_FALSE='#'
  fi

  if test "$GL_COND_OBJ_READLINK_CONDITION"
then :


  :


fi









          GL_GNULIB_READLINK=1










  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for readlinkat" >&5
printf %s "checking for readlinkat... " >&6; }
if test ${gl_cv_onwards_func_readlinkat+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  exec 9>&6 6>/dev/null

       case "$host_os" in

         linux*-android*)
           ac_fn_check_decl "$LINENO" "readlinkat" "ac_cv_have_decl_readlinkat" "#include <unistd.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_readlinkat" = xyes
then :

fi
           if test $ac_cv_have_decl_readlinkat = yes; then
             ac_fn_c_check_func "$LINENO" "readlinkat" "ac_cv_func_readlinkat"
if test "x$ac_cv_func_readlinkat" = xyes
then :

fi

             if test $ac_cv_func_readlinkat = yes; then
               gl_cv_onwards_func_readlinkat=yes
             else
                                                            gl_cv_onwards_func_readlinkat='future OS version'
             fi
           else
             gl_cv_onwards_func_readlinkat='future OS version'
           fi
           ;;


         *)
           ac_fn_c_check_func "$LINENO" "readlinkat" "ac_cv_func_readlinkat"
if test "x$ac_cv_func_readlinkat" = xyes
then :

fi

           gl_cv_onwards_func_readlinkat=$ac_cv_func_readlinkat
           ;;

       esac

  exec 6>&9 9>&-


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_readlinkat" >&5
printf "%s\n" "$gl_cv_onwards_func_readlinkat" >&6; }

  case "$gl_cv_onwards_func_readlinkat" in
    future*) ac_cv_func_readlinkat=no ;;
    *)       ac_cv_func_readlinkat=$gl_cv_onwards_func_readlinkat ;;
  esac
  if test $ac_cv_func_readlinkat = yes; then

printf "%s\n" "#define HAVE_READLINKAT 1" >>confdefs.h

  fi



  if test $ac_cv_func_readlinkat = no; then
    HAVE_READLINKAT=0
    case "$gl_cv_onwards_func_readlinkat" in
      future*) REPLACE_READLINKAT=1 ;;
    esac
  else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlinkat signature is correct" >&5
printf %s "checking whether readlinkat signature is correct... " >&6; }
if test ${gl_cv_decl_readlinkat_works+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <unistd.h>
             /* Check whether original declaration has correct type.  */
             ssize_t readlinkat (int, char const *, char *, size_t);

int
main (void)
{

  ;
  return 0;
}

_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_decl_readlinkat_works=yes
else $as_nop
  gl_cv_decl_readlinkat_works=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlinkat_works" >&5
printf "%s\n" "$gl_cv_decl_readlinkat_works" >&6; }
    # Assume readlinkat has the same bugs as readlink,
    # as is the case on OS X 10.10 with trailing slashes.
    case $gl_cv_decl_readlinkat_works,$gl_cv_func_readlink_trailing_slash,$gl_cv_func_readlink_truncate in
      *yes,*yes,*yes)
        ;;
      *)
        REPLACE_READLINKAT=1
        ;;
    esac

            case "$host_os" in
      cygwin*)
        REPLACE_READLINKAT=1
        ;;
    esac
  fi


    test $HAVE_READLINKAT = 0 || test $REPLACE_READLINKAT = 1 && GL_COND_OBJ_READLINKAT_CONDITION=1 || GL_COND_OBJ_READLINKAT_CONDITION=

    if test -z "${GL_COND_OBJ_READLINKAT_TRUE}" && test -z "${GL_COND_OBJ_READLINKAT_FALSE}"; then
    GL_COND_OBJ_READLINKAT_TRUE='#'
    GL_COND_OBJ_READLINKAT_FALSE='#'
  fi










          GL_GNULIB_READLINKAT=1







# Check whether --with-included-regex was given.
if test ${with_included_regex+y}
then :
  withval=$with_included_regex;
fi


  case $with_included_regex in #(
  yes|no) ac_use_included_regex=$with_included_regex
        ;;
  '')
    # If the system regex support is good enough that it passes the
    # following run test, then default to *not* using the included regex.c.
    # If cross compiling, assume the test would fail and use the included
    # regex.c.


    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
printf %s "checking for working re_compile_pattern... " >&6; }
if test ${gl_cv_func_re_compile_pattern_working+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test "$cross_compiling" = yes
then :
  case "$host_os" in
                              # Guess no on native Windows.
           mingw* | windows*) gl_cv_func_re_compile_pattern_working="guessing no" ;;
                              # Otherwise obey --enable-cross-guesses.
           *)                 gl_cv_func_re_compile_pattern_working="$gl_cross_guess_normal" ;;
         esac

else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <regex.h>

            #include <locale.h>
            #include <limits.h>
            #include <string.h>

            #if defined M_CHECK_ACTION || HAVE_DECL_ALARM
            # include <signal.h>
            # include <unistd.h>
            #endif

            #if HAVE_MALLOC_H
            # include <malloc.h>
            #endif

            #ifdef M_CHECK_ACTION
            /* Exit with distinguishable exit code.  */
            static void sigabrt_no_core (int sig) { raise (SIGTERM); }
            #endif

int
main (void)
{
int result = 0;
            static struct re_pattern_buffer regex;
            unsigned char folded_chars[UCHAR_MAX + 1];
            int i;
            const char *s;
            struct re_registers regs;

            /* Some builds of glibc go into an infinite loop on this
               test.  Use alarm to force death, and mallopt to avoid
               malloc recursion in diagnosing the corrupted heap. */
#if HAVE_DECL_ALARM
            signal (SIGALRM, SIG_DFL);
            alarm (2);
#endif
#ifdef M_CHECK_ACTION
            signal (SIGABRT, sigabrt_no_core);
            mallopt (M_CHECK_ACTION, 2);
#endif

            if (setlocale (LC_ALL, "en_US.UTF-8"))
              {
                {
                  /* https://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
                     This test needs valgrind to catch the bug on Debian
                     GNU/Linux 3.1 x86, but it might catch the bug better
                     on other platforms and it shouldn't hurt to try the
                     test here.  */
                  static char const pat[] = "insert into";
                  static char const data[] =
                    "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
                  re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
                                 | RE_ICASE);
                  memset (&regex, 0, sizeof regex);
                  s = re_compile_pattern (pat, sizeof pat - 1, &regex);
                  if (s)
                    result |= 1;
                  else
                    {
                      if (re_search (&regex, data, sizeof data - 1,
                                     0, sizeof data - 1, &regs)
                          != -1)
                        result |= 1;
                      regfree (&regex);
                    }
                }

                {
                  /* This test is from glibc bug 15078.
                     The test case is from Andreas Schwab in
                     <https://sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
                     */
                  static char const pat[] = "[^x]x";
                  static char const data[] =
                    /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
                    "\xe1\x80\x80"
                    "\xe1\x80\xbb"
                    "\xe1\x80\xbd"
                    "\xe1\x80\x94"
                    "\xe1\x80\xba"
                    "\xe1\x80\xaf"
                    "\xe1\x80\x95"
                    "\xe1\x80\xba"
                    "x";
                  re_set_syntax (0);
                  memset (&regex, 0, sizeof regex);
                  s = re_compile_pattern (pat, sizeof pat - 1, &regex);
                  if (s)
                    result |= 1;
                  else
                    {
                      i = re_search (&regex, data, sizeof data - 1,
                                     0, sizeof data - 1, 0);
                      if (i != 0 && i != 21)
                        result |= 1;
                      regfree (&regex);
                    }
                }

                if (! setlocale (LC_ALL, "C"))
                  return 1;
              }

            /* This test is from glibc bug 3957, reported by Andrew Mackey.  */
            re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
            memset (&regex, 0, sizeof regex);
            s = re_compile_pattern ("a[^x]b", 6, &regex);
            if (s)
              result |= 2;
            else
              {
                /* This should fail, but succeeds for glibc-2.5.  */
                if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
                  result |= 2;
                regfree (&regex);
              }

            /* This regular expression is from Spencer ere test number 75
               in grep-2.3.  */
            re_set_syntax (RE_SYNTAX_POSIX_EGREP);
            memset (&regex, 0, sizeof regex);
            for (i = 0; i <= UCHAR_MAX; i++)
              folded_chars[i] = i;
            regex.translate = folded_chars;
            s = re_compile_pattern ("a[[:]:]]b\n", 11, &regex);
            /* This should fail with _Invalid character class name_ error.  */
            if (!s)
              {
                result |= 4;
                regfree (&regex);
              }

            /* Ensure that [b-a] is diagnosed as invalid, when
               using RE_NO_EMPTY_RANGES. */
            re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
            memset (&regex, 0, sizeof regex);
            s = re_compile_pattern ("a[b-a]", 6, &regex);
            if (s == 0)
              {
                result |= 8;
                regfree (&regex);
              }

            /* This should succeed, but does not for glibc-2.1.3.  */
            memset (&regex, 0, sizeof regex);
            s = re_compile_pattern ("{1", 2, &regex);
            if (s)
              result |= 8;
            else
              regfree (&regex);

            /* The following example is derived from a problem report
               against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>.  */
            memset (&regex, 0, sizeof regex);
            s = re_compile_pattern ("[an\371]*n", 7, &regex);
            if (s)
              result |= 8;
            else
              {
                /* This should match, but does not for glibc-2.2.1.  */
                if (re_match (&regex, "an", 2, 0, &regs) != 2)
                  result |= 8;
                else
                  {
                    free (regs.start);
                    free (regs.end);
                  }
                regfree (&regex);
              }

            memset (&regex, 0, sizeof regex);
            s = re_compile_pattern ("x", 1, &regex);
            if (s)
              result |= 8;
            else
              {
                /* glibc-2.2.93 does not work with a negative RANGE argument.  */
                if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
                  result |= 8;
                else
                  {
                    free (regs.start);
                    free (regs.end);
                  }
                regfree (&regex);
              }

            /* The version of regex.c in older versions of gnulib
               ignored RE_ICASE.  Detect that problem too.  */
            re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
            memset (&regex, 0, sizeof regex);
            s = re_compile_pattern ("x", 1, &regex);
            if (s)
              result |= 16;
            else
              {
                if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
                  result |= 16;
                else
                  {
                    free (regs.start);
                    free (regs.end);
                  }
                regfree (&regex);
              }

            /* Catch a bug reported by Vin Shelton in
               https://lists.gnu.org/r/bug-coreutils/2007-06/msg00089.html
               */
            re_set_syntax (RE_SYNTAX_POSIX_BASIC
                           & ~RE_CONTEXT_INVALID_DUP
                           & ~RE_NO_EMPTY_RANGES);
            memset (&regex, 0, sizeof regex);
            s = re_compile_pattern ("[[:alnum:]_-]\\\\+\$", 16, &regex);
            if (s)
              result |= 32;
            else
              regfree (&regex);

            /* REG_STARTEND was added to glibc on 2004-01-15.
               Reject older versions.  */
            if (! REG_STARTEND)
              result |= 64;

            /* Matching with the compiled form of this regexp would provoke
               an assertion failure prior to glibc-2.28:
                 regexec.c:1375: pop_fail_stack: Assertion 'num >= 0' failed
               With glibc-2.28, compilation fails and reports the invalid
               back reference.  */
            re_set_syntax (RE_SYNTAX_POSIX_EGREP);
            memset (&regex, 0, sizeof regex);
            s = re_compile_pattern ("0|()0|\\\\1|0", 10, &regex);
            if (!s)
              {
                memset (&regs, 0, sizeof regs);
                i = re_search (&regex, "x", 1, 0, 1, &regs);
                if (i != -1)
                  result |= 64;
                if (0 <= i)
                  {
                    free (regs.start);
                    free (regs.end);
                  }
                regfree (&regex);
              }
            else
              {
                if (strcmp (s, "Invalid back reference"))
                  result |= 64;
              }

            /* glibc bug 11053.  */
            re_set_syntax (RE_SYNTAX_POSIX_BASIC);
            memset (&regex, 0, sizeof regex);
            static char const pat_sub2[] = "\\\\(a*\\\\)*a*\\\\1";
            s = re_compile_pattern (pat_sub2, sizeof pat_sub2 - 1, &regex);
            if (s)
              result |= 64;
            else
              {
                memset (&regs, 0, sizeof regs);
                static char const data[] = "a";
                int datalen = sizeof data - 1;
                i = re_search (&regex, data, datalen, 0, datalen, &regs);
                if (i != 0)
                  result |= 64;
                else if (regs.num_regs < 2)
                  result |= 64;
                else if (! (regs.start[0] == 0 && regs.end[0] == 1))
                  result |= 64;
                else if (! (regs.start[1] == 0 && regs.end[1] == 0))
                  result |= 64;
                regfree (&regex);
                free (regs.start);
                free (regs.end);
              }

#if 0
            /* It would be nice to reject hosts whose regoff_t values are too
               narrow (including glibc on hosts with 64-bit ptrdiff_t and
               32-bit int), but we should wait until glibc implements this
               feature.  Otherwise, support for equivalence classes and
               multibyte collation symbols would always be broken except
               when compiling --without-included-regex.   */
            if (sizeof (regoff_t) < sizeof (ptrdiff_t)
                || sizeof (regoff_t) < sizeof (ssize_t))
              result |= 64;
#endif

            return result;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  gl_cv_func_re_compile_pattern_working=yes
else $as_nop
  gl_cv_func_re_compile_pattern_working=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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
printf "%s\n" "$gl_cv_func_re_compile_pattern_working" >&6; }
    case "$gl_cv_func_re_compile_pattern_working" in #(
      *yes) ac_use_included_regex=no;; #(
      *no) ac_use_included_regex=yes;;
    esac
    ;;
  *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
    ;;
  esac

  if test $ac_use_included_regex = yes; then

printf "%s\n" "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h


printf "%s\n" "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h


printf "%s\n" "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h


printf "%s\n" "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h


printf "%s\n" "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h


printf "%s\n" "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h


printf "%s\n" "#define re_search rpl_re_search" >>confdefs.h


printf "%s\n" "#define re_search_2 rpl_re_search_2" >>confdefs.h


printf "%s\n" "#define re_match rpl_re_match" >>confdefs.h


printf "%s\n" "#define re_match_2 rpl_re_match_2" >>confdefs.h


printf "%s\n" "#define re_set_registers rpl_re_set_registers" >>confdefs.h


printf "%s\n" "#define re_comp rpl_re_comp" >>confdefs.h


printf "%s\n" "#define re_exec rpl_re_exec" >>confdefs.h


printf "%s\n" "#define regcomp rpl_regcomp" >>confdefs.h


printf "%s\n" "#define regexec rpl_regexec" >>confdefs.h


printf "%s\n" "#define regerror rpl_regerror" >>confdefs.h


printf "%s\n" "#define regfree rpl_regfree" >>confdefs.h

  fi


    test $ac_use_included_regex = yes && GL_COND_OBJ_REGEX_CONDITION=1 || GL_COND_OBJ_REGEX_CONDITION=

    if test -z "${GL_COND_OBJ_REGEX_TRUE}" && test -z "${GL_COND_OBJ_REGEX_FALSE}"; then
    GL_COND_OBJ_REGEX_TRUE='#'
    GL_COND_OBJ_REGEX_FALSE='#'
  fi

  if test "$GL_COND_OBJ_REGEX_CONDITION"
then :







  ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
if test "x$ac_cv_header_libintl_h" = xyes
then :
  printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h

fi


  ac_fn_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_isblank" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_ISBLANK $ac_have_decl" >>confdefs.h



fi

  ac_fn_c_check_func "$LINENO" "sig2str" "ac_cv_func_sig2str"
if test "x$ac_cv_func_sig2str" = xyes
then :
  printf "%s\n" "#define HAVE_SIG2STR 1" >>confdefs.h

fi



    test $ac_cv_func_sig2str = no && GL_COND_OBJ_SIG2STR_CONDITION=1 || GL_COND_OBJ_SIG2STR_CONDITION=

    if test -z "${GL_COND_OBJ_SIG2STR_TRUE}" && test -z "${GL_COND_OBJ_SIG2STR_FALSE}"; then
    GL_COND_OBJ_SIG2STR_TRUE='#'
    GL_COND_OBJ_SIG2STR_FALSE='#'
  fi

  if test "$GL_COND_OBJ_SIG2STR_CONDITION"
then :


  :


fi




  ac_fn_c_check_func "$LINENO" "sigdescr_np" "ac_cv_func_sigdescr_np"
if test "x$ac_cv_func_sigdescr_np" = xyes
then :
  printf "%s\n" "#define HAVE_SIGDESCR_NP 1" >>confdefs.h

fi

  if test $ac_cv_func_sigdescr_np = no; then
    HAVE_SIGDESCR_NP=0
  fi


    test $HAVE_SIGDESCR_NP = 0 && GL_COND_OBJ_SIGDESCR_NP_CONDITION=1 || GL_COND_OBJ_SIGDESCR_NP_CONDITION=

    if test -z "${GL_COND_OBJ_SIGDESCR_NP_TRUE}" && test -z "${GL_COND_OBJ_SIGDESCR_NP_FALSE}"; then
    GL_COND_OBJ_SIGDESCR_NP_TRUE='#'
    GL_COND_OBJ_SIGDESCR_NP_FALSE='#'
  fi















          GL_GNULIB_SIGDESCR_NP=1












     ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
/* <sys/types.h> is not needed according to POSIX, but the
   <sys/socket.h> in i386-unknown-freebsd4.10 and
   powerpc-apple-darwin5.5 required it. */
#include <sys/types.h>
#if HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#elif HAVE_WS2TCPIP_H
# include <ws2tcpip.h>
#endif

"
if test "x$ac_cv_type_socklen_t" = xyes
then :

else $as_nop
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
printf %s "checking for socklen_t equivalent... " >&6; }
if test ${gl_cv_socklen_t_equiv+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  # Systems have either "struct sockaddr *" or
         # "void *" as the second argument to getpeername
         gl_cv_socklen_t_equiv=
         for arg2 in "struct sockaddr" void; do
           for t in int size_t "unsigned int" "long int" "unsigned long int"; do
             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
                   #include <sys/socket.h>

                   int getpeername (int, $arg2 *, $t *);
int
main (void)
{
$t len;
                  getpeername (0, 0, &len);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_socklen_t_equiv="$t"
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
             test "$gl_cv_socklen_t_equiv" != "" && break
           done
           test "$gl_cv_socklen_t_equiv" != "" && break
         done
         if test "$gl_cv_socklen_t_equiv" = ""; then
           as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
         fi

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
printf "%s\n" "$gl_cv_socklen_t_equiv" >&6; }

printf "%s\n" "#define socklen_t $gl_cv_socklen_t_equiv" >>confdefs.h

fi


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
printf %s "checking for ssize_t... " >&6; }
if test ${gl_cv_ssize_t+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
int
main (void)
{
int x = sizeof (ssize_t *) + sizeof (ssize_t);
            return !x;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_ssize_t=yes
else $as_nop
  gl_cv_ssize_t=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_ssize_t" >&5
printf "%s\n" "$gl_cv_ssize_t" >&6; }
  if test $gl_cv_ssize_t = no; then
            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether size_t is wider than 'long'" >&5
printf %s "checking whether size_t is wider than 'long'... " >&6; }
if test ${gl_cv_size_t_large+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
              typedef int array [2 * (sizeof (size_t) > sizeof (long)) - 1];

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_size_t_large=yes
else $as_nop
  gl_cv_size_t_large=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_t_large" >&5
printf "%s\n" "$gl_cv_size_t_large" >&6; }
    if test $gl_cv_size_t_large = yes; then
      gl_def_ssize_t='long long'
    else
      gl_def_ssize_t='long'
    fi

printf "%s\n" "#define ssize_t $gl_def_ssize_t" >>confdefs.h

  fi





  ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "#include <sys/types.h>
     #include <sys/stat.h>
"
if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1" >>confdefs.h

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
printf %s "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
if test ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

            #include <sys/types.h>
            #include <sys/stat.h>
            #if HAVE_SYS_TIME_H
            # include <sys/time.h>
            #endif
            #include <time.h>
            struct timespec ts;
            struct stat st;

int
main (void)
{

            st.st_atim = ts;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
else $as_nop
  ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
printf "%s\n" "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
     if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then

printf "%s\n" "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h

     fi
else $as_nop
  ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" "#include <sys/types.h>
        #include <sys/stat.h>
"
if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1" >>confdefs.h


else $as_nop
  ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
           #include <sys/stat.h>
"
if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1" >>confdefs.h


else $as_nop
  ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.st__tim.tv_nsec" "ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" "#include <sys/types.h>
              #include <sys/stat.h>
"
if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1" >>confdefs.h


fi

fi

fi

fi





  ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimespec.tv_nsec" "ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" "#include <sys/types.h>
     #include <sys/stat.h>
"
if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1" >>confdefs.h


else $as_nop
  ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
        #include <sys/stat.h>
"
if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1" >>confdefs.h


else $as_nop
  ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtim.tv_nsec" "ac_cv_member_struct_stat_st_birthtim_tv_nsec" "#include <sys/types.h>
          #include <sys/stat.h>
"
if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes
then :

printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1" >>confdefs.h


fi

fi

fi







  case "$GL_GENERATE_STDBIT_H" in
    false) STDBIT_H='' ;;
    true)
                  if test -z "$STDBIT_H"; then
        STDBIT_H="${gl_source_base_prefix}stdbit.h"
      fi
      ;;
    *) echo "*** GL_GENERATE_STDBIT_H is not set correctly" 1>&2; exit 1 ;;
  esac


    $GL_GENERATE_STDBIT_H && GL_GENERATE_STDBIT_H_CONDITION=1 || GL_GENERATE_STDBIT_H_CONDITION=

    if test -z "${GL_GENERATE_STDBIT_H_TRUE}" && test -z "${GL_GENERATE_STDBIT_H_FALSE}"; then
    GL_GENERATE_STDBIT_H_TRUE='#'
    GL_GENERATE_STDBIT_H_FALSE='#'
  fi







  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bool, true, false" >&5
printf %s "checking for bool, true, false... " >&6; }
if test ${gl_cv_c_bool+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

          #if true == false
           #error "true == false"
          #endif
          extern bool b;
          bool b = true == false;
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_c_bool=yes
else $as_nop
  gl_cv_c_bool=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_bool" >&5
printf "%s\n" "$gl_cv_c_bool" >&6; }
  if test "$gl_cv_c_bool" = yes; then

printf "%s\n" "#define HAVE_C_BOOL 1" >>confdefs.h

  fi






  GL_STDC_BIT_WIDTH=1

  GL_STDC_COUNT_ONES=1

  GL_STDC_LEADING_ZEROS=1

  GL_STDC_TRAILING_ZEROS=1

  if test $ac_cv_header_stdckdint_h = yes; then
    GL_GENERATE_STDCKDINT_H=false
  else
    GL_GENERATE_STDCKDINT_H=true
  fi




  case "$GL_GENERATE_STDCKDINT_H" in
    false) STDCKDINT_H='' ;;
    true)
                  if test -z "$STDCKDINT_H"; then
        STDCKDINT_H="${gl_source_base_prefix}stdckdint.h"
      fi
      ;;
    *) echo "*** GL_GENERATE_STDCKDINT_H is not set correctly" 1>&2; exit 1 ;;
  esac


    $GL_GENERATE_STDCKDINT_H && GL_GENERATE_STDCKDINT_H_CONDITION=1 || GL_GENERATE_STDCKDINT_H_CONDITION=

    if test -z "${GL_GENERATE_STDCKDINT_H_TRUE}" && test -z "${GL_GENERATE_STDCKDINT_H_FALSE}"; then
    GL_GENERATE_STDCKDINT_H_TRUE='#'
    GL_GENERATE_STDCKDINT_H_FALSE='#'
  fi
















  case "$GL_GENERATE_STDDEF_H" in
    false) STDDEF_H='' ;;
    true)
                  if test -z "$STDDEF_H"; then
        STDDEF_H="${gl_source_base_prefix}stddef.h"
      fi
      ;;
    *) echo "*** GL_GENERATE_STDDEF_H is not set correctly" 1>&2; exit 1 ;;
  esac


    $GL_GENERATE_STDDEF_H && GL_GENERATE_STDDEF_H_CONDITION=1 || GL_GENERATE_STDDEF_H_CONDITION=

    if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
    GL_GENERATE_STDDEF_H_TRUE='#'
    GL_GENERATE_STDDEF_H_FALSE='#'
  fi











  case "$GL_GENERATE_STDINT_H" in
    false) STDINT_H='' ;;
    true)
                  if test -z "$STDINT_H"; then
        STDINT_H="${gl_source_base_prefix}stdint.h"
      fi
      ;;
    *) echo "*** GL_GENERATE_STDINT_H is not set correctly" 1>&2; exit 1 ;;
  esac


    $GL_GENERATE_STDINT_H && GL_GENERATE_STDINT_H_CONDITION=1 || GL_GENERATE_STDINT_H_CONDITION=

    if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
    GL_GENERATE_STDINT_H_TRUE='#'
    GL_GENERATE_STDINT_H_FALSE='#'
  fi









  case "$GL_GENERATE_LIMITS_H" in
    false) LIMITS_H='' ;;
    true)
                  if test -z "$LIMITS_H"; then
        LIMITS_H="${gl_source_base_prefix}limits.h"
      fi
      ;;
    *) echo "*** GL_GENERATE_LIMITS_H is not set correctly" 1>&2; exit 1 ;;
  esac


    $GL_GENERATE_LIMITS_H && GL_GENERATE_LIMITS_H_CONDITION=1 || GL_GENERATE_LIMITS_H_CONDITION=

    if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
    GL_GENERATE_LIMITS_H_TRUE='#'
    GL_GENERATE_LIMITS_H_FALSE='#'
  fi














    test $REPLACE_STDIO_READ_FUNCS = 1 && GL_COND_OBJ_STDIO_READ_CONDITION=1 || GL_COND_OBJ_STDIO_READ_CONDITION=

    if test -z "${GL_COND_OBJ_STDIO_READ_TRUE}" && test -z "${GL_COND_OBJ_STDIO_READ_FALSE}"; then
    GL_COND_OBJ_STDIO_READ_TRUE='#'
    GL_COND_OBJ_STDIO_READ_FALSE='#'
  fi


    test $REPLACE_STDIO_WRITE_FUNCS = 1 && GL_COND_OBJ_STDIO_WRITE_CONDITION=1 || GL_COND_OBJ_STDIO_WRITE_CONDITION=

    if test -z "${GL_COND_OBJ_STDIO_WRITE_TRUE}" && test -z "${GL_COND_OBJ_STDIO_WRITE_FALSE}"; then
    GL_COND_OBJ_STDIO_WRITE_TRUE='#'
    GL_COND_OBJ_STDIO_WRITE_FALSE='#'
  fi










          GL_GNULIB_FSCANF=1







printf "%s\n" "#define GNULIB_FSCANF 1" >>confdefs.h











          GL_GNULIB_SCANF=1







printf "%s\n" "#define GNULIB_SCANF 1" >>confdefs.h











          GL_GNULIB_FGETC=1














          GL_GNULIB_GETC=1














          GL_GNULIB_GETCHAR=1














          GL_GNULIB_FGETS=1














          GL_GNULIB_FREAD=1














          GL_GNULIB_FPRINTF=1














          GL_GNULIB_PRINTF=1














          GL_GNULIB_VFPRINTF=1














          GL_GNULIB_VPRINTF=1














          GL_GNULIB_FPUTC=1














          GL_GNULIB_PUTC=1














          GL_GNULIB_PUTCHAR=1














          GL_GNULIB_FPUTS=1














          GL_GNULIB_PUTS=1














          GL_GNULIB_FWRITE=1




















  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stpcpy" >&5
printf %s "checking for stpcpy... " >&6; }
if test ${gl_cv_onwards_func_stpcpy+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  exec 9>&6 6>/dev/null

       case "$host_os" in

         linux*-android*)
           ac_fn_check_decl "$LINENO" "stpcpy" "ac_cv_have_decl_stpcpy" "#include <string.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_stpcpy" = xyes
then :

fi
           if test $ac_cv_have_decl_stpcpy = yes; then
             ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
if test "x$ac_cv_func_stpcpy" = xyes
then :

fi

             if test $ac_cv_func_stpcpy = yes; then
               gl_cv_onwards_func_stpcpy=yes
             else
                                                            gl_cv_onwards_func_stpcpy='future OS version'
             fi
           else
             gl_cv_onwards_func_stpcpy='future OS version'
           fi
           ;;


         *)
           ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
if test "x$ac_cv_func_stpcpy" = xyes
then :

fi

           gl_cv_onwards_func_stpcpy=$ac_cv_func_stpcpy
           ;;

       esac

  exec 6>&9 9>&-


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_stpcpy" >&5
printf "%s\n" "$gl_cv_onwards_func_stpcpy" >&6; }

  case "$gl_cv_onwards_func_stpcpy" in
    future*) ac_cv_func_stpcpy=no ;;
    *)       ac_cv_func_stpcpy=$gl_cv_onwards_func_stpcpy ;;
  esac
  if test $ac_cv_func_stpcpy = yes; then

printf "%s\n" "#define HAVE_STPCPY 1" >>confdefs.h

  fi


  if test $ac_cv_func_stpcpy = no; then
    HAVE_STPCPY=0
    case "$gl_cv_onwards_func_stpcpy" in
      future*) REPLACE_STPCPY=1 ;;
    esac
  fi


    test $HAVE_STPCPY = 0 || test $REPLACE_STPCPY = 1 && GL_COND_OBJ_STPCPY_CONDITION=1 || GL_COND_OBJ_STPCPY_CONDITION=

    if test -z "${GL_COND_OBJ_STPCPY_TRUE}" && test -z "${GL_COND_OBJ_STPCPY_FALSE}"; then
    GL_COND_OBJ_STPCPY_TRUE='#'
    GL_COND_OBJ_STPCPY_FALSE='#'
  fi

  if test "$GL_COND_OBJ_STPCPY_CONDITION"
then :


  :


fi














          GL_GNULIB_STPCPY=1























  if test $ac_cv_have_decl_strnlen = no; then
    HAVE_DECL_STRNLEN=0
  else

         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
printf %s "checking for working strnlen... " >&6; }
if test ${ac_cv_func_strnlen_working+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test "$cross_compiling" = yes
then :
  # Guess no on AIX systems, yes otherwise.
		case "$host_os" in
		  aix*) ac_cv_func_strnlen_working=no;;
		  *)    ac_cv_func_strnlen_working=yes;;
		esac
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_includes_default
int
main (void)
{

#define S "foobar"
#define S_LEN (sizeof S - 1)

  /* At least one implementation is buggy: that of AIX 4.3 would
     give strnlen (S, 1) == 3.  */

  int i;
  for (i = 0; i < S_LEN + 1; ++i)
    {
      int expected = i <= S_LEN ? i : S_LEN;
      if (strnlen (S, i) != expected)
	return 1;
    }
  return 0;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  ac_cv_func_strnlen_working=yes
else $as_nop
  ac_cv_func_strnlen_working=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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
printf "%s\n" "$ac_cv_func_strnlen_working" >&6; }
test $ac_cv_func_strnlen_working = no && :


    if test $ac_cv_func_strnlen_working = no; then
      REPLACE_STRNLEN=1
    fi
  fi


    test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1 && GL_COND_OBJ_STRNLEN_CONDITION=1 || GL_COND_OBJ_STRNLEN_CONDITION=

    if test -z "${GL_COND_OBJ_STRNLEN_TRUE}" && test -z "${GL_COND_OBJ_STRNLEN_FALSE}"; then
    GL_COND_OBJ_STRNLEN_TRUE='#'
    GL_COND_OBJ_STRNLEN_FALSE='#'
  fi

  if test "$GL_COND_OBJ_STRNLEN_CONDITION"
then :

    :

fi














          GL_GNULIB_STRNLEN=1










  if test "$ac_cv_have_decl_strtoimax" != yes; then
    HAVE_DECL_STRTOIMAX=0
  fi

  if test "$ac_cv_func_strtoimax" = yes; then
    HAVE_STRTOIMAX=1
             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strtoimax works" >&5
printf %s "checking whether strtoimax works... " >&6; }
if test ${gl_cv_func_strtoimax+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test "$cross_compiling" = yes
then :
  case "$host_os" in
                               # Guess no on AIX 5.
            aix5*)             gl_cv_func_strtoimax="guessing no" ;;
                               # Guess yes on native Windows.
            mingw* | windows*) gl_cv_func_strtoimax="guessing yes" ;;
                               # Guess yes otherwise.
            *)                 gl_cv_func_strtoimax="guessing yes" ;;
          esac

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

#include <errno.h>
#include <string.h>
#include <inttypes.h>
int main ()
{
  if (sizeof (intmax_t) > sizeof (int))
    {
      const char *s = "4294967295";
      char *p;
      intmax_t res;
      errno = 0;
      res = strtoimax (s, &p, 10);
      if (p != s + strlen (s))
        return 1;
      if (errno != 0)
        return 2;
      if (res != (intmax_t) 65535 * (intmax_t) 65537)
        return 3;
    }
  else
    {
      const char *s = "2147483647";
      char *p;
      intmax_t res;
      errno = 0;
      res = strtoimax (s, &p, 10);
      if (p != s + strlen (s))
        return 1;
      if (errno != 0)
        return 2;
      if (res != 2147483647)
        return 3;
    }
  return 0;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  gl_cv_func_strtoimax=yes
else $as_nop
  gl_cv_func_strtoimax=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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax" >&5
printf "%s\n" "$gl_cv_func_strtoimax" >&6; }
    case "$gl_cv_func_strtoimax" in
      *no) REPLACE_STRTOIMAX=1 ;;
    esac
  else
    if test "$ac_cv_have_decl_strtoimax" = yes; then
      # HP-UX 11.11 has "#define strtoimax(...) ..." but no function.
      REPLACE_STRTOIMAX=1
    fi
    HAVE_STRTOIMAX=0
  fi


    test $HAVE_DECL_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1 && GL_COND_OBJ_STRTOIMAX_CONDITION=1 || GL_COND_OBJ_STRTOIMAX_CONDITION=

    if test -z "${GL_COND_OBJ_STRTOIMAX_TRUE}" && test -z "${GL_COND_OBJ_STRTOIMAX_FALSE}"; then
    GL_COND_OBJ_STRTOIMAX_TRUE='#'
    GL_COND_OBJ_STRTOIMAX_FALSE='#'
  fi

  if test "$GL_COND_OBJ_STRTOIMAX_CONDITION"
then :


  ac_fn_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_strtoll" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_STRTOLL $ac_have_decl" >>confdefs.h



fi









          GL_GNULIB_STRTOIMAX=1







        if test $ac_cv_func_symlink = no; then
    HAVE_SYMLINK=0
  else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
printf %s "checking whether symlink handles trailing slash correctly... " >&6; }
if test ${gl_cv_func_symlink_works+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test "$cross_compiling" = yes
then :
  case "$host_os" in
                             # Guess yes on Linux systems.
            linux-* | linux) gl_cv_func_symlink_works="guessing yes" ;;
                             # Guess yes on systems that emulate the Linux system calls.
            midipix*)        gl_cv_func_symlink_works="guessing yes" ;;
                             # Guess yes on glibc systems.
            *-gnu* | gnu*)   gl_cv_func_symlink_works="guessing yes" ;;
                             # If we don't know, obey --enable-cross-guesses.
            *)               gl_cv_func_symlink_works="$gl_cross_guess_normal" ;;
          esac

else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <unistd.h>

int
main (void)
{
int result = 0;
             if (!symlink ("a", "conftest.link/"))
               result |= 1;
             if (symlink ("conftest.f", "conftest.lnk2"))
               result |= 2;
             else if (!symlink ("a", "conftest.lnk2/"))
               result |= 4;
             return result;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  gl_cv_func_symlink_works=yes
else $as_nop
  gl_cv_func_symlink_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

      rm -f conftest.f conftest.link conftest.lnk2
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
printf "%s\n" "$gl_cv_func_symlink_works" >&6; }
    case "$gl_cv_func_symlink_works" in
      *yes) ;;
      *)
        REPLACE_SYMLINK=1
        ;;
    esac
  fi


    test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1 && GL_COND_OBJ_SYMLINK_CONDITION=1 || GL_COND_OBJ_SYMLINK_CONDITION=

    if test -z "${GL_COND_OBJ_SYMLINK_TRUE}" && test -z "${GL_COND_OBJ_SYMLINK_FALSE}"; then
    GL_COND_OBJ_SYMLINK_TRUE='#'
    GL_COND_OBJ_SYMLINK_FALSE='#'
  fi










          GL_GNULIB_SYMLINK=1










































  :




printf "%s\n" "#define GNULIB_TEMPNAME 1" >>confdefs.h















      ac_fn_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "/* mingw's <time.h> provides the functions asctime_r, ctime_r,
         gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
         been included before.  */
      #if defined __MINGW32__
      # include <unistd.h>
      #endif
      #include <time.h>

" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_localtime_r" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_LOCALTIME_R $ac_have_decl" >>confdefs.h

  if test $ac_cv_have_decl_localtime_r = no; then
    HAVE_DECL_LOCALTIME_R=0
  fi


  if test $ac_cv_func_localtime_r = yes; then
    HAVE_LOCALTIME_R=1
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
printf %s "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
if test ${gl_cv_time_r_posix+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
/* mingw's <time.h> provides the functions asctime_r, ctime_r,
                 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
                 been included before.  */
              #if defined __MINGW32__
              # include <unistd.h>
              #endif
              #include <time.h>

int
main (void)
{
/* We don't need to append 'restrict's to the argument types,
                 even though the POSIX signature has the 'restrict's,
                 since C99 says they can't affect type compatibility.  */
              struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
              if (ptr) return 0;
              /* Check the return type is a pointer.
                 On HP-UX 10 it is 'int'.  */
              *localtime_r (0, 0);
  ;
  return 0;
}

_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_time_r_posix=yes
else $as_nop
  gl_cv_time_r_posix=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
printf "%s\n" "$gl_cv_time_r_posix" >&6; }
    if test $gl_cv_time_r_posix != yes; then
      REPLACE_LOCALTIME_R=1
    fi
  else
    HAVE_LOCALTIME_R=0
                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether localtime_r exists as an inline function" >&5
printf %s "checking whether localtime_r exists as an inline function... " >&6; }
if test ${gl_cv_func_localtime_r_inline+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
/* mingw's <time.h> provides the functions asctime_r, ctime_r,
                 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
                 been included before.  */
              #if defined __MINGW32__
              # include <unistd.h>
              #endif
              #include <time.h>

int
main (void)
{
time_t a;
              struct tm r;
              localtime_r (&a, &r);

  ;
  return 0;
}

_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  gl_cv_func_localtime_r_inline=yes
else $as_nop
  gl_cv_func_localtime_r_inline=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localtime_r_inline" >&5
printf "%s\n" "$gl_cv_func_localtime_r_inline" >&6; }
    if test $gl_cv_func_localtime_r_inline = yes; then
      REPLACE_LOCALTIME_R=1
    fi
  fi


    test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1 && GL_COND_OBJ_TIME_R_CONDITION=1 || GL_COND_OBJ_TIME_R_CONDITION=

    if test -z "${GL_COND_OBJ_TIME_R_TRUE}" && test -z "${GL_COND_OBJ_TIME_R_FALSE}"; then
    GL_COND_OBJ_TIME_R_TRUE='#'
    GL_COND_OBJ_TIME_R_FALSE='#'
  fi

  if test "$GL_COND_OBJ_TIME_R_CONDITION"
then :


  :


fi









          GL_GNULIB_TIME_R=1










  # On Mac OS X 10.6, localtime loops forever with some time_t values.
  # See Bug#27706, Bug#27736, and
  # https://lists.gnu.org/r/bug-gnulib/2017-07/msg00142.html
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether localtime works even near extrema" >&5
printf %s "checking whether localtime works even near extrema... " >&6; }
if test ${gl_cv_func_localtime_works+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  gl_cv_func_localtime_works=yes
     if test "$cross_compiling" = yes
then :
  gl_cv_func_localtime_works="guessing yes"
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdlib.h>
            #include <string.h>
            #include <unistd.h>
            #include <time.h>

int
main (void)
{

            time_t t = -67768038400666600;
            struct tm *tm;
            char *tz = getenv ("TZ");
            if (! (tz && strcmp (tz, "QQQ0") == 0))
              return 0;
            alarm (2);
            tm = localtime (&t);
            /* Use TM and *TM to suppress over-optimization.  */
            return tm && tm->tm_isdst;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  (TZ=QQQ0 ./conftest$EXEEXT) >/dev/null 2>&1 ||
           gl_cv_func_localtime_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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localtime_works" >&5
printf "%s\n" "$gl_cv_func_localtime_works" >&6; }
  if test "$gl_cv_func_localtime_works" = no; then

printf "%s\n" "#define HAVE_LOCALTIME_INFLOOP_BUG 1" >>confdefs.h

  fi

  ac_fn_c_check_type "$LINENO" "timezone_t" "ac_cv_type_timezone_t" "#include <time.h>
"
if test "x$ac_cv_type_timezone_t" = xyes
then :

printf "%s\n" "#define HAVE_TIMEZONE_T 1" >>confdefs.h


fi

  if test "$ac_cv_type_timezone_t" = yes; then
    HAVE_TIMEZONE_T=1
  fi


    test $HAVE_TIMEZONE_T = 0 && GL_COND_OBJ_TIME_RZ_CONDITION=1 || GL_COND_OBJ_TIME_RZ_CONDITION=

    if test -z "${GL_COND_OBJ_TIME_RZ_TRUE}" && test -z "${GL_COND_OBJ_TIME_RZ_FALSE}"; then
    GL_COND_OBJ_TIME_RZ_TRUE='#'
    GL_COND_OBJ_TIME_RZ_FALSE='#'
  fi










          GL_GNULIB_TIME_RZ=1










  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for timegm" >&5
printf %s "checking for timegm... " >&6; }
if test ${gl_cv_onwards_func_timegm+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  exec 9>&6 6>/dev/null

       case "$host_os" in

         linux*-android*)
           ac_fn_check_decl "$LINENO" "timegm" "ac_cv_have_decl_timegm" "#include <time.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_timegm" = xyes
then :

fi
           if test $ac_cv_have_decl_timegm = yes; then
             ac_fn_c_check_func "$LINENO" "timegm" "ac_cv_func_timegm"
if test "x$ac_cv_func_timegm" = xyes
then :

fi

             if test $ac_cv_func_timegm = yes; then
               gl_cv_onwards_func_timegm=yes
             else
                                                            gl_cv_onwards_func_timegm='future OS version'
             fi
           else
             gl_cv_onwards_func_timegm='future OS version'
           fi
           ;;


         *)
           ac_fn_c_check_func "$LINENO" "timegm" "ac_cv_func_timegm"
if test "x$ac_cv_func_timegm" = xyes
then :

fi

           gl_cv_onwards_func_timegm=$ac_cv_func_timegm
           ;;

       esac

  exec 6>&9 9>&-


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_timegm" >&5
printf "%s\n" "$gl_cv_onwards_func_timegm" >&6; }

  case "$gl_cv_onwards_func_timegm" in
    future*) ac_cv_func_timegm=no ;;
    *)       ac_cv_func_timegm=$gl_cv_onwards_func_timegm ;;
  esac
  if test $ac_cv_func_timegm = yes; then

printf "%s\n" "#define HAVE_TIMEGM 1" >>confdefs.h

  fi


  if test $ac_cv_func_timegm = yes; then
    if test "$gl_cv_func_working_mktime" != yes; then
      # Assume that timegm is buggy if mktime is.
      REPLACE_TIMEGM=1
    fi
  else
    HAVE_TIMEGM=0
    case "$gl_cv_onwards_func_timegm" in
      future*) REPLACE_TIMEGM=1 ;;
    esac
  fi


    test $HAVE_TIMEGM = 0 || test $REPLACE_TIMEGM = 1 && GL_COND_OBJ_TIMEGM_CONDITION=1 || GL_COND_OBJ_TIMEGM_CONDITION=

    if test -z "${GL_COND_OBJ_TIMEGM_TRUE}" && test -z "${GL_COND_OBJ_TIMEGM_FALSE}"; then
    GL_COND_OBJ_TIMEGM_TRUE='#'
    GL_COND_OBJ_TIMEGM_FALSE='#'
  fi

  if test "$GL_COND_OBJ_TIMEGM_CONDITION"
then :


  :


fi









          GL_GNULIB_TIMEGM=1











  ac_fn_check_decl "$LINENO" "timer_settime" "ac_cv_have_decl_timer_settime" "#include <time.h>

" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_timer_settime" = xyes
then :

fi
  TIMER_TIME_LIB=

  if test "$ac_cv_have_decl_timer_settime" = yes
then :

    gl_saved_libs=$LIBS
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing timer_settime" >&5
printf %s "checking for library containing timer_settime... " >&6; }
if test ${ac_cv_search_timer_settime+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  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.  */
char timer_settime ();
int
main (void)
{
return timer_settime ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' rt posix4
do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_search_timer_settime=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext
  if test ${ac_cv_search_timer_settime+y}
then :
  break
fi
done
if test ${ac_cv_search_timer_settime+y}
then :

else $as_nop
  ac_cv_search_timer_settime=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_timer_settime" >&5
printf "%s\n" "$ac_cv_search_timer_settime" >&6; }
ac_res=$ac_cv_search_timer_settime
if test "$ac_res" != no
then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  test "$ac_cv_search_timer_settime" = "none required" ||
                    TIMER_TIME_LIB=$ac_cv_search_timer_settime
fi


    ac_fn_c_check_func "$LINENO" "timer_settime" "ac_cv_func_timer_settime"
if test "x$ac_cv_func_timer_settime" = xyes
then :
  printf "%s\n" "#define HAVE_TIMER_SETTIME 1" >>confdefs.h

fi

    LIBS=$gl_saved_libs

fi
    LIB_TIMER_TIME="$TIMER_TIME_LIB"


  :








printf "%s\n" "#define GNULIB_STDIO_SINGLE_THREAD 1" >>confdefs.h


printf "%s\n" "#define USE_UNLOCKED_IO GNULIB_STDIO_SINGLE_THREAD" >>confdefs.h























  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for utimensat" >&5
printf %s "checking for utimensat... " >&6; }
if test ${gl_cv_onwards_func_utimensat+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  exec 9>&6 6>/dev/null

       case "$host_os" in

         linux*-android*)
           ac_fn_check_decl "$LINENO" "utimensat" "ac_cv_have_decl_utimensat" "#include <sys/stat.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_utimensat" = xyes
then :

fi
           if test $ac_cv_have_decl_utimensat = yes; then
             ac_fn_c_check_func "$LINENO" "utimensat" "ac_cv_func_utimensat"
if test "x$ac_cv_func_utimensat" = xyes
then :

fi

             if test $ac_cv_func_utimensat = yes; then
               gl_cv_onwards_func_utimensat=yes
             else
                                                            gl_cv_onwards_func_utimensat='future OS version'
             fi
           else
             gl_cv_onwards_func_utimensat='future OS version'
           fi
           ;;


         *)
           ac_fn_c_check_func "$LINENO" "utimensat" "ac_cv_func_utimensat"
if test "x$ac_cv_func_utimensat" = xyes
then :

fi

           gl_cv_onwards_func_utimensat=$ac_cv_func_utimensat
           ;;

       esac

  exec 6>&9 9>&-


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_utimensat" >&5
printf "%s\n" "$gl_cv_onwards_func_utimensat" >&6; }

  case "$gl_cv_onwards_func_utimensat" in
    future*) ac_cv_func_utimensat=no ;;
    *)       ac_cv_func_utimensat=$gl_cv_onwards_func_utimensat ;;
  esac
  if test $ac_cv_func_utimensat = yes; then

printf "%s\n" "#define HAVE_UTIMENSAT 1" >>confdefs.h

  fi


  if test $ac_cv_func_utimensat = no; then
    HAVE_UTIMENSAT=0
    case "$gl_cv_onwards_func_utimensat" in
      future*) REPLACE_UTIMENSAT=1 ;;
    esac
  else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether utimensat works" >&5
printf %s "checking whether utimensat works... " >&6; }
if test ${gl_cv_func_utimensat_works+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test "$cross_compiling" = yes
then :
  case "$host_os" in
            # Guess yes on Linux or glibc systems.
            linux-* | linux | *-gnu* | gnu*)
              gl_cv_func_utimensat_works="guessing yes" ;;
            # Guess yes on systems that emulate the Linux system calls.
            midipix*)
              gl_cv_func_utimensat_works="guessing yes" ;;
            # Guess 'nearly' on AIX.
            aix*)
              gl_cv_func_utimensat_works="guessing nearly" ;;
            # If we don't know, obey --enable-cross-guesses.
            *)
              gl_cv_func_utimensat_works="$gl_cross_guess_normal" ;;
          esac

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

#include <fcntl.h>
#include <sys/stat.h>
#include <unistd.h>


$gl_mda_defines

int
main (void)
{
int result = 0;
              const char *f = "conftest.file";
              if (close (creat (f, 0600)))
                return 1;
              /* Test whether a trailing slash is handled correctly.
                 This fails on AIX 7.2.  */
              {
                struct timespec ts[2];
                ts[0].tv_sec = 345183300; ts[0].tv_nsec = 0;
                ts[1] = ts[0];
                if (utimensat (AT_FDCWD, "conftest.file/", ts, 0) == 0)
                  result |= 2;
              }
              /* Test whether the AT_SYMLINK_NOFOLLOW flag is supported.  */
              {
                if (utimensat (AT_FDCWD, f, NULL, AT_SYMLINK_NOFOLLOW))
                  result |= 4;
              }
              /* Test whether UTIME_NOW and UTIME_OMIT work.  */
              {
                struct timespec ts[2];
                ts[0].tv_sec = 1;
                ts[0].tv_nsec = UTIME_OMIT;
                ts[1].tv_sec = 1;
                ts[1].tv_nsec = UTIME_NOW;
                if (utimensat (AT_FDCWD, f, ts, 0))
                  result |= 8;
              }
              sleep (1);
              {
                struct stat st;
                struct timespec ts[2];
                ts[0].tv_sec = 1;
                ts[0].tv_nsec = UTIME_NOW;
                ts[1].tv_sec = 1;
                ts[1].tv_nsec = UTIME_OMIT;
                if (utimensat (AT_FDCWD, f, ts, 0))
                  result |= 16;
                if (stat (f, &st))
                  result |= 32;
                else if (st.st_ctime < st.st_atime)
                  result |= 64;
              }
              return result;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  gl_cv_func_utimensat_works=yes
else $as_nop
  case $? in
            2) gl_cv_func_utimensat_works='nearly' ;;
            *) gl_cv_func_utimensat_works=no ;;
          esac

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


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_utimensat_works" >&5
printf "%s\n" "$gl_cv_func_utimensat_works" >&6; }
    case "$gl_cv_func_utimensat_works" in
      *yes)
        ;;
      *nearly)

printf "%s\n" "#define HAVE_NEARLY_WORKING_UTIMENSAT 1" >>confdefs.h

        REPLACE_UTIMENSAT=1
        ;;
      *)
        REPLACE_UTIMENSAT=1
        ;;
    esac
  fi


    test $HAVE_UTIMENSAT = 0 || test $REPLACE_UTIMENSAT = 1 && GL_COND_OBJ_UTIMENSAT_CONDITION=1 || GL_COND_OBJ_UTIMENSAT_CONDITION=

    if test -z "${GL_COND_OBJ_UTIMENSAT_TRUE}" && test -z "${GL_COND_OBJ_UTIMENSAT_FALSE}"; then
    GL_COND_OBJ_UTIMENSAT_TRUE='#'
    GL_COND_OBJ_UTIMENSAT_FALSE='#'
  fi










          GL_GNULIB_UTIMENSAT=1






  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for variable-length arrays" >&5
printf %s "checking for variable-length arrays... " >&6; }
if test ${ac_cv_c_vararrays+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#ifdef __STDC_NO_VLA__
	defined
	#endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "defined" >/dev/null 2>&1
then :
  ac_cv_c_vararrays='no: __STDC_NO_VLA__ is defined'
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
/* Test for VLA support.  This test is partly inspired
		  from examples in the C standard.  Use at least two VLA
		  functions to detect the GCC 3.4.3 bug described in:
		  https://lists.gnu.org/archive/html/bug-gnulib/2014-08/msg00014.html
		  */
	       #ifdef __STDC_NO_VLA__
		syntax error;
	       #else
		 extern int n;
		 int B[100];
		 int fvla (int m, int C[m][m]);

		 int
		 simple (int count, int all[static count])
		 {
		   return all[count - 1];
		 }

		 int
		 fvla (int m, int C[m][m])
		 {
		   typedef int VLA[m][m];
		   VLA x;
		   int D[m];
		   static int (*q)[m] = &B;
		   int (*s)[n] = q;
		   return C && &x[0][0] == &D[0] && &D[0] == s[0];
		 }
	       #endif

int
main (void)
{

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

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_vararrays" >&5
printf "%s\n" "$ac_cv_c_vararrays" >&6; }
  if test "$ac_cv_c_vararrays" = yes; then

printf "%s\n" "#define HAVE_C_VARARRAYS 1" >>confdefs.h

  elif test "$ac_cv_c_vararrays" = no; then

printf "%s\n" "#define __STDC_NO_VLA__ 1" >>confdefs.h

  fi

  gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=false
  gl_gnulib_enabled_cloexec=false
  gl_gnulib_enabled_dirfd=false
  gl_gnulib_enabled_925677f0343de64b89a9f0c790b4104c=false
  gl_gnulib_enabled_endian=false
  gl_gnulib_enabled_euidaccess=false
  gl_gnulib_enabled_getdelim=false
  gl_gnulib_enabled_getdtablesize=false
  gl_gnulib_enabled_getgroups=false
  gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
  gl_gnulib_enabled_fd38c7e463b54744b77b98aeafb4fa7c=false
  gl_gnulib_enabled_8444034ea779b88768865bb60b4fb8c9=false
  gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=false
  gl_gnulib_enabled_lchmod=false
  gl_gnulib_enabled_e80bf6f757095d2e5fc94dafb8f8fc8b=false
  gl_gnulib_enabled_ef455225c00f5049c808c2eda3e76866=false
  gl_gnulib_enabled_5264294aa0a5557541b53c8c741f7f31=false
  gl_gnulib_enabled_open=false
  gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=false
  gl_gnulib_enabled_rawmemchr=false
  gl_gnulib_enabled_d3b2383720ee0e541357aa2aac598e2b=false
  gl_gnulib_enabled_61bcaca76b3e6f9ae55d57a1c3193bc4=false
  gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=false
  gl_gnulib_enabled_strtoll=false
  gl_gnulib_enabled_utimens=false
  gl_gnulib_enabled_verify=false
  gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=false
  func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b ()
  {
    if $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then :; else

      gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=true
      if case $host_os in mingw* | windows*) false;; *) :;; esac; then
        func_gl_gnulib_m4code_open
      fi
    fi
  }
  func_gl_gnulib_m4code_cloexec ()
  {
    if $gl_gnulib_enabled_cloexec; then :; else

      gl_gnulib_enabled_cloexec=true
    fi
  }
  func_gl_gnulib_m4code_dirfd ()
  {
    if $gl_gnulib_enabled_dirfd; then :; else






  ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
if test "x$ac_cv_func_dirfd" = xyes
then :
  printf "%s\n" "#define HAVE_DIRFD 1" >>confdefs.h

fi

  ac_fn_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
      #include <dirent.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_dirfd" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_DIRFD $ac_have_decl" >>confdefs.h

  if test $ac_cv_have_decl_dirfd = no; then
    HAVE_DECL_DIRFD=0
  fi

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
printf %s "checking whether dirfd is a macro... " >&6; }
if test ${gl_cv_func_dirfd_macro+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <sys/types.h>
#include <dirent.h>
#ifdef dirfd
 dirent_header_defines_dirfd
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1
then :
  gl_cv_func_dirfd_macro=yes
else $as_nop
  gl_cv_func_dirfd_macro=no
fi
rm -rf conftest*

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
printf "%s\n" "$gl_cv_func_dirfd_macro" >&6; }

  if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
    HAVE_DIRFD=0
  else
    HAVE_DIRFD=1

    if test $DIR_HAS_FD_MEMBER = 0; then
      REPLACE_DIRFD=1
    fi
  fi


    test $HAVE_DIRFD = 0 || test $REPLACE_DIRFD = 1 && GL_COND_OBJ_DIRFD_CONDITION=1 || GL_COND_OBJ_DIRFD_CONDITION=

    if test -z "${GL_COND_OBJ_DIRFD_TRUE}" && test -z "${GL_COND_OBJ_DIRFD_FALSE}"; then
    GL_COND_OBJ_DIRFD_TRUE='#'
    GL_COND_OBJ_DIRFD_FALSE='#'
  fi

      if test "$GL_COND_OBJ_DIRFD_CONDITION"
then :


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
printf %s "checking how to get the file descriptor associated with an open DIR*... " >&6; }
if test ${gl_cv_sys_dir_fd_member_name+y}
then :
  printf %s "(cached) " >&6
else $as_nop

      gl_saved_CFLAGS=$CFLAGS
      for ac_expr in d_fd dd_fd; do

        CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

           #include <sys/types.h>
           #include <dirent.h>
int
main (void)
{
DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  dir_fd_found=yes

fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
        CFLAGS=$gl_saved_CFLAGS
        test "$dir_fd_found" = yes && break
      done
      test "$dir_fd_found" = yes || ac_expr=no_such_member

      gl_cv_sys_dir_fd_member_name=$ac_expr


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
printf "%s\n" "$gl_cv_sys_dir_fd_member_name" >&6; }
  if test $gl_cv_sys_dir_fd_member_name != no_such_member; then

printf "%s\n" "#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name" >>confdefs.h

  fi



fi









          GL_GNULIB_DIRFD=1





      gl_gnulib_enabled_dirfd=true
    fi
  }
  func_gl_gnulib_m4code_925677f0343de64b89a9f0c790b4104c ()
  {
    if $gl_gnulib_enabled_925677f0343de64b89a9f0c790b4104c; then :; else
      gl_gnulib_enabled_925677f0343de64b89a9f0c790b4104c=true
    fi
  }
  func_gl_gnulib_m4code_endian ()
  {
    if $gl_gnulib_enabled_endian; then :; else





  case "$GL_GENERATE_ENDIAN_H" in
    false) ENDIAN_H='' ;;
    true)
                  if test -z "$ENDIAN_H"; then
        ENDIAN_H="${gl_source_base_prefix}endian.h"
      fi
      ;;
    *) echo "*** GL_GENERATE_ENDIAN_H is not set correctly" 1>&2; exit 1 ;;
  esac


    $GL_GENERATE_ENDIAN_H && GL_GENERATE_ENDIAN_H_CONDITION=1 || GL_GENERATE_ENDIAN_H_CONDITION=

    if test -z "${GL_GENERATE_ENDIAN_H_TRUE}" && test -z "${GL_GENERATE_ENDIAN_H_FALSE}"; then
    GL_GENERATE_ENDIAN_H_TRUE='#'
    GL_GENERATE_ENDIAN_H_FALSE='#'
  fi






      gl_gnulib_enabled_endian=true
    fi
  }
  func_gl_gnulib_m4code_euidaccess ()
  {
    if $gl_gnulib_enabled_euidaccess; then :; else





  ac_fn_c_check_func "$LINENO" "euidaccess" "ac_cv_func_euidaccess"
if test "x$ac_cv_func_euidaccess" = xyes
then :
  printf "%s\n" "#define HAVE_EUIDACCESS 1" >>confdefs.h

fi

  if test $ac_cv_func_euidaccess = no; then
    HAVE_EUIDACCESS=0
  fi


    test $HAVE_EUIDACCESS = 0 && GL_COND_OBJ_EUIDACCESS_CONDITION=1 || GL_COND_OBJ_EUIDACCESS_CONDITION=

    if test -z "${GL_COND_OBJ_EUIDACCESS_TRUE}" && test -z "${GL_COND_OBJ_EUIDACCESS_FALSE}"; then
    GL_COND_OBJ_EUIDACCESS_TRUE='#'
    GL_COND_OBJ_EUIDACCESS_FALSE='#'
  fi

      if test "$GL_COND_OBJ_EUIDACCESS_CONDITION"
then :




  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for faccessat" >&5
printf %s "checking for faccessat... " >&6; }
if test ${gl_cv_onwards_func_faccessat+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  exec 9>&6 6>/dev/null

       case "$host_os" in

         linux*-android*)
           ac_fn_check_decl "$LINENO" "faccessat" "ac_cv_have_decl_faccessat" "#include <unistd.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_faccessat" = xyes
then :

fi
           if test $ac_cv_have_decl_faccessat = yes; then
             ac_fn_c_check_func "$LINENO" "faccessat" "ac_cv_func_faccessat"
if test "x$ac_cv_func_faccessat" = xyes
then :

fi

             if test $ac_cv_func_faccessat = yes; then
               gl_cv_onwards_func_faccessat=yes
             else
                                                            gl_cv_onwards_func_faccessat='future OS version'
             fi
           else
             gl_cv_onwards_func_faccessat='future OS version'
           fi
           ;;


         *)
           ac_fn_c_check_func "$LINENO" "faccessat" "ac_cv_func_faccessat"
if test "x$ac_cv_func_faccessat" = xyes
then :

fi

           gl_cv_onwards_func_faccessat=$ac_cv_func_faccessat
           ;;

       esac

  exec 6>&9 9>&-


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_faccessat" >&5
printf "%s\n" "$gl_cv_onwards_func_faccessat" >&6; }

  case "$gl_cv_onwards_func_faccessat" in
    future*) ac_cv_func_faccessat=no ;;
    *)       ac_cv_func_faccessat=$gl_cv_onwards_func_faccessat ;;
  esac
  if test $ac_cv_func_faccessat = yes; then

printf "%s\n" "#define HAVE_FACCESSAT 1" >>confdefs.h

  fi


    ac_fn_c_check_header_compile "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
if test "x$ac_cv_header_libgen_h" = xyes
then :
  printf "%s\n" "#define HAVE_LIBGEN_H 1" >>confdefs.h

fi


        ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
if test "x$ac_cv_func_getgroups" = xyes
then :

fi


  # If we don't yet have getgroups, see if it's in -lbsd.
  # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
  gl_saved_LIBS=$LIBS
  if test $ac_cv_func_getgroups = no; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
printf %s "checking for getgroups in -lbsd... " >&6; }
if test ${ac_cv_lib_bsd_getgroups+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  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.  */
char getgroups ();
int
main (void)
{
return getgroups ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_bsd_getgroups=yes
else $as_nop
  ac_cv_lib_bsd_getgroups=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
printf "%s\n" "$ac_cv_lib_bsd_getgroups" >&6; }
if test "x$ac_cv_lib_bsd_getgroups" = xyes
then :
  GETGROUPS_LIB=-lbsd
fi

  fi

  # Run the program to test the functionality of the system-supplied
  # getgroups function only if there is such a function.
  if test $ac_cv_func_getgroups = yes; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
printf %s "checking for working getgroups... " >&6; }
if test ${ac_cv_func_getgroups_works+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test "$cross_compiling" = yes
then :
  case "$host_os" in # ((
                           # Guess yes on glibc systems.
            *-gnu* | gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
                           # Guess yes on musl systems.
            *-musl*)       ac_cv_func_getgroups_works="guessing yes" ;;
                           # If we don't know, obey --enable-cross-guesses.
            *)             ac_cv_func_getgroups_works="$gl_cross_guess_normal" ;;
          esac

else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_includes_default
int
main (void)
{
/* On NeXTstep 3.2, getgroups (0, 0) always fails.  */
              return getgroups (0, 0) == -1;
  ;
  return 0;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  ac_cv_func_getgroups_works=yes
else $as_nop
  ac_cv_func_getgroups_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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
printf "%s\n" "$ac_cv_func_getgroups_works" >&6; }
  else
    ac_cv_func_getgroups_works=no
  fi
  case "$ac_cv_func_getgroups_works" in
    *yes)

printf "%s\n" "#define HAVE_GETGROUPS 1" >>confdefs.h

      ;;
  esac
  LIBS=$gl_saved_LIBS


  # Solaris 9 and 10 need -lgen to get the eaccess function.
  # Save and restore LIBS so -lgen isn't added to it.  Otherwise, *all*
  # programs in the package would end up linked with that potentially-shared
  # library, inducing unnecessary run-time overhead.
  EUIDACCESS_LIBGEN=

  gl_saved_libs=$LIBS
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing eaccess" >&5
printf %s "checking for library containing eaccess... " >&6; }
if test ${ac_cv_search_eaccess+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  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.  */
char eaccess ();
int
main (void)
{
return eaccess ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' gen
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_eaccess=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext
  if test ${ac_cv_search_eaccess+y}
then :
  break
fi
done
if test ${ac_cv_search_eaccess+y}
then :

else $as_nop
  ac_cv_search_eaccess=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_eaccess" >&5
printf "%s\n" "$ac_cv_search_eaccess" >&6; }
ac_res=$ac_cv_search_eaccess
if test "$ac_res" != no
then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  test "$ac_cv_search_eaccess" = "none required" ||
                    EUIDACCESS_LIBGEN=$ac_cv_search_eaccess
fi

    ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess"
if test "x$ac_cv_func_eaccess" = xyes
then :
  printf "%s\n" "#define HAVE_EACCESS 1" >>confdefs.h

fi

  LIBS=$gl_saved_libs
  # For backward compatibility.
  LIB_EACCESS="$EUIDACCESS_LIBGEN"



fi









          GL_GNULIB_EUIDACCESS=1





      gl_gnulib_enabled_euidaccess=true
      if test $HAVE_EUIDACCESS = 0; then
        func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1
      fi
      func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c
    fi
  }
  func_gl_gnulib_m4code_getdelim ()
  {
    if $gl_gnulib_enabled_getdelim; then :; else










  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getdelim" >&5
printf %s "checking for getdelim... " >&6; }
if test ${gl_cv_onwards_func_getdelim+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  exec 9>&6 6>/dev/null

       case "$host_os" in

         linux*-android*)
           ac_fn_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "#include <stdio.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_getdelim" = xyes
then :

fi
           if test $ac_cv_have_decl_getdelim = yes; then
             ac_fn_c_check_func "$LINENO" "getdelim" "ac_cv_func_getdelim"
if test "x$ac_cv_func_getdelim" = xyes
then :

fi

             if test $ac_cv_func_getdelim = yes; then
               gl_cv_onwards_func_getdelim=yes
             else
                                                            gl_cv_onwards_func_getdelim='future OS version'
             fi
           else
             gl_cv_onwards_func_getdelim='future OS version'
           fi
           ;;


         *)
           ac_fn_c_check_func "$LINENO" "getdelim" "ac_cv_func_getdelim"
if test "x$ac_cv_func_getdelim" = xyes
then :

fi

           gl_cv_onwards_func_getdelim=$ac_cv_func_getdelim
           ;;

       esac

  exec 6>&9 9>&-


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_getdelim" >&5
printf "%s\n" "$gl_cv_onwards_func_getdelim" >&6; }

  case "$gl_cv_onwards_func_getdelim" in
    future*) ac_cv_func_getdelim=no ;;
    *)       ac_cv_func_getdelim=$gl_cv_onwards_func_getdelim ;;
  esac
  if test $ac_cv_func_getdelim = yes; then

printf "%s\n" "#define HAVE_GETDELIM 1" >>confdefs.h

  fi


  if test $ac_cv_func_getdelim = yes; then
    HAVE_GETDELIM=1
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5
printf %s "checking for working getdelim function... " >&6; }
if test ${gl_cv_func_working_getdelim+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  case "$host_os" in
         darwin*)
                                                                             gl_cv_func_working_getdelim=no ;;
         *)
           echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
           if test "$cross_compiling" = yes
then :
                              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <features.h>
#ifdef __GNU_LIBRARY__
 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
  Lucky GNU user
 #endif
#endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "Lucky GNU user" >/dev/null 2>&1
then :
  gl_cv_func_working_getdelim="guessing yes"
else $as_nop
  case "$host_os" in
                   *-musl* | midipix*) gl_cv_func_working_getdelim="guessing yes" ;;
                   *)                  gl_cv_func_working_getdelim="$gl_cross_guess_normal" ;;
                 esac

fi
rm -rf conftest*


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

#    include <stdio.h>
#    include <stdlib.h>
#    include <string.h>
    int main ()
    {
      FILE *in = fopen ("./conftest.data", "r");
      if (!in)
        return 1;
      {
        /* Test result for a NULL buffer and a zero size.
           Based on a test program from Karl Heuer.  */
        char *line = NULL;
        size_t siz = 0;
        int len = getdelim (&line, &siz, '\n', in);
        if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
          { free (line); fclose (in); return 2; }
        free (line);
      }
      {
        /* Test result for a NULL buffer and a non-zero size.
           This crashes on FreeBSD 8.0.  */
        char *line = NULL;
        size_t siz = (size_t)(~0) / 4;
        if (getdelim (&line, &siz, '\n', in) == -1)
          { fclose (in); return 3; }
        free (line);
      }
      fclose (in);
      return 0;
    }

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  gl_cv_func_working_getdelim=yes
else $as_nop
  gl_cv_func_working_getdelim=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

           ;;
       esac

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5
printf "%s\n" "$gl_cv_func_working_getdelim" >&6; }
    case "$gl_cv_func_working_getdelim" in
      *yes) ;;
      *) REPLACE_GETDELIM=1 ;;
    esac
  else
    HAVE_GETDELIM=0
    case "$gl_cv_onwards_func_getdelim" in
      future*) REPLACE_GETDELIM=1 ;;
    esac
  fi

  if test $ac_cv_have_decl_getdelim = no; then
    HAVE_DECL_GETDELIM=0
  fi


    test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1 && GL_COND_OBJ_GETDELIM_CONDITION=1 || GL_COND_OBJ_GETDELIM_CONDITION=

    if test -z "${GL_COND_OBJ_GETDELIM_TRUE}" && test -z "${GL_COND_OBJ_GETDELIM_FALSE}"; then
    GL_COND_OBJ_GETDELIM_TRUE='#'
    GL_COND_OBJ_GETDELIM_FALSE='#'
  fi

      if test "$GL_COND_OBJ_GETDELIM_CONDITION"
then :


  ac_fn_c_check_func "$LINENO" "flockfile" "ac_cv_func_flockfile"
if test "x$ac_cv_func_flockfile" = xyes
then :
  printf "%s\n" "#define HAVE_FLOCKFILE 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "funlockfile" "ac_cv_func_funlockfile"
if test "x$ac_cv_func_funlockfile" = xyes
then :
  printf "%s\n" "#define HAVE_FUNLOCKFILE 1" >>confdefs.h

fi

  ac_fn_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_getc_unlocked" = xyes
then :
  ac_have_decl=1
else $as_nop
  ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl" >>confdefs.h



fi









          GL_GNULIB_GETDELIM=1





      gl_gnulib_enabled_getdelim=true
    fi
  }
  func_gl_gnulib_m4code_getdtablesize ()
  {
    if $gl_gnulib_enabled_getdtablesize; then :; else





  if test $ac_cv_func_getdtablesize = yes &&
     test $ac_cv_have_decl_getdtablesize = yes; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
printf %s "checking whether getdtablesize works... " >&6; }
if test ${gl_cv_func_getdtablesize_works+y}
then :
  printf %s "(cached) " >&6
else $as_nop
                                                   case "$host_os" in
         vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
         *)
                                                       if test "$cross_compiling" = yes
then :
  case "$host_os" in
                cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
                  gl_cv_func_getdtablesize_works="guessing no" ;;
                *) gl_cv_func_getdtablesize_works="guessing yes" ;;
              esac

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

             #include <unistd.h>


$gl_mda_defines


int
main (void)
{
int size = getdtablesize();
                 if (dup2 (0, getdtablesize()) != -1)
                   return 1;
                 if (size != getdtablesize())
                   return 2;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  gl_cv_func_getdtablesize_works=yes
else $as_nop
  gl_cv_func_getdtablesize_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

           ;;
       esac

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
printf "%s\n" "$gl_cv_func_getdtablesize_works" >&6; }
    case "$gl_cv_func_getdtablesize_works" in
      *yes | "no (limitation)") ;;
      *) REPLACE_GETDTABLESIZE=1 ;;
    esac
  else
    HAVE_GETDTABLESIZE=0
  fi


    test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1 && GL_COND_OBJ_GETDTABLESIZE_CONDITION=1 || GL_COND_OBJ_GETDTABLESIZE_CONDITION=

    if test -z "${GL_COND_OBJ_GETDTABLESIZE_TRUE}" && test -z "${GL_COND_OBJ_GETDTABLESIZE_FALSE}"; then
    GL_COND_OBJ_GETDTABLESIZE_TRUE='#'
    GL_COND_OBJ_GETDTABLESIZE_FALSE='#'
  fi

      if test "$GL_COND_OBJ_GETDTABLESIZE_CONDITION"
then :

        :

fi









          GL_GNULIB_GETDTABLESIZE=1





      gl_gnulib_enabled_getdtablesize=true
    fi
  }
  func_gl_gnulib_m4code_getgroups ()
  {
    if $gl_gnulib_enabled_getgroups; then :; else





        ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
if test "x$ac_cv_func_getgroups" = xyes
then :

fi


  # If we don't yet have getgroups, see if it's in -lbsd.
  # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
  gl_saved_LIBS=$LIBS
  if test $ac_cv_func_getgroups = no; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
printf %s "checking for getgroups in -lbsd... " >&6; }
if test ${ac_cv_lib_bsd_getgroups+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  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.  */
char getgroups ();
int
main (void)
{
return getgroups ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_bsd_getgroups=yes
else $as_nop
  ac_cv_lib_bsd_getgroups=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
printf "%s\n" "$ac_cv_lib_bsd_getgroups" >&6; }
if test "x$ac_cv_lib_bsd_getgroups" = xyes
then :
  GETGROUPS_LIB=-lbsd
fi

  fi

  # Run the program to test the functionality of the system-supplied
  # getgroups function only if there is such a function.
  if test $ac_cv_func_getgroups = yes; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
printf %s "checking for working getgroups... " >&6; }
if test ${ac_cv_func_getgroups_works+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test "$cross_compiling" = yes
then :
  case "$host_os" in # ((
                           # Guess yes on glibc systems.
            *-gnu* | gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
                           # Guess yes on musl systems.
            *-musl*)       ac_cv_func_getgroups_works="guessing yes" ;;
                           # If we don't know, obey --enable-cross-guesses.
            *)             ac_cv_func_getgroups_works="$gl_cross_guess_normal" ;;
          esac

else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_includes_default
int
main (void)
{
/* On NeXTstep 3.2, getgroups (0, 0) always fails.  */
              return getgroups (0, 0) == -1;
  ;
  return 0;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  ac_cv_func_getgroups_works=yes
else $as_nop
  ac_cv_func_getgroups_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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
printf "%s\n" "$ac_cv_func_getgroups_works" >&6; }
  else
    ac_cv_func_getgroups_works=no
  fi
  case "$ac_cv_func_getgroups_works" in
    *yes)

printf "%s\n" "#define HAVE_GETGROUPS 1" >>confdefs.h

      ;;
  esac
  LIBS=$gl_saved_LIBS

  if test $ac_cv_func_getgroups != yes; then
    HAVE_GETGROUPS=0
  else
    if test "$ac_cv_type_getgroups" != gid_t \
       || { case "$ac_cv_func_getgroups_works" in
              *yes) false;;
              *) true;;
            esac
          }; then
      REPLACE_GETGROUPS=1

printf "%s\n" "#define GETGROUPS_ZERO_BUG 1" >>confdefs.h

    else
                  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getgroups handles negative values" >&5
printf %s "checking whether getgroups handles negative values... " >&6; }
if test ${gl_cv_func_getgroups_works+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test "$cross_compiling" = yes
then :
  case "$host_os" in
                            # Guess yes on glibc systems.
             *-gnu* | gnu*) gl_cv_func_getgroups_works="guessing yes" ;;
                            # Guess yes on musl systems.
             *-musl*)       gl_cv_func_getgroups_works="guessing yes" ;;
                            # If we don't know, obey --enable-cross-guesses.
             *)             gl_cv_func_getgroups_works="$gl_cross_guess_normal" ;;
           esac

else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_includes_default
int
main (void)
{
int size = getgroups (0, 0);
            gid_t *list = malloc (size * sizeof *list);
            int result = getgroups (-1, list) != -1;
            free (list);
            return result;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  gl_cv_func_getgroups_works=yes
else $as_nop
  gl_cv_func_getgroups_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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getgroups_works" >&5
printf "%s\n" "$gl_cv_func_getgroups_works" >&6; }
      case "$gl_cv_func_getgroups_works" in
        *yes) ;;
        *) REPLACE_GETGROUPS=1 ;;
      esac
    fi
  fi
  test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS"


    test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1 && GL_COND_OBJ_GETGROUPS_CONDITION=1 || GL_COND_OBJ_GETGROUPS_CONDITION=

    if test -z "${GL_COND_OBJ_GETGROUPS_TRUE}" && test -z "${GL_COND_OBJ_GETGROUPS_FALSE}"; then
    GL_COND_OBJ_GETGROUPS_TRUE='#'
    GL_COND_OBJ_GETGROUPS_FALSE='#'
  fi










          GL_GNULIB_GETGROUPS=1





      gl_gnulib_enabled_getgroups=true
      if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then
        func_gl_gnulib_m4code_ef455225c00f5049c808c2eda3e76866
      fi
    fi
  }
  func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 ()
  {
    if $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then :; else


      gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true
    fi
  }
  func_gl_gnulib_m4code_fd38c7e463b54744b77b98aeafb4fa7c ()
  {
    if $gl_gnulib_enabled_fd38c7e463b54744b77b98aeafb4fa7c; then :; else

      gl_gnulib_enabled_fd38c7e463b54744b77b98aeafb4fa7c=true
    fi
  }
  func_gl_gnulib_m4code_8444034ea779b88768865bb60b4fb8c9 ()
  {
    if $gl_gnulib_enabled_8444034ea779b88768865bb60b4fb8c9; then :; else

      gl_gnulib_enabled_8444034ea779b88768865bb60b4fb8c9=true
      func_gl_gnulib_m4code_ef455225c00f5049c808c2eda3e76866
      func_gl_gnulib_m4code_61bcaca76b3e6f9ae55d57a1c3193bc4
    fi
  }
  func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1 ()
  {
    if $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then :; else





      ac_fn_c_check_func "$LINENO" "group_member" "ac_cv_func_group_member"
if test "x$ac_cv_func_group_member" = xyes
then :

else $as_nop

    HAVE_GROUP_MEMBER=0

fi



    test $HAVE_GROUP_MEMBER = 0 && GL_COND_OBJ_GROUP_MEMBER_CONDITION=1 || GL_COND_OBJ_GROUP_MEMBER_CONDITION=

    if test -z "${GL_COND_OBJ_GROUP_MEMBER_TRUE}" && test -z "${GL_COND_OBJ_GROUP_MEMBER_FALSE}"; then
    GL_COND_OBJ_GROUP_MEMBER_TRUE='#'
    GL_COND_OBJ_GROUP_MEMBER_FALSE='#'
  fi

      if test "$GL_COND_OBJ_GROUP_MEMBER_CONDITION"
then :





fi









          GL_GNULIB_GROUP_MEMBER=1





      gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=true
      if test $HAVE_GROUP_MEMBER = 0; then
        func_gl_gnulib_m4code_getgroups
      fi
      if test $HAVE_GROUP_MEMBER = 0; then
        func_gl_gnulib_m4code_d3b2383720ee0e541357aa2aac598e2b
      fi
    fi
  }
  func_gl_gnulib_m4code_lchmod ()
  {
    if $gl_gnulib_enabled_lchmod; then :; else






  if test "$ac_cv_func_lchmod" = no; then
    HAVE_LCHMOD=0
  fi


    test $HAVE_LCHMOD = 0 && GL_COND_OBJ_LCHMOD_CONDITION=1 || GL_COND_OBJ_LCHMOD_CONDITION=

    if test -z "${GL_COND_OBJ_LCHMOD_TRUE}" && test -z "${GL_COND_OBJ_LCHMOD_FALSE}"; then
    GL_COND_OBJ_LCHMOD_TRUE='#'
    GL_COND_OBJ_LCHMOD_FALSE='#'
  fi

      if test "$GL_COND_OBJ_LCHMOD_CONDITION"
then :


  :


fi









          GL_GNULIB_LCHMOD=1





      gl_gnulib_enabled_lchmod=true
    fi
  }
  func_gl_gnulib_m4code_e80bf6f757095d2e5fc94dafb8f8fc8b ()
  {
    if $gl_gnulib_enabled_e80bf6f757095d2e5fc94dafb8f8fc8b; then :; else



  REPLACE_MALLOC_FOR_MALLOC_GNU="$REPLACE_MALLOC_FOR_MALLOC_POSIX"
  if test $REPLACE_MALLOC_FOR_MALLOC_GNU = 0; then

    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc (0) returns nonnull" >&5
printf %s "checking whether malloc (0) returns nonnull... " >&6; }
if test ${ac_cv_func_malloc_0_nonnull+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test "$cross_compiling" = yes
then :
  case "$host_os" in
          # Guess yes on platforms where we know the result.
          *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
          | gnu* | *-musl* | midipix* | midnightbsd* \
          | hpux* | solaris* | cygwin* | mingw* | windows* | msys* )
            ac_cv_func_malloc_0_nonnull="guessing yes" ;;
          # If we don't know, obey --enable-cross-guesses.
          *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
        esac

else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdlib.h>

int
main (void)
{
void *p = malloc (0);
            void * volatile vp = p;
            int result = !vp;
            free (p);
            return result;
  ;
  return 0;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  ac_cv_func_malloc_0_nonnull=yes
else $as_nop
  ac_cv_func_malloc_0_nonnull=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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
  case $ac_cv_func_malloc_0_nonnull in #(
  *yes) :
     ;; #(
  *) :
    REPLACE_MALLOC_FOR_MALLOC_GNU=1 ;;
esac

  fi

      if test $REPLACE_MALLOC_FOR_MALLOC_GNU = 1; then








  gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"

      fi









          GL_GNULIB_MALLOC_GNU=1





      gl_gnulib_enabled_e80bf6f757095d2e5fc94dafb8f8fc8b=true
      func_gl_gnulib_m4code_ef455225c00f5049c808c2eda3e76866
      if test $REPLACE_MALLOC_FOR_MALLOC_GNU = 1; then
        func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec
      fi
    fi
  }
  func_gl_gnulib_m4code_ef455225c00f5049c808c2eda3e76866 ()
  {
    if $gl_gnulib_enabled_ef455225c00f5049c808c2eda3e76866; then :; else

      if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then








  gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"

      fi









          GL_GNULIB_MALLOC_POSIX=1





      gl_gnulib_enabled_ef455225c00f5049c808c2eda3e76866=true
      if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
        func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec
      fi
    fi
  }
  func_gl_gnulib_m4code_5264294aa0a5557541b53c8c741f7f31 ()
  {
    if $gl_gnulib_enabled_5264294aa0a5557541b53c8c741f7f31; then :; else



  WANT_MKTIME_INTERNAL=0
    ac_fn_c_check_func "$LINENO" "__mktime_internal" "ac_cv_func___mktime_internal"
if test "x$ac_cv_func___mktime_internal" = xyes
then :

printf "%s\n" "#define mktime_internal __mktime_internal" >>confdefs.h


else $as_nop
            WANT_MKTIME_INTERNAL=1

printf "%s\n" "#define NEED_MKTIME_INTERNAL 1" >>confdefs.h


fi


      if test $WANT_MKTIME_INTERNAL = 1; then








  gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"

        :
      fi
      gl_gnulib_enabled_5264294aa0a5557541b53c8c741f7f31=true
    fi
  }
  func_gl_gnulib_m4code_open ()
  {
    if $gl_gnulib_enabled_open; then :; else



  case "$host_os" in
    mingw* | windows* | pw*)
      REPLACE_OPEN=1
      ;;
    *)

      if test "$gl_cv_macro_O_CLOEXEC" != yes; then
        REPLACE_OPEN=1
      fi


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
printf %s "checking whether open recognizes a trailing slash... " >&6; }
if test ${gl_cv_func_open_slash+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  # Assume that if we have lstat, we can also check symlinks.
     if test $ac_cv_func_lstat = yes; then
       touch conftest.tmp
       ln -s conftest.tmp conftest.lnk
     fi
     if test "$cross_compiling" = yes
then :

        case "$host_os" in
          freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
            gl_cv_func_open_slash="guessing no" ;;
          *)
            gl_cv_func_open_slash="guessing yes" ;;
        esac

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

#include <fcntl.h>
#if HAVE_UNISTD_H
# include <unistd.h>
#endif


$gl_mda_defines

int main ()
{
  int result = 0;
#if HAVE_LSTAT
  if (open ("conftest.lnk/", O_RDONLY) != -1)
    result |= 1;
#endif
  if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
    result |= 2;
  return result;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  gl_cv_func_open_slash=yes
else $as_nop
  gl_cv_func_open_slash=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 conftest.sl conftest.tmp conftest.lnk

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
printf "%s\n" "$gl_cv_func_open_slash" >&6; }
  case "$gl_cv_func_open_slash" in
    *no)

printf "%s\n" "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h

      ;;
  esac

      case "$gl_cv_func_open_slash" in
        *no)
          REPLACE_OPEN=1
          ;;
      esac
      ;;
  esac




    test $REPLACE_OPEN = 1 && GL_COND_OBJ_OPEN_CONDITION=1 || GL_COND_OBJ_OPEN_CONDITION=

    if test -z "${GL_COND_OBJ_OPEN_TRUE}" && test -z "${GL_COND_OBJ_OPEN_FALSE}"; then
    GL_COND_OBJ_OPEN_TRUE='#'
    GL_COND_OBJ_OPEN_FALSE='#'
  fi

      if test "$GL_COND_OBJ_OPEN_CONDITION"
then :



  :


fi









          GL_GNULIB_OPEN=1





      gl_gnulib_enabled_open=true
      if test $REPLACE_OPEN = 1; then
        func_gl_gnulib_m4code_cloexec
      fi
    fi
  }
  func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7 ()
  {
    if $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7; then :; else
      gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=true
    fi
  }
  func_gl_gnulib_m4code_rawmemchr ()
  {
    if $gl_gnulib_enabled_rawmemchr; then :; else




  ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
if test "x$ac_cv_func_rawmemchr" = xyes
then :
  printf "%s\n" "#define HAVE_RAWMEMCHR 1" >>confdefs.h

fi

  if test $ac_cv_func_rawmemchr = no; then
    HAVE_RAWMEMCHR=0
  fi


    test $HAVE_RAWMEMCHR = 0 && GL_COND_OBJ_RAWMEMCHR_CONDITION=1 || GL_COND_OBJ_RAWMEMCHR_CONDITION=

    if test -z "${GL_COND_OBJ_RAWMEMCHR_TRUE}" && test -z "${GL_COND_OBJ_RAWMEMCHR_FALSE}"; then
    GL_COND_OBJ_RAWMEMCHR_TRUE='#'
    GL_COND_OBJ_RAWMEMCHR_FALSE='#'
  fi

      if test "$GL_COND_OBJ_RAWMEMCHR_CONDITION"
then :

        :

fi














          GL_GNULIB_RAWMEMCHR=1





      gl_gnulib_enabled_rawmemchr=true
    fi
  }
  func_gl_gnulib_m4code_d3b2383720ee0e541357aa2aac598e2b ()
  {
    if $gl_gnulib_enabled_d3b2383720ee0e541357aa2aac598e2b; then :; else



  if test $REPLACE_REALLOC_FOR_REALLOC_GNU = 0; then

    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether realloc (0, 0) returns nonnull" >&5
printf %s "checking whether realloc (0, 0) returns nonnull... " >&6; }
if test ${ac_cv_func_realloc_0_nonnull+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test "$cross_compiling" = yes
then :
  case "$host_os" in
          # Guess yes on platforms where we know the result.
          *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
          | gnu* | *-musl* | midipix* | midnightbsd* \
          | hpux* | solaris* | cygwin* | mingw* | windows* | msys* )
            ac_cv_func_realloc_0_nonnull="guessing yes" ;;
          # If we don't know, obey --enable-cross-guesses.
          *) ac_cv_func_realloc_0_nonnull="$gl_cross_guess_normal" ;;
        esac

else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdlib.h>

int
main (void)
{
void *p = realloc (0, 0);
            void * volatile vp = p;
            int result = !vp;
            free (p);
            return result;
  ;
  return 0;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  ac_cv_func_realloc_0_nonnull=yes
else $as_nop
  ac_cv_func_realloc_0_nonnull=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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
printf "%s\n" "$ac_cv_func_realloc_0_nonnull" >&6; }
  case $ac_cv_func_realloc_0_nonnull in #(
  *yes) :
     ;; #(
  *) :
    REPLACE_REALLOC_FOR_REALLOC_GNU=1 ;;
esac

  fi

      if test $REPLACE_REALLOC_FOR_REALLOC_GNU = 1; then








  gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"

      fi









          GL_GNULIB_REALLOC_GNU=1





      gl_gnulib_enabled_d3b2383720ee0e541357aa2aac598e2b=true
      if test $REPLACE_REALLOC_FOR_REALLOC_GNU = 1; then
        func_gl_gnulib_m4code_e80bf6f757095d2e5fc94dafb8f8fc8b
      fi
      func_gl_gnulib_m4code_61bcaca76b3e6f9ae55d57a1c3193bc4
      if test $REPLACE_REALLOC_FOR_REALLOC_GNU = 1; then
        func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec
      fi
    fi
  }
  func_gl_gnulib_m4code_61bcaca76b3e6f9ae55d57a1c3193bc4 ()
  {
    if $gl_gnulib_enabled_61bcaca76b3e6f9ae55d57a1c3193bc4; then :; else



  if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
    REPLACE_REALLOC_FOR_REALLOC_POSIX=1
  fi

      if test $REPLACE_REALLOC_FOR_REALLOC_POSIX = 1; then








  gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"

      fi









          GL_GNULIB_REALLOC_POSIX=1





      gl_gnulib_enabled_61bcaca76b3e6f9ae55d57a1c3193bc4=true
      if test $REPLACE_REALLOC_FOR_REALLOC_POSIX = 1; then
        func_gl_gnulib_m4code_ef455225c00f5049c808c2eda3e76866
      fi
      if test $REPLACE_REALLOC_FOR_REALLOC_POSIX = 1; then
        func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec
      fi
    fi
  }
  func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c ()
  {
    if $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then :; else
      gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=true
    fi
  }
  func_gl_gnulib_m4code_strtoll ()
  {
    if $gl_gnulib_enabled_strtoll; then :; else



  ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
if test "x$ac_cv_func_strtoll" = xyes
then :
  printf "%s\n" "#define HAVE_STRTOLL 1" >>confdefs.h

fi

  if test $ac_cv_func_strtoll = yes; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strtoll works" >&5
printf %s "checking whether strtoll works... " >&6; }
if test ${gl_cv_func_strtoll_works+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test "$cross_compiling" = yes
then :
  case "$host_os" in
                                # Guess no on native Windows.
            mingw* | windows*)  gl_cv_func_strtoll_works="guessing no" ;;
                                # Guess no on glibc systems.
            *-gnu* | gnu*)      gl_cv_func_strtoll_works="guessing no" ;;
                                # Guess no on musl systems.
            *-musl* | midipix*) gl_cv_func_strtoll_works="guessing no" ;;
            *)                  gl_cv_func_strtoll_works="$gl_cross_guess_normal" ;;
          esac

else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdlib.h>
int
main (void)
{
int result = 0;
              char *term;
              /* This test fails on Minix and native Windows.  */
              {
                static char const input[2][3] = {"0x", "0b"};
                static int const base[] = {0, 2, 10};
                int i, j;
                for (i = 0; i < 2; i++)
                  for (j = 0; j < 3; j++)
                    {
                      (void) strtoll (input[i], &term, base[j]);
                      if (term != input[i] + 1)
                        result |= 1;
                    }
              }
              /* This test fails on pre-C23 platforms.  */
              {
                const char input[] = "0b1";
                (void) strtoll (input, &term, 2);
                if (term != input + 3)
                  result |= 2;
              }
              return result;

  ;
  return 0;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  gl_cv_func_strtoll_works=yes
else $as_nop
  gl_cv_func_strtoll_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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoll_works" >&5
printf "%s\n" "$gl_cv_func_strtoll_works" >&6; }
    case "$gl_cv_func_strtoll_works" in
      *yes) ;;
      *)    REPLACE_STRTOLL=1 ;;
    esac
  else
    HAVE_STRTOLL=0
  fi


    test $HAVE_STRTOLL = 0 || test $REPLACE_STRTOLL = 1 && GL_COND_OBJ_STRTOLL_CONDITION=1 || GL_COND_OBJ_STRTOLL_CONDITION=

    if test -z "${GL_COND_OBJ_STRTOLL_TRUE}" && test -z "${GL_COND_OBJ_STRTOLL_FALSE}"; then
    GL_COND_OBJ_STRTOLL_TRUE='#'
    GL_COND_OBJ_STRTOLL_FALSE='#'
  fi

      if test "$GL_COND_OBJ_STRTOLL_CONDITION"
then :


  :


fi









          GL_GNULIB_STRTOLL=1





      gl_gnulib_enabled_strtoll=true
    fi
  }
  func_gl_gnulib_m4code_utimens ()
  {
    if $gl_gnulib_enabled_utimens; then :; else





  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for futimes" >&5
printf %s "checking for futimes... " >&6; }
if test ${gl_cv_onwards_func_futimes+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  exec 9>&6 6>/dev/null

       case "$host_os" in

         linux*-android*)
           ac_fn_check_decl "$LINENO" "futimes" "ac_cv_have_decl_futimes" "#include <sys/time.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_futimes" = xyes
then :

fi
           if test $ac_cv_have_decl_futimes = yes; then
             ac_fn_c_check_func "$LINENO" "futimes" "ac_cv_func_futimes"
if test "x$ac_cv_func_futimes" = xyes
then :

fi

             if test $ac_cv_func_futimes = yes; then
               gl_cv_onwards_func_futimes=yes
             else
                                                            gl_cv_onwards_func_futimes='future OS version'
             fi
           else
             gl_cv_onwards_func_futimes='future OS version'
           fi
           ;;


         *)
           ac_fn_c_check_func "$LINENO" "futimes" "ac_cv_func_futimes"
if test "x$ac_cv_func_futimes" = xyes
then :

fi

           gl_cv_onwards_func_futimes=$ac_cv_func_futimes
           ;;

       esac

  exec 6>&9 9>&-


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_futimes" >&5
printf "%s\n" "$gl_cv_onwards_func_futimes" >&6; }

  case "$gl_cv_onwards_func_futimes" in
    future*) ac_cv_func_futimes=no ;;
    *)       ac_cv_func_futimes=$gl_cv_onwards_func_futimes ;;
  esac
  if test $ac_cv_func_futimes = yes; then

printf "%s\n" "#define HAVE_FUTIMES 1" >>confdefs.h

  fi




  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for futimesat" >&5
printf %s "checking for futimesat... " >&6; }
if test ${gl_cv_onwards_func_futimesat+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  exec 9>&6 6>/dev/null

       case "$host_os" in

         linux*-android*)
           ac_fn_check_decl "$LINENO" "futimesat" "ac_cv_have_decl_futimesat" "#include <sys/time.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_futimesat" = xyes
then :

fi
           if test $ac_cv_have_decl_futimesat = yes; then
             ac_fn_c_check_func "$LINENO" "futimesat" "ac_cv_func_futimesat"
if test "x$ac_cv_func_futimesat" = xyes
then :

fi

             if test $ac_cv_func_futimesat = yes; then
               gl_cv_onwards_func_futimesat=yes
             else
                                                            gl_cv_onwards_func_futimesat='future OS version'
             fi
           else
             gl_cv_onwards_func_futimesat='future OS version'
           fi
           ;;


         *)
           ac_fn_c_check_func "$LINENO" "futimesat" "ac_cv_func_futimesat"
if test "x$ac_cv_func_futimesat" = xyes
then :

fi

           gl_cv_onwards_func_futimesat=$ac_cv_func_futimesat
           ;;

       esac

  exec 6>&9 9>&-


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_futimesat" >&5
printf "%s\n" "$gl_cv_onwards_func_futimesat" >&6; }

  case "$gl_cv_onwards_func_futimesat" in
    future*) ac_cv_func_futimesat=no ;;
    *)       ac_cv_func_futimesat=$gl_cv_onwards_func_futimesat ;;
  esac
  if test $ac_cv_func_futimesat = yes; then

printf "%s\n" "#define HAVE_FUTIMESAT 1" >>confdefs.h

  fi




  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lutimes" >&5
printf %s "checking for lutimes... " >&6; }
if test ${gl_cv_onwards_func_lutimes+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  exec 9>&6 6>/dev/null

       case "$host_os" in

         linux*-android*)
           ac_fn_check_decl "$LINENO" "lutimes" "ac_cv_have_decl_lutimes" "#include <sys/time.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_lutimes" = xyes
then :

fi
           if test $ac_cv_have_decl_lutimes = yes; then
             ac_fn_c_check_func "$LINENO" "lutimes" "ac_cv_func_lutimes"
if test "x$ac_cv_func_lutimes" = xyes
then :

fi

             if test $ac_cv_func_lutimes = yes; then
               gl_cv_onwards_func_lutimes=yes
             else
                                                            gl_cv_onwards_func_lutimes='future OS version'
             fi
           else
             gl_cv_onwards_func_lutimes='future OS version'
           fi
           ;;


         *)
           ac_fn_c_check_func "$LINENO" "lutimes" "ac_cv_func_lutimes"
if test "x$ac_cv_func_lutimes" = xyes
then :

fi

           gl_cv_onwards_func_lutimes=$ac_cv_func_lutimes
           ;;

       esac

  exec 6>&9 9>&-


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_lutimes" >&5
printf "%s\n" "$gl_cv_onwards_func_lutimes" >&6; }

  case "$gl_cv_onwards_func_lutimes" in
    future*) ac_cv_func_lutimes=no ;;
    *)       ac_cv_func_lutimes=$gl_cv_onwards_func_lutimes ;;
  esac
  if test $ac_cv_func_lutimes = yes; then

printf "%s\n" "#define HAVE_LUTIMES 1" >>confdefs.h

  fi




  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for futimens" >&5
printf %s "checking for futimens... " >&6; }
if test ${gl_cv_onwards_func_futimens+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  exec 9>&6 6>/dev/null

       case "$host_os" in

         linux*-android*)
           ac_fn_check_decl "$LINENO" "futimens" "ac_cv_have_decl_futimens" "#include <sys/stat.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_futimens" = xyes
then :

fi
           if test $ac_cv_have_decl_futimens = yes; then
             ac_fn_c_check_func "$LINENO" "futimens" "ac_cv_func_futimens"
if test "x$ac_cv_func_futimens" = xyes
then :

fi

             if test $ac_cv_func_futimens = yes; then
               gl_cv_onwards_func_futimens=yes
             else
                                                            gl_cv_onwards_func_futimens='future OS version'
             fi
           else
             gl_cv_onwards_func_futimens='future OS version'
           fi
           ;;


         *)
           ac_fn_c_check_func "$LINENO" "futimens" "ac_cv_func_futimens"
if test "x$ac_cv_func_futimens" = xyes
then :

fi

           gl_cv_onwards_func_futimens=$ac_cv_func_futimens
           ;;

       esac

  exec 6>&9 9>&-


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_futimens" >&5
printf "%s\n" "$gl_cv_onwards_func_futimens" >&6; }

  case "$gl_cv_onwards_func_futimens" in
    future*) ac_cv_func_futimens=no ;;
    *)       ac_cv_func_futimens=$gl_cv_onwards_func_futimens ;;
  esac
  if test $ac_cv_func_futimens = yes; then

printf "%s\n" "#define HAVE_FUTIMENS 1" >>confdefs.h

  fi




  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for utimensat" >&5
printf %s "checking for utimensat... " >&6; }
if test ${gl_cv_onwards_func_utimensat+y}
then :
  printf %s "(cached) " >&6
else $as_nop

  exec 9>&6 6>/dev/null

       case "$host_os" in

         linux*-android*)
           ac_fn_check_decl "$LINENO" "utimensat" "ac_cv_have_decl_utimensat" "#include <sys/stat.h>
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_utimensat" = xyes
then :

fi
           if test $ac_cv_have_decl_utimensat = yes; then
             ac_fn_c_check_func "$LINENO" "utimensat" "ac_cv_func_utimensat"
if test "x$ac_cv_func_utimensat" = xyes
then :

fi

             if test $ac_cv_func_utimensat = yes; then
               gl_cv_onwards_func_utimensat=yes
             else
                                                            gl_cv_onwards_func_utimensat='future OS version'
             fi
           else
             gl_cv_onwards_func_utimensat='future OS version'
           fi
           ;;


         *)
           ac_fn_c_check_func "$LINENO" "utimensat" "ac_cv_func_utimensat"
if test "x$ac_cv_func_utimensat" = xyes
then :

fi

           gl_cv_onwards_func_utimensat=$ac_cv_func_utimensat
           ;;

       esac

  exec 6>&9 9>&-


fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_utimensat" >&5
printf "%s\n" "$gl_cv_onwards_func_utimensat" >&6; }

  case "$gl_cv_onwards_func_utimensat" in
    future*) ac_cv_func_utimensat=no ;;
    *)       ac_cv_func_utimensat=$gl_cv_onwards_func_utimensat ;;
  esac
  if test $ac_cv_func_utimensat = yes; then

printf "%s\n" "#define HAVE_UTIMENSAT 1" >>confdefs.h

  fi



  if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
printf %s "checking whether futimesat handles NULL file... " >&6; }
if test ${gl_cv_func_futimesat_works+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  touch conftest.file
       if test "$cross_compiling" = yes
then :
  case "$host_os" in
                              # Guess yes on Linux systems
                              # and on systems that emulate the Linux system calls.
           linux* | midipix*) gl_cv_func_futimesat_works="guessing yes" ;;
                              # Guess yes on glibc systems.
           *-gnu*)            gl_cv_func_futimesat_works="guessing yes" ;;
                              # If we don't know, obey --enable-cross-guesses.
           *)                 gl_cv_func_futimesat_works="$gl_cross_guess_normal" ;;
         esac

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

#include <stddef.h>
#include <sys/times.h>
#include <fcntl.h>


$gl_mda_defines

int
main (void)
{
int fd = open ("conftest.file", O_RDWR);
          if (fd < 0) return 1;
          if (futimesat (fd, NULL, NULL)) return 2;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
  gl_cv_func_futimesat_works=yes
else $as_nop
  gl_cv_func_futimesat_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

      rm -f conftest.file
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
printf "%s\n" "$gl_cv_func_futimesat_works" >&6; }
    case "$gl_cv_func_futimesat_works" in
      *yes) ;;
      *)

printf "%s\n" "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h

        ;;
    esac
  fi

      gl_gnulib_enabled_utimens=true
    fi
  }
  func_gl_gnulib_m4code_verify ()
  {
    if $gl_gnulib_enabled_verify; then :; else
      gl_gnulib_enabled_verify=true
    fi
  }
  func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec ()
  {
    if $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then :; else
      gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=true
    fi
  }
  if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
    func_gl_gnulib_m4code_925677f0343de64b89a9f0c790b4104c
  fi
  if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
    func_gl_gnulib_m4code_8444034ea779b88768865bb60b4fb8c9
  fi
  if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
    func_gl_gnulib_m4code_rawmemchr
  fi
  if test $HAVE_FACCESSAT = 0 || test $REPLACE_FACCESSAT = 1; then
    func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
  fi
  if test $HAVE_FACCESSAT = 0 || test $REPLACE_FACCESSAT = 1; then
    func_gl_gnulib_m4code_euidaccess
  fi
  if test $HAVE_FACCESSAT = 0 || test $REPLACE_FACCESSAT = 1; then
    func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
  fi
  if test $HAVE_FCHMODAT = 0; then
    func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
  fi
  if test $HAVE_FCHMODAT = 0; then
    func_gl_gnulib_m4code_lchmod
  fi
  if test $HAVE_FCHMODAT = 0; then
    func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
  fi
  if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
    func_gl_gnulib_m4code_getdtablesize
  fi
  if test $HAVE_FDOPENDIR = 0; then
    func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
  fi
  if test $HAVE_FDOPENDIR = 0; then
    func_gl_gnulib_m4code_dirfd
  fi
  if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
    func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
  fi
  if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
    func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
  fi
  if test $HAVE_FUTIMENS = 0 || test $REPLACE_FUTIMENS = 1; then
    func_gl_gnulib_m4code_utimens
  fi
  if test $REPLACE_GETLINE = 1; then
    func_gl_gnulib_m4code_getdelim
  fi
  if case $host_os in mingw* | windows*) false;; *) test $HAVE_GETLOADAVG = 0 || test $REPLACE_GETLOADAVG = 1;; esac; then
    func_gl_gnulib_m4code_open
  fi
  if test $REPLACE_GETOPT = 1; then
    func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36
  fi
  if case $host_os in mingw* | windows*) false;; *) test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1;; esac; then
    func_gl_gnulib_m4code_open
  fi
  if $GL_GENERATE_IEEE754_H; then
    func_gl_gnulib_m4code_endian
  fi
  if test $REPLACE_MKTIME = 1; then
    func_gl_gnulib_m4code_verify
  fi
  if test $HAVE_READLINKAT = 0 || test $REPLACE_READLINKAT = 1; then
    func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
  fi
  if test $HAVE_READLINKAT = 0 || test $REPLACE_READLINKAT = 1; then
    func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
  fi
  if test $ac_use_included_regex = yes; then
    func_gl_gnulib_m4code_fd38c7e463b54744b77b98aeafb4fa7c
  fi
  if test $ac_use_included_regex = yes; then
    func_gl_gnulib_m4code_verify
  fi
  if test $HAVE_DECL_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
    func_gl_gnulib_m4code_strtoll
  fi
  if test $HAVE_TIMEGM = 0 || test $REPLACE_TIMEGM = 1; then
    func_gl_gnulib_m4code_5264294aa0a5557541b53c8c741f7f31
  fi
  if test $HAVE_UTIMENSAT = 0 || test $REPLACE_UTIMENSAT = 1; then
    func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
  fi
  if test $HAVE_UTIMENSAT = 0 || test $REPLACE_UTIMENSAT = 1; then
    func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
  fi
  if test $HAVE_UTIMENSAT = 0 || test $REPLACE_UTIMENSAT = 1; then
    func_gl_gnulib_m4code_utimens
  fi

  $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b && gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_CONDITION=1 || gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_CONDITION=

  $gl_gnulib_enabled_cloexec && gl_GNULIB_ENABLED_cloexec_CONDITION=1 || gl_GNULIB_ENABLED_cloexec_CONDITION=

  $gl_gnulib_enabled_dirfd && gl_GNULIB_ENABLED_dirfd_CONDITION=1 || gl_GNULIB_ENABLED_dirfd_CONDITION=

  $gl_gnulib_enabled_925677f0343de64b89a9f0c790b4104c && gl_GNULIB_ENABLED_925677f0343de64b89a9f0c790b4104c_CONDITION=1 || gl_GNULIB_ENABLED_925677f0343de64b89a9f0c790b4104c_CONDITION=

  $gl_gnulib_enabled_endian && gl_GNULIB_ENABLED_endian_CONDITION=1 || gl_GNULIB_ENABLED_endian_CONDITION=

  $gl_gnulib_enabled_euidaccess && gl_GNULIB_ENABLED_euidaccess_CONDITION=1 || gl_GNULIB_ENABLED_euidaccess_CONDITION=

  $gl_gnulib_enabled_getdelim && gl_GNULIB_ENABLED_getdelim_CONDITION=1 || gl_GNULIB_ENABLED_getdelim_CONDITION=

  $gl_gnulib_enabled_getdtablesize && gl_GNULIB_ENABLED_getdtablesize_CONDITION=1 || gl_GNULIB_ENABLED_getdtablesize_CONDITION=

  $gl_gnulib_enabled_getgroups && gl_GNULIB_ENABLED_getgroups_CONDITION=1 || gl_GNULIB_ENABLED_getgroups_CONDITION=

  $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36 && gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_CONDITION=1 || gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_CONDITION=

  $gl_gnulib_enabled_fd38c7e463b54744b77b98aeafb4fa7c && gl_GNULIB_ENABLED_fd38c7e463b54744b77b98aeafb4fa7c_CONDITION=1 || gl_GNULIB_ENABLED_fd38c7e463b54744b77b98aeafb4fa7c_CONDITION=

  $gl_gnulib_enabled_8444034ea779b88768865bb60b4fb8c9 && gl_GNULIB_ENABLED_8444034ea779b88768865bb60b4fb8c9_CONDITION=1 || gl_GNULIB_ENABLED_8444034ea779b88768865bb60b4fb8c9_CONDITION=

  $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1 && gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_CONDITION=1 || gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_CONDITION=

  $gl_gnulib_enabled_lchmod && gl_GNULIB_ENABLED_lchmod_CONDITION=1 || gl_GNULIB_ENABLED_lchmod_CONDITION=

  $gl_gnulib_enabled_e80bf6f757095d2e5fc94dafb8f8fc8b && gl_GNULIB_ENABLED_e80bf6f757095d2e5fc94dafb8f8fc8b_CONDITION=1 || gl_GNULIB_ENABLED_e80bf6f757095d2e5fc94dafb8f8fc8b_CONDITION=

  $gl_gnulib_enabled_ef455225c00f5049c808c2eda3e76866 && gl_GNULIB_ENABLED_ef455225c00f5049c808c2eda3e76866_CONDITION=1 || gl_GNULIB_ENABLED_ef455225c00f5049c808c2eda3e76866_CONDITION=

  $gl_gnulib_enabled_5264294aa0a5557541b53c8c741f7f31 && gl_GNULIB_ENABLED_5264294aa0a5557541b53c8c741f7f31_CONDITION=1 || gl_GNULIB_ENABLED_5264294aa0a5557541b53c8c741f7f31_CONDITION=

  $gl_gnulib_enabled_open && gl_GNULIB_ENABLED_open_CONDITION=1 || gl_GNULIB_ENABLED_open_CONDITION=

  $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7 && gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_CONDITION=1 || gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_CONDITION=

  $gl_gnulib_enabled_rawmemchr && gl_GNULIB_ENABLED_rawmemchr_CONDITION=1 || gl_GNULIB_ENABLED_rawmemchr_CONDITION=

  $gl_gnulib_enabled_d3b2383720ee0e541357aa2aac598e2b && gl_GNULIB_ENABLED_d3b2383720ee0e541357aa2aac598e2b_CONDITION=1 || gl_GNULIB_ENABLED_d3b2383720ee0e541357aa2aac598e2b_CONDITION=

  $gl_gnulib_enabled_61bcaca76b3e6f9ae55d57a1c3193bc4 && gl_GNULIB_ENABLED_61bcaca76b3e6f9ae55d57a1c3193bc4_CONDITION=1 || gl_GNULIB_ENABLED_61bcaca76b3e6f9ae55d57a1c3193bc4_CONDITION=

  $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c && gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_CONDITION=1 || gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_CONDITION=

  $gl_gnulib_enabled_strtoll && gl_GNULIB_ENABLED_strtoll_CONDITION=1 || gl_GNULIB_ENABLED_strtoll_CONDITION=

  $gl_gnulib_enabled_utimens && gl_GNULIB_ENABLED_utimens_CONDITION=1 || gl_GNULIB_ENABLED_utimens_CONDITION=

  $gl_gnulib_enabled_verify && gl_GNULIB_ENABLED_verify_CONDITION=1 || gl_GNULIB_ENABLED_verify_CONDITION=

  $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec && gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_CONDITION=1 || gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_CONDITION=

  # End of code from modules











  gltests_libdeps=
  gltests_ltlibdeps=












  gl_source_base='tests'
  gl_source_base_prefix=
  gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS

  gl_module_indicator_condition=$gltests_WITNESS













  LIBGNU_LIBDEPS="$gl_libdeps"

  LIBGNU_LTLIBDEPS="$gl_ltlibdeps"


CFLAGS=$SAVE_CFLAGS
LIBS=$SAVE_LIBS

# Set up libgmp on Android.  Make sure to override what gnulib has
# found.
LIBGMP_CFLAGS=
if test "$REALLY_ANDROID" = "yes" && test "$with_libgmp" != "no"; then
  HAVE_LIBGMP=no

module_name=
ndk_module=libgmp
ndk_replace_pkg_config_package
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Android.mk that builds $ndk_module" >&5
printf %s "checking for Android.mk that builds $ndk_module... " >&6; }

for ndk_android_mk in $ndk_module_files; do
  # Read this Android.mk file.  Set NDK_ROOT to /tmp: the Android in
  # tree build system sets it to a meaning value, but build files just
  # use it to test whether or not the NDK is being used.
  ndk_commands=`ndk_run_test`

  eval "$ndk_commands"
  if test -n "$module_name"; then
    break;
  fi
done

if test -z "$module_name"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

else
  if test -n "$module_cxx_deps"; then
    ndk_ANY_CXX=yes
  fi

  if test "$module_cxx_deps" = "yes" && test -z "$ndk_CXX_STL" \
         && test -z "$ndk_CXX_LDFLAGS"
then :
  as_fn_error $? "The module libgmp requires a C++ standard library,
but none were found." "$LINENO" 5
fi

  if test "$module_cxx_deps" = "yes" && test "$ndk_working_cxx" != "yes"
then :
  as_fn_error $? "The module $1 requires the C++ standard library,
but a working C++ compiler was not found." "$LINENO" 5
fi

  LIBGMP_CFLAGS="$LIBGMP_CFLAGS $module_cflags $module_includes"
  LIBGMP_LIBS="$LIBGMP_LIBS $module_ldflags"
  ndk_MAKEFILES="$ndk_MAKEFILES $ndk_android_mk"
  ndk_MODULES="$ndk_MODULES $module_target"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  HAVE_LIBGMP=yes

  # Now, resolve imports.  Make sure the imports' Makefiles comes
  # before ndk_MAKEFILES; likewise for its includes.
  ndk_import_includes=
  for ndk_module in $module_imports; do
    ndk_resolve_import_module $ndk_module
    LIBGMP_CFLAGS="$ndk_import_includes $LIBGMP_CFLAGS"
  done
fi


  if test "$HAVE_LIBGMP" = "yes"; then
    SAVE_CFLAGS="$CFLAGS"
    CFLAGS="$CFLAGS $LIBGMP_CFLAGS"
    unset ac_cv_header_gmp_h
    unset ac_cv_header_gmp_gmp_h
           for ac_header in gmp.h gmp/gmp.h
do :
  as_ac_Header=`printf "%s\n" "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 `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
 break
fi

done
    CFLAGS="$SAVE_CFLAGS"
    GL_GENERATE_GMP_H=
    GL_GENERATE_GMP_H_CONDITION=
    GL_GENERATE_GMP_GMP_H=
    GL_GENERATE_GMP_GMP_H_CONDITION=
    GL_GENERATE_MINI_GMP_H=
    GL_GENERATE_MINI_GMP_H_CONDITION=

    if test "$ac_cv_header_gmp_h" != "no" \
       || test "$ac_cv_header_gmp_gmp_h" != "no"; then
       HAVE_LIBGMP=yes
       GL_GENERATE_GMP_H=false
       LIBGMP="$LIBGMP_LIBS"
       GMP_H=
    fi
  fi
fi


# timer_getoverrun needs the same library as timer_settime
OLD_LIBS=$LIBS
LIBS="$LIB_TIMER_TIME $LIBS"
ac_fn_c_check_func "$LINENO" "timer_getoverrun" "ac_cv_func_timer_getoverrun"
if test "x$ac_cv_func_timer_getoverrun" = xyes
then :
  printf "%s\n" "#define HAVE_TIMER_GETOVERRUN 1" >>confdefs.h

fi

LIBS=$OLD_LIBS

if test "${opsys}" = "mingw32"; then
  CPPFLAGS="$CPPFLAGS -DUSE_CRT_DLL=1 -I \${abs_top_srcdir}/nt/inc"
  # Remove unneeded switches from the value of CC that goes to Makefiles
  CC=`printf "%s\n" "$CC" | sed -e "s,$GCC_TEST_OPTIONS,,"`
fi

case "$opsys" in
  aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;

  cygwin) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000" ;;

  darwin)
   if test "$HAVE_NS" = "yes"; then
     libs_nsgui="-framework AppKit"
     if test "$NS_IMPL_COCOA" = "yes"; then
        libs_nsgui="$libs_nsgui -framework IOKit -framework Carbon \
                    -framework IOSurface -framework QuartzCore"
        if test "$emacs_cv_macosx_12_0" = "yes"; then
	  libs_nsgui="$libs_nsgui -framework UniformTypeIdentifiers"
	fi
     fi
   else
     libs_nsgui=
   fi
   LD_SWITCH_SYSTEM_TEMACS=$libs_nsgui
   ## The -headerpad option tells ld (see man page) to leave room at the
   ## end of the header for adding load commands.  Needed for dumping.
   ## 0x1000 is enough for roughly 52 load commands on the x86_64
   ## architecture (where they are 78 bytes each). The actual number of
   ## load commands added is not consistent but normally ranges from
   ## about 14 to about 34. Setting it high gets us plenty of slop and
   ## only costs about 1.5K of wasted binary space.
   headerpad_extra=1000
   if test "$with_unexec" = yes; then
     LD_SWITCH_SYSTEM_TEMACS="-fno-pie $LD_SWITCH_SYSTEM_TEMACS -Xlinker -headerpad -Xlinker $headerpad_extra"
   fi

   ## This is here because src/Makefile.in did some extra fiddling around
   ## with LD_SWITCH_SYSTEM.  It seems cleaner to put this in
   ## LD_SWITCH_SYSTEM_TEMACS instead,
   test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
     LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS"
   ;;

  ## LD_SWITCH_X_SITE_RPATH is a -rpath option saying where to
  ## find X at run-time.
  ## When handled by cpp, this was in LD_SWITCH_SYSTEM.  However, at the
  ## point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_RPATH
  ## had not yet been defined and was expanded to null.  Hence LD_SWITCH_SYSTEM
  ## had different values in configure (in ac_link) and src/Makefile.in.
  ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
  gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_RPATH)" ;;

  mingw32)
   ## Is it any better under MinGW64 to relocate emacs into higher addresses?
   ## If the values of -image-base are modified, the corresponding
   ## values of DEFAULT_IMAGE_BASE in w32fns.c should be kept in sync.
   case "$canonical" in
     x86_64-*-*) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x400000000 -Wl,-entry,__start -Wl,-Map,./temacs.map" ;;
     *) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,__start -Wl,-Map,./temacs.map" ;;
   esac
   ## If they want unexec, disable Windows ASLR for the Emacs binary
   if test "$with_dumping" = "unexec"; then
      case "$canonical" in
        x86_64-*-*) LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS -Wl,-disable-dynamicbase -Wl,-disable-high-entropy-va -Wl,-default-image-base-low" ;;
        *) LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS -Wl,-disable-dynamicbase" ;;
      esac
   fi
   ;;

  *) LD_SWITCH_SYSTEM_TEMACS= ;;
esac

# -no-pie or -nopie fixes a temacs segfault on Gentoo, OpenBSD,
# Ubuntu, and other systems with "hardened" GCC configurations for
# some reason (Bug#18784).  We don't know why this works, but not
# segfaulting is better than segfaulting.  Use ac_c_werror_flag=yes
# when trying the option, otherwise clang keeps warning that it does
# not understand it, and pre-4.6 GCC has a similar problem
# (Bug#20338).  Prefer -no-pie to -nopie, as -no-pie is the
# spelling used by GCC 6.1.0 and later (Bug#24682).
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to disable position independent executables" >&5
printf %s "checking for $CC option to disable position independent executables... " >&6; }
if test ${emacs_cv_prog_cc_no_pie+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test $with_unexec = no; then
     emacs_cv_prog_cc_no_pie='not needed'
   else
     emacs_save_c_werror_flag=$ac_c_werror_flag
     emacs_save_LDFLAGS=$LDFLAGS
     ac_c_werror_flag=yes
     for emacs_cv_prog_cc_no_pie in -no-pie -nopie no; do
       test $emacs_cv_prog_cc_no_pie = no && break
       LDFLAGS="$emacs_save_LDFLAGS $emacs_cv_prog_cc_no_pie"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  break
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
     done
     ac_c_werror_flag=$emacs_save_c_werror_flag
     LDFLAGS=$emacs_save_LDFLAGS
   fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_no_pie" >&5
printf "%s\n" "$emacs_cv_prog_cc_no_pie" >&6; }
case $emacs_cv_prog_cc_no_pie in
  -*)
    LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS $emacs_cv_prog_cc_no_pie"
    ;;
esac

if test x$ac_enable_profiling != x ; then
  case $opsys in
    *freebsd | gnu-linux) ;;
    *) LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS -pg" ;;
  esac
fi

LD_SWITCH_SYSTEM_TEMACS="$LDFLAGS_NOCOMBRELOC $LD_SWITCH_SYSTEM_TEMACS"



## Common for all window systems
if test "$window_system" != "none"; then

printf "%s\n" "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h


printf "%s\n" "#define POLL_FOR_INPUT 1" >>confdefs.h

  WINDOW_SYSTEM_OBJ="fontset.o fringe.o image.o"

  if test "$window_system" = "x11" || test "$REALLY_ANDROID" = "yes"; then

printf "%s\n" "#define HAVE_TEXT_CONVERSION 1" >>confdefs.h

    WINDOW_SYSTEM_OBJ="$WINDOW_SYSTEM_OBJ textconv.o"
  fi
fi



# Some systems have MB_CUR_MAX defined to a call to
# __ctype_get_mb_cur_max, but do not have __ctype_get_mb_cur_max in
# libc.  Check for that situation and define MB_CUR_MAX to something
# sane.

ac_fn_c_check_func "$LINENO" "__ctype_get_mb_cur_max" "ac_cv_func___ctype_get_mb_cur_max"
if test "x$ac_cv_func___ctype_get_mb_cur_max" = xyes
then :

fi


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether MB_CUR_MAX is defined to function that won't link" >&5
printf %s "checking whether MB_CUR_MAX is defined to function that won't link... " >&6; }
if test ${emacs_cv_broken_mb_cur_max+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdlib.h>
#ifndef MB_CUR_MAX
#define MB_CUR_MAX -1
#endif
static int foo = MB_CUR_MAX;

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "__ctype_get_mb_cur_max" >/dev/null 2>&1
then :
  if test "$ac_cv_func___ctype_get_mb_cur_max" = "yes"
then :
  emacs_cv_broken_mb_cur_max=no
else $as_nop
  emacs_cv_broken_mb_cur_max=yes
fi
else $as_nop
  emacs_cv_broken_mb_cur_max=no
fi
rm -rf conftest*

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_broken_mb_cur_max" >&5
printf "%s\n" "$emacs_cv_broken_mb_cur_max" >&6; }

if test "$emacs_cv_broken_mb_cur_max" = "yes"
then :
  # Define this to 4, which is right for Android.
 case $opsys in #(
  android) :

printf "%s\n" "#define REPLACEMENT_MB_CUR_MAX 4" >>confdefs.h
 ;; #(
  *) :
    as_fn_error $? "MB_CUR_MAX does not work on your system.
Please modify configure.ac to set an appropriate value, then
send your change to bug-gnu-emacs@gnu.org" "$LINENO" 5 ;;
esac
fi



#### Report on what we decided to do.
#### Report GTK as a toolkit, even if it doesn't use Xt.
#### It makes printing result more understandable as using GTK sets
#### toolkit_scroll_bars to yes by default.
if test "${HAVE_GTK}" = "yes"; then
  USE_X_TOOLKIT="$USE_GTK_TOOLKIT"
fi

if test $USE_ACL -ne 0; then
  ACL_SUMMARY="yes"
  test "$LIB_ACL" && ACL_SUMMARY="$ACL_SUMMARY $LIB_ACL"
  test "$LIB_XATTR" && ACL_SUMMARY="$ACL_SUMMARY $LIB_XATTR"
else
  ACL_SUMMARY=no
fi

if test -z "$GMP_H"; then
  HAVE_GMP=yes
else
  HAVE_GMP=no
fi

emacs_standard_dirs='Standard dirs'
printf "%s\n" "
Configured for '${canonical}'.

  Where should the build process find the source code?    ${srcdir}
  What compiler should emacs be built with?               ${CC} ${CFLAGS}
  Should Emacs use the GNU version of malloc?             ${GNU_MALLOC}${GNU_MALLOC_reason}
  Should Emacs use a relocating allocator for buffers?    ${REL_ALLOC}
  Should Emacs use mmap(2) for buffer allocation?         $use_mmap_for_buffers
  What window system should Emacs use?                    ${window_system}
  What toolkit should Emacs use?                          ${USE_X_TOOLKIT}
  Where do we find X Windows header files?                ${x_includes:-$emacs_standard_dirs}
  Where do we find X Windows libraries?                   ${x_libraries:-$emacs_standard_dirs}"

#### Please respect alphabetical ordering when making additions.
optsep=
emacs_config_features=
for opt in ACL BE_APP CAIRO DBUS FREETYPE GCONF GIF GLIB GMP GNUTLS GPM GSETTINGS \
 HARFBUZZ IMAGEMAGICK JPEG LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 \
 M17N_FLT MODULES NATIVE_COMP NOTIFY NS OLDXMENU PDUMPER PGTK PNG RSVG SECCOMP \
 SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER \
 UNEXEC WEBP X11 XAW3D XDBE XFT XIM XINPUT2 XPM XWIDGETS X_TOOLKIT \
 ZLIB; do

    case $opt in
      PDUMPER) val=${with_pdumper} ;;
      UNEXEC) val=${with_unexec} ;;
      GLIB) val=${emacs_cv_links_glib} ;;
      NOTIFY|ACL) eval val=\${${opt}_SUMMARY} ;;
      TOOLKIT_SCROLL_BARS|X_TOOLKIT) eval val=\${USE_$opt} ;;
      THREADS) val=${threads_enabled} ;;
      *) eval val=\${HAVE_$opt} ;;
    esac
    case x$val in
      xno|xnone|x) continue ;;
    esac
    case $opt in
      X_TOOLKIT)
        case $val in
          GTK*|LUCID|MOTIF) opt=$val ;;
          *) continue ;;
        esac
      ;;
      NOTIFY)
        case $val in
          *lkqueue*) opt="$opt LIBKQUEUE" ;;
          *kqueue*) opt="$opt KQUEUE" ;;
          *inotify*) opt="$opt INOTIFY" ;;
          *gfile*) opt="$opt GFILENOTIFY" ;;
          *w32*) opt="$opt W32NOTIFY" ;;
        esac
      ;;
    esac
    as_fn_append emacs_config_features "$optsep$opt"
    optsep=' '
done

printf "%s\n" "#define EMACS_CONFIG_FEATURES \"${emacs_config_features}\"" >>confdefs.h


# This is just a printable representation of the shared user ID.
android_shared_user=
if test -n "$with_shared_user_id"
then :
  android_shared_user="($with_shared_user_id)"
fi

printf "%s\n" "  Does Emacs use -lXaw3d?                                 ${HAVE_XAW3D}
  Is Emacs being built for Android?                       ${ANDROID} ${android_shared_user}
  Does Emacs use the X Double Buffer Extension?           ${HAVE_XDBE}
  Does Emacs use -lXpm?                                   ${HAVE_XPM}
  Does Emacs use -ljpeg?                                  ${HAVE_JPEG}
  Does Emacs use -ltiff?                                  ${HAVE_TIFF}
  Does Emacs use a gif library?                           ${HAVE_GIF} $LIBGIF
  Does Emacs use a png library?                           ${HAVE_PNG} $LIBPNG
  Does Emacs use -lrsvg-2?                                ${HAVE_RSVG}
  Does Emacs use -lwebp?                                  ${HAVE_WEBP}
  Does Emacs use -lsqlite3?                               ${HAVE_SQLITE3}
  Does Emacs use cairo?                                   ${HAVE_CAIRO}
  Does Emacs use -llcms2?                                 ${HAVE_LCMS2}
  Does Emacs use imagemagick?                             ${HAVE_IMAGEMAGICK}
  Does Emacs use native APIs for images?                  ${NATIVE_IMAGE_API}
  Does Emacs support sound?                               ${HAVE_SOUND}
  Does Emacs use -lgpm?                                   ${HAVE_GPM}
  Does Emacs use -ldbus?                                  ${HAVE_DBUS}
  Does Emacs use -lgconf?                                 ${HAVE_GCONF}
  Does Emacs use GSettings?                               ${HAVE_GSETTINGS}
  Does Emacs use a file notification library?             ${NOTIFY_SUMMARY}
  Does Emacs use access control lists?                    ${ACL_SUMMARY}
  Does Emacs use -lselinux?                               ${HAVE_LIBSELINUX}
  Does Emacs use -lgnutls?                                ${HAVE_GNUTLS}
  Does Emacs use -lxml2?                                  ${HAVE_LIBXML2}
  Does Emacs use -lfreetype?                              ${HAVE_FREETYPE}
  Does Emacs use HarfBuzz?                                ${HAVE_HARFBUZZ}
  Does Emacs use -lm17n-flt?                              ${HAVE_M17N_FLT}
  Does Emacs use -lotf?                                   ${HAVE_LIBOTF}
  Does Emacs use -lxft?                                   ${HAVE_XFT}
  Does Emacs use -lsystemd?                               ${HAVE_LIBSYSTEMD}
  Does Emacs use -ltree-sitter?                           ${HAVE_TREE_SITTER}
  Does Emacs use the GMP library?                         ${HAVE_GMP}
  Does Emacs directly use zlib?                           ${HAVE_ZLIB}
  Does Emacs have dynamic modules support?                ${HAVE_MODULES}
  Does Emacs use toolkit scroll bars?                     ${USE_TOOLKIT_SCROLL_BARS}
  Does Emacs support Xwidgets?                            ${HAVE_XWIDGETS}
  Does Emacs have threading support in lisp?              ${threads_enabled}
  Does Emacs support the portable dumper?                 ${with_pdumper}
  Does Emacs support legacy unexec dumping?               ${with_unexec}
  Which dumping strategy does Emacs use?                  ${with_dumping}
  Does Emacs have native lisp compiler?                   ${HAVE_NATIVE_COMP}
  Does Emacs use version 2 of the X Input Extension?      ${HAVE_XINPUT2}
  Does Emacs generate a smaller-size Japanese dictionary? ${with_small_ja_dic}
"

if test -n "${EMACSDATA}"; then
   printf "%s\n" "  Environment variable EMACSDATA set to:                  $EMACSDATA"
fi
if test -n "${EMACSDOC}"; then
   printf "%s\n" "  Environment variable EMACSDOC set to:                   $EMACSDOC"
fi

echo

if test "$HAVE_NS" = "yes"; then
   echo
   printf "%s\n" "Run '${MAKE-make}' to build Emacs, then run 'src/emacs' to test it.
Run '${MAKE-make} install' in order to build an application bundle.
The application will go to nextstep/Emacs.app and can be run or moved
from there."
   if test "$EN_NS_SELF_CONTAINED" = "yes"; then
      echo "The application will be fully self-contained."
    else
      printf "%s\n" "The lisp resources for the application will be installed under ${prefix}.
You may need to run \"${MAKE-make} install\" with sudo.  The application will fail
to run if these resources are not installed."
   fi
   echo
fi

case $opsys,$emacs_uname_r in
  cygwin,1.5.*)
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: building Emacs on Cygwin 1.5 is not supported." >&5
printf "%s\n" "$as_me: WARNING: building Emacs on Cygwin 1.5 is not supported." >&2;}
           echo
	   ;;
  cygwin,3.0.[0-7]'('* | cygwin,3.1.[0-2]'('*)

printf "%s\n" "#define HAVE_CYGWIN_O_PATH_BUG 1" >>confdefs.h
;;
esac

# Remove any trailing slashes in these variables.
case $prefix in
  */) prefix=`$as_dirname -- "$prefix." ||
$as_expr X"$prefix." : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$prefix." : 'X\(//\)[^/]' \| \
	 X"$prefix." : 'X\(//\)$' \| \
	 X"$prefix." : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"$prefix." |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`;;
esac
case $exec_prefix in
  */) exec_prefix=`$as_dirname -- "$exec_prefix." ||
$as_expr X"$exec_prefix." : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$exec_prefix." : 'X\(//\)[^/]' \| \
	 X"$exec_prefix." : 'X\(//\)$' \| \
	 X"$exec_prefix." : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"$exec_prefix." |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`;;
esac

if test "$HAVE_NS" = "yes"; then
  if test "$NS_IMPL_GNUSTEP" = yes; then
    ac_config_files="$ac_config_files nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist:nextstep/templates/Info-gnustep.plist.in nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in"

    ns_check_file=Resources/Info-gnustep.plist
  else
    ac_config_files="$ac_config_files nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings:nextstep/templates/InfoPlist.strings.in"

    ns_check_file=Contents/Info.plist
  fi

fi

ac_config_files="$ac_config_files Makefile lib/gnulib.mk"



  if test "$XCONFIGURE" != "android"
then :
  ac_config_files="$ac_config_files $srcdir/doc/man/emacs.1"

fi

ac_config_files="$ac_config_files lib/Makefile lib-src/Makefile oldXMenu/Makefile src/Makefile lwlib/Makefile nextstep/Makefile nt/Makefile"


  if test "$XCONFIGURE" != "android"
then :
  ac_config_files="$ac_config_files doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile lisp/Makefile leim/Makefile"

fi

SUBDIR_MAKEFILES="lib/Makefile lib-src/Makefile oldXMenu/Makefile src/Makefile lwlib/Makefile nextstep/Makefile nt/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile lisp/Makefile leim/Makefile"

opt_makefile=test/Makefile
if test -f "$srcdir/$opt_makefile.in"; then
  SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"

  if test "$XCONFIGURE" != "android"
then :
  ac_config_files="$ac_config_files test/Makefile"

fi

  if test "$XCONFIGURE" != "android"
then :
  ac_config_files="$ac_config_files test/manual/noverlay/Makefile"

fi
fi
opt_makefile=test/infra/Makefile
if test -f "$srcdir/$opt_makefile.in"; then
  SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"

  if test "$XCONFIGURE" != "android"
then :
  ac_config_files="$ac_config_files test/infra/Makefile"

fi
fi

if test "$ANDROID" = "yes"; then
  SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES java/Makefile cross/Makefile"
fi

if test -d $srcdir/admin; then
  SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES admin/charsets/Makefile admin/unidata/Makefile admin/grammars/Makefile"

  if test "$XCONFIGURE" != "android"
then :
  ac_config_files="$ac_config_files admin/charsets/Makefile"

fi

  if test "$XCONFIGURE" != "android"
then :
  ac_config_files="$ac_config_files admin/unidata/Makefile"

fi

  if test "$XCONFIGURE" != "android"
then :
  ac_config_files="$ac_config_files admin/grammars/Makefile"

fi
fi

SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'`



SMALL_JA_DIC=$with_small_ja_dic



if test "$XCONFIGURE" != "android"; then
                    ac_config_commands="$ac_config_commands src/epaths.h"


        ac_config_commands="$ac_config_commands src/.gdbinit"


          ac_config_commands="$ac_config_commands doc/emacs/emacsver.texi"


            ac_config_commands="$ac_config_commands etc-refcards-emacsver.tex"


  if test $AUTO_DEPEND = yes; then
     for dir in $AUTODEPEND_PARENTS; do
       as_dir=$dir/deps; as_fn_mkdir_p
       as_dir=cross/$dir/deps; as_fn_mkdir_p
     done
  fi
  if $gl_gnulib_enabled_dynarray || $gl_gnulib_enabled_scratch_buffer; then
    as_dir=lib/malloc; as_fn_mkdir_p
    as_dir=cross/lib/malloc; as_fn_mkdir_p
    if test $AUTO_DEPEND = yes; then
      as_dir=lib/deps/malloc; as_fn_mkdir_p
      as_dir=cross/lib/deps/malloc; as_fn_mkdir_p
    fi
  fi

      as_dir=cross/lib; as_fn_mkdir_p
  as_dir=cross/lib/malloc; as_fn_mkdir_p
  as_dir=cross/lib/sys; as_fn_mkdir_p
  as_dir=cross/lib-src; as_fn_mkdir_p

          as_dir=cross/etc; as_fn_mkdir_p

  if test "x$with_android" != "xno"
then :

                emacs_files='
  build-aux/gitlog-to-changelog
  build-aux/update-copyright
  lib/_Noreturn.h
  lib/acl-errno-valid.c
  lib/acl-internal.c
  lib/acl-internal.h
  lib/acl.h
  lib/acl_entries.c
  lib/alloca.in.h
  lib/allocator.c
  lib/allocator.h
  lib/arg-nonnull.h
  lib/assert.in.h
  lib/at-func.c
  lib/attribute.h
  lib/binary-io.c
  lib/binary-io.h
  lib/boot-time-aux.h
  lib/boot-time.c
  lib/boot-time.h
  lib/byteswap.c
  lib/byteswap.in.h
  lib/c++defs.h
  lib/c-ctype.c
  lib/c-ctype.h
  lib/c-strcase.h
  lib/c-strcasecmp.c
  lib/c-strncasecmp.c
  lib/canonicalize-lgpl.c
  lib/careadlinkat.c
  lib/careadlinkat.h
  lib/cdefs.h
  lib/cloexec.c
  lib/cloexec.h
  lib/close-stream.c
  lib/close-stream.h
  lib/copy-file-range.c
  lib/diffseq.h
  lib/dirent-private.h
  lib/dirent.in.h
  lib/dirfd.c
  lib/dtoastr.c
  lib/dtotimespec.c
  lib/dup2.c
  lib/dynarray.h
  lib/eloop-threshold.h
  lib/endian.c
  lib/endian.in.h
  lib/errno.in.h
  lib/euidaccess.c
  lib/execinfo.c
  lib/execinfo.in.h
  lib/faccessat.c
  lib/fchmodat.c
  lib/fcntl.c
  lib/fcntl.in.h
  lib/fdopendir.c
  lib/file-has-acl.c
  lib/filemode.c
  lib/filemode.h
  lib/filename.h
  lib/filevercmp.c
  lib/filevercmp.h
  lib/flexmember.h
  lib/fpending.c
  lib/fpending.h
  lib/free.c
  lib/fstatat.c
  lib/fsusage.c
  lib/fsusage.h
  lib/fsync.c
  lib/ftoastr.c
  lib/ftoastr.h
  lib/futimens.c
  lib/get-permissions.c
  lib/getdelim.c
  lib/getdtablesize.c
  lib/getgroups.c
  lib/getline.c
  lib/getloadavg.c
  lib/getopt-cdefs.in.h
  lib/getopt-core.h
  lib/getopt-ext.h
  lib/getopt-pfx-core.h
  lib/getopt-pfx-ext.h
  lib/getopt.c
  lib/getopt.in.h
  lib/getopt1.c
  lib/getopt_int.h
  lib/getrandom.c
  lib/gettext.h
  lib/gettime.c
  lib/gettimeofday.c
  lib/gl_openssl.h
  lib/group-member.c
  lib/idx.h
  lib/ieee754.in.h
  lib/ignore-value.h
  lib/intprops-internal.h
  lib/intprops.h
  lib/inttypes.in.h
  lib/lchmod.c
  lib/libc-config.h
  lib/limits.in.h
  lib/lstat.c
  lib/malloc.c
  lib/malloc/dynarray-skeleton.c
  lib/malloc/dynarray.h
  lib/malloc/dynarray_at_failure.c
  lib/malloc/dynarray_emplace_enlarge.c
  lib/malloc/dynarray_finalize.c
  lib/malloc/dynarray_resize.c
  lib/malloc/dynarray_resize_clear.c
  lib/malloc/scratch_buffer.h
  lib/malloc/scratch_buffer_grow.c
  lib/malloc/scratch_buffer_grow_preserve.c
  lib/malloc/scratch_buffer_set_array_size.c
  lib/md5-stream.c
  lib/md5.c
  lib/md5.h
  lib/memmem.c
  lib/mempcpy.c
  lib/memrchr.c
  lib/memset_explicit.c
  lib/mini-gmp-gnulib.c
  lib/mini-gmp.c
  lib/mini-gmp.h
  lib/minmax.h
  lib/mkostemp.c
  lib/mktime-internal.h
  lib/mktime.c
  lib/nanosleep.c
  lib/nproc.c
  lib/nproc.h
  lib/nstrftime.c
  lib/open.c
  lib/openat-priv.h
  lib/openat-proc.c
  lib/openat.h
  lib/pathmax.h
  lib/pipe2.c
  lib/pselect.c
  lib/pthread_sigmask.c
  lib/qcopy-acl.c
  lib/rawmemchr.c
  lib/rawmemchr.valgrind
  lib/readlink.c
  lib/readlinkat.c
  lib/readutmp.h
  lib/realloc.c
  lib/regcomp.c
  lib/regex.c
  lib/regex.h
  lib/regex_internal.c
  lib/regex_internal.h
  lib/regexec.c
  lib/root-uid.h
  lib/scratch_buffer.h
  lib/set-permissions.c
  lib/sha1.c
  lib/sha1.h
  lib/sha256.c
  lib/sha256.h
  lib/sha512.c
  lib/sha512.h
  lib/sig2str.c
  lib/sig2str.h
  lib/sigdescr_np.c
  lib/signal.in.h
  lib/stat-time.c
  lib/stat-time.h
  lib/stdbit.c
  lib/stdbit.in.h
  lib/stdc_bit_width.c
  lib/stdc_count_ones.c
  lib/stdc_leading_zeros.c
  lib/stdc_trailing_zeros.c
  lib/stdckdint.in.h
  lib/stddef.in.h
  lib/stdint.in.h
  lib/stdio-impl.h
  lib/stdio-read.c
  lib/stdio-write.c
  lib/stdio.in.h
  lib/stdlib.in.h
  lib/stpcpy.c
  lib/str-two-way.h
  lib/strftime.c
  lib/strftime.h
  lib/string.in.h
  lib/strnlen.c
  lib/strtoimax.c
  lib/strtol.c
  lib/strtoll.c
  lib/symlink.c
  lib/sys_random.in.h
  lib/sys_select.in.h
  lib/sys_stat.in.h
  lib/sys_time.in.h
  lib/sys_types.in.h
  lib/tempname.c
  lib/tempname.h
  lib/time-internal.h
  lib/time.in.h
  lib/time_r.c
  lib/time_rz.c
  lib/timegm.c
  lib/timespec-add.c
  lib/timespec-sub.c
  lib/timespec.c
  lib/timespec.h
  lib/u64.c
  lib/u64.h
  lib/unistd.c
  lib/unistd.in.h
  lib/unlocked-io.h
  lib/utimens.c
  lib/utimens.h
  lib/utimensat.c
  lib/verify.h
  lib/vla.h
  lib/warn-on-use.h
  lib/xalloc-oversized.h
  m4/00gnulib.m4
  m4/__inline.m4
  m4/absolute-header.m4
  m4/acl.m4
  m4/alloca.m4
  m4/assert_h.m4
  m4/builtin-expect.m4
  m4/byteswap.m4
  m4/c-bool.m4
  m4/canonicalize.m4
  m4/clock_time.m4
  m4/codeset.m4
  m4/copy-file-range.m4
  m4/d-type.m4
  m4/dirent_h.m4
  m4/dirfd.m4
  m4/double-slash-root.m4
  m4/dup2.m4
  m4/eealloc.m4
  m4/endian_h.m4
  m4/environ.m4
  m4/errno_h.m4
  m4/euidaccess.m4
  m4/execinfo.m4
  m4/extensions.m4
  m4/extern-inline.m4
  m4/faccessat.m4
  m4/fchmodat.m4
  m4/fcntl-o.m4
  m4/fcntl.m4
  m4/fcntl_h.m4
  m4/fdopendir.m4
  m4/filemode.m4
  m4/flexmember.m4
  m4/fpending.m4
  m4/fpieee.m4
  m4/free.m4
  m4/fstatat.m4
  m4/fsusage.m4
  m4/fsync.m4
  m4/futimens.m4
  m4/getdelim.m4
  m4/getdtablesize.m4
  m4/getgroups.m4
  m4/getline.m4
  m4/getloadavg.m4
  m4/getopt.m4
  m4/getrandom.m4
  m4/gettime.m4
  m4/gettimeofday.m4
  m4/gl-openssl.m4
  m4/gnulib-common.m4
  m4/group-member.m4
  m4/ieee754-h.m4
  m4/include_next.m4
  m4/inttypes.m4
  m4/largefile.m4
  m4/lchmod.m4
  m4/libgmp.m4
  m4/limits-h.m4
  m4/locale-fr.m4
  m4/lstat.m4
  m4/malloc.m4
  m4/manywarnings-c++.m4
  m4/manywarnings.m4
  m4/mbstate_t.m4
  m4/md5.m4
  m4/memmem.m4
  m4/mempcpy.m4
  m4/memrchr.m4
  m4/memset_explicit.m4
  m4/minmax.m4
  m4/mkostemp.m4
  m4/mktime.m4
  m4/mode_t.m4
  m4/multiarch.m4
  m4/musl.m4
  m4/nanosleep.m4
  m4/nocrash.m4
  m4/nproc.m4
  m4/nstrftime.m4
  m4/off64_t.m4
  m4/off_t.m4
  m4/open-cloexec.m4
  m4/open-slash.m4
  m4/open.m4
  m4/pathmax.m4
  m4/pid_t.m4
  m4/pipe2.m4
  m4/pselect.m4
  m4/pthread_sigmask.m4
  m4/rawmemchr.m4
  m4/readlink.m4
  m4/readlinkat.m4
  m4/readutmp.m4
  m4/realloc.m4
  m4/regex.m4
  m4/sha1.m4
  m4/sha256.m4
  m4/sha512.m4
  m4/sig2str.m4
  m4/sigdescr_np.m4
  m4/signal_h.m4
  m4/socklen.m4
  m4/ssize_t.m4
  m4/stat-time.m4
  m4/std-gnu11.m4
  m4/stdalign.m4
  m4/stdbit_h.m4
  m4/stddef_h.m4
  m4/stdint.m4
  m4/stdio_h.m4
  m4/stdlib_h.m4
  m4/stpcpy.m4
  m4/string_h.m4
  m4/strnlen.m4
  m4/strtoimax.m4
  m4/strtoll.m4
  m4/symlink.m4
  m4/sys_cdefs_h.m4
  m4/sys_random_h.m4
  m4/sys_select_h.m4
  m4/sys_socket_h.m4
  m4/sys_stat_h.m4
  m4/sys_time_h.m4
  m4/sys_types_h.m4
  m4/tempname.m4
  m4/time_h.m4
  m4/time_r.m4
  m4/time_rz.m4
  m4/timegm.m4
  m4/timer_time.m4
  m4/timespec.m4
  m4/tm_gmtoff.m4
  m4/unistd_h.m4
  m4/unlocked-io.m4
  m4/utimens.m4
  m4/utimensat.m4
  m4/utimes.m4
  m4/vararrays.m4
  m4/warn-on-use.m4
  m4/warnings.m4
  m4/wchar_t.m4
  m4/wint_t.m4
  m4/xattr.m4
  m4/zzgnulib.m4
 lib/af_alg.h lib/save-cwd.h'
        emacs_files="$emacs_files lib/fingerprint.c lib/fingerprint.h \
		   lib/save-cwd.c lib/openat-die.c lib/save-cwd.c \
		   lib/min-max.h"
    for file in $emacs_files; do
      if expr "X${file}J" : "Xlib/.*[ch]J" >/dev/null
then :
  if test -f "$srcdir/$file"
then :
  ac_config_links="$ac_config_links cross/$file:$file"

fi
fi
    done
fi
fi

# Make java/Makefile

  if test "$XCONFIGURE" != "android"
then :
  ac_config_files="$ac_config_files java/Makefile"

fi

  if test "$XCONFIGURE" != "android"
then :
  ac_config_files="$ac_config_files cross/Makefile"

fi

# Make java/AndroidManifest.xml

  if test "$XCONFIGURE" != "android"
then :
  ac_config_files="$ac_config_files java/AndroidManifest.xml"

fi

# Make ndk-build Makefiles.  This is only done inside the recursive
# configure.

  if test "$ndk_INITIALIZED" = "yes"; then
    NDK_BUILD_ANDROID_MK="$ndk_MAKEFILES"
    NDK_BUILD_ARCH=$ndk_ARCH
    NDK_BUILD_ABI=$ndk_ABI
    NDK_BUILD_SDK=$ndk_API
    NDK_BUILD_CC=$CC
    NDK_BUILD_CXX=$CXX
    NDK_BUILD_AR=$AR
    NDK_BUILD_MODULES="$ndk_MODULES"
    NDK_BUILD_CXX_SHARED="$ndk_CXX_SHARED"
    NDK_BUILD_CXX_STL="$ndk_CXX_STL"
    NDK_BUILD_CXX_LDFLAGS="$ndk_CXX_LDFLAGS"
    NDK_BUILD_ANY_CXX_MODULE=$ndk_ANY_CXX
    NDK_BUILD_CFLAGS="$ndk_BUILD_CFLAGS"

















    ac_config_files="$ac_config_files $ndk_DIR/Makefile"

    ac_config_files="$ac_config_files $ndk_DIR/ndk-build.mk"

  fi


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_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
printf "%s\n" "$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+y} || &/
     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
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
printf "%s\n" "$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
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
printf "%s\n" "$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=`printf "%s\n" "$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


# Check whether --enable-year2038 was given.
if test ${enable_year2038+y}
then :
  enableval=$enable_year2038;
fi



    gl_libobjs=
    gl_ltlibobjs=
    gl_libobjdeps=
    if test -n "$gl_LIBOBJS"; then
      # Remove the extension.
      sed_drop_objext='s/\.o$//;s/\.obj$//'
      sed_dirname1='s,//*,/,g'
      sed_dirname2='s,\(.\)/$,\1,'
      sed_dirname3='s,^[^/]*$,.,'
      sed_dirname4='s,\(.\)/[^/]*$,\1,'
      sed_basename1='s,.*/,,'
      for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
        gl_libobjs="$gl_libobjs $i.$ac_objext"
        gl_ltlibobjs="$gl_ltlibobjs $i.lo"
        i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3" -e "$sed_dirname4"`
        i_base=`echo "$i" | sed -e "$sed_basename1"`
        gl_libobjdeps="$gl_libobjdeps $i_dir/\$(DEPDIR)/$i_base.Po"
      done
    fi
    gl_LIBOBJS=$gl_libobjs

    gl_LTLIBOBJS=$gl_ltlibobjs

    gl_LIBOBJDEPS=$gl_libobjdeps



    gltests_libobjs=
    gltests_ltlibobjs=
    gltests_libobjdeps=
    if test -n "$gltests_LIBOBJS"; then
      # Remove the extension.
      sed_drop_objext='s/\.o$//;s/\.obj$//'
      sed_dirname1='s,//*,/,g'
      sed_dirname2='s,\(.\)/$,\1,'
      sed_dirname3='s,^[^/]*$,.,'
      sed_dirname4='s,\(.\)/[^/]*$,\1,'
      sed_basename1='s,.*/,,'
      for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
        gltests_libobjs="$gltests_libobjs $i.$ac_objext"
        gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
        i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3" -e "$sed_dirname4"`
        i_base=`echo "$i" | sed -e "$sed_basename1"`
        gltests_libobjdeps="$gltests_libobjdeps $i_dir/\$(DEPDIR)/$i_base.Po"
      done
    fi
    gltests_LIBOBJS=$gltests_libobjs

    gltests_LTLIBOBJS=$gltests_ltlibobjs

    gltests_LIBOBJDEPS=$gltests_libobjdeps



: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
printf "%s\n" "$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
as_nop=:
if test ${ZSH_VERSION+y} && (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 $as_nop
  case `(set -o) 2>/dev/null` in #(
  *posix*) :
    set -o posix ;; #(
  *) :
     ;;
esac
fi



# Reset variables that may have inherited troublesome values from
# the environment.

# IFS needs to be set, to space, tab, and newline, in precisely that order.
# (If _AS_PATH_WALK were called with IFS unset, it would have the
# side effect of setting IFS to empty, thus disabling word splitting.)
# Quoting is to prevent editors from complaining about space-tab.
as_nl='
'
export as_nl
IFS=" ""	$as_nl"

PS1='$ '
PS2='> '
PS4='+ '

# Ensure predictable behavior from utilities with locale-dependent output.
LC_ALL=C
export LC_ALL
LANGUAGE=C
export LANGUAGE

# We cannot yet rely on "unset" to work, but we need these variables
# to be unset--not just set to an empty or harmless value--now, to
# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
# also avoids known problems related to "unset" and subshell syntax
# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
do eval test \${$as_var+y} \
  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
done

# Ensure that fds 0, 1, and 2 are open.
if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
if (exec 3>&2)            ; then :; else exec 2>/dev/null; fi

# The user is always right.
if ${PATH_SEPARATOR+false} :; 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


# 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
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    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
  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
  exit 1
fi



# 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
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
  fi
  printf "%s\n" "$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_nop
  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_nop
  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 ||
printf "%s\n" 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


# Determine whether it's possible to make 'echo' print without a newline.
# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
# for compatibility with existing Makefiles.
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

# For backward compatibility with old third-party macros, we provide
# the shell variables $as_echo and $as_echo_n.  New code should use
# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
as_echo='printf %s\n'
as_echo_n='printf %s'

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


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

  case $as_dir in #(
  -*) as_dir=./$as_dir;;
  esac
  test -d "$as_dir" || eval $as_mkdir_p || {
    as_dirs=
    while :; do
      case $as_dir in #(
      *\'*) as_qdir=`printf "%s\n" "$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 ||
printf "%s\n" X"$as_dir" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
      test -d "$as_dir" && break
    done
    test -z "$as_dirs" || eval "mkdir $as_dirs"
  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"


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


# as_fn_executable_p FILE
# -----------------------
# Test if FILE is an executable regular file.
as_fn_executable_p ()
{
  test -f "$1" && test -x "$1"
} # as_fn_executable_p
as_test_x='test -x'
as_executable_p=as_fn_executable_p

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

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


exec 6>&1
## ----------------------------------- ##
## Main body of $CONFIG_STATUS script. ##
## ----------------------------------- ##
_ASEOF
test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# Save the log message, to keep $0 and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by GNU Emacs $as_me 30.1.90, which was
generated by GNU Autoconf 2.71.  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_links="$ac_config_links"
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 links:
$config_links

Configuration commands:
$config_commands

Report bugs to <bug-gnu-emacs@gnu.org>.
GNU Emacs home page: <https://www.gnu.org/software/emacs/>.
General help using GNU software: <https://www.gnu.org/gethelp/>."

_ACEOF
ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
GNU Emacs config.status 30.1.90
configured by $0, generated by GNU Autoconf 2.71,
  with options \\"\$ac_cs_config\\"

Copyright (C) 2021 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'
MKDIR_P='$MKDIR_P'
AWK='$AWK'
test -n "\$AWK" || AWK=awk
_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# The default lists apply if the user does not specify any file.
ac_need_defaults=:
while test $# != 0
do
  case $1 in
  --*=?*)
    ac_option=`expr "X$1" : 'X\([^=]*\)='`
    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
    ac_shift=:
    ;;
  --*=)
    ac_option=`expr "X$1" : 'X\([^=]*\)='`
    ac_optarg=
    ac_shift=:
    ;;
  *)
    ac_option=$1
    ac_optarg=$2
    ac_shift=shift
    ;;
  esac

  case $ac_option in
  # Handling of the options.
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    ac_cs_recheck=: ;;
  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
    printf "%s\n" "$ac_cs_version"; exit ;;
  --config | --confi | --conf | --con | --co | --c )
    printf "%s\n" "$ac_cs_config"; exit ;;
  --debug | --debu | --deb | --de | --d | -d )
    debug=: ;;
  --file | --fil | --fi | --f )
    $ac_shift
    case $ac_optarg in
    *\'*) ac_optarg=`printf "%s\n" "$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=`printf "%s\n" "$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 )
    printf "%s\n" "$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
  \printf "%s\n" "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
  printf "%s\n" "$ac_log"
} >&5

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
#
# INIT-COMMANDS
#
GCC="$GCC" CPPFLAGS="$CPPFLAGS" opsys="$opsys" HAVE_NS="$HAVE_NS"
      EN_NS_SELF_CONTAINED="$EN_NS_SELF_CONTAINED"

_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
    "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
    "src/verbose.mk") CONFIG_FILES="$CONFIG_FILES src/verbose.mk" ;;
    "nt/emacs.rc") CONFIG_FILES="$CONFIG_FILES nt/emacs.rc" ;;
    "nt/emacsclient.rc") CONFIG_FILES="$CONFIG_FILES nt/emacsclient.rc" ;;
    "src/emacs-module.h") CONFIG_FILES="$CONFIG_FILES src/emacs-module.h" ;;
    "nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist") CONFIG_FILES="$CONFIG_FILES nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist:nextstep/templates/Info-gnustep.plist.in" ;;
    "nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop") CONFIG_FILES="$CONFIG_FILES nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in" ;;
    "nextstep/Cocoa/Emacs.base/Contents/Info.plist") CONFIG_FILES="$CONFIG_FILES nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in" ;;
    "nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings") CONFIG_FILES="$CONFIG_FILES nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings:nextstep/templates/InfoPlist.strings.in" ;;
    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
    "lib/gnulib.mk") CONFIG_FILES="$CONFIG_FILES lib/gnulib.mk" ;;
    "$srcdir/doc/man/emacs.1") CONFIG_FILES="$CONFIG_FILES $srcdir/doc/man/emacs.1" ;;
    "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
    "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;;
    "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
    "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
    "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
    "nextstep/Makefile") CONFIG_FILES="$CONFIG_FILES nextstep/Makefile" ;;
    "nt/Makefile") CONFIG_FILES="$CONFIG_FILES nt/Makefile" ;;
    "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
    "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
    "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
    "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
    "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
    "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
    "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
    "test/manual/noverlay/Makefile") CONFIG_FILES="$CONFIG_FILES test/manual/noverlay/Makefile" ;;
    "test/infra/Makefile") CONFIG_FILES="$CONFIG_FILES test/infra/Makefile" ;;
    "admin/charsets/Makefile") CONFIG_FILES="$CONFIG_FILES admin/charsets/Makefile" ;;
    "admin/unidata/Makefile") CONFIG_FILES="$CONFIG_FILES admin/unidata/Makefile" ;;
    "admin/grammars/Makefile") CONFIG_FILES="$CONFIG_FILES admin/grammars/Makefile" ;;
    "src/epaths.h") CONFIG_COMMANDS="$CONFIG_COMMANDS src/epaths.h" ;;
    "src/.gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS src/.gdbinit" ;;
    "doc/emacs/emacsver.texi") CONFIG_COMMANDS="$CONFIG_COMMANDS doc/emacs/emacsver.texi" ;;
    "etc-refcards-emacsver.tex") CONFIG_COMMANDS="$CONFIG_COMMANDS etc-refcards-emacsver.tex" ;;
    "cross/$file") CONFIG_LINKS="$CONFIG_LINKS cross/$file:$file" ;;
    "java/Makefile") CONFIG_FILES="$CONFIG_FILES java/Makefile" ;;
    "cross/Makefile") CONFIG_FILES="$CONFIG_FILES cross/Makefile" ;;
    "java/AndroidManifest.xml") CONFIG_FILES="$CONFIG_FILES java/AndroidManifest.xml" ;;
    "$ndk_DIR/Makefile") CONFIG_FILES="$CONFIG_FILES $ndk_DIR/Makefile" ;;
    "$ndk_DIR/ndk-build.mk") CONFIG_FILES="$CONFIG_FILES $ndk_DIR/ndk-build.mk" ;;

  *) 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+y} || CONFIG_FILES=$config_files
  test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
  test ${CONFIG_LINKS+y} || CONFIG_LINKS=$config_links
  test ${CONFIG_COMMANDS+y} || 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

if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
  ac_cs_awk_getline=:
  ac_cs_awk_pipe_init=
  ac_cs_awk_read_file='
      while ((getline aline < (F[key])) > 0)
	print(aline)
      close(F[key])'
  ac_cs_awk_pipe_fini=
else
  ac_cs_awk_getline=false
  ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
  ac_cs_awk_read_file='
      print "|#_!!_#|"
      print "cat " F[key] " &&"
      '$ac_cs_awk_pipe_init
  # The final `:' finishes the AND list.
  ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
fi
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

# Create commands to substitute file output variables.
{
  echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
  echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
  echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
  echo "_ACAWK" &&
  echo "_ACEOF"
} >conf$$files.sh &&
. ./conf$$files.sh ||
  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
rm -f conf$$files.sh

{
  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 = ""
  \$ac_cs_awk_pipe_init
}
{
  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
  }
  if (nfields == 3 && !substed) {
    key = field[2]
    if (F[key] != "" && line ~ /^[	 ]*@.*@[	 ]*$/) {
      \$ac_cs_awk_read_file
      next
    }
  }
  print line
}
\$ac_cs_awk_pipe_fini
_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  :L $CONFIG_LINKS  :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=`printf "%s\n" "$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 '`
	  printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
	`' by configure.'
    if test x"$ac_file" != x-; then
      configure_input="$ac_file.  $configure_input"
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
printf "%s\n" "$as_me: creating $ac_file" >&6;}
    fi
    # Neutralize special characters interpreted by sed in replacement strings.
    case $configure_input in #(
    *\&* | *\|* | *\\* )
       ac_sed_conf_input=`printf "%s\n" "$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 ||
printf "%s\n" 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=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
  # A ".." for each directory in $ac_dir_suffix.
  ac_top_builddir_sub=`printf "%s\n" "$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
  ac_MKDIR_P=$MKDIR_P
  case $MKDIR_P in
  [\\/$]* | ?:[\\/]* ) ;;
  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
  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@*)
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
printf "%s\n" "$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
s&@MKDIR_P@&$ac_MKDIR_P&;t t
$ac_datarootdir_hack
"
eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
if $ac_cs_awk_getline; then
  $AWK -f "$ac_tmp/subs.awk"
else
  $AWK -f "$ac_tmp/subs.awk" | $SHELL
fi \
  >$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"; } &&
  { printf "%s\n" "$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
printf "%s\n" "$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
    {
      printf "%s\n" "/* $configure_input  */" >&1 \
      && 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
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
printf "%s\n" "$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
    printf "%s\n" "/* $configure_input  */" >&1 \
      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
      || as_fn_error $? "could not create -" "$LINENO" 5
  fi
 ;;
  :L)
  #
  # CONFIG_LINK
  #

  if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
    :
  else
    # Prefer the file from the source tree if names are identical.
    if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
      ac_source=$srcdir/$ac_source
    fi

    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
printf "%s\n" "$as_me: linking $ac_source to $ac_file" >&6;}

    if test ! -r "$ac_source"; then
      as_fn_error $? "$ac_source: file not found" "$LINENO" 5
    fi
    rm -f "$ac_file"

    # Try a relative symlink, then a hard link, then a copy.
    case $ac_source in
    [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
	*) ac_rel_source=$ac_top_build_prefix$ac_source ;;
    esac
    ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
      ln "$ac_source" "$ac_file" 2>/dev/null ||
      cp -p "$ac_source" "$ac_file" ||
      as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
  fi
 ;;
  :C)  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
 ;;
  esac


  case $ac_file$ac_mode in
    "src/epaths.h":C)
  if test "${opsys}" = "mingw32"; then
    ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force-w32
  elif test "$HAVE_NS" = "yes" && test "$EN_NS_SELF_CONTAINED" = "yes"; then
    ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force-ns-self-contained
  else
    ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force
  fi || as_fn_error $? "'src/epaths.h' could not be made." "$LINENO" 5
   ;;
    "src/.gdbinit":C)
  if test ! -f src/.gdbinit && test -f "$srcdir/src/.gdbinit"; then
    printf "%s\n" "source $ac_abs_top_srcdir/src/.gdbinit" > src/.gdbinit
  fi
   ;;
    "doc/emacs/emacsver.texi":C)
  ${MAKE-make} -s --no-print-directory -C doc/emacs doc-emacsver || \
  as_fn_error $? "'doc/emacs/emacsver.texi' could not be made." "$LINENO" 5
   ;;
    "etc-refcards-emacsver.tex":C)
  ${MAKE-make} -s MAKEFILE_NAME=do-not-make-Makefile etc-emacsver || \
  as_fn_error $? "'etc/refcards/emacsver.tex' could not be made." "$LINENO" 5
   ;;

  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
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi


if test ! "$with_mailutils"; then
  if test "$with_pop" = yes; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: This configuration installs a 'movemail' program
that retrieves POP3 email via only insecure channels.
To omit insecure POP3, you can use '$0 --without-pop'." >&5
printf "%s\n" "$as_me: WARNING: This configuration installs a 'movemail' program
that retrieves POP3 email via only insecure channels.
To omit insecure POP3, you can use '$0 --without-pop'." >&2;}
  elif test "$with_pop" = no-by-default; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: This configuration installs a 'movemail' program
that does not retrieve POP3 email.  By default, Emacs 25 and earlier
installed a 'movemail' program that retrieved POP3 email via only
insecure channels, a practice that is no longer recommended but that
you can continue to support by using '$0 --with-pop'." >&5
printf "%s\n" "$as_me: WARNING: This configuration installs a 'movemail' program
that does not retrieve POP3 email.  By default, Emacs 25 and earlier
installed a 'movemail' program that retrieved POP3 email via only
insecure channels, a practice that is no longer recommended but that
you can continue to support by using '$0 --with-pop'." >&2;}
  fi

  case $opsys in
    mingw32)
      # Don't suggest GNU Mailutils, as it hasn't been ported.
      ;;
    *)
      emacs_fix_movemail="use '$0 --with-mailutils'"
      case `(movemail --version) 2>/dev/null` in
	*Mailutils*) ;;
	*) emacs_fix_movemail="install GNU Mailutils
<https://mailutils.org> and $emacs_fix_movemail";;
      esac
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: You might want to $emacs_fix_movemail." >&5
printf "%s\n" "$as_me: You might want to $emacs_fix_movemail." >&6;};;
  esac
fi

if test "${HAVE_XFT}" = yes; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: This configuration uses libXft, which has a number of
    font rendering issues, and is being considered for removal in the
    next release of Emacs.  Please consider using Cairo graphics +
    HarfBuzz text shaping instead (they are auto-detected if the
    relevant development headers are installed)." >&5
printf "%s\n" "$as_me: WARNING: This configuration uses libXft, which has a number of
    font rendering issues, and is being considered for removal in the
    next release of Emacs.  Please consider using Cairo graphics +
    HarfBuzz text shaping instead (they are auto-detected if the
    relevant development headers are installed)." >&2;}
fi

if test "${HAVE_CAIRO}" = "yes" && test "${HAVE_HARFBUZZ}" = no; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: This configuration uses the Cairo graphics library,
    but not the HarfBuzz font shaping library (minimum version $harfbuzz_required_ver).
    We recommend the use of HarfBuzz when using Cairo, please install
    appropriate HarfBuzz development packages." >&5
printf "%s\n" "$as_me: WARNING: This configuration uses the Cairo graphics library,
    but not the HarfBuzz font shaping library (minimum version $harfbuzz_required_ver).
    We recommend the use of HarfBuzz when using Cairo, please install
    appropriate HarfBuzz development packages." >&2;}
fi

# Let plain 'make' work.
test "$MAKE" = make || test -f makefile || cat >makefile <<EOF
.POSIX:
MAKE = $MAKE
all:
	\$(MAKE) -f Makefile \$?
.DEFAULT:
	\$(MAKE) -f Makefile \$<
EOF

