1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for libgnu UNUSED-VERSION.
4#
5#
6# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7#
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
14
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18  emulate sh
19  NULLCMD=:
20  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21  # is contrary to our usage.  Disable this feature.
22  alias -g '${1+"$@"}'='"$@"'
23  setopt NO_GLOB_SUBST
24else
25  case `(set -o) 2>/dev/null` in #(
26  *posix*) :
27    set -o posix ;; #(
28  *) :
29     ;;
30esac
31fi
32
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45  as_echo='print -r --'
46  as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48  as_echo='printf %s\n'
49  as_echo_n='printf %s'
50else
51  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53    as_echo_n='/usr/ucb/echo -n'
54  else
55    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56    as_echo_n_body='eval
57      arg=$1;
58      case $arg in #(
59      *"$as_nl"*)
60	expr "X$arg" : "X\\(.*\\)$as_nl";
61	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62      esac;
63      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64    '
65    export as_echo_n_body
66    as_echo_n='sh -c $as_echo_n_body as_echo'
67  fi
68  export as_echo_body
69  as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74  PATH_SEPARATOR=:
75  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77      PATH_SEPARATOR=';'
78  }
79fi
80
81
82# IFS
83# We need space, tab and new line, in precisely that order.  Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" ""	$as_nl"
88
89# Find who we are.  Look in the path if we contain no directory separator.
90as_myself=
91case $0 in #((
92  *[\\/]* ) as_myself=$0 ;;
93  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94for as_dir in $PATH
95do
96  IFS=$as_save_IFS
97  test -z "$as_dir" && as_dir=.
98    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99  done
100IFS=$as_save_IFS
101
102     ;;
103esac
104# We did not find ourselves, most probably we were run as `sh COMMAND'
105# in which case we are not to be found in the path.
106if test "x$as_myself" = x; then
107  as_myself=$0
108fi
109if test ! -f "$as_myself"; then
110  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111  exit 1
112fi
113
114# Unset variables that we do not need and which cause bugs (e.g. in
115# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
116# suppresses any "Segmentation fault" message there.  '((' could
117# trigger a bug in pdksh 5.2.14.
118for as_var in BASH_ENV ENV MAIL MAILPATH
119do eval test x\${$as_var+set} = xset \
120  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121done
122PS1='$ '
123PS2='> '
124PS4='+ '
125
126# NLS nuisances.
127LC_ALL=C
128export LC_ALL
129LANGUAGE=C
130export LANGUAGE
131
132# CDPATH.
133(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
135# Use a proper internal environment variable to ensure we don't fall
136  # into an infinite loop, continuously re-executing ourselves.
137  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138    _as_can_reexec=no; export _as_can_reexec;
139    # We cannot yet assume a decent shell, so we have to provide a
140# neutralization value for shells without unset; and this also
141# works around shells that cannot unset nonexistent variables.
142# Preserve -v and -x to the replacement shell.
143BASH_ENV=/dev/null
144ENV=/dev/null
145(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146case $- in # ((((
147  *v*x* | *x*v* ) as_opts=-vx ;;
148  *v* ) as_opts=-v ;;
149  *x* ) as_opts=-x ;;
150  * ) as_opts= ;;
151esac
152exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153# Admittedly, this is quite paranoid, since all the known shells bail
154# out after a failed `exec'.
155$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156as_fn_exit 255
157  fi
158  # We don't want this to propagate to other subprocesses.
159          { _as_can_reexec=; unset _as_can_reexec;}
160if test "x$CONFIG_SHELL" = x; then
161  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162  emulate sh
163  NULLCMD=:
164  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165  # is contrary to our usage.  Disable this feature.
166  alias -g '\${1+\"\$@\"}'='\"\$@\"'
167  setopt NO_GLOB_SUBST
168else
169  case \`(set -o) 2>/dev/null\` in #(
170  *posix*) :
171    set -o posix ;; #(
172  *) :
173     ;;
174esac
175fi
176"
177  as_required="as_fn_return () { (exit \$1); }
178as_fn_success () { as_fn_return 0; }
179as_fn_failure () { as_fn_return 1; }
180as_fn_ret_success () { return 0; }
181as_fn_ret_failure () { return 1; }
182
183exitcode=0
184as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190else
191  exitcode=1; echo positional parameters were not saved.
192fi
193test x\$exitcode = x0 || exit 1
194test -x / || exit 1"
195  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199test \$(( 1 + 1 )) = 2 || exit 1"
200  if (eval "$as_required") 2>/dev/null; then :
201  as_have_required=yes
202else
203  as_have_required=no
204fi
205  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207else
208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209as_found=false
210for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211do
212  IFS=$as_save_IFS
213  test -z "$as_dir" && as_dir=.
214  as_found=:
215  case $as_dir in #(
216	 /*)
217	   for as_base in sh bash ksh sh5; do
218	     # Try only shells that exist, to save several forks.
219	     as_shell=$as_dir/$as_base
220	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222  CONFIG_SHELL=$as_shell as_have_required=yes
223		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224  break 2
225fi
226fi
227	   done;;
228       esac
229  as_found=false
230done
231$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233  CONFIG_SHELL=$SHELL as_have_required=yes
234fi; }
235IFS=$as_save_IFS
236
237
238      if test "x$CONFIG_SHELL" != x; then :
239  export CONFIG_SHELL
240             # We cannot yet assume a decent shell, so we have to provide a
241# neutralization value for shells without unset; and this also
242# works around shells that cannot unset nonexistent variables.
243# Preserve -v and -x to the replacement shell.
244BASH_ENV=/dev/null
245ENV=/dev/null
246(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247case $- in # ((((
248  *v*x* | *x*v* ) as_opts=-vx ;;
249  *v* ) as_opts=-v ;;
250  *x* ) as_opts=-x ;;
251  * ) as_opts= ;;
252esac
253exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254# Admittedly, this is quite paranoid, since all the known shells bail
255# out after a failed `exec'.
256$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257exit 255
258fi
259
260    if test x$as_have_required = xno; then :
261  $as_echo "$0: This script requires a shell more modern than all"
262  $as_echo "$0: the shells that I found on your system."
263  if test x${ZSH_VERSION+set} = xset ; then
264    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266  else
267    $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268$0: including any error possibly output before this
269$0: message. Then install a modern shell, or manually run
270$0: the script under such a shell if you do have one."
271  fi
272  exit 1
273fi
274fi
275fi
276SHELL=${CONFIG_SHELL-/bin/sh}
277export SHELL
278# Unset more variables known to interfere with behavior of common tools.
279CLICOLOR_FORCE= GREP_OPTIONS=
280unset CLICOLOR_FORCE GREP_OPTIONS
281
282## --------------------- ##
283## M4sh Shell Functions. ##
284## --------------------- ##
285# as_fn_unset VAR
286# ---------------
287# Portably unset VAR.
288as_fn_unset ()
289{
290  { eval $1=; unset $1;}
291}
292as_unset=as_fn_unset
293
294# as_fn_set_status STATUS
295# -----------------------
296# Set $? to STATUS, without forking.
297as_fn_set_status ()
298{
299  return $1
300} # as_fn_set_status
301
302# as_fn_exit STATUS
303# -----------------
304# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305as_fn_exit ()
306{
307  set +e
308  as_fn_set_status $1
309  exit $1
310} # as_fn_exit
311
312# as_fn_mkdir_p
313# -------------
314# Create "$as_dir" as a directory, including parents if necessary.
315as_fn_mkdir_p ()
316{
317
318  case $as_dir in #(
319  -*) as_dir=./$as_dir;;
320  esac
321  test -d "$as_dir" || eval $as_mkdir_p || {
322    as_dirs=
323    while :; do
324      case $as_dir in #(
325      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326      *) as_qdir=$as_dir;;
327      esac
328      as_dirs="'$as_qdir' $as_dirs"
329      as_dir=`$as_dirname -- "$as_dir" ||
330$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331	 X"$as_dir" : 'X\(//\)[^/]' \| \
332	 X"$as_dir" : 'X\(//\)$' \| \
333	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334$as_echo X"$as_dir" |
335    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336	    s//\1/
337	    q
338	  }
339	  /^X\(\/\/\)[^/].*/{
340	    s//\1/
341	    q
342	  }
343	  /^X\(\/\/\)$/{
344	    s//\1/
345	    q
346	  }
347	  /^X\(\/\).*/{
348	    s//\1/
349	    q
350	  }
351	  s/.*/./; q'`
352      test -d "$as_dir" && break
353    done
354    test -z "$as_dirs" || eval "mkdir $as_dirs"
355  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356
357
358} # as_fn_mkdir_p
359
360# as_fn_executable_p FILE
361# -----------------------
362# Test if FILE is an executable regular file.
363as_fn_executable_p ()
364{
365  test -f "$1" && test -x "$1"
366} # as_fn_executable_p
367# as_fn_append VAR VALUE
368# ----------------------
369# Append the text in VALUE to the end of the definition contained in VAR. Take
370# advantage of any shell optimizations that allow amortized linear growth over
371# repeated appends, instead of the typical quadratic growth present in naive
372# implementations.
373if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374  eval 'as_fn_append ()
375  {
376    eval $1+=\$2
377  }'
378else
379  as_fn_append ()
380  {
381    eval $1=\$$1\$2
382  }
383fi # as_fn_append
384
385# as_fn_arith ARG...
386# ------------------
387# Perform arithmetic evaluation on the ARGs, and store the result in the
388# global $as_val. Take advantage of shells that can avoid forks. The arguments
389# must be portable across $(()) and expr.
390if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391  eval 'as_fn_arith ()
392  {
393    as_val=$(( $* ))
394  }'
395else
396  as_fn_arith ()
397  {
398    as_val=`expr "$@" || test $? -eq 1`
399  }
400fi # as_fn_arith
401
402
403# as_fn_error STATUS ERROR [LINENO LOG_FD]
404# ----------------------------------------
405# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407# script with STATUS, using 1 if that was 0.
408as_fn_error ()
409{
410  as_status=$1; test $as_status -eq 0 && as_status=1
411  if test "$4"; then
412    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414  fi
415  $as_echo "$as_me: error: $2" >&2
416  as_fn_exit $as_status
417} # as_fn_error
418
419if expr a : '\(a\)' >/dev/null 2>&1 &&
420   test "X`expr 00001 : '.*\(...\)'`" = X001; then
421  as_expr=expr
422else
423  as_expr=false
424fi
425
426if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427  as_basename=basename
428else
429  as_basename=false
430fi
431
432if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433  as_dirname=dirname
434else
435  as_dirname=false
436fi
437
438as_me=`$as_basename -- "$0" ||
439$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440	 X"$0" : 'X\(//\)$' \| \
441	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442$as_echo X/"$0" |
443    sed '/^.*\/\([^/][^/]*\)\/*$/{
444	    s//\1/
445	    q
446	  }
447	  /^X\/\(\/\/\)$/{
448	    s//\1/
449	    q
450	  }
451	  /^X\/\(\/\).*/{
452	    s//\1/
453	    q
454	  }
455	  s/.*/./; q'`
456
457# Avoid depending upon Character Ranges.
458as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461as_cr_digits='0123456789'
462as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
465  as_lineno_1=$LINENO as_lineno_1a=$LINENO
466  as_lineno_2=$LINENO as_lineno_2a=$LINENO
467  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
470  sed -n '
471    p
472    /[$]LINENO/=
473  ' <$as_myself |
474    sed '
475      s/[$]LINENO.*/&-/
476      t lineno
477      b
478      :lineno
479      N
480      :loop
481      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482      t loop
483      s/-\n.*//
484    ' >$as_me.lineno &&
485  chmod +x "$as_me.lineno" ||
486    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487
488  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489  # already done that, so ensure we don't try to do so again and fall
490  # in an infinite loop.  This has already happened in practice.
491  _as_can_reexec=no; export _as_can_reexec
492  # Don't try to exec as it changes $[0], causing all sort of problems
493  # (the dirname of $[0] is not the place where we might find the
494  # original and so on.  Autoconf is especially sensitive to this).
495  . "./$as_me.lineno"
496  # Exit status is that of the last command.
497  exit
498}
499
500ECHO_C= ECHO_N= ECHO_T=
501case `echo -n x` in #(((((
502-n*)
503  case `echo 'xy\c'` in
504  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
505  xy)  ECHO_C='\c';;
506  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
507       ECHO_T='	';;
508  esac;;
509*)
510  ECHO_N='-n';;
511esac
512
513rm -f conf$$ conf$$.exe conf$$.file
514if test -d conf$$.dir; then
515  rm -f conf$$.dir/conf$$.file
516else
517  rm -f conf$$.dir
518  mkdir conf$$.dir 2>/dev/null
519fi
520if (echo >conf$$.file) 2>/dev/null; then
521  if ln -s conf$$.file conf$$ 2>/dev/null; then
522    as_ln_s='ln -s'
523    # ... but there are two gotchas:
524    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526    # In both cases, we have to default to `cp -pR'.
527    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528      as_ln_s='cp -pR'
529  elif ln conf$$.file conf$$ 2>/dev/null; then
530    as_ln_s=ln
531  else
532    as_ln_s='cp -pR'
533  fi
534else
535  as_ln_s='cp -pR'
536fi
537rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538rmdir conf$$.dir 2>/dev/null
539
540if mkdir -p . 2>/dev/null; then
541  as_mkdir_p='mkdir -p "$as_dir"'
542else
543  test -d ./-p && rmdir ./-p
544  as_mkdir_p=false
545fi
546
547as_test_x='test -x'
548as_executable_p=as_fn_executable_p
549
550# Sed expression to map a string onto a valid CPP name.
551as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553# Sed expression to map a string onto a valid variable name.
554as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557test -n "$DJDIR" || exec 7<&0 </dev/null
558exec 6>&1
559
560# Name of the host.
561# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562# so uname gets run too.
563ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565#
566# Initializations.
567#
568ac_default_prefix=/usr/local
569ac_clean_files=
570ac_config_libobj_dir=.
571LIBOBJS=
572cross_compiling=no
573subdirs=
574MFLAGS=
575MAKEFLAGS=
576
577# Identity of this package.
578PACKAGE_NAME='libgnu'
579PACKAGE_TARNAME='libgnu'
580PACKAGE_VERSION='UNUSED-VERSION'
581PACKAGE_STRING='libgnu UNUSED-VERSION'
582PACKAGE_BUGREPORT=''
583PACKAGE_URL=''
584
585ac_unique_file="import/memmem.c"
586ac_header_list=
587# Factoring default headers for most tests.
588ac_includes_default="\
589#include <stdio.h>
590#ifdef HAVE_SYS_TYPES_H
591# include <sys/types.h>
592#endif
593#ifdef HAVE_SYS_STAT_H
594# include <sys/stat.h>
595#endif
596#ifdef STDC_HEADERS
597# include <stdlib.h>
598# include <stddef.h>
599#else
600# ifdef HAVE_STDLIB_H
601#  include <stdlib.h>
602# endif
603#endif
604#ifdef HAVE_STRING_H
605# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
606#  include <memory.h>
607# endif
608# include <string.h>
609#endif
610#ifdef HAVE_STRINGS_H
611# include <strings.h>
612#endif
613#ifdef HAVE_INTTYPES_H
614# include <inttypes.h>
615#endif
616#ifdef HAVE_STDINT_H
617# include <stdint.h>
618#endif
619#ifdef HAVE_UNISTD_H
620# include <unistd.h>
621#endif"
622
623gl_use_threads_default=
624gl_use_winpthreads_default=
625ac_func_list=
626gl_fnmatch_required=POSIX
627ac_subst_vars='am__EXEEXT_FALSE
628am__EXEEXT_TRUE
629gltests_LTLIBOBJS
630gltests_LIBOBJS
631gl_LTLIBOBJS
632gl_LIBOBJS
633LTLIBOBJS
634LIBOBJS
635LN_S
636AM_BACKSLASH
637AM_DEFAULT_VERBOSITY
638AM_DEFAULT_V
639AM_V
640am__fastdepCC_FALSE
641am__fastdepCC_TRUE
642CCDEPMODE
643am__nodep
644AMDEPBACKSLASH
645AMDEP_FALSE
646AMDEP_TRUE
647am__quote
648am__include
649DEPDIR
650am__untar
651am__tar
652AMTAR
653am__leading_dot
654SET_MAKE
655AWK
656mkdir_p
657INSTALL_STRIP_PROGRAM
658STRIP
659install_sh
660MAKEINFO
661AUTOHEADER
662AUTOMAKE
663AUTOCONF
664ACLOCAL
665VERSION
666PACKAGE
667CYGPATH_W
668am__isrc
669INSTALL_DATA
670INSTALL_SCRIPT
671INSTALL_PROGRAM
672LIBGNU_LTLIBDEPS
673LIBGNU_LIBDEPS
674gltests_WITNESS
675REPLACE_TOWLOWER
676REPLACE_ISWCNTRL
677HAVE_WCTYPE_H
678NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
679NEXT_WCTYPE_H
680HAVE_ISWCNTRL
681REPLACE_ISWXDIGIT
682REPLACE_ISWDIGIT
683REPLACE_ISWBLANK
684HAVE_WCTRANS_T
685HAVE_WCTYPE_T
686HAVE_ISWBLANK
687GNULIB_TOWCTRANS
688GNULIB_WCTRANS
689GNULIB_ISWCTYPE
690GNULIB_WCTYPE
691GNULIB_ISWXDIGIT
692GNULIB_ISWDIGIT
693GNULIB_ISWBLANK
694HAVE_CRTDEFS_H
695HAVE_WINT_T
696NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
697NEXT_WCHAR_H
698HAVE_UNISTD_H
699NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
700NEXT_UNISTD_H
701TIME_H_DEFINES_TIME_UTC
702UNISTD_H_DEFINES_STRUCT_TIMESPEC
703PTHREAD_H_DEFINES_STRUCT_TIMESPEC
704SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
705TIME_H_DEFINES_STRUCT_TIMESPEC
706NEXT_AS_FIRST_DIRECTIVE_TIME_H
707NEXT_TIME_H
708REPLACE_LOCALTIME
709REPLACE_GMTIME
710REPLACE_TZSET
711REPLACE_TIMEGM
712REPLACE_STRFTIME
713REPLACE_NANOSLEEP
714REPLACE_MKTIME
715REPLACE_LOCALTIME_R
716REPLACE_CTIME
717HAVE_TIMEZONE_T
718HAVE_TIMESPEC_GET
719HAVE_TIMEGM
720HAVE_STRPTIME
721HAVE_NANOSLEEP
722HAVE_DECL_LOCALTIME_R
723GNULIB_MDA_TZSET
724GNULIB_TZSET
725GNULIB_TIME_RZ
726GNULIB_TIME_R
727GNULIB_TIMESPEC_GET
728GNULIB_TIMEGM
729GNULIB_STRPTIME
730GNULIB_STRFTIME
731GNULIB_NANOSLEEP
732GNULIB_LOCALTIME
733GNULIB_MKTIME
734GNULIB_CTIME
735HAVE_SYS_UIO_H
736NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H
737NEXT_SYS_UIO_H
738WINDOWS_STAT_INODES
739WINDOWS_64_BIT_OFF_T
740NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
741NEXT_SYS_TYPES_H
742HAVE_SYS_RANDOM_H
743NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H
744NEXT_SYS_RANDOM_H
745HAVE_STRINGS_H
746NEXT_AS_FIRST_DIRECTIVE_STRINGS_H
747NEXT_STRINGS_H
748NEXT_AS_FIRST_DIRECTIVE_STRING_H
749NEXT_STRING_H
750NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
751NEXT_STDLIB_H
752NEXT_AS_FIRST_DIRECTIVE_STDIO_H
753NEXT_STDIO_H
754HAVE__BOOL
755GL_GENERATE_STDBOOL_H_FALSE
756GL_GENERATE_STDBOOL_H_TRUE
757STDBOOL_H
758GL_GENERATE_STDALIGN_H_FALSE
759GL_GENERATE_STDALIGN_H_TRUE
760STDALIGN_H
761NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
762NEXT_SIGNAL_H
763REPLACE_RAISE
764REPLACE_PTHREAD_SIGMASK
765HAVE_SIGHANDLER_T
766HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
767HAVE_STRUCT_SIGACTION_SA_SIGACTION
768HAVE_SIGACTION
769HAVE_SIGINFO_T
770HAVE_SIGSET_T
771HAVE_RAISE
772HAVE_PTHREAD_SIGMASK
773HAVE_POSIX_SIGNALBLOCKING
774GNULIB_SIGACTION
775GNULIB_SIGPROCMASK
776GNULIB_SIGNAL_H_SIGPIPE
777GNULIB_RAISE
778GNULIB_PTHREAD_SIGMASK
779LIB_SELECT
780LIBSOCKET
781HAVE_SYS_SELECT_H
782NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
783NEXT_SYS_SELECT_H
784REPLACE_SELECT
785REPLACE_PSELECT
786HAVE_PSELECT
787GNULIB_SELECT
788GNULIB_PSELECT
789GL_GENERATE_NETINET_IN_H_FALSE
790GL_GENERATE_NETINET_IN_H_TRUE
791NETINET_IN_H
792HAVE_NETINET_IN_H
793NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H
794NEXT_NETINET_IN_H
795HAVE_NETDB_H
796NEXT_AS_FIRST_DIRECTIVE_NETDB_H
797NEXT_NETDB_H
798REPLACE_GETADDRINFO
799REPLACE_GAI_STRERROR
800HAVE_DECL_GETNAMEINFO
801HAVE_DECL_GETADDRINFO
802HAVE_DECL_GAI_STRERROR
803HAVE_DECL_FREEADDRINFO
804HAVE_STRUCT_ADDRINFO
805GNULIB_GETADDRINFO
806UNDEFINE_STRTOK_R
807REPLACE_STRSIGNAL
808REPLACE_STRERRORNAME_NP
809REPLACE_STRERROR_R
810REPLACE_STRERROR
811REPLACE_STRTOK_R
812REPLACE_STRCASESTR
813REPLACE_STRSTR
814REPLACE_STRNLEN
815REPLACE_STRNDUP
816REPLACE_STRNCAT
817REPLACE_STRDUP
818REPLACE_STRCHRNUL
819REPLACE_STPNCPY
820REPLACE_MEMMEM
821REPLACE_MEMCHR
822REPLACE_FFSLL
823HAVE_STRVERSCMP
824HAVE_DECL_STRSIGNAL
825HAVE_SIGDESCR_NP
826HAVE_SIGABBREV_NP
827HAVE_STRERRORNAME_NP
828HAVE_DECL_STRERROR_R
829HAVE_DECL_STRTOK_R
830HAVE_STRCASESTR
831HAVE_STRSEP
832HAVE_STRPBRK
833HAVE_DECL_STRNLEN
834HAVE_DECL_STRNDUP
835HAVE_DECL_STRDUP
836HAVE_STRCHRNUL
837HAVE_STPNCPY
838HAVE_STPCPY
839HAVE_RAWMEMCHR
840HAVE_DECL_MEMRCHR
841HAVE_MEMPCPY
842HAVE_DECL_MEMMEM
843HAVE_FFSLL
844HAVE_FFSL
845HAVE_EXPLICIT_BZERO
846GNULIB_MDA_STRDUP
847GNULIB_MDA_MEMCCPY
848HAVE_MBSLEN
849GNULIB_STRVERSCMP
850GNULIB_STRSIGNAL
851GNULIB_SIGDESCR_NP
852GNULIB_SIGABBREV_NP
853GNULIB_STRERRORNAME_NP
854GNULIB_STRERROR_R
855GNULIB_STRERROR
856GNULIB_MBSTOK_R
857GNULIB_MBSSEP
858GNULIB_MBSSPN
859GNULIB_MBSPBRK
860GNULIB_MBSCSPN
861GNULIB_MBSCASESTR
862GNULIB_MBSPCASECMP
863GNULIB_MBSNCASECMP
864GNULIB_MBSCASECMP
865GNULIB_MBSSTR
866GNULIB_MBSRCHR
867GNULIB_MBSCHR
868GNULIB_MBSNLEN
869GNULIB_MBSLEN
870GNULIB_STRTOK_R
871GNULIB_STRCASESTR
872GNULIB_STRSTR
873GNULIB_STRSEP
874GNULIB_STRPBRK
875GNULIB_STRNLEN
876GNULIB_STRNDUP
877GNULIB_STRNCAT
878GNULIB_STRDUP
879GNULIB_STRCHRNUL
880GNULIB_STPNCPY
881GNULIB_STPCPY
882GNULIB_RAWMEMCHR
883GNULIB_MEMRCHR
884GNULIB_MEMPCPY
885GNULIB_MEMMEM
886GNULIB_MEMCHR
887GNULIB_FFSLL
888GNULIB_FFSL
889GNULIB_EXPLICIT_BZERO
890HAVE_VISIBILITY
891CFLAG_VISIBILITY
892LIB_MBRTOWC
893LOCALE_ZH_CN
894LOCALE_FR_UTF8
895LOCALE_JA
896NEXT_AS_FIRST_DIRECTIVE_MATH_H
897NEXT_MATH_H
898LTLIBMULTITHREAD
899LIBMULTITHREAD
900LTLIBTHREAD
901LIBTHREAD
902LIBSTDTHREAD
903NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
904NEXT_LOCALE_H
905HAVE_XLOCALE_H
906NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
907NEXT_STDDEF_H
908GL_GENERATE_STDDEF_H_FALSE
909GL_GENERATE_STDDEF_H_TRUE
910STDDEF_H
911HAVE_WCHAR_T
912HAVE_MAX_ALIGN_T
913REPLACE_NULL
914REPLACE_STRUCT_LCONV
915REPLACE_FREELOCALE
916REPLACE_DUPLOCALE
917REPLACE_NEWLOCALE
918REPLACE_SETLOCALE
919REPLACE_LOCALECONV
920HAVE_FREELOCALE
921HAVE_DUPLOCALE
922HAVE_NEWLOCALE
923GNULIB_LOCALENAME
924GNULIB_DUPLOCALE
925GNULIB_SETLOCALE_NULL
926GNULIB_SETLOCALE
927GNULIB_LOCALECONV
928LOCALCHARSET_TESTS_ENVIRONMENT
929NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
930NEXT_INTTYPES_H
931UINT64_MAX_EQ_ULONG_MAX
932UINT32_MAX_LT_UINTMAX_MAX
933PRIPTR_PREFIX
934INT64_MAX_EQ_LONG_MAX
935INT32_MAX_LT_INTMAX_MAX
936REPLACE_STRTOUMAX
937REPLACE_STRTOIMAX
938HAVE_IMAXDIV_T
939HAVE_DECL_STRTOUMAX
940HAVE_DECL_STRTOIMAX
941HAVE_DECL_IMAXDIV
942HAVE_DECL_IMAXABS
943GNULIB_STRTOUMAX
944GNULIB_STRTOIMAX
945GNULIB_IMAXDIV
946GNULIB_IMAXABS
947GL_GENERATE_STDINT_H_FALSE
948GL_GENERATE_STDINT_H_TRUE
949STDINT_H
950HAVE_SYS_INTTYPES_H
951HAVE_SYS_BITYPES_H
952HAVE_C99_STDINT_H
953WINT_T_SUFFIX
954WCHAR_T_SUFFIX
955SIG_ATOMIC_T_SUFFIX
956SIZE_T_SUFFIX
957PTRDIFF_T_SUFFIX
958HAVE_SIGNED_WINT_T
959HAVE_SIGNED_WCHAR_T
960HAVE_SIGNED_SIG_ATOMIC_T
961BITSIZEOF_WINT_T
962BITSIZEOF_WCHAR_T
963BITSIZEOF_SIG_ATOMIC_T
964BITSIZEOF_SIZE_T
965BITSIZEOF_PTRDIFF_T
966APPLE_UNIVERSAL_BUILD
967HAVE_STDINT_H
968NEXT_AS_FIRST_DIRECTIVE_STDINT_H
969NEXT_STDINT_H
970HAVE_SYS_TYPES_H
971HAVE_INTTYPES_H
972HAVE_WCHAR_H
973GNULIB_OVERRIDES_WINT_T
974GL_GENERATE_LIMITS_H_FALSE
975GL_GENERATE_LIMITS_H_TRUE
976LIMITS_H
977NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
978NEXT_LIMITS_H
979HAVE_SYS_SOCKET_H
980NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H
981NEXT_SYS_SOCKET_H
982HAVE_ACCEPT4
983HAVE_SA_FAMILY_T
984HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
985HAVE_STRUCT_SOCKADDR_STORAGE
986GNULIB_ACCEPT4
987GNULIB_SHUTDOWN
988GNULIB_SETSOCKOPT
989GNULIB_SENDTO
990GNULIB_RECVFROM
991GNULIB_SEND
992GNULIB_RECV
993GNULIB_LISTEN
994GNULIB_GETSOCKOPT
995GNULIB_GETSOCKNAME
996GNULIB_GETPEERNAME
997GNULIB_BIND
998GNULIB_ACCEPT
999GNULIB_CONNECT
1000GNULIB_SOCKET
1001INET_NTOP_LIB
1002LIB_HARD_LOCALE
1003LIB_SETLOCALE_NULL
1004LIB_SCHED_YIELD
1005LIBPMULTITHREAD
1006LIBPTHREAD
1007GL_GENERATE_GLOB_H_FALSE
1008GL_GENERATE_GLOB_H_TRUE
1009GLOB_H
1010HAVE_GLOB_H
1011NEXT_AS_FIRST_DIRECTIVE_GLOB_H
1012NEXT_GLOB_H
1013REPLACE_GLOB_PATTERN_P
1014REPLACE_GLOB
1015HAVE_GLOB_PATTERN_P
1016HAVE_GLOB
1017GNULIB_GLOB
1018NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1019NEXT_SYS_TIME_H
1020REPLACE_STRUCT_TIMEVAL
1021REPLACE_GETTIMEOFDAY
1022HAVE_SYS_TIME_H
1023HAVE_STRUCT_TIMEVAL
1024HAVE_GETTIMEOFDAY
1025GNULIB_GETTIMEOFDAY
1026LTLIBINTL
1027LIBINTL
1028LIB_GETRANDOM
1029REPLACE_GETRANDOM
1030HAVE_GETRANDOM
1031GNULIB_GETRANDOM
1032LIB_GETLOGIN
1033REPLACE_VSPRINTF
1034REPLACE_VSNPRINTF
1035REPLACE_VPRINTF
1036REPLACE_VFPRINTF
1037REPLACE_VDPRINTF
1038REPLACE_VASPRINTF
1039REPLACE_TMPFILE
1040REPLACE_STDIO_WRITE_FUNCS
1041REPLACE_STDIO_READ_FUNCS
1042REPLACE_SPRINTF
1043REPLACE_SNPRINTF
1044REPLACE_RENAMEAT
1045REPLACE_RENAME
1046REPLACE_REMOVE
1047REPLACE_PRINTF
1048REPLACE_POPEN
1049REPLACE_PERROR
1050REPLACE_OBSTACK_PRINTF
1051REPLACE_GETLINE
1052REPLACE_GETDELIM
1053REPLACE_FTELLO
1054REPLACE_FTELL
1055REPLACE_FSEEKO
1056REPLACE_FSEEK
1057REPLACE_FREOPEN
1058REPLACE_FPURGE
1059REPLACE_FPRINTF
1060REPLACE_FOPEN
1061REPLACE_FFLUSH
1062REPLACE_FDOPEN
1063REPLACE_FCLOSE
1064REPLACE_DPRINTF
1065HAVE_VDPRINTF
1066HAVE_VASPRINTF
1067HAVE_RENAMEAT
1068HAVE_POPEN
1069HAVE_PCLOSE
1070HAVE_FTELLO
1071HAVE_FSEEKO
1072HAVE_DPRINTF
1073HAVE_DECL_VSNPRINTF
1074HAVE_DECL_SNPRINTF
1075HAVE_DECL_OBSTACK_PRINTF
1076HAVE_DECL_GETLINE
1077HAVE_DECL_GETDELIM
1078HAVE_DECL_FTELLO
1079HAVE_DECL_FSEEKO
1080HAVE_DECL_FPURGE
1081HAVE_DECL_FCLOSEALL
1082GNULIB_MDA_TEMPNAM
1083GNULIB_MDA_PUTW
1084GNULIB_MDA_GETW
1085GNULIB_MDA_FILENO
1086GNULIB_MDA_FDOPEN
1087GNULIB_MDA_FCLOSEALL
1088GNULIB_VSPRINTF_POSIX
1089GNULIB_VSNPRINTF
1090GNULIB_VPRINTF_POSIX
1091GNULIB_VPRINTF
1092GNULIB_VFPRINTF_POSIX
1093GNULIB_VFPRINTF
1094GNULIB_VDPRINTF
1095GNULIB_VSCANF
1096GNULIB_VFSCANF
1097GNULIB_VASPRINTF
1098GNULIB_TMPFILE
1099GNULIB_STDIO_H_SIGPIPE
1100GNULIB_STDIO_H_NONBLOCKING
1101GNULIB_SPRINTF_POSIX
1102GNULIB_SNPRINTF
1103GNULIB_SCANF
1104GNULIB_RENAMEAT
1105GNULIB_RENAME
1106GNULIB_REMOVE
1107GNULIB_PUTS
1108GNULIB_PUTCHAR
1109GNULIB_PUTC
1110GNULIB_PRINTF_POSIX
1111GNULIB_PRINTF
1112GNULIB_POPEN
1113GNULIB_PERROR
1114GNULIB_PCLOSE
1115GNULIB_OBSTACK_PRINTF_POSIX
1116GNULIB_OBSTACK_PRINTF
1117GNULIB_GETLINE
1118GNULIB_GETDELIM
1119GNULIB_GETCHAR
1120GNULIB_GETC
1121GNULIB_FWRITE
1122GNULIB_FTELLO
1123GNULIB_FTELL
1124GNULIB_FSEEKO
1125GNULIB_FSEEK
1126GNULIB_FSCANF
1127GNULIB_FREOPEN
1128GNULIB_FREAD
1129GNULIB_FPUTS
1130GNULIB_FPUTC
1131GNULIB_FPURGE
1132GNULIB_FPRINTF_POSIX
1133GNULIB_FPRINTF
1134GNULIB_FOPEN
1135GNULIB_FGETS
1136GNULIB_FGETC
1137GNULIB_FFLUSH
1138GNULIB_FDOPEN
1139GNULIB_FCLOSE
1140GNULIB_DPRINTF
1141WINDOWS_64_BIT_ST_SIZE
1142WINDOWS_STAT_TIMESPEC
1143NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1144NEXT_SYS_STAT_H
1145REPLACE_UTIMENSAT
1146REPLACE_STAT
1147REPLACE_MKNODAT
1148REPLACE_MKNOD
1149REPLACE_MKFIFOAT
1150REPLACE_MKFIFO
1151REPLACE_MKDIR
1152REPLACE_LSTAT
1153REPLACE_FUTIMENS
1154REPLACE_FSTATAT
1155REPLACE_FSTAT
1156REPLACE_FCHMODAT
1157HAVE_UTIMENSAT
1158HAVE_MKNODAT
1159HAVE_MKNOD
1160HAVE_MKFIFOAT
1161HAVE_MKFIFO
1162HAVE_MKDIRAT
1163HAVE_LSTAT
1164HAVE_LCHMOD
1165HAVE_GETUMASK
1166HAVE_FUTIMENS
1167HAVE_FSTATAT
1168HAVE_FCHMODAT
1169GNULIB_MDA_UMASK
1170GNULIB_MDA_MKDIR
1171GNULIB_MDA_CHMOD
1172GNULIB_OVERRIDES_STRUCT_STAT
1173GNULIB_UTIMENSAT
1174GNULIB_STAT
1175GNULIB_MKNODAT
1176GNULIB_MKNOD
1177GNULIB_MKFIFOAT
1178GNULIB_MKFIFO
1179GNULIB_MKDIRAT
1180GNULIB_MKDIR
1181GNULIB_LSTAT
1182GNULIB_LCHMOD
1183GNULIB_GETUMASK
1184GNULIB_FUTIMENS
1185GNULIB_FSTATAT
1186GNULIB_FSTAT
1187GNULIB_FCHMODAT
1188FREXPL_LIBM
1189HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1190FREXP_LIBM
1191REPLACE_TRUNCL
1192REPLACE_TRUNCF
1193REPLACE_TRUNC
1194REPLACE_TANHF
1195REPLACE_TANF
1196REPLACE_SQRTL
1197REPLACE_SQRTF
1198REPLACE_SINHF
1199REPLACE_SINF
1200REPLACE_SIGNBIT_USING_BUILTINS
1201REPLACE_SIGNBIT
1202REPLACE_ROUNDL
1203REPLACE_ROUNDF
1204REPLACE_ROUND
1205REPLACE_RINTL
1206REPLACE_REMAINDERL
1207REPLACE_REMAINDERF
1208REPLACE_REMAINDER
1209REPLACE_NAN
1210REPLACE_MODFL
1211REPLACE_MODFF
1212REPLACE_MODF
1213REPLACE_LOGBL
1214REPLACE_LOGBF
1215REPLACE_LOGB
1216REPLACE_LOG2L
1217REPLACE_LOG2F
1218REPLACE_LOG2
1219REPLACE_LOG1PL
1220REPLACE_LOG1PF
1221REPLACE_LOG1P
1222REPLACE_LOG10L
1223REPLACE_LOG10F
1224REPLACE_LOG10
1225REPLACE_LOGL
1226REPLACE_LOGF
1227REPLACE_LOG
1228REPLACE_LDEXPL
1229REPLACE_ISNAN
1230REPLACE_ISINF
1231REPLACE_ISFINITE
1232REPLACE_ILOGBL
1233REPLACE_ILOGBF
1234REPLACE_ILOGB
1235REPLACE_HYPOTL
1236REPLACE_HYPOTF
1237REPLACE_HYPOT
1238REPLACE_HUGE_VAL
1239REPLACE_FREXPL
1240REPLACE_FREXP
1241REPLACE_FREXPF
1242REPLACE_FMODL
1243REPLACE_FMODF
1244REPLACE_FMOD
1245REPLACE_FMAL
1246REPLACE_FMAF
1247REPLACE_FMA
1248REPLACE_FLOORL
1249REPLACE_FLOORF
1250REPLACE_FLOOR
1251REPLACE_FABSL
1252REPLACE_EXP2L
1253REPLACE_EXP2
1254REPLACE_EXPM1L
1255REPLACE_EXPM1F
1256REPLACE_EXPM1
1257REPLACE_EXPL
1258REPLACE_EXPF
1259REPLACE_COSHF
1260REPLACE_COSF
1261REPLACE_CEILL
1262REPLACE_CEILF
1263REPLACE_CEIL
1264REPLACE_CBRTL
1265REPLACE_CBRTF
1266REPLACE_ATAN2F
1267REPLACE_ATANF
1268REPLACE_ASINF
1269REPLACE_ACOSF
1270HAVE_DECL_TRUNCL
1271HAVE_DECL_TRUNCF
1272HAVE_DECL_TRUNC
1273HAVE_DECL_TANL
1274HAVE_DECL_SQRTL
1275HAVE_DECL_SINL
1276HAVE_DECL_ROUNDL
1277HAVE_DECL_ROUNDF
1278HAVE_DECL_ROUND
1279HAVE_DECL_RINTF
1280HAVE_DECL_REMAINDERL
1281HAVE_DECL_REMAINDER
1282HAVE_DECL_LOGB
1283HAVE_DECL_LOG2L
1284HAVE_DECL_LOG2F
1285HAVE_DECL_LOG2
1286HAVE_DECL_LOG10L
1287HAVE_DECL_LOGL
1288HAVE_DECL_LDEXPL
1289HAVE_DECL_FREXPL
1290HAVE_DECL_FLOORL
1291HAVE_DECL_FLOORF
1292HAVE_DECL_EXPM1L
1293HAVE_DECL_EXP2L
1294HAVE_DECL_EXP2F
1295HAVE_DECL_EXP2
1296HAVE_DECL_EXPL
1297HAVE_DECL_COSL
1298HAVE_DECL_COPYSIGNF
1299HAVE_DECL_CEILL
1300HAVE_DECL_CEILF
1301HAVE_DECL_CBRTL
1302HAVE_DECL_CBRTF
1303HAVE_DECL_ATANL
1304HAVE_DECL_ASINL
1305HAVE_DECL_ACOSL
1306HAVE_TANHF
1307HAVE_TANL
1308HAVE_TANF
1309HAVE_SQRTL
1310HAVE_SQRTF
1311HAVE_SINHF
1312HAVE_SINL
1313HAVE_SINF
1314HAVE_RINTL
1315HAVE_RINT
1316HAVE_REMAINDERF
1317HAVE_REMAINDER
1318HAVE_POWF
1319HAVE_MODFL
1320HAVE_MODFF
1321HAVE_LOGBL
1322HAVE_LOGBF
1323HAVE_LOG1PL
1324HAVE_LOG1PF
1325HAVE_LOG1P
1326HAVE_LOG10L
1327HAVE_LOG10F
1328HAVE_LOGL
1329HAVE_LOGF
1330HAVE_LDEXPF
1331HAVE_ISNANL
1332HAVE_ISNAND
1333HAVE_ISNANF
1334HAVE_ILOGBL
1335HAVE_ILOGBF
1336HAVE_ILOGB
1337HAVE_HYPOTL
1338HAVE_HYPOTF
1339HAVE_FREXPF
1340HAVE_FMODL
1341HAVE_FMODF
1342HAVE_FMAL
1343HAVE_FMAF
1344HAVE_FMA
1345HAVE_FABSL
1346HAVE_FABSF
1347HAVE_EXPM1F
1348HAVE_EXPM1
1349HAVE_EXPL
1350HAVE_EXPF
1351HAVE_COSHF
1352HAVE_COSL
1353HAVE_COSF
1354HAVE_COPYSIGNL
1355HAVE_COPYSIGN
1356HAVE_CBRTL
1357HAVE_CBRTF
1358HAVE_CBRT
1359HAVE_ATAN2F
1360HAVE_ATANL
1361HAVE_ATANF
1362HAVE_ASINL
1363HAVE_ASINF
1364HAVE_ACOSL
1365HAVE_ACOSF
1366GNULIB_MDA_YN
1367GNULIB_MDA_Y1
1368GNULIB_MDA_Y0
1369GNULIB_MDA_JN
1370GNULIB_MDA_J1
1371GNULIB_MDA_J0
1372GNULIB_TRUNCL
1373GNULIB_TRUNCF
1374GNULIB_TRUNC
1375GNULIB_TANHF
1376GNULIB_TANL
1377GNULIB_TANF
1378GNULIB_SQRTL
1379GNULIB_SQRTF
1380GNULIB_SINHF
1381GNULIB_SINL
1382GNULIB_SINF
1383GNULIB_SIGNBIT
1384GNULIB_ROUNDL
1385GNULIB_ROUNDF
1386GNULIB_ROUND
1387GNULIB_RINTL
1388GNULIB_RINTF
1389GNULIB_RINT
1390GNULIB_REMAINDERL
1391GNULIB_REMAINDERF
1392GNULIB_REMAINDER
1393GNULIB_POWF
1394GNULIB_MODFL
1395GNULIB_MODFF
1396GNULIB_MODF
1397GNULIB_LOGBL
1398GNULIB_LOGBF
1399GNULIB_LOGB
1400GNULIB_LOG2L
1401GNULIB_LOG2F
1402GNULIB_LOG2
1403GNULIB_LOG1PL
1404GNULIB_LOG1PF
1405GNULIB_LOG1P
1406GNULIB_LOG10L
1407GNULIB_LOG10F
1408GNULIB_LOG10
1409GNULIB_LOGL
1410GNULIB_LOGF
1411GNULIB_LOG
1412GNULIB_LDEXPL
1413GNULIB_LDEXPF
1414GNULIB_ISNANL
1415GNULIB_ISNAND
1416GNULIB_ISNANF
1417GNULIB_ISNAN
1418GNULIB_ISINF
1419GNULIB_ISFINITE
1420GNULIB_ILOGBL
1421GNULIB_ILOGBF
1422GNULIB_ILOGB
1423GNULIB_HYPOTL
1424GNULIB_HYPOTF
1425GNULIB_HYPOT
1426GNULIB_FREXPL
1427GNULIB_FREXP
1428GNULIB_FREXPF
1429GNULIB_FMODL
1430GNULIB_FMODF
1431GNULIB_FMOD
1432GNULIB_FMAL
1433GNULIB_FMAF
1434GNULIB_FMA
1435GNULIB_FLOORL
1436GNULIB_FLOORF
1437GNULIB_FLOOR
1438GNULIB_FABSL
1439GNULIB_FABSF
1440GNULIB_EXPM1L
1441GNULIB_EXPM1F
1442GNULIB_EXPM1
1443GNULIB_EXP2L
1444GNULIB_EXP2F
1445GNULIB_EXP2
1446GNULIB_EXPL
1447GNULIB_EXPF
1448GNULIB_COSHF
1449GNULIB_COSL
1450GNULIB_COSF
1451GNULIB_COPYSIGNL
1452GNULIB_COPYSIGNF
1453GNULIB_COPYSIGN
1454GNULIB_CEILL
1455GNULIB_CEILF
1456GNULIB_CEIL
1457GNULIB_CBRTL
1458GNULIB_CBRTF
1459GNULIB_CBRT
1460GNULIB_ATAN2F
1461GNULIB_ATANL
1462GNULIB_ATANF
1463GNULIB_ASINL
1464GNULIB_ASINF
1465GNULIB_ACOSL
1466GNULIB_ACOSF
1467GL_GENERATE_FNMATCH_H_FALSE
1468GL_GENERATE_FNMATCH_H_TRUE
1469FNMATCH_H
1470HAVE_FNMATCH_H
1471NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H
1472NEXT_FNMATCH_H
1473REPLACE_FNMATCH
1474HAVE_FNMATCH
1475GNULIB_FNMATCH
1476REPLACE_ITOLD
1477GL_GENERATE_FLOAT_H_FALSE
1478GL_GENERATE_FLOAT_H_TRUE
1479FLOAT_H
1480NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1481NEXT_FLOAT_H
1482HAVE_DECL_STRNCASECMP
1483HAVE_STRCASECMP
1484HAVE_FFS
1485GNULIB_FFS
1486NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1487NEXT_FCNTL_H
1488REPLACE_OPENAT
1489REPLACE_OPEN
1490REPLACE_FCNTL
1491REPLACE_CREAT
1492HAVE_OPENAT
1493HAVE_FCNTL
1494GNULIB_MDA_OPEN
1495GNULIB_MDA_CREAT
1496GNULIB_OPENAT
1497GNULIB_OPEN
1498GNULIB_NONBLOCKING
1499GNULIB_FCNTL
1500GNULIB_CREAT
1501EOVERFLOW_VALUE
1502EOVERFLOW_HIDDEN
1503ENOLINK_VALUE
1504ENOLINK_HIDDEN
1505EMULTIHOP_VALUE
1506EMULTIHOP_HIDDEN
1507GL_GENERATE_ERRNO_H_FALSE
1508GL_GENERATE_ERRNO_H_TRUE
1509ERRNO_H
1510NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1511NEXT_ERRNO_H
1512HAVE_DIRENT_H
1513NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1514NEXT_DIRENT_H
1515NEXT_AS_FIRST_DIRECTIVE_CTYPE_H
1516NEXT_CTYPE_H
1517HAVE_ISBLANK
1518GNULIB_ISBLANK
1519REPLACE_FDOPENDIR
1520REPLACE_DIRFD
1521REPLACE_CLOSEDIR
1522REPLACE_OPENDIR
1523HAVE_ALPHASORT
1524HAVE_SCANDIR
1525HAVE_FDOPENDIR
1526HAVE_DECL_FDOPENDIR
1527HAVE_DECL_DIRFD
1528HAVE_CLOSEDIR
1529HAVE_REWINDDIR
1530HAVE_READDIR
1531HAVE_OPENDIR
1532GNULIB_ALPHASORT
1533GNULIB_SCANDIR
1534GNULIB_FDOPENDIR
1535GNULIB_DIRFD
1536GNULIB_CLOSEDIR
1537GNULIB_REWINDDIR
1538GNULIB_READDIR
1539GNULIB_OPENDIR
1540HAVE_WINSOCK2_H
1541HAVE_MSVC_INVALID_PARAMETER_HANDLER
1542LIB_CLOCK_GETTIME
1543UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1544UNISTD_H_HAVE_WINSOCK2_H
1545UNISTD_H_HAVE_SYS_RANDOM_H
1546REPLACE_WRITE
1547REPLACE_USLEEP
1548REPLACE_UNLINKAT
1549REPLACE_UNLINK
1550REPLACE_TTYNAME_R
1551REPLACE_TRUNCATE
1552REPLACE_SYMLINKAT
1553REPLACE_SYMLINK
1554REPLACE_SLEEP
1555REPLACE_RMDIR
1556REPLACE_READLINKAT
1557REPLACE_READLINK
1558REPLACE_READ
1559REPLACE_PWRITE
1560REPLACE_PREAD
1561REPLACE_LSEEK
1562REPLACE_LINKAT
1563REPLACE_LINK
1564REPLACE_LCHOWN
1565REPLACE_ISATTY
1566REPLACE_GETPASS
1567REPLACE_GETPAGESIZE
1568REPLACE_GETGROUPS
1569REPLACE_GETLOGIN_R
1570REPLACE_GETDTABLESIZE
1571REPLACE_GETDOMAINNAME
1572REPLACE_GETCWD
1573REPLACE_FTRUNCATE
1574REPLACE_FCHOWNAT
1575REPLACE_FACCESSAT
1576REPLACE_EXECVPE
1577REPLACE_EXECVP
1578REPLACE_EXECVE
1579REPLACE_EXECV
1580REPLACE_EXECLP
1581REPLACE_EXECLE
1582REPLACE_EXECL
1583REPLACE_DUP2
1584REPLACE_DUP
1585REPLACE_CLOSE
1586REPLACE_CHOWN
1587REPLACE_ACCESS
1588HAVE_SYS_PARAM_H
1589HAVE_OS_H
1590HAVE_DECL_TTYNAME_R
1591HAVE_DECL_TRUNCATE
1592HAVE_DECL_SETHOSTNAME
1593HAVE_DECL_GETUSERSHELL
1594HAVE_DECL_GETPAGESIZE
1595HAVE_DECL_GETLOGIN_R
1596HAVE_DECL_GETLOGIN
1597HAVE_DECL_GETDOMAINNAME
1598HAVE_DECL_FDATASYNC
1599HAVE_DECL_FCHDIR
1600HAVE_DECL_EXECVPE
1601HAVE_DECL_ENVIRON
1602HAVE_USLEEP
1603HAVE_UNLINKAT
1604HAVE_SYMLINKAT
1605HAVE_SYMLINK
1606HAVE_SLEEP
1607HAVE_SETHOSTNAME
1608HAVE_READLINKAT
1609HAVE_READLINK
1610HAVE_PWRITE
1611HAVE_PREAD
1612HAVE_PIPE2
1613HAVE_PIPE
1614HAVE_LINKAT
1615HAVE_LINK
1616HAVE_LCHOWN
1617HAVE_GROUP_MEMBER
1618HAVE_GETPASS
1619HAVE_GETPAGESIZE
1620HAVE_GETLOGIN
1621HAVE_GETHOSTNAME
1622HAVE_GETGROUPS
1623HAVE_GETENTROPY
1624HAVE_GETDTABLESIZE
1625HAVE_FTRUNCATE
1626HAVE_FSYNC
1627HAVE_FDATASYNC
1628HAVE_FCHOWNAT
1629HAVE_FCHDIR
1630HAVE_FACCESSAT
1631HAVE_EXECVPE
1632HAVE_EUIDACCESS
1633HAVE_DUP3
1634HAVE_COPY_FILE_RANGE
1635HAVE_CHOWN
1636GNULIB_MDA_WRITE
1637GNULIB_MDA_UNLINK
1638GNULIB_MDA_SWAB
1639GNULIB_MDA_RMDIR
1640GNULIB_MDA_READ
1641GNULIB_MDA_LSEEK
1642GNULIB_MDA_ISATTY
1643GNULIB_MDA_GETPID
1644GNULIB_MDA_GETCWD
1645GNULIB_MDA_EXECVPE
1646GNULIB_MDA_EXECVP
1647GNULIB_MDA_EXECVE
1648GNULIB_MDA_EXECV
1649GNULIB_MDA_EXECLP
1650GNULIB_MDA_EXECLE
1651GNULIB_MDA_EXECL
1652GNULIB_MDA_DUP2
1653GNULIB_MDA_DUP
1654GNULIB_MDA_CLOSE
1655GNULIB_MDA_CHDIR
1656GNULIB_MDA_ACCESS
1657GNULIB_WRITE
1658GNULIB_USLEEP
1659GNULIB_UNLINKAT
1660GNULIB_UNLINK
1661GNULIB_UNISTD_H_SIGPIPE
1662GNULIB_UNISTD_H_NONBLOCKING
1663GNULIB_TTYNAME_R
1664GNULIB_TRUNCATE
1665GNULIB_SYMLINKAT
1666GNULIB_SYMLINK
1667GNULIB_SLEEP
1668GNULIB_SETHOSTNAME
1669GNULIB_RMDIR
1670GNULIB_READLINKAT
1671GNULIB_READLINK
1672GNULIB_READ
1673GNULIB_PWRITE
1674GNULIB_PREAD
1675GNULIB_PIPE2
1676GNULIB_PIPE
1677GNULIB_LSEEK
1678GNULIB_LINKAT
1679GNULIB_LINK
1680GNULIB_LCHOWN
1681GNULIB_ISATTY
1682GNULIB_GROUP_MEMBER
1683GNULIB_GETUSERSHELL
1684GNULIB_GETPASS
1685GNULIB_GETPAGESIZE
1686GNULIB_GETOPT_POSIX
1687GNULIB_GETLOGIN_R
1688GNULIB_GETLOGIN
1689GNULIB_GETHOSTNAME
1690GNULIB_GETGROUPS
1691GNULIB_GETENTROPY
1692GNULIB_GETDTABLESIZE
1693GNULIB_GETDOMAINNAME
1694GNULIB_GETCWD
1695GNULIB_FTRUNCATE
1696GNULIB_FSYNC
1697GNULIB_FDATASYNC
1698GNULIB_FCHOWNAT
1699GNULIB_FCHDIR
1700GNULIB_FACCESSAT
1701GNULIB_EXECVPE
1702GNULIB_EXECVP
1703GNULIB_EXECVE
1704GNULIB_EXECV
1705GNULIB_EXECLP
1706GNULIB_EXECLE
1707GNULIB_EXECL
1708GNULIB_EUIDACCESS
1709GNULIB_ENVIRON
1710GNULIB_DUP3
1711GNULIB_DUP2
1712GNULIB_DUP
1713GNULIB_COPY_FILE_RANGE
1714GNULIB_CLOSE
1715GNULIB_CHOWN
1716GNULIB_CHDIR
1717GNULIB_ACCESS
1718REPLACE_WCTOMB
1719REPLACE_UNSETENV
1720REPLACE_STRTOLD
1721REPLACE_STRTOD
1722REPLACE_SETSTATE
1723REPLACE_SETENV
1724REPLACE_REALPATH
1725REPLACE_REALLOC
1726REPLACE_RANDOM_R
1727REPLACE_RANDOM
1728REPLACE_QSORT_R
1729REPLACE_PUTENV
1730REPLACE_PTSNAME_R
1731REPLACE_PTSNAME
1732REPLACE_POSIX_MEMALIGN
1733REPLACE_MKSTEMP
1734REPLACE_MBTOWC
1735REPLACE_MALLOC
1736REPLACE_INITSTATE
1737REPLACE_FREE
1738REPLACE_CANONICALIZE_FILE_NAME
1739REPLACE_CALLOC
1740REPLACE_ALIGNED_ALLOC
1741HAVE_DECL_UNSETENV
1742HAVE_UNLOCKPT
1743HAVE_SYS_LOADAVG_H
1744HAVE_STRUCT_RANDOM_DATA
1745HAVE_STRTOULL
1746HAVE_STRTOLL
1747HAVE_STRTOLD
1748HAVE_STRTOD
1749HAVE_DECL_SETSTATE
1750HAVE_SETSTATE
1751HAVE_DECL_SETENV
1752HAVE_SETENV
1753HAVE_SECURE_GETENV
1754HAVE_RPMATCH
1755HAVE_REALPATH
1756HAVE_REALLOCARRAY
1757HAVE_RANDOM_R
1758HAVE_RANDOM_H
1759HAVE_RANDOM
1760HAVE_QSORT_R
1761HAVE_PTSNAME_R
1762HAVE_PTSNAME
1763HAVE_POSIX_OPENPT
1764HAVE_POSIX_MEMALIGN
1765HAVE_MKSTEMPS
1766HAVE_MKSTEMP
1767HAVE_MKOSTEMPS
1768HAVE_MKOSTEMP
1769HAVE_MKDTEMP
1770HAVE_MBTOWC
1771HAVE_DECL_INITSTATE
1772HAVE_INITSTATE
1773HAVE_GRANTPT
1774HAVE_GETSUBOPT
1775HAVE_DECL_GETLOADAVG
1776HAVE_DECL_GCVT
1777HAVE_DECL_FCVT
1778HAVE_DECL_ECVT
1779HAVE_CANONICALIZE_FILE_NAME
1780HAVE_ATOLL
1781HAVE_ALIGNED_ALLOC
1782HAVE__EXIT
1783GNULIB_MDA_PUTENV
1784GNULIB_MDA_MKTEMP
1785GNULIB_MDA_GCVT
1786GNULIB_MDA_FCVT
1787GNULIB_MDA_ECVT
1788GNULIB_WCTOMB
1789GNULIB_UNSETENV
1790GNULIB_UNLOCKPT
1791GNULIB_SYSTEM_POSIX
1792GNULIB_STRTOULL
1793GNULIB_STRTOLL
1794GNULIB_STRTOLD
1795GNULIB_STRTOD
1796GNULIB_SETENV
1797GNULIB_SECURE_GETENV
1798GNULIB_RPMATCH
1799GNULIB_REALPATH
1800GNULIB_REALLOC_POSIX
1801GNULIB_REALLOCARRAY
1802GNULIB_RANDOM_R
1803GNULIB_RANDOM
1804GNULIB_QSORT_R
1805GNULIB_PUTENV
1806GNULIB_PTSNAME_R
1807GNULIB_PTSNAME
1808GNULIB_POSIX_OPENPT
1809GNULIB_POSIX_MEMALIGN
1810GNULIB_MKSTEMPS
1811GNULIB_MKSTEMP
1812GNULIB_MKOSTEMPS
1813GNULIB_MKOSTEMP
1814GNULIB_MKDTEMP
1815GNULIB_MBTOWC
1816GNULIB_MALLOC_POSIX
1817GNULIB_GRANTPT
1818GNULIB_GETSUBOPT
1819GNULIB_GETLOADAVG
1820GNULIB_FREE_POSIX
1821GNULIB_CANONICALIZE_FILE_NAME
1822GNULIB_CALLOC_POSIX
1823GNULIB_ATOLL
1824GNULIB_ALIGNED_ALLOC
1825GNULIB__EXIT
1826LOCALE_FR
1827REPLACE_WCSTOK
1828REPLACE_WCSFTIME
1829REPLACE_WCSWIDTH
1830REPLACE_WCWIDTH
1831REPLACE_WCSNRTOMBS
1832REPLACE_WCSRTOMBS
1833REPLACE_WCRTOMB
1834REPLACE_MBSNRTOWCS
1835REPLACE_MBSRTOWCS
1836REPLACE_MBRLEN
1837REPLACE_MBRTOWC
1838REPLACE_MBSINIT
1839REPLACE_WCTOB
1840REPLACE_BTOWC
1841REPLACE_MBSTATE_T
1842HAVE_DECL_WCWIDTH
1843HAVE_DECL_WCSDUP
1844HAVE_DECL_WCTOB
1845HAVE_WCSFTIME
1846HAVE_WCSWIDTH
1847HAVE_WCSTOK
1848HAVE_WCSSTR
1849HAVE_WCSPBRK
1850HAVE_WCSSPN
1851HAVE_WCSCSPN
1852HAVE_WCSRCHR
1853HAVE_WCSCHR
1854HAVE_WCSDUP
1855HAVE_WCSXFRM
1856HAVE_WCSCOLL
1857HAVE_WCSNCASECMP
1858HAVE_WCSCASECMP
1859HAVE_WCSNCMP
1860HAVE_WCSCMP
1861HAVE_WCSNCAT
1862HAVE_WCSCAT
1863HAVE_WCPNCPY
1864HAVE_WCSNCPY
1865HAVE_WCPCPY
1866HAVE_WCSCPY
1867HAVE_WCSNLEN
1868HAVE_WCSLEN
1869HAVE_WMEMSET
1870HAVE_WMEMPCPY
1871HAVE_WMEMMOVE
1872HAVE_WMEMCPY
1873HAVE_WMEMCMP
1874HAVE_WMEMCHR
1875HAVE_WCSNRTOMBS
1876HAVE_WCSRTOMBS
1877HAVE_WCRTOMB
1878HAVE_MBSNRTOWCS
1879HAVE_MBSRTOWCS
1880HAVE_MBRLEN
1881HAVE_MBRTOWC
1882HAVE_MBSINIT
1883HAVE_BTOWC
1884GNULIB_MDA_WCSDUP
1885GNULIB_WCSFTIME
1886GNULIB_WCSWIDTH
1887GNULIB_WCSTOK
1888GNULIB_WCSSTR
1889GNULIB_WCSPBRK
1890GNULIB_WCSSPN
1891GNULIB_WCSCSPN
1892GNULIB_WCSRCHR
1893GNULIB_WCSCHR
1894GNULIB_WCSDUP
1895GNULIB_WCSXFRM
1896GNULIB_WCSCOLL
1897GNULIB_WCSNCASECMP
1898GNULIB_WCSCASECMP
1899GNULIB_WCSNCMP
1900GNULIB_WCSCMP
1901GNULIB_WCSNCAT
1902GNULIB_WCSCAT
1903GNULIB_WCPNCPY
1904GNULIB_WCSNCPY
1905GNULIB_WCPCPY
1906GNULIB_WCSCPY
1907GNULIB_WCSNLEN
1908GNULIB_WCSLEN
1909GNULIB_WMEMSET
1910GNULIB_WMEMPCPY
1911GNULIB_WMEMMOVE
1912GNULIB_WMEMCPY
1913GNULIB_WMEMCMP
1914GNULIB_WMEMCHR
1915GNULIB_WCWIDTH
1916GNULIB_WCSNRTOMBS
1917GNULIB_WCSRTOMBS
1918GNULIB_WCRTOMB
1919GNULIB_MBSNRTOWCS
1920GNULIB_MBSRTOWCS
1921GNULIB_MBRLEN
1922GNULIB_MBRTOWC
1923GNULIB_MBSINIT
1924GNULIB_WCTOB
1925GNULIB_BTOWC
1926MKDIR_P
1927HAVE_WS2TCPIP_H
1928HAVE_FEATURES_H
1929NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H
1930NEXT_ARPA_INET_H
1931PRAGMA_COLUMNS
1932PRAGMA_SYSTEM_HEADER
1933INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1934INCLUDE_NEXT
1935HAVE_ARPA_INET_H
1936REPLACE_INET_PTON
1937REPLACE_INET_NTOP
1938HAVE_DECL_INET_PTON
1939HAVE_DECL_INET_NTOP
1940GNULIB_INET_PTON
1941GNULIB_INET_NTOP
1942HAVE_ALLOCA_H
1943GL_GENERATE_ALLOCA_H_FALSE
1944GL_GENERATE_ALLOCA_H_TRUE
1945ALLOCA_H
1946ALLOCA
1947GL_COND_LIBTOOL_FALSE
1948GL_COND_LIBTOOL_TRUE
1949RANLIB
1950ARFLAGS
1951AR
1952LARGEFILE_CPPFLAGS
1953target_os
1954target_vendor
1955target_cpu
1956target
1957host_os
1958host_vendor
1959host_cpu
1960host
1961build_os
1962build_vendor
1963build_cpu
1964build
1965EGREP
1966GREP
1967CPP
1968OBJEXT
1969EXEEXT
1970ac_ct_CC
1971CPPFLAGS
1972LDFLAGS
1973CFLAGS
1974CC
1975MAINT
1976MAINTAINER_MODE_FALSE
1977MAINTAINER_MODE_TRUE
1978target_alias
1979host_alias
1980build_alias
1981LIBS
1982ECHO_T
1983ECHO_N
1984ECHO_C
1985DEFS
1986mandir
1987localedir
1988libdir
1989psdir
1990pdfdir
1991dvidir
1992htmldir
1993infodir
1994docdir
1995oldincludedir
1996includedir
1997localstatedir
1998sharedstatedir
1999sysconfdir
2000datadir
2001datarootdir
2002libexecdir
2003sbindir
2004bindir
2005program_transform_name
2006prefix
2007exec_prefix
2008PACKAGE_URL
2009PACKAGE_BUGREPORT
2010PACKAGE_STRING
2011PACKAGE_VERSION
2012PACKAGE_TARNAME
2013PACKAGE_NAME
2014PATH_SEPARATOR
2015SHELL'
2016ac_subst_files=''
2017ac_user_opts='
2018enable_option_checking
2019enable_maintainer_mode
2020enable_plugins
2021enable_largefile
2022enable_threads
2023enable_cross_guesses
2024enable_dependency_tracking
2025enable_silent_rules
2026'
2027      ac_precious_vars='build_alias
2028host_alias
2029target_alias
2030CC
2031CFLAGS
2032LDFLAGS
2033LIBS
2034CPPFLAGS
2035CPP'
2036
2037
2038# Initialize some variables set by options.
2039ac_init_help=
2040ac_init_version=false
2041ac_unrecognized_opts=
2042ac_unrecognized_sep=
2043# The variables have the same names as the options, with
2044# dashes changed to underlines.
2045cache_file=/dev/null
2046exec_prefix=NONE
2047no_create=
2048no_recursion=
2049prefix=NONE
2050program_prefix=NONE
2051program_suffix=NONE
2052program_transform_name=s,x,x,
2053silent=
2054site=
2055srcdir=
2056verbose=
2057x_includes=NONE
2058x_libraries=NONE
2059
2060# Installation directory options.
2061# These are left unexpanded so users can "make install exec_prefix=/foo"
2062# and all the variables that are supposed to be based on exec_prefix
2063# by default will actually change.
2064# Use braces instead of parens because sh, perl, etc. also accept them.
2065# (The list follows the same order as the GNU Coding Standards.)
2066bindir='${exec_prefix}/bin'
2067sbindir='${exec_prefix}/sbin'
2068libexecdir='${exec_prefix}/libexec'
2069datarootdir='${prefix}/share'
2070datadir='${datarootdir}'
2071sysconfdir='${prefix}/etc'
2072sharedstatedir='${prefix}/com'
2073localstatedir='${prefix}/var'
2074includedir='${prefix}/include'
2075oldincludedir='/usr/include'
2076docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
2077infodir='${datarootdir}/info'
2078htmldir='${docdir}'
2079dvidir='${docdir}'
2080pdfdir='${docdir}'
2081psdir='${docdir}'
2082libdir='${exec_prefix}/lib'
2083localedir='${datarootdir}/locale'
2084mandir='${datarootdir}/man'
2085
2086ac_prev=
2087ac_dashdash=
2088for ac_option
2089do
2090  # If the previous option needs an argument, assign it.
2091  if test -n "$ac_prev"; then
2092    eval $ac_prev=\$ac_option
2093    ac_prev=
2094    continue
2095  fi
2096
2097  case $ac_option in
2098  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
2099  *=)   ac_optarg= ;;
2100  *)    ac_optarg=yes ;;
2101  esac
2102
2103  # Accept the important Cygnus configure options, so we can diagnose typos.
2104
2105  case $ac_dashdash$ac_option in
2106  --)
2107    ac_dashdash=yes ;;
2108
2109  -bindir | --bindir | --bindi | --bind | --bin | --bi)
2110    ac_prev=bindir ;;
2111  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
2112    bindir=$ac_optarg ;;
2113
2114  -build | --build | --buil | --bui | --bu)
2115    ac_prev=build_alias ;;
2116  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
2117    build_alias=$ac_optarg ;;
2118
2119  -cache-file | --cache-file | --cache-fil | --cache-fi \
2120  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2121    ac_prev=cache_file ;;
2122  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2123  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2124    cache_file=$ac_optarg ;;
2125
2126  --config-cache | -C)
2127    cache_file=config.cache ;;
2128
2129  -datadir | --datadir | --datadi | --datad)
2130    ac_prev=datadir ;;
2131  -datadir=* | --datadir=* | --datadi=* | --datad=*)
2132    datadir=$ac_optarg ;;
2133
2134  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
2135  | --dataroo | --dataro | --datar)
2136    ac_prev=datarootdir ;;
2137  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
2138  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
2139    datarootdir=$ac_optarg ;;
2140
2141  -disable-* | --disable-*)
2142    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
2143    # Reject names that are not valid shell variable names.
2144    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2145      as_fn_error $? "invalid feature name: $ac_useropt"
2146    ac_useropt_orig=$ac_useropt
2147    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2148    case $ac_user_opts in
2149      *"
2150"enable_$ac_useropt"
2151"*) ;;
2152      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
2153	 ac_unrecognized_sep=', ';;
2154    esac
2155    eval enable_$ac_useropt=no ;;
2156
2157  -docdir | --docdir | --docdi | --doc | --do)
2158    ac_prev=docdir ;;
2159  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
2160    docdir=$ac_optarg ;;
2161
2162  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
2163    ac_prev=dvidir ;;
2164  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
2165    dvidir=$ac_optarg ;;
2166
2167  -enable-* | --enable-*)
2168    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
2169    # Reject names that are not valid shell variable names.
2170    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2171      as_fn_error $? "invalid feature name: $ac_useropt"
2172    ac_useropt_orig=$ac_useropt
2173    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2174    case $ac_user_opts in
2175      *"
2176"enable_$ac_useropt"
2177"*) ;;
2178      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
2179	 ac_unrecognized_sep=', ';;
2180    esac
2181    eval enable_$ac_useropt=\$ac_optarg ;;
2182
2183  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
2184  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
2185  | --exec | --exe | --ex)
2186    ac_prev=exec_prefix ;;
2187  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
2188  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
2189  | --exec=* | --exe=* | --ex=*)
2190    exec_prefix=$ac_optarg ;;
2191
2192  -gas | --gas | --ga | --g)
2193    # Obsolete; use --with-gas.
2194    with_gas=yes ;;
2195
2196  -help | --help | --hel | --he | -h)
2197    ac_init_help=long ;;
2198  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
2199    ac_init_help=recursive ;;
2200  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
2201    ac_init_help=short ;;
2202
2203  -host | --host | --hos | --ho)
2204    ac_prev=host_alias ;;
2205  -host=* | --host=* | --hos=* | --ho=*)
2206    host_alias=$ac_optarg ;;
2207
2208  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
2209    ac_prev=htmldir ;;
2210  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
2211  | --ht=*)
2212    htmldir=$ac_optarg ;;
2213
2214  -includedir | --includedir | --includedi | --included | --include \
2215  | --includ | --inclu | --incl | --inc)
2216    ac_prev=includedir ;;
2217  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
2218  | --includ=* | --inclu=* | --incl=* | --inc=*)
2219    includedir=$ac_optarg ;;
2220
2221  -infodir | --infodir | --infodi | --infod | --info | --inf)
2222    ac_prev=infodir ;;
2223  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
2224    infodir=$ac_optarg ;;
2225
2226  -libdir | --libdir | --libdi | --libd)
2227    ac_prev=libdir ;;
2228  -libdir=* | --libdir=* | --libdi=* | --libd=*)
2229    libdir=$ac_optarg ;;
2230
2231  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
2232  | --libexe | --libex | --libe)
2233    ac_prev=libexecdir ;;
2234  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
2235  | --libexe=* | --libex=* | --libe=*)
2236    libexecdir=$ac_optarg ;;
2237
2238  -localedir | --localedir | --localedi | --localed | --locale)
2239    ac_prev=localedir ;;
2240  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
2241    localedir=$ac_optarg ;;
2242
2243  -localstatedir | --localstatedir | --localstatedi | --localstated \
2244  | --localstate | --localstat | --localsta | --localst | --locals)
2245    ac_prev=localstatedir ;;
2246  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
2247  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
2248    localstatedir=$ac_optarg ;;
2249
2250  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2251    ac_prev=mandir ;;
2252  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2253    mandir=$ac_optarg ;;
2254
2255  -nfp | --nfp | --nf)
2256    # Obsolete; use --without-fp.
2257    with_fp=no ;;
2258
2259  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2260  | --no-cr | --no-c | -n)
2261    no_create=yes ;;
2262
2263  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
2264  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
2265    no_recursion=yes ;;
2266
2267  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
2268  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
2269  | --oldin | --oldi | --old | --ol | --o)
2270    ac_prev=oldincludedir ;;
2271  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
2272  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
2273  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
2274    oldincludedir=$ac_optarg ;;
2275
2276  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2277    ac_prev=prefix ;;
2278  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2279    prefix=$ac_optarg ;;
2280
2281  -program-prefix | --program-prefix | --program-prefi | --program-pref \
2282  | --program-pre | --program-pr | --program-p)
2283    ac_prev=program_prefix ;;
2284  -program-prefix=* | --program-prefix=* | --program-prefi=* \
2285  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2286    program_prefix=$ac_optarg ;;
2287
2288  -program-suffix | --program-suffix | --program-suffi | --program-suff \
2289  | --program-suf | --program-su | --program-s)
2290    ac_prev=program_suffix ;;
2291  -program-suffix=* | --program-suffix=* | --program-suffi=* \
2292  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2293    program_suffix=$ac_optarg ;;
2294
2295  -program-transform-name | --program-transform-name \
2296  | --program-transform-nam | --program-transform-na \
2297  | --program-transform-n | --program-transform- \
2298  | --program-transform | --program-transfor \
2299  | --program-transfo | --program-transf \
2300  | --program-trans | --program-tran \
2301  | --progr-tra | --program-tr | --program-t)
2302    ac_prev=program_transform_name ;;
2303  -program-transform-name=* | --program-transform-name=* \
2304  | --program-transform-nam=* | --program-transform-na=* \
2305  | --program-transform-n=* | --program-transform-=* \
2306  | --program-transform=* | --program-transfor=* \
2307  | --program-transfo=* | --program-transf=* \
2308  | --program-trans=* | --program-tran=* \
2309  | --progr-tra=* | --program-tr=* | --program-t=*)
2310    program_transform_name=$ac_optarg ;;
2311
2312  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2313    ac_prev=pdfdir ;;
2314  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2315    pdfdir=$ac_optarg ;;
2316
2317  -psdir | --psdir | --psdi | --psd | --ps)
2318    ac_prev=psdir ;;
2319  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2320    psdir=$ac_optarg ;;
2321
2322  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2323  | -silent | --silent | --silen | --sile | --sil)
2324    silent=yes ;;
2325
2326  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2327    ac_prev=sbindir ;;
2328  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2329  | --sbi=* | --sb=*)
2330    sbindir=$ac_optarg ;;
2331
2332  -sharedstatedir | --sharedstatedir | --sharedstatedi \
2333  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2334  | --sharedst | --shareds | --shared | --share | --shar \
2335  | --sha | --sh)
2336    ac_prev=sharedstatedir ;;
2337  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2338  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2339  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2340  | --sha=* | --sh=*)
2341    sharedstatedir=$ac_optarg ;;
2342
2343  -site | --site | --sit)
2344    ac_prev=site ;;
2345  -site=* | --site=* | --sit=*)
2346    site=$ac_optarg ;;
2347
2348  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2349    ac_prev=srcdir ;;
2350  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2351    srcdir=$ac_optarg ;;
2352
2353  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2354  | --syscon | --sysco | --sysc | --sys | --sy)
2355    ac_prev=sysconfdir ;;
2356  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2357  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2358    sysconfdir=$ac_optarg ;;
2359
2360  -target | --target | --targe | --targ | --tar | --ta | --t)
2361    ac_prev=target_alias ;;
2362  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2363    target_alias=$ac_optarg ;;
2364
2365  -v | -verbose | --verbose | --verbos | --verbo | --verb)
2366    verbose=yes ;;
2367
2368  -version | --version | --versio | --versi | --vers | -V)
2369    ac_init_version=: ;;
2370
2371  -with-* | --with-*)
2372    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2373    # Reject names that are not valid shell variable names.
2374    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2375      as_fn_error $? "invalid package name: $ac_useropt"
2376    ac_useropt_orig=$ac_useropt
2377    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2378    case $ac_user_opts in
2379      *"
2380"with_$ac_useropt"
2381"*) ;;
2382      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2383	 ac_unrecognized_sep=', ';;
2384    esac
2385    eval with_$ac_useropt=\$ac_optarg ;;
2386
2387  -without-* | --without-*)
2388    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2389    # Reject names that are not valid shell variable names.
2390    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2391      as_fn_error $? "invalid package name: $ac_useropt"
2392    ac_useropt_orig=$ac_useropt
2393    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2394    case $ac_user_opts in
2395      *"
2396"with_$ac_useropt"
2397"*) ;;
2398      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2399	 ac_unrecognized_sep=', ';;
2400    esac
2401    eval with_$ac_useropt=no ;;
2402
2403  --x)
2404    # Obsolete; use --with-x.
2405    with_x=yes ;;
2406
2407  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2408  | --x-incl | --x-inc | --x-in | --x-i)
2409    ac_prev=x_includes ;;
2410  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2411  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2412    x_includes=$ac_optarg ;;
2413
2414  -x-libraries | --x-libraries | --x-librarie | --x-librari \
2415  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2416    ac_prev=x_libraries ;;
2417  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2418  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2419    x_libraries=$ac_optarg ;;
2420
2421  -*) as_fn_error $? "unrecognized option: \`$ac_option'
2422Try \`$0 --help' for more information"
2423    ;;
2424
2425  *=*)
2426    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2427    # Reject names that are not valid shell variable names.
2428    case $ac_envvar in #(
2429      '' | [0-9]* | *[!_$as_cr_alnum]* )
2430      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2431    esac
2432    eval $ac_envvar=\$ac_optarg
2433    export $ac_envvar ;;
2434
2435  *)
2436    # FIXME: should be removed in autoconf 3.0.
2437    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2438    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2439      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
2440    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2441    ;;
2442
2443  esac
2444done
2445
2446if test -n "$ac_prev"; then
2447  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2448  as_fn_error $? "missing argument to $ac_option"
2449fi
2450
2451if test -n "$ac_unrecognized_opts"; then
2452  case $enable_option_checking in
2453    no) ;;
2454    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2455    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2456  esac
2457fi
2458
2459# Check all directory arguments for consistency.
2460for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
2461		datadir sysconfdir sharedstatedir localstatedir includedir \
2462		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2463		libdir localedir mandir
2464do
2465  eval ac_val=\$$ac_var
2466  # Remove trailing slashes.
2467  case $ac_val in
2468    */ )
2469      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2470      eval $ac_var=\$ac_val;;
2471  esac
2472  # Be sure to have absolute directory names.
2473  case $ac_val in
2474    [\\/$]* | ?:[\\/]* )  continue;;
2475    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2476  esac
2477  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2478done
2479
2480# There might be people who depend on the old broken behavior: `$host'
2481# used to hold the argument of --host etc.
2482# FIXME: To remove some day.
2483build=$build_alias
2484host=$host_alias
2485target=$target_alias
2486
2487# FIXME: To remove some day.
2488if test "x$host_alias" != x; then
2489  if test "x$build_alias" = x; then
2490    cross_compiling=maybe
2491  elif test "x$build_alias" != "x$host_alias"; then
2492    cross_compiling=yes
2493  fi
2494fi
2495
2496ac_tool_prefix=
2497test -n "$host_alias" && ac_tool_prefix=$host_alias-
2498
2499test "$silent" = yes && exec 6>/dev/null
2500
2501
2502ac_pwd=`pwd` && test -n "$ac_pwd" &&
2503ac_ls_di=`ls -di .` &&
2504ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2505  as_fn_error $? "working directory cannot be determined"
2506test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2507  as_fn_error $? "pwd does not report name of working directory"
2508
2509
2510# Find the source files, if location was not specified.
2511if test -z "$srcdir"; then
2512  ac_srcdir_defaulted=yes
2513  # Try the directory containing this script, then the parent directory.
2514  ac_confdir=`$as_dirname -- "$as_myself" ||
2515$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2516	 X"$as_myself" : 'X\(//\)[^/]' \| \
2517	 X"$as_myself" : 'X\(//\)$' \| \
2518	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2519$as_echo X"$as_myself" |
2520    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2521	    s//\1/
2522	    q
2523	  }
2524	  /^X\(\/\/\)[^/].*/{
2525	    s//\1/
2526	    q
2527	  }
2528	  /^X\(\/\/\)$/{
2529	    s//\1/
2530	    q
2531	  }
2532	  /^X\(\/\).*/{
2533	    s//\1/
2534	    q
2535	  }
2536	  s/.*/./; q'`
2537  srcdir=$ac_confdir
2538  if test ! -r "$srcdir/$ac_unique_file"; then
2539    srcdir=..
2540  fi
2541else
2542  ac_srcdir_defaulted=no
2543fi
2544if test ! -r "$srcdir/$ac_unique_file"; then
2545  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2546  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2547fi
2548ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2549ac_abs_confdir=`(
2550	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2551	pwd)`
2552# When building in place, set srcdir=.
2553if test "$ac_abs_confdir" = "$ac_pwd"; then
2554  srcdir=.
2555fi
2556# Remove unnecessary trailing slashes from srcdir.
2557# Double slashes in file names in object file debugging info
2558# mess up M-x gdb in Emacs.
2559case $srcdir in
2560*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2561esac
2562for ac_var in $ac_precious_vars; do
2563  eval ac_env_${ac_var}_set=\${${ac_var}+set}
2564  eval ac_env_${ac_var}_value=\$${ac_var}
2565  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2566  eval ac_cv_env_${ac_var}_value=\$${ac_var}
2567done
2568
2569#
2570# Report the --help message.
2571#
2572if test "$ac_init_help" = "long"; then
2573  # Omit some internal or obsolete options to make the list less imposing.
2574  # This message is too long to be a string in the A/UX 3.1 sh.
2575  cat <<_ACEOF
2576\`configure' configures libgnu UNUSED-VERSION to adapt to many kinds of systems.
2577
2578Usage: $0 [OPTION]... [VAR=VALUE]...
2579
2580To assign environment variables (e.g., CC, CFLAGS...), specify them as
2581VAR=VALUE.  See below for descriptions of some of the useful variables.
2582
2583Defaults for the options are specified in brackets.
2584
2585Configuration:
2586  -h, --help              display this help and exit
2587      --help=short        display options specific to this package
2588      --help=recursive    display the short help of all the included packages
2589  -V, --version           display version information and exit
2590  -q, --quiet, --silent   do not print \`checking ...' messages
2591      --cache-file=FILE   cache test results in FILE [disabled]
2592  -C, --config-cache      alias for \`--cache-file=config.cache'
2593  -n, --no-create         do not create output files
2594      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
2595
2596Installation directories:
2597  --prefix=PREFIX         install architecture-independent files in PREFIX
2598                          [$ac_default_prefix]
2599  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
2600                          [PREFIX]
2601
2602By default, \`make install' will install all the files in
2603\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
2604an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2605for instance \`--prefix=\$HOME'.
2606
2607For better control, use the options below.
2608
2609Fine tuning of the installation directories:
2610  --bindir=DIR            user executables [EPREFIX/bin]
2611  --sbindir=DIR           system admin executables [EPREFIX/sbin]
2612  --libexecdir=DIR        program executables [EPREFIX/libexec]
2613  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
2614  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
2615  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
2616  --libdir=DIR            object code libraries [EPREFIX/lib]
2617  --includedir=DIR        C header files [PREFIX/include]
2618  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
2619  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
2620  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
2621  --infodir=DIR           info documentation [DATAROOTDIR/info]
2622  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
2623  --mandir=DIR            man documentation [DATAROOTDIR/man]
2624  --docdir=DIR            documentation root [DATAROOTDIR/doc/libgnu]
2625  --htmldir=DIR           html documentation [DOCDIR]
2626  --dvidir=DIR            dvi documentation [DOCDIR]
2627  --pdfdir=DIR            pdf documentation [DOCDIR]
2628  --psdir=DIR             ps documentation [DOCDIR]
2629_ACEOF
2630
2631  cat <<\_ACEOF
2632
2633Program names:
2634  --program-prefix=PREFIX            prepend PREFIX to installed program names
2635  --program-suffix=SUFFIX            append SUFFIX to installed program names
2636  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
2637
2638System types:
2639  --build=BUILD     configure for building on BUILD [guessed]
2640  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
2641  --target=TARGET   configure for building compilers for TARGET [HOST]
2642_ACEOF
2643fi
2644
2645if test -n "$ac_init_help"; then
2646  case $ac_init_help in
2647     short | recursive ) echo "Configuration of libgnu UNUSED-VERSION:";;
2648   esac
2649  cat <<\_ACEOF
2650
2651Optional Features:
2652  --disable-option-checking  ignore unrecognized --enable/--with options
2653  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
2654  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
2655  --enable-maintainer-mode
2656                          enable make rules and dependencies not useful (and
2657                          sometimes confusing) to the casual installer
2658  --enable-plugins        Enable support for plugins
2659  --disable-largefile     omit support for large files
2660  --enable-threads={isoc|posix|isoc+posix|windows}
2661                          specify multithreading API
2662  --disable-threads       build without multithread safety
2663  --enable-cross-guesses={conservative|risky}
2664                          specify policy for cross-compilation guesses
2665  --enable-dependency-tracking
2666                          do not reject slow dependency extractors
2667  --disable-dependency-tracking
2668                          speeds up one-time build
2669  --enable-silent-rules   less verbose build output (undo: "make V=1")
2670  --disable-silent-rules  verbose build output (undo: "make V=0")
2671
2672Some influential environment variables:
2673  CC          C compiler command
2674  CFLAGS      C compiler flags
2675  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2676              nonstandard directory <lib dir>
2677  LIBS        libraries to pass to the linker, e.g. -l<library>
2678  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2679              you have headers in a nonstandard directory <include dir>
2680  CPP         C preprocessor
2681
2682Use these variables to override the choices made by `configure' or to help
2683it to find libraries and programs with nonstandard names/locations.
2684
2685Report bugs to the package provider.
2686_ACEOF
2687ac_status=$?
2688fi
2689
2690if test "$ac_init_help" = "recursive"; then
2691  # If there are subdirs, report their specific --help.
2692  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2693    test -d "$ac_dir" ||
2694      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2695      continue
2696    ac_builddir=.
2697
2698case "$ac_dir" in
2699.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2700*)
2701  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2702  # A ".." for each directory in $ac_dir_suffix.
2703  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2704  case $ac_top_builddir_sub in
2705  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2706  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2707  esac ;;
2708esac
2709ac_abs_top_builddir=$ac_pwd
2710ac_abs_builddir=$ac_pwd$ac_dir_suffix
2711# for backward compatibility:
2712ac_top_builddir=$ac_top_build_prefix
2713
2714case $srcdir in
2715  .)  # We are building in place.
2716    ac_srcdir=.
2717    ac_top_srcdir=$ac_top_builddir_sub
2718    ac_abs_top_srcdir=$ac_pwd ;;
2719  [\\/]* | ?:[\\/]* )  # Absolute name.
2720    ac_srcdir=$srcdir$ac_dir_suffix;
2721    ac_top_srcdir=$srcdir
2722    ac_abs_top_srcdir=$srcdir ;;
2723  *) # Relative name.
2724    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2725    ac_top_srcdir=$ac_top_build_prefix$srcdir
2726    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2727esac
2728ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2729
2730    cd "$ac_dir" || { ac_status=$?; continue; }
2731    # Check for guested configure.
2732    if test -f "$ac_srcdir/configure.gnu"; then
2733      echo &&
2734      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2735    elif test -f "$ac_srcdir/configure"; then
2736      echo &&
2737      $SHELL "$ac_srcdir/configure" --help=recursive
2738    else
2739      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2740    fi || ac_status=$?
2741    cd "$ac_pwd" || { ac_status=$?; break; }
2742  done
2743fi
2744
2745test -n "$ac_init_help" && exit $ac_status
2746if $ac_init_version; then
2747  cat <<\_ACEOF
2748libgnu configure UNUSED-VERSION
2749generated by GNU Autoconf 2.69
2750
2751Copyright (C) 2012 Free Software Foundation, Inc.
2752This configure script is free software; the Free Software Foundation
2753gives unlimited permission to copy, distribute and modify it.
2754_ACEOF
2755  exit
2756fi
2757
2758## ------------------------ ##
2759## Autoconf initialization. ##
2760## ------------------------ ##
2761
2762# ac_fn_c_try_compile LINENO
2763# --------------------------
2764# Try to compile conftest.$ac_ext, and return whether this succeeded.
2765ac_fn_c_try_compile ()
2766{
2767  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2768  rm -f conftest.$ac_objext
2769  if { { ac_try="$ac_compile"
2770case "(($ac_try" in
2771  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2772  *) ac_try_echo=$ac_try;;
2773esac
2774eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2775$as_echo "$ac_try_echo"; } >&5
2776  (eval "$ac_compile") 2>conftest.err
2777  ac_status=$?
2778  if test -s conftest.err; then
2779    grep -v '^ *+' conftest.err >conftest.er1
2780    cat conftest.er1 >&5
2781    mv -f conftest.er1 conftest.err
2782  fi
2783  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2784  test $ac_status = 0; } && {
2785	 test -z "$ac_c_werror_flag" ||
2786	 test ! -s conftest.err
2787       } && test -s conftest.$ac_objext; then :
2788  ac_retval=0
2789else
2790  $as_echo "$as_me: failed program was:" >&5
2791sed 's/^/| /' conftest.$ac_ext >&5
2792
2793	ac_retval=1
2794fi
2795  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2796  as_fn_set_status $ac_retval
2797
2798} # ac_fn_c_try_compile
2799
2800# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2801# -------------------------------------------------------
2802# Tests whether HEADER exists and can be compiled using the include files in
2803# INCLUDES, setting the cache variable VAR accordingly.
2804ac_fn_c_check_header_compile ()
2805{
2806  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2807  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2808$as_echo_n "checking for $2... " >&6; }
2809if eval \${$3+:} false; then :
2810  $as_echo_n "(cached) " >&6
2811else
2812  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2813/* end confdefs.h.  */
2814$4
2815#include <$2>
2816_ACEOF
2817if ac_fn_c_try_compile "$LINENO"; then :
2818  eval "$3=yes"
2819else
2820  eval "$3=no"
2821fi
2822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2823fi
2824eval ac_res=\$$3
2825	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2826$as_echo "$ac_res" >&6; }
2827  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2828
2829} # ac_fn_c_check_header_compile
2830
2831# ac_fn_c_try_cpp LINENO
2832# ----------------------
2833# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2834ac_fn_c_try_cpp ()
2835{
2836  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2837  if { { ac_try="$ac_cpp conftest.$ac_ext"
2838case "(($ac_try" in
2839  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2840  *) ac_try_echo=$ac_try;;
2841esac
2842eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2843$as_echo "$ac_try_echo"; } >&5
2844  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2845  ac_status=$?
2846  if test -s conftest.err; then
2847    grep -v '^ *+' conftest.err >conftest.er1
2848    cat conftest.er1 >&5
2849    mv -f conftest.er1 conftest.err
2850  fi
2851  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2852  test $ac_status = 0; } > conftest.i && {
2853	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2854	 test ! -s conftest.err
2855       }; then :
2856  ac_retval=0
2857else
2858  $as_echo "$as_me: failed program was:" >&5
2859sed 's/^/| /' conftest.$ac_ext >&5
2860
2861    ac_retval=1
2862fi
2863  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2864  as_fn_set_status $ac_retval
2865
2866} # ac_fn_c_try_cpp
2867
2868# ac_fn_c_try_run LINENO
2869# ----------------------
2870# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2871# that executables *can* be run.
2872ac_fn_c_try_run ()
2873{
2874  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2875  if { { ac_try="$ac_link"
2876case "(($ac_try" in
2877  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2878  *) ac_try_echo=$ac_try;;
2879esac
2880eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2881$as_echo "$ac_try_echo"; } >&5
2882  (eval "$ac_link") 2>&5
2883  ac_status=$?
2884  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2885  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2886  { { case "(($ac_try" in
2887  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2888  *) ac_try_echo=$ac_try;;
2889esac
2890eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2891$as_echo "$ac_try_echo"; } >&5
2892  (eval "$ac_try") 2>&5
2893  ac_status=$?
2894  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2895  test $ac_status = 0; }; }; then :
2896  ac_retval=0
2897else
2898  $as_echo "$as_me: program exited with status $ac_status" >&5
2899       $as_echo "$as_me: failed program was:" >&5
2900sed 's/^/| /' conftest.$ac_ext >&5
2901
2902       ac_retval=$ac_status
2903fi
2904  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2905  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2906  as_fn_set_status $ac_retval
2907
2908} # ac_fn_c_try_run
2909
2910# ac_fn_c_try_link LINENO
2911# -----------------------
2912# Try to link conftest.$ac_ext, and return whether this succeeded.
2913ac_fn_c_try_link ()
2914{
2915  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2916  rm -f conftest.$ac_objext conftest$ac_exeext
2917  if { { ac_try="$ac_link"
2918case "(($ac_try" in
2919  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2920  *) ac_try_echo=$ac_try;;
2921esac
2922eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2923$as_echo "$ac_try_echo"; } >&5
2924  (eval "$ac_link") 2>conftest.err
2925  ac_status=$?
2926  if test -s conftest.err; then
2927    grep -v '^ *+' conftest.err >conftest.er1
2928    cat conftest.er1 >&5
2929    mv -f conftest.er1 conftest.err
2930  fi
2931  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2932  test $ac_status = 0; } && {
2933	 test -z "$ac_c_werror_flag" ||
2934	 test ! -s conftest.err
2935       } && test -s conftest$ac_exeext && {
2936	 test "$cross_compiling" = yes ||
2937	 test -x conftest$ac_exeext
2938       }; then :
2939  ac_retval=0
2940else
2941  $as_echo "$as_me: failed program was:" >&5
2942sed 's/^/| /' conftest.$ac_ext >&5
2943
2944	ac_retval=1
2945fi
2946  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2947  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2948  # interfere with the next link command; also delete a directory that is
2949  # left behind by Apple's compiler.  We do this before executing the actions.
2950  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2951  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2952  as_fn_set_status $ac_retval
2953
2954} # ac_fn_c_try_link
2955
2956# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2957# -------------------------------------------
2958# Tests whether TYPE exists after having included INCLUDES, setting cache
2959# variable VAR accordingly.
2960ac_fn_c_check_type ()
2961{
2962  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2963  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2964$as_echo_n "checking for $2... " >&6; }
2965if eval \${$3+:} false; then :
2966  $as_echo_n "(cached) " >&6
2967else
2968  eval "$3=no"
2969  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2970/* end confdefs.h.  */
2971$4
2972int
2973main ()
2974{
2975if (sizeof ($2))
2976	 return 0;
2977  ;
2978  return 0;
2979}
2980_ACEOF
2981if ac_fn_c_try_compile "$LINENO"; then :
2982  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2983/* end confdefs.h.  */
2984$4
2985int
2986main ()
2987{
2988if (sizeof (($2)))
2989	    return 0;
2990  ;
2991  return 0;
2992}
2993_ACEOF
2994if ac_fn_c_try_compile "$LINENO"; then :
2995
2996else
2997  eval "$3=yes"
2998fi
2999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3000fi
3001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3002fi
3003eval ac_res=\$$3
3004	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3005$as_echo "$ac_res" >&6; }
3006  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3007
3008} # ac_fn_c_check_type
3009
3010# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
3011# -------------------------------------------------------
3012# Tests whether HEADER exists, giving a warning if it cannot be compiled using
3013# the include files in INCLUDES and setting the cache variable VAR
3014# accordingly.
3015ac_fn_c_check_header_mongrel ()
3016{
3017  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3018  if eval \${$3+:} false; then :
3019  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3020$as_echo_n "checking for $2... " >&6; }
3021if eval \${$3+:} false; then :
3022  $as_echo_n "(cached) " >&6
3023fi
3024eval ac_res=\$$3
3025	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3026$as_echo "$ac_res" >&6; }
3027else
3028  # Is the header compilable?
3029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
3030$as_echo_n "checking $2 usability... " >&6; }
3031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3032/* end confdefs.h.  */
3033$4
3034#include <$2>
3035_ACEOF
3036if ac_fn_c_try_compile "$LINENO"; then :
3037  ac_header_compiler=yes
3038else
3039  ac_header_compiler=no
3040fi
3041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
3043$as_echo "$ac_header_compiler" >&6; }
3044
3045# Is the header present?
3046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
3047$as_echo_n "checking $2 presence... " >&6; }
3048cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3049/* end confdefs.h.  */
3050#include <$2>
3051_ACEOF
3052if ac_fn_c_try_cpp "$LINENO"; then :
3053  ac_header_preproc=yes
3054else
3055  ac_header_preproc=no
3056fi
3057rm -f conftest.err conftest.i conftest.$ac_ext
3058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
3059$as_echo "$ac_header_preproc" >&6; }
3060
3061# So?  What about this header?
3062case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
3063  yes:no: )
3064    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
3065$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
3066    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
3067$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
3068    ;;
3069  no:yes:* )
3070    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
3071$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
3072    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
3073$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
3074    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
3075$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
3076    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
3077$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
3078    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
3079$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
3080    ;;
3081esac
3082  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3083$as_echo_n "checking for $2... " >&6; }
3084if eval \${$3+:} false; then :
3085  $as_echo_n "(cached) " >&6
3086else
3087  eval "$3=\$ac_header_compiler"
3088fi
3089eval ac_res=\$$3
3090	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3091$as_echo "$ac_res" >&6; }
3092fi
3093  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3094
3095} # ac_fn_c_check_header_mongrel
3096
3097# ac_fn_c_check_func LINENO FUNC VAR
3098# ----------------------------------
3099# Tests whether FUNC exists, setting the cache variable VAR accordingly
3100ac_fn_c_check_func ()
3101{
3102  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3103  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3104$as_echo_n "checking for $2... " >&6; }
3105if eval \${$3+:} false; then :
3106  $as_echo_n "(cached) " >&6
3107else
3108  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3109/* end confdefs.h.  */
3110/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3111   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3112#define $2 innocuous_$2
3113
3114/* System header to define __stub macros and hopefully few prototypes,
3115    which can conflict with char $2 (); below.
3116    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3117    <limits.h> exists even on freestanding compilers.  */
3118
3119#ifdef __STDC__
3120# include <limits.h>
3121#else
3122# include <assert.h>
3123#endif
3124
3125#undef $2
3126
3127/* Override any GCC internal prototype to avoid an error.
3128   Use char because int might match the return type of a GCC
3129   builtin and then its argument prototype would still apply.  */
3130#ifdef __cplusplus
3131extern "C"
3132#endif
3133char $2 ();
3134/* The GNU C library defines this for functions which it implements
3135    to always fail with ENOSYS.  Some functions are actually named
3136    something starting with __ and the normal name is an alias.  */
3137#if defined __stub_$2 || defined __stub___$2
3138choke me
3139#endif
3140
3141int
3142main ()
3143{
3144return $2 ();
3145  ;
3146  return 0;
3147}
3148_ACEOF
3149if ac_fn_c_try_link "$LINENO"; then :
3150  eval "$3=yes"
3151else
3152  eval "$3=no"
3153fi
3154rm -f core conftest.err conftest.$ac_objext \
3155    conftest$ac_exeext conftest.$ac_ext
3156fi
3157eval ac_res=\$$3
3158	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3159$as_echo "$ac_res" >&6; }
3160  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3161
3162} # ac_fn_c_check_func
3163
3164# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
3165# ---------------------------------------------
3166# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
3167# accordingly.
3168ac_fn_c_check_decl ()
3169{
3170  ac_save_ac_compile="$ac_compile"
3171  if test -n "$ac_compile_for_check_decl"; then
3172    ac_compile="$ac_compile_for_check_decl"
3173  fi
3174  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3175  as_decl_name=`echo $2|sed 's/ *(.*//'`
3176  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
3177  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
3178$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
3179if eval \${$3+:} false; then :
3180  $as_echo_n "(cached) " >&6
3181else
3182  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3183/* end confdefs.h.  */
3184$4
3185int
3186main ()
3187{
3188#ifndef $as_decl_name
3189#ifdef __cplusplus
3190  (void) $as_decl_use;
3191#else
3192  (void) $as_decl_name;
3193#endif
3194#endif
3195
3196  ;
3197  return 0;
3198}
3199_ACEOF
3200if ac_fn_c_try_compile "$LINENO"; then :
3201  eval "$3=yes"
3202else
3203  eval "$3=no"
3204fi
3205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3206fi
3207eval ac_res=\$$3
3208	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3209$as_echo "$ac_res" >&6; }
3210  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3211  ac_compile="$ac_save_ac_compile"
3212
3213} # ac_fn_c_check_decl
3214
3215# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
3216# --------------------------------------------
3217# Tries to find the compile-time value of EXPR in a program that includes
3218# INCLUDES, setting VAR accordingly. Returns whether the value could be
3219# computed
3220ac_fn_c_compute_int ()
3221{
3222  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3223  if test "$cross_compiling" = yes; then
3224    # Depending upon the size, compute the lo and hi bounds.
3225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3226/* end confdefs.h.  */
3227$4
3228int
3229main ()
3230{
3231static int test_array [1 - 2 * !(($2) >= 0)];
3232test_array [0] = 0;
3233return test_array [0];
3234
3235  ;
3236  return 0;
3237}
3238_ACEOF
3239if ac_fn_c_try_compile "$LINENO"; then :
3240  ac_lo=0 ac_mid=0
3241  while :; do
3242    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3243/* end confdefs.h.  */
3244$4
3245int
3246main ()
3247{
3248static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3249test_array [0] = 0;
3250return test_array [0];
3251
3252  ;
3253  return 0;
3254}
3255_ACEOF
3256if ac_fn_c_try_compile "$LINENO"; then :
3257  ac_hi=$ac_mid; break
3258else
3259  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
3260			if test $ac_lo -le $ac_mid; then
3261			  ac_lo= ac_hi=
3262			  break
3263			fi
3264			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
3265fi
3266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3267  done
3268else
3269  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3270/* end confdefs.h.  */
3271$4
3272int
3273main ()
3274{
3275static int test_array [1 - 2 * !(($2) < 0)];
3276test_array [0] = 0;
3277return test_array [0];
3278
3279  ;
3280  return 0;
3281}
3282_ACEOF
3283if ac_fn_c_try_compile "$LINENO"; then :
3284  ac_hi=-1 ac_mid=-1
3285  while :; do
3286    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3287/* end confdefs.h.  */
3288$4
3289int
3290main ()
3291{
3292static int test_array [1 - 2 * !(($2) >= $ac_mid)];
3293test_array [0] = 0;
3294return test_array [0];
3295
3296  ;
3297  return 0;
3298}
3299_ACEOF
3300if ac_fn_c_try_compile "$LINENO"; then :
3301  ac_lo=$ac_mid; break
3302else
3303  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
3304			if test $ac_mid -le $ac_hi; then
3305			  ac_lo= ac_hi=
3306			  break
3307			fi
3308			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
3309fi
3310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3311  done
3312else
3313  ac_lo= ac_hi=
3314fi
3315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3316fi
3317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3318# Binary search between lo and hi bounds.
3319while test "x$ac_lo" != "x$ac_hi"; do
3320  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3321  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3322/* end confdefs.h.  */
3323$4
3324int
3325main ()
3326{
3327static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3328test_array [0] = 0;
3329return test_array [0];
3330
3331  ;
3332  return 0;
3333}
3334_ACEOF
3335if ac_fn_c_try_compile "$LINENO"; then :
3336  ac_hi=$ac_mid
3337else
3338  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3339fi
3340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3341done
3342case $ac_lo in #((
3343?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3344'') ac_retval=1 ;;
3345esac
3346  else
3347    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3348/* end confdefs.h.  */
3349$4
3350static long int longval () { return $2; }
3351static unsigned long int ulongval () { return $2; }
3352#include <stdio.h>
3353#include <stdlib.h>
3354int
3355main ()
3356{
3357
3358  FILE *f = fopen ("conftest.val", "w");
3359  if (! f)
3360    return 1;
3361  if (($2) < 0)
3362    {
3363      long int i = longval ();
3364      if (i != ($2))
3365	return 1;
3366      fprintf (f, "%ld", i);
3367    }
3368  else
3369    {
3370      unsigned long int i = ulongval ();
3371      if (i != ($2))
3372	return 1;
3373      fprintf (f, "%lu", i);
3374    }
3375  /* Do not output a trailing newline, as this causes \r\n confusion
3376     on some platforms.  */
3377  return ferror (f) || fclose (f) != 0;
3378
3379  ;
3380  return 0;
3381}
3382_ACEOF
3383if ac_fn_c_try_run "$LINENO"; then :
3384  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3385else
3386  ac_retval=1
3387fi
3388rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3389  conftest.$ac_objext conftest.beam conftest.$ac_ext
3390rm -f conftest.val
3391
3392  fi
3393  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3394  as_fn_set_status $ac_retval
3395
3396} # ac_fn_c_compute_int
3397
3398# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3399# ----------------------------------------------------
3400# Tries to find if the field MEMBER exists in type AGGR, after including
3401# INCLUDES, setting cache variable VAR accordingly.
3402ac_fn_c_check_member ()
3403{
3404  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3405  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3406$as_echo_n "checking for $2.$3... " >&6; }
3407if eval \${$4+:} false; then :
3408  $as_echo_n "(cached) " >&6
3409else
3410  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3411/* end confdefs.h.  */
3412$5
3413int
3414main ()
3415{
3416static $2 ac_aggr;
3417if (ac_aggr.$3)
3418return 0;
3419  ;
3420  return 0;
3421}
3422_ACEOF
3423if ac_fn_c_try_compile "$LINENO"; then :
3424  eval "$4=yes"
3425else
3426  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3427/* end confdefs.h.  */
3428$5
3429int
3430main ()
3431{
3432static $2 ac_aggr;
3433if (sizeof ac_aggr.$3)
3434return 0;
3435  ;
3436  return 0;
3437}
3438_ACEOF
3439if ac_fn_c_try_compile "$LINENO"; then :
3440  eval "$4=yes"
3441else
3442  eval "$4=no"
3443fi
3444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3445fi
3446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3447fi
3448eval ac_res=\$$4
3449	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3450$as_echo "$ac_res" >&6; }
3451  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3452
3453} # ac_fn_c_check_member
3454cat >config.log <<_ACEOF
3455This file contains any messages produced by compilers while
3456running configure, to aid debugging if configure makes a mistake.
3457
3458It was created by libgnu $as_me UNUSED-VERSION, which was
3459generated by GNU Autoconf 2.69.  Invocation command line was
3460
3461  $ $0 $@
3462
3463_ACEOF
3464exec 5>>config.log
3465{
3466cat <<_ASUNAME
3467## --------- ##
3468## Platform. ##
3469## --------- ##
3470
3471hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3472uname -m = `(uname -m) 2>/dev/null || echo unknown`
3473uname -r = `(uname -r) 2>/dev/null || echo unknown`
3474uname -s = `(uname -s) 2>/dev/null || echo unknown`
3475uname -v = `(uname -v) 2>/dev/null || echo unknown`
3476
3477/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3478/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3479
3480/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3481/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3482/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3483/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3484/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3485/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3486/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3487
3488_ASUNAME
3489
3490as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3491for as_dir in $PATH
3492do
3493  IFS=$as_save_IFS
3494  test -z "$as_dir" && as_dir=.
3495    $as_echo "PATH: $as_dir"
3496  done
3497IFS=$as_save_IFS
3498
3499} >&5
3500
3501cat >&5 <<_ACEOF
3502
3503
3504## ----------- ##
3505## Core tests. ##
3506## ----------- ##
3507
3508_ACEOF
3509
3510
3511# Keep a trace of the command line.
3512# Strip out --no-create and --no-recursion so they do not pile up.
3513# Strip out --silent because we don't want to record it for future runs.
3514# Also quote any args containing shell meta-characters.
3515# Make two passes to allow for proper duplicate-argument suppression.
3516ac_configure_args=
3517ac_configure_args0=
3518ac_configure_args1=
3519ac_must_keep_next=false
3520for ac_pass in 1 2
3521do
3522  for ac_arg
3523  do
3524    case $ac_arg in
3525    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3526    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3527    | -silent | --silent | --silen | --sile | --sil)
3528      continue ;;
3529    *\'*)
3530      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3531    esac
3532    case $ac_pass in
3533    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3534    2)
3535      as_fn_append ac_configure_args1 " '$ac_arg'"
3536      if test $ac_must_keep_next = true; then
3537	ac_must_keep_next=false # Got value, back to normal.
3538      else
3539	case $ac_arg in
3540	  *=* | --config-cache | -C | -disable-* | --disable-* \
3541	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3542	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3543	  | -with-* | --with-* | -without-* | --without-* | --x)
3544	    case "$ac_configure_args0 " in
3545	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3546	    esac
3547	    ;;
3548	  -* ) ac_must_keep_next=true ;;
3549	esac
3550      fi
3551      as_fn_append ac_configure_args " '$ac_arg'"
3552      ;;
3553    esac
3554  done
3555done
3556{ ac_configure_args0=; unset ac_configure_args0;}
3557{ ac_configure_args1=; unset ac_configure_args1;}
3558
3559# When interrupted or exit'd, cleanup temporary files, and complete
3560# config.log.  We remove comments because anyway the quotes in there
3561# would cause problems or look ugly.
3562# WARNING: Use '\'' to represent an apostrophe within the trap.
3563# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3564trap 'exit_status=$?
3565  # Save into config.log some information that might help in debugging.
3566  {
3567    echo
3568
3569    $as_echo "## ---------------- ##
3570## Cache variables. ##
3571## ---------------- ##"
3572    echo
3573    # The following way of writing the cache mishandles newlines in values,
3574(
3575  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3576    eval ac_val=\$$ac_var
3577    case $ac_val in #(
3578    *${as_nl}*)
3579      case $ac_var in #(
3580      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3581$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3582      esac
3583      case $ac_var in #(
3584      _ | IFS | as_nl) ;; #(
3585      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3586      *) { eval $ac_var=; unset $ac_var;} ;;
3587      esac ;;
3588    esac
3589  done
3590  (set) 2>&1 |
3591    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3592    *${as_nl}ac_space=\ *)
3593      sed -n \
3594	"s/'\''/'\''\\\\'\'''\''/g;
3595	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3596      ;; #(
3597    *)
3598      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3599      ;;
3600    esac |
3601    sort
3602)
3603    echo
3604
3605    $as_echo "## ----------------- ##
3606## Output variables. ##
3607## ----------------- ##"
3608    echo
3609    for ac_var in $ac_subst_vars
3610    do
3611      eval ac_val=\$$ac_var
3612      case $ac_val in
3613      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3614      esac
3615      $as_echo "$ac_var='\''$ac_val'\''"
3616    done | sort
3617    echo
3618
3619    if test -n "$ac_subst_files"; then
3620      $as_echo "## ------------------- ##
3621## File substitutions. ##
3622## ------------------- ##"
3623      echo
3624      for ac_var in $ac_subst_files
3625      do
3626	eval ac_val=\$$ac_var
3627	case $ac_val in
3628	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3629	esac
3630	$as_echo "$ac_var='\''$ac_val'\''"
3631      done | sort
3632      echo
3633    fi
3634
3635    if test -s confdefs.h; then
3636      $as_echo "## ----------- ##
3637## confdefs.h. ##
3638## ----------- ##"
3639      echo
3640      cat confdefs.h
3641      echo
3642    fi
3643    test "$ac_signal" != 0 &&
3644      $as_echo "$as_me: caught signal $ac_signal"
3645    $as_echo "$as_me: exit $exit_status"
3646  } >&5
3647  rm -f core *.core core.conftest.* &&
3648    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3649    exit $exit_status
3650' 0
3651for ac_signal in 1 2 13 15; do
3652  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3653done
3654ac_signal=0
3655
3656# confdefs.h avoids OS command line length limits that DEFS can exceed.
3657rm -f -r conftest* confdefs.h
3658
3659$as_echo "/* confdefs.h */" > confdefs.h
3660
3661# Predefined preprocessor variables.
3662
3663cat >>confdefs.h <<_ACEOF
3664#define PACKAGE_NAME "$PACKAGE_NAME"
3665_ACEOF
3666
3667cat >>confdefs.h <<_ACEOF
3668#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3669_ACEOF
3670
3671cat >>confdefs.h <<_ACEOF
3672#define PACKAGE_VERSION "$PACKAGE_VERSION"
3673_ACEOF
3674
3675cat >>confdefs.h <<_ACEOF
3676#define PACKAGE_STRING "$PACKAGE_STRING"
3677_ACEOF
3678
3679cat >>confdefs.h <<_ACEOF
3680#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3681_ACEOF
3682
3683cat >>confdefs.h <<_ACEOF
3684#define PACKAGE_URL "$PACKAGE_URL"
3685_ACEOF
3686
3687
3688# Let the site file select an alternate cache file if it wants to.
3689# Prefer an explicitly selected file to automatically selected ones.
3690ac_site_file1=NONE
3691ac_site_file2=NONE
3692if test -n "$CONFIG_SITE"; then
3693  # We do not want a PATH search for config.site.
3694  case $CONFIG_SITE in #((
3695    -*)  ac_site_file1=./$CONFIG_SITE;;
3696    */*) ac_site_file1=$CONFIG_SITE;;
3697    *)   ac_site_file1=./$CONFIG_SITE;;
3698  esac
3699elif test "x$prefix" != xNONE; then
3700  ac_site_file1=$prefix/share/config.site
3701  ac_site_file2=$prefix/etc/config.site
3702else
3703  ac_site_file1=$ac_default_prefix/share/config.site
3704  ac_site_file2=$ac_default_prefix/etc/config.site
3705fi
3706for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3707do
3708  test "x$ac_site_file" = xNONE && continue
3709  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3710    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3711$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3712    sed 's/^/| /' "$ac_site_file" >&5
3713    . "$ac_site_file" \
3714      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3715$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3716as_fn_error $? "failed to load site script $ac_site_file
3717See \`config.log' for more details" "$LINENO" 5; }
3718  fi
3719done
3720
3721if test -r "$cache_file"; then
3722  # Some versions of bash will fail to source /dev/null (special files
3723  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3724  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3725    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3726$as_echo "$as_me: loading cache $cache_file" >&6;}
3727    case $cache_file in
3728      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3729      *)                      . "./$cache_file";;
3730    esac
3731  fi
3732else
3733  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3734$as_echo "$as_me: creating cache $cache_file" >&6;}
3735  >$cache_file
3736fi
3737
3738as_fn_append ac_header_list " wchar.h"
3739as_fn_append ac_header_list " minix/config.h"
3740as_fn_append ac_header_list " arpa/inet.h"
3741as_fn_append ac_header_list " features.h"
3742as_fn_append ac_header_list " sys/socket.h"
3743as_fn_append ac_func_list " btowc"
3744as_fn_append ac_func_list " canonicalize_file_name"
3745as_fn_append ac_func_list " faccessat"
3746as_fn_append ac_func_list " realpath"
3747as_fn_append ac_header_list " sys/param.h"
3748as_fn_append ac_header_list " unistd.h"
3749as_fn_append ac_func_list " chown"
3750as_fn_append ac_func_list " fchown"
3751as_fn_append ac_func_list " _set_invalid_parameter_handler"
3752as_fn_append ac_func_list " fchdir"
3753as_fn_append ac_header_list " dirent.h"
3754as_fn_append ac_func_list " fcntl"
3755as_fn_append ac_func_list " symlink"
3756as_fn_append ac_func_list " fdopendir"
3757as_fn_append ac_func_list " mempcpy"
3758as_fn_append ac_header_list " fnmatch.h"
3759as_fn_append ac_func_list " fnmatch"
3760as_fn_append ac_func_list " mbsrtowcs"
3761gl_fnmatch_required=GNU
3762as_fn_append ac_header_list " sys/stat.h"
3763as_fn_append ac_func_list " fstatat"
3764as_fn_append ac_func_list " getdelim"
3765as_fn_append ac_func_list " getdtablesize"
3766as_fn_append ac_func_list " getlogin_r"
3767as_fn_append ac_func_list " getprogname"
3768as_fn_append ac_func_list " getexecname"
3769as_fn_append ac_func_list " getrandom"
3770as_fn_append ac_header_list " sys/time.h"
3771as_fn_append ac_func_list " gettimeofday"
3772as_fn_append ac_header_list " glob.h"
3773as_fn_append ac_func_list " glob"
3774as_fn_append ac_func_list " glob_pattern_p"
3775as_fn_append ac_func_list " getpwnam_r"
3776as_fn_append ac_header_list " threads.h"
3777as_fn_append ac_header_list " netdb.h"
3778as_fn_append ac_header_list " netinet/in.h"
3779as_fn_append ac_header_list " limits.h"
3780as_fn_append ac_header_list " inttypes.h"
3781as_fn_append ac_header_list " sys/types.h"
3782as_fn_append ac_header_list " stdint.h"
3783as_fn_append ac_func_list " isblank"
3784as_fn_append ac_header_list " xlocale.h"
3785as_fn_append ac_func_list " lstat"
3786as_fn_append ac_header_list " math.h"
3787as_fn_append ac_func_list " mbsinit"
3788as_fn_append ac_func_list " mbrtowc"
3789as_fn_append ac_header_list " sys/mman.h"
3790as_fn_append ac_func_list " mprotect"
3791as_fn_append ac_func_list " mkostemp"
3792as_fn_append ac_func_list " openat"
3793as_fn_append ac_func_list " pipe"
3794as_fn_append ac_func_list " readlink"
3795as_fn_append ac_func_list " link"
3796as_fn_append ac_header_list " sys/select.h"
3797as_fn_append ac_func_list " setenv"
3798as_fn_append ac_func_list " strerror_r"
3799as_fn_append ac_func_list " __xpg_strerror_r"
3800as_fn_append ac_func_list " catgets"
3801as_fn_append ac_func_list " snprintf"
3802as_fn_append ac_header_list " strings.h"
3803as_fn_append ac_header_list " sys/random.h"
3804as_fn_append ac_header_list " sys/uio.h"
3805as_fn_append ac_func_list " localtime_r"
3806as_fn_append ac_header_list " crtdefs.h"
3807as_fn_append ac_func_list " iswcntrl"
3808as_fn_append ac_header_list " wctype.h"
3809as_fn_append ac_func_list " wmempcpy"
3810# Check that the precious variables saved in the cache have kept the same
3811# value.
3812ac_cache_corrupted=false
3813for ac_var in $ac_precious_vars; do
3814  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3815  eval ac_new_set=\$ac_env_${ac_var}_set
3816  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3817  eval ac_new_val=\$ac_env_${ac_var}_value
3818  case $ac_old_set,$ac_new_set in
3819    set,)
3820      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3821$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3822      ac_cache_corrupted=: ;;
3823    ,set)
3824      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3825$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3826      ac_cache_corrupted=: ;;
3827    ,);;
3828    *)
3829      if test "x$ac_old_val" != "x$ac_new_val"; then
3830	# differences in whitespace do not lead to failure.
3831	ac_old_val_w=`echo x $ac_old_val`
3832	ac_new_val_w=`echo x $ac_new_val`
3833	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3834	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3835$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3836	  ac_cache_corrupted=:
3837	else
3838	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3839$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3840	  eval $ac_var=\$ac_old_val
3841	fi
3842	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3843$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3844	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3845$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3846      fi;;
3847  esac
3848  # Pass precious variables to config.status.
3849  if test "$ac_new_set" = set; then
3850    case $ac_new_val in
3851    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3852    *) ac_arg=$ac_var=$ac_new_val ;;
3853    esac
3854    case " $ac_configure_args " in
3855      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3856      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3857    esac
3858  fi
3859done
3860if $ac_cache_corrupted; then
3861  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3862$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3863  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3864$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3865  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3866fi
3867## -------------------- ##
3868## Main body of script. ##
3869## -------------------- ##
3870
3871ac_ext=c
3872ac_cpp='$CPP $CPPFLAGS'
3873ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3874ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3875ac_compiler_gnu=$ac_cv_c_compiler_gnu
3876
3877
3878
3879
3880
3881
3882ac_config_headers="$ac_config_headers config.h:config.in"
3883
3884
3885
3886
3887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
3888$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
3889    # Check whether --enable-maintainer-mode was given.
3890if test "${enable_maintainer_mode+set}" = set; then :
3891  enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
3892else
3893  USE_MAINTAINER_MODE=no
3894fi
3895
3896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3897$as_echo "$USE_MAINTAINER_MODE" >&6; }
3898   if test $USE_MAINTAINER_MODE = yes; then
3899  MAINTAINER_MODE_TRUE=
3900  MAINTAINER_MODE_FALSE='#'
3901else
3902  MAINTAINER_MODE_TRUE='#'
3903  MAINTAINER_MODE_FALSE=
3904fi
3905
3906  MAINT=$MAINTAINER_MODE_TRUE
3907
3908
3909
3910ac_ext=c
3911ac_cpp='$CPP $CPPFLAGS'
3912ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3913ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3914ac_compiler_gnu=$ac_cv_c_compiler_gnu
3915if test -n "$ac_tool_prefix"; then
3916  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3917set dummy ${ac_tool_prefix}gcc; ac_word=$2
3918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3919$as_echo_n "checking for $ac_word... " >&6; }
3920if ${ac_cv_prog_CC+:} false; then :
3921  $as_echo_n "(cached) " >&6
3922else
3923  if test -n "$CC"; then
3924  ac_cv_prog_CC="$CC" # Let the user override the test.
3925else
3926as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3927for as_dir in $PATH
3928do
3929  IFS=$as_save_IFS
3930  test -z "$as_dir" && as_dir=.
3931    for ac_exec_ext in '' $ac_executable_extensions; do
3932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3933    ac_cv_prog_CC="${ac_tool_prefix}gcc"
3934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3935    break 2
3936  fi
3937done
3938  done
3939IFS=$as_save_IFS
3940
3941fi
3942fi
3943CC=$ac_cv_prog_CC
3944if test -n "$CC"; then
3945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3946$as_echo "$CC" >&6; }
3947else
3948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3949$as_echo "no" >&6; }
3950fi
3951
3952
3953fi
3954if test -z "$ac_cv_prog_CC"; then
3955  ac_ct_CC=$CC
3956  # Extract the first word of "gcc", so it can be a program name with args.
3957set dummy gcc; ac_word=$2
3958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3959$as_echo_n "checking for $ac_word... " >&6; }
3960if ${ac_cv_prog_ac_ct_CC+:} false; then :
3961  $as_echo_n "(cached) " >&6
3962else
3963  if test -n "$ac_ct_CC"; then
3964  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3965else
3966as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3967for as_dir in $PATH
3968do
3969  IFS=$as_save_IFS
3970  test -z "$as_dir" && as_dir=.
3971    for ac_exec_ext in '' $ac_executable_extensions; do
3972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3973    ac_cv_prog_ac_ct_CC="gcc"
3974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3975    break 2
3976  fi
3977done
3978  done
3979IFS=$as_save_IFS
3980
3981fi
3982fi
3983ac_ct_CC=$ac_cv_prog_ac_ct_CC
3984if test -n "$ac_ct_CC"; then
3985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3986$as_echo "$ac_ct_CC" >&6; }
3987else
3988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3989$as_echo "no" >&6; }
3990fi
3991
3992  if test "x$ac_ct_CC" = x; then
3993    CC=""
3994  else
3995    case $cross_compiling:$ac_tool_warned in
3996yes:)
3997{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3998$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3999ac_tool_warned=yes ;;
4000esac
4001    CC=$ac_ct_CC
4002  fi
4003else
4004  CC="$ac_cv_prog_CC"
4005fi
4006
4007if test -z "$CC"; then
4008          if test -n "$ac_tool_prefix"; then
4009    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4010set dummy ${ac_tool_prefix}cc; ac_word=$2
4011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4012$as_echo_n "checking for $ac_word... " >&6; }
4013if ${ac_cv_prog_CC+:} false; then :
4014  $as_echo_n "(cached) " >&6
4015else
4016  if test -n "$CC"; then
4017  ac_cv_prog_CC="$CC" # Let the user override the test.
4018else
4019as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4020for as_dir in $PATH
4021do
4022  IFS=$as_save_IFS
4023  test -z "$as_dir" && as_dir=.
4024    for ac_exec_ext in '' $ac_executable_extensions; do
4025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4026    ac_cv_prog_CC="${ac_tool_prefix}cc"
4027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4028    break 2
4029  fi
4030done
4031  done
4032IFS=$as_save_IFS
4033
4034fi
4035fi
4036CC=$ac_cv_prog_CC
4037if test -n "$CC"; then
4038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4039$as_echo "$CC" >&6; }
4040else
4041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4042$as_echo "no" >&6; }
4043fi
4044
4045
4046  fi
4047fi
4048if test -z "$CC"; then
4049  # Extract the first word of "cc", so it can be a program name with args.
4050set dummy cc; ac_word=$2
4051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4052$as_echo_n "checking for $ac_word... " >&6; }
4053if ${ac_cv_prog_CC+:} false; then :
4054  $as_echo_n "(cached) " >&6
4055else
4056  if test -n "$CC"; then
4057  ac_cv_prog_CC="$CC" # Let the user override the test.
4058else
4059  ac_prog_rejected=no
4060as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4061for as_dir in $PATH
4062do
4063  IFS=$as_save_IFS
4064  test -z "$as_dir" && as_dir=.
4065    for ac_exec_ext in '' $ac_executable_extensions; do
4066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4067    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4068       ac_prog_rejected=yes
4069       continue
4070     fi
4071    ac_cv_prog_CC="cc"
4072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4073    break 2
4074  fi
4075done
4076  done
4077IFS=$as_save_IFS
4078
4079if test $ac_prog_rejected = yes; then
4080  # We found a bogon in the path, so make sure we never use it.
4081  set dummy $ac_cv_prog_CC
4082  shift
4083  if test $# != 0; then
4084    # We chose a different compiler from the bogus one.
4085    # However, it has the same basename, so the bogon will be chosen
4086    # first if we set CC to just the basename; use the full file name.
4087    shift
4088    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4089  fi
4090fi
4091fi
4092fi
4093CC=$ac_cv_prog_CC
4094if test -n "$CC"; then
4095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4096$as_echo "$CC" >&6; }
4097else
4098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4099$as_echo "no" >&6; }
4100fi
4101
4102
4103fi
4104if test -z "$CC"; then
4105  if test -n "$ac_tool_prefix"; then
4106  for ac_prog in cl.exe
4107  do
4108    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4109set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4111$as_echo_n "checking for $ac_word... " >&6; }
4112if ${ac_cv_prog_CC+:} false; then :
4113  $as_echo_n "(cached) " >&6
4114else
4115  if test -n "$CC"; then
4116  ac_cv_prog_CC="$CC" # Let the user override the test.
4117else
4118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4119for as_dir in $PATH
4120do
4121  IFS=$as_save_IFS
4122  test -z "$as_dir" && as_dir=.
4123    for ac_exec_ext in '' $ac_executable_extensions; do
4124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4125    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4127    break 2
4128  fi
4129done
4130  done
4131IFS=$as_save_IFS
4132
4133fi
4134fi
4135CC=$ac_cv_prog_CC
4136if test -n "$CC"; then
4137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4138$as_echo "$CC" >&6; }
4139else
4140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4141$as_echo "no" >&6; }
4142fi
4143
4144
4145    test -n "$CC" && break
4146  done
4147fi
4148if test -z "$CC"; then
4149  ac_ct_CC=$CC
4150  for ac_prog in cl.exe
4151do
4152  # Extract the first word of "$ac_prog", so it can be a program name with args.
4153set dummy $ac_prog; ac_word=$2
4154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4155$as_echo_n "checking for $ac_word... " >&6; }
4156if ${ac_cv_prog_ac_ct_CC+:} false; then :
4157  $as_echo_n "(cached) " >&6
4158else
4159  if test -n "$ac_ct_CC"; then
4160  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4161else
4162as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4163for as_dir in $PATH
4164do
4165  IFS=$as_save_IFS
4166  test -z "$as_dir" && as_dir=.
4167    for ac_exec_ext in '' $ac_executable_extensions; do
4168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4169    ac_cv_prog_ac_ct_CC="$ac_prog"
4170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4171    break 2
4172  fi
4173done
4174  done
4175IFS=$as_save_IFS
4176
4177fi
4178fi
4179ac_ct_CC=$ac_cv_prog_ac_ct_CC
4180if test -n "$ac_ct_CC"; then
4181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4182$as_echo "$ac_ct_CC" >&6; }
4183else
4184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4185$as_echo "no" >&6; }
4186fi
4187
4188
4189  test -n "$ac_ct_CC" && break
4190done
4191
4192  if test "x$ac_ct_CC" = x; then
4193    CC=""
4194  else
4195    case $cross_compiling:$ac_tool_warned in
4196yes:)
4197{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4198$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4199ac_tool_warned=yes ;;
4200esac
4201    CC=$ac_ct_CC
4202  fi
4203fi
4204
4205fi
4206if test -z "$CC"; then
4207  if test -n "$ac_tool_prefix"; then
4208  # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
4209set dummy ${ac_tool_prefix}clang; ac_word=$2
4210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4211$as_echo_n "checking for $ac_word... " >&6; }
4212if ${ac_cv_prog_CC+:} false; then :
4213  $as_echo_n "(cached) " >&6
4214else
4215  if test -n "$CC"; then
4216  ac_cv_prog_CC="$CC" # Let the user override the test.
4217else
4218as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4219for as_dir in $PATH
4220do
4221  IFS=$as_save_IFS
4222  test -z "$as_dir" && as_dir=.
4223    for ac_exec_ext in '' $ac_executable_extensions; do
4224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4225    ac_cv_prog_CC="${ac_tool_prefix}clang"
4226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4227    break 2
4228  fi
4229done
4230  done
4231IFS=$as_save_IFS
4232
4233fi
4234fi
4235CC=$ac_cv_prog_CC
4236if test -n "$CC"; then
4237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4238$as_echo "$CC" >&6; }
4239else
4240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4241$as_echo "no" >&6; }
4242fi
4243
4244
4245fi
4246if test -z "$ac_cv_prog_CC"; then
4247  ac_ct_CC=$CC
4248  # Extract the first word of "clang", so it can be a program name with args.
4249set dummy clang; ac_word=$2
4250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4251$as_echo_n "checking for $ac_word... " >&6; }
4252if ${ac_cv_prog_ac_ct_CC+:} false; then :
4253  $as_echo_n "(cached) " >&6
4254else
4255  if test -n "$ac_ct_CC"; then
4256  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4257else
4258as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4259for as_dir in $PATH
4260do
4261  IFS=$as_save_IFS
4262  test -z "$as_dir" && as_dir=.
4263    for ac_exec_ext in '' $ac_executable_extensions; do
4264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4265    ac_cv_prog_ac_ct_CC="clang"
4266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4267    break 2
4268  fi
4269done
4270  done
4271IFS=$as_save_IFS
4272
4273fi
4274fi
4275ac_ct_CC=$ac_cv_prog_ac_ct_CC
4276if test -n "$ac_ct_CC"; then
4277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4278$as_echo "$ac_ct_CC" >&6; }
4279else
4280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4281$as_echo "no" >&6; }
4282fi
4283
4284  if test "x$ac_ct_CC" = x; then
4285    CC=""
4286  else
4287    case $cross_compiling:$ac_tool_warned in
4288yes:)
4289{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4290$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4291ac_tool_warned=yes ;;
4292esac
4293    CC=$ac_ct_CC
4294  fi
4295else
4296  CC="$ac_cv_prog_CC"
4297fi
4298
4299fi
4300
4301
4302test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4303$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4304as_fn_error $? "no acceptable C compiler found in \$PATH
4305See \`config.log' for more details" "$LINENO" 5; }
4306
4307# Provide some information about the compiler.
4308$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4309set X $ac_compile
4310ac_compiler=$2
4311for ac_option in --version -v -V -qversion -version; do
4312  { { ac_try="$ac_compiler $ac_option >&5"
4313case "(($ac_try" in
4314  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4315  *) ac_try_echo=$ac_try;;
4316esac
4317eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4318$as_echo "$ac_try_echo"; } >&5
4319  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4320  ac_status=$?
4321  if test -s conftest.err; then
4322    sed '10a\
4323... rest of stderr output deleted ...
4324         10q' conftest.err >conftest.er1
4325    cat conftest.er1 >&5
4326  fi
4327  rm -f conftest.er1 conftest.err
4328  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4329  test $ac_status = 0; }
4330done
4331
4332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4333/* end confdefs.h.  */
4334
4335int
4336main ()
4337{
4338
4339  ;
4340  return 0;
4341}
4342_ACEOF
4343ac_clean_files_save=$ac_clean_files
4344ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4345# Try to create an executable without -o first, disregard a.out.
4346# It will help us diagnose broken compilers, and finding out an intuition
4347# of exeext.
4348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4349$as_echo_n "checking whether the C compiler works... " >&6; }
4350ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4351
4352# The possible output files:
4353ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4354
4355ac_rmfiles=
4356for ac_file in $ac_files
4357do
4358  case $ac_file in
4359    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4360    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4361  esac
4362done
4363rm -f $ac_rmfiles
4364
4365if { { ac_try="$ac_link_default"
4366case "(($ac_try" in
4367  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4368  *) ac_try_echo=$ac_try;;
4369esac
4370eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4371$as_echo "$ac_try_echo"; } >&5
4372  (eval "$ac_link_default") 2>&5
4373  ac_status=$?
4374  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4375  test $ac_status = 0; }; then :
4376  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4377# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4378# in a Makefile.  We should not override ac_cv_exeext if it was cached,
4379# so that the user can short-circuit this test for compilers unknown to
4380# Autoconf.
4381for ac_file in $ac_files ''
4382do
4383  test -f "$ac_file" || continue
4384  case $ac_file in
4385    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4386	;;
4387    [ab].out )
4388	# We found the default executable, but exeext='' is most
4389	# certainly right.
4390	break;;
4391    *.* )
4392	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4393	then :; else
4394	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4395	fi
4396	# We set ac_cv_exeext here because the later test for it is not
4397	# safe: cross compilers may not add the suffix if given an `-o'
4398	# argument, so we may need to know it at that point already.
4399	# Even if this section looks crufty: it has the advantage of
4400	# actually working.
4401	break;;
4402    * )
4403	break;;
4404  esac
4405done
4406test "$ac_cv_exeext" = no && ac_cv_exeext=
4407
4408else
4409  ac_file=''
4410fi
4411if test -z "$ac_file"; then :
4412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4413$as_echo "no" >&6; }
4414$as_echo "$as_me: failed program was:" >&5
4415sed 's/^/| /' conftest.$ac_ext >&5
4416
4417{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4418$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4419as_fn_error 77 "C compiler cannot create executables
4420See \`config.log' for more details" "$LINENO" 5; }
4421else
4422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4423$as_echo "yes" >&6; }
4424fi
4425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4426$as_echo_n "checking for C compiler default output file name... " >&6; }
4427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4428$as_echo "$ac_file" >&6; }
4429ac_exeext=$ac_cv_exeext
4430
4431rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4432ac_clean_files=$ac_clean_files_save
4433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4434$as_echo_n "checking for suffix of executables... " >&6; }
4435if { { ac_try="$ac_link"
4436case "(($ac_try" in
4437  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4438  *) ac_try_echo=$ac_try;;
4439esac
4440eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4441$as_echo "$ac_try_echo"; } >&5
4442  (eval "$ac_link") 2>&5
4443  ac_status=$?
4444  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4445  test $ac_status = 0; }; then :
4446  # If both `conftest.exe' and `conftest' are `present' (well, observable)
4447# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4448# work properly (i.e., refer to `conftest.exe'), while it won't with
4449# `rm'.
4450for ac_file in conftest.exe conftest conftest.*; do
4451  test -f "$ac_file" || continue
4452  case $ac_file in
4453    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4454    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4455	  break;;
4456    * ) break;;
4457  esac
4458done
4459else
4460  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4461$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4462as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4463See \`config.log' for more details" "$LINENO" 5; }
4464fi
4465rm -f conftest conftest$ac_cv_exeext
4466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4467$as_echo "$ac_cv_exeext" >&6; }
4468
4469rm -f conftest.$ac_ext
4470EXEEXT=$ac_cv_exeext
4471ac_exeext=$EXEEXT
4472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4473/* end confdefs.h.  */
4474#include <stdio.h>
4475int
4476main ()
4477{
4478FILE *f = fopen ("conftest.out", "w");
4479 return ferror (f) || fclose (f) != 0;
4480
4481  ;
4482  return 0;
4483}
4484_ACEOF
4485ac_clean_files="$ac_clean_files conftest.out"
4486# Check that the compiler produces executables we can run.  If not, either
4487# the compiler is broken, or we cross compile.
4488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4489$as_echo_n "checking whether we are cross compiling... " >&6; }
4490if test "$cross_compiling" != yes; then
4491  { { ac_try="$ac_link"
4492case "(($ac_try" in
4493  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4494  *) ac_try_echo=$ac_try;;
4495esac
4496eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4497$as_echo "$ac_try_echo"; } >&5
4498  (eval "$ac_link") 2>&5
4499  ac_status=$?
4500  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4501  test $ac_status = 0; }
4502  if { ac_try='./conftest$ac_cv_exeext'
4503  { { case "(($ac_try" in
4504  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4505  *) ac_try_echo=$ac_try;;
4506esac
4507eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4508$as_echo "$ac_try_echo"; } >&5
4509  (eval "$ac_try") 2>&5
4510  ac_status=$?
4511  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4512  test $ac_status = 0; }; }; then
4513    cross_compiling=no
4514  else
4515    if test "$cross_compiling" = maybe; then
4516	cross_compiling=yes
4517    else
4518	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4519$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4520as_fn_error $? "cannot run C compiled programs.
4521If you meant to cross compile, use \`--host'.
4522See \`config.log' for more details" "$LINENO" 5; }
4523    fi
4524  fi
4525fi
4526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4527$as_echo "$cross_compiling" >&6; }
4528
4529rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4530ac_clean_files=$ac_clean_files_save
4531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4532$as_echo_n "checking for suffix of object files... " >&6; }
4533if ${ac_cv_objext+:} false; then :
4534  $as_echo_n "(cached) " >&6
4535else
4536  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4537/* end confdefs.h.  */
4538
4539int
4540main ()
4541{
4542
4543  ;
4544  return 0;
4545}
4546_ACEOF
4547rm -f conftest.o conftest.obj
4548if { { ac_try="$ac_compile"
4549case "(($ac_try" in
4550  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4551  *) ac_try_echo=$ac_try;;
4552esac
4553eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4554$as_echo "$ac_try_echo"; } >&5
4555  (eval "$ac_compile") 2>&5
4556  ac_status=$?
4557  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4558  test $ac_status = 0; }; then :
4559  for ac_file in conftest.o conftest.obj conftest.*; do
4560  test -f "$ac_file" || continue;
4561  case $ac_file in
4562    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4563    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4564       break;;
4565  esac
4566done
4567else
4568  $as_echo "$as_me: failed program was:" >&5
4569sed 's/^/| /' conftest.$ac_ext >&5
4570
4571{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4572$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4573as_fn_error $? "cannot compute suffix of object files: cannot compile
4574See \`config.log' for more details" "$LINENO" 5; }
4575fi
4576rm -f conftest.$ac_cv_objext conftest.$ac_ext
4577fi
4578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4579$as_echo "$ac_cv_objext" >&6; }
4580OBJEXT=$ac_cv_objext
4581ac_objext=$OBJEXT
4582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4583$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4584if ${ac_cv_c_compiler_gnu+:} false; then :
4585  $as_echo_n "(cached) " >&6
4586else
4587  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4588/* end confdefs.h.  */
4589
4590int
4591main ()
4592{
4593#ifndef __GNUC__
4594       choke me
4595#endif
4596
4597  ;
4598  return 0;
4599}
4600_ACEOF
4601if ac_fn_c_try_compile "$LINENO"; then :
4602  ac_compiler_gnu=yes
4603else
4604  ac_compiler_gnu=no
4605fi
4606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4607ac_cv_c_compiler_gnu=$ac_compiler_gnu
4608
4609fi
4610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4611$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4612if test $ac_compiler_gnu = yes; then
4613  GCC=yes
4614else
4615  GCC=
4616fi
4617ac_test_CFLAGS=${CFLAGS+set}
4618ac_save_CFLAGS=$CFLAGS
4619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4620$as_echo_n "checking whether $CC accepts -g... " >&6; }
4621if ${ac_cv_prog_cc_g+:} false; then :
4622  $as_echo_n "(cached) " >&6
4623else
4624  ac_save_c_werror_flag=$ac_c_werror_flag
4625   ac_c_werror_flag=yes
4626   ac_cv_prog_cc_g=no
4627   CFLAGS="-g"
4628   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4629/* end confdefs.h.  */
4630
4631int
4632main ()
4633{
4634
4635  ;
4636  return 0;
4637}
4638_ACEOF
4639if ac_fn_c_try_compile "$LINENO"; then :
4640  ac_cv_prog_cc_g=yes
4641else
4642  CFLAGS=""
4643      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4644/* end confdefs.h.  */
4645
4646int
4647main ()
4648{
4649
4650  ;
4651  return 0;
4652}
4653_ACEOF
4654if ac_fn_c_try_compile "$LINENO"; then :
4655
4656else
4657  ac_c_werror_flag=$ac_save_c_werror_flag
4658	 CFLAGS="-g"
4659	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4660/* end confdefs.h.  */
4661
4662int
4663main ()
4664{
4665
4666  ;
4667  return 0;
4668}
4669_ACEOF
4670if ac_fn_c_try_compile "$LINENO"; then :
4671  ac_cv_prog_cc_g=yes
4672fi
4673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4674fi
4675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4676fi
4677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4678   ac_c_werror_flag=$ac_save_c_werror_flag
4679fi
4680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4681$as_echo "$ac_cv_prog_cc_g" >&6; }
4682if test "$ac_test_CFLAGS" = set; then
4683  CFLAGS=$ac_save_CFLAGS
4684elif test $ac_cv_prog_cc_g = yes; then
4685  if test "$GCC" = yes; then
4686    CFLAGS="-g -O2"
4687  else
4688    CFLAGS="-g"
4689  fi
4690else
4691  if test "$GCC" = yes; then
4692    CFLAGS="-O2"
4693  else
4694    CFLAGS=
4695  fi
4696fi
4697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
4698$as_echo_n "checking for $CC option to enable C11 features... " >&6; }
4699if ${ac_cv_prog_cc_c11+:} false; then :
4700  $as_echo_n "(cached) " >&6
4701else
4702  ac_cv_prog_cc_c11=no
4703ac_save_CC=$CC
4704cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4705/* end confdefs.h.  */
4706#include <stdarg.h>
4707#include <stdbool.h>
4708#include <stddef.h>
4709#include <stdlib.h>
4710#include <wchar.h>
4711#include <stdio.h>
4712
4713// Check varargs macros.  These examples are taken from C99 6.10.3.5.
4714#define debug(...) fprintf (stderr, __VA_ARGS__)
4715#define showlist(...) puts (#__VA_ARGS__)
4716#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4717static void
4718test_varargs_macros (void)
4719{
4720  int x = 1234;
4721  int y = 5678;
4722  debug ("Flag");
4723  debug ("X = %d\n", x);
4724  showlist (The first, second, and third items.);
4725  report (x>y, "x is %d but y is %d", x, y);
4726}
4727
4728// Check long long types.
4729#define BIG64 18446744073709551615ull
4730#define BIG32 4294967295ul
4731#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4732#if !BIG_OK
4733  your preprocessor is broken;
4734#endif
4735#if BIG_OK
4736#else
4737  your preprocessor is broken;
4738#endif
4739static long long int bignum = -9223372036854775807LL;
4740static unsigned long long int ubignum = BIG64;
4741
4742struct incomplete_array
4743{
4744  int datasize;
4745  double data[];
4746};
4747
4748struct named_init {
4749  int number;
4750  const wchar_t *name;
4751  double average;
4752};
4753
4754typedef const char *ccp;
4755
4756static inline int
4757test_restrict (ccp restrict text)
4758{
4759  // See if C++-style comments work.
4760  // Iterate through items via the restricted pointer.
4761  // Also check for declarations in for loops.
4762  for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4763    continue;
4764  return 0;
4765}
4766
4767// Check varargs and va_copy.
4768static bool
4769test_varargs (const char *format, ...)
4770{
4771  va_list args;
4772  va_start (args, format);
4773  va_list args_copy;
4774  va_copy (args_copy, args);
4775
4776  const char *str = "";
4777  int number = 0;
4778  float fnumber = 0;
4779
4780  while (*format)
4781    {
4782      switch (*format++)
4783	{
4784	case 's': // string
4785	  str = va_arg (args_copy, const char *);
4786	  break;
4787	case 'd': // int
4788	  number = va_arg (args_copy, int);
4789	  break;
4790	case 'f': // float
4791	  fnumber = va_arg (args_copy, double);
4792	  break;
4793	default:
4794	  break;
4795	}
4796    }
4797  va_end (args_copy);
4798  va_end (args);
4799
4800  return *str && number && fnumber;
4801}
4802// Check _Alignas.
4803char _Alignas (double) aligned_as_double;
4804char _Alignas (0) no_special_alignment;
4805extern char aligned_as_int;
4806char _Alignas (0) _Alignas (int) aligned_as_int;
4807
4808// Check _Alignof.
4809enum
4810{
4811  int_alignment = _Alignof (int),
4812  int_array_alignment = _Alignof (int[100]),
4813  char_alignment = _Alignof (char)
4814};
4815_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
4816
4817// Check _Noreturn.
4818int _Noreturn does_not_return (void) { for (;;) continue; }
4819
4820// Check _Static_assert.
4821struct test_static_assert
4822{
4823  int x;
4824  _Static_assert (sizeof (int) <= sizeof (long int),
4825                  "_Static_assert does not work in struct");
4826  long int y;
4827};
4828
4829// Check UTF-8 literals.
4830#define u8 syntax error!
4831char const utf8_literal[] = u8"happens to be ASCII" "another string";
4832
4833// Check duplicate typedefs.
4834typedef long *long_ptr;
4835typedef long int *long_ptr;
4836typedef long_ptr long_ptr;
4837
4838// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
4839struct anonymous
4840{
4841  union {
4842    struct { int i; int j; };
4843    struct { int k; long int l; } w;
4844  };
4845  int m;
4846} v1;
4847
4848int
4849main ()
4850{
4851
4852  // Check bool.
4853  _Bool success = false;
4854
4855  // Check restrict.
4856  if (test_restrict ("String literal") == 0)
4857    success = true;
4858  char *restrict newvar = "Another string";
4859
4860  // Check varargs.
4861  success &= test_varargs ("s, d' f .", "string", 65, 34.234);
4862  test_varargs_macros ();
4863
4864  // Check flexible array members.
4865  struct incomplete_array *ia =
4866    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4867  ia->datasize = 10;
4868  for (int i = 0; i < ia->datasize; ++i)
4869    ia->data[i] = i * 1.234;
4870
4871  // Check named initializers.
4872  struct named_init ni = {
4873    .number = 34,
4874    .name = L"Test wide string",
4875    .average = 543.34343,
4876  };
4877
4878  ni.number = 58;
4879
4880  int dynamic_array[ni.number];
4881  dynamic_array[ni.number - 1] = 543;
4882
4883  // work around unused variable warnings
4884  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4885	  || dynamic_array[ni.number - 1] != 543);
4886
4887  v1.i = 2;
4888  v1.w.k = 5;
4889  _Static_assert ((offsetof (struct anonymous, i)
4890		   == offsetof (struct anonymous, w.k)),
4891		  "Anonymous union alignment botch");
4892
4893  ;
4894  return 0;
4895}
4896_ACEOF
4897for ac_arg in '' -std=gnu11
4898do
4899  CC="$ac_save_CC $ac_arg"
4900  if ac_fn_c_try_compile "$LINENO"; then :
4901  ac_cv_prog_cc_c11=$ac_arg
4902fi
4903rm -f core conftest.err conftest.$ac_objext
4904  test "x$ac_cv_prog_cc_c11" != "xno" && break
4905done
4906rm -f conftest.$ac_ext
4907CC=$ac_save_CC
4908
4909fi
4910# AC_CACHE_VAL
4911ac_prog_cc_stdc_options=
4912case "x$ac_cv_prog_cc_c11" in
4913  x)
4914    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4915$as_echo "none needed" >&6; } ;;
4916  xno)
4917    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4918$as_echo "unsupported" >&6; } ;;
4919  *)
4920    ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c11"
4921    CC=$CC$ac_prog_cc_stdc_options
4922    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
4923$as_echo "$ac_cv_prog_cc_c11" >&6; } ;;
4924esac
4925if test "x$ac_cv_prog_cc_c11" != xno; then :
4926  ac_prog_cc_stdc=c11
4927		 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
4928else
4929  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
4930$as_echo_n "checking for $CC option to enable C99 features... " >&6; }
4931if ${ac_cv_prog_cc_c99+:} false; then :
4932  $as_echo_n "(cached) " >&6
4933else
4934  ac_cv_prog_cc_c99=no
4935ac_save_CC=$CC
4936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4937/* end confdefs.h.  */
4938#include <stdarg.h>
4939#include <stdbool.h>
4940#include <stddef.h>
4941#include <stdlib.h>
4942#include <wchar.h>
4943#include <stdio.h>
4944
4945// Check varargs macros.  These examples are taken from C99 6.10.3.5.
4946#define debug(...) fprintf (stderr, __VA_ARGS__)
4947#define showlist(...) puts (#__VA_ARGS__)
4948#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4949static void
4950test_varargs_macros (void)
4951{
4952  int x = 1234;
4953  int y = 5678;
4954  debug ("Flag");
4955  debug ("X = %d\n", x);
4956  showlist (The first, second, and third items.);
4957  report (x>y, "x is %d but y is %d", x, y);
4958}
4959
4960// Check long long types.
4961#define BIG64 18446744073709551615ull
4962#define BIG32 4294967295ul
4963#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4964#if !BIG_OK
4965  your preprocessor is broken;
4966#endif
4967#if BIG_OK
4968#else
4969  your preprocessor is broken;
4970#endif
4971static long long int bignum = -9223372036854775807LL;
4972static unsigned long long int ubignum = BIG64;
4973
4974struct incomplete_array
4975{
4976  int datasize;
4977  double data[];
4978};
4979
4980struct named_init {
4981  int number;
4982  const wchar_t *name;
4983  double average;
4984};
4985
4986typedef const char *ccp;
4987
4988static inline int
4989test_restrict (ccp restrict text)
4990{
4991  // See if C++-style comments work.
4992  // Iterate through items via the restricted pointer.
4993  // Also check for declarations in for loops.
4994  for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4995    continue;
4996  return 0;
4997}
4998
4999// Check varargs and va_copy.
5000static bool
5001test_varargs (const char *format, ...)
5002{
5003  va_list args;
5004  va_start (args, format);
5005  va_list args_copy;
5006  va_copy (args_copy, args);
5007
5008  const char *str = "";
5009  int number = 0;
5010  float fnumber = 0;
5011
5012  while (*format)
5013    {
5014      switch (*format++)
5015	{
5016	case 's': // string
5017	  str = va_arg (args_copy, const char *);
5018	  break;
5019	case 'd': // int
5020	  number = va_arg (args_copy, int);
5021	  break;
5022	case 'f': // float
5023	  fnumber = va_arg (args_copy, double);
5024	  break;
5025	default:
5026	  break;
5027	}
5028    }
5029  va_end (args_copy);
5030  va_end (args);
5031
5032  return *str && number && fnumber;
5033}
5034int
5035main ()
5036{
5037
5038  // Check bool.
5039  _Bool success = false;
5040
5041  // Check restrict.
5042  if (test_restrict ("String literal") == 0)
5043    success = true;
5044  char *restrict newvar = "Another string";
5045
5046  // Check varargs.
5047  success &= test_varargs ("s, d' f .", "string", 65, 34.234);
5048  test_varargs_macros ();
5049
5050  // Check flexible array members.
5051  struct incomplete_array *ia =
5052    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5053  ia->datasize = 10;
5054  for (int i = 0; i < ia->datasize; ++i)
5055    ia->data[i] = i * 1.234;
5056
5057  // Check named initializers.
5058  struct named_init ni = {
5059    .number = 34,
5060    .name = L"Test wide string",
5061    .average = 543.34343,
5062  };
5063
5064  ni.number = 58;
5065
5066  int dynamic_array[ni.number];
5067  dynamic_array[ni.number - 1] = 543;
5068
5069  // work around unused variable warnings
5070  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5071	  || dynamic_array[ni.number - 1] != 543);
5072
5073  ;
5074  return 0;
5075}
5076_ACEOF
5077for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99
5078do
5079  CC="$ac_save_CC $ac_arg"
5080  if ac_fn_c_try_compile "$LINENO"; then :
5081  ac_cv_prog_cc_c99=$ac_arg
5082fi
5083rm -f core conftest.err conftest.$ac_objext
5084  test "x$ac_cv_prog_cc_c99" != "xno" && break
5085done
5086rm -f conftest.$ac_ext
5087CC=$ac_save_CC
5088
5089fi
5090# AC_CACHE_VAL
5091ac_prog_cc_stdc_options=
5092case "x$ac_cv_prog_cc_c99" in
5093  x)
5094    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5095$as_echo "none needed" >&6; } ;;
5096  xno)
5097    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5098$as_echo "unsupported" >&6; } ;;
5099  *)
5100    ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c99"
5101    CC=$CC$ac_prog_cc_stdc_options
5102    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5103$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
5104esac
5105if test "x$ac_cv_prog_cc_c99" != xno; then :
5106  ac_prog_cc_stdc=c99
5107		    ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5108else
5109  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
5110$as_echo_n "checking for $CC option to enable C89 features... " >&6; }
5111if ${ac_cv_prog_cc_c89+:} false; then :
5112  $as_echo_n "(cached) " >&6
5113else
5114  ac_cv_prog_cc_c89=no
5115ac_save_CC=$CC
5116cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5117/* end confdefs.h.  */
5118#include <stdarg.h>
5119#include <stdio.h>
5120struct stat;
5121/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5122struct buf { int x; };
5123FILE * (*rcsopen) (struct buf *, struct stat *, int);
5124static char *e (p, i)
5125     char **p;
5126     int i;
5127{
5128  return p[i];
5129}
5130static char *f (char * (*g) (char **, int), char **p, ...)
5131{
5132  char *s;
5133  va_list v;
5134  va_start (v,p);
5135  s = g (p, va_arg (v,int));
5136  va_end (v);
5137  return s;
5138}
5139
5140/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5141   function prototypes and stuff, but not '\xHH' hex character constants.
5142   These don't provoke an error unfortunately, instead are silently treated
5143   as 'x'.  The following induces an error, until -std is added to get
5144   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5145   array size at least.  It's necessary to write '\x00'==0 to get something
5146   that's true only with -std.  */
5147int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5148
5149/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5150   inside strings and character constants.  */
5151#define FOO(x) 'x'
5152int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5153
5154int test (int i, double x);
5155struct s1 {int (*f) (int a);};
5156struct s2 {int (*f) (double a);};
5157int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5158int argc;
5159char **argv;
5160int
5161main ()
5162{
5163return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5164  ;
5165  return 0;
5166}
5167_ACEOF
5168for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5169	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5170do
5171  CC="$ac_save_CC $ac_arg"
5172  if ac_fn_c_try_compile "$LINENO"; then :
5173  ac_cv_prog_cc_c89=$ac_arg
5174fi
5175rm -f core conftest.err conftest.$ac_objext
5176  test "x$ac_cv_prog_cc_c89" != "xno" && break
5177done
5178rm -f conftest.$ac_ext
5179CC=$ac_save_CC
5180
5181fi
5182# AC_CACHE_VAL
5183ac_prog_cc_stdc_options=
5184case "x$ac_cv_prog_cc_c89" in
5185  x)
5186    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5187$as_echo "none needed" >&6; } ;;
5188  xno)
5189    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5190$as_echo "unsupported" >&6; } ;;
5191  *)
5192    ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c89"
5193    CC=$CC$ac_prog_cc_stdc_options
5194    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5195$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5196esac
5197if test "x$ac_cv_prog_cc_c89" != xno; then :
5198  ac_prog_cc_stdc=c89
5199		       ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5200else
5201  ac_prog_cc_stdc=no
5202		       ac_cv_prog_cc_stdc=no
5203fi
5204
5205fi
5206
5207fi
5208
5209ac_ext=c
5210ac_cpp='$CPP $CPPFLAGS'
5211ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5212ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5213ac_compiler_gnu=$ac_cv_c_compiler_gnu
5214
5215
5216  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
5217$as_echo_n "checking whether the compiler is clang... " >&6; }
5218if ${gl_cv_compiler_clang+:} false; then :
5219  $as_echo_n "(cached) " >&6
5220else
5221                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5222/* end confdefs.h.  */
5223
5224           #ifdef __clang__
5225           barfbarf
5226           #endif
5227
5228int
5229main ()
5230{
5231
5232  ;
5233  return 0;
5234}
5235
5236_ACEOF
5237if ac_fn_c_try_compile "$LINENO"; then :
5238  gl_cv_compiler_clang=no
5239else
5240  gl_cv_compiler_clang=yes
5241fi
5242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5243
5244fi
5245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_clang" >&5
5246$as_echo "$gl_cv_compiler_clang" >&6; }
5247
5248
5249  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option needed when checking for declarations" >&5
5250$as_echo_n "checking for compiler option needed when checking for declarations... " >&6; }
5251if ${gl_cv_compiler_check_decl_option+:} false; then :
5252  $as_echo_n "(cached) " >&6
5253else
5254  if test $gl_cv_compiler_clang = yes; then
5255                     save_ac_compile="$ac_compile"
5256       ac_compile="$ac_compile -Werror=implicit-function-declaration"
5257                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5258/* end confdefs.h.  */
5259
5260int
5261main ()
5262{
5263
5264  ;
5265  return 0;
5266}
5267_ACEOF
5268if ac_fn_c_try_compile "$LINENO"; then :
5269  gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'
5270else
5271  gl_cv_compiler_check_decl_option=none
5272fi
5273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5274       ac_compile="$save_ac_compile"
5275     else
5276       gl_cv_compiler_check_decl_option=none
5277     fi
5278
5279fi
5280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_check_decl_option" >&5
5281$as_echo "$gl_cv_compiler_check_decl_option" >&6; }
5282  if test "x$gl_cv_compiler_check_decl_option" != xnone; then
5283    ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option"
5284  else
5285    ac_compile_for_check_decl="$ac_compile"
5286  fi
5287
5288
5289
5290
5291ac_ext=c
5292ac_cpp='$CPP $CPPFLAGS'
5293ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5294ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5295ac_compiler_gnu=$ac_cv_c_compiler_gnu
5296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5297$as_echo_n "checking how to run the C preprocessor... " >&6; }
5298# On Suns, sometimes $CPP names a directory.
5299if test -n "$CPP" && test -d "$CPP"; then
5300  CPP=
5301fi
5302if test -z "$CPP"; then
5303  if ${ac_cv_prog_CPP+:} false; then :
5304  $as_echo_n "(cached) " >&6
5305else
5306      # Double quotes because CPP needs to be expanded
5307    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5308    do
5309      ac_preproc_ok=false
5310for ac_c_preproc_warn_flag in '' yes
5311do
5312  # Use a header file that comes with gcc, so configuring glibc
5313  # with a fresh cross-compiler works.
5314  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5315  # <limits.h> exists even on freestanding compilers.
5316  # On the NeXT, cc -E runs the code through the compiler's parser,
5317  # not just through cpp. "Syntax error" is here to catch this case.
5318  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5319/* end confdefs.h.  */
5320#ifdef __STDC__
5321# include <limits.h>
5322#else
5323# include <assert.h>
5324#endif
5325		     Syntax error
5326_ACEOF
5327if ac_fn_c_try_cpp "$LINENO"; then :
5328
5329else
5330  # Broken: fails on valid input.
5331continue
5332fi
5333rm -f conftest.err conftest.i conftest.$ac_ext
5334
5335  # OK, works on sane cases.  Now check whether nonexistent headers
5336  # can be detected and how.
5337  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5338/* end confdefs.h.  */
5339#include <ac_nonexistent.h>
5340_ACEOF
5341if ac_fn_c_try_cpp "$LINENO"; then :
5342  # Broken: success on invalid input.
5343continue
5344else
5345  # Passes both tests.
5346ac_preproc_ok=:
5347break
5348fi
5349rm -f conftest.err conftest.i conftest.$ac_ext
5350
5351done
5352# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5353rm -f conftest.i conftest.err conftest.$ac_ext
5354if $ac_preproc_ok; then :
5355  break
5356fi
5357
5358    done
5359    ac_cv_prog_CPP=$CPP
5360
5361fi
5362  CPP=$ac_cv_prog_CPP
5363else
5364  ac_cv_prog_CPP=$CPP
5365fi
5366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5367$as_echo "$CPP" >&6; }
5368ac_preproc_ok=false
5369for ac_c_preproc_warn_flag in '' yes
5370do
5371  # Use a header file that comes with gcc, so configuring glibc
5372  # with a fresh cross-compiler works.
5373  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5374  # <limits.h> exists even on freestanding compilers.
5375  # On the NeXT, cc -E runs the code through the compiler's parser,
5376  # not just through cpp. "Syntax error" is here to catch this case.
5377  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5378/* end confdefs.h.  */
5379#ifdef __STDC__
5380# include <limits.h>
5381#else
5382# include <assert.h>
5383#endif
5384		     Syntax error
5385_ACEOF
5386if ac_fn_c_try_cpp "$LINENO"; then :
5387
5388else
5389  # Broken: fails on valid input.
5390continue
5391fi
5392rm -f conftest.err conftest.i conftest.$ac_ext
5393
5394  # OK, works on sane cases.  Now check whether nonexistent headers
5395  # can be detected and how.
5396  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5397/* end confdefs.h.  */
5398#include <ac_nonexistent.h>
5399_ACEOF
5400if ac_fn_c_try_cpp "$LINENO"; then :
5401  # Broken: success on invalid input.
5402continue
5403else
5404  # Passes both tests.
5405ac_preproc_ok=:
5406break
5407fi
5408rm -f conftest.err conftest.i conftest.$ac_ext
5409
5410done
5411# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5412rm -f conftest.i conftest.err conftest.$ac_ext
5413if $ac_preproc_ok; then :
5414
5415else
5416  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5417$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5418as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5419See \`config.log' for more details" "$LINENO" 5; }
5420fi
5421
5422ac_ext=c
5423ac_cpp='$CPP $CPPFLAGS'
5424ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5425ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5426ac_compiler_gnu=$ac_cv_c_compiler_gnu
5427
5428
5429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5430$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5431if ${ac_cv_path_GREP+:} false; then :
5432  $as_echo_n "(cached) " >&6
5433else
5434  if test -z "$GREP"; then
5435  ac_path_GREP_found=false
5436  # Loop through the user's path and test for each of PROGNAME-LIST
5437  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5438for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5439do
5440  IFS=$as_save_IFS
5441  test -z "$as_dir" && as_dir=.
5442    for ac_prog in grep ggrep; do
5443    for ac_exec_ext in '' $ac_executable_extensions; do
5444      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5445      as_fn_executable_p "$ac_path_GREP" || continue
5446# Check for GNU ac_path_GREP and select it if it is found.
5447  # Check for GNU $ac_path_GREP
5448case `"$ac_path_GREP" --version 2>&1` in
5449*GNU*)
5450  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5451*)
5452  ac_count=0
5453  $as_echo_n 0123456789 >"conftest.in"
5454  while :
5455  do
5456    cat "conftest.in" "conftest.in" >"conftest.tmp"
5457    mv "conftest.tmp" "conftest.in"
5458    cp "conftest.in" "conftest.nl"
5459    $as_echo 'GREP' >> "conftest.nl"
5460    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5461    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5462    as_fn_arith $ac_count + 1 && ac_count=$as_val
5463    if test $ac_count -gt ${ac_path_GREP_max-0}; then
5464      # Best one so far, save it but keep looking for a better one
5465      ac_cv_path_GREP="$ac_path_GREP"
5466      ac_path_GREP_max=$ac_count
5467    fi
5468    # 10*(2^10) chars as input seems more than enough
5469    test $ac_count -gt 10 && break
5470  done
5471  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5472esac
5473
5474      $ac_path_GREP_found && break 3
5475    done
5476  done
5477  done
5478IFS=$as_save_IFS
5479  if test -z "$ac_cv_path_GREP"; then
5480    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5481  fi
5482else
5483  ac_cv_path_GREP=$GREP
5484fi
5485
5486fi
5487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5488$as_echo "$ac_cv_path_GREP" >&6; }
5489 GREP="$ac_cv_path_GREP"
5490
5491
5492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5493$as_echo_n "checking for egrep... " >&6; }
5494if ${ac_cv_path_EGREP+:} false; then :
5495  $as_echo_n "(cached) " >&6
5496else
5497  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5498   then ac_cv_path_EGREP="$GREP -E"
5499   else
5500     if test -z "$EGREP"; then
5501  ac_path_EGREP_found=false
5502  # Loop through the user's path and test for each of PROGNAME-LIST
5503  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5504for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5505do
5506  IFS=$as_save_IFS
5507  test -z "$as_dir" && as_dir=.
5508    for ac_prog in egrep; do
5509    for ac_exec_ext in '' $ac_executable_extensions; do
5510      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5511      as_fn_executable_p "$ac_path_EGREP" || continue
5512# Check for GNU ac_path_EGREP and select it if it is found.
5513  # Check for GNU $ac_path_EGREP
5514case `"$ac_path_EGREP" --version 2>&1` in
5515*GNU*)
5516  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5517*)
5518  ac_count=0
5519  $as_echo_n 0123456789 >"conftest.in"
5520  while :
5521  do
5522    cat "conftest.in" "conftest.in" >"conftest.tmp"
5523    mv "conftest.tmp" "conftest.in"
5524    cp "conftest.in" "conftest.nl"
5525    $as_echo 'EGREP' >> "conftest.nl"
5526    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5527    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5528    as_fn_arith $ac_count + 1 && ac_count=$as_val
5529    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5530      # Best one so far, save it but keep looking for a better one
5531      ac_cv_path_EGREP="$ac_path_EGREP"
5532      ac_path_EGREP_max=$ac_count
5533    fi
5534    # 10*(2^10) chars as input seems more than enough
5535    test $ac_count -gt 10 && break
5536  done
5537  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5538esac
5539
5540      $ac_path_EGREP_found && break 3
5541    done
5542  done
5543  done
5544IFS=$as_save_IFS
5545  if test -z "$ac_cv_path_EGREP"; then
5546    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5547  fi
5548else
5549  ac_cv_path_EGREP=$EGREP
5550fi
5551
5552   fi
5553fi
5554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5555$as_echo "$ac_cv_path_EGREP" >&6; }
5556 EGREP="$ac_cv_path_EGREP"
5557
5558
5559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5560$as_echo_n "checking for ANSI C header files... " >&6; }
5561if ${ac_cv_header_stdc+:} false; then :
5562  $as_echo_n "(cached) " >&6
5563else
5564  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5565/* end confdefs.h.  */
5566#include <stdlib.h>
5567#include <stdarg.h>
5568#include <string.h>
5569#include <float.h>
5570
5571int
5572main ()
5573{
5574
5575  ;
5576  return 0;
5577}
5578_ACEOF
5579if ac_fn_c_try_compile "$LINENO"; then :
5580  ac_cv_header_stdc=yes
5581else
5582  ac_cv_header_stdc=no
5583fi
5584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5585
5586if test $ac_cv_header_stdc = yes; then
5587  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5588  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5589/* end confdefs.h.  */
5590#include <string.h>
5591
5592_ACEOF
5593if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5594  $EGREP "memchr" >/dev/null 2>&1; then :
5595
5596else
5597  ac_cv_header_stdc=no
5598fi
5599rm -f conftest*
5600
5601fi
5602
5603if test $ac_cv_header_stdc = yes; then
5604  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5605  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5606/* end confdefs.h.  */
5607#include <stdlib.h>
5608
5609_ACEOF
5610if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5611  $EGREP "free" >/dev/null 2>&1; then :
5612
5613else
5614  ac_cv_header_stdc=no
5615fi
5616rm -f conftest*
5617
5618fi
5619
5620if test $ac_cv_header_stdc = yes; then
5621  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5622  if test "$cross_compiling" = yes; then :
5623  :
5624else
5625  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5626/* end confdefs.h.  */
5627#include <ctype.h>
5628#include <stdlib.h>
5629#if ((' ' & 0x0FF) == 0x020)
5630# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5631# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5632#else
5633# define ISLOWER(c) \
5634		   (('a' <= (c) && (c) <= 'i') \
5635		     || ('j' <= (c) && (c) <= 'r') \
5636		     || ('s' <= (c) && (c) <= 'z'))
5637# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5638#endif
5639
5640#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5641int
5642main ()
5643{
5644  int i;
5645  for (i = 0; i < 256; i++)
5646    if (XOR (islower (i), ISLOWER (i))
5647	|| toupper (i) != TOUPPER (i))
5648      return 2;
5649  return 0;
5650}
5651_ACEOF
5652if ac_fn_c_try_run "$LINENO"; then :
5653
5654else
5655  ac_cv_header_stdc=no
5656fi
5657rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5658  conftest.$ac_objext conftest.beam conftest.$ac_ext
5659fi
5660
5661fi
5662fi
5663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5664$as_echo "$ac_cv_header_stdc" >&6; }
5665if test $ac_cv_header_stdc = yes; then
5666
5667$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5668
5669fi
5670
5671# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5672for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5673		  inttypes.h stdint.h unistd.h
5674do :
5675  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5676ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5677"
5678if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5679  cat >>confdefs.h <<_ACEOF
5680#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5681_ACEOF
5682
5683fi
5684
5685done
5686
5687
5688
5689
5690
5691  for ac_header in $ac_header_list
5692do :
5693  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5694ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5695"
5696if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5697  cat >>confdefs.h <<_ACEOF
5698#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5699_ACEOF
5700
5701fi
5702
5703done
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5714$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5715if ${ac_cv_safe_to_define___extensions__+:} false; then :
5716  $as_echo_n "(cached) " >&6
5717else
5718  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5719/* end confdefs.h.  */
5720
5721#         define __EXTENSIONS__ 1
5722          $ac_includes_default
5723int
5724main ()
5725{
5726
5727  ;
5728  return 0;
5729}
5730_ACEOF
5731if ac_fn_c_try_compile "$LINENO"; then :
5732  ac_cv_safe_to_define___extensions__=yes
5733else
5734  ac_cv_safe_to_define___extensions__=no
5735fi
5736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5737fi
5738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5739$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5740
5741  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
5742$as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
5743if ${ac_cv_should_define__xopen_source+:} false; then :
5744  $as_echo_n "(cached) " >&6
5745else
5746  ac_cv_should_define__xopen_source=no
5747    if test $ac_cv_header_wchar_h = yes; then :
5748  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5749/* end confdefs.h.  */
5750
5751          #include <wchar.h>
5752          mbstate_t x;
5753int
5754main ()
5755{
5756
5757  ;
5758  return 0;
5759}
5760_ACEOF
5761if ac_fn_c_try_compile "$LINENO"; then :
5762
5763else
5764  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5765/* end confdefs.h.  */
5766
5767            #define _XOPEN_SOURCE 500
5768            #include <wchar.h>
5769            mbstate_t x;
5770int
5771main ()
5772{
5773
5774  ;
5775  return 0;
5776}
5777_ACEOF
5778if ac_fn_c_try_compile "$LINENO"; then :
5779  ac_cv_should_define__xopen_source=yes
5780fi
5781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5782fi
5783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5784fi
5785fi
5786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
5787$as_echo "$ac_cv_should_define__xopen_source" >&6; }
5788
5789  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5790
5791  $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
5792
5793  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5794
5795  $as_echo "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
5796
5797  $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
5798
5799  $as_echo "#define _OPENBSD_SOURCE 1" >>confdefs.h
5800
5801  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5802
5803  $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
5804
5805  $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
5806
5807  $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
5808
5809  $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
5810
5811  $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
5812
5813  $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
5814
5815  $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
5816
5817  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5818
5819  if test $ac_cv_header_minix_config_h = yes; then :
5820  MINIX=yes
5821    $as_echo "#define _MINIX 1" >>confdefs.h
5822
5823    $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5824
5825    $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5826
5827else
5828  MINIX=
5829fi
5830  if test $ac_cv_safe_to_define___extensions__ = yes; then :
5831  $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5832
5833fi
5834  if test $ac_cv_should_define__xopen_source = yes; then :
5835  $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
5836
5837fi
5838
5839# Needs to run before gl_EARLY so it can override AC_SYS_LARGEFILE included
5840# there.
5841ac_aux_dir=
5842for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
5843  if test -f "$ac_dir/install-sh"; then
5844    ac_aux_dir=$ac_dir
5845    ac_install_sh="$ac_aux_dir/install-sh -c"
5846    break
5847  elif test -f "$ac_dir/install.sh"; then
5848    ac_aux_dir=$ac_dir
5849    ac_install_sh="$ac_aux_dir/install.sh -c"
5850    break
5851  elif test -f "$ac_dir/shtool"; then
5852    ac_aux_dir=$ac_dir
5853    ac_install_sh="$ac_aux_dir/shtool install -c"
5854    break
5855  fi
5856done
5857if test -z "$ac_aux_dir"; then
5858  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
5859fi
5860
5861# These three variables are undocumented and unsupported,
5862# and are intended to be withdrawn in a future Autoconf release.
5863# They can cause serious problems if a builder's source tree is in a directory
5864# whose full name contains unusual characters.
5865ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
5866ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
5867ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
5868
5869
5870# Make sure we can run config.sub.
5871$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
5872  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
5873
5874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
5875$as_echo_n "checking build system type... " >&6; }
5876if ${ac_cv_build+:} false; then :
5877  $as_echo_n "(cached) " >&6
5878else
5879  ac_build_alias=$build_alias
5880test "x$ac_build_alias" = x &&
5881  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
5882test "x$ac_build_alias" = x &&
5883  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
5884ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
5885  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
5886
5887fi
5888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5889$as_echo "$ac_cv_build" >&6; }
5890case $ac_cv_build in
5891*-*-*) ;;
5892*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
5893esac
5894build=$ac_cv_build
5895ac_save_IFS=$IFS; IFS='-'
5896set x $ac_cv_build
5897shift
5898build_cpu=$1
5899build_vendor=$2
5900shift; shift
5901# Remember, the first character of IFS is used to create $*,
5902# except with old shells:
5903build_os=$*
5904IFS=$ac_save_IFS
5905case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5906
5907
5908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5909$as_echo_n "checking host system type... " >&6; }
5910if ${ac_cv_host+:} false; then :
5911  $as_echo_n "(cached) " >&6
5912else
5913  if test "x$host_alias" = x; then
5914  ac_cv_host=$ac_cv_build
5915else
5916  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
5917    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
5918fi
5919
5920fi
5921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5922$as_echo "$ac_cv_host" >&6; }
5923case $ac_cv_host in
5924*-*-*) ;;
5925*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
5926esac
5927host=$ac_cv_host
5928ac_save_IFS=$IFS; IFS='-'
5929set x $ac_cv_host
5930shift
5931host_cpu=$1
5932host_vendor=$2
5933shift; shift
5934# Remember, the first character of IFS is used to create $*,
5935# except with old shells:
5936host_os=$*
5937IFS=$ac_save_IFS
5938case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5939
5940
5941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
5942$as_echo_n "checking target system type... " >&6; }
5943if ${ac_cv_target+:} false; then :
5944  $as_echo_n "(cached) " >&6
5945else
5946  if test "x$target_alias" = x; then
5947  ac_cv_target=$ac_cv_host
5948else
5949  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
5950    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
5951fi
5952
5953fi
5954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
5955$as_echo "$ac_cv_target" >&6; }
5956case $ac_cv_target in
5957*-*-*) ;;
5958*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
5959esac
5960target=$ac_cv_target
5961ac_save_IFS=$IFS; IFS='-'
5962set x $ac_cv_target
5963shift
5964target_cpu=$1
5965target_vendor=$2
5966shift; shift
5967# Remember, the first character of IFS is used to create $*,
5968# except with old shells:
5969target_os=$*
5970IFS=$ac_save_IFS
5971case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
5972
5973
5974# The aliases save the names the user supplied, while $host etc.
5975# will get canonicalized.
5976test -n "$target_alias" &&
5977  test "$program_prefix$program_suffix$program_transform_name" = \
5978    NONENONEs,x,x, &&
5979  program_prefix=${target_alias}-
5980
5981# The tests for host and target for $enable_largefile require
5982# canonical names.
5983
5984
5985
5986# As the $enable_largefile decision depends on --enable-plugins we must set it
5987# even in directories otherwise not depending on the $plugins option.
5988
5989
5990  maybe_plugins=no
5991  for ac_header in dlfcn.h
5992do :
5993  ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
5994"
5995if test "x$ac_cv_header_dlfcn_h" = xyes; then :
5996  cat >>confdefs.h <<_ACEOF
5997#define HAVE_DLFCN_H 1
5998_ACEOF
5999 maybe_plugins=yes
6000fi
6001
6002done
6003
6004  for ac_header in windows.h
6005do :
6006  ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
6007"
6008if test "x$ac_cv_header_windows_h" = xyes; then :
6009  cat >>confdefs.h <<_ACEOF
6010#define HAVE_WINDOWS_H 1
6011_ACEOF
6012 maybe_plugins=yes
6013fi
6014
6015done
6016
6017
6018  # Check whether --enable-plugins was given.
6019if test "${enable_plugins+set}" = set; then :
6020  enableval=$enable_plugins; case "${enableval}" in
6021      no) plugins=no ;;
6022      *) plugins=yes
6023         if test "$maybe_plugins" != "yes" ; then
6024	   as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
6025	 fi ;;
6026     esac
6027else
6028  plugins=$maybe_plugins
6029
6030fi
6031
6032  if test "$plugins" = "yes"; then
6033    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
6034$as_echo_n "checking for library containing dlsym... " >&6; }
6035if ${ac_cv_search_dlsym+:} false; then :
6036  $as_echo_n "(cached) " >&6
6037else
6038  ac_func_search_save_LIBS=$LIBS
6039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6040/* end confdefs.h.  */
6041
6042/* Override any GCC internal prototype to avoid an error.
6043   Use char because int might match the return type of a GCC
6044   builtin and then its argument prototype would still apply.  */
6045#ifdef __cplusplus
6046extern "C"
6047#endif
6048char dlsym ();
6049int
6050main ()
6051{
6052return dlsym ();
6053  ;
6054  return 0;
6055}
6056_ACEOF
6057for ac_lib in '' dl; do
6058  if test -z "$ac_lib"; then
6059    ac_res="none required"
6060  else
6061    ac_res=-l$ac_lib
6062    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6063  fi
6064  if ac_fn_c_try_link "$LINENO"; then :
6065  ac_cv_search_dlsym=$ac_res
6066fi
6067rm -f core conftest.err conftest.$ac_objext \
6068    conftest$ac_exeext
6069  if ${ac_cv_search_dlsym+:} false; then :
6070  break
6071fi
6072done
6073if ${ac_cv_search_dlsym+:} false; then :
6074
6075else
6076  ac_cv_search_dlsym=no
6077fi
6078rm conftest.$ac_ext
6079LIBS=$ac_func_search_save_LIBS
6080fi
6081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
6082$as_echo "$ac_cv_search_dlsym" >&6; }
6083ac_res=$ac_cv_search_dlsym
6084if test "$ac_res" != no; then :
6085  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6086
6087fi
6088
6089  fi
6090
6091
6092case "${host}" in
6093  sparc-*-solaris*|i?86-*-solaris*)
6094    # On native 32-bit Solaris/SPARC and x86, large-file and procfs support
6095    # were mutually exclusive until Solaris 11.3.  Without procfs support,
6096    # the bfd/ elf module cannot provide certain routines such as
6097    # elfcore_write_prpsinfo or elfcore_write_prstatus.  So unless the user
6098    # explicitly requested large-file support through the
6099    # --enable-largefile switch, disable large-file support in favor of
6100    # procfs support.
6101    #
6102    # Check if <sys/procfs.h> is incompatible with large-file support.
6103    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6104/* end confdefs.h.  */
6105#define _FILE_OFFSET_BITS 64
6106#define _STRUCTURED_PROC 1
6107#include <sys/procfs.h>
6108int
6109main ()
6110{
6111
6112  ;
6113  return 0;
6114}
6115_ACEOF
6116if ac_fn_c_try_compile "$LINENO"; then :
6117  acx_cv_procfs_lfs=yes
6118else
6119  acx_cv_procfs_lfs=no
6120fi
6121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6122    #
6123    # Forcefully disable large-file support only if necessary, gdb is in
6124    # tree and enabled.
6125    if test "${target}" = "${host}" -a "$acx_cv_procfs_lfs" = no \
6126         -a -d $srcdir/../gdb -a "$enable_gdb" != no; then
6127      : ${enable_largefile="no"}
6128      if test "$plugins" = yes; then
6129	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
6130plugin support disabled; require large-file support which is incompatible with GDB." >&5
6131$as_echo "$as_me: WARNING:
6132plugin support disabled; require large-file support which is incompatible with GDB." >&2;}
6133	plugins=no
6134      fi
6135    fi
6136    #
6137    # Explicitly undef _FILE_OFFSET_BITS if enable_largefile=no for the
6138    # benefit of g++ 9+ which predefines it on Solaris.
6139    if test "$enable_largefile" = no; then
6140      LARGEFILE_CPPFLAGS="-U_FILE_OFFSET_BITS"
6141
6142    fi
6143    ;;
6144esac
6145
6146# Check whether --enable-largefile was given.
6147if test "${enable_largefile+set}" = set; then :
6148  enableval=$enable_largefile;
6149fi
6150
6151if test "$enable_largefile" != no; then
6152
6153  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6154$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6155if ${ac_cv_sys_largefile_CC+:} false; then :
6156  $as_echo_n "(cached) " >&6
6157else
6158  ac_cv_sys_largefile_CC=no
6159     if test "$GCC" != yes; then
6160       ac_save_CC=$CC
6161       while :; do
6162         # IRIX 6.2 and later do not support large files by default,
6163         # so use the C compiler's -n32 option if that helps.
6164         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6165/* end confdefs.h.  */
6166#include <sys/types.h>
6167 /* Check that off_t can represent 2**63 - 1 correctly.
6168    We can't simply define LARGE_OFF_T to be 9223372036854775807,
6169    since some C++ compilers masquerading as C compilers
6170    incorrectly reject 9223372036854775807.  */
6171#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6172  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6173                       && LARGE_OFF_T % 2147483647 == 1)
6174                      ? 1 : -1];
6175int
6176main ()
6177{
6178
6179  ;
6180  return 0;
6181}
6182_ACEOF
6183         if ac_fn_c_try_compile "$LINENO"; then :
6184  break
6185fi
6186rm -f core conftest.err conftest.$ac_objext
6187         CC="$CC -n32"
6188         if ac_fn_c_try_compile "$LINENO"; then :
6189  ac_cv_sys_largefile_CC=' -n32'; break
6190fi
6191rm -f core conftest.err conftest.$ac_objext
6192         break
6193       done
6194       CC=$ac_save_CC
6195       rm -f conftest.$ac_ext
6196    fi
6197fi
6198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6199$as_echo "$ac_cv_sys_largefile_CC" >&6; }
6200  if test "$ac_cv_sys_largefile_CC" != no; then
6201    CC=$CC$ac_cv_sys_largefile_CC
6202  fi
6203
6204  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6205$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6206if ${ac_cv_sys_file_offset_bits+:} false; then :
6207  $as_echo_n "(cached) " >&6
6208else
6209  while :; do
6210  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6211/* end confdefs.h.  */
6212#include <sys/types.h>
6213 /* Check that off_t can represent 2**63 - 1 correctly.
6214    We can't simply define LARGE_OFF_T to be 9223372036854775807,
6215    since some C++ compilers masquerading as C compilers
6216    incorrectly reject 9223372036854775807.  */
6217#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6218  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6219                       && LARGE_OFF_T % 2147483647 == 1)
6220                      ? 1 : -1];
6221int
6222main ()
6223{
6224
6225  ;
6226  return 0;
6227}
6228_ACEOF
6229if ac_fn_c_try_compile "$LINENO"; then :
6230  ac_cv_sys_file_offset_bits=no; break
6231fi
6232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6233  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6234/* end confdefs.h.  */
6235#define _FILE_OFFSET_BITS 64
6236#include <sys/types.h>
6237 /* Check that off_t can represent 2**63 - 1 correctly.
6238    We can't simply define LARGE_OFF_T to be 9223372036854775807,
6239    since some C++ compilers masquerading as C compilers
6240    incorrectly reject 9223372036854775807.  */
6241#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6242  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6243                       && LARGE_OFF_T % 2147483647 == 1)
6244                      ? 1 : -1];
6245int
6246main ()
6247{
6248
6249  ;
6250  return 0;
6251}
6252_ACEOF
6253if ac_fn_c_try_compile "$LINENO"; then :
6254  ac_cv_sys_file_offset_bits=64; break
6255fi
6256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6257  ac_cv_sys_file_offset_bits=unknown
6258  break
6259done
6260fi
6261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6262$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6263case $ac_cv_sys_file_offset_bits in #(
6264  no | unknown) ;;
6265  *)
6266cat >>confdefs.h <<_ACEOF
6267#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6268_ACEOF
6269;;
6270esac
6271rm -rf conftest*
6272  if test $ac_cv_sys_file_offset_bits = unknown; then
6273    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6274$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6275if ${ac_cv_sys_large_files+:} false; then :
6276  $as_echo_n "(cached) " >&6
6277else
6278  while :; do
6279  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6280/* end confdefs.h.  */
6281#include <sys/types.h>
6282 /* Check that off_t can represent 2**63 - 1 correctly.
6283    We can't simply define LARGE_OFF_T to be 9223372036854775807,
6284    since some C++ compilers masquerading as C compilers
6285    incorrectly reject 9223372036854775807.  */
6286#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6287  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6288                       && LARGE_OFF_T % 2147483647 == 1)
6289                      ? 1 : -1];
6290int
6291main ()
6292{
6293
6294  ;
6295  return 0;
6296}
6297_ACEOF
6298if ac_fn_c_try_compile "$LINENO"; then :
6299  ac_cv_sys_large_files=no; break
6300fi
6301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6302  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6303/* end confdefs.h.  */
6304#define _LARGE_FILES 1
6305#include <sys/types.h>
6306 /* Check that off_t can represent 2**63 - 1 correctly.
6307    We can't simply define LARGE_OFF_T to be 9223372036854775807,
6308    since some C++ compilers masquerading as C compilers
6309    incorrectly reject 9223372036854775807.  */
6310#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6311  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6312                       && LARGE_OFF_T % 2147483647 == 1)
6313                      ? 1 : -1];
6314int
6315main ()
6316{
6317
6318  ;
6319  return 0;
6320}
6321_ACEOF
6322if ac_fn_c_try_compile "$LINENO"; then :
6323  ac_cv_sys_large_files=1; break
6324fi
6325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6326  ac_cv_sys_large_files=unknown
6327  break
6328done
6329fi
6330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6331$as_echo "$ac_cv_sys_large_files" >&6; }
6332case $ac_cv_sys_large_files in #(
6333  no | unknown) ;;
6334  *)
6335cat >>confdefs.h <<_ACEOF
6336#define _LARGE_FILES $ac_cv_sys_large_files
6337_ACEOF
6338;;
6339esac
6340rm -rf conftest*
6341  fi
6342fi
6343
6344
6345
6346
6347
6348
6349  case "$host_os" in
6350    openbsd*)
6351
6352$as_echo "#define _ISOC11_SOURCE 1" >>confdefs.h
6353
6354      ;;
6355  esac
6356
6357
6358
6359
6360  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6361$as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
6362if ${gl_cv_c_amsterdam_compiler+:} false; then :
6363  $as_echo_n "(cached) " >&6
6364else
6365
6366      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6367/* end confdefs.h.  */
6368
6369#ifdef __ACK__
6370Amsterdam
6371#endif
6372
6373_ACEOF
6374if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6375  $EGREP "Amsterdam" >/dev/null 2>&1; then :
6376  gl_cv_c_amsterdam_compiler=yes
6377else
6378  gl_cv_c_amsterdam_compiler=no
6379fi
6380rm -f conftest*
6381
6382
6383fi
6384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6385$as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6386
6387      if test $gl_cv_c_amsterdam_compiler = yes; then
6388    if test -z "$AR"; then
6389      AR='cc -c.a'
6390    fi
6391    if test -z "$ARFLAGS"; then
6392      ARFLAGS='-o'
6393    fi
6394  else
6395                                                :
6396  fi
6397
6398        if test -n "$ac_tool_prefix"; then
6399  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6400set dummy ${ac_tool_prefix}ar; ac_word=$2
6401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6402$as_echo_n "checking for $ac_word... " >&6; }
6403if ${ac_cv_prog_AR+:} false; then :
6404  $as_echo_n "(cached) " >&6
6405else
6406  if test -n "$AR"; then
6407  ac_cv_prog_AR="$AR" # Let the user override the test.
6408else
6409as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6410for as_dir in $PATH
6411do
6412  IFS=$as_save_IFS
6413  test -z "$as_dir" && as_dir=.
6414    for ac_exec_ext in '' $ac_executable_extensions; do
6415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6416    ac_cv_prog_AR="${ac_tool_prefix}ar"
6417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6418    break 2
6419  fi
6420done
6421  done
6422IFS=$as_save_IFS
6423
6424fi
6425fi
6426AR=$ac_cv_prog_AR
6427if test -n "$AR"; then
6428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6429$as_echo "$AR" >&6; }
6430else
6431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6432$as_echo "no" >&6; }
6433fi
6434
6435
6436fi
6437if test -z "$ac_cv_prog_AR"; then
6438  ac_ct_AR=$AR
6439  # Extract the first word of "ar", so it can be a program name with args.
6440set dummy ar; ac_word=$2
6441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6442$as_echo_n "checking for $ac_word... " >&6; }
6443if ${ac_cv_prog_ac_ct_AR+:} false; then :
6444  $as_echo_n "(cached) " >&6
6445else
6446  if test -n "$ac_ct_AR"; then
6447  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6448else
6449as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6450for as_dir in $PATH
6451do
6452  IFS=$as_save_IFS
6453  test -z "$as_dir" && as_dir=.
6454    for ac_exec_ext in '' $ac_executable_extensions; do
6455  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6456    ac_cv_prog_ac_ct_AR="ar"
6457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6458    break 2
6459  fi
6460done
6461  done
6462IFS=$as_save_IFS
6463
6464fi
6465fi
6466ac_ct_AR=$ac_cv_prog_ac_ct_AR
6467if test -n "$ac_ct_AR"; then
6468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6469$as_echo "$ac_ct_AR" >&6; }
6470else
6471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6472$as_echo "no" >&6; }
6473fi
6474
6475  if test "x$ac_ct_AR" = x; then
6476    AR="ar"
6477  else
6478    case $cross_compiling:$ac_tool_warned in
6479yes:)
6480{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6481$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6482ac_tool_warned=yes ;;
6483esac
6484    AR=$ac_ct_AR
6485  fi
6486else
6487  AR="$ac_cv_prog_AR"
6488fi
6489
6490  if test -z "$ARFLAGS"; then
6491    ARFLAGS='cr'
6492  fi
6493
6494
6495
6496  if test -z "$RANLIB"; then
6497    if test $gl_cv_c_amsterdam_compiler = yes; then
6498      RANLIB=':'
6499    else
6500            if test -n "$ac_tool_prefix"; then
6501  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6502set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6504$as_echo_n "checking for $ac_word... " >&6; }
6505if ${ac_cv_prog_RANLIB+:} false; then :
6506  $as_echo_n "(cached) " >&6
6507else
6508  if test -n "$RANLIB"; then
6509  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6510else
6511as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6512for as_dir in $PATH
6513do
6514  IFS=$as_save_IFS
6515  test -z "$as_dir" && as_dir=.
6516    for ac_exec_ext in '' $ac_executable_extensions; do
6517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6518    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6520    break 2
6521  fi
6522done
6523  done
6524IFS=$as_save_IFS
6525
6526fi
6527fi
6528RANLIB=$ac_cv_prog_RANLIB
6529if test -n "$RANLIB"; then
6530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6531$as_echo "$RANLIB" >&6; }
6532else
6533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6534$as_echo "no" >&6; }
6535fi
6536
6537
6538fi
6539if test -z "$ac_cv_prog_RANLIB"; then
6540  ac_ct_RANLIB=$RANLIB
6541  # Extract the first word of "ranlib", so it can be a program name with args.
6542set dummy ranlib; ac_word=$2
6543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6544$as_echo_n "checking for $ac_word... " >&6; }
6545if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6546  $as_echo_n "(cached) " >&6
6547else
6548  if test -n "$ac_ct_RANLIB"; then
6549  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6550else
6551as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6552for as_dir in $PATH
6553do
6554  IFS=$as_save_IFS
6555  test -z "$as_dir" && as_dir=.
6556    for ac_exec_ext in '' $ac_executable_extensions; do
6557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6558    ac_cv_prog_ac_ct_RANLIB="ranlib"
6559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6560    break 2
6561  fi
6562done
6563  done
6564IFS=$as_save_IFS
6565
6566fi
6567fi
6568ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6569if test -n "$ac_ct_RANLIB"; then
6570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6571$as_echo "$ac_ct_RANLIB" >&6; }
6572else
6573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6574$as_echo "no" >&6; }
6575fi
6576
6577  if test "x$ac_ct_RANLIB" = x; then
6578    RANLIB=":"
6579  else
6580    case $cross_compiling:$ac_tool_warned in
6581yes:)
6582{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6583$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6584ac_tool_warned=yes ;;
6585esac
6586    RANLIB=$ac_ct_RANLIB
6587  fi
6588else
6589  RANLIB="$ac_cv_prog_RANLIB"
6590fi
6591
6592    fi
6593  fi
6594
6595
6596
6597
6598
6599
6600  # IEEE behaviour is the default on all CPUs except Alpha and SH
6601  # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
6602  # and the GCC 4.1.2 manual).
6603  case "$host_cpu" in
6604    alpha*)
6605      # On Alpha systems, a compiler option provides the behaviour.
6606      # See the ieee(3) manual page, also available at
6607      # <https://backdrift.org/man/tru64/man3/ieee.3.html>
6608      if test -n "$GCC"; then
6609        # GCC has the option -mieee.
6610        # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
6611        CPPFLAGS="$CPPFLAGS -mieee"
6612      else
6613        # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
6614        # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
6615        CPPFLAGS="$CPPFLAGS -ieee"
6616      fi
6617      ;;
6618    sh*)
6619      if test -n "$GCC"; then
6620        # GCC has the option -mieee.
6621        CPPFLAGS="$CPPFLAGS -mieee"
6622      fi
6623      ;;
6624  esac
6625
6626
6627
6628
6629
6630
6631
6632  # Check whether --enable-threads was given.
6633if test "${enable_threads+set}" = set; then :
6634  enableval=$enable_threads; gl_use_threads=$enableval
6635else
6636  if test -n "$gl_use_threads_default"; then
6637       gl_use_threads="$gl_use_threads_default"
6638     else
6639       case "$host_os" in
6640                                    osf*) gl_use_threads=no ;;
6641                                    cygwin*)
6642               case `uname -r` in
6643                 1.[0-5].*) gl_use_threads=no ;;
6644                 *)         gl_use_threads=yes ;;
6645               esac
6646               ;;
6647                  mingw*)
6648               case "$gl_use_winpthreads_default" in
6649                 yes) gl_use_threads=posix ;;
6650                 no)  gl_use_threads=windows ;;
6651                 *)   gl_use_threads=yes ;;
6652               esac
6653               ;;
6654         *)    gl_use_threads=yes ;;
6655       esac
6656     fi
6657
6658fi
6659
6660  if test "$gl_use_threads" = yes \
6661     || test "$gl_use_threads" = isoc \
6662     || test "$gl_use_threads" = posix \
6663     || test "$gl_use_threads" = isoc+posix; then
6664    # For using <threads.h> or <pthread.h>:
6665
6666
6667  if test -z "$gl_anythreadlib_early_done"; then
6668    case "$host_os" in
6669      osf*)
6670        # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
6671        # groks <pthread.h>. cc also understands the flag -pthread, but
6672        # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
6673        # 2. putting a flag into CPPFLAGS that has an effect on the linker
6674        # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
6675        # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
6676        CPPFLAGS="$CPPFLAGS -D_REENTRANT"
6677        ;;
6678    esac
6679    # Some systems optimize for single-threaded programs by default, and
6680    # need special flags to disable these optimizations. For example, the
6681    # definition of 'errno' in <errno.h>.
6682    case "$host_os" in
6683      aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
6684      solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
6685    esac
6686    gl_anythreadlib_early_done=done
6687  fi
6688
6689  fi
6690
6691
6692
6693  # Pre-early section.
6694
6695
6696
6697
6698  # Code from module absolute-header:
6699  # Code from module alloca:
6700  # Code from module alloca-opt:
6701  # Code from module arpa_inet:
6702  # Code from module assure:
6703  # Code from module at-internal:
6704  # Code from module attribute:
6705  # Code from module basename-lgpl:
6706  # Code from module btowc:
6707  # Code from module builtin-expect:
6708  # Code from module c99:
6709  # Code from module canonicalize-lgpl:
6710  # Code from module chdir:
6711  # Code from module chdir-long:
6712  # Code from module chown:
6713  # Code from module clock-time:
6714  # Code from module cloexec:
6715  # Code from module close:
6716  # Code from module closedir:
6717  # Code from module count-one-bits:
6718  # Code from module ctype:
6719  # Code from module d-ino:
6720  # Code from module d-type:
6721  # Code from module dirent:
6722  # Code from module dirfd:
6723  # Code from module dirname-lgpl:
6724  # Code from module double-slash-root:
6725  # Code from module dup:
6726  # Code from module dup2:
6727  # Code from module eloop-threshold:
6728  # Code from module environ:
6729  # Code from module errno:
6730  # Code from module error:
6731  # Code from module exitfail:
6732  # Code from module extensions:
6733  # Code from module extern-inline:
6734  # Code from module fchdir:
6735  # Code from module fcntl:
6736  # Code from module fcntl-h:
6737  # Code from module fd-hook:
6738  # Code from module fd-safer-flag:
6739  # Code from module fdopendir:
6740  # Code from module ffs:
6741  # Code from module filename:
6742  # Code from module filenamecat-lgpl:
6743  # Code from module flexmember:
6744  # Code from module float:
6745  # Code from module fnmatch:
6746  # Code from module fnmatch-gnu:
6747  # Code from module fnmatch-h:
6748  # Code from module fpieee:
6749
6750  # Code from module fpucw:
6751  # Code from module free-posix:
6752  # Code from module frexp:
6753  # Code from module frexpl:
6754  # Code from module fstat:
6755  # Code from module fstatat:
6756  # Code from module gendocs:
6757  # Code from module getcwd:
6758  # Code from module getcwd-lgpl:
6759  # Code from module getdelim:
6760  # Code from module getdtablesize:
6761  # Code from module getline:
6762  # Code from module getlogin_r:
6763  # Code from module getprogname:
6764  # Code from module getrandom:
6765  # Code from module gettext-h:
6766  # Code from module gettimeofday:
6767  # Code from module gitlog-to-changelog:
6768  # Code from module glob:
6769  # Code from module glob-h:
6770  # Code from module hard-locale:
6771  # Code from module idx:
6772  # Code from module include_next:
6773  # Code from module inet_ntop:
6774  # Code from module intprops:
6775  # Code from module inttypes:
6776  # Code from module inttypes-incomplete:
6777  # Code from module isblank:
6778  # Code from module isnand-nolibm:
6779  # Code from module isnanl-nolibm:
6780  # Code from module largefile:
6781
6782  # Code from module libc-config:
6783  # Code from module limits-h:
6784  # Code from module localcharset:
6785  # Code from module locale:
6786  # Code from module lock:
6787  # Code from module lstat:
6788  # Code from module malloc-posix:
6789  # Code from module malloca:
6790  # Code from module math:
6791  # Code from module mbrtowc:
6792  # Code from module mbsinit:
6793  # Code from module mbsrtowcs:
6794  # Code from module mbtowc:
6795  # Code from module memchr:
6796  # Code from module memmem:
6797  # Code from module memmem-simple:
6798  # Code from module mempcpy:
6799  # Code from module memrchr:
6800  # Code from module minmax:
6801  # Code from module mkdir:
6802  # Code from module mkdtemp:
6803  # Code from module mkostemp:
6804  # Code from module msvc-inval:
6805  # Code from module msvc-nothrow:
6806  # Code from module multiarch:
6807  # Code from module netdb:
6808  # Code from module netinet_in:
6809  # Code from module nocrash:
6810  # Code from module open:
6811  # Code from module openat:
6812  # Code from module openat-die:
6813  # Code from module openat-h:
6814  # Code from module opendir:
6815  # Code from module pathmax:
6816  # Code from module pipe-posix:
6817  # Code from module rawmemchr:
6818  # Code from module readdir:
6819  # Code from module readlink:
6820  # Code from module realloc-posix:
6821  # Code from module rename:
6822  # Code from module rewinddir:
6823  # Code from module rmdir:
6824  # Code from module same-inode:
6825  # Code from module save-cwd:
6826  # Code from module scratch_buffer:
6827  # Code from module select:
6828  # Code from module setenv:
6829  # Code from module setlocale-null:
6830  # Code from module signal-h:
6831  # Code from module snippet/_Noreturn:
6832  # Code from module snippet/arg-nonnull:
6833  # Code from module snippet/c++defs:
6834  # Code from module snippet/warn-on-use:
6835  # Code from module socketlib:
6836  # Code from module sockets:
6837  # Code from module socklen:
6838  # Code from module ssize_t:
6839  # Code from module stat:
6840  # Code from module stat-time:
6841  # Code from module std-gnu11:
6842  # Code from module stdalign:
6843  # Code from module stdbool:
6844  # Code from module stddef:
6845  # Code from module stdint:
6846  # Code from module stdio:
6847  # Code from module stdlib:
6848  # Code from module strchrnul:
6849  # Code from module strdup-posix:
6850  # Code from module streq:
6851  # Code from module strerror:
6852  # Code from module strerror-override:
6853  # Code from module strerror_r-posix:
6854  # Code from module string:
6855  # Code from module strings:
6856  # Code from module strnlen:
6857  # Code from module strnlen1:
6858  # Code from module strstr:
6859  # Code from module strstr-simple:
6860  # Code from module strtok_r:
6861  # Code from module sys_random:
6862  # Code from module sys_select:
6863  # Code from module sys_socket:
6864  # Code from module sys_stat:
6865  # Code from module sys_time:
6866  # Code from module sys_types:
6867  # Code from module sys_uio:
6868  # Code from module tempname:
6869  # Code from module threadlib:
6870
6871
6872
6873  # Code from module time:
6874  # Code from module time_r:
6875  # Code from module unistd:
6876  # Code from module unistd-safer:
6877  # Code from module unsetenv:
6878  # Code from module update-copyright:
6879  # Code from module verify:
6880  # Code from module wchar:
6881  # Code from module wctype-h:
6882  # Code from module windows-mutex:
6883  # Code from module windows-once:
6884  # Code from module windows-recmutex:
6885  # Code from module windows-rwlock:
6886  # Code from module wmemchr:
6887  # Code from module wmempcpy:
6888  # Code from module xalloc-oversized:
6889
6890
6891am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
6892
6893
6894ac_aux_dir=
6895for ac_dir in .. "$srcdir"/..; do
6896  if test -f "$ac_dir/install-sh"; then
6897    ac_aux_dir=$ac_dir
6898    ac_install_sh="$ac_aux_dir/install-sh -c"
6899    break
6900  elif test -f "$ac_dir/install.sh"; then
6901    ac_aux_dir=$ac_dir
6902    ac_install_sh="$ac_aux_dir/install.sh -c"
6903    break
6904  elif test -f "$ac_dir/shtool"; then
6905    ac_aux_dir=$ac_dir
6906    ac_install_sh="$ac_aux_dir/shtool install -c"
6907    break
6908  fi
6909done
6910if test -z "$ac_aux_dir"; then
6911  as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
6912fi
6913
6914# These three variables are undocumented and unsupported,
6915# and are intended to be withdrawn in a future Autoconf release.
6916# They can cause serious problems if a builder's source tree is in a directory
6917# whose full name contains unusual characters.
6918ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
6919ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
6920ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933                        # Check whether --enable-cross-guesses was given.
6934if test "${enable_cross_guesses+set}" = set; then :
6935  enableval=$enable_cross_guesses; if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
6936       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-cross-guesses" >&5
6937$as_echo "$as_me: WARNING: invalid argument supplied to --enable-cross-guesses" >&2;}
6938       enableval=conservative
6939     fi
6940     gl_cross_guesses="$enableval"
6941else
6942  gl_cross_guesses=conservative
6943fi
6944
6945  if test $gl_cross_guesses = risky; then
6946    gl_cross_guess_normal="guessing yes"
6947    gl_cross_guess_inverted="guessing no"
6948  else
6949    gl_cross_guess_normal="guessing no"
6950    gl_cross_guess_inverted="guessing yes"
6951  fi
6952          LIBC_FATAL_STDERR_=1
6953  export LIBC_FATAL_STDERR_
6954
6955
6956ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6957if test "x$ac_cv_type_size_t" = xyes; then :
6958
6959else
6960
6961cat >>confdefs.h <<_ACEOF
6962#define size_t unsigned int
6963_ACEOF
6964
6965fi
6966
6967# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6968# for constant arguments.  Useless!
6969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
6970$as_echo_n "checking for working alloca.h... " >&6; }
6971if ${ac_cv_working_alloca_h+:} false; then :
6972  $as_echo_n "(cached) " >&6
6973else
6974  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6975/* end confdefs.h.  */
6976#include <alloca.h>
6977int
6978main ()
6979{
6980char *p = (char *) alloca (2 * sizeof (int));
6981			  if (p) return 0;
6982  ;
6983  return 0;
6984}
6985_ACEOF
6986if ac_fn_c_try_link "$LINENO"; then :
6987  ac_cv_working_alloca_h=yes
6988else
6989  ac_cv_working_alloca_h=no
6990fi
6991rm -f core conftest.err conftest.$ac_objext \
6992    conftest$ac_exeext conftest.$ac_ext
6993fi
6994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
6995$as_echo "$ac_cv_working_alloca_h" >&6; }
6996if test $ac_cv_working_alloca_h = yes; then
6997
6998$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
6999
7000fi
7001
7002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
7003$as_echo_n "checking for alloca... " >&6; }
7004if ${ac_cv_func_alloca_works+:} false; then :
7005  $as_echo_n "(cached) " >&6
7006else
7007  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7008/* end confdefs.h.  */
7009#ifdef __GNUC__
7010# define alloca __builtin_alloca
7011#else
7012# ifdef _MSC_VER
7013#  include <malloc.h>
7014#  define alloca _alloca
7015# else
7016#  ifdef HAVE_ALLOCA_H
7017#   include <alloca.h>
7018#  else
7019#   ifdef _AIX
7020 #pragma alloca
7021#   else
7022#    ifndef alloca /* predefined by HP cc +Olibcalls */
7023void *alloca (size_t);
7024#    endif
7025#   endif
7026#  endif
7027# endif
7028#endif
7029
7030int
7031main ()
7032{
7033char *p = (char *) alloca (1);
7034				    if (p) return 0;
7035  ;
7036  return 0;
7037}
7038_ACEOF
7039if ac_fn_c_try_link "$LINENO"; then :
7040  ac_cv_func_alloca_works=yes
7041else
7042  ac_cv_func_alloca_works=no
7043fi
7044rm -f core conftest.err conftest.$ac_objext \
7045    conftest$ac_exeext conftest.$ac_ext
7046fi
7047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
7048$as_echo "$ac_cv_func_alloca_works" >&6; }
7049
7050if test $ac_cv_func_alloca_works = yes; then
7051
7052$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
7053
7054else
7055  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7056# that cause trouble.  Some versions do not even contain alloca or
7057# contain a buggy version.  If you still want to use their alloca,
7058# use ar to extract alloca.o from them instead of compiling alloca.c.
7059
7060
7061
7062
7063
7064ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
7065
7066$as_echo "#define C_ALLOCA 1" >>confdefs.h
7067
7068
7069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7070$as_echo_n "checking stack direction for C alloca... " >&6; }
7071if ${ac_cv_c_stack_direction+:} false; then :
7072  $as_echo_n "(cached) " >&6
7073else
7074  if test "$cross_compiling" = yes; then :
7075  ac_cv_c_stack_direction=0
7076else
7077  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7078/* end confdefs.h.  */
7079$ac_includes_default
7080int
7081find_stack_direction (int *addr, int depth)
7082{
7083  int dir, dummy = 0;
7084  if (! addr)
7085    addr = &dummy;
7086  *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
7087  dir = depth ? find_stack_direction (addr, depth - 1) : 0;
7088  return dir + dummy;
7089}
7090
7091int
7092main (int argc, char **argv)
7093{
7094  return find_stack_direction (0, argc + !argv + 20) < 0;
7095}
7096_ACEOF
7097if ac_fn_c_try_run "$LINENO"; then :
7098  ac_cv_c_stack_direction=1
7099else
7100  ac_cv_c_stack_direction=-1
7101fi
7102rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7103  conftest.$ac_objext conftest.beam conftest.$ac_ext
7104fi
7105
7106fi
7107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
7108$as_echo "$ac_cv_c_stack_direction" >&6; }
7109cat >>confdefs.h <<_ACEOF
7110#define STACK_DIRECTION $ac_cv_c_stack_direction
7111_ACEOF
7112
7113
7114fi
7115
7116
7117  GNULIB_INET_NTOP=0;
7118  GNULIB_INET_PTON=0;
7119    HAVE_DECL_INET_NTOP=1;
7120  HAVE_DECL_INET_PTON=1;
7121  REPLACE_INET_NTOP=0;
7122  REPLACE_INET_PTON=0;
7123
7124
7125
7126
7127
7128  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
7129$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
7130if ${gl_cv_have_include_next+:} false; then :
7131  $as_echo_n "(cached) " >&6
7132else
7133  rm -rf conftestd1a conftestd1b conftestd2
7134     mkdir conftestd1a conftestd1b conftestd2
7135                                                  cat <<EOF > conftestd1a/conftest.h
7136#define DEFINED_IN_CONFTESTD1
7137#include_next <conftest.h>
7138#ifdef DEFINED_IN_CONFTESTD2
7139int foo;
7140#else
7141#error "include_next doesn't work"
7142#endif
7143EOF
7144     cat <<EOF > conftestd1b/conftest.h
7145#define DEFINED_IN_CONFTESTD1
7146#include <stdio.h>
7147#include_next <conftest.h>
7148#ifdef DEFINED_IN_CONFTESTD2
7149int foo;
7150#else
7151#error "include_next doesn't work"
7152#endif
7153EOF
7154     cat <<EOF > conftestd2/conftest.h
7155#ifndef DEFINED_IN_CONFTESTD1
7156#error "include_next test doesn't work"
7157#endif
7158#define DEFINED_IN_CONFTESTD2
7159EOF
7160     gl_save_CPPFLAGS="$CPPFLAGS"
7161     CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
7162     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7163/* end confdefs.h.  */
7164#include <conftest.h>
7165_ACEOF
7166if ac_fn_c_try_compile "$LINENO"; then :
7167  gl_cv_have_include_next=yes
7168else
7169  CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
7170        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7171/* end confdefs.h.  */
7172#include <conftest.h>
7173_ACEOF
7174if ac_fn_c_try_compile "$LINENO"; then :
7175  gl_cv_have_include_next=buggy
7176else
7177  gl_cv_have_include_next=no
7178fi
7179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7180
7181fi
7182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7183     CPPFLAGS="$gl_save_CPPFLAGS"
7184     rm -rf conftestd1a conftestd1b conftestd2
7185
7186fi
7187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
7188$as_echo "$gl_cv_have_include_next" >&6; }
7189  PRAGMA_SYSTEM_HEADER=
7190  if test $gl_cv_have_include_next = yes; then
7191    INCLUDE_NEXT=include_next
7192    INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7193    if test -n "$GCC"; then
7194      PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
7195    fi
7196  else
7197    if test $gl_cv_have_include_next = buggy; then
7198      INCLUDE_NEXT=include
7199      INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7200    else
7201      INCLUDE_NEXT=include
7202      INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
7203    fi
7204  fi
7205
7206
7207
7208
7209      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether source code line length is unlimited" >&5
7210$as_echo_n "checking whether source code line length is unlimited... " >&6; }
7211if ${gl_cv_source_line_length_unlimited+:} false; then :
7212  $as_echo_n "(cached) " >&6
7213else
7214  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7215/* end confdefs.h.  */
7216
7217#ifdef __TANDEM
7218choke me
7219#endif
7220
7221_ACEOF
7222if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7223  $EGREP "choke me" >/dev/null 2>&1; then :
7224  gl_cv_source_line_length_unlimited=no
7225else
7226  gl_cv_source_line_length_unlimited=yes
7227fi
7228rm -f conftest*
7229
7230
7231fi
7232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_source_line_length_unlimited" >&5
7233$as_echo "$gl_cv_source_line_length_unlimited" >&6; }
7234  if test $gl_cv_source_line_length_unlimited = no; then
7235    PRAGMA_COLUMNS="#pragma COLUMNS 10000"
7236  else
7237    PRAGMA_COLUMNS=
7238  fi
7239
7240
7241
7242
7243
7244
7245  if test $ac_cv_header_features_h = yes; then
7246    HAVE_FEATURES_H=1
7247  else
7248    HAVE_FEATURES_H=0
7249  fi
7250
7251
7252
7253
7254
7255   if test $ac_cv_header_sys_socket_h = no; then
7256                         for ac_header in ws2tcpip.h
7257do :
7258  ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
7259if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
7260  cat >>confdefs.h <<_ACEOF
7261#define HAVE_WS2TCPIP_H 1
7262_ACEOF
7263
7264fi
7265
7266done
7267
7268   fi
7269
7270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7271$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7272if test -z "$MKDIR_P"; then
7273  if ${ac_cv_path_mkdir+:} false; then :
7274  $as_echo_n "(cached) " >&6
7275else
7276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7277for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7278do
7279  IFS=$as_save_IFS
7280  test -z "$as_dir" && as_dir=.
7281    for ac_prog in mkdir gmkdir; do
7282	 for ac_exec_ext in '' $ac_executable_extensions; do
7283	   as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
7284	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7285	     'mkdir (GNU coreutils) '* | \
7286	     'mkdir (coreutils) '* | \
7287	     'mkdir (fileutils) '4.1*)
7288	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7289	       break 3;;
7290	   esac
7291	 done
7292       done
7293  done
7294IFS=$as_save_IFS
7295
7296fi
7297
7298  test -d ./--version && rmdir ./--version
7299  if test "${ac_cv_path_mkdir+set}" = set; then
7300    MKDIR_P="$ac_cv_path_mkdir -p"
7301  else
7302    # As a last resort, use the slow shell script.  Don't cache a
7303    # value for MKDIR_P within a source directory, because that will
7304    # break other packages using the cache if that directory is
7305    # removed, or if the value is a relative name.
7306    MKDIR_P="$ac_install_sh -d"
7307  fi
7308fi
7309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7310$as_echo "$MKDIR_P" >&6; }
7311
7312
7313  GNULIB_BTOWC=0;
7314  GNULIB_WCTOB=0;
7315  GNULIB_MBSINIT=0;
7316  GNULIB_MBRTOWC=0;
7317  GNULIB_MBRLEN=0;
7318  GNULIB_MBSRTOWCS=0;
7319  GNULIB_MBSNRTOWCS=0;
7320  GNULIB_WCRTOMB=0;
7321  GNULIB_WCSRTOMBS=0;
7322  GNULIB_WCSNRTOMBS=0;
7323  GNULIB_WCWIDTH=0;
7324  GNULIB_WMEMCHR=0;
7325  GNULIB_WMEMCMP=0;
7326  GNULIB_WMEMCPY=0;
7327  GNULIB_WMEMMOVE=0;
7328  GNULIB_WMEMPCPY=0;
7329  GNULIB_WMEMSET=0;
7330  GNULIB_WCSLEN=0;
7331  GNULIB_WCSNLEN=0;
7332  GNULIB_WCSCPY=0;
7333  GNULIB_WCPCPY=0;
7334  GNULIB_WCSNCPY=0;
7335  GNULIB_WCPNCPY=0;
7336  GNULIB_WCSCAT=0;
7337  GNULIB_WCSNCAT=0;
7338  GNULIB_WCSCMP=0;
7339  GNULIB_WCSNCMP=0;
7340  GNULIB_WCSCASECMP=0;
7341  GNULIB_WCSNCASECMP=0;
7342  GNULIB_WCSCOLL=0;
7343  GNULIB_WCSXFRM=0;
7344  GNULIB_WCSDUP=0;
7345  GNULIB_WCSCHR=0;
7346  GNULIB_WCSRCHR=0;
7347  GNULIB_WCSCSPN=0;
7348  GNULIB_WCSSPN=0;
7349  GNULIB_WCSPBRK=0;
7350  GNULIB_WCSSTR=0;
7351  GNULIB_WCSTOK=0;
7352  GNULIB_WCSWIDTH=0;
7353  GNULIB_WCSFTIME=0;
7354    GNULIB_MDA_WCSDUP=1;
7355    HAVE_BTOWC=1;
7356  HAVE_MBSINIT=1;
7357  HAVE_MBRTOWC=1;
7358  HAVE_MBRLEN=1;
7359  HAVE_MBSRTOWCS=1;
7360  HAVE_MBSNRTOWCS=1;
7361  HAVE_WCRTOMB=1;
7362  HAVE_WCSRTOMBS=1;
7363  HAVE_WCSNRTOMBS=1;
7364  HAVE_WMEMCHR=1;
7365  HAVE_WMEMCMP=1;
7366  HAVE_WMEMCPY=1;
7367  HAVE_WMEMMOVE=1;
7368  HAVE_WMEMPCPY=1;
7369  HAVE_WMEMSET=1;
7370  HAVE_WCSLEN=1;
7371  HAVE_WCSNLEN=1;
7372  HAVE_WCSCPY=1;
7373  HAVE_WCPCPY=1;
7374  HAVE_WCSNCPY=1;
7375  HAVE_WCPNCPY=1;
7376  HAVE_WCSCAT=1;
7377  HAVE_WCSNCAT=1;
7378  HAVE_WCSCMP=1;
7379  HAVE_WCSNCMP=1;
7380  HAVE_WCSCASECMP=1;
7381  HAVE_WCSNCASECMP=1;
7382  HAVE_WCSCOLL=1;
7383  HAVE_WCSXFRM=1;
7384  HAVE_WCSDUP=1;
7385  HAVE_WCSCHR=1;
7386  HAVE_WCSRCHR=1;
7387  HAVE_WCSCSPN=1;
7388  HAVE_WCSSPN=1;
7389  HAVE_WCSPBRK=1;
7390  HAVE_WCSSTR=1;
7391  HAVE_WCSTOK=1;
7392  HAVE_WCSWIDTH=1;
7393  HAVE_WCSFTIME=1;
7394  HAVE_DECL_WCTOB=1;
7395  HAVE_DECL_WCSDUP=1;
7396  HAVE_DECL_WCWIDTH=1;
7397  REPLACE_MBSTATE_T=0;
7398  REPLACE_BTOWC=0;
7399  REPLACE_WCTOB=0;
7400  REPLACE_MBSINIT=0;
7401  REPLACE_MBRTOWC=0;
7402  REPLACE_MBRLEN=0;
7403  REPLACE_MBSRTOWCS=0;
7404  REPLACE_MBSNRTOWCS=0;
7405  REPLACE_WCRTOMB=0;
7406  REPLACE_WCSRTOMBS=0;
7407  REPLACE_WCSNRTOMBS=0;
7408  REPLACE_WCWIDTH=0;
7409  REPLACE_WCSWIDTH=0;
7410  REPLACE_WCSFTIME=0;
7411  REPLACE_WCSTOK=0;
7412
7413
7414
7415  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
7416$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
7417if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
7418  $as_echo_n "(cached) " >&6
7419else
7420  gl_cv_header_wchar_h_correct_inline=yes
7421     case "$host_os" in
7422       *-gnu* | gnu*)
7423         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7424/* end confdefs.h.  */
7425
7426
7427             #define wcstod renamed_wcstod
7428             #include <wchar.h>
7429             extern int zero (void);
7430             int main () { return zero(); }
7431
7432_ACEOF
7433                                                      save_ac_compile="$ac_compile"
7434         ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
7435         if echo '#include "conftest.c"' >conftest1.c \
7436            && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7437  (eval $ac_compile) 2>&5
7438  ac_status=$?
7439  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7440  test $ac_status = 0; }; then
7441           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7442/* end confdefs.h.  */
7443
7444
7445               #define wcstod renamed_wcstod
7446               #include <wchar.h>
7447               int zero (void) { return 0; }
7448
7449_ACEOF
7450                      ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
7451           if echo '#include "conftest.c"' >conftest2.c \
7452              && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7453  (eval $ac_compile) 2>&5
7454  ac_status=$?
7455  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7456  test $ac_status = 0; }; then
7457             if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
7458               :
7459             else
7460               gl_cv_header_wchar_h_correct_inline=no
7461             fi
7462           fi
7463         fi
7464         ac_compile="$save_ac_compile"
7465         rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext
7466         ;;
7467     esac
7468
7469fi
7470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
7471$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
7472  if test $gl_cv_header_wchar_h_correct_inline = no; then
7473    as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
7474This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
7475C99 mode. You have four options:
7476  - Add the flag -fgnu89-inline to CC and reconfigure, or
7477  - Fix your include files, using parts of
7478    <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
7479  - Use a gcc version older than 4.3, or
7480  - Don't use the flags -std=c99 or -std=gnu99.
7481Configuration aborted." "$LINENO" 5
7482  fi
7483
7484
7485
7486
7487  for ac_func in $ac_func_list
7488do :
7489  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7490ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7491if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7492  cat >>confdefs.h <<_ACEOF
7493#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7494_ACEOF
7495
7496fi
7497done
7498
7499
7500
7501
7502  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
7503$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
7504if ${am_cv_langinfo_codeset+:} false; then :
7505  $as_echo_n "(cached) " >&6
7506else
7507  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7508/* end confdefs.h.  */
7509#include <langinfo.h>
7510int
7511main ()
7512{
7513char* cs = nl_langinfo(CODESET); return !cs;
7514  ;
7515  return 0;
7516}
7517_ACEOF
7518if ac_fn_c_try_link "$LINENO"; then :
7519  am_cv_langinfo_codeset=yes
7520else
7521  am_cv_langinfo_codeset=no
7522fi
7523rm -f core conftest.err conftest.$ac_objext \
7524    conftest$ac_exeext conftest.$ac_ext
7525
7526fi
7527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
7528$as_echo "$am_cv_langinfo_codeset" >&6; }
7529  if test $am_cv_langinfo_codeset = yes; then
7530
7531$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
7532
7533  fi
7534
7535
7536
7537
7538  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
7539$as_echo_n "checking for a traditional french locale... " >&6; }
7540if ${gt_cv_locale_fr+:} false; then :
7541  $as_echo_n "(cached) " >&6
7542else
7543
7544    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7545/* end confdefs.h.  */
7546
7547#include <locale.h>
7548#include <time.h>
7549#if HAVE_LANGINFO_CODESET
7550# include <langinfo.h>
7551#endif
7552#include <stdlib.h>
7553#include <string.h>
7554struct tm t;
7555char buf[16];
7556int main () {
7557  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
7558     imitates locale dependent behaviour by looking at the environment
7559     variables, and all locales use the UTF-8 encoding.  */
7560#if defined __BEOS__ || defined __HAIKU__
7561  return 1;
7562#else
7563  /* Check whether the given locale name is recognized by the system.  */
7564# if defined _WIN32 && !defined __CYGWIN__
7565  /* On native Windows, setlocale(category, "") looks at the system settings,
7566     not at the environment variables.  Also, when an encoding suffix such
7567     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
7568     category of the locale to "C".  */
7569  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
7570      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
7571    return 1;
7572# else
7573  if (setlocale (LC_ALL, "") == NULL) return 1;
7574# endif
7575  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
7576     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
7577     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
7578     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
7579     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
7580     some unit tests fail.
7581     On MirBSD 10, when an unsupported locale is specified, setlocale()
7582     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
7583# if HAVE_LANGINFO_CODESET
7584  {
7585    const char *cs = nl_langinfo (CODESET);
7586    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
7587        || strcmp (cs, "UTF-8") == 0)
7588      return 1;
7589  }
7590# endif
7591# ifdef __CYGWIN__
7592  /* On Cygwin, avoid locale names without encoding suffix, because the
7593     locale_charset() function relies on the encoding suffix.  Note that
7594     LC_ALL is set on the command line.  */
7595  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
7596# endif
7597  /* Check whether in the abbreviation of the second month, the second
7598     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
7599     one byte long. This excludes the UTF-8 encoding.  */
7600  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
7601  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
7602# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
7603  /* Check whether the decimal separator is a comma.
7604     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
7605     are nl_langinfo(RADIXCHAR) are both ".".  */
7606  if (localeconv () ->decimal_point[0] != ',') return 1;
7607# endif
7608  return 0;
7609#endif
7610}
7611
7612_ACEOF
7613    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
7614  (eval $ac_link) 2>&5
7615  ac_status=$?
7616  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7617  test $ac_status = 0; } && test -s conftest$ac_exeext; then
7618      case "$host_os" in
7619        # Handle native Windows specially, because there setlocale() interprets
7620        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
7621        # "fr" or "fra" as "French" or "French_France.1252",
7622        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
7623        # "ja" as "Japanese" or "Japanese_Japan.932",
7624        # and similar.
7625        mingw*)
7626          # Test for the native Windows locale name.
7627          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7628            gt_cv_locale_fr=French_France.1252
7629          else
7630            # None found.
7631            gt_cv_locale_fr=none
7632          fi
7633          ;;
7634        *)
7635          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
7636          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
7637          # configure script would override the LC_ALL setting. Likewise for
7638          # LC_CTYPE, which is also set at the beginning of the configure script.
7639          # Test for the usual locale name.
7640          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7641            gt_cv_locale_fr=fr_FR
7642          else
7643            # Test for the locale name with explicit encoding suffix.
7644            if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7645              gt_cv_locale_fr=fr_FR.ISO-8859-1
7646            else
7647              # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
7648              if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7649                gt_cv_locale_fr=fr_FR.ISO8859-1
7650              else
7651                # Test for the HP-UX locale name.
7652                if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7653                  gt_cv_locale_fr=fr_FR.iso88591
7654                else
7655                  # Test for the Solaris 7 locale name.
7656                  if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7657                    gt_cv_locale_fr=fr
7658                  else
7659                    # None found.
7660                    gt_cv_locale_fr=none
7661                  fi
7662                fi
7663              fi
7664            fi
7665          fi
7666          ;;
7667      esac
7668    fi
7669    rm -fr conftest*
7670
7671fi
7672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
7673$as_echo "$gt_cv_locale_fr" >&6; }
7674  LOCALE_FR=$gt_cv_locale_fr
7675
7676
7677
7678  GNULIB__EXIT=0;
7679  GNULIB_ALIGNED_ALLOC=0;
7680  GNULIB_ATOLL=0;
7681  GNULIB_CALLOC_POSIX=0;
7682  GNULIB_CANONICALIZE_FILE_NAME=0;
7683  GNULIB_FREE_POSIX=0;
7684  GNULIB_GETLOADAVG=0;
7685  GNULIB_GETSUBOPT=0;
7686  GNULIB_GRANTPT=0;
7687  GNULIB_MALLOC_POSIX=0;
7688  GNULIB_MBTOWC=0;
7689  GNULIB_MKDTEMP=0;
7690  GNULIB_MKOSTEMP=0;
7691  GNULIB_MKOSTEMPS=0;
7692  GNULIB_MKSTEMP=0;
7693  GNULIB_MKSTEMPS=0;
7694  GNULIB_POSIX_MEMALIGN=0;
7695  GNULIB_POSIX_OPENPT=0;
7696  GNULIB_PTSNAME=0;
7697  GNULIB_PTSNAME_R=0;
7698  GNULIB_PUTENV=0;
7699  GNULIB_QSORT_R=0;
7700  GNULIB_RANDOM=0;
7701  GNULIB_RANDOM_R=0;
7702  GNULIB_REALLOCARRAY=0;
7703  GNULIB_REALLOC_POSIX=0;
7704  GNULIB_REALPATH=0;
7705  GNULIB_RPMATCH=0;
7706  GNULIB_SECURE_GETENV=0;
7707  GNULIB_SETENV=0;
7708  GNULIB_STRTOD=0;
7709  GNULIB_STRTOLD=0;
7710  GNULIB_STRTOLL=0;
7711  GNULIB_STRTOULL=0;
7712  GNULIB_SYSTEM_POSIX=0;
7713  GNULIB_UNLOCKPT=0;
7714  GNULIB_UNSETENV=0;
7715  GNULIB_WCTOMB=0;
7716    GNULIB_MDA_ECVT=1;
7717  GNULIB_MDA_FCVT=1;
7718  GNULIB_MDA_GCVT=1;
7719  GNULIB_MDA_MKTEMP=1;
7720  GNULIB_MDA_PUTENV=1;
7721    HAVE__EXIT=1;
7722  HAVE_ALIGNED_ALLOC=1;
7723  HAVE_ATOLL=1;
7724  HAVE_CANONICALIZE_FILE_NAME=1;
7725  HAVE_DECL_ECVT=1;
7726  HAVE_DECL_FCVT=1;
7727  HAVE_DECL_GCVT=1;
7728  HAVE_DECL_GETLOADAVG=1;
7729  HAVE_GETSUBOPT=1;
7730  HAVE_GRANTPT=1;
7731  HAVE_INITSTATE=1;
7732  HAVE_DECL_INITSTATE=1;
7733  HAVE_MBTOWC=1;
7734  HAVE_MKDTEMP=1;
7735  HAVE_MKOSTEMP=1;
7736  HAVE_MKOSTEMPS=1;
7737  HAVE_MKSTEMP=1;
7738  HAVE_MKSTEMPS=1;
7739  HAVE_POSIX_MEMALIGN=1;
7740  HAVE_POSIX_OPENPT=1;
7741  HAVE_PTSNAME=1;
7742  HAVE_PTSNAME_R=1;
7743  HAVE_QSORT_R=1;
7744  HAVE_RANDOM=1;
7745  HAVE_RANDOM_H=1;
7746  HAVE_RANDOM_R=1;
7747  HAVE_REALLOCARRAY=1;
7748  HAVE_REALPATH=1;
7749  HAVE_RPMATCH=1;
7750  HAVE_SECURE_GETENV=1;
7751  HAVE_SETENV=1;
7752  HAVE_DECL_SETENV=1;
7753  HAVE_SETSTATE=1;
7754  HAVE_DECL_SETSTATE=1;
7755  HAVE_STRTOD=1;
7756  HAVE_STRTOLD=1;
7757  HAVE_STRTOLL=1;
7758  HAVE_STRTOULL=1;
7759  HAVE_STRUCT_RANDOM_DATA=1;
7760  HAVE_SYS_LOADAVG_H=0;
7761  HAVE_UNLOCKPT=1;
7762  HAVE_DECL_UNSETENV=1;
7763  REPLACE_ALIGNED_ALLOC=0;
7764  REPLACE_CALLOC=0;
7765  REPLACE_CANONICALIZE_FILE_NAME=0;
7766  REPLACE_FREE=0;
7767  REPLACE_INITSTATE=0;
7768  REPLACE_MALLOC=0;
7769  REPLACE_MBTOWC=0;
7770  REPLACE_MKSTEMP=0;
7771  REPLACE_POSIX_MEMALIGN=0;
7772  REPLACE_PTSNAME=0;
7773  REPLACE_PTSNAME_R=0;
7774  REPLACE_PUTENV=0;
7775  REPLACE_QSORT_R=0;
7776  REPLACE_RANDOM=0;
7777  REPLACE_RANDOM_R=0;
7778  REPLACE_REALLOC=0;
7779  REPLACE_REALPATH=0;
7780  REPLACE_SETENV=0;
7781  REPLACE_SETSTATE=0;
7782  REPLACE_STRTOD=0;
7783  REPLACE_STRTOLD=0;
7784  REPLACE_UNSETENV=0;
7785  REPLACE_WCTOMB=0;
7786
7787
7788         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
7789$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
7790if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
7791  $as_echo_n "(cached) " >&6
7792else
7793  rm -f conftest.sym conftest.file
7794     echo >conftest.file
7795     if test "$cross_compiling" = yes; then :
7796  case "$host_os" in
7797          linux-* | linux)
7798            # Guess yes on Linux systems.
7799            gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
7800          *-gnu* | gnu*)
7801            # Guess yes on glibc systems.
7802            gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
7803          mingw*)
7804            # Guess no on native Windows.
7805            gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
7806          *)
7807            # If we don't know, obey --enable-cross-guesses.
7808            gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;;
7809        esac
7810
7811else
7812  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7813/* end confdefs.h.  */
7814$ac_includes_default
7815int
7816main ()
7817{
7818struct stat sbuf;
7819            if (symlink ("conftest.file", "conftest.sym") != 0)
7820              return 1;
7821            /* Linux will dereference the symlink and fail, as required by
7822               POSIX.  That is better in the sense that it means we will not
7823               have to compile and use the lstat wrapper.  */
7824            return lstat ("conftest.sym/", &sbuf) == 0;
7825
7826  ;
7827  return 0;
7828}
7829_ACEOF
7830if ac_fn_c_try_run "$LINENO"; then :
7831  gl_cv_func_lstat_dereferences_slashed_symlink=yes
7832else
7833  gl_cv_func_lstat_dereferences_slashed_symlink=no
7834fi
7835rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7836  conftest.$ac_objext conftest.beam conftest.$ac_ext
7837fi
7838
7839     rm -f conftest.sym conftest.file
7840
7841fi
7842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
7843$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
7844  case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
7845    *yes)
7846
7847cat >>confdefs.h <<_ACEOF
7848#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
7849_ACEOF
7850
7851      ;;
7852  esac
7853
7854
7855
7856
7857
7858
7859
7860  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
7861$as_echo_n "checking whether // is distinct from /... " >&6; }
7862if ${gl_cv_double_slash_root+:} false; then :
7863  $as_echo_n "(cached) " >&6
7864else
7865   if test x"$cross_compiling" = xyes ; then
7866        # When cross-compiling, there is no way to tell whether // is special
7867        # short of a list of hosts.  However, the only known hosts to date
7868        # that have a distinct // are Apollo DomainOS (too old to port to),
7869        # Cygwin, and z/OS.  If anyone knows of another system for which // has
7870        # special semantics and is distinct from /, please report it to
7871        # <bug-gnulib@gnu.org>.
7872        case $host in
7873          *-cygwin | i370-ibm-openedition)
7874            gl_cv_double_slash_root=yes ;;
7875          *)
7876            # Be optimistic and assume that / and // are the same when we
7877            # don't know.
7878            gl_cv_double_slash_root='unknown, assuming no' ;;
7879        esac
7880      else
7881        set x `ls -di / // 2>/dev/null`
7882        if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
7883          gl_cv_double_slash_root=no
7884        else
7885          gl_cv_double_slash_root=yes
7886        fi
7887      fi
7888fi
7889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
7890$as_echo "$gl_cv_double_slash_root" >&6; }
7891  if test "$gl_cv_double_slash_root" = yes; then
7892
7893$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
7894
7895  fi
7896
7897
7898
7899
7900
7901     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
7902$as_echo_n "checking whether realpath works... " >&6; }
7903if ${gl_cv_func_realpath_works+:} false; then :
7904  $as_echo_n "(cached) " >&6
7905else
7906
7907    rm -rf conftest.a conftest.d
7908    touch conftest.a
7909    mkdir conftest.d
7910    if test "$cross_compiling" = yes; then :
7911  case "$host_os" in
7912                       # Guess yes on glibc systems.
7913        *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
7914                       # Guess yes on musl systems.
7915        *-musl*)       gl_cv_func_realpath_works="guessing yes" ;;
7916                       # Guess no on native Windows.
7917        mingw*)        gl_cv_func_realpath_works="guessing no" ;;
7918                       # If we don't know, obey --enable-cross-guesses.
7919        *)             gl_cv_func_realpath_works="$gl_cross_guess_normal" ;;
7920      esac
7921
7922else
7923  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7924/* end confdefs.h.  */
7925
7926
7927
7928#include <stdlib.h>
7929#if defined __MACH__ && defined __APPLE__
7930/* Avoid a crash on Mac OS X.  */
7931#include <mach/mach.h>
7932#include <mach/mach_error.h>
7933#include <mach/thread_status.h>
7934#include <mach/exception.h>
7935#include <mach/task.h>
7936#include <pthread.h>
7937/* The exception port on which our thread listens.  */
7938static mach_port_t our_exception_port;
7939/* The main function of the thread listening for exceptions of type
7940   EXC_BAD_ACCESS.  */
7941static void *
7942mach_exception_thread (void *arg)
7943{
7944  /* Buffer for a message to be received.  */
7945  struct {
7946    mach_msg_header_t head;
7947    mach_msg_body_t msgh_body;
7948    char data[1024];
7949  } msg;
7950  mach_msg_return_t retval;
7951  /* Wait for a message on the exception port.  */
7952  retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
7953                     our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
7954  if (retval != MACH_MSG_SUCCESS)
7955    abort ();
7956  exit (1);
7957}
7958static void
7959nocrash_init (void)
7960{
7961  mach_port_t self = mach_task_self ();
7962  /* Allocate a port on which the thread shall listen for exceptions.  */
7963  if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
7964      == KERN_SUCCESS) {
7965    /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
7966    if (mach_port_insert_right (self, our_exception_port, our_exception_port,
7967                                MACH_MSG_TYPE_MAKE_SEND)
7968        == KERN_SUCCESS) {
7969      /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
7970         for us.  */
7971      exception_mask_t mask = EXC_MASK_BAD_ACCESS;
7972      /* Create the thread listening on the exception port.  */
7973      pthread_attr_t attr;
7974      pthread_t thread;
7975      if (pthread_attr_init (&attr) == 0
7976          && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
7977          && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
7978        pthread_attr_destroy (&attr);
7979        /* Replace the exception port info for these exceptions with our own.
7980           Note that we replace the exception port for the entire task, not only
7981           for a particular thread.  This has the effect that when our exception
7982           port gets the message, the thread specific exception port has already
7983           been asked, and we don't need to bother about it.
7984           See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
7985        task_set_exception_ports (self, mask, our_exception_port,
7986                                  EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
7987      }
7988    }
7989  }
7990}
7991#elif defined _WIN32 && ! defined __CYGWIN__
7992/* Avoid a crash on native Windows.  */
7993#define WIN32_LEAN_AND_MEAN
7994#include <windows.h>
7995#include <winerror.h>
7996static LONG WINAPI
7997exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
7998{
7999  switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
8000    {
8001    case EXCEPTION_ACCESS_VIOLATION:
8002    case EXCEPTION_IN_PAGE_ERROR:
8003    case EXCEPTION_STACK_OVERFLOW:
8004    case EXCEPTION_GUARD_PAGE:
8005    case EXCEPTION_PRIV_INSTRUCTION:
8006    case EXCEPTION_ILLEGAL_INSTRUCTION:
8007    case EXCEPTION_DATATYPE_MISALIGNMENT:
8008    case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
8009    case EXCEPTION_NONCONTINUABLE_EXCEPTION:
8010      exit (1);
8011    }
8012  return EXCEPTION_CONTINUE_SEARCH;
8013}
8014static void
8015nocrash_init (void)
8016{
8017  SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
8018}
8019#else
8020/* Avoid a crash on POSIX systems.  */
8021#include <signal.h>
8022#include <unistd.h>
8023/* A POSIX signal handler.  */
8024static void
8025exception_handler (int sig)
8026{
8027  _exit (1);
8028}
8029static void
8030nocrash_init (void)
8031{
8032#ifdef SIGSEGV
8033  signal (SIGSEGV, exception_handler);
8034#endif
8035#ifdef SIGBUS
8036  signal (SIGBUS, exception_handler);
8037#endif
8038}
8039#endif
8040
8041        #include <stdlib.h>
8042        #include <string.h>
8043
8044int
8045main ()
8046{
8047
8048        int result = 0;
8049        {
8050          char *name = realpath ("conftest.a", NULL);
8051          if (!(name && *name == '/'))
8052            result |= 1;
8053          free (name);
8054        }
8055        {
8056          char *name = realpath ("conftest.b/../conftest.a", NULL);
8057          if (name != NULL)
8058            result |= 2;
8059          free (name);
8060        }
8061        {
8062          char *name = realpath ("conftest.a/", NULL);
8063          if (name != NULL)
8064            result |= 4;
8065          free (name);
8066        }
8067        {
8068          char *name1 = realpath (".", NULL);
8069          char *name2 = realpath ("conftest.d//./..", NULL);
8070          if (! name1 || ! name2 || strcmp (name1, name2))
8071            result |= 8;
8072          free (name1);
8073          free (name2);
8074        }
8075        return result;
8076
8077  ;
8078  return 0;
8079}
8080
8081_ACEOF
8082if ac_fn_c_try_run "$LINENO"; then :
8083  gl_cv_func_realpath_works=yes
8084else
8085  gl_cv_func_realpath_works=no
8086fi
8087rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8088  conftest.$ac_objext conftest.beam conftest.$ac_ext
8089fi
8090
8091    rm -rf conftest.a conftest.d
8092
8093fi
8094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
8095$as_echo "$gl_cv_func_realpath_works" >&6; }
8096  case "$gl_cv_func_realpath_works" in
8097    *yes)
8098
8099$as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
8100
8101      ;;
8102  esac
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112  case "$host_os" in
8113    mingw*) ;;
8114    *)      for ac_func in getcwd
8115do :
8116  ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
8117if test "x$ac_cv_func_getcwd" = xyes; then :
8118  cat >>confdefs.h <<_ACEOF
8119#define HAVE_GETCWD 1
8120_ACEOF
8121
8122fi
8123done
8124 ;;
8125  esac
8126
8127
8128
8129
8130
8131
8132  GNULIB_ACCESS=0;
8133  GNULIB_CHDIR=0;
8134  GNULIB_CHOWN=0;
8135  GNULIB_CLOSE=0;
8136  GNULIB_COPY_FILE_RANGE=0;
8137  GNULIB_DUP=0;
8138  GNULIB_DUP2=0;
8139  GNULIB_DUP3=0;
8140  GNULIB_ENVIRON=0;
8141  GNULIB_EUIDACCESS=0;
8142  GNULIB_EXECL=0;
8143  GNULIB_EXECLE=0;
8144  GNULIB_EXECLP=0;
8145  GNULIB_EXECV=0;
8146  GNULIB_EXECVE=0;
8147  GNULIB_EXECVP=0;
8148  GNULIB_EXECVPE=0;
8149  GNULIB_FACCESSAT=0;
8150  GNULIB_FCHDIR=0;
8151  GNULIB_FCHOWNAT=0;
8152  GNULIB_FDATASYNC=0;
8153  GNULIB_FSYNC=0;
8154  GNULIB_FTRUNCATE=0;
8155  GNULIB_GETCWD=0;
8156  GNULIB_GETDOMAINNAME=0;
8157  GNULIB_GETDTABLESIZE=0;
8158  GNULIB_GETENTROPY=0;
8159  GNULIB_GETGROUPS=0;
8160  GNULIB_GETHOSTNAME=0;
8161  GNULIB_GETLOGIN=0;
8162  GNULIB_GETLOGIN_R=0;
8163  GNULIB_GETOPT_POSIX=0;
8164  GNULIB_GETPAGESIZE=0;
8165  GNULIB_GETPASS=0;
8166  GNULIB_GETUSERSHELL=0;
8167  GNULIB_GROUP_MEMBER=0;
8168  GNULIB_ISATTY=0;
8169  GNULIB_LCHOWN=0;
8170  GNULIB_LINK=0;
8171  GNULIB_LINKAT=0;
8172  GNULIB_LSEEK=0;
8173  GNULIB_PIPE=0;
8174  GNULIB_PIPE2=0;
8175  GNULIB_PREAD=0;
8176  GNULIB_PWRITE=0;
8177  GNULIB_READ=0;
8178  GNULIB_READLINK=0;
8179  GNULIB_READLINKAT=0;
8180  GNULIB_RMDIR=0;
8181  GNULIB_SETHOSTNAME=0;
8182  GNULIB_SLEEP=0;
8183  GNULIB_SYMLINK=0;
8184  GNULIB_SYMLINKAT=0;
8185  GNULIB_TRUNCATE=0;
8186  GNULIB_TTYNAME_R=0;
8187  GNULIB_UNISTD_H_NONBLOCKING=0;
8188  GNULIB_UNISTD_H_SIGPIPE=0;
8189  GNULIB_UNLINK=0;
8190  GNULIB_UNLINKAT=0;
8191  GNULIB_USLEEP=0;
8192  GNULIB_WRITE=0;
8193    GNULIB_MDA_ACCESS=1;
8194  GNULIB_MDA_CHDIR=1;
8195  GNULIB_MDA_CLOSE=1;
8196  GNULIB_MDA_DUP=1;
8197  GNULIB_MDA_DUP2=1;
8198  GNULIB_MDA_EXECL=1;
8199  GNULIB_MDA_EXECLE=1;
8200  GNULIB_MDA_EXECLP=1;
8201  GNULIB_MDA_EXECV=1;
8202  GNULIB_MDA_EXECVE=1;
8203  GNULIB_MDA_EXECVP=1;
8204  GNULIB_MDA_EXECVPE=1;
8205  GNULIB_MDA_GETCWD=1;
8206  GNULIB_MDA_GETPID=1;
8207  GNULIB_MDA_ISATTY=1;
8208  GNULIB_MDA_LSEEK=1;
8209  GNULIB_MDA_READ=1;
8210  GNULIB_MDA_RMDIR=1;
8211  GNULIB_MDA_SWAB=1;
8212  GNULIB_MDA_UNLINK=1;
8213  GNULIB_MDA_WRITE=1;
8214    HAVE_CHOWN=1;
8215  HAVE_COPY_FILE_RANGE=1;
8216  HAVE_DUP3=1;
8217  HAVE_EUIDACCESS=1;
8218  HAVE_EXECVPE=1;
8219  HAVE_FACCESSAT=1;
8220  HAVE_FCHDIR=1;
8221  HAVE_FCHOWNAT=1;
8222  HAVE_FDATASYNC=1;
8223  HAVE_FSYNC=1;
8224  HAVE_FTRUNCATE=1;
8225  HAVE_GETDTABLESIZE=1;
8226  HAVE_GETENTROPY=1;
8227  HAVE_GETGROUPS=1;
8228  HAVE_GETHOSTNAME=1;
8229  HAVE_GETLOGIN=1;
8230  HAVE_GETPAGESIZE=1;
8231  HAVE_GETPASS=1;
8232  HAVE_GROUP_MEMBER=1;
8233  HAVE_LCHOWN=1;
8234  HAVE_LINK=1;
8235  HAVE_LINKAT=1;
8236  HAVE_PIPE=1;
8237  HAVE_PIPE2=1;
8238  HAVE_PREAD=1;
8239  HAVE_PWRITE=1;
8240  HAVE_READLINK=1;
8241  HAVE_READLINKAT=1;
8242  HAVE_SETHOSTNAME=1;
8243  HAVE_SLEEP=1;
8244  HAVE_SYMLINK=1;
8245  HAVE_SYMLINKAT=1;
8246  HAVE_UNLINKAT=1;
8247  HAVE_USLEEP=1;
8248  HAVE_DECL_ENVIRON=1;
8249  HAVE_DECL_EXECVPE=1;
8250  HAVE_DECL_FCHDIR=1;
8251  HAVE_DECL_FDATASYNC=1;
8252  HAVE_DECL_GETDOMAINNAME=1;
8253  HAVE_DECL_GETLOGIN=1;
8254  HAVE_DECL_GETLOGIN_R=1;
8255  HAVE_DECL_GETPAGESIZE=1;
8256  HAVE_DECL_GETUSERSHELL=1;
8257  HAVE_DECL_SETHOSTNAME=1;
8258  HAVE_DECL_TRUNCATE=1;
8259  HAVE_DECL_TTYNAME_R=1;
8260  HAVE_OS_H=0;
8261  HAVE_SYS_PARAM_H=0;
8262  REPLACE_ACCESS=0;
8263  REPLACE_CHOWN=0;
8264  REPLACE_CLOSE=0;
8265  REPLACE_DUP=0;
8266  REPLACE_DUP2=0;
8267  REPLACE_EXECL=0;
8268  REPLACE_EXECLE=0;
8269  REPLACE_EXECLP=0;
8270  REPLACE_EXECV=0;
8271  REPLACE_EXECVE=0;
8272  REPLACE_EXECVP=0;
8273  REPLACE_EXECVPE=0;
8274  REPLACE_FACCESSAT=0;
8275  REPLACE_FCHOWNAT=0;
8276  REPLACE_FTRUNCATE=0;
8277  REPLACE_GETCWD=0;
8278  REPLACE_GETDOMAINNAME=0;
8279  REPLACE_GETDTABLESIZE=0;
8280  REPLACE_GETLOGIN_R=0;
8281  REPLACE_GETGROUPS=0;
8282  REPLACE_GETPAGESIZE=0;
8283  REPLACE_GETPASS=0;
8284  REPLACE_ISATTY=0;
8285  REPLACE_LCHOWN=0;
8286  REPLACE_LINK=0;
8287  REPLACE_LINKAT=0;
8288  REPLACE_LSEEK=0;
8289  REPLACE_PREAD=0;
8290  REPLACE_PWRITE=0;
8291  REPLACE_READ=0;
8292  REPLACE_READLINK=0;
8293  REPLACE_READLINKAT=0;
8294  REPLACE_RMDIR=0;
8295  REPLACE_SLEEP=0;
8296  REPLACE_SYMLINK=0;
8297  REPLACE_SYMLINKAT=0;
8298  REPLACE_TRUNCATE=0;
8299  REPLACE_TTYNAME_R=0;
8300  REPLACE_UNLINK=0;
8301  REPLACE_UNLINKAT=0;
8302  REPLACE_USLEEP=0;
8303  REPLACE_WRITE=0;
8304  UNISTD_H_HAVE_SYS_RANDOM_H=0;
8305  UNISTD_H_HAVE_WINSOCK2_H=0;
8306  UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
8307
8308
8309
8310
8311
8312
8313
8314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8315$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
8316if ${ac_cv_type_uid_t+:} false; then :
8317  $as_echo_n "(cached) " >&6
8318else
8319  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8320/* end confdefs.h.  */
8321#include <sys/types.h>
8322
8323_ACEOF
8324if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8325  $EGREP "uid_t" >/dev/null 2>&1; then :
8326  ac_cv_type_uid_t=yes
8327else
8328  ac_cv_type_uid_t=no
8329fi
8330rm -f conftest*
8331
8332fi
8333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8334$as_echo "$ac_cv_type_uid_t" >&6; }
8335if test $ac_cv_type_uid_t = no; then
8336
8337$as_echo "#define uid_t int" >>confdefs.h
8338
8339
8340$as_echo "#define gid_t int" >>confdefs.h
8341
8342fi
8343
8344gl_mda_defines='
8345#if defined _WIN32 && !defined __CYGWIN__
8346#define access    _access
8347#define chdir     _chdir
8348#define chmod     _chmod
8349#define close     _close
8350#define creat     _creat
8351#define dup       _dup
8352#define dup2      _dup2
8353#define ecvt      _ecvt
8354#define execl     _execl
8355#define execle    _execle
8356#define execlp    _execlp
8357#define execv     _execv
8358#define execve    _execve
8359#define execvp    _execvp
8360#define execvpe   _execvpe
8361#define fcloseall _fcloseall
8362#define fcvt      _fcvt
8363#define fdopen    _fdopen
8364#define fileno    _fileno
8365#define gcvt      _gcvt
8366#define getcwd    _getcwd
8367#define getpid    _getpid
8368#define getw      _getw
8369#define isatty    _isatty
8370#define j0        _j0
8371#define j1        _j1
8372#define jn        _jn
8373#define lfind     _lfind
8374#define lsearch   _lsearch
8375#define lseek     _lseek
8376#define memccpy   _memccpy
8377#define mkdir     _mkdir
8378#define mktemp    _mktemp
8379#define open      _open
8380#define putenv    _putenv
8381#define putw      _putw
8382#define read      _read
8383#define rmdir     _rmdir
8384#define strdup    _strdup
8385#define swab      _swab
8386#define tempnam   _tempnam
8387#define tzset     _tzset
8388#define umask     _umask
8389#define unlink    _unlink
8390#define utime     _utime
8391#define wcsdup    _wcsdup
8392#define write     _write
8393#define y0        _y0
8394#define y1        _y1
8395#define yn        _yn
8396#endif
8397'
8398
8399
8400      for ac_header in unistd.h
8401do :
8402  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
8403if test "x$ac_cv_header_unistd_h" = xyes; then :
8404  cat >>confdefs.h <<_ACEOF
8405#define HAVE_UNISTD_H 1
8406_ACEOF
8407
8408fi
8409
8410done
8411
8412  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
8413$as_echo_n "checking for working chown... " >&6; }
8414if ${ac_cv_func_chown_works+:} false; then :
8415  $as_echo_n "(cached) " >&6
8416else
8417  if test "$cross_compiling" = yes; then :
8418  case "$host_os" in # ((
8419                           # Guess yes on Linux systems.
8420          linux-* | linux) ac_cv_func_chown_works="guessing yes" ;;
8421                           # Guess yes on glibc systems.
8422          *-gnu* | gnu*)   ac_cv_func_chown_works="guessing yes" ;;
8423                           # Guess no on native Windows.
8424          mingw*)          ac_cv_func_chown_works="guessing no" ;;
8425                           # If we don't know, obey --enable-cross-guesses.
8426          *)               ac_cv_func_chown_works="$gl_cross_guess_normal" ;;
8427        esac
8428
8429else
8430  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8431/* end confdefs.h.  */
8432$ac_includes_default
8433           #include <fcntl.h>
8434
8435
8436$gl_mda_defines
8437
8438int
8439main ()
8440{
8441
8442            char *f = "conftest.chown";
8443            struct stat before, after;
8444
8445            if (creat (f, 0600) < 0)
8446              return 1;
8447            if (stat (f, &before) < 0)
8448              return 1;
8449            if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
8450              return 1;
8451            if (stat (f, &after) < 0)
8452              return 1;
8453            return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
8454
8455  ;
8456  return 0;
8457}
8458
8459_ACEOF
8460if ac_fn_c_try_run "$LINENO"; then :
8461  ac_cv_func_chown_works=yes
8462else
8463  ac_cv_func_chown_works=no
8464fi
8465rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8466  conftest.$ac_objext conftest.beam conftest.$ac_ext
8467fi
8468
8469     rm -f conftest.chown
8470
8471fi
8472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
8473$as_echo "$ac_cv_func_chown_works" >&6; }
8474  case "$ac_cv_func_chown_works" in
8475    *yes)
8476
8477$as_echo "#define HAVE_CHOWN 1" >>confdefs.h
8478
8479      ;;
8480  esac
8481
8482
8483  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown dereferences symlinks" >&5
8484$as_echo_n "checking whether chown dereferences symlinks... " >&6; }
8485if ${gl_cv_func_chown_follows_symlink+:} false; then :
8486  $as_echo_n "(cached) " >&6
8487else
8488
8489      if test "$cross_compiling" = yes; then :
8490  gl_cv_func_chown_follows_symlink="guessing yes"
8491
8492else
8493  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8494/* end confdefs.h.  */
8495
8496#include <unistd.h>
8497#include <stdlib.h>
8498#include <errno.h>
8499
8500
8501$gl_mda_defines
8502
8503        int
8504        main ()
8505        {
8506          int result = 0;
8507          char const *dangling_symlink = "conftest.dangle";
8508
8509          unlink (dangling_symlink);
8510          if (symlink ("conftest.no-such", dangling_symlink))
8511            abort ();
8512
8513          /* Exit successfully on a conforming system,
8514             i.e., where chown must fail with ENOENT.  */
8515          if (chown (dangling_symlink, getuid (), getgid ()) == 0)
8516            result |= 1;
8517          if (errno != ENOENT)
8518            result |= 2;
8519          return result;
8520        }
8521
8522_ACEOF
8523if ac_fn_c_try_run "$LINENO"; then :
8524  gl_cv_func_chown_follows_symlink=yes
8525else
8526  gl_cv_func_chown_follows_symlink=no
8527fi
8528rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8529  conftest.$ac_objext conftest.beam conftest.$ac_ext
8530fi
8531
8532
8533
8534fi
8535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_follows_symlink" >&5
8536$as_echo "$gl_cv_func_chown_follows_symlink" >&6; }
8537
8538  case "$gl_cv_func_chown_follows_symlink" in
8539    *yes) ;;
8540    *)
8541
8542$as_echo "#define CHOWN_MODIFIES_SYMLINK 1" >>confdefs.h
8543
8544      ;;
8545  esac
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558    if test $ac_cv_func_chown = no; then
8559    HAVE_CHOWN=0
8560  else
8561        case "$gl_cv_func_chown_follows_symlink" in
8562      *yes) ;;
8563      *) REPLACE_CHOWN=1 ;;
8564    esac
8565
8566        case "$ac_cv_func_chown_works" in
8567      *no)
8568
8569$as_echo "#define CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE 1" >>confdefs.h
8570
8571        REPLACE_CHOWN=1
8572        ;;
8573    esac
8574
8575                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown honors trailing slash" >&5
8576$as_echo_n "checking whether chown honors trailing slash... " >&6; }
8577if ${gl_cv_func_chown_slash_works+:} false; then :
8578  $as_echo_n "(cached) " >&6
8579else
8580  touch conftest.file && rm -f conftest.link
8581       if test "$cross_compiling" = yes; then :
8582  case "$host_os" in
8583                    # Guess yes on glibc systems.
8584           *-gnu*)  gl_cv_func_chown_slash_works="guessing yes" ;;
8585                    # Guess yes on musl systems.
8586           *-musl*) gl_cv_func_chown_slash_works="guessing yes" ;;
8587                    # If we don't know, obey --enable-cross-guesses.
8588           *)       gl_cv_func_chown_slash_works="$gl_cross_guess_normal" ;;
8589         esac
8590
8591else
8592  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8593/* end confdefs.h.  */
8594
8595#include <unistd.h>
8596#include <stdlib.h>
8597#include <errno.h>
8598
8599
8600$gl_mda_defines
8601
8602int
8603main ()
8604{
8605if (symlink ("conftest.file", "conftest.link")) return 1;
8606          if (chown ("conftest.link/", getuid (), getgid ()) == 0) return 2;
8607
8608  ;
8609  return 0;
8610}
8611_ACEOF
8612if ac_fn_c_try_run "$LINENO"; then :
8613  gl_cv_func_chown_slash_works=yes
8614else
8615  gl_cv_func_chown_slash_works=no
8616fi
8617rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8618  conftest.$ac_objext conftest.beam conftest.$ac_ext
8619fi
8620
8621      rm -f conftest.link conftest.file
8622fi
8623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_slash_works" >&5
8624$as_echo "$gl_cv_func_chown_slash_works" >&6; }
8625    case "$gl_cv_func_chown_slash_works" in
8626      *yes) ;;
8627      *)
8628
8629$as_echo "#define CHOWN_TRAILING_SLASH_BUG 1" >>confdefs.h
8630
8631        REPLACE_CHOWN=1
8632        ;;
8633    esac
8634
8635        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown always updates ctime" >&5
8636$as_echo_n "checking whether chown always updates ctime... " >&6; }
8637if ${gl_cv_func_chown_ctime_works+:} false; then :
8638  $as_echo_n "(cached) " >&6
8639else
8640  if test "$cross_compiling" = yes; then :
8641  case "$host_os" in
8642                    # Guess yes on glibc systems.
8643           *-gnu*)  gl_cv_func_chown_ctime_works="guessing yes" ;;
8644                    # Guess yes on musl systems.
8645           *-musl*) gl_cv_func_chown_ctime_works="guessing yes" ;;
8646                    # If we don't know, obey --enable-cross-guesses.
8647           *)       gl_cv_func_chown_ctime_works="$gl_cross_guess_normal" ;;
8648         esac
8649
8650else
8651  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8652/* end confdefs.h.  */
8653
8654#include <unistd.h>
8655#include <stdlib.h>
8656#include <errno.h>
8657#include <fcntl.h>
8658#include <sys/stat.h>
8659
8660
8661$gl_mda_defines
8662
8663int
8664main ()
8665{
8666struct stat st1, st2;
8667          if (close (creat ("conftest.file", 0600))) return 1;
8668          if (stat ("conftest.file", &st1)) return 2;
8669          sleep (1);
8670          if (chown ("conftest.file", st1.st_uid, st1.st_gid)) return 3;
8671          if (stat ("conftest.file", &st2)) return 4;
8672          if (st2.st_ctime <= st1.st_ctime) return 5;
8673
8674  ;
8675  return 0;
8676}
8677_ACEOF
8678if ac_fn_c_try_run "$LINENO"; then :
8679  gl_cv_func_chown_ctime_works=yes
8680else
8681  gl_cv_func_chown_ctime_works=no
8682fi
8683rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8684  conftest.$ac_objext conftest.beam conftest.$ac_ext
8685fi
8686
8687      rm -f conftest.file
8688fi
8689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_ctime_works" >&5
8690$as_echo "$gl_cv_func_chown_ctime_works" >&6; }
8691    case "$gl_cv_func_chown_ctime_works" in
8692      *yes) ;;
8693      *)
8694
8695$as_echo "#define CHOWN_CHANGE_TIME_BUG 1" >>confdefs.h
8696
8697        REPLACE_CHOWN=1
8698        ;;
8699    esac
8700  fi
8701
8702
8703
8704
8705
8706  if test $ac_cv_func__set_invalid_parameter_handler = yes; then
8707    HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
8708
8709$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
8710
8711  else
8712    HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
8713  fi
8714
8715
8716
8717
8718
8719     GNULIB_OPENDIR=0;
8720  GNULIB_READDIR=0;
8721  GNULIB_REWINDDIR=0;
8722  GNULIB_CLOSEDIR=0;
8723  GNULIB_DIRFD=0;
8724  GNULIB_FDOPENDIR=0;
8725  GNULIB_SCANDIR=0;
8726  GNULIB_ALPHASORT=0;
8727    HAVE_OPENDIR=1;
8728  HAVE_READDIR=1;
8729  HAVE_REWINDDIR=1;
8730  HAVE_CLOSEDIR=1;
8731  HAVE_DECL_DIRFD=1;
8732  HAVE_DECL_FDOPENDIR=1;
8733  HAVE_FDOPENDIR=1;
8734  HAVE_SCANDIR=1;
8735  HAVE_ALPHASORT=1;
8736  REPLACE_OPENDIR=0;
8737  REPLACE_CLOSEDIR=0;
8738  REPLACE_DIRFD=0;
8739  REPLACE_FDOPENDIR=0;
8740
8741
8742  GNULIB_ISBLANK=0;
8743    HAVE_ISBLANK=1;
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
8755$as_echo_n "checking if environ is properly declared... " >&6; }
8756if ${gt_cv_var_environ_declaration+:} false; then :
8757  $as_echo_n "(cached) " >&6
8758else
8759  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8760/* end confdefs.h.  */
8761#if HAVE_UNISTD_H
8762     #include <unistd.h>
8763     #endif
8764     /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>.  */
8765     #include <stdlib.h>
8766
8767            extern struct { int foo; } environ;
8768int
8769main ()
8770{
8771environ.foo = 1;
8772  ;
8773  return 0;
8774}
8775_ACEOF
8776if ac_fn_c_try_compile "$LINENO"; then :
8777  gt_cv_var_environ_declaration=no
8778else
8779  gt_cv_var_environ_declaration=yes
8780fi
8781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8782fi
8783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
8784$as_echo "$gt_cv_var_environ_declaration" >&6; }
8785  if test $gt_cv_var_environ_declaration = yes; then
8786
8787$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
8788
8789  fi
8790
8791
8792  if test $gt_cv_var_environ_declaration != yes; then
8793    HAVE_DECL_ENVIRON=0
8794  fi
8795
8796
8797
8798  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
8799$as_echo_n "checking for complete errno.h... " >&6; }
8800if ${gl_cv_header_errno_h_complete+:} false; then :
8801  $as_echo_n "(cached) " >&6
8802else
8803
8804    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8805/* end confdefs.h.  */
8806
8807#include <errno.h>
8808#if !defined ETXTBSY
8809booboo
8810#endif
8811#if !defined ENOMSG
8812booboo
8813#endif
8814#if !defined EIDRM
8815booboo
8816#endif
8817#if !defined ENOLINK
8818booboo
8819#endif
8820#if !defined EPROTO
8821booboo
8822#endif
8823#if !defined EMULTIHOP
8824booboo
8825#endif
8826#if !defined EBADMSG
8827booboo
8828#endif
8829#if !defined EOVERFLOW
8830booboo
8831#endif
8832#if !defined ENOTSUP
8833booboo
8834#endif
8835#if !defined ENETRESET
8836booboo
8837#endif
8838#if !defined ECONNABORTED
8839booboo
8840#endif
8841#if !defined ESTALE
8842booboo
8843#endif
8844#if !defined EDQUOT
8845booboo
8846#endif
8847#if !defined ECANCELED
8848booboo
8849#endif
8850#if !defined EOWNERDEAD
8851booboo
8852#endif
8853#if !defined ENOTRECOVERABLE
8854booboo
8855#endif
8856#if !defined EILSEQ
8857booboo
8858#endif
8859
8860_ACEOF
8861if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8862  $EGREP "booboo" >/dev/null 2>&1; then :
8863  gl_cv_header_errno_h_complete=no
8864else
8865  gl_cv_header_errno_h_complete=yes
8866fi
8867rm -f conftest*
8868
8869
8870fi
8871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
8872$as_echo "$gl_cv_header_errno_h_complete" >&6; }
8873  if test $gl_cv_header_errno_h_complete = yes; then
8874    ERRNO_H=''
8875  else
8876
8877
8878
8879
8880
8881
8882
8883
8884     if test $gl_cv_have_include_next = yes; then
8885       gl_cv_next_errno_h='<'errno.h'>'
8886     else
8887       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
8888$as_echo_n "checking absolute name of <errno.h>... " >&6; }
8889if ${gl_cv_next_errno_h+:} false; then :
8890  $as_echo_n "(cached) " >&6
8891else
8892
8893
8894
8895  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8896/* end confdefs.h.  */
8897#include <errno.h>
8898_ACEOF
8899                case "$host_os" in
8900    aix*) gl_absname_cpp="$ac_cpp -C" ;;
8901    *)    gl_absname_cpp="$ac_cpp" ;;
8902  esac
8903
8904  case "$host_os" in
8905    mingw*)
8906                                          gl_dirsep_regex='[/\\]'
8907      ;;
8908    *)
8909      gl_dirsep_regex='\/'
8910      ;;
8911  esac
8912      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
8913  gl_header_literal_regex=`echo 'errno.h' \
8914                           | sed -e "$gl_make_literal_regex_sed"`
8915  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8916      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8917      s|^/[^/]|//&|
8918      p
8919      q
8920    }'
8921
8922        gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
8923  sed -n "$gl_absolute_header_sed"`
8924
8925           gl_header=$gl_cv_absolute_errno_h
8926           gl_cv_next_errno_h='"'$gl_header'"'
8927
8928
8929fi
8930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
8931$as_echo "$gl_cv_next_errno_h" >&6; }
8932     fi
8933     NEXT_ERRNO_H=$gl_cv_next_errno_h
8934
8935     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8936       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8937       gl_next_as_first_directive='<'errno.h'>'
8938     else
8939       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8940       gl_next_as_first_directive=$gl_cv_next_errno_h
8941     fi
8942     NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
8943
8944
8945
8946
8947    ERRNO_H='errno.h'
8948  fi
8949
8950   if test -n "$ERRNO_H"; then
8951  GL_GENERATE_ERRNO_H_TRUE=
8952  GL_GENERATE_ERRNO_H_FALSE='#'
8953else
8954  GL_GENERATE_ERRNO_H_TRUE='#'
8955  GL_GENERATE_ERRNO_H_FALSE=
8956fi
8957
8958
8959  if test -n "$ERRNO_H"; then
8960    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
8961$as_echo_n "checking for EMULTIHOP value... " >&6; }
8962if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
8963  $as_echo_n "(cached) " >&6
8964else
8965
8966      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8967/* end confdefs.h.  */
8968
8969#include <errno.h>
8970#ifdef EMULTIHOP
8971yes
8972#endif
8973
8974_ACEOF
8975if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8976  $EGREP "yes" >/dev/null 2>&1; then :
8977  gl_cv_header_errno_h_EMULTIHOP=yes
8978else
8979  gl_cv_header_errno_h_EMULTIHOP=no
8980fi
8981rm -f conftest*
8982
8983      if test $gl_cv_header_errno_h_EMULTIHOP = no; then
8984        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8985/* end confdefs.h.  */
8986
8987#define _XOPEN_SOURCE_EXTENDED 1
8988#include <errno.h>
8989#ifdef EMULTIHOP
8990yes
8991#endif
8992
8993_ACEOF
8994if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8995  $EGREP "yes" >/dev/null 2>&1; then :
8996  gl_cv_header_errno_h_EMULTIHOP=hidden
8997fi
8998rm -f conftest*
8999
9000        if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
9001                              if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP"        "
9002#define _XOPEN_SOURCE_EXTENDED 1
9003#include <errno.h>
9004/* The following two lines are a workaround against an autoconf-2.52 bug.  */
9005#include <stdio.h>
9006#include <stdlib.h>
9007"; then :
9008
9009fi
9010
9011        fi
9012      fi
9013
9014fi
9015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
9016$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
9017    case $gl_cv_header_errno_h_EMULTIHOP in
9018      yes | no)
9019        EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
9020        ;;
9021      *)
9022        EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
9023        ;;
9024    esac
9025
9026
9027  fi
9028
9029
9030  if test -n "$ERRNO_H"; then
9031    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
9032$as_echo_n "checking for ENOLINK value... " >&6; }
9033if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
9034  $as_echo_n "(cached) " >&6
9035else
9036
9037      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9038/* end confdefs.h.  */
9039
9040#include <errno.h>
9041#ifdef ENOLINK
9042yes
9043#endif
9044
9045_ACEOF
9046if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9047  $EGREP "yes" >/dev/null 2>&1; then :
9048  gl_cv_header_errno_h_ENOLINK=yes
9049else
9050  gl_cv_header_errno_h_ENOLINK=no
9051fi
9052rm -f conftest*
9053
9054      if test $gl_cv_header_errno_h_ENOLINK = no; then
9055        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9056/* end confdefs.h.  */
9057
9058#define _XOPEN_SOURCE_EXTENDED 1
9059#include <errno.h>
9060#ifdef ENOLINK
9061yes
9062#endif
9063
9064_ACEOF
9065if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9066  $EGREP "yes" >/dev/null 2>&1; then :
9067  gl_cv_header_errno_h_ENOLINK=hidden
9068fi
9069rm -f conftest*
9070
9071        if test $gl_cv_header_errno_h_ENOLINK = hidden; then
9072                              if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK"        "
9073#define _XOPEN_SOURCE_EXTENDED 1
9074#include <errno.h>
9075/* The following two lines are a workaround against an autoconf-2.52 bug.  */
9076#include <stdio.h>
9077#include <stdlib.h>
9078"; then :
9079
9080fi
9081
9082        fi
9083      fi
9084
9085fi
9086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
9087$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
9088    case $gl_cv_header_errno_h_ENOLINK in
9089      yes | no)
9090        ENOLINK_HIDDEN=0; ENOLINK_VALUE=
9091        ;;
9092      *)
9093        ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
9094        ;;
9095    esac
9096
9097
9098  fi
9099
9100
9101  if test -n "$ERRNO_H"; then
9102    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
9103$as_echo_n "checking for EOVERFLOW value... " >&6; }
9104if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
9105  $as_echo_n "(cached) " >&6
9106else
9107
9108      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9109/* end confdefs.h.  */
9110
9111#include <errno.h>
9112#ifdef EOVERFLOW
9113yes
9114#endif
9115
9116_ACEOF
9117if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9118  $EGREP "yes" >/dev/null 2>&1; then :
9119  gl_cv_header_errno_h_EOVERFLOW=yes
9120else
9121  gl_cv_header_errno_h_EOVERFLOW=no
9122fi
9123rm -f conftest*
9124
9125      if test $gl_cv_header_errno_h_EOVERFLOW = no; then
9126        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9127/* end confdefs.h.  */
9128
9129#define _XOPEN_SOURCE_EXTENDED 1
9130#include <errno.h>
9131#ifdef EOVERFLOW
9132yes
9133#endif
9134
9135_ACEOF
9136if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9137  $EGREP "yes" >/dev/null 2>&1; then :
9138  gl_cv_header_errno_h_EOVERFLOW=hidden
9139fi
9140rm -f conftest*
9141
9142        if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
9143                              if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW"        "
9144#define _XOPEN_SOURCE_EXTENDED 1
9145#include <errno.h>
9146/* The following two lines are a workaround against an autoconf-2.52 bug.  */
9147#include <stdio.h>
9148#include <stdlib.h>
9149"; then :
9150
9151fi
9152
9153        fi
9154      fi
9155
9156fi
9157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
9158$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
9159    case $gl_cv_header_errno_h_EOVERFLOW in
9160      yes | no)
9161        EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
9162        ;;
9163      *)
9164        EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
9165        ;;
9166    esac
9167
9168
9169  fi
9170
9171
9172ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
9173if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
9174  ac_have_decl=1
9175else
9176  ac_have_decl=0
9177fi
9178
9179cat >>confdefs.h <<_ACEOF
9180#define HAVE_DECL_STRERROR_R $ac_have_decl
9181_ACEOF
9182
9183for ac_func in strerror_r
9184do :
9185  ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
9186if test "x$ac_cv_func_strerror_r" = xyes; then :
9187  cat >>confdefs.h <<_ACEOF
9188#define HAVE_STRERROR_R 1
9189_ACEOF
9190
9191fi
9192done
9193
9194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
9195$as_echo_n "checking whether strerror_r returns char *... " >&6; }
9196if ${ac_cv_func_strerror_r_char_p+:} false; then :
9197  $as_echo_n "(cached) " >&6
9198else
9199
9200    ac_cv_func_strerror_r_char_p=no
9201    if test $ac_cv_have_decl_strerror_r = yes; then
9202      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9203/* end confdefs.h.  */
9204$ac_includes_default
9205int
9206main ()
9207{
9208
9209	  char buf[100];
9210	  char x = *strerror_r (0, buf, sizeof buf);
9211	  char *p = strerror_r (0, buf, sizeof buf);
9212	  return !p || x;
9213
9214  ;
9215  return 0;
9216}
9217_ACEOF
9218if ac_fn_c_try_compile "$LINENO"; then :
9219  ac_cv_func_strerror_r_char_p=yes
9220fi
9221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9222    else
9223      # strerror_r is not declared.  Choose between
9224      # systems that have relatively inaccessible declarations for the
9225      # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
9226      # former has a strerror_r that returns char*, while the latter
9227      # has a strerror_r that returns `int'.
9228      # This test should segfault on the DEC system.
9229      if test "$cross_compiling" = yes; then :
9230  :
9231else
9232  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9233/* end confdefs.h.  */
9234$ac_includes_default
9235	extern char *strerror_r ();
9236int
9237main ()
9238{
9239char buf[100];
9240	  char x = *strerror_r (0, buf, sizeof buf);
9241	  return ! isalpha (x);
9242  ;
9243  return 0;
9244}
9245_ACEOF
9246if ac_fn_c_try_run "$LINENO"; then :
9247  ac_cv_func_strerror_r_char_p=yes
9248fi
9249rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9250  conftest.$ac_objext conftest.beam conftest.$ac_ext
9251fi
9252
9253    fi
9254
9255fi
9256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
9257$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
9258if test $ac_cv_func_strerror_r_char_p = yes; then
9259
9260$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
9261
9262fi
9263
9264
9265
9266
9267ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
9268if test "x$ac_cv_have_decl_fchdir" = xyes; then :
9269  ac_have_decl=1
9270else
9271  ac_have_decl=0
9272fi
9273
9274cat >>confdefs.h <<_ACEOF
9275#define HAVE_DECL_FCHDIR $ac_have_decl
9276_ACEOF
9277
9278
9279  GNULIB_CREAT=0;
9280  GNULIB_FCNTL=0;
9281  GNULIB_NONBLOCKING=0;
9282  GNULIB_OPEN=0;
9283  GNULIB_OPENAT=0;
9284    GNULIB_MDA_CREAT=1;
9285  GNULIB_MDA_OPEN=1;
9286    HAVE_FCNTL=1;
9287  HAVE_OPENAT=1;
9288  REPLACE_CREAT=0;
9289  REPLACE_FCNTL=0;
9290  REPLACE_OPEN=0;
9291  REPLACE_OPENAT=0;
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
9303$as_echo_n "checking for working fcntl.h... " >&6; }
9304if ${gl_cv_header_working_fcntl_h+:} false; then :
9305  $as_echo_n "(cached) " >&6
9306else
9307  if test "$cross_compiling" = yes; then :
9308  case "$host_os" in
9309                  # Guess 'no' on native Windows.
9310          mingw*) gl_cv_header_working_fcntl_h='no' ;;
9311          *)      gl_cv_header_working_fcntl_h=cross-compiling ;;
9312        esac
9313
9314else
9315  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9316/* end confdefs.h.  */
9317#include <sys/types.h>
9318           #include <sys/stat.h>
9319           #if HAVE_UNISTD_H
9320           # include <unistd.h>
9321           #else /* on Windows with MSVC */
9322           # include <io.h>
9323           # include <stdlib.h>
9324           # defined sleep(n) _sleep ((n) * 1000)
9325           #endif
9326           #include <fcntl.h>
9327
9328
9329$gl_mda_defines
9330
9331           #ifndef O_NOATIME
9332            #define O_NOATIME 0
9333           #endif
9334           #ifndef O_NOFOLLOW
9335            #define O_NOFOLLOW 0
9336           #endif
9337           static int const constants[] =
9338            {
9339              O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
9340              O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
9341            };
9342
9343int
9344main ()
9345{
9346
9347            int result = !constants;
9348            #if HAVE_SYMLINK
9349            {
9350              static char const sym[] = "conftest.sym";
9351              if (symlink ("/dev/null", sym) != 0)
9352                result |= 2;
9353              else
9354                {
9355                  int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
9356                  if (fd >= 0)
9357                    {
9358                      close (fd);
9359                      result |= 4;
9360                    }
9361                }
9362              if (unlink (sym) != 0 || symlink (".", sym) != 0)
9363                result |= 2;
9364              else
9365                {
9366                  int fd = open (sym, O_RDONLY | O_NOFOLLOW);
9367                  if (fd >= 0)
9368                    {
9369                      close (fd);
9370                      result |= 4;
9371                    }
9372                }
9373              unlink (sym);
9374            }
9375            #endif
9376            {
9377              static char const file[] = "confdefs.h";
9378              int fd = open (file, O_RDONLY | O_NOATIME);
9379              if (fd < 0)
9380                result |= 8;
9381              else
9382                {
9383                  struct stat st0;
9384                  if (fstat (fd, &st0) != 0)
9385                    result |= 16;
9386                  else
9387                    {
9388                      char c;
9389                      sleep (1);
9390                      if (read (fd, &c, 1) != 1)
9391                        result |= 24;
9392                      else
9393                        {
9394                          if (close (fd) != 0)
9395                            result |= 32;
9396                          else
9397                            {
9398                              struct stat st1;
9399                              if (stat (file, &st1) != 0)
9400                                result |= 40;
9401                              else
9402                                if (st0.st_atime != st1.st_atime)
9403                                  result |= 64;
9404                            }
9405                        }
9406                    }
9407                }
9408            }
9409            return result;
9410  ;
9411  return 0;
9412}
9413_ACEOF
9414if ac_fn_c_try_run "$LINENO"; then :
9415  gl_cv_header_working_fcntl_h=yes
9416else
9417  case $? in #(
9418        4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
9419        64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
9420        68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
9421         *) gl_cv_header_working_fcntl_h='no';;
9422        esac
9423fi
9424rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9425  conftest.$ac_objext conftest.beam conftest.$ac_ext
9426fi
9427
9428
9429fi
9430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
9431$as_echo "$gl_cv_header_working_fcntl_h" >&6; }
9432
9433  case $gl_cv_header_working_fcntl_h in #(
9434  *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
9435  *) ac_val=1;;
9436  esac
9437
9438cat >>confdefs.h <<_ACEOF
9439#define HAVE_WORKING_O_NOATIME $ac_val
9440_ACEOF
9441
9442
9443  case $gl_cv_header_working_fcntl_h in #(
9444  *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
9445  *) ac_val=1;;
9446  esac
9447
9448cat >>confdefs.h <<_ACEOF
9449#define HAVE_WORKING_O_NOFOLLOW $ac_val
9450_ACEOF
9451
9452
9453
9454  ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
9455"
9456if test "x$ac_cv_type_pid_t" = xyes; then :
9457
9458else
9459                                          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9460/* end confdefs.h.  */
9461
9462          #if defined _WIN64 && !defined __CYGWIN__
9463          LLP64
9464          #endif
9465
9466int
9467main ()
9468{
9469
9470  ;
9471  return 0;
9472}
9473
9474_ACEOF
9475if ac_fn_c_try_compile "$LINENO"; then :
9476  gl_pid_type='int'
9477else
9478  gl_pid_type='__int64'
9479fi
9480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9481
9482cat >>confdefs.h <<_ACEOF
9483#define pid_t $gl_pid_type
9484_ACEOF
9485
9486
9487fi
9488
9489
9490ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
9491if test "x$ac_cv_type_mode_t" = xyes; then :
9492
9493else
9494
9495cat >>confdefs.h <<_ACEOF
9496#define mode_t int
9497_ACEOF
9498
9499fi
9500
9501
9502
9503
9504  GNULIB_FFS=0;
9505    HAVE_FFS=1;
9506  HAVE_STRCASECMP=1;
9507  HAVE_DECL_STRNCASECMP=1;
9508
9509
9510
9511
9512  GNULIB_FNMATCH=0;
9513    HAVE_FNMATCH=1;
9514  REPLACE_FNMATCH=0;
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531     if test $gl_cv_have_include_next = yes; then
9532       gl_cv_next_fnmatch_h='<'fnmatch.h'>'
9533     else
9534       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fnmatch.h>" >&5
9535$as_echo_n "checking absolute name of <fnmatch.h>... " >&6; }
9536if ${gl_cv_next_fnmatch_h+:} false; then :
9537  $as_echo_n "(cached) " >&6
9538else
9539
9540             if test $ac_cv_header_fnmatch_h = yes; then
9541
9542
9543
9544
9545  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9546/* end confdefs.h.  */
9547#include <fnmatch.h>
9548_ACEOF
9549                case "$host_os" in
9550    aix*) gl_absname_cpp="$ac_cpp -C" ;;
9551    *)    gl_absname_cpp="$ac_cpp" ;;
9552  esac
9553
9554  case "$host_os" in
9555    mingw*)
9556                                          gl_dirsep_regex='[/\\]'
9557      ;;
9558    *)
9559      gl_dirsep_regex='\/'
9560      ;;
9561  esac
9562      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9563  gl_header_literal_regex=`echo 'fnmatch.h' \
9564                           | sed -e "$gl_make_literal_regex_sed"`
9565  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9566      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9567      s|^/[^/]|//&|
9568      p
9569      q
9570    }'
9571
9572        gl_cv_absolute_fnmatch_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9573  sed -n "$gl_absolute_header_sed"`
9574
9575           gl_header=$gl_cv_absolute_fnmatch_h
9576           gl_cv_next_fnmatch_h='"'$gl_header'"'
9577          else
9578               gl_cv_next_fnmatch_h='<'fnmatch.h'>'
9579             fi
9580
9581
9582fi
9583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fnmatch_h" >&5
9584$as_echo "$gl_cv_next_fnmatch_h" >&6; }
9585     fi
9586     NEXT_FNMATCH_H=$gl_cv_next_fnmatch_h
9587
9588     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9589       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9590       gl_next_as_first_directive='<'fnmatch.h'>'
9591     else
9592       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9593       gl_next_as_first_directive=$gl_cv_next_fnmatch_h
9594     fi
9595     NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H=$gl_next_as_first_directive
9596
9597
9598
9599
9600
9601
9602
9603  if test $ac_cv_header_fnmatch_h = yes; then
9604    HAVE_FNMATCH_H=1
9605  else
9606    HAVE_FNMATCH_H=0
9607  fi
9608
9609
9610  FNMATCH_H=''
9611     if false; then
9612              FNMATCH_H=fnmatch.h
9613     else
9614       if test $ac_cv_header_fnmatch_h != yes; then
9615                  FNMATCH_H=fnmatch.h
9616       fi
9617     fi
9618
9619
9620   if test -n "$FNMATCH_H"; then
9621  GL_GENERATE_FNMATCH_H_TRUE=
9622  GL_GENERATE_FNMATCH_H_FALSE='#'
9623else
9624  GL_GENERATE_FNMATCH_H_TRUE='#'
9625  GL_GENERATE_FNMATCH_H_FALSE=
9626fi
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
9638$as_echo_n "checking for mbstate_t... " >&6; }
9639if ${ac_cv_type_mbstate_t+:} false; then :
9640  $as_echo_n "(cached) " >&6
9641else
9642  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9643/* end confdefs.h.  */
9644$ac_includes_default
9645             #include <wchar.h>
9646int
9647main ()
9648{
9649mbstate_t x; return sizeof x;
9650  ;
9651  return 0;
9652}
9653_ACEOF
9654if ac_fn_c_try_compile "$LINENO"; then :
9655  ac_cv_type_mbstate_t=yes
9656else
9657  ac_cv_type_mbstate_t=no
9658fi
9659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9660fi
9661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
9662$as_echo "$ac_cv_type_mbstate_t" >&6; }
9663   if test $ac_cv_type_mbstate_t = yes; then
9664
9665$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
9666
9667   else
9668
9669$as_echo "#define mbstate_t int" >>confdefs.h
9670
9671   fi
9672
9673
9674
9675
9676  GNULIB_ACOSF=0;
9677  GNULIB_ACOSL=0;
9678  GNULIB_ASINF=0;
9679  GNULIB_ASINL=0;
9680  GNULIB_ATANF=0;
9681  GNULIB_ATANL=0;
9682  GNULIB_ATAN2F=0;
9683  GNULIB_CBRT=0;
9684  GNULIB_CBRTF=0;
9685  GNULIB_CBRTL=0;
9686  GNULIB_CEIL=0;
9687  GNULIB_CEILF=0;
9688  GNULIB_CEILL=0;
9689  GNULIB_COPYSIGN=0;
9690  GNULIB_COPYSIGNF=0;
9691  GNULIB_COPYSIGNL=0;
9692  GNULIB_COSF=0;
9693  GNULIB_COSL=0;
9694  GNULIB_COSHF=0;
9695  GNULIB_EXPF=0;
9696  GNULIB_EXPL=0;
9697  GNULIB_EXP2=0;
9698  GNULIB_EXP2F=0;
9699  GNULIB_EXP2L=0;
9700  GNULIB_EXPM1=0;
9701  GNULIB_EXPM1F=0;
9702  GNULIB_EXPM1L=0;
9703  GNULIB_FABSF=0;
9704  GNULIB_FABSL=0;
9705  GNULIB_FLOOR=0;
9706  GNULIB_FLOORF=0;
9707  GNULIB_FLOORL=0;
9708  GNULIB_FMA=0;
9709  GNULIB_FMAF=0;
9710  GNULIB_FMAL=0;
9711  GNULIB_FMOD=0;
9712  GNULIB_FMODF=0;
9713  GNULIB_FMODL=0;
9714  GNULIB_FREXPF=0;
9715  GNULIB_FREXP=0;
9716  GNULIB_FREXPL=0;
9717  GNULIB_HYPOT=0;
9718  GNULIB_HYPOTF=0;
9719  GNULIB_HYPOTL=0;
9720  GNULIB_ILOGB=0;
9721  GNULIB_ILOGBF=0;
9722  GNULIB_ILOGBL=0;
9723  GNULIB_ISFINITE=0;
9724  GNULIB_ISINF=0;
9725  GNULIB_ISNAN=0;
9726  GNULIB_ISNANF=0;
9727  GNULIB_ISNAND=0;
9728  GNULIB_ISNANL=0;
9729  GNULIB_LDEXPF=0;
9730  GNULIB_LDEXPL=0;
9731  GNULIB_LOG=0;
9732  GNULIB_LOGF=0;
9733  GNULIB_LOGL=0;
9734  GNULIB_LOG10=0;
9735  GNULIB_LOG10F=0;
9736  GNULIB_LOG10L=0;
9737  GNULIB_LOG1P=0;
9738  GNULIB_LOG1PF=0;
9739  GNULIB_LOG1PL=0;
9740  GNULIB_LOG2=0;
9741  GNULIB_LOG2F=0;
9742  GNULIB_LOG2L=0;
9743  GNULIB_LOGB=0;
9744  GNULIB_LOGBF=0;
9745  GNULIB_LOGBL=0;
9746  GNULIB_MODF=0;
9747  GNULIB_MODFF=0;
9748  GNULIB_MODFL=0;
9749  GNULIB_POWF=0;
9750  GNULIB_REMAINDER=0;
9751  GNULIB_REMAINDERF=0;
9752  GNULIB_REMAINDERL=0;
9753  GNULIB_RINT=0;
9754  GNULIB_RINTF=0;
9755  GNULIB_RINTL=0;
9756  GNULIB_ROUND=0;
9757  GNULIB_ROUNDF=0;
9758  GNULIB_ROUNDL=0;
9759  GNULIB_SIGNBIT=0;
9760  GNULIB_SINF=0;
9761  GNULIB_SINL=0;
9762  GNULIB_SINHF=0;
9763  GNULIB_SQRTF=0;
9764  GNULIB_SQRTL=0;
9765  GNULIB_TANF=0;
9766  GNULIB_TANL=0;
9767  GNULIB_TANHF=0;
9768  GNULIB_TRUNC=0;
9769  GNULIB_TRUNCF=0;
9770  GNULIB_TRUNCL=0;
9771    GNULIB_MDA_J0=1;
9772  GNULIB_MDA_J1=1;
9773  GNULIB_MDA_JN=1;
9774  GNULIB_MDA_Y0=1;
9775  GNULIB_MDA_Y1=1;
9776  GNULIB_MDA_YN=1;
9777    HAVE_ACOSF=1;
9778  HAVE_ACOSL=1;
9779  HAVE_ASINF=1;
9780  HAVE_ASINL=1;
9781  HAVE_ATANF=1;
9782  HAVE_ATANL=1;
9783  HAVE_ATAN2F=1;
9784  HAVE_CBRT=1;
9785  HAVE_CBRTF=1;
9786  HAVE_CBRTL=1;
9787  HAVE_COPYSIGN=1;
9788  HAVE_COPYSIGNL=1;
9789  HAVE_COSF=1;
9790  HAVE_COSL=1;
9791  HAVE_COSHF=1;
9792  HAVE_EXPF=1;
9793  HAVE_EXPL=1;
9794  HAVE_EXPM1=1;
9795  HAVE_EXPM1F=1;
9796  HAVE_FABSF=1;
9797  HAVE_FABSL=1;
9798  HAVE_FMA=1;
9799  HAVE_FMAF=1;
9800  HAVE_FMAL=1;
9801  HAVE_FMODF=1;
9802  HAVE_FMODL=1;
9803  HAVE_FREXPF=1;
9804  HAVE_HYPOTF=1;
9805  HAVE_HYPOTL=1;
9806  HAVE_ILOGB=1;
9807  HAVE_ILOGBF=1;
9808  HAVE_ILOGBL=1;
9809  HAVE_ISNANF=1;
9810  HAVE_ISNAND=1;
9811  HAVE_ISNANL=1;
9812  HAVE_LDEXPF=1;
9813  HAVE_LOGF=1;
9814  HAVE_LOGL=1;
9815  HAVE_LOG10F=1;
9816  HAVE_LOG10L=1;
9817  HAVE_LOG1P=1;
9818  HAVE_LOG1PF=1;
9819  HAVE_LOG1PL=1;
9820  HAVE_LOGBF=1;
9821  HAVE_LOGBL=1;
9822  HAVE_MODFF=1;
9823  HAVE_MODFL=1;
9824  HAVE_POWF=1;
9825  HAVE_REMAINDER=1;
9826  HAVE_REMAINDERF=1;
9827  HAVE_RINT=1;
9828  HAVE_RINTL=1;
9829  HAVE_SINF=1;
9830  HAVE_SINL=1;
9831  HAVE_SINHF=1;
9832  HAVE_SQRTF=1;
9833  HAVE_SQRTL=1;
9834  HAVE_TANF=1;
9835  HAVE_TANL=1;
9836  HAVE_TANHF=1;
9837  HAVE_DECL_ACOSL=1;
9838  HAVE_DECL_ASINL=1;
9839  HAVE_DECL_ATANL=1;
9840  HAVE_DECL_CBRTF=1;
9841  HAVE_DECL_CBRTL=1;
9842  HAVE_DECL_CEILF=1;
9843  HAVE_DECL_CEILL=1;
9844  HAVE_DECL_COPYSIGNF=1;
9845  HAVE_DECL_COSL=1;
9846  HAVE_DECL_EXPL=1;
9847  HAVE_DECL_EXP2=1;
9848  HAVE_DECL_EXP2F=1;
9849  HAVE_DECL_EXP2L=1;
9850  HAVE_DECL_EXPM1L=1;
9851  HAVE_DECL_FLOORF=1;
9852  HAVE_DECL_FLOORL=1;
9853  HAVE_DECL_FREXPL=1;
9854  HAVE_DECL_LDEXPL=1;
9855  HAVE_DECL_LOGL=1;
9856  HAVE_DECL_LOG10L=1;
9857  HAVE_DECL_LOG2=1;
9858  HAVE_DECL_LOG2F=1;
9859  HAVE_DECL_LOG2L=1;
9860  HAVE_DECL_LOGB=1;
9861  HAVE_DECL_REMAINDER=1;
9862  HAVE_DECL_REMAINDERL=1;
9863  HAVE_DECL_RINTF=1;
9864  HAVE_DECL_ROUND=1;
9865  HAVE_DECL_ROUNDF=1;
9866  HAVE_DECL_ROUNDL=1;
9867  HAVE_DECL_SINL=1;
9868  HAVE_DECL_SQRTL=1;
9869  HAVE_DECL_TANL=1;
9870  HAVE_DECL_TRUNC=1;
9871  HAVE_DECL_TRUNCF=1;
9872  HAVE_DECL_TRUNCL=1;
9873  REPLACE_ACOSF=0;
9874  REPLACE_ASINF=0;
9875  REPLACE_ATANF=0;
9876  REPLACE_ATAN2F=0;
9877  REPLACE_CBRTF=0;
9878  REPLACE_CBRTL=0;
9879  REPLACE_CEIL=0;
9880  REPLACE_CEILF=0;
9881  REPLACE_CEILL=0;
9882  REPLACE_COSF=0;
9883  REPLACE_COSHF=0;
9884  REPLACE_EXPF=0;
9885  REPLACE_EXPL=0;
9886  REPLACE_EXPM1=0;
9887  REPLACE_EXPM1F=0;
9888  REPLACE_EXPM1L=0;
9889  REPLACE_EXP2=0;
9890  REPLACE_EXP2L=0;
9891  REPLACE_FABSL=0;
9892  REPLACE_FLOOR=0;
9893  REPLACE_FLOORF=0;
9894  REPLACE_FLOORL=0;
9895  REPLACE_FMA=0;
9896  REPLACE_FMAF=0;
9897  REPLACE_FMAL=0;
9898  REPLACE_FMOD=0;
9899  REPLACE_FMODF=0;
9900  REPLACE_FMODL=0;
9901  REPLACE_FREXPF=0;
9902  REPLACE_FREXP=0;
9903  REPLACE_FREXPL=0;
9904  REPLACE_HUGE_VAL=0;
9905  REPLACE_HYPOT=0;
9906  REPLACE_HYPOTF=0;
9907  REPLACE_HYPOTL=0;
9908  REPLACE_ILOGB=0;
9909  REPLACE_ILOGBF=0;
9910  REPLACE_ILOGBL=0;
9911  REPLACE_ISFINITE=0;
9912  REPLACE_ISINF=0;
9913  REPLACE_ISNAN=0;
9914  REPLACE_LDEXPL=0;
9915  REPLACE_LOG=0;
9916  REPLACE_LOGF=0;
9917  REPLACE_LOGL=0;
9918  REPLACE_LOG10=0;
9919  REPLACE_LOG10F=0;
9920  REPLACE_LOG10L=0;
9921  REPLACE_LOG1P=0;
9922  REPLACE_LOG1PF=0;
9923  REPLACE_LOG1PL=0;
9924  REPLACE_LOG2=0;
9925  REPLACE_LOG2F=0;
9926  REPLACE_LOG2L=0;
9927  REPLACE_LOGB=0;
9928  REPLACE_LOGBF=0;
9929  REPLACE_LOGBL=0;
9930  REPLACE_MODF=0;
9931  REPLACE_MODFF=0;
9932  REPLACE_MODFL=0;
9933  REPLACE_NAN=0;
9934  REPLACE_REMAINDER=0;
9935  REPLACE_REMAINDERF=0;
9936  REPLACE_REMAINDERL=0;
9937  REPLACE_RINTL=0;
9938  REPLACE_ROUND=0;
9939  REPLACE_ROUNDF=0;
9940  REPLACE_ROUNDL=0;
9941  REPLACE_SIGNBIT=0;
9942  REPLACE_SIGNBIT_USING_BUILTINS=0;
9943  REPLACE_SINF=0;
9944  REPLACE_SINHF=0;
9945  REPLACE_SQRTF=0;
9946  REPLACE_SQRTL=0;
9947  REPLACE_TANF=0;
9948  REPLACE_TANHF=0;
9949  REPLACE_TRUNC=0;
9950  REPLACE_TRUNCF=0;
9951  REPLACE_TRUNCL=0;
9952
9953
9954  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
9955$as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
9956if ${gl_cv_func_frexp_no_libm+:} false; then :
9957  $as_echo_n "(cached) " >&6
9958else
9959
9960      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9961/* end confdefs.h.  */
9962#include <math.h>
9963             double x;
9964int
9965main ()
9966{
9967int e; return frexp (x, &e) > 0;
9968  ;
9969  return 0;
9970}
9971_ACEOF
9972if ac_fn_c_try_link "$LINENO"; then :
9973  gl_cv_func_frexp_no_libm=yes
9974else
9975  gl_cv_func_frexp_no_libm=no
9976fi
9977rm -f core conftest.err conftest.$ac_objext \
9978    conftest$ac_exeext conftest.$ac_ext
9979
9980fi
9981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
9982$as_echo "$gl_cv_func_frexp_no_libm" >&6; }
9983
9984ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
9985if test "x$ac_cv_have_decl_alarm" = xyes; then :
9986  ac_have_decl=1
9987else
9988  ac_have_decl=0
9989fi
9990
9991cat >>confdefs.h <<_ACEOF
9992#define HAVE_DECL_ALARM $ac_have_decl
9993_ACEOF
9994
9995
9996
9997
9998  FREXP_LIBM=
9999  if test $gl_cv_func_frexp_no_libm = no; then
10000    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5
10001$as_echo_n "checking whether frexp() can be used with libm... " >&6; }
10002if ${gl_cv_func_frexp_in_libm+:} false; then :
10003  $as_echo_n "(cached) " >&6
10004else
10005
10006        save_LIBS="$LIBS"
10007        LIBS="$LIBS -lm"
10008        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10009/* end confdefs.h.  */
10010#include <math.h>
10011               double x;
10012int
10013main ()
10014{
10015int e; return frexp (x, &e) > 0;
10016  ;
10017  return 0;
10018}
10019_ACEOF
10020if ac_fn_c_try_link "$LINENO"; then :
10021  gl_cv_func_frexp_in_libm=yes
10022else
10023  gl_cv_func_frexp_in_libm=no
10024fi
10025rm -f core conftest.err conftest.$ac_objext \
10026    conftest$ac_exeext conftest.$ac_ext
10027        LIBS="$save_LIBS"
10028
10029fi
10030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5
10031$as_echo "$gl_cv_func_frexp_in_libm" >&6; }
10032    if test $gl_cv_func_frexp_in_libm = yes; then
10033      FREXP_LIBM=-lm
10034    fi
10035  fi
10036  if test $gl_cv_func_frexp_no_libm = yes \
10037     || test $gl_cv_func_frexp_in_libm = yes; then
10038    save_LIBS="$LIBS"
10039    LIBS="$LIBS $FREXP_LIBM"
10040
10041
10042
10043  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
10044$as_echo_n "checking whether frexp works... " >&6; }
10045if ${gl_cv_func_frexp_works+:} false; then :
10046  $as_echo_n "(cached) " >&6
10047else
10048
10049      if test "$cross_compiling" = yes; then :
10050  case "$host_os" in
10051           netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;;
10052           mingw*) # Guess yes with MSVC, no with mingw.
10053             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10054/* end confdefs.h.  */
10055
10056#ifdef _MSC_VER
10057 Good
10058#endif
10059
10060_ACEOF
10061if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10062  $EGREP "Good" >/dev/null 2>&1; then :
10063  gl_cv_func_frexp_works="guessing yes"
10064else
10065  gl_cv_func_frexp_works="guessing no"
10066fi
10067rm -f conftest*
10068
10069             ;;
10070           *) gl_cv_func_frexp_works="guessing yes" ;;
10071         esac
10072
10073else
10074  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10075/* end confdefs.h.  */
10076
10077#include <float.h>
10078#include <math.h>
10079#include <string.h>
10080#if HAVE_DECL_ALARM
10081# include <signal.h>
10082# include <unistd.h>
10083#endif
10084/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
10085   ICC 10.0 has a bug when optimizing the expression -zero.
10086   The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
10087   to PowerPC on Mac OS X 10.5.  */
10088#if defined __hpux || defined __sgi || defined __ICC
10089static double
10090compute_minus_zero (void)
10091{
10092  return -DBL_MIN * DBL_MIN;
10093}
10094# define minus_zero compute_minus_zero ()
10095#else
10096double minus_zero = -0.0;
10097#endif
10098int main()
10099{
10100  int result = 0;
10101  int i;
10102  volatile double x;
10103  double zero = 0.0;
10104#if HAVE_DECL_ALARM
10105  /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
10106     number.  Let the test fail in this case.  */
10107  signal (SIGALRM, SIG_DFL);
10108  alarm (5);
10109#endif
10110  /* Test on denormalized numbers.  */
10111  for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
10112    ;
10113  if (x > 0.0)
10114    {
10115      int exp;
10116      double y = frexp (x, &exp);
10117      /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
10118         On NetBSD: y = 0.75. Correct: y = 0.5.  */
10119      if (y != 0.5)
10120        result |= 1;
10121    }
10122  /* Test on infinite numbers.  */
10123  x = 1.0 / zero;
10124  {
10125    int exp;
10126    double y = frexp (x, &exp);
10127    if (y != x)
10128      result |= 2;
10129  }
10130  /* Test on negative zero.  */
10131  x = minus_zero;
10132  {
10133    int exp;
10134    double y = frexp (x, &exp);
10135    if (memcmp (&y, &x, sizeof x))
10136      result |= 4;
10137  }
10138  return result;
10139}
10140_ACEOF
10141if ac_fn_c_try_run "$LINENO"; then :
10142  gl_cv_func_frexp_works=yes
10143else
10144  gl_cv_func_frexp_works=no
10145fi
10146rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10147  conftest.$ac_objext conftest.beam conftest.$ac_ext
10148fi
10149
10150
10151fi
10152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
10153$as_echo "$gl_cv_func_frexp_works" >&6; }
10154
10155    LIBS="$save_LIBS"
10156    case "$gl_cv_func_frexp_works" in
10157      *yes) gl_func_frexp=yes ;;
10158      *)    gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;;
10159    esac
10160  else
10161    gl_func_frexp=no
10162  fi
10163  if test $gl_func_frexp = yes; then
10164
10165$as_echo "#define HAVE_FREXP 1" >>confdefs.h
10166
10167  fi
10168
10169
10170
10171  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
10172$as_echo_n "checking whether long double and double are the same... " >&6; }
10173if ${gl_cv_long_double_equals_double+:} false; then :
10174  $as_echo_n "(cached) " >&6
10175else
10176  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10177/* end confdefs.h.  */
10178#include <float.h>
10179int
10180main ()
10181{
10182typedef int check[sizeof (long double) == sizeof (double)
10183                              && LDBL_MANT_DIG == DBL_MANT_DIG
10184                              && LDBL_MAX_EXP == DBL_MAX_EXP
10185                              && LDBL_MIN_EXP == DBL_MIN_EXP
10186                              ? 1 : -1];
10187
10188  ;
10189  return 0;
10190}
10191_ACEOF
10192if ac_fn_c_try_compile "$LINENO"; then :
10193  gl_cv_long_double_equals_double=yes
10194else
10195  gl_cv_long_double_equals_double=no
10196fi
10197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10198
10199fi
10200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
10201$as_echo "$gl_cv_long_double_equals_double" >&6; }
10202  if test $gl_cv_long_double_equals_double = yes; then
10203
10204$as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
10205
10206    HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
10207  else
10208    HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
10209  fi
10210
10211
10212
10213
10214
10215
10216
10217
10218      ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
10219"
10220if test "x$ac_cv_have_decl_frexpl" = xyes; then :
10221
10222else
10223  HAVE_DECL_FREXPL=0
10224fi
10225
10226
10227  FREXPL_LIBM=
10228  if test $HAVE_DECL_FREXPL = 1; then
10229
10230  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
10231$as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
10232if ${gl_cv_func_frexpl_no_libm+:} false; then :
10233  $as_echo_n "(cached) " >&6
10234else
10235
10236      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10237/* end confdefs.h.  */
10238#include <math.h>
10239             long double x;
10240int
10241main ()
10242{
10243int e; return frexpl (x, &e) > 0;
10244  ;
10245  return 0;
10246}
10247_ACEOF
10248if ac_fn_c_try_link "$LINENO"; then :
10249  gl_cv_func_frexpl_no_libm=yes
10250else
10251  gl_cv_func_frexpl_no_libm=no
10252fi
10253rm -f core conftest.err conftest.$ac_objext \
10254    conftest$ac_exeext conftest.$ac_ext
10255
10256fi
10257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
10258$as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
10259
10260    if test $gl_cv_func_frexpl_no_libm = no; then
10261      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5
10262$as_echo_n "checking whether frexpl() can be used with libm... " >&6; }
10263if ${gl_cv_func_frexpl_in_libm+:} false; then :
10264  $as_echo_n "(cached) " >&6
10265else
10266
10267          save_LIBS="$LIBS"
10268          LIBS="$LIBS -lm"
10269          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10270/* end confdefs.h.  */
10271#include <math.h>
10272                 long double x;
10273int
10274main ()
10275{
10276int e; return frexpl (x, &e) > 0;
10277  ;
10278  return 0;
10279}
10280_ACEOF
10281if ac_fn_c_try_link "$LINENO"; then :
10282  gl_cv_func_frexpl_in_libm=yes
10283else
10284  gl_cv_func_frexpl_in_libm=no
10285fi
10286rm -f core conftest.err conftest.$ac_objext \
10287    conftest$ac_exeext conftest.$ac_ext
10288          LIBS="$save_LIBS"
10289
10290fi
10291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5
10292$as_echo "$gl_cv_func_frexpl_in_libm" >&6; }
10293      if test $gl_cv_func_frexpl_in_libm = yes; then
10294        FREXPL_LIBM=-lm
10295      fi
10296    fi
10297    if test $gl_cv_func_frexpl_no_libm = yes \
10298       || test $gl_cv_func_frexpl_in_libm = yes; then
10299      save_LIBS="$LIBS"
10300      LIBS="$LIBS $FREXPL_LIBM"
10301
10302
10303     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
10304$as_echo_n "checking whether frexpl works... " >&6; }
10305if ${gl_cv_func_frexpl_works+:} false; then :
10306  $as_echo_n "(cached) " >&6
10307else
10308
10309      if test "$cross_compiling" = yes; then :
10310
10311         case "$host_os" in
10312           aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
10313              gl_cv_func_frexpl_works="guessing no";;
10314           *) gl_cv_func_frexpl_works="guessing yes";;
10315         esac
10316
10317else
10318  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10319/* end confdefs.h.  */
10320
10321#include <float.h>
10322#include <math.h>
10323/* Override the values of <float.h>, like done in float.in.h.  */
10324#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
10325# undef LDBL_MIN_EXP
10326# define LDBL_MIN_EXP    (-16381)
10327#endif
10328#if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__)
10329# undef LDBL_MIN_EXP
10330# define LDBL_MIN_EXP    (-16381)
10331#endif
10332#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
10333# undef LDBL_MIN_EXP
10334# define LDBL_MIN_EXP DBL_MIN_EXP
10335#endif
10336#if defined __sgi && (LDBL_MANT_DIG >= 106)
10337# if defined __GNUC__
10338#  undef LDBL_MIN_EXP
10339#  define LDBL_MIN_EXP DBL_MIN_EXP
10340# endif
10341#endif
10342extern
10343#ifdef __cplusplus
10344"C"
10345#endif
10346long double frexpl (long double, int *);
10347long double zero = 0.0L;
10348int main()
10349{
10350  int result = 0;
10351  volatile long double x;
10352  /* Test on finite numbers that fails on AIX 5.1.  */
10353  x = 16.0L;
10354  {
10355    int exp = -9999;
10356    frexpl (x, &exp);
10357    if (exp != 5)
10358      result |= 1;
10359  }
10360  /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
10361     function returns an invalid (incorrectly normalized) value: it returns
10362               y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
10363     but the correct result is
10364          0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 }  */
10365  x = 1.01L;
10366  {
10367    int exp = -9999;
10368    long double y = frexpl (x, &exp);
10369    if (!(exp == 1 && y == 0.505L))
10370      result |= 2;
10371  }
10372  /* Test on large finite numbers.  This fails on BeOS at i = 16322, while
10373     LDBL_MAX_EXP = 16384.
10374     In the loop end test, we test x against Infinity, rather than comparing
10375     i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP.  */
10376  {
10377    int i;
10378    for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
10379      {
10380        int exp = -9999;
10381        frexpl (x, &exp);
10382        if (exp != i)
10383          {
10384            result |= 4;
10385            break;
10386          }
10387      }
10388  }
10389  /* Test on denormalized numbers.  */
10390  {
10391    int i;
10392    for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
10393      ;
10394    if (x > 0.0L)
10395      {
10396        int exp;
10397        long double y = frexpl (x, &exp);
10398        /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
10399           exp = -16382, y = 0.5.  On Mac OS X 10.5: exp = -16384, y = 0.5.  */
10400        if (exp != LDBL_MIN_EXP - 1)
10401          result |= 8;
10402      }
10403  }
10404  /* Test on infinite numbers.  */
10405  /* The Microsoft MSVC 14 compiler chokes on the expression 1.0 / 0.0.  */
10406  x = 1.0L / zero;
10407  {
10408    int exp;
10409    long double y = frexpl (x, &exp);
10410    if (y != x)
10411      result |= 16;
10412  }
10413  return result;
10414}
10415_ACEOF
10416if ac_fn_c_try_run "$LINENO"; then :
10417  gl_cv_func_frexpl_works=yes
10418else
10419  gl_cv_func_frexpl_works=no
10420fi
10421rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10422  conftest.$ac_objext conftest.beam conftest.$ac_ext
10423fi
10424
10425
10426fi
10427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
10428$as_echo "$gl_cv_func_frexpl_works" >&6; }
10429
10430      LIBS="$save_LIBS"
10431      case "$gl_cv_func_frexpl_works" in
10432        *yes) gl_func_frexpl=yes ;;
10433        *)    gl_func_frexpl=no; REPLACE_FREXPL=1 ;;
10434      esac
10435    else
10436      gl_func_frexpl=no
10437    fi
10438    if test $gl_func_frexpl = yes; then
10439
10440$as_echo "#define HAVE_FREXPL 1" >>confdefs.h
10441
10442    fi
10443  fi
10444  if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
10445        if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
10446
10447      FREXPL_LIBM="$FREXP_LIBM"
10448    else
10449      FREXPL_LIBM=
10450    fi
10451  fi
10452
10453
10454
10455     GNULIB_FCHMODAT=0;
10456  GNULIB_FSTAT=0;
10457  GNULIB_FSTATAT=0;
10458  GNULIB_FUTIMENS=0;
10459  GNULIB_GETUMASK=0;
10460  GNULIB_LCHMOD=0;
10461  GNULIB_LSTAT=0;
10462  GNULIB_MKDIR=0;
10463  GNULIB_MKDIRAT=0;
10464  GNULIB_MKFIFO=0;
10465  GNULIB_MKFIFOAT=0;
10466  GNULIB_MKNOD=0;
10467  GNULIB_MKNODAT=0;
10468  GNULIB_STAT=0;
10469  GNULIB_UTIMENSAT=0;
10470  GNULIB_OVERRIDES_STRUCT_STAT=0;
10471    GNULIB_MDA_CHMOD=1;
10472  GNULIB_MDA_MKDIR=1;
10473  GNULIB_MDA_UMASK=1;
10474    HAVE_FCHMODAT=1;
10475  HAVE_FSTATAT=1;
10476  HAVE_FUTIMENS=1;
10477  HAVE_GETUMASK=1;
10478  HAVE_LCHMOD=1;
10479  HAVE_LSTAT=1;
10480  HAVE_MKDIRAT=1;
10481  HAVE_MKFIFO=1;
10482  HAVE_MKFIFOAT=1;
10483  HAVE_MKNOD=1;
10484  HAVE_MKNODAT=1;
10485  HAVE_UTIMENSAT=1;
10486  REPLACE_FCHMODAT=0;
10487  REPLACE_FSTAT=0;
10488  REPLACE_FSTATAT=0;
10489  REPLACE_FUTIMENS=0;
10490  REPLACE_LSTAT=0;
10491  REPLACE_MKDIR=0;
10492  REPLACE_MKFIFO=0;
10493  REPLACE_MKFIFOAT=0;
10494  REPLACE_MKNOD=0;
10495  REPLACE_MKNODAT=0;
10496  REPLACE_STAT=0;
10497  REPLACE_UTIMENSAT=0;
10498
10499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
10500$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
10501if ${ac_cv_header_stat_broken+:} false; then :
10502  $as_echo_n "(cached) " >&6
10503else
10504  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10505/* end confdefs.h.  */
10506#include <sys/types.h>
10507#include <sys/stat.h>
10508
10509#if defined S_ISBLK && defined S_IFDIR
10510extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
10511#endif
10512
10513#if defined S_ISBLK && defined S_IFCHR
10514extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
10515#endif
10516
10517#if defined S_ISLNK && defined S_IFREG
10518extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
10519#endif
10520
10521#if defined S_ISSOCK && defined S_IFREG
10522extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
10523#endif
10524
10525_ACEOF
10526if ac_fn_c_try_compile "$LINENO"; then :
10527  ac_cv_header_stat_broken=no
10528else
10529  ac_cv_header_stat_broken=yes
10530fi
10531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10532fi
10533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
10534$as_echo "$ac_cv_header_stat_broken" >&6; }
10535if test $ac_cv_header_stat_broken = yes; then
10536
10537$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
10538
10539fi
10540
10541
10542
10543
10544
10545  case "$host_os" in
10546    mingw*)
10547                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
10548$as_echo_n "checking for 64-bit off_t... " >&6; }
10549if ${gl_cv_type_off_t_64+:} false; then :
10550  $as_echo_n "(cached) " >&6
10551else
10552  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10553/* end confdefs.h.  */
10554#include <sys/types.h>
10555                int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
10556
10557int
10558main ()
10559{
10560
10561  ;
10562  return 0;
10563}
10564_ACEOF
10565if ac_fn_c_try_compile "$LINENO"; then :
10566  gl_cv_type_off_t_64=yes
10567else
10568  gl_cv_type_off_t_64=no
10569fi
10570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10571
10572fi
10573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
10574$as_echo "$gl_cv_type_off_t_64" >&6; }
10575      if test $gl_cv_type_off_t_64 = no; then
10576        WINDOWS_64_BIT_OFF_T=1
10577      else
10578        WINDOWS_64_BIT_OFF_T=0
10579      fi
10580                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5
10581$as_echo_n "checking for 64-bit st_size... " >&6; }
10582if ${gl_cv_member_st_size_64+:} false; then :
10583  $as_echo_n "(cached) " >&6
10584else
10585  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10586/* end confdefs.h.  */
10587#include <sys/types.h>
10588                struct stat buf;
10589                int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
10590
10591int
10592main ()
10593{
10594
10595  ;
10596  return 0;
10597}
10598_ACEOF
10599if ac_fn_c_try_compile "$LINENO"; then :
10600  gl_cv_member_st_size_64=yes
10601else
10602  gl_cv_member_st_size_64=no
10603fi
10604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10605
10606fi
10607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
10608$as_echo "$gl_cv_member_st_size_64" >&6; }
10609      if test $gl_cv_member_st_size_64 = no; then
10610        WINDOWS_64_BIT_ST_SIZE=1
10611      else
10612        WINDOWS_64_BIT_ST_SIZE=0
10613      fi
10614      ;;
10615    *)
10616                                                      WINDOWS_64_BIT_OFF_T=0
10617      WINDOWS_64_BIT_ST_SIZE=0
10618      ;;
10619  esac
10620
10621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
10622$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
10623if ${ac_cv_c_restrict+:} false; then :
10624  $as_echo_n "(cached) " >&6
10625else
10626  ac_cv_c_restrict=no
10627   # Put '__restrict__' first, to avoid problems with glibc and non-GCC; see:
10628   # https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html
10629   # Put 'restrict' last, because C++ lacks it.
10630   for ac_kw in __restrict__ __restrict _Restrict restrict; do
10631     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10632/* end confdefs.h.  */
10633typedef int *int_ptr;
10634           int foo (int_ptr $ac_kw ip) { return ip[0]; }
10635           int bar (int [$ac_kw]); /* Catch GCC bug 14050.  */
10636           int bar (int ip[$ac_kw]) { return ip[0]; }
10637
10638int
10639main ()
10640{
10641int s[1];
10642           int *$ac_kw t = s;
10643           t[0] = 0;
10644           return foo (t) + bar (t);
10645
10646  ;
10647  return 0;
10648}
10649_ACEOF
10650if ac_fn_c_try_compile "$LINENO"; then :
10651  ac_cv_c_restrict=$ac_kw
10652fi
10653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10654     test "$ac_cv_c_restrict" != no && break
10655   done
10656
10657fi
10658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
10659$as_echo "$ac_cv_c_restrict" >&6; }
10660
10661 case $ac_cv_c_restrict in
10662   restrict) ;;
10663   no) $as_echo "#define restrict /**/" >>confdefs.h
10664 ;;
10665   *)  cat >>confdefs.h <<_ACEOF
10666#define restrict $ac_cv_c_restrict
10667_ACEOF
10668 ;;
10669 esac
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685     if test $gl_cv_have_include_next = yes; then
10686       gl_cv_next_sys_stat_h='<'sys/stat.h'>'
10687     else
10688       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
10689$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
10690if ${gl_cv_next_sys_stat_h+:} false; then :
10691  $as_echo_n "(cached) " >&6
10692else
10693
10694             if test $ac_cv_header_sys_stat_h = yes; then
10695
10696
10697
10698
10699  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10700/* end confdefs.h.  */
10701#include <sys/stat.h>
10702_ACEOF
10703                case "$host_os" in
10704    aix*) gl_absname_cpp="$ac_cpp -C" ;;
10705    *)    gl_absname_cpp="$ac_cpp" ;;
10706  esac
10707
10708  case "$host_os" in
10709    mingw*)
10710                                          gl_dirsep_regex='[/\\]'
10711      ;;
10712    *)
10713      gl_dirsep_regex='\/'
10714      ;;
10715  esac
10716      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10717  gl_header_literal_regex=`echo 'sys/stat.h' \
10718                           | sed -e "$gl_make_literal_regex_sed"`
10719  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10720      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10721      s|^/[^/]|//&|
10722      p
10723      q
10724    }'
10725
10726        gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10727  sed -n "$gl_absolute_header_sed"`
10728
10729           gl_header=$gl_cv_absolute_sys_stat_h
10730           gl_cv_next_sys_stat_h='"'$gl_header'"'
10731          else
10732               gl_cv_next_sys_stat_h='<'sys/stat.h'>'
10733             fi
10734
10735
10736fi
10737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
10738$as_echo "$gl_cv_next_sys_stat_h" >&6; }
10739     fi
10740     NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
10741
10742     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10743       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10744       gl_next_as_first_directive='<'sys/stat.h'>'
10745     else
10746       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10747       gl_next_as_first_directive=$gl_cv_next_sys_stat_h
10748     fi
10749     NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
10750
10751
10752
10753
10754
10755
10756
10757
10758    WINDOWS_STAT_TIMESPEC=0
10759
10760
10761
10762
10763
10764
10765
10766
10767      ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
10768     #include <sys/stat.h>
10769"
10770if test "x$ac_cv_type_nlink_t" = xyes; then :
10771
10772else
10773
10774$as_echo "#define nlink_t int" >>confdefs.h
10775
10776fi
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787  case "$host_os" in
10788    mingw*)
10789      for ac_header in sdkddkver.h
10790do :
10791  ac_fn_c_check_header_mongrel "$LINENO" "sdkddkver.h" "ac_cv_header_sdkddkver_h" "$ac_includes_default"
10792if test "x$ac_cv_header_sdkddkver_h" = xyes; then :
10793  cat >>confdefs.h <<_ACEOF
10794#define HAVE_SDKDDKVER_H 1
10795_ACEOF
10796
10797fi
10798
10799done
10800
10801      ;;
10802  esac
10803
10804
10805
10806
10807
10808   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
10809$as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
10810if ${gl_cv_func_getcwd_null+:} false; then :
10811  $as_echo_n "(cached) " >&6
10812else
10813  if test "$cross_compiling" = yes; then :
10814  case "$host_os" in
10815                           # Guess yes on glibc systems.
10816            *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
10817                           # Guess yes on musl systems.
10818            *-musl*)       gl_cv_func_getcwd_null="guessing yes";;
10819                           # Guess yes on Cygwin.
10820            cygwin*)       gl_cv_func_getcwd_null="guessing yes";;
10821                           # If we don't know, obey --enable-cross-guesses.
10822            *)             gl_cv_func_getcwd_null="$gl_cross_guess_normal";;
10823          esac
10824
10825else
10826  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10827/* end confdefs.h.  */
10828
10829#	 include <stdlib.h>
10830#        if HAVE_UNISTD_H
10831#         include <unistd.h>
10832#        else /* on Windows with MSVC */
10833#         include <direct.h>
10834#        endif
10835
10836
10837$gl_mda_defines
10838
10839#        ifndef getcwd
10840         char *getcwd ();
10841#        endif
10842
10843int
10844main ()
10845{
10846
10847#if defined _WIN32 && ! defined __CYGWIN__
10848/* mingw cwd does not start with '/', but _getcwd does allocate.
10849   However, mingw fails to honor non-zero size.  */
10850#else
10851           if (chdir ("/") != 0)
10852             return 1;
10853           else
10854             {
10855               char *f = getcwd (NULL, 0);
10856               if (! f)
10857                 return 2;
10858               if (f[0] != '/')
10859                 { free (f); return 3; }
10860               if (f[1] != '\0')
10861                 { free (f); return 4; }
10862               free (f);
10863               return 0;
10864             }
10865#endif
10866
10867  ;
10868  return 0;
10869}
10870_ACEOF
10871if ac_fn_c_try_run "$LINENO"; then :
10872  gl_cv_func_getcwd_null=yes
10873else
10874  gl_cv_func_getcwd_null=no
10875fi
10876rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10877  conftest.$ac_objext conftest.beam conftest.$ac_ext
10878fi
10879
10880fi
10881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
10882$as_echo "$gl_cv_func_getcwd_null" >&6; }
10883
10884
10885  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
10886$as_echo_n "checking for getcwd with POSIX signature... " >&6; }
10887if ${gl_cv_func_getcwd_posix_signature+:} false; then :
10888  $as_echo_n "(cached) " >&6
10889else
10890  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10891/* end confdefs.h.  */
10892#include <unistd.h>
10893
10894
10895$gl_mda_defines
10896
10897int
10898main ()
10899{
10900extern
10901           #ifdef __cplusplus
10902           "C"
10903           #endif
10904           char *getcwd (char *, size_t);
10905
10906  ;
10907  return 0;
10908}
10909
10910_ACEOF
10911if ac_fn_c_try_compile "$LINENO"; then :
10912  gl_cv_func_getcwd_posix_signature=yes
10913else
10914  gl_cv_func_getcwd_posix_signature=no
10915fi
10916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10917
10918fi
10919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
10920$as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
10921
10922ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
10923if test "x$ac_cv_have_decl_getcwd" = xyes; then :
10924  ac_have_decl=1
10925else
10926  ac_have_decl=0
10927fi
10928
10929cat >>confdefs.h <<_ACEOF
10930#define HAVE_DECL_GETCWD $ac_have_decl
10931_ACEOF
10932
10933
10934  GNULIB_DPRINTF=0;
10935  GNULIB_FCLOSE=0;
10936  GNULIB_FDOPEN=0;
10937  GNULIB_FFLUSH=0;
10938  GNULIB_FGETC=0;
10939  GNULIB_FGETS=0;
10940  GNULIB_FOPEN=0;
10941  GNULIB_FPRINTF=0;
10942  GNULIB_FPRINTF_POSIX=0;
10943  GNULIB_FPURGE=0;
10944  GNULIB_FPUTC=0;
10945  GNULIB_FPUTS=0;
10946  GNULIB_FREAD=0;
10947  GNULIB_FREOPEN=0;
10948  GNULIB_FSCANF=0;
10949  GNULIB_FSEEK=0;
10950  GNULIB_FSEEKO=0;
10951  GNULIB_FTELL=0;
10952  GNULIB_FTELLO=0;
10953  GNULIB_FWRITE=0;
10954  GNULIB_GETC=0;
10955  GNULIB_GETCHAR=0;
10956  GNULIB_GETDELIM=0;
10957  GNULIB_GETLINE=0;
10958  GNULIB_OBSTACK_PRINTF=0;
10959  GNULIB_OBSTACK_PRINTF_POSIX=0;
10960  GNULIB_PCLOSE=0;
10961  GNULIB_PERROR=0;
10962  GNULIB_POPEN=0;
10963  GNULIB_PRINTF=0;
10964  GNULIB_PRINTF_POSIX=0;
10965  GNULIB_PUTC=0;
10966  GNULIB_PUTCHAR=0;
10967  GNULIB_PUTS=0;
10968  GNULIB_REMOVE=0;
10969  GNULIB_RENAME=0;
10970  GNULIB_RENAMEAT=0;
10971  GNULIB_SCANF=0;
10972  GNULIB_SNPRINTF=0;
10973  GNULIB_SPRINTF_POSIX=0;
10974  GNULIB_STDIO_H_NONBLOCKING=0;
10975  GNULIB_STDIO_H_SIGPIPE=0;
10976  GNULIB_TMPFILE=0;
10977  GNULIB_VASPRINTF=0;
10978  GNULIB_VFSCANF=0;
10979  GNULIB_VSCANF=0;
10980  GNULIB_VDPRINTF=0;
10981  GNULIB_VFPRINTF=0;
10982  GNULIB_VFPRINTF_POSIX=0;
10983  GNULIB_VPRINTF=0;
10984  GNULIB_VPRINTF_POSIX=0;
10985  GNULIB_VSNPRINTF=0;
10986  GNULIB_VSPRINTF_POSIX=0;
10987    GNULIB_MDA_FCLOSEALL=1;
10988  GNULIB_MDA_FDOPEN=1;
10989  GNULIB_MDA_FILENO=1;
10990  GNULIB_MDA_GETW=1;
10991  GNULIB_MDA_PUTW=1;
10992  GNULIB_MDA_TEMPNAM=1;
10993    HAVE_DECL_FCLOSEALL=1;
10994  HAVE_DECL_FPURGE=1;
10995  HAVE_DECL_FSEEKO=1;
10996  HAVE_DECL_FTELLO=1;
10997  HAVE_DECL_GETDELIM=1;
10998  HAVE_DECL_GETLINE=1;
10999  HAVE_DECL_OBSTACK_PRINTF=1;
11000  HAVE_DECL_SNPRINTF=1;
11001  HAVE_DECL_VSNPRINTF=1;
11002  HAVE_DPRINTF=1;
11003  HAVE_FSEEKO=1;
11004  HAVE_FTELLO=1;
11005  HAVE_PCLOSE=1;
11006  HAVE_POPEN=1;
11007  HAVE_RENAMEAT=1;
11008  HAVE_VASPRINTF=1;
11009  HAVE_VDPRINTF=1;
11010  REPLACE_DPRINTF=0;
11011  REPLACE_FCLOSE=0;
11012  REPLACE_FDOPEN=0;
11013  REPLACE_FFLUSH=0;
11014  REPLACE_FOPEN=0;
11015  REPLACE_FPRINTF=0;
11016  REPLACE_FPURGE=0;
11017  REPLACE_FREOPEN=0;
11018  REPLACE_FSEEK=0;
11019  REPLACE_FSEEKO=0;
11020  REPLACE_FTELL=0;
11021  REPLACE_FTELLO=0;
11022  REPLACE_GETDELIM=0;
11023  REPLACE_GETLINE=0;
11024  REPLACE_OBSTACK_PRINTF=0;
11025  REPLACE_PERROR=0;
11026  REPLACE_POPEN=0;
11027  REPLACE_PRINTF=0;
11028  REPLACE_REMOVE=0;
11029  REPLACE_RENAME=0;
11030  REPLACE_RENAMEAT=0;
11031  REPLACE_SNPRINTF=0;
11032  REPLACE_SPRINTF=0;
11033  REPLACE_STDIO_READ_FUNCS=0;
11034  REPLACE_STDIO_WRITE_FUNCS=0;
11035  REPLACE_TMPFILE=0;
11036  REPLACE_VASPRINTF=0;
11037  REPLACE_VDPRINTF=0;
11038  REPLACE_VFPRINTF=0;
11039  REPLACE_VPRINTF=0;
11040  REPLACE_VSNPRINTF=0;
11041  REPLACE_VSPRINTF=0;
11042
11043ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default"
11044if test "x$ac_cv_have_decl_getdelim" = xyes; then :
11045  ac_have_decl=1
11046else
11047  ac_have_decl=0
11048fi
11049
11050cat >>confdefs.h <<_ACEOF
11051#define HAVE_DECL_GETDELIM $ac_have_decl
11052_ACEOF
11053
11054
11055
11056
11057
11058ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
11059if test "x$ac_cv_have_decl_getdtablesize" = xyes; then :
11060  ac_have_decl=1
11061else
11062  ac_have_decl=0
11063fi
11064
11065cat >>confdefs.h <<_ACEOF
11066#define HAVE_DECL_GETDTABLESIZE $ac_have_decl
11067_ACEOF
11068
11069ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default"
11070if test "x$ac_cv_have_decl_getline" = xyes; then :
11071  ac_have_decl=1
11072else
11073  ac_have_decl=0
11074fi
11075
11076cat >>confdefs.h <<_ACEOF
11077#define HAVE_DECL_GETLINE $ac_have_decl
11078_ACEOF
11079
11080ac_fn_c_check_decl "$LINENO" "getlogin_r" "ac_cv_have_decl_getlogin_r" "$ac_includes_default"
11081if test "x$ac_cv_have_decl_getlogin_r" = xyes; then :
11082  ac_have_decl=1
11083else
11084  ac_have_decl=0
11085fi
11086
11087cat >>confdefs.h <<_ACEOF
11088#define HAVE_DECL_GETLOGIN_R $ac_have_decl
11089_ACEOF
11090
11091
11092
11093ac_fn_c_check_decl "$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default"
11094if test "x$ac_cv_have_decl_getlogin" = xyes; then :
11095  ac_have_decl=1
11096else
11097  ac_have_decl=0
11098fi
11099
11100cat >>confdefs.h <<_ACEOF
11101#define HAVE_DECL_GETLOGIN $ac_have_decl
11102_ACEOF
11103
11104
11105
11106  case $host_os in
11107    mingw*)
11108      LIB_GETLOGIN='-ladvapi32' ;;
11109    *)
11110      LIB_GETLOGIN= ;;
11111  esac
11112
11113
11114
11115
11116
11117
11118
11119  GNULIB_GETRANDOM=0;
11120    HAVE_GETRANDOM=1;
11121  REPLACE_GETRANDOM=0;
11122
11123
11124
11125
11126  GNULIB_GETTIMEOFDAY=0;
11127    HAVE_GETTIMEOFDAY=1;
11128  HAVE_STRUCT_TIMEVAL=1;
11129  HAVE_SYS_TIME_H=1;
11130  REPLACE_GETTIMEOFDAY=0;
11131  REPLACE_STRUCT_TIMEVAL=0;
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148     if test $gl_cv_have_include_next = yes; then
11149       gl_cv_next_sys_time_h='<'sys/time.h'>'
11150     else
11151       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
11152$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
11153if ${gl_cv_next_sys_time_h+:} false; then :
11154  $as_echo_n "(cached) " >&6
11155else
11156
11157             if test $ac_cv_header_sys_time_h = yes; then
11158
11159
11160
11161
11162  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11163/* end confdefs.h.  */
11164#include <sys/time.h>
11165_ACEOF
11166                case "$host_os" in
11167    aix*) gl_absname_cpp="$ac_cpp -C" ;;
11168    *)    gl_absname_cpp="$ac_cpp" ;;
11169  esac
11170
11171  case "$host_os" in
11172    mingw*)
11173                                          gl_dirsep_regex='[/\\]'
11174      ;;
11175    *)
11176      gl_dirsep_regex='\/'
11177      ;;
11178  esac
11179      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11180  gl_header_literal_regex=`echo 'sys/time.h' \
11181                           | sed -e "$gl_make_literal_regex_sed"`
11182  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11183      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11184      s|^/[^/]|//&|
11185      p
11186      q
11187    }'
11188
11189        gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11190  sed -n "$gl_absolute_header_sed"`
11191
11192           gl_header=$gl_cv_absolute_sys_time_h
11193           gl_cv_next_sys_time_h='"'$gl_header'"'
11194          else
11195               gl_cv_next_sys_time_h='<'sys/time.h'>'
11196             fi
11197
11198
11199fi
11200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
11201$as_echo "$gl_cv_next_sys_time_h" >&6; }
11202     fi
11203     NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
11204
11205     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11206       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11207       gl_next_as_first_directive='<'sys/time.h'>'
11208     else
11209       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11210       gl_next_as_first_directive=$gl_cv_next_sys_time_h
11211     fi
11212     NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
11213
11214
11215
11216
11217
11218  if test $ac_cv_header_sys_time_h != yes; then
11219    HAVE_SYS_TIME_H=0
11220  fi
11221
11222
11223
11224
11225
11226  if test $ac_cv_header_sys_socket_h != yes; then
11227                    for ac_header in winsock2.h
11228do :
11229  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
11230if test "x$ac_cv_header_winsock2_h" = xyes; then :
11231  cat >>confdefs.h <<_ACEOF
11232#define HAVE_WINSOCK2_H 1
11233_ACEOF
11234
11235fi
11236
11237done
11238
11239  fi
11240  if test "$ac_cv_header_winsock2_h" = yes; then
11241    HAVE_WINSOCK2_H=1
11242    UNISTD_H_HAVE_WINSOCK2_H=1
11243    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
11244  else
11245    HAVE_WINSOCK2_H=0
11246  fi
11247
11248
11249  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
11250$as_echo_n "checking for struct timeval... " >&6; }
11251if ${gl_cv_sys_struct_timeval+:} false; then :
11252  $as_echo_n "(cached) " >&6
11253else
11254  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11255/* end confdefs.h.  */
11256#if HAVE_SYS_TIME_H
11257             #include <sys/time.h>
11258            #endif
11259            #include <time.h>
11260            #if HAVE_WINSOCK2_H
11261            # include <winsock2.h>
11262            #endif
11263
11264int
11265main ()
11266{
11267static struct timeval x; x.tv_sec = x.tv_usec;
11268  ;
11269  return 0;
11270}
11271_ACEOF
11272if ac_fn_c_try_compile "$LINENO"; then :
11273  gl_cv_sys_struct_timeval=yes
11274else
11275  gl_cv_sys_struct_timeval=no
11276fi
11277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11278
11279fi
11280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
11281$as_echo "$gl_cv_sys_struct_timeval" >&6; }
11282  if test $gl_cv_sys_struct_timeval != yes; then
11283    HAVE_STRUCT_TIMEVAL=0
11284  else
11285                            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
11286$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
11287if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
11288  $as_echo_n "(cached) " >&6
11289else
11290  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11291/* end confdefs.h.  */
11292#if HAVE_SYS_TIME_H
11293               #include <sys/time.h>
11294              #endif
11295              #include <time.h>
11296              #if HAVE_WINSOCK2_H
11297              # include <winsock2.h>
11298              #endif
11299
11300int
11301main ()
11302{
11303static struct timeval x;
11304              typedef int verify_tv_sec_type[
11305                sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
11306              ];
11307
11308  ;
11309  return 0;
11310}
11311_ACEOF
11312if ac_fn_c_try_compile "$LINENO"; then :
11313  gl_cv_sys_struct_timeval_tv_sec=yes
11314else
11315  gl_cv_sys_struct_timeval_tv_sec=no
11316fi
11317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11318
11319fi
11320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
11321$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
11322    if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
11323      REPLACE_STRUCT_TIMEVAL=1
11324    fi
11325  fi
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337  GNULIB_GLOB=0;
11338    HAVE_GLOB=1;
11339  HAVE_GLOB_PATTERN_P=1;
11340  REPLACE_GLOB=0;
11341  REPLACE_GLOB_PATTERN_P=0;
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359     if test $gl_cv_have_include_next = yes; then
11360       gl_cv_next_glob_h='<'glob.h'>'
11361     else
11362       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <glob.h>" >&5
11363$as_echo_n "checking absolute name of <glob.h>... " >&6; }
11364if ${gl_cv_next_glob_h+:} false; then :
11365  $as_echo_n "(cached) " >&6
11366else
11367
11368             if test $ac_cv_header_glob_h = yes; then
11369
11370
11371
11372
11373  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11374/* end confdefs.h.  */
11375#include <glob.h>
11376_ACEOF
11377                case "$host_os" in
11378    aix*) gl_absname_cpp="$ac_cpp -C" ;;
11379    *)    gl_absname_cpp="$ac_cpp" ;;
11380  esac
11381
11382  case "$host_os" in
11383    mingw*)
11384                                          gl_dirsep_regex='[/\\]'
11385      ;;
11386    *)
11387      gl_dirsep_regex='\/'
11388      ;;
11389  esac
11390      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11391  gl_header_literal_regex=`echo 'glob.h' \
11392                           | sed -e "$gl_make_literal_regex_sed"`
11393  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11394      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11395      s|^/[^/]|//&|
11396      p
11397      q
11398    }'
11399
11400        gl_cv_absolute_glob_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11401  sed -n "$gl_absolute_header_sed"`
11402
11403           gl_header=$gl_cv_absolute_glob_h
11404           gl_cv_next_glob_h='"'$gl_header'"'
11405          else
11406               gl_cv_next_glob_h='<'glob.h'>'
11407             fi
11408
11409
11410fi
11411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_glob_h" >&5
11412$as_echo "$gl_cv_next_glob_h" >&6; }
11413     fi
11414     NEXT_GLOB_H=$gl_cv_next_glob_h
11415
11416     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11417       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11418       gl_next_as_first_directive='<'glob.h'>'
11419     else
11420       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11421       gl_next_as_first_directive=$gl_cv_next_glob_h
11422     fi
11423     NEXT_AS_FIRST_DIRECTIVE_GLOB_H=$gl_next_as_first_directive
11424
11425
11426
11427
11428
11429  if test $ac_cv_header_glob_h = yes; then
11430    HAVE_GLOB_H=1
11431  else
11432    HAVE_GLOB_H=0
11433  fi
11434
11435
11436  GLOB_H=''
11437     if false; then
11438              GLOB_H=glob.h
11439     else
11440       if test $ac_cv_header_glob_h != yes; then
11441                  GLOB_H=glob.h
11442       fi
11443     fi
11444
11445
11446   if test -n "$GLOB_H"; then
11447  GL_GENERATE_GLOB_H_TRUE=
11448  GL_GENERATE_GLOB_H_FALSE='#'
11449else
11450  GL_GENERATE_GLOB_H_TRUE='#'
11451  GL_GENERATE_GLOB_H_FALSE=
11452fi
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469  if test -z "$gl_pthreadlib_body_done"; then
11470    gl_pthread_api=no
11471    LIBPTHREAD=
11472    LIBPMULTITHREAD=
11473    # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
11474    # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
11475    ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11476if test "x$ac_cv_header_pthread_h" = xyes; then :
11477  gl_have_pthread_h=yes
11478else
11479  gl_have_pthread_h=no
11480fi
11481
11482
11483    if test "$gl_have_pthread_h" = yes; then
11484      # Other possible tests:
11485      #   -lpthreads (FSU threads, PCthreads)
11486      #   -lgthreads
11487      # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
11488      # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
11489      # the second one only in libpthread, and lock.c needs it.
11490      #
11491      # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
11492      # needs -pthread for some reason.  See:
11493      # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
11494      save_LIBS=$LIBS
11495      for gl_pthread in '' '-pthread'; do
11496        LIBS="$LIBS $gl_pthread"
11497        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11498/* end confdefs.h.  */
11499#include <pthread.h>
11500               pthread_mutex_t m;
11501               pthread_mutexattr_t ma;
11502
11503int
11504main ()
11505{
11506pthread_mutex_lock (&m);
11507               pthread_mutexattr_init (&ma);
11508  ;
11509  return 0;
11510}
11511_ACEOF
11512if ac_fn_c_try_link "$LINENO"; then :
11513  gl_pthread_api=yes
11514           LIBPTHREAD=$gl_pthread
11515           LIBPMULTITHREAD=$gl_pthread
11516fi
11517rm -f core conftest.err conftest.$ac_objext \
11518    conftest$ac_exeext conftest.$ac_ext
11519        LIBS=$save_LIBS
11520        test $gl_pthread_api = yes && break
11521      done
11522
11523      # Test for libpthread by looking for pthread_kill. (Not pthread_self,
11524      # since it is defined as a macro on OSF/1.)
11525      if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
11526        # The program links fine without libpthread. But it may actually
11527        # need to link with libpthread in order to create multiple threads.
11528        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
11529$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
11530if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
11531  $as_echo_n "(cached) " >&6
11532else
11533  ac_check_lib_save_LIBS=$LIBS
11534LIBS="-lpthread  $LIBS"
11535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11536/* end confdefs.h.  */
11537
11538/* Override any GCC internal prototype to avoid an error.
11539   Use char because int might match the return type of a GCC
11540   builtin and then its argument prototype would still apply.  */
11541#ifdef __cplusplus
11542extern "C"
11543#endif
11544char pthread_kill ();
11545int
11546main ()
11547{
11548return pthread_kill ();
11549  ;
11550  return 0;
11551}
11552_ACEOF
11553if ac_fn_c_try_link "$LINENO"; then :
11554  ac_cv_lib_pthread_pthread_kill=yes
11555else
11556  ac_cv_lib_pthread_pthread_kill=no
11557fi
11558rm -f core conftest.err conftest.$ac_objext \
11559    conftest$ac_exeext conftest.$ac_ext
11560LIBS=$ac_check_lib_save_LIBS
11561fi
11562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
11563$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
11564if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
11565  LIBPMULTITHREAD=-lpthread
11566           # On Solaris and HP-UX, most pthread functions exist also in libc.
11567           # Therefore pthread_in_use() needs to actually try to create a
11568           # thread: pthread_create from libc will fail, whereas
11569           # pthread_create will actually create a thread.
11570           # On Solaris 10 or newer, this test is no longer needed, because
11571           # libc contains the fully functional pthread functions.
11572           case "$host_os" in
11573             solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
11574
11575$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
11576
11577           esac
11578
11579fi
11580
11581      elif test $gl_pthread_api != yes; then
11582        # Some library is needed. Try libpthread and libc_r.
11583        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
11584$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
11585if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
11586  $as_echo_n "(cached) " >&6
11587else
11588  ac_check_lib_save_LIBS=$LIBS
11589LIBS="-lpthread  $LIBS"
11590cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11591/* end confdefs.h.  */
11592
11593/* Override any GCC internal prototype to avoid an error.
11594   Use char because int might match the return type of a GCC
11595   builtin and then its argument prototype would still apply.  */
11596#ifdef __cplusplus
11597extern "C"
11598#endif
11599char pthread_kill ();
11600int
11601main ()
11602{
11603return pthread_kill ();
11604  ;
11605  return 0;
11606}
11607_ACEOF
11608if ac_fn_c_try_link "$LINENO"; then :
11609  ac_cv_lib_pthread_pthread_kill=yes
11610else
11611  ac_cv_lib_pthread_pthread_kill=no
11612fi
11613rm -f core conftest.err conftest.$ac_objext \
11614    conftest$ac_exeext conftest.$ac_ext
11615LIBS=$ac_check_lib_save_LIBS
11616fi
11617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
11618$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
11619if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
11620  gl_pthread_api=yes
11621           LIBPTHREAD=-lpthread
11622           LIBPMULTITHREAD=-lpthread
11623fi
11624
11625        if test $gl_pthread_api != yes; then
11626          # For FreeBSD 4.
11627          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
11628$as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
11629if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
11630  $as_echo_n "(cached) " >&6
11631else
11632  ac_check_lib_save_LIBS=$LIBS
11633LIBS="-lc_r  $LIBS"
11634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11635/* end confdefs.h.  */
11636
11637/* Override any GCC internal prototype to avoid an error.
11638   Use char because int might match the return type of a GCC
11639   builtin and then its argument prototype would still apply.  */
11640#ifdef __cplusplus
11641extern "C"
11642#endif
11643char pthread_kill ();
11644int
11645main ()
11646{
11647return pthread_kill ();
11648  ;
11649  return 0;
11650}
11651_ACEOF
11652if ac_fn_c_try_link "$LINENO"; then :
11653  ac_cv_lib_c_r_pthread_kill=yes
11654else
11655  ac_cv_lib_c_r_pthread_kill=no
11656fi
11657rm -f core conftest.err conftest.$ac_objext \
11658    conftest$ac_exeext conftest.$ac_ext
11659LIBS=$ac_check_lib_save_LIBS
11660fi
11661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
11662$as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
11663if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
11664  gl_pthread_api=yes
11665             LIBPTHREAD=-lc_r
11666             LIBPMULTITHREAD=-lc_r
11667fi
11668
11669        fi
11670      fi
11671    fi
11672    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
11673$as_echo_n "checking whether POSIX threads API is available... " >&6; }
11674    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
11675$as_echo "$gl_pthread_api" >&6; }
11676
11677
11678    if test $gl_pthread_api = yes; then
11679
11680$as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
11681
11682    fi
11683
11684        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11685/* end confdefs.h.  */
11686#include <sched.h>
11687int
11688main ()
11689{
11690sched_yield ();
11691  ;
11692  return 0;
11693}
11694_ACEOF
11695if ac_fn_c_try_link "$LINENO"; then :
11696  LIB_SCHED_YIELD=
11697
11698else
11699         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
11700$as_echo_n "checking for sched_yield in -lrt... " >&6; }
11701if ${ac_cv_lib_rt_sched_yield+:} false; then :
11702  $as_echo_n "(cached) " >&6
11703else
11704  ac_check_lib_save_LIBS=$LIBS
11705LIBS="-lrt  $LIBS"
11706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11707/* end confdefs.h.  */
11708
11709/* Override any GCC internal prototype to avoid an error.
11710   Use char because int might match the return type of a GCC
11711   builtin and then its argument prototype would still apply.  */
11712#ifdef __cplusplus
11713extern "C"
11714#endif
11715char sched_yield ();
11716int
11717main ()
11718{
11719return sched_yield ();
11720  ;
11721  return 0;
11722}
11723_ACEOF
11724if ac_fn_c_try_link "$LINENO"; then :
11725  ac_cv_lib_rt_sched_yield=yes
11726else
11727  ac_cv_lib_rt_sched_yield=no
11728fi
11729rm -f core conftest.err conftest.$ac_objext \
11730    conftest$ac_exeext conftest.$ac_ext
11731LIBS=$ac_check_lib_save_LIBS
11732fi
11733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
11734$as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
11735if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
11736  LIB_SCHED_YIELD=-lrt
11737else
11738            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
11739$as_echo_n "checking for sched_yield in -lposix4... " >&6; }
11740if ${ac_cv_lib_posix4_sched_yield+:} false; then :
11741  $as_echo_n "(cached) " >&6
11742else
11743  ac_check_lib_save_LIBS=$LIBS
11744LIBS="-lposix4  $LIBS"
11745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11746/* end confdefs.h.  */
11747
11748/* Override any GCC internal prototype to avoid an error.
11749   Use char because int might match the return type of a GCC
11750   builtin and then its argument prototype would still apply.  */
11751#ifdef __cplusplus
11752extern "C"
11753#endif
11754char sched_yield ();
11755int
11756main ()
11757{
11758return sched_yield ();
11759  ;
11760  return 0;
11761}
11762_ACEOF
11763if ac_fn_c_try_link "$LINENO"; then :
11764  ac_cv_lib_posix4_sched_yield=yes
11765else
11766  ac_cv_lib_posix4_sched_yield=no
11767fi
11768rm -f core conftest.err conftest.$ac_objext \
11769    conftest$ac_exeext conftest.$ac_ext
11770LIBS=$ac_check_lib_save_LIBS
11771fi
11772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
11773$as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
11774if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
11775  LIB_SCHED_YIELD=-lposix4
11776fi
11777
11778fi
11779
11780
11781fi
11782rm -f core conftest.err conftest.$ac_objext \
11783    conftest$ac_exeext conftest.$ac_ext
11784
11785
11786    gl_pthreadlib_body_done=done
11787  fi
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
11798$as_echo_n "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
11799if ${gl_cv_func_setlocale_null_all_mtsafe+:} false; then :
11800  $as_echo_n "(cached) " >&6
11801else
11802  case "$host_os" in
11803       # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
11804       *-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
11805         gl_cv_func_setlocale_null_all_mtsafe=no ;;
11806       # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
11807       *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
11808         gl_cv_func_setlocale_null_all_mtsafe=yes ;;
11809       # If we don't know, obey --enable-cross-guesses.
11810       *)
11811         gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
11812     esac
11813
11814fi
11815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
11816$as_echo "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
11817    case "$host_os" in
11818    mingw*) ;;
11819    *)
11820      if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
11821        gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
11822      fi
11823      ;;
11824  esac
11825  case "$gl_cv_func_setlocale_null_all_mtsafe" in
11826    *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
11827    *)    SETLOCALE_NULL_ALL_MTSAFE=0 ;;
11828  esac
11829
11830cat >>confdefs.h <<_ACEOF
11831#define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE
11832_ACEOF
11833
11834
11835    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
11836$as_echo_n "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
11837if ${gl_cv_func_setlocale_null_one_mtsafe+:} false; then :
11838  $as_echo_n "(cached) " >&6
11839else
11840  case "$host_os" in
11841       # Guess no on OpenBSD, AIX.
11842       openbsd* | aix*)
11843         gl_cv_func_setlocale_null_one_mtsafe=no ;;
11844       # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
11845       *-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
11846         gl_cv_func_setlocale_null_one_mtsafe=yes ;;
11847       # If we don't know, obey --enable-cross-guesses.
11848       *)
11849         gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
11850     esac
11851
11852fi
11853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
11854$as_echo "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
11855    case "$host_os" in
11856    mingw*) ;;
11857    *)
11858      if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
11859        gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
11860      fi
11861      ;;
11862  esac
11863  case "$gl_cv_func_setlocale_null_one_mtsafe" in
11864    *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
11865    *)    SETLOCALE_NULL_ONE_MTSAFE=0 ;;
11866  esac
11867
11868cat >>confdefs.h <<_ACEOF
11869#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE
11870_ACEOF
11871
11872
11873    if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
11874    case "$host_os" in
11875      mingw*) LIB_SETLOCALE_NULL= ;;
11876      *)
11877
11878
11879  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
11880$as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
11881if ${gl_cv_have_weak+:} false; then :
11882  $as_echo_n "(cached) " >&6
11883else
11884  gl_cv_have_weak=no
11885          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11886/* end confdefs.h.  */
11887extern void xyzzy ();
11888#pragma weak xyzzy
11889int
11890main ()
11891{
11892xyzzy();
11893  ;
11894  return 0;
11895}
11896_ACEOF
11897if ac_fn_c_try_link "$LINENO"; then :
11898  gl_cv_have_weak=maybe
11899fi
11900rm -f core conftest.err conftest.$ac_objext \
11901    conftest$ac_exeext conftest.$ac_ext
11902     if test $gl_cv_have_weak = maybe; then
11903                     if test "$cross_compiling" = yes; then :
11904                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11905/* end confdefs.h.  */
11906#ifdef __ELF__
11907             Extensible Linking Format
11908             #endif
11909
11910_ACEOF
11911if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11912  $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
11913  gl_cv_have_weak="guessing yes"
11914else
11915  gl_cv_have_weak="guessing no"
11916fi
11917rm -f conftest*
11918
11919
11920else
11921  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11922/* end confdefs.h.  */
11923
11924#include <stdio.h>
11925#pragma weak fputs
11926int main ()
11927{
11928  return (fputs == NULL);
11929}
11930_ACEOF
11931if ac_fn_c_try_run "$LINENO"; then :
11932  gl_cv_have_weak=yes
11933else
11934  gl_cv_have_weak=no
11935fi
11936rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11937  conftest.$ac_objext conftest.beam conftest.$ac_ext
11938fi
11939
11940     fi
11941          case " $LDFLAGS " in
11942       *" -static "*) gl_cv_have_weak=no ;;
11943     esac
11944                    case "$gl_cv_have_weak" in
11945       *yes)
11946         case "$host_os" in
11947           freebsd* | dragonfly*)
11948             : > conftest1.c
11949             $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
11950             cat <<EOF > conftest2.c
11951#include <pthread.h>
11952#pragma weak pthread_mutexattr_gettype
11953int main ()
11954{
11955  return (pthread_mutexattr_gettype != NULL);
11956}
11957EOF
11958             $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
11959               || gl_cv_have_weak=no
11960             rm -f conftest1.c libempty.so conftest2.c conftest
11961             ;;
11962         esac
11963         ;;
11964     esac
11965
11966fi
11967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
11968$as_echo "$gl_cv_have_weak" >&6; }
11969  case "$gl_cv_have_weak" in
11970    *yes)
11971
11972$as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
11973
11974      ;;
11975  esac
11976
11977        case "$gl_cv_have_weak" in
11978          *yes) LIB_SETLOCALE_NULL= ;;
11979          *)    LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
11980        esac
11981        ;;
11982    esac
11983  else
11984    LIB_SETLOCALE_NULL=
11985  fi
11986
11987
11988
11989
11990
11991  GNULIB_SOCKET=0;
11992  GNULIB_CONNECT=0;
11993  GNULIB_ACCEPT=0;
11994  GNULIB_BIND=0;
11995  GNULIB_GETPEERNAME=0;
11996  GNULIB_GETSOCKNAME=0;
11997  GNULIB_GETSOCKOPT=0;
11998  GNULIB_LISTEN=0;
11999  GNULIB_RECV=0;
12000  GNULIB_SEND=0;
12001  GNULIB_RECVFROM=0;
12002  GNULIB_SENDTO=0;
12003  GNULIB_SETSOCKOPT=0;
12004  GNULIB_SHUTDOWN=0;
12005  GNULIB_ACCEPT4=0;
12006  HAVE_STRUCT_SOCKADDR_STORAGE=1;
12007  HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
12008
12009  HAVE_SA_FAMILY_T=1;
12010  HAVE_ACCEPT4=1;
12011
12012
12013
12014
12015
12016        case "$host_os" in
12017    osf*)
12018
12019$as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h
12020
12021      ;;
12022  esac
12023
12024  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
12025$as_echo_n "checking whether <sys/socket.h> is self-contained... " >&6; }
12026if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then :
12027  $as_echo_n "(cached) " >&6
12028else
12029
12030      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12031/* end confdefs.h.  */
12032#include <sys/socket.h>
12033int
12034main ()
12035{
12036
12037  ;
12038  return 0;
12039}
12040_ACEOF
12041if ac_fn_c_try_compile "$LINENO"; then :
12042  gl_cv_header_sys_socket_h_selfcontained=yes
12043else
12044  gl_cv_header_sys_socket_h_selfcontained=no
12045fi
12046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12047
12048fi
12049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
12050$as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
12051  if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
12052            for ac_func in shutdown
12053do :
12054  ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
12055if test "x$ac_cv_func_shutdown" = xyes; then :
12056  cat >>confdefs.h <<_ACEOF
12057#define HAVE_SHUTDOWN 1
12058_ACEOF
12059
12060fi
12061done
12062
12063    if test $ac_cv_func_shutdown = yes; then
12064      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
12065$as_echo_n "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
12066if ${gl_cv_header_sys_socket_h_shut+:} false; then :
12067  $as_echo_n "(cached) " >&6
12068else
12069
12070          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12071/* end confdefs.h.  */
12072#include <sys/socket.h>
12073int
12074main ()
12075{
12076int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
12077  ;
12078  return 0;
12079}
12080_ACEOF
12081if ac_fn_c_try_compile "$LINENO"; then :
12082  gl_cv_header_sys_socket_h_shut=yes
12083else
12084  gl_cv_header_sys_socket_h_shut=no
12085fi
12086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12087
12088fi
12089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
12090$as_echo "$gl_cv_header_sys_socket_h_shut" >&6; }
12091      if test $gl_cv_header_sys_socket_h_shut = no; then
12092        SYS_SOCKET_H='sys/socket.h'
12093      fi
12094    fi
12095  fi
12096  # We need to check for ws2tcpip.h now.
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108     if test $gl_cv_have_include_next = yes; then
12109       gl_cv_next_sys_socket_h='<'sys/socket.h'>'
12110     else
12111       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
12112$as_echo_n "checking absolute name of <sys/socket.h>... " >&6; }
12113if ${gl_cv_next_sys_socket_h+:} false; then :
12114  $as_echo_n "(cached) " >&6
12115else
12116
12117             if test $ac_cv_header_sys_socket_h = yes; then
12118
12119
12120
12121
12122  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12123/* end confdefs.h.  */
12124#include <sys/socket.h>
12125_ACEOF
12126                case "$host_os" in
12127    aix*) gl_absname_cpp="$ac_cpp -C" ;;
12128    *)    gl_absname_cpp="$ac_cpp" ;;
12129  esac
12130
12131  case "$host_os" in
12132    mingw*)
12133                                          gl_dirsep_regex='[/\\]'
12134      ;;
12135    *)
12136      gl_dirsep_regex='\/'
12137      ;;
12138  esac
12139      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12140  gl_header_literal_regex=`echo 'sys/socket.h' \
12141                           | sed -e "$gl_make_literal_regex_sed"`
12142  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12143      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12144      s|^/[^/]|//&|
12145      p
12146      q
12147    }'
12148
12149        gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12150  sed -n "$gl_absolute_header_sed"`
12151
12152           gl_header=$gl_cv_absolute_sys_socket_h
12153           gl_cv_next_sys_socket_h='"'$gl_header'"'
12154          else
12155               gl_cv_next_sys_socket_h='<'sys/socket.h'>'
12156             fi
12157
12158
12159fi
12160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
12161$as_echo "$gl_cv_next_sys_socket_h" >&6; }
12162     fi
12163     NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
12164
12165     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12166       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12167       gl_next_as_first_directive='<'sys/socket.h'>'
12168     else
12169       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12170       gl_next_as_first_directive=$gl_cv_next_sys_socket_h
12171     fi
12172     NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
12173
12174
12175
12176
12177  if test $ac_cv_header_sys_socket_h = yes; then
12178    HAVE_SYS_SOCKET_H=1
12179  else
12180    HAVE_SYS_SOCKET_H=0
12181  fi
12182
12183
12184
12185  if test $ac_cv_header_sys_socket_h = yes; then
12186    HAVE_WS2TCPIP_H=0
12187  else
12188    if test $ac_cv_header_ws2tcpip_h = yes; then
12189      HAVE_WS2TCPIP_H=1
12190    else
12191      HAVE_WS2TCPIP_H=0
12192    fi
12193  fi
12194
12195
12196
12197  ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
12198  /* sys/types.h is not needed according to POSIX, but the
12199     sys/socket.h in i386-unknown-freebsd4.10 and
12200     powerpc-apple-darwin5.5 required it. */
12201#include <sys/types.h>
12202#ifdef HAVE_SYS_SOCKET_H
12203#include <sys/socket.h>
12204#endif
12205#ifdef HAVE_WS2TCPIP_H
12206#include <ws2tcpip.h>
12207#endif
12208
12209"
12210if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
12211
12212cat >>confdefs.h <<_ACEOF
12213#define HAVE_STRUCT_SOCKADDR_STORAGE 1
12214_ACEOF
12215
12216
12217fi
12218ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
12219  /* sys/types.h is not needed according to POSIX, but the
12220     sys/socket.h in i386-unknown-freebsd4.10 and
12221     powerpc-apple-darwin5.5 required it. */
12222#include <sys/types.h>
12223#ifdef HAVE_SYS_SOCKET_H
12224#include <sys/socket.h>
12225#endif
12226#ifdef HAVE_WS2TCPIP_H
12227#include <ws2tcpip.h>
12228#endif
12229
12230"
12231if test "x$ac_cv_type_sa_family_t" = xyes; then :
12232
12233cat >>confdefs.h <<_ACEOF
12234#define HAVE_SA_FAMILY_T 1
12235_ACEOF
12236
12237
12238fi
12239
12240  if test $ac_cv_type_struct_sockaddr_storage = no; then
12241    HAVE_STRUCT_SOCKADDR_STORAGE=0
12242  fi
12243  if test $ac_cv_type_sa_family_t = no; then
12244    HAVE_SA_FAMILY_T=0
12245  fi
12246  if test $ac_cv_type_struct_sockaddr_storage != no; then
12247    ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
12248       #ifdef HAVE_SYS_SOCKET_H
12249       #include <sys/socket.h>
12250       #endif
12251       #ifdef HAVE_WS2TCPIP_H
12252       #include <ws2tcpip.h>
12253       #endif
12254
12255"
12256if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
12257
12258cat >>confdefs.h <<_ACEOF
12259#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
12260_ACEOF
12261
12262
12263else
12264  HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
12265fi
12266
12267  fi
12268  if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
12269     || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
12270    SYS_SOCKET_H='sys/socket.h'
12271  fi
12272
12273
12274
12275
12276  if test $ac_cv_header_sys_socket_h != yes; then
12277                    for ac_header in winsock2.h
12278do :
12279  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
12280if test "x$ac_cv_header_winsock2_h" = xyes; then :
12281  cat >>confdefs.h <<_ACEOF
12282#define HAVE_WINSOCK2_H 1
12283_ACEOF
12284
12285fi
12286
12287done
12288
12289  fi
12290  if test "$ac_cv_header_winsock2_h" = yes; then
12291    HAVE_WINSOCK2_H=1
12292    UNISTD_H_HAVE_WINSOCK2_H=1
12293    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
12294  else
12295    HAVE_WINSOCK2_H=0
12296  fi
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
12313$as_echo_n "checking for IPv4 sockets... " >&6; }
12314if ${gl_cv_socket_ipv4+:} false; then :
12315  $as_echo_n "(cached) " >&6
12316else
12317  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12318/* end confdefs.h.  */
12319#include <sys/types.h>
12320#ifdef HAVE_SYS_SOCKET_H
12321#include <sys/socket.h>
12322#endif
12323#ifdef HAVE_NETINET_IN_H
12324#include <netinet/in.h>
12325#endif
12326#ifdef HAVE_WINSOCK2_H
12327#include <winsock2.h>
12328#endif
12329int
12330main ()
12331{
12332int x = AF_INET; struct in_addr y; struct sockaddr_in z;
12333 if (&x && &y && &z) return 0;
12334  ;
12335  return 0;
12336}
12337_ACEOF
12338if ac_fn_c_try_compile "$LINENO"; then :
12339  gl_cv_socket_ipv4=yes
12340else
12341  gl_cv_socket_ipv4=no
12342fi
12343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12344fi
12345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
12346$as_echo "$gl_cv_socket_ipv4" >&6; }
12347  if test $gl_cv_socket_ipv4 = yes; then
12348
12349$as_echo "#define HAVE_IPV4 1" >>confdefs.h
12350
12351  fi
12352
12353  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
12354$as_echo_n "checking for IPv6 sockets... " >&6; }
12355if ${gl_cv_socket_ipv6+:} false; then :
12356  $as_echo_n "(cached) " >&6
12357else
12358  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12359/* end confdefs.h.  */
12360#include <sys/types.h>
12361#ifdef HAVE_SYS_SOCKET_H
12362#include <sys/socket.h>
12363#endif
12364#ifdef HAVE_NETINET_IN_H
12365#include <netinet/in.h>
12366#endif
12367#ifdef HAVE_WINSOCK2_H
12368#include <winsock2.h>
12369#endif
12370#ifdef HAVE_WS2TCPIP_H
12371#include <ws2tcpip.h>
12372#endif
12373int
12374main ()
12375{
12376int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
12377 if (&x && &y && &z) return 0;
12378  ;
12379  return 0;
12380}
12381_ACEOF
12382if ac_fn_c_try_compile "$LINENO"; then :
12383  gl_cv_socket_ipv6=yes
12384else
12385  gl_cv_socket_ipv6=no
12386fi
12387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12388fi
12389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
12390$as_echo "$gl_cv_socket_ipv6" >&6; }
12391  if test $gl_cv_socket_ipv6 = yes; then
12392
12393$as_echo "#define HAVE_IPV6 1" >>confdefs.h
12394
12395  fi
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409     if test $gl_cv_have_include_next = yes; then
12410       gl_cv_next_limits_h='<'limits.h'>'
12411     else
12412       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
12413$as_echo_n "checking absolute name of <limits.h>... " >&6; }
12414if ${gl_cv_next_limits_h+:} false; then :
12415  $as_echo_n "(cached) " >&6
12416else
12417
12418             if test $ac_cv_header_limits_h = yes; then
12419
12420
12421
12422
12423  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12424/* end confdefs.h.  */
12425#include <limits.h>
12426_ACEOF
12427                case "$host_os" in
12428    aix*) gl_absname_cpp="$ac_cpp -C" ;;
12429    *)    gl_absname_cpp="$ac_cpp" ;;
12430  esac
12431
12432  case "$host_os" in
12433    mingw*)
12434                                          gl_dirsep_regex='[/\\]'
12435      ;;
12436    *)
12437      gl_dirsep_regex='\/'
12438      ;;
12439  esac
12440      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12441  gl_header_literal_regex=`echo 'limits.h' \
12442                           | sed -e "$gl_make_literal_regex_sed"`
12443  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12444      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12445      s|^/[^/]|//&|
12446      p
12447      q
12448    }'
12449
12450        gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12451  sed -n "$gl_absolute_header_sed"`
12452
12453           gl_header=$gl_cv_absolute_limits_h
12454           gl_cv_next_limits_h='"'$gl_header'"'
12455          else
12456               gl_cv_next_limits_h='<'limits.h'>'
12457             fi
12458
12459
12460fi
12461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
12462$as_echo "$gl_cv_next_limits_h" >&6; }
12463     fi
12464     NEXT_LIMITS_H=$gl_cv_next_limits_h
12465
12466     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12467       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12468       gl_next_as_first_directive='<'limits.h'>'
12469     else
12470       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12471       gl_next_as_first_directive=$gl_cv_next_limits_h
12472     fi
12473     NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
12474
12475
12476
12477
12478
12479  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc." >&5
12480$as_echo_n "checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc.... " >&6; }
12481if ${gl_cv_header_limits_width+:} false; then :
12482  $as_echo_n "(cached) " >&6
12483else
12484  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12485/* end confdefs.h.  */
12486#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
12487             #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
12488            #endif
12489            #include <limits.h>
12490            long long llm = LLONG_MAX;
12491            int wb = WORD_BIT;
12492            int ullw = ULLONG_WIDTH;
12493
12494int
12495main ()
12496{
12497
12498  ;
12499  return 0;
12500}
12501_ACEOF
12502if ac_fn_c_try_compile "$LINENO"; then :
12503  gl_cv_header_limits_width=yes
12504else
12505  gl_cv_header_limits_width=no
12506fi
12507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12508fi
12509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
12510$as_echo "$gl_cv_header_limits_width" >&6; }
12511  if test "$gl_cv_header_limits_width" = yes; then
12512    LIMITS_H=
12513  else
12514    LIMITS_H=limits.h
12515  fi
12516
12517   if test -n "$LIMITS_H"; then
12518  GL_GENERATE_LIMITS_H_TRUE=
12519  GL_GENERATE_LIMITS_H_FALSE='#'
12520else
12521  GL_GENERATE_LIMITS_H_TRUE='#'
12522  GL_GENERATE_LIMITS_H_FALSE=
12523fi
12524
12525
12526
12527  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
12528$as_echo_n "checking for wint_t... " >&6; }
12529if ${gt_cv_c_wint_t+:} false; then :
12530  $as_echo_n "(cached) " >&6
12531else
12532  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12533/* end confdefs.h.  */
12534#include <wchar.h>
12535            wint_t foo = (wchar_t)'\0';
12536int
12537main ()
12538{
12539
12540  ;
12541  return 0;
12542}
12543_ACEOF
12544if ac_fn_c_try_compile "$LINENO"; then :
12545  gt_cv_c_wint_t=yes
12546else
12547  gt_cv_c_wint_t=no
12548fi
12549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12550fi
12551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
12552$as_echo "$gt_cv_c_wint_t" >&6; }
12553  if test $gt_cv_c_wint_t = yes; then
12554
12555$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
12556
12557
12558            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wint_t is large enough" >&5
12559$as_echo_n "checking whether wint_t is large enough... " >&6; }
12560if ${gl_cv_type_wint_t_large_enough+:} false; then :
12561  $as_echo_n "(cached) " >&6
12562else
12563  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12564/* end confdefs.h.  */
12565#include <wchar.h>
12566              int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
12567
12568int
12569main ()
12570{
12571
12572  ;
12573  return 0;
12574}
12575_ACEOF
12576if ac_fn_c_try_compile "$LINENO"; then :
12577  gl_cv_type_wint_t_large_enough=yes
12578else
12579  gl_cv_type_wint_t_large_enough=no
12580fi
12581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12582fi
12583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_large_enough" >&5
12584$as_echo "$gl_cv_type_wint_t_large_enough" >&6; }
12585    if test $gl_cv_type_wint_t_large_enough = no; then
12586      GNULIB_OVERRIDES_WINT_T=1
12587    else
12588      GNULIB_OVERRIDES_WINT_T=0
12589    fi
12590  else
12591    GNULIB_OVERRIDES_WINT_T=0
12592  fi
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler produces multi-arch binaries" >&5
12603$as_echo_n "checking whether the compiler produces multi-arch binaries... " >&6; }
12604if ${gl_cv_c_multiarch+:} false; then :
12605  $as_echo_n "(cached) " >&6
12606else
12607  gl_cv_c_multiarch=no
12608     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12609/* end confdefs.h.  */
12610#ifndef __APPLE_CC__
12611            not a universal capable compiler
12612           #endif
12613           typedef int dummy;
12614
12615_ACEOF
12616if ac_fn_c_try_compile "$LINENO"; then :
12617
12618                        arch=
12619        prev=
12620        for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
12621          if test -n "$prev"; then
12622            case $word in
12623              i?86 | x86_64 | ppc | ppc64 | arm | arm64)
12624                if test -z "$arch" || test "$arch" = "$word"; then
12625                  arch="$word"
12626                else
12627                  gl_cv_c_multiarch=yes
12628                fi
12629                ;;
12630            esac
12631            prev=
12632          else
12633            if test "x$word" = "x-arch"; then
12634              prev=arch
12635            fi
12636          fi
12637        done
12638
12639fi
12640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12641
12642fi
12643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_multiarch" >&5
12644$as_echo "$gl_cv_c_multiarch" >&6; }
12645  if test $gl_cv_c_multiarch = yes; then
12646    APPLE_UNIVERSAL_BUILD=1
12647  else
12648    APPLE_UNIVERSAL_BUILD=0
12649  fi
12650
12651
12652
12653
12654
12655
12656
12657
12658$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
12659
12660
12661$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
12662
12663
12664
12665  if test $ac_cv_header_wchar_h = yes; then
12666    HAVE_WCHAR_H=1
12667  else
12668    HAVE_WCHAR_H=0
12669  fi
12670
12671
12672
12673  if test $ac_cv_header_inttypes_h = yes; then
12674    HAVE_INTTYPES_H=1
12675  else
12676    HAVE_INTTYPES_H=0
12677  fi
12678
12679
12680
12681  if test $ac_cv_header_sys_types_h = yes; then
12682    HAVE_SYS_TYPES_H=1
12683  else
12684    HAVE_SYS_TYPES_H=0
12685  fi
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697     if test $gl_cv_have_include_next = yes; then
12698       gl_cv_next_stdint_h='<'stdint.h'>'
12699     else
12700       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
12701$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
12702if ${gl_cv_next_stdint_h+:} false; then :
12703  $as_echo_n "(cached) " >&6
12704else
12705
12706             if test $ac_cv_header_stdint_h = yes; then
12707
12708
12709
12710
12711  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12712/* end confdefs.h.  */
12713#include <stdint.h>
12714_ACEOF
12715                case "$host_os" in
12716    aix*) gl_absname_cpp="$ac_cpp -C" ;;
12717    *)    gl_absname_cpp="$ac_cpp" ;;
12718  esac
12719
12720  case "$host_os" in
12721    mingw*)
12722                                          gl_dirsep_regex='[/\\]'
12723      ;;
12724    *)
12725      gl_dirsep_regex='\/'
12726      ;;
12727  esac
12728      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12729  gl_header_literal_regex=`echo 'stdint.h' \
12730                           | sed -e "$gl_make_literal_regex_sed"`
12731  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12732      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12733      s|^/[^/]|//&|
12734      p
12735      q
12736    }'
12737
12738        gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12739  sed -n "$gl_absolute_header_sed"`
12740
12741           gl_header=$gl_cv_absolute_stdint_h
12742           gl_cv_next_stdint_h='"'$gl_header'"'
12743          else
12744               gl_cv_next_stdint_h='<'stdint.h'>'
12745             fi
12746
12747
12748fi
12749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
12750$as_echo "$gl_cv_next_stdint_h" >&6; }
12751     fi
12752     NEXT_STDINT_H=$gl_cv_next_stdint_h
12753
12754     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12755       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12756       gl_next_as_first_directive='<'stdint.h'>'
12757     else
12758       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12759       gl_next_as_first_directive=$gl_cv_next_stdint_h
12760     fi
12761     NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
12762
12763
12764
12765
12766  if test $ac_cv_header_stdint_h = yes; then
12767    HAVE_STDINT_H=1
12768  else
12769    HAVE_STDINT_H=0
12770  fi
12771
12772
12773    if test $ac_cv_header_stdint_h = yes; then
12774    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
12775$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
12776if ${gl_cv_header_working_stdint_h+:} false; then :
12777  $as_echo_n "(cached) " >&6
12778else
12779  gl_cv_header_working_stdint_h=no
12780       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12781/* end confdefs.h.  */
12782
12783
12784#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12785#define __STDC_CONSTANT_MACROS 1
12786#define __STDC_LIMIT_MACROS 1
12787#include <stdint.h>
12788/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
12789#if !(defined WCHAR_MIN && defined WCHAR_MAX)
12790#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
12791#endif
12792
12793
12794  #include <stddef.h>
12795  #include <signal.h>
12796  #if HAVE_WCHAR_H
12797  # include <wchar.h>
12798  #endif
12799
12800
12801#ifdef INT8_MAX
12802int8_t a1 = INT8_MAX;
12803int8_t a1min = INT8_MIN;
12804#endif
12805#ifdef INT16_MAX
12806int16_t a2 = INT16_MAX;
12807int16_t a2min = INT16_MIN;
12808#endif
12809#ifdef INT32_MAX
12810int32_t a3 = INT32_MAX;
12811int32_t a3min = INT32_MIN;
12812#endif
12813#ifdef INT64_MAX
12814int64_t a4 = INT64_MAX;
12815int64_t a4min = INT64_MIN;
12816#endif
12817#ifdef UINT8_MAX
12818uint8_t b1 = UINT8_MAX;
12819#else
12820typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
12821#endif
12822#ifdef UINT16_MAX
12823uint16_t b2 = UINT16_MAX;
12824#endif
12825#ifdef UINT32_MAX
12826uint32_t b3 = UINT32_MAX;
12827#endif
12828#ifdef UINT64_MAX
12829uint64_t b4 = UINT64_MAX;
12830#endif
12831int_least8_t c1 = INT8_C (0x7f);
12832int_least8_t c1max = INT_LEAST8_MAX;
12833int_least8_t c1min = INT_LEAST8_MIN;
12834int_least16_t c2 = INT16_C (0x7fff);
12835int_least16_t c2max = INT_LEAST16_MAX;
12836int_least16_t c2min = INT_LEAST16_MIN;
12837int_least32_t c3 = INT32_C (0x7fffffff);
12838int_least32_t c3max = INT_LEAST32_MAX;
12839int_least32_t c3min = INT_LEAST32_MIN;
12840int_least64_t c4 = INT64_C (0x7fffffffffffffff);
12841int_least64_t c4max = INT_LEAST64_MAX;
12842int_least64_t c4min = INT_LEAST64_MIN;
12843uint_least8_t d1 = UINT8_C (0xff);
12844uint_least8_t d1max = UINT_LEAST8_MAX;
12845uint_least16_t d2 = UINT16_C (0xffff);
12846uint_least16_t d2max = UINT_LEAST16_MAX;
12847uint_least32_t d3 = UINT32_C (0xffffffff);
12848uint_least32_t d3max = UINT_LEAST32_MAX;
12849uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
12850uint_least64_t d4max = UINT_LEAST64_MAX;
12851int_fast8_t e1 = INT_FAST8_MAX;
12852int_fast8_t e1min = INT_FAST8_MIN;
12853int_fast16_t e2 = INT_FAST16_MAX;
12854int_fast16_t e2min = INT_FAST16_MIN;
12855int_fast32_t e3 = INT_FAST32_MAX;
12856int_fast32_t e3min = INT_FAST32_MIN;
12857int_fast64_t e4 = INT_FAST64_MAX;
12858int_fast64_t e4min = INT_FAST64_MIN;
12859uint_fast8_t f1 = UINT_FAST8_MAX;
12860uint_fast16_t f2 = UINT_FAST16_MAX;
12861uint_fast32_t f3 = UINT_FAST32_MAX;
12862uint_fast64_t f4 = UINT_FAST64_MAX;
12863#ifdef INTPTR_MAX
12864intptr_t g = INTPTR_MAX;
12865intptr_t gmin = INTPTR_MIN;
12866#endif
12867#ifdef UINTPTR_MAX
12868uintptr_t h = UINTPTR_MAX;
12869#endif
12870intmax_t i = INTMAX_MAX;
12871uintmax_t j = UINTMAX_MAX;
12872
12873/* Check that SIZE_MAX has the correct type, if possible.  */
12874#if 201112 <= __STDC_VERSION__
12875int k = _Generic (SIZE_MAX, size_t: 0);
12876#elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \
12877       || (0x5110 <= __SUNPRO_C && !__STDC__))
12878extern size_t k;
12879extern __typeof__ (SIZE_MAX) k;
12880#endif
12881
12882#include <limits.h> /* for CHAR_BIT */
12883#define TYPE_MINIMUM(t) \
12884  ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
12885#define TYPE_MAXIMUM(t) \
12886  ((t) ((t) 0 < (t) -1 \
12887        ? (t) -1 \
12888        : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
12889struct s {
12890  int check_PTRDIFF:
12891      PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
12892      && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
12893      ? 1 : -1;
12894  /* Detect bug in FreeBSD 6.0 / ia64.  */
12895  int check_SIG_ATOMIC:
12896      SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
12897      && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
12898      ? 1 : -1;
12899  int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
12900  int check_WCHAR:
12901      WCHAR_MIN == TYPE_MINIMUM (wchar_t)
12902      && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
12903      ? 1 : -1;
12904  /* Detect bug in mingw.  */
12905  int check_WINT:
12906      WINT_MIN == TYPE_MINIMUM (wint_t)
12907      && WINT_MAX == TYPE_MAXIMUM (wint_t)
12908      ? 1 : -1;
12909
12910  /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
12911  int check_UINT8_C:
12912        (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
12913  int check_UINT16_C:
12914        (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
12915
12916  /* Detect bugs in OpenBSD 3.9 stdint.h.  */
12917#ifdef UINT8_MAX
12918  int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
12919#endif
12920#ifdef UINT16_MAX
12921  int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
12922#endif
12923#ifdef UINT32_MAX
12924  int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
12925#endif
12926#ifdef UINT64_MAX
12927  int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
12928#endif
12929  int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
12930  int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
12931  int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
12932  int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
12933  int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
12934  int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
12935  int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
12936  int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
12937  int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
12938  int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
12939  int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
12940};
12941
12942int
12943main ()
12944{
12945
12946  ;
12947  return 0;
12948}
12949_ACEOF
12950if ac_fn_c_try_compile "$LINENO"; then :
12951                                                    if test "$cross_compiling" = yes; then :
12952  case "$host_os" in
12953                         # Guess yes on native Windows.
12954                 mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
12955                         # In general, assume it works.
12956                 *)      gl_cv_header_working_stdint_h="guessing yes" ;;
12957               esac
12958
12959else
12960  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12961/* end confdefs.h.  */
12962
12963
12964#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12965#define __STDC_CONSTANT_MACROS 1
12966#define __STDC_LIMIT_MACROS 1
12967#include <stdint.h>
12968
12969
12970  #include <stddef.h>
12971  #include <signal.h>
12972  #if HAVE_WCHAR_H
12973  # include <wchar.h>
12974  #endif
12975
12976
12977#include <stdio.h>
12978#include <string.h>
12979#define MVAL(macro) MVAL1(macro)
12980#define MVAL1(expression) #expression
12981static const char *macro_values[] =
12982  {
12983#ifdef INT8_MAX
12984    MVAL (INT8_MAX),
12985#endif
12986#ifdef INT16_MAX
12987    MVAL (INT16_MAX),
12988#endif
12989#ifdef INT32_MAX
12990    MVAL (INT32_MAX),
12991#endif
12992#ifdef INT64_MAX
12993    MVAL (INT64_MAX),
12994#endif
12995#ifdef UINT8_MAX
12996    MVAL (UINT8_MAX),
12997#endif
12998#ifdef UINT16_MAX
12999    MVAL (UINT16_MAX),
13000#endif
13001#ifdef UINT32_MAX
13002    MVAL (UINT32_MAX),
13003#endif
13004#ifdef UINT64_MAX
13005    MVAL (UINT64_MAX),
13006#endif
13007    NULL
13008  };
13009
13010int
13011main ()
13012{
13013
13014  const char **mv;
13015  for (mv = macro_values; *mv != NULL; mv++)
13016    {
13017      const char *value = *mv;
13018      /* Test whether it looks like a cast expression.  */
13019      if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
13020          || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
13021          || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
13022          || strncmp (value, "((int)"/*)*/, 6) == 0
13023          || strncmp (value, "((signed short)"/*)*/, 15) == 0
13024          || strncmp (value, "((signed char)"/*)*/, 14) == 0)
13025        return mv - macro_values + 1;
13026    }
13027  return 0;
13028
13029  ;
13030  return 0;
13031}
13032_ACEOF
13033if ac_fn_c_try_run "$LINENO"; then :
13034  gl_cv_header_working_stdint_h=yes
13035fi
13036rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13037  conftest.$ac_objext conftest.beam conftest.$ac_ext
13038fi
13039
13040
13041fi
13042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13043
13044fi
13045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
13046$as_echo "$gl_cv_header_working_stdint_h" >&6; }
13047  fi
13048
13049  HAVE_C99_STDINT_H=0
13050  HAVE_SYS_BITYPES_H=0
13051  HAVE_SYS_INTTYPES_H=0
13052  STDINT_H=stdint.h
13053  case "$gl_cv_header_working_stdint_h" in
13054    *yes)
13055      HAVE_C99_STDINT_H=1
13056                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h works without ISO C predefines" >&5
13057$as_echo_n "checking whether stdint.h works without ISO C predefines... " >&6; }
13058if ${gl_cv_header_stdint_without_STDC_macros+:} false; then :
13059  $as_echo_n "(cached) " >&6
13060else
13061  gl_cv_header_stdint_without_STDC_macros=no
13062         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13063/* end confdefs.h.  */
13064
13065
13066#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
13067#include <stdint.h>
13068
13069
13070  #include <stddef.h>
13071  #include <signal.h>
13072  #if HAVE_WCHAR_H
13073  # include <wchar.h>
13074  #endif
13075
13076
13077intmax_t im = INTMAX_MAX;
13078int32_t i32 = INT32_C (0x7fffffff);
13079
13080int
13081main ()
13082{
13083
13084  ;
13085  return 0;
13086}
13087_ACEOF
13088if ac_fn_c_try_compile "$LINENO"; then :
13089  gl_cv_header_stdint_without_STDC_macros=yes
13090fi
13091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13092
13093fi
13094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_without_STDC_macros" >&5
13095$as_echo "$gl_cv_header_stdint_without_STDC_macros" >&6; }
13096
13097      if test $gl_cv_header_stdint_without_STDC_macros = no; then
13098
13099$as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
13100
13101
13102$as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
13103
13104      fi
13105      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
13106$as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
13107if ${gl_cv_header_stdint_width+:} false; then :
13108  $as_echo_n "(cached) " >&6
13109else
13110  gl_cv_header_stdint_width=no
13111         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13112/* end confdefs.h.  */
13113
13114              /* Work if build is not clean.  */
13115              #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
13116              #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
13117               #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
13118              #endif
13119              #include <stdint.h>
13120
13121  #include <stddef.h>
13122  #include <signal.h>
13123  #if HAVE_WCHAR_H
13124  # include <wchar.h>
13125  #endif
13126
13127              int iw = UINTMAX_WIDTH;
13128
13129int
13130main ()
13131{
13132
13133  ;
13134  return 0;
13135}
13136_ACEOF
13137if ac_fn_c_try_compile "$LINENO"; then :
13138  gl_cv_header_stdint_width=yes
13139fi
13140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13141fi
13142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
13143$as_echo "$gl_cv_header_stdint_width" >&6; }
13144      if test "$gl_cv_header_stdint_width" = yes; then
13145        STDINT_H=
13146      fi
13147      ;;
13148    *)
13149                  for ac_header in sys/inttypes.h sys/bitypes.h
13150do :
13151  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13152ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13153if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13154  cat >>confdefs.h <<_ACEOF
13155#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13156_ACEOF
13157
13158fi
13159
13160done
13161
13162      if test $ac_cv_header_sys_inttypes_h = yes; then
13163        HAVE_SYS_INTTYPES_H=1
13164      fi
13165      if test $ac_cv_header_sys_bitypes_h = yes; then
13166        HAVE_SYS_BITYPES_H=1
13167      fi
13168
13169
13170  if test $APPLE_UNIVERSAL_BUILD = 0; then
13171
13172
13173  for gltype in ptrdiff_t size_t ; do
13174    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
13175$as_echo_n "checking for bit size of $gltype... " >&6; }
13176if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
13177  $as_echo_n "(cached) " >&6
13178else
13179  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
13180  #include <stddef.h>
13181  #include <signal.h>
13182  #if HAVE_WCHAR_H
13183  # include <wchar.h>
13184  #endif
13185
13186#include <limits.h>"; then :
13187
13188else
13189  result=unknown
13190fi
13191
13192       eval gl_cv_bitsizeof_${gltype}=\$result
13193
13194fi
13195eval ac_res=\$gl_cv_bitsizeof_${gltype}
13196	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13197$as_echo "$ac_res" >&6; }
13198    eval result=\$gl_cv_bitsizeof_${gltype}
13199    if test $result = unknown; then
13200                                                result=0
13201    fi
13202    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13203    cat >>confdefs.h <<_ACEOF
13204#define BITSIZEOF_${GLTYPE} $result
13205_ACEOF
13206
13207    eval BITSIZEOF_${GLTYPE}=\$result
13208  done
13209
13210
13211  fi
13212
13213
13214  for gltype in sig_atomic_t wchar_t wint_t ; do
13215    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
13216$as_echo_n "checking for bit size of $gltype... " >&6; }
13217if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
13218  $as_echo_n "(cached) " >&6
13219else
13220  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
13221  #include <stddef.h>
13222  #include <signal.h>
13223  #if HAVE_WCHAR_H
13224  # include <wchar.h>
13225  #endif
13226
13227#include <limits.h>"; then :
13228
13229else
13230  result=unknown
13231fi
13232
13233       eval gl_cv_bitsizeof_${gltype}=\$result
13234
13235fi
13236eval ac_res=\$gl_cv_bitsizeof_${gltype}
13237	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13238$as_echo "$ac_res" >&6; }
13239    eval result=\$gl_cv_bitsizeof_${gltype}
13240    if test $result = unknown; then
13241                                                result=0
13242    fi
13243    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13244    cat >>confdefs.h <<_ACEOF
13245#define BITSIZEOF_${GLTYPE} $result
13246_ACEOF
13247
13248    eval BITSIZEOF_${GLTYPE}=\$result
13249  done
13250
13251
13252
13253
13254  for gltype in sig_atomic_t wchar_t wint_t ; do
13255    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
13256$as_echo_n "checking whether $gltype is signed... " >&6; }
13257if eval \${gl_cv_type_${gltype}_signed+:} false; then :
13258  $as_echo_n "(cached) " >&6
13259else
13260  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13261/* end confdefs.h.  */
13262
13263  #include <stddef.h>
13264  #include <signal.h>
13265  #if HAVE_WCHAR_H
13266  # include <wchar.h>
13267  #endif
13268
13269            int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
13270int
13271main ()
13272{
13273
13274  ;
13275  return 0;
13276}
13277_ACEOF
13278if ac_fn_c_try_compile "$LINENO"; then :
13279  result=yes
13280else
13281  result=no
13282fi
13283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13284       eval gl_cv_type_${gltype}_signed=\$result
13285
13286fi
13287eval ac_res=\$gl_cv_type_${gltype}_signed
13288	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13289$as_echo "$ac_res" >&6; }
13290    eval result=\$gl_cv_type_${gltype}_signed
13291    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13292    if test "$result" = yes; then
13293      cat >>confdefs.h <<_ACEOF
13294#define HAVE_SIGNED_${GLTYPE} 1
13295_ACEOF
13296
13297      eval HAVE_SIGNED_${GLTYPE}=1
13298    else
13299      eval HAVE_SIGNED_${GLTYPE}=0
13300    fi
13301  done
13302
13303
13304  gl_cv_type_ptrdiff_t_signed=yes
13305  gl_cv_type_size_t_signed=no
13306  if test $APPLE_UNIVERSAL_BUILD = 0; then
13307
13308
13309  for gltype in ptrdiff_t size_t ; do
13310    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
13311$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
13312if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
13313  $as_echo_n "(cached) " >&6
13314else
13315  eval gl_cv_type_${gltype}_suffix=no
13316       eval result=\$gl_cv_type_${gltype}_signed
13317       if test "$result" = yes; then
13318         glsufu=
13319       else
13320         glsufu=u
13321       fi
13322       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
13323         case $glsuf in
13324           '')  gltype1='int';;
13325           l)   gltype1='long int';;
13326           ll)  gltype1='long long int';;
13327           i64) gltype1='__int64';;
13328           u)   gltype1='unsigned int';;
13329           ul)  gltype1='unsigned long int';;
13330           ull) gltype1='unsigned long long int';;
13331           ui64)gltype1='unsigned __int64';;
13332         esac
13333         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13334/* end confdefs.h.  */
13335
13336  #include <stddef.h>
13337  #include <signal.h>
13338  #if HAVE_WCHAR_H
13339  # include <wchar.h>
13340  #endif
13341
13342              extern $gltype foo;
13343              extern $gltype1 foo;
13344int
13345main ()
13346{
13347
13348  ;
13349  return 0;
13350}
13351_ACEOF
13352if ac_fn_c_try_compile "$LINENO"; then :
13353  eval gl_cv_type_${gltype}_suffix=\$glsuf
13354fi
13355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13356         eval result=\$gl_cv_type_${gltype}_suffix
13357         test "$result" != no && break
13358       done
13359fi
13360eval ac_res=\$gl_cv_type_${gltype}_suffix
13361	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13362$as_echo "$ac_res" >&6; }
13363    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13364    eval result=\$gl_cv_type_${gltype}_suffix
13365    test "$result" = no && result=
13366    eval ${GLTYPE}_SUFFIX=\$result
13367    cat >>confdefs.h <<_ACEOF
13368#define ${GLTYPE}_SUFFIX $result
13369_ACEOF
13370
13371  done
13372
13373
13374  fi
13375
13376
13377  for gltype in sig_atomic_t wchar_t wint_t ; do
13378    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
13379$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
13380if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
13381  $as_echo_n "(cached) " >&6
13382else
13383  eval gl_cv_type_${gltype}_suffix=no
13384       eval result=\$gl_cv_type_${gltype}_signed
13385       if test "$result" = yes; then
13386         glsufu=
13387       else
13388         glsufu=u
13389       fi
13390       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
13391         case $glsuf in
13392           '')  gltype1='int';;
13393           l)   gltype1='long int';;
13394           ll)  gltype1='long long int';;
13395           i64) gltype1='__int64';;
13396           u)   gltype1='unsigned int';;
13397           ul)  gltype1='unsigned long int';;
13398           ull) gltype1='unsigned long long int';;
13399           ui64)gltype1='unsigned __int64';;
13400         esac
13401         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13402/* end confdefs.h.  */
13403
13404  #include <stddef.h>
13405  #include <signal.h>
13406  #if HAVE_WCHAR_H
13407  # include <wchar.h>
13408  #endif
13409
13410              extern $gltype foo;
13411              extern $gltype1 foo;
13412int
13413main ()
13414{
13415
13416  ;
13417  return 0;
13418}
13419_ACEOF
13420if ac_fn_c_try_compile "$LINENO"; then :
13421  eval gl_cv_type_${gltype}_suffix=\$glsuf
13422fi
13423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13424         eval result=\$gl_cv_type_${gltype}_suffix
13425         test "$result" != no && break
13426       done
13427fi
13428eval ac_res=\$gl_cv_type_${gltype}_suffix
13429	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13430$as_echo "$ac_res" >&6; }
13431    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13432    eval result=\$gl_cv_type_${gltype}_suffix
13433    test "$result" = no && result=
13434    eval ${GLTYPE}_SUFFIX=\$result
13435    cat >>confdefs.h <<_ACEOF
13436#define ${GLTYPE}_SUFFIX $result
13437_ACEOF
13438
13439  done
13440
13441
13442
13443          if test $GNULIB_OVERRIDES_WINT_T = 1; then
13444    BITSIZEOF_WINT_T=32
13445  fi
13446
13447      ;;
13448  esac
13449
13450
13451
13452  LIMITS_H='limits.h'
13453   if test -n "$LIMITS_H"; then
13454  GL_GENERATE_LIMITS_H_TRUE=
13455  GL_GENERATE_LIMITS_H_FALSE='#'
13456else
13457  GL_GENERATE_LIMITS_H_TRUE='#'
13458  GL_GENERATE_LIMITS_H_FALSE=
13459fi
13460
13461
13462
13463
13464
13465
13466
13467   if test -n "$STDINT_H"; then
13468  GL_GENERATE_STDINT_H_TRUE=
13469  GL_GENERATE_STDINT_H_FALSE='#'
13470else
13471  GL_GENERATE_STDINT_H_TRUE='#'
13472  GL_GENERATE_STDINT_H_FALSE=
13473fi
13474
13475
13476
13477  GNULIB_IMAXABS=0;
13478  GNULIB_IMAXDIV=0;
13479  GNULIB_STRTOIMAX=0;
13480  GNULIB_STRTOUMAX=0;
13481    HAVE_DECL_IMAXABS=1;
13482  HAVE_DECL_IMAXDIV=1;
13483  HAVE_DECL_STRTOIMAX=1;
13484  HAVE_DECL_STRTOUMAX=1;
13485  HAVE_IMAXDIV_T=1;
13486  REPLACE_STRTOIMAX=0;
13487  REPLACE_STRTOUMAX=0;
13488  INT32_MAX_LT_INTMAX_MAX=1;
13489  INT64_MAX_EQ_LONG_MAX='defined _LP64';
13490  PRIPTR_PREFIX=__PRIPTR_PREFIX;
13491  UINT32_MAX_LT_UINTMAX_MAX=1;
13492  UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505
13506
13507
13508     if test $gl_cv_have_include_next = yes; then
13509       gl_cv_next_inttypes_h='<'inttypes.h'>'
13510     else
13511       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
13512$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
13513if ${gl_cv_next_inttypes_h+:} false; then :
13514  $as_echo_n "(cached) " >&6
13515else
13516
13517             if test $ac_cv_header_inttypes_h = yes; then
13518
13519
13520
13521
13522  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13523/* end confdefs.h.  */
13524#include <inttypes.h>
13525_ACEOF
13526                case "$host_os" in
13527    aix*) gl_absname_cpp="$ac_cpp -C" ;;
13528    *)    gl_absname_cpp="$ac_cpp" ;;
13529  esac
13530
13531  case "$host_os" in
13532    mingw*)
13533                                          gl_dirsep_regex='[/\\]'
13534      ;;
13535    *)
13536      gl_dirsep_regex='\/'
13537      ;;
13538  esac
13539      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13540  gl_header_literal_regex=`echo 'inttypes.h' \
13541                           | sed -e "$gl_make_literal_regex_sed"`
13542  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13543      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13544      s|^/[^/]|//&|
13545      p
13546      q
13547    }'
13548
13549        gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13550  sed -n "$gl_absolute_header_sed"`
13551
13552           gl_header=$gl_cv_absolute_inttypes_h
13553           gl_cv_next_inttypes_h='"'$gl_header'"'
13554          else
13555               gl_cv_next_inttypes_h='<'inttypes.h'>'
13556             fi
13557
13558
13559fi
13560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
13561$as_echo "$gl_cv_next_inttypes_h" >&6; }
13562     fi
13563     NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
13564
13565     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13566       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13567       gl_next_as_first_directive='<'inttypes.h'>'
13568     else
13569       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13570       gl_next_as_first_directive=$gl_cv_next_inttypes_h
13571     fi
13572     NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
13573
13574
13575
13576
13577
13578
13579
13580
13581
13582
13583
13584
13585
13586
13587
13588
13589  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
13590$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
13591if ${gl_cv_cc_double_expbit0+:} false; then :
13592  $as_echo_n "(cached) " >&6
13593else
13594
13595      if test "$cross_compiling" = yes; then :
13596
13597                                                                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13598/* end confdefs.h.  */
13599
13600#if defined arm || defined __arm || defined __arm__
13601  mixed_endianness
13602#endif
13603
13604_ACEOF
13605if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13606  $EGREP "mixed_endianness" >/dev/null 2>&1; then :
13607  gl_cv_cc_double_expbit0="unknown"
13608else
13609
13610                                                         :
13611if ${ac_cv_c_bigendian+:} false; then :
13612  $as_echo_n "(cached) " >&6
13613else
13614  ac_cv_c_bigendian=unknown
13615    # See if we're dealing with a universal compiler.
13616    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13617/* end confdefs.h.  */
13618#ifndef __APPLE_CC__
13619	       not a universal capable compiler
13620	     #endif
13621	     typedef int dummy;
13622
13623_ACEOF
13624if ac_fn_c_try_compile "$LINENO"; then :
13625
13626	# Check for potential -arch flags.  It is not universal unless
13627	# there are at least two -arch flags with different values.
13628	ac_arch=
13629	ac_prev=
13630	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13631	 if test -n "$ac_prev"; then
13632	   case $ac_word in
13633	     i?86 | x86_64 | ppc | ppc64)
13634	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13635		 ac_arch=$ac_word
13636	       else
13637		 ac_cv_c_bigendian=universal
13638		 break
13639	       fi
13640	       ;;
13641	   esac
13642	   ac_prev=
13643	 elif test "x$ac_word" = "x-arch"; then
13644	   ac_prev=arch
13645	 fi
13646       done
13647fi
13648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13649    if test $ac_cv_c_bigendian = unknown; then
13650      # See if sys/param.h defines the BYTE_ORDER macro.
13651      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13652/* end confdefs.h.  */
13653#include <sys/types.h>
13654	     #include <sys/param.h>
13655
13656int
13657main ()
13658{
13659#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13660		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13661		     && LITTLE_ENDIAN)
13662	      bogus endian macros
13663	     #endif
13664
13665  ;
13666  return 0;
13667}
13668_ACEOF
13669if ac_fn_c_try_compile "$LINENO"; then :
13670  # It does; now see whether it defined to BIG_ENDIAN or not.
13671	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13672/* end confdefs.h.  */
13673#include <sys/types.h>
13674		#include <sys/param.h>
13675
13676int
13677main ()
13678{
13679#if BYTE_ORDER != BIG_ENDIAN
13680		 not big endian
13681		#endif
13682
13683  ;
13684  return 0;
13685}
13686_ACEOF
13687if ac_fn_c_try_compile "$LINENO"; then :
13688  ac_cv_c_bigendian=yes
13689else
13690  ac_cv_c_bigendian=no
13691fi
13692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13693fi
13694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13695    fi
13696    if test $ac_cv_c_bigendian = unknown; then
13697      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13698      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13699/* end confdefs.h.  */
13700#include <limits.h>
13701
13702int
13703main ()
13704{
13705#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13706	      bogus endian macros
13707	     #endif
13708
13709  ;
13710  return 0;
13711}
13712_ACEOF
13713if ac_fn_c_try_compile "$LINENO"; then :
13714  # It does; now see whether it defined to _BIG_ENDIAN or not.
13715	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13716/* end confdefs.h.  */
13717#include <limits.h>
13718
13719int
13720main ()
13721{
13722#ifndef _BIG_ENDIAN
13723		 not big endian
13724		#endif
13725
13726  ;
13727  return 0;
13728}
13729_ACEOF
13730if ac_fn_c_try_compile "$LINENO"; then :
13731  ac_cv_c_bigendian=yes
13732else
13733  ac_cv_c_bigendian=no
13734fi
13735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13736fi
13737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13738    fi
13739    if test $ac_cv_c_bigendian = unknown; then
13740      # Compile a test program.
13741      if test "$cross_compiling" = yes; then :
13742  # Try to guess by grepping values from an object file.
13743	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13744/* end confdefs.h.  */
13745short int ascii_mm[] =
13746		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13747		short int ascii_ii[] =
13748		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13749		int use_ascii (int i) {
13750		  return ascii_mm[i] + ascii_ii[i];
13751		}
13752		short int ebcdic_ii[] =
13753		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13754		short int ebcdic_mm[] =
13755		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13756		int use_ebcdic (int i) {
13757		  return ebcdic_mm[i] + ebcdic_ii[i];
13758		}
13759		extern int foo;
13760
13761int
13762main ()
13763{
13764return use_ascii (foo) == use_ebcdic (foo);
13765  ;
13766  return 0;
13767}
13768_ACEOF
13769if ac_fn_c_try_compile "$LINENO"; then :
13770  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13771	      ac_cv_c_bigendian=yes
13772	    fi
13773	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13774	      if test "$ac_cv_c_bigendian" = unknown; then
13775		ac_cv_c_bigendian=no
13776	      else
13777		# finding both strings is unlikely to happen, but who knows?
13778		ac_cv_c_bigendian=unknown
13779	      fi
13780	    fi
13781fi
13782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13783else
13784  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13785/* end confdefs.h.  */
13786$ac_includes_default
13787int
13788main ()
13789{
13790
13791	     /* Are we little or big endian?  From Harbison&Steele.  */
13792	     union
13793	     {
13794	       long int l;
13795	       char c[sizeof (long int)];
13796	     } u;
13797	     u.l = 1;
13798	     return u.c[sizeof (long int) - 1] == 1;
13799
13800  ;
13801  return 0;
13802}
13803_ACEOF
13804if ac_fn_c_try_run "$LINENO"; then :
13805  ac_cv_c_bigendian=no
13806else
13807  ac_cv_c_bigendian=yes
13808fi
13809rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13810  conftest.$ac_objext conftest.beam conftest.$ac_ext
13811fi
13812
13813    fi
13814fi
13815:
13816 case $ac_cv_c_bigendian in #(
13817   yes)
13818     gl_cv_cc_double_expbit0="word 0 bit 20";; #(
13819   no)
13820     gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
13821   universal)
13822
13823$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13824
13825     ;; #(
13826   *)
13827     gl_cv_cc_double_expbit0="unknown" ;;
13828 esac
13829
13830
13831fi
13832rm -f conftest*
13833
13834
13835else
13836  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13837/* end confdefs.h.  */
13838
13839#include <float.h>
13840#include <stddef.h>
13841#include <stdio.h>
13842#include <string.h>
13843#define NWORDS \
13844  ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
13845typedef union { double value; unsigned int word[NWORDS]; } memory_double;
13846static unsigned int ored_words[NWORDS];
13847static unsigned int anded_words[NWORDS];
13848static void add_to_ored_words (double x)
13849{
13850  memory_double m;
13851  size_t i;
13852  /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
13853  memset (&m, 0, sizeof (memory_double));
13854  m.value = x;
13855  for (i = 0; i < NWORDS; i++)
13856    {
13857      ored_words[i] |= m.word[i];
13858      anded_words[i] &= m.word[i];
13859    }
13860}
13861int main ()
13862{
13863  size_t j;
13864  FILE *fp = fopen ("conftest.out", "w");
13865  if (fp == NULL)
13866    return 1;
13867  for (j = 0; j < NWORDS; j++)
13868    anded_words[j] = ~ (unsigned int) 0;
13869  add_to_ored_words (0.25);
13870  add_to_ored_words (0.5);
13871  add_to_ored_words (1.0);
13872  add_to_ored_words (2.0);
13873  add_to_ored_words (4.0);
13874  /* Remove bits that are common (e.g. if representation of the first mantissa
13875     bit is explicit).  */
13876  for (j = 0; j < NWORDS; j++)
13877    ored_words[j] &= ~anded_words[j];
13878  /* Now find the nonzero word.  */
13879  for (j = 0; j < NWORDS; j++)
13880    if (ored_words[j] != 0)
13881      break;
13882  if (j < NWORDS)
13883    {
13884      size_t i;
13885      for (i = j + 1; i < NWORDS; i++)
13886        if (ored_words[i] != 0)
13887          {
13888            fprintf (fp, "unknown");
13889            return (fclose (fp) != 0);
13890          }
13891      for (i = 0; ; i++)
13892        if ((ored_words[j] >> i) & 1)
13893          {
13894            fprintf (fp, "word %d bit %d", (int) j, (int) i);
13895            return (fclose (fp) != 0);
13896          }
13897    }
13898  fprintf (fp, "unknown");
13899  return (fclose (fp) != 0);
13900}
13901
13902_ACEOF
13903if ac_fn_c_try_run "$LINENO"; then :
13904  gl_cv_cc_double_expbit0=`cat conftest.out`
13905else
13906  gl_cv_cc_double_expbit0="unknown"
13907fi
13908rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13909  conftest.$ac_objext conftest.beam conftest.$ac_ext
13910fi
13911
13912      rm -f conftest.out
13913
13914fi
13915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
13916$as_echo "$gl_cv_cc_double_expbit0" >&6; }
13917  case "$gl_cv_cc_double_expbit0" in
13918    word*bit*)
13919      word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
13920      bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
13921
13922cat >>confdefs.h <<_ACEOF
13923#define DBL_EXPBIT0_WORD $word
13924_ACEOF
13925
13926
13927cat >>confdefs.h <<_ACEOF
13928#define DBL_EXPBIT0_BIT $bit
13929_ACEOF
13930
13931      ;;
13932  esac
13933
13934
13935   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13936$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13937if ${ac_cv_c_bigendian+:} false; then :
13938  $as_echo_n "(cached) " >&6
13939else
13940  ac_cv_c_bigendian=unknown
13941    # See if we're dealing with a universal compiler.
13942    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13943/* end confdefs.h.  */
13944#ifndef __APPLE_CC__
13945	       not a universal capable compiler
13946	     #endif
13947	     typedef int dummy;
13948
13949_ACEOF
13950if ac_fn_c_try_compile "$LINENO"; then :
13951
13952	# Check for potential -arch flags.  It is not universal unless
13953	# there are at least two -arch flags with different values.
13954	ac_arch=
13955	ac_prev=
13956	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13957	 if test -n "$ac_prev"; then
13958	   case $ac_word in
13959	     i?86 | x86_64 | ppc | ppc64)
13960	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13961		 ac_arch=$ac_word
13962	       else
13963		 ac_cv_c_bigendian=universal
13964		 break
13965	       fi
13966	       ;;
13967	   esac
13968	   ac_prev=
13969	 elif test "x$ac_word" = "x-arch"; then
13970	   ac_prev=arch
13971	 fi
13972       done
13973fi
13974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13975    if test $ac_cv_c_bigendian = unknown; then
13976      # See if sys/param.h defines the BYTE_ORDER macro.
13977      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13978/* end confdefs.h.  */
13979#include <sys/types.h>
13980	     #include <sys/param.h>
13981
13982int
13983main ()
13984{
13985#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13986		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13987		     && LITTLE_ENDIAN)
13988	      bogus endian macros
13989	     #endif
13990
13991  ;
13992  return 0;
13993}
13994_ACEOF
13995if ac_fn_c_try_compile "$LINENO"; then :
13996  # It does; now see whether it defined to BIG_ENDIAN or not.
13997	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13998/* end confdefs.h.  */
13999#include <sys/types.h>
14000		#include <sys/param.h>
14001
14002int
14003main ()
14004{
14005#if BYTE_ORDER != BIG_ENDIAN
14006		 not big endian
14007		#endif
14008
14009  ;
14010  return 0;
14011}
14012_ACEOF
14013if ac_fn_c_try_compile "$LINENO"; then :
14014  ac_cv_c_bigendian=yes
14015else
14016  ac_cv_c_bigendian=no
14017fi
14018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14019fi
14020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14021    fi
14022    if test $ac_cv_c_bigendian = unknown; then
14023      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14024      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14025/* end confdefs.h.  */
14026#include <limits.h>
14027
14028int
14029main ()
14030{
14031#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14032	      bogus endian macros
14033	     #endif
14034
14035  ;
14036  return 0;
14037}
14038_ACEOF
14039if ac_fn_c_try_compile "$LINENO"; then :
14040  # It does; now see whether it defined to _BIG_ENDIAN or not.
14041	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14042/* end confdefs.h.  */
14043#include <limits.h>
14044
14045int
14046main ()
14047{
14048#ifndef _BIG_ENDIAN
14049		 not big endian
14050		#endif
14051
14052  ;
14053  return 0;
14054}
14055_ACEOF
14056if ac_fn_c_try_compile "$LINENO"; then :
14057  ac_cv_c_bigendian=yes
14058else
14059  ac_cv_c_bigendian=no
14060fi
14061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14062fi
14063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14064    fi
14065    if test $ac_cv_c_bigendian = unknown; then
14066      # Compile a test program.
14067      if test "$cross_compiling" = yes; then :
14068  # Try to guess by grepping values from an object file.
14069	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14070/* end confdefs.h.  */
14071short int ascii_mm[] =
14072		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14073		short int ascii_ii[] =
14074		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14075		int use_ascii (int i) {
14076		  return ascii_mm[i] + ascii_ii[i];
14077		}
14078		short int ebcdic_ii[] =
14079		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14080		short int ebcdic_mm[] =
14081		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14082		int use_ebcdic (int i) {
14083		  return ebcdic_mm[i] + ebcdic_ii[i];
14084		}
14085		extern int foo;
14086
14087int
14088main ()
14089{
14090return use_ascii (foo) == use_ebcdic (foo);
14091  ;
14092  return 0;
14093}
14094_ACEOF
14095if ac_fn_c_try_compile "$LINENO"; then :
14096  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14097	      ac_cv_c_bigendian=yes
14098	    fi
14099	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14100	      if test "$ac_cv_c_bigendian" = unknown; then
14101		ac_cv_c_bigendian=no
14102	      else
14103		# finding both strings is unlikely to happen, but who knows?
14104		ac_cv_c_bigendian=unknown
14105	      fi
14106	    fi
14107fi
14108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14109else
14110  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14111/* end confdefs.h.  */
14112$ac_includes_default
14113int
14114main ()
14115{
14116
14117	     /* Are we little or big endian?  From Harbison&Steele.  */
14118	     union
14119	     {
14120	       long int l;
14121	       char c[sizeof (long int)];
14122	     } u;
14123	     u.l = 1;
14124	     return u.c[sizeof (long int) - 1] == 1;
14125
14126  ;
14127  return 0;
14128}
14129_ACEOF
14130if ac_fn_c_try_run "$LINENO"; then :
14131  ac_cv_c_bigendian=no
14132else
14133  ac_cv_c_bigendian=yes
14134fi
14135rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14136  conftest.$ac_objext conftest.beam conftest.$ac_ext
14137fi
14138
14139    fi
14140fi
14141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14142$as_echo "$ac_cv_c_bigendian" >&6; }
14143 case $ac_cv_c_bigendian in #(
14144   yes)
14145     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14146;; #(
14147   no)
14148      ;; #(
14149   universal)
14150
14151$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
14152
14153     ;; #(
14154   *)
14155     as_fn_error $? "unknown endianness
14156 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
14157 esac
14158
14159
14160
14161  GNULIB_LOCALECONV=0;
14162  GNULIB_SETLOCALE=0;
14163  GNULIB_SETLOCALE_NULL=0;
14164  GNULIB_DUPLOCALE=0;
14165  GNULIB_LOCALENAME=0;
14166    HAVE_NEWLOCALE=1;
14167  HAVE_DUPLOCALE=1;
14168  HAVE_FREELOCALE=1;
14169  REPLACE_LOCALECONV=0;
14170  REPLACE_SETLOCALE=0;
14171  REPLACE_NEWLOCALE=0;
14172  REPLACE_DUPLOCALE=0;
14173  REPLACE_FREELOCALE=0;
14174  REPLACE_STRUCT_LCONV=0;
14175
14176
14177    REPLACE_NULL=0;
14178  HAVE_MAX_ALIGN_T=1;
14179  HAVE_WCHAR_T=1;
14180
14181
14182  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
14183$as_echo_n "checking for wchar_t... " >&6; }
14184if ${gt_cv_c_wchar_t+:} false; then :
14185  $as_echo_n "(cached) " >&6
14186else
14187  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14188/* end confdefs.h.  */
14189#include <stddef.h>
14190            wchar_t foo = (wchar_t)'\0';
14191int
14192main ()
14193{
14194
14195  ;
14196  return 0;
14197}
14198_ACEOF
14199if ac_fn_c_try_compile "$LINENO"; then :
14200  gt_cv_c_wchar_t=yes
14201else
14202  gt_cv_c_wchar_t=no
14203fi
14204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14205fi
14206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
14207$as_echo "$gt_cv_c_wchar_t" >&6; }
14208  if test $gt_cv_c_wchar_t = yes; then
14209
14210$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
14211
14212  fi
14213
14214
14215
14216
14217
14218
14219
14220  STDDEF_H=
14221
14222      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
14223$as_echo_n "checking for good max_align_t... " >&6; }
14224if ${gl_cv_type_max_align_t+:} false; then :
14225  $as_echo_n "(cached) " >&6
14226else
14227  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14228/* end confdefs.h.  */
14229#include <stddef.h>
14230            unsigned int s = sizeof (max_align_t);
14231            #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
14232            int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
14233            int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
14234            #endif
14235            typedef struct { char a; max_align_t b; } max_helper;
14236            typedef struct { char a; long b; } long_helper;
14237            typedef struct { char a; double b; } double_helper;
14238            typedef struct { char a; long double b; } long_double_helper;
14239            int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
14240            int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
14241            int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
14242
14243int
14244main ()
14245{
14246
14247  ;
14248  return 0;
14249}
14250_ACEOF
14251if ac_fn_c_try_compile "$LINENO"; then :
14252  gl_cv_type_max_align_t=yes
14253else
14254  gl_cv_type_max_align_t=no
14255fi
14256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14257
14258fi
14259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
14260$as_echo "$gl_cv_type_max_align_t" >&6; }
14261  if test $gl_cv_type_max_align_t = no; then
14262    HAVE_MAX_ALIGN_T=0
14263    STDDEF_H=stddef.h
14264  fi
14265
14266  if test $gt_cv_c_wchar_t = no; then
14267    HAVE_WCHAR_T=0
14268    STDDEF_H=stddef.h
14269  fi
14270
14271  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
14272$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
14273if ${gl_cv_decl_null_works+:} false; then :
14274  $as_echo_n "(cached) " >&6
14275else
14276  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14277/* end confdefs.h.  */
14278#include <stddef.h>
14279      int test[2 * (sizeof NULL == sizeof (void *)) -1];
14280
14281int
14282main ()
14283{
14284
14285  ;
14286  return 0;
14287}
14288_ACEOF
14289if ac_fn_c_try_compile "$LINENO"; then :
14290  gl_cv_decl_null_works=yes
14291else
14292  gl_cv_decl_null_works=no
14293fi
14294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14295fi
14296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
14297$as_echo "$gl_cv_decl_null_works" >&6; }
14298  if test $gl_cv_decl_null_works = no; then
14299    REPLACE_NULL=1
14300    STDDEF_H=stddef.h
14301  fi
14302
14303
14304   if test -n "$STDDEF_H"; then
14305  GL_GENERATE_STDDEF_H_TRUE=
14306  GL_GENERATE_STDDEF_H_FALSE='#'
14307else
14308  GL_GENERATE_STDDEF_H_TRUE='#'
14309  GL_GENERATE_STDDEF_H_FALSE=
14310fi
14311
14312  if test -n "$STDDEF_H"; then
14313
14314
14315
14316
14317
14318
14319
14320
14321     if test $gl_cv_have_include_next = yes; then
14322       gl_cv_next_stddef_h='<'stddef.h'>'
14323     else
14324       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
14325$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
14326if ${gl_cv_next_stddef_h+:} false; then :
14327  $as_echo_n "(cached) " >&6
14328else
14329
14330
14331
14332  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14333/* end confdefs.h.  */
14334#include <stddef.h>
14335_ACEOF
14336                case "$host_os" in
14337    aix*) gl_absname_cpp="$ac_cpp -C" ;;
14338    *)    gl_absname_cpp="$ac_cpp" ;;
14339  esac
14340
14341  case "$host_os" in
14342    mingw*)
14343                                          gl_dirsep_regex='[/\\]'
14344      ;;
14345    *)
14346      gl_dirsep_regex='\/'
14347      ;;
14348  esac
14349      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14350  gl_header_literal_regex=`echo 'stddef.h' \
14351                           | sed -e "$gl_make_literal_regex_sed"`
14352  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14353      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14354      s|^/[^/]|//&|
14355      p
14356      q
14357    }'
14358
14359        gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14360  sed -n "$gl_absolute_header_sed"`
14361
14362           gl_header=$gl_cv_absolute_stddef_h
14363           gl_cv_next_stddef_h='"'$gl_header'"'
14364
14365
14366fi
14367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
14368$as_echo "$gl_cv_next_stddef_h" >&6; }
14369     fi
14370     NEXT_STDDEF_H=$gl_cv_next_stddef_h
14371
14372     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14373       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14374       gl_next_as_first_directive='<'stddef.h'>'
14375     else
14376       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14377       gl_next_as_first_directive=$gl_cv_next_stddef_h
14378     fi
14379     NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
14380
14381
14382
14383
14384  fi
14385
14386
14387
14388
14389
14390
14391        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
14392$as_echo_n "checking whether locale.h defines locale_t... " >&6; }
14393if ${gl_cv_header_locale_has_locale_t+:} false; then :
14394  $as_echo_n "(cached) " >&6
14395else
14396  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14397/* end confdefs.h.  */
14398#include <locale.h>
14399            locale_t x;
14400int
14401main ()
14402{
14403
14404  ;
14405  return 0;
14406}
14407_ACEOF
14408if ac_fn_c_try_compile "$LINENO"; then :
14409  gl_cv_header_locale_has_locale_t=yes
14410else
14411  gl_cv_header_locale_has_locale_t=no
14412fi
14413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14414
14415fi
14416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
14417$as_echo "$gl_cv_header_locale_has_locale_t" >&6; }
14418
14419
14420  if test $ac_cv_header_xlocale_h = yes; then
14421    HAVE_XLOCALE_H=1
14422    if test $gl_cv_header_locale_has_locale_t = yes; then
14423      gl_cv_header_locale_h_needs_xlocale_h=no
14424    else
14425      gl_cv_header_locale_h_needs_xlocale_h=yes
14426    fi
14427    HAVE_LOCALE_T=1
14428  else
14429    HAVE_XLOCALE_H=0
14430    gl_cv_header_locale_h_needs_xlocale_h=no
14431    if test $gl_cv_header_locale_has_locale_t = yes; then
14432      HAVE_LOCALE_T=1
14433    else
14434      HAVE_LOCALE_T=0
14435    fi
14436  fi
14437
14438
14439
14440
14441  gl_threads_api=none
14442  LIBTHREAD=
14443  LTLIBTHREAD=
14444  LIBMULTITHREAD=
14445  LTLIBMULTITHREAD=
14446  if test "$gl_use_threads" != no; then
14447
14448
14449  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
14450$as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
14451if ${gl_cv_have_weak+:} false; then :
14452  $as_echo_n "(cached) " >&6
14453else
14454  gl_cv_have_weak=no
14455          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14456/* end confdefs.h.  */
14457extern void xyzzy ();
14458#pragma weak xyzzy
14459int
14460main ()
14461{
14462xyzzy();
14463  ;
14464  return 0;
14465}
14466_ACEOF
14467if ac_fn_c_try_link "$LINENO"; then :
14468  gl_cv_have_weak=maybe
14469fi
14470rm -f core conftest.err conftest.$ac_objext \
14471    conftest$ac_exeext conftest.$ac_ext
14472     if test $gl_cv_have_weak = maybe; then
14473                     if test "$cross_compiling" = yes; then :
14474                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14475/* end confdefs.h.  */
14476#ifdef __ELF__
14477             Extensible Linking Format
14478             #endif
14479
14480_ACEOF
14481if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14482  $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
14483  gl_cv_have_weak="guessing yes"
14484else
14485  gl_cv_have_weak="guessing no"
14486fi
14487rm -f conftest*
14488
14489
14490else
14491  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14492/* end confdefs.h.  */
14493
14494#include <stdio.h>
14495#pragma weak fputs
14496int main ()
14497{
14498  return (fputs == NULL);
14499}
14500_ACEOF
14501if ac_fn_c_try_run "$LINENO"; then :
14502  gl_cv_have_weak=yes
14503else
14504  gl_cv_have_weak=no
14505fi
14506rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14507  conftest.$ac_objext conftest.beam conftest.$ac_ext
14508fi
14509
14510     fi
14511          case " $LDFLAGS " in
14512       *" -static "*) gl_cv_have_weak=no ;;
14513     esac
14514                    case "$gl_cv_have_weak" in
14515       *yes)
14516         case "$host_os" in
14517           freebsd* | dragonfly*)
14518             : > conftest1.c
14519             $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
14520             cat <<EOF > conftest2.c
14521#include <pthread.h>
14522#pragma weak pthread_mutexattr_gettype
14523int main ()
14524{
14525  return (pthread_mutexattr_gettype != NULL);
14526}
14527EOF
14528             $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
14529               || gl_cv_have_weak=no
14530             rm -f conftest1.c libempty.so conftest2.c conftest
14531             ;;
14532         esac
14533         ;;
14534     esac
14535
14536fi
14537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
14538$as_echo "$gl_cv_have_weak" >&6; }
14539  case "$gl_cv_have_weak" in
14540    *yes)
14541
14542$as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
14543
14544      ;;
14545  esac
14546
14547    if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
14548
14549      :
14550    fi
14551    if test "$gl_use_threads" = isoc || test "$gl_use_threads" = isoc+posix; then
14552
14553      gl_have_isoc_threads="$ac_cv_header_threads_h"
14554    fi
14555    if test "$gl_use_threads" = yes \
14556       || test "$gl_use_threads" = posix \
14557       || test "$gl_use_threads" = isoc+posix; then
14558
14559
14560  if test -z "$gl_pthreadlib_body_done"; then
14561    gl_pthread_api=no
14562    LIBPTHREAD=
14563    LIBPMULTITHREAD=
14564    # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
14565    # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
14566    ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
14567if test "x$ac_cv_header_pthread_h" = xyes; then :
14568  gl_have_pthread_h=yes
14569else
14570  gl_have_pthread_h=no
14571fi
14572
14573
14574    if test "$gl_have_pthread_h" = yes; then
14575      # Other possible tests:
14576      #   -lpthreads (FSU threads, PCthreads)
14577      #   -lgthreads
14578      # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
14579      # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
14580      # the second one only in libpthread, and lock.c needs it.
14581      #
14582      # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
14583      # needs -pthread for some reason.  See:
14584      # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
14585      save_LIBS=$LIBS
14586      for gl_pthread in '' '-pthread'; do
14587        LIBS="$LIBS $gl_pthread"
14588        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14589/* end confdefs.h.  */
14590#include <pthread.h>
14591               pthread_mutex_t m;
14592               pthread_mutexattr_t ma;
14593
14594int
14595main ()
14596{
14597pthread_mutex_lock (&m);
14598               pthread_mutexattr_init (&ma);
14599  ;
14600  return 0;
14601}
14602_ACEOF
14603if ac_fn_c_try_link "$LINENO"; then :
14604  gl_pthread_api=yes
14605           LIBPTHREAD=$gl_pthread
14606           LIBPMULTITHREAD=$gl_pthread
14607fi
14608rm -f core conftest.err conftest.$ac_objext \
14609    conftest$ac_exeext conftest.$ac_ext
14610        LIBS=$save_LIBS
14611        test $gl_pthread_api = yes && break
14612      done
14613
14614      # Test for libpthread by looking for pthread_kill. (Not pthread_self,
14615      # since it is defined as a macro on OSF/1.)
14616      if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
14617        # The program links fine without libpthread. But it may actually
14618        # need to link with libpthread in order to create multiple threads.
14619        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14620$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
14621if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
14622  $as_echo_n "(cached) " >&6
14623else
14624  ac_check_lib_save_LIBS=$LIBS
14625LIBS="-lpthread  $LIBS"
14626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14627/* end confdefs.h.  */
14628
14629/* Override any GCC internal prototype to avoid an error.
14630   Use char because int might match the return type of a GCC
14631   builtin and then its argument prototype would still apply.  */
14632#ifdef __cplusplus
14633extern "C"
14634#endif
14635char pthread_kill ();
14636int
14637main ()
14638{
14639return pthread_kill ();
14640  ;
14641  return 0;
14642}
14643_ACEOF
14644if ac_fn_c_try_link "$LINENO"; then :
14645  ac_cv_lib_pthread_pthread_kill=yes
14646else
14647  ac_cv_lib_pthread_pthread_kill=no
14648fi
14649rm -f core conftest.err conftest.$ac_objext \
14650    conftest$ac_exeext conftest.$ac_ext
14651LIBS=$ac_check_lib_save_LIBS
14652fi
14653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
14654$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
14655if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
14656  LIBPMULTITHREAD=-lpthread
14657           # On Solaris and HP-UX, most pthread functions exist also in libc.
14658           # Therefore pthread_in_use() needs to actually try to create a
14659           # thread: pthread_create from libc will fail, whereas
14660           # pthread_create will actually create a thread.
14661           # On Solaris 10 or newer, this test is no longer needed, because
14662           # libc contains the fully functional pthread functions.
14663           case "$host_os" in
14664             solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
14665
14666$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
14667
14668           esac
14669
14670fi
14671
14672      elif test $gl_pthread_api != yes; then
14673        # Some library is needed. Try libpthread and libc_r.
14674        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14675$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
14676if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
14677  $as_echo_n "(cached) " >&6
14678else
14679  ac_check_lib_save_LIBS=$LIBS
14680LIBS="-lpthread  $LIBS"
14681cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14682/* end confdefs.h.  */
14683
14684/* Override any GCC internal prototype to avoid an error.
14685   Use char because int might match the return type of a GCC
14686   builtin and then its argument prototype would still apply.  */
14687#ifdef __cplusplus
14688extern "C"
14689#endif
14690char pthread_kill ();
14691int
14692main ()
14693{
14694return pthread_kill ();
14695  ;
14696  return 0;
14697}
14698_ACEOF
14699if ac_fn_c_try_link "$LINENO"; then :
14700  ac_cv_lib_pthread_pthread_kill=yes
14701else
14702  ac_cv_lib_pthread_pthread_kill=no
14703fi
14704rm -f core conftest.err conftest.$ac_objext \
14705    conftest$ac_exeext conftest.$ac_ext
14706LIBS=$ac_check_lib_save_LIBS
14707fi
14708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
14709$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
14710if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
14711  gl_pthread_api=yes
14712           LIBPTHREAD=-lpthread
14713           LIBPMULTITHREAD=-lpthread
14714fi
14715
14716        if test $gl_pthread_api != yes; then
14717          # For FreeBSD 4.
14718          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
14719$as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
14720if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
14721  $as_echo_n "(cached) " >&6
14722else
14723  ac_check_lib_save_LIBS=$LIBS
14724LIBS="-lc_r  $LIBS"
14725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14726/* end confdefs.h.  */
14727
14728/* Override any GCC internal prototype to avoid an error.
14729   Use char because int might match the return type of a GCC
14730   builtin and then its argument prototype would still apply.  */
14731#ifdef __cplusplus
14732extern "C"
14733#endif
14734char pthread_kill ();
14735int
14736main ()
14737{
14738return pthread_kill ();
14739  ;
14740  return 0;
14741}
14742_ACEOF
14743if ac_fn_c_try_link "$LINENO"; then :
14744  ac_cv_lib_c_r_pthread_kill=yes
14745else
14746  ac_cv_lib_c_r_pthread_kill=no
14747fi
14748rm -f core conftest.err conftest.$ac_objext \
14749    conftest$ac_exeext conftest.$ac_ext
14750LIBS=$ac_check_lib_save_LIBS
14751fi
14752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
14753$as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
14754if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
14755  gl_pthread_api=yes
14756             LIBPTHREAD=-lc_r
14757             LIBPMULTITHREAD=-lc_r
14758fi
14759
14760        fi
14761      fi
14762    fi
14763    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
14764$as_echo_n "checking whether POSIX threads API is available... " >&6; }
14765    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
14766$as_echo "$gl_pthread_api" >&6; }
14767
14768
14769    if test $gl_pthread_api = yes; then
14770
14771$as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
14772
14773    fi
14774
14775        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14776/* end confdefs.h.  */
14777#include <sched.h>
14778int
14779main ()
14780{
14781sched_yield ();
14782  ;
14783  return 0;
14784}
14785_ACEOF
14786if ac_fn_c_try_link "$LINENO"; then :
14787  LIB_SCHED_YIELD=
14788
14789else
14790         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
14791$as_echo_n "checking for sched_yield in -lrt... " >&6; }
14792if ${ac_cv_lib_rt_sched_yield+:} false; then :
14793  $as_echo_n "(cached) " >&6
14794else
14795  ac_check_lib_save_LIBS=$LIBS
14796LIBS="-lrt  $LIBS"
14797cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14798/* end confdefs.h.  */
14799
14800/* Override any GCC internal prototype to avoid an error.
14801   Use char because int might match the return type of a GCC
14802   builtin and then its argument prototype would still apply.  */
14803#ifdef __cplusplus
14804extern "C"
14805#endif
14806char sched_yield ();
14807int
14808main ()
14809{
14810return sched_yield ();
14811  ;
14812  return 0;
14813}
14814_ACEOF
14815if ac_fn_c_try_link "$LINENO"; then :
14816  ac_cv_lib_rt_sched_yield=yes
14817else
14818  ac_cv_lib_rt_sched_yield=no
14819fi
14820rm -f core conftest.err conftest.$ac_objext \
14821    conftest$ac_exeext conftest.$ac_ext
14822LIBS=$ac_check_lib_save_LIBS
14823fi
14824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
14825$as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
14826if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
14827  LIB_SCHED_YIELD=-lrt
14828else
14829            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
14830$as_echo_n "checking for sched_yield in -lposix4... " >&6; }
14831if ${ac_cv_lib_posix4_sched_yield+:} false; then :
14832  $as_echo_n "(cached) " >&6
14833else
14834  ac_check_lib_save_LIBS=$LIBS
14835LIBS="-lposix4  $LIBS"
14836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14837/* end confdefs.h.  */
14838
14839/* Override any GCC internal prototype to avoid an error.
14840   Use char because int might match the return type of a GCC
14841   builtin and then its argument prototype would still apply.  */
14842#ifdef __cplusplus
14843extern "C"
14844#endif
14845char sched_yield ();
14846int
14847main ()
14848{
14849return sched_yield ();
14850  ;
14851  return 0;
14852}
14853_ACEOF
14854if ac_fn_c_try_link "$LINENO"; then :
14855  ac_cv_lib_posix4_sched_yield=yes
14856else
14857  ac_cv_lib_posix4_sched_yield=no
14858fi
14859rm -f core conftest.err conftest.$ac_objext \
14860    conftest$ac_exeext conftest.$ac_ext
14861LIBS=$ac_check_lib_save_LIBS
14862fi
14863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
14864$as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
14865if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
14866  LIB_SCHED_YIELD=-lposix4
14867fi
14868
14869fi
14870
14871
14872fi
14873rm -f core conftest.err conftest.$ac_objext \
14874    conftest$ac_exeext conftest.$ac_ext
14875
14876
14877    gl_pthreadlib_body_done=done
14878  fi
14879
14880      LIBTHREAD=$LIBPTHREAD LTLIBTHREAD=$LIBPTHREAD
14881      LIBMULTITHREAD=$LIBPMULTITHREAD LTLIBMULTITHREAD=$LIBPMULTITHREAD
14882      if test $gl_pthread_api = yes; then
14883        if test "$gl_use_threads" = isoc+posix && test "$gl_have_isoc_threads" = yes; then
14884          gl_threads_api='isoc+posix'
14885
14886$as_echo "#define USE_ISOC_AND_POSIX_THREADS 1" >>confdefs.h
14887
14888          LIBTHREAD= LTLIBTHREAD=
14889        else
14890          gl_threads_api=posix
14891
14892$as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
14893
14894          if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
14895            if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
14896
14897$as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
14898
14899              LIBTHREAD= LTLIBTHREAD=
14900            else
14901              case "$host_os" in
14902                freebsd* | dragonfly*)
14903                  if test "x$LIBTHREAD" != "x$LIBMULTITHREAD"; then
14904
14905$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
14906
14907                  fi
14908                  ;;
14909              esac
14910            fi
14911          fi
14912        fi
14913      fi
14914    fi
14915    if test $gl_threads_api = none; then
14916      if test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes; then
14917
14918
14919
14920  if test -z "$gl_stdthreadlib_body_done"; then
14921
14922
14923    case "$host_os" in
14924      mingw*)
14925        LIBSTDTHREAD=
14926        ;;
14927      *)
14928
14929
14930  if test -z "$gl_pthreadlib_body_done"; then
14931    gl_pthread_api=no
14932    LIBPTHREAD=
14933    LIBPMULTITHREAD=
14934    # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
14935    # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
14936    ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
14937if test "x$ac_cv_header_pthread_h" = xyes; then :
14938  gl_have_pthread_h=yes
14939else
14940  gl_have_pthread_h=no
14941fi
14942
14943
14944    if test "$gl_have_pthread_h" = yes; then
14945      # Other possible tests:
14946      #   -lpthreads (FSU threads, PCthreads)
14947      #   -lgthreads
14948      # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
14949      # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
14950      # the second one only in libpthread, and lock.c needs it.
14951      #
14952      # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
14953      # needs -pthread for some reason.  See:
14954      # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
14955      save_LIBS=$LIBS
14956      for gl_pthread in '' '-pthread'; do
14957        LIBS="$LIBS $gl_pthread"
14958        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14959/* end confdefs.h.  */
14960#include <pthread.h>
14961               pthread_mutex_t m;
14962               pthread_mutexattr_t ma;
14963
14964int
14965main ()
14966{
14967pthread_mutex_lock (&m);
14968               pthread_mutexattr_init (&ma);
14969  ;
14970  return 0;
14971}
14972_ACEOF
14973if ac_fn_c_try_link "$LINENO"; then :
14974  gl_pthread_api=yes
14975           LIBPTHREAD=$gl_pthread
14976           LIBPMULTITHREAD=$gl_pthread
14977fi
14978rm -f core conftest.err conftest.$ac_objext \
14979    conftest$ac_exeext conftest.$ac_ext
14980        LIBS=$save_LIBS
14981        test $gl_pthread_api = yes && break
14982      done
14983
14984      # Test for libpthread by looking for pthread_kill. (Not pthread_self,
14985      # since it is defined as a macro on OSF/1.)
14986      if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
14987        # The program links fine without libpthread. But it may actually
14988        # need to link with libpthread in order to create multiple threads.
14989        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14990$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
14991if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
14992  $as_echo_n "(cached) " >&6
14993else
14994  ac_check_lib_save_LIBS=$LIBS
14995LIBS="-lpthread  $LIBS"
14996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14997/* end confdefs.h.  */
14998
14999/* Override any GCC internal prototype to avoid an error.
15000   Use char because int might match the return type of a GCC
15001   builtin and then its argument prototype would still apply.  */
15002#ifdef __cplusplus
15003extern "C"
15004#endif
15005char pthread_kill ();
15006int
15007main ()
15008{
15009return pthread_kill ();
15010  ;
15011  return 0;
15012}
15013_ACEOF
15014if ac_fn_c_try_link "$LINENO"; then :
15015  ac_cv_lib_pthread_pthread_kill=yes
15016else
15017  ac_cv_lib_pthread_pthread_kill=no
15018fi
15019rm -f core conftest.err conftest.$ac_objext \
15020    conftest$ac_exeext conftest.$ac_ext
15021LIBS=$ac_check_lib_save_LIBS
15022fi
15023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
15024$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
15025if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
15026  LIBPMULTITHREAD=-lpthread
15027           # On Solaris and HP-UX, most pthread functions exist also in libc.
15028           # Therefore pthread_in_use() needs to actually try to create a
15029           # thread: pthread_create from libc will fail, whereas
15030           # pthread_create will actually create a thread.
15031           # On Solaris 10 or newer, this test is no longer needed, because
15032           # libc contains the fully functional pthread functions.
15033           case "$host_os" in
15034             solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
15035
15036$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
15037
15038           esac
15039
15040fi
15041
15042      elif test $gl_pthread_api != yes; then
15043        # Some library is needed. Try libpthread and libc_r.
15044        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
15045$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
15046if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
15047  $as_echo_n "(cached) " >&6
15048else
15049  ac_check_lib_save_LIBS=$LIBS
15050LIBS="-lpthread  $LIBS"
15051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15052/* end confdefs.h.  */
15053
15054/* Override any GCC internal prototype to avoid an error.
15055   Use char because int might match the return type of a GCC
15056   builtin and then its argument prototype would still apply.  */
15057#ifdef __cplusplus
15058extern "C"
15059#endif
15060char pthread_kill ();
15061int
15062main ()
15063{
15064return pthread_kill ();
15065  ;
15066  return 0;
15067}
15068_ACEOF
15069if ac_fn_c_try_link "$LINENO"; then :
15070  ac_cv_lib_pthread_pthread_kill=yes
15071else
15072  ac_cv_lib_pthread_pthread_kill=no
15073fi
15074rm -f core conftest.err conftest.$ac_objext \
15075    conftest$ac_exeext conftest.$ac_ext
15076LIBS=$ac_check_lib_save_LIBS
15077fi
15078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
15079$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
15080if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
15081  gl_pthread_api=yes
15082           LIBPTHREAD=-lpthread
15083           LIBPMULTITHREAD=-lpthread
15084fi
15085
15086        if test $gl_pthread_api != yes; then
15087          # For FreeBSD 4.
15088          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
15089$as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
15090if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
15091  $as_echo_n "(cached) " >&6
15092else
15093  ac_check_lib_save_LIBS=$LIBS
15094LIBS="-lc_r  $LIBS"
15095cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15096/* end confdefs.h.  */
15097
15098/* Override any GCC internal prototype to avoid an error.
15099   Use char because int might match the return type of a GCC
15100   builtin and then its argument prototype would still apply.  */
15101#ifdef __cplusplus
15102extern "C"
15103#endif
15104char pthread_kill ();
15105int
15106main ()
15107{
15108return pthread_kill ();
15109  ;
15110  return 0;
15111}
15112_ACEOF
15113if ac_fn_c_try_link "$LINENO"; then :
15114  ac_cv_lib_c_r_pthread_kill=yes
15115else
15116  ac_cv_lib_c_r_pthread_kill=no
15117fi
15118rm -f core conftest.err conftest.$ac_objext \
15119    conftest$ac_exeext conftest.$ac_ext
15120LIBS=$ac_check_lib_save_LIBS
15121fi
15122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
15123$as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
15124if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
15125  gl_pthread_api=yes
15126             LIBPTHREAD=-lc_r
15127             LIBPMULTITHREAD=-lc_r
15128fi
15129
15130        fi
15131      fi
15132    fi
15133    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
15134$as_echo_n "checking whether POSIX threads API is available... " >&6; }
15135    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
15136$as_echo "$gl_pthread_api" >&6; }
15137
15138
15139    if test $gl_pthread_api = yes; then
15140
15141$as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
15142
15143    fi
15144
15145        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15146/* end confdefs.h.  */
15147#include <sched.h>
15148int
15149main ()
15150{
15151sched_yield ();
15152  ;
15153  return 0;
15154}
15155_ACEOF
15156if ac_fn_c_try_link "$LINENO"; then :
15157  LIB_SCHED_YIELD=
15158
15159else
15160         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
15161$as_echo_n "checking for sched_yield in -lrt... " >&6; }
15162if ${ac_cv_lib_rt_sched_yield+:} false; then :
15163  $as_echo_n "(cached) " >&6
15164else
15165  ac_check_lib_save_LIBS=$LIBS
15166LIBS="-lrt  $LIBS"
15167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15168/* end confdefs.h.  */
15169
15170/* Override any GCC internal prototype to avoid an error.
15171   Use char because int might match the return type of a GCC
15172   builtin and then its argument prototype would still apply.  */
15173#ifdef __cplusplus
15174extern "C"
15175#endif
15176char sched_yield ();
15177int
15178main ()
15179{
15180return sched_yield ();
15181  ;
15182  return 0;
15183}
15184_ACEOF
15185if ac_fn_c_try_link "$LINENO"; then :
15186  ac_cv_lib_rt_sched_yield=yes
15187else
15188  ac_cv_lib_rt_sched_yield=no
15189fi
15190rm -f core conftest.err conftest.$ac_objext \
15191    conftest$ac_exeext conftest.$ac_ext
15192LIBS=$ac_check_lib_save_LIBS
15193fi
15194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
15195$as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
15196if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
15197  LIB_SCHED_YIELD=-lrt
15198else
15199            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
15200$as_echo_n "checking for sched_yield in -lposix4... " >&6; }
15201if ${ac_cv_lib_posix4_sched_yield+:} false; then :
15202  $as_echo_n "(cached) " >&6
15203else
15204  ac_check_lib_save_LIBS=$LIBS
15205LIBS="-lposix4  $LIBS"
15206cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15207/* end confdefs.h.  */
15208
15209/* Override any GCC internal prototype to avoid an error.
15210   Use char because int might match the return type of a GCC
15211   builtin and then its argument prototype would still apply.  */
15212#ifdef __cplusplus
15213extern "C"
15214#endif
15215char sched_yield ();
15216int
15217main ()
15218{
15219return sched_yield ();
15220  ;
15221  return 0;
15222}
15223_ACEOF
15224if ac_fn_c_try_link "$LINENO"; then :
15225  ac_cv_lib_posix4_sched_yield=yes
15226else
15227  ac_cv_lib_posix4_sched_yield=no
15228fi
15229rm -f core conftest.err conftest.$ac_objext \
15230    conftest$ac_exeext conftest.$ac_ext
15231LIBS=$ac_check_lib_save_LIBS
15232fi
15233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
15234$as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
15235if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
15236  LIB_SCHED_YIELD=-lposix4
15237fi
15238
15239fi
15240
15241
15242fi
15243rm -f core conftest.err conftest.$ac_objext \
15244    conftest$ac_exeext conftest.$ac_ext
15245
15246
15247    gl_pthreadlib_body_done=done
15248  fi
15249
15250        if test $ac_cv_header_threads_h = yes; then
15251                                                  for ac_func in thrd_create
15252do :
15253  ac_fn_c_check_func "$LINENO" "thrd_create" "ac_cv_func_thrd_create"
15254if test "x$ac_cv_func_thrd_create" = xyes; then :
15255  cat >>confdefs.h <<_ACEOF
15256#define HAVE_THRD_CREATE 1
15257_ACEOF
15258
15259fi
15260done
15261
15262          if test $ac_cv_func_thrd_create = yes; then
15263            LIBSTDTHREAD=
15264          else
15265            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thrd_create in -lstdthreads" >&5
15266$as_echo_n "checking for thrd_create in -lstdthreads... " >&6; }
15267if ${ac_cv_lib_stdthreads_thrd_create+:} false; then :
15268  $as_echo_n "(cached) " >&6
15269else
15270  ac_check_lib_save_LIBS=$LIBS
15271LIBS="-lstdthreads  $LIBS"
15272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15273/* end confdefs.h.  */
15274
15275/* Override any GCC internal prototype to avoid an error.
15276   Use char because int might match the return type of a GCC
15277   builtin and then its argument prototype would still apply.  */
15278#ifdef __cplusplus
15279extern "C"
15280#endif
15281char thrd_create ();
15282int
15283main ()
15284{
15285return thrd_create ();
15286  ;
15287  return 0;
15288}
15289_ACEOF
15290if ac_fn_c_try_link "$LINENO"; then :
15291  ac_cv_lib_stdthreads_thrd_create=yes
15292else
15293  ac_cv_lib_stdthreads_thrd_create=no
15294fi
15295rm -f core conftest.err conftest.$ac_objext \
15296    conftest$ac_exeext conftest.$ac_ext
15297LIBS=$ac_check_lib_save_LIBS
15298fi
15299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdthreads_thrd_create" >&5
15300$as_echo "$ac_cv_lib_stdthreads_thrd_create" >&6; }
15301if test "x$ac_cv_lib_stdthreads_thrd_create" = xyes; then :
15302
15303              LIBSTDTHREAD='-lstdthreads -lpthread'
15304
15305else
15306
15307                            LIBSTDTHREAD="$LIBPMULTITHREAD"
15308
15309fi
15310
15311          fi
15312        else
15313                    LIBSTDTHREAD="$LIBPMULTITHREAD $LIB_SCHED_YIELD"
15314        fi
15315        ;;
15316    esac
15317
15318
15319    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ISO C threads API is available" >&5
15320$as_echo_n "checking whether ISO C threads API is available... " >&6; }
15321    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_threads_h" >&5
15322$as_echo "$ac_cv_header_threads_h" >&6; }
15323    gl_stdthreadlib_body_done=done
15324  fi
15325
15326        LIBTHREAD=$LIBSTDTHREAD LTLIBTHREAD=$LIBSTDTHREAD
15327        LIBMULTITHREAD=$LIBSTDTHREAD LTLIBMULTITHREAD=$LIBSTDTHREAD
15328        gl_threads_api=isoc
15329
15330$as_echo "#define USE_ISOC_THREADS 1" >>confdefs.h
15331
15332      fi
15333    fi
15334    if test $gl_threads_api = none; then
15335      case "$gl_use_threads" in
15336        yes | windows | win32) # The 'win32' is for backward compatibility.
15337          if { case "$host_os" in
15338                 mingw*) true;;
15339                 *) false;;
15340               esac
15341             }; then
15342            gl_threads_api=windows
15343
15344$as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h
15345
15346          fi
15347          ;;
15348      esac
15349    fi
15350  fi
15351  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
15352$as_echo_n "checking for multithread API to use... " >&6; }
15353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
15354$as_echo "$gl_threads_api" >&6; }
15355
15356
15357
15358
15359
15360
15361
15362
15363
15364
15365
15366
15367  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
15368$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
15369if ${gl_cv_func_malloc_posix+:} false; then :
15370  $as_echo_n "(cached) " >&6
15371else
15372
15373                        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15374/* end confdefs.h.  */
15375
15376int
15377main ()
15378{
15379#if defined _WIN32 && ! defined __CYGWIN__
15380             choke me
15381             #endif
15382
15383  ;
15384  return 0;
15385}
15386_ACEOF
15387if ac_fn_c_try_compile "$LINENO"; then :
15388  gl_cv_func_malloc_posix=yes
15389else
15390  gl_cv_func_malloc_posix=no
15391fi
15392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15393
15394fi
15395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
15396$as_echo "$gl_cv_func_malloc_posix" >&6; }
15397
15398
15399
15400    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
15401$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
15402if ${ac_cv_func_malloc_0_nonnull+:} false; then :
15403  $as_echo_n "(cached) " >&6
15404else
15405  if test "$cross_compiling" = yes; then :
15406  case "$host_os" in
15407          # Guess yes on platforms where we know the result.
15408          *-gnu* | gnu* | *-musl* | freebsd* | netbsd* | openbsd* \
15409          | hpux* | solaris* | cygwin* | mingw*)
15410            ac_cv_func_malloc_0_nonnull="guessing yes" ;;
15411          # If we don't know, obey --enable-cross-guesses.
15412          *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
15413        esac
15414
15415else
15416  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15417/* end confdefs.h.  */
15418#include <stdlib.h>
15419
15420int
15421main ()
15422{
15423char *p = malloc (0);
15424            int result = !p;
15425            free (p);
15426            return result;
15427  ;
15428  return 0;
15429}
15430
15431_ACEOF
15432if ac_fn_c_try_run "$LINENO"; then :
15433  ac_cv_func_malloc_0_nonnull=yes
15434else
15435  ac_cv_func_malloc_0_nonnull=no
15436fi
15437rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15438  conftest.$ac_objext conftest.beam conftest.$ac_ext
15439fi
15440
15441
15442fi
15443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
15444$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
15445  case "$ac_cv_func_malloc_0_nonnull" in
15446    *yes)
15447      gl_cv_func_malloc_0_nonnull=1
15448      ;;
15449    *)
15450      gl_cv_func_malloc_0_nonnull=0
15451      ;;
15452  esac
15453
15454
15455cat >>confdefs.h <<_ACEOF
15456#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
15457_ACEOF
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
15470$as_echo_n "checking for a traditional japanese locale... " >&6; }
15471if ${gt_cv_locale_ja+:} false; then :
15472  $as_echo_n "(cached) " >&6
15473else
15474
15475    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15476/* end confdefs.h.  */
15477
15478#include <locale.h>
15479#include <time.h>
15480#if HAVE_LANGINFO_CODESET
15481# include <langinfo.h>
15482#endif
15483#include <stdlib.h>
15484#include <string.h>
15485struct tm t;
15486char buf[16];
15487int main ()
15488{
15489  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
15490     imitates locale dependent behaviour by looking at the environment
15491     variables, and all locales use the UTF-8 encoding.  */
15492#if defined __BEOS__ || defined __HAIKU__
15493  return 1;
15494#else
15495  /* Check whether the given locale name is recognized by the system.  */
15496# if defined _WIN32 && !defined __CYGWIN__
15497  /* On native Windows, setlocale(category, "") looks at the system settings,
15498     not at the environment variables.  Also, when an encoding suffix such
15499     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15500     category of the locale to "C".  */
15501  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15502      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15503    return 1;
15504# else
15505  if (setlocale (LC_ALL, "") == NULL) return 1;
15506# endif
15507  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15508     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15509     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15510     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15511     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15512     some unit tests fail.
15513     On MirBSD 10, when an unsupported locale is specified, setlocale()
15514     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
15515# if HAVE_LANGINFO_CODESET
15516  {
15517    const char *cs = nl_langinfo (CODESET);
15518    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
15519        || strcmp (cs, "UTF-8") == 0)
15520      return 1;
15521  }
15522# endif
15523# ifdef __CYGWIN__
15524  /* On Cygwin, avoid locale names without encoding suffix, because the
15525     locale_charset() function relies on the encoding suffix.  Note that
15526     LC_ALL is set on the command line.  */
15527  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15528# endif
15529  /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
15530     on Cygwin 1.5.x.  */
15531  if (MB_CUR_MAX == 1)
15532    return 1;
15533  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
15534     This excludes the UTF-8 encoding (except on MirBSD).  */
15535  {
15536    const char *p;
15537    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15538    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
15539    for (p = buf; *p != '\0'; p++)
15540      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
15541        return 1;
15542  }
15543  return 0;
15544#endif
15545}
15546
15547_ACEOF
15548    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15549  (eval $ac_link) 2>&5
15550  ac_status=$?
15551  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15552  test $ac_status = 0; } && test -s conftest$ac_exeext; then
15553      case "$host_os" in
15554        # Handle native Windows specially, because there setlocale() interprets
15555        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15556        # "fr" or "fra" as "French" or "French_France.1252",
15557        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15558        # "ja" as "Japanese" or "Japanese_Japan.932",
15559        # and similar.
15560        mingw*)
15561          # Note that on native Windows, the Japanese locale is
15562          # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
15563          # cannot use it here.
15564          gt_cv_locale_ja=none
15565          ;;
15566        *)
15567          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15568          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15569          # configure script would override the LC_ALL setting. Likewise for
15570          # LC_CTYPE, which is also set at the beginning of the configure script.
15571          # Test for the AIX locale name.
15572          if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15573            gt_cv_locale_ja=ja_JP
15574          else
15575            # Test for the locale name with explicit encoding suffix.
15576            if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15577              gt_cv_locale_ja=ja_JP.EUC-JP
15578            else
15579              # Test for the HP-UX, OSF/1, NetBSD locale name.
15580              if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15581                gt_cv_locale_ja=ja_JP.eucJP
15582              else
15583                # Test for the IRIX, FreeBSD locale name.
15584                if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15585                  gt_cv_locale_ja=ja_JP.EUC
15586                else
15587                  # Test for the Solaris 7 locale name.
15588                  if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15589                    gt_cv_locale_ja=ja
15590                  else
15591                    # Special test for NetBSD 1.6.
15592                    if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
15593                      gt_cv_locale_ja=ja_JP.eucJP
15594                    else
15595                      # None found.
15596                      gt_cv_locale_ja=none
15597                    fi
15598                  fi
15599                fi
15600              fi
15601            fi
15602          fi
15603          ;;
15604      esac
15605    fi
15606    rm -fr conftest*
15607
15608fi
15609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
15610$as_echo "$gt_cv_locale_ja" >&6; }
15611  LOCALE_JA=$gt_cv_locale_ja
15612
15613
15614
15615
15616  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
15617$as_echo_n "checking for a french Unicode locale... " >&6; }
15618if ${gt_cv_locale_fr_utf8+:} false; then :
15619  $as_echo_n "(cached) " >&6
15620else
15621
15622    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15623/* end confdefs.h.  */
15624
15625#include <locale.h>
15626#include <time.h>
15627#if HAVE_LANGINFO_CODESET
15628# include <langinfo.h>
15629#endif
15630#include <stdlib.h>
15631#include <string.h>
15632struct tm t;
15633char buf[16];
15634int main () {
15635  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
15636     imitates locale dependent behaviour by looking at the environment
15637     variables, and all locales use the UTF-8 encoding.  */
15638#if !(defined __BEOS__ || defined __HAIKU__)
15639  /* Check whether the given locale name is recognized by the system.  */
15640# if defined _WIN32 && !defined __CYGWIN__
15641  /* On native Windows, setlocale(category, "") looks at the system settings,
15642     not at the environment variables.  Also, when an encoding suffix such
15643     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15644     category of the locale to "C".  */
15645  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15646      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15647    return 1;
15648# else
15649  if (setlocale (LC_ALL, "") == NULL) return 1;
15650# endif
15651  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15652     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15653     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15654     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15655     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15656     some unit tests fail.  */
15657# if HAVE_LANGINFO_CODESET
15658  {
15659    const char *cs = nl_langinfo (CODESET);
15660    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
15661      return 1;
15662  }
15663# endif
15664# ifdef __CYGWIN__
15665  /* On Cygwin, avoid locale names without encoding suffix, because the
15666     locale_charset() function relies on the encoding suffix.  Note that
15667     LC_ALL is set on the command line.  */
15668  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15669# endif
15670  /* Check whether in the abbreviation of the second month, the second
15671     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
15672     two bytes long, with UTF-8 encoding.  */
15673  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15674  if (strftime (buf, sizeof (buf), "%b", &t) < 4
15675      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
15676    return 1;
15677#endif
15678#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
15679  /* Check whether the decimal separator is a comma.
15680     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
15681     are nl_langinfo(RADIXCHAR) are both ".".  */
15682  if (localeconv () ->decimal_point[0] != ',') return 1;
15683#endif
15684  return 0;
15685}
15686
15687_ACEOF
15688    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15689  (eval $ac_link) 2>&5
15690  ac_status=$?
15691  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15692  test $ac_status = 0; } && test -s conftest$ac_exeext; then
15693      case "$host_os" in
15694        # Handle native Windows specially, because there setlocale() interprets
15695        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15696        # "fr" or "fra" as "French" or "French_France.1252",
15697        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15698        # "ja" as "Japanese" or "Japanese_Japan.932",
15699        # and similar.
15700        mingw*)
15701          # Test for the hypothetical native Windows locale name.
15702          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15703            gt_cv_locale_fr_utf8=French_France.65001
15704          else
15705            # None found.
15706            gt_cv_locale_fr_utf8=none
15707          fi
15708          ;;
15709        *)
15710          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15711          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15712          # configure script would override the LC_ALL setting. Likewise for
15713          # LC_CTYPE, which is also set at the beginning of the configure script.
15714          # Test for the usual locale name.
15715          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15716            gt_cv_locale_fr_utf8=fr_FR
15717          else
15718            # Test for the locale name with explicit encoding suffix.
15719            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15720              gt_cv_locale_fr_utf8=fr_FR.UTF-8
15721            else
15722              # Test for the Solaris 7 locale name.
15723              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15724                gt_cv_locale_fr_utf8=fr.UTF-8
15725              else
15726                # None found.
15727                gt_cv_locale_fr_utf8=none
15728              fi
15729            fi
15730          fi
15731          ;;
15732      esac
15733    fi
15734    rm -fr conftest*
15735
15736fi
15737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
15738$as_echo "$gt_cv_locale_fr_utf8" >&6; }
15739  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
15740
15741
15742
15743
15744
15745  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
15746$as_echo_n "checking for a transitional chinese locale... " >&6; }
15747if ${gt_cv_locale_zh_CN+:} false; then :
15748  $as_echo_n "(cached) " >&6
15749else
15750
15751    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15752/* end confdefs.h.  */
15753
15754#include <locale.h>
15755#include <stdlib.h>
15756#include <time.h>
15757#if HAVE_LANGINFO_CODESET
15758# include <langinfo.h>
15759#endif
15760#include <stdlib.h>
15761#include <string.h>
15762struct tm t;
15763char buf[16];
15764int main ()
15765{
15766  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
15767     imitates locale dependent behaviour by looking at the environment
15768     variables, and all locales use the UTF-8 encoding.  */
15769#if defined __BEOS__ || defined __HAIKU__
15770  return 1;
15771#else
15772  /* Check whether the given locale name is recognized by the system.  */
15773# if defined _WIN32 && !defined __CYGWIN__
15774  /* On native Windows, setlocale(category, "") looks at the system settings,
15775     not at the environment variables.  Also, when an encoding suffix such
15776     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15777     category of the locale to "C".  */
15778  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15779      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15780    return 1;
15781# else
15782  if (setlocale (LC_ALL, "") == NULL) return 1;
15783# endif
15784  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15785     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15786     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15787     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15788     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15789     some unit tests fail.
15790     On MirBSD 10, when an unsupported locale is specified, setlocale()
15791     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
15792# if HAVE_LANGINFO_CODESET
15793  {
15794    const char *cs = nl_langinfo (CODESET);
15795    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
15796        || strcmp (cs, "UTF-8") == 0)
15797      return 1;
15798  }
15799# endif
15800# ifdef __CYGWIN__
15801  /* On Cygwin, avoid locale names without encoding suffix, because the
15802     locale_charset() function relies on the encoding suffix.  Note that
15803     LC_ALL is set on the command line.  */
15804  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15805# endif
15806  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
15807     This excludes the UTF-8 encoding (except on MirBSD).  */
15808  {
15809    const char *p;
15810    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15811    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
15812    for (p = buf; *p != '\0'; p++)
15813      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
15814        return 1;
15815  }
15816  /* Check whether a typical GB18030 multibyte sequence is recognized as a
15817     single wide character.  This excludes the GB2312 and GBK encodings.  */
15818  if (mblen ("\203\062\332\066", 5) != 4)
15819    return 1;
15820  return 0;
15821#endif
15822}
15823
15824_ACEOF
15825    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15826  (eval $ac_link) 2>&5
15827  ac_status=$?
15828  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15829  test $ac_status = 0; } && test -s conftest$ac_exeext; then
15830      case "$host_os" in
15831        # Handle native Windows specially, because there setlocale() interprets
15832        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15833        # "fr" or "fra" as "French" or "French_France.1252",
15834        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15835        # "ja" as "Japanese" or "Japanese_Japan.932",
15836        # and similar.
15837        mingw*)
15838          # Test for the hypothetical native Windows locale name.
15839          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15840            gt_cv_locale_zh_CN=Chinese_China.54936
15841          else
15842            # None found.
15843            gt_cv_locale_zh_CN=none
15844          fi
15845          ;;
15846        solaris2.8)
15847          # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
15848          # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
15849          # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
15850          gt_cv_locale_zh_CN=none
15851          ;;
15852        *)
15853          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15854          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15855          # configure script would override the LC_ALL setting. Likewise for
15856          # LC_CTYPE, which is also set at the beginning of the configure script.
15857          # Test for the locale name without encoding suffix.
15858          if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15859            gt_cv_locale_zh_CN=zh_CN
15860          else
15861            # Test for the locale name with explicit encoding suffix.
15862            if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15863              gt_cv_locale_zh_CN=zh_CN.GB18030
15864            else
15865              # None found.
15866              gt_cv_locale_zh_CN=none
15867            fi
15868          fi
15869          ;;
15870      esac
15871    else
15872      # If there was a link error, due to mblen(), the system is so old that
15873      # it certainly doesn't have a chinese locale.
15874      gt_cv_locale_zh_CN=none
15875    fi
15876    rm -fr conftest*
15877
15878fi
15879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
15880$as_echo "$gt_cv_locale_zh_CN" >&6; }
15881  LOCALE_ZH_CN=$gt_cv_locale_zh_CN
15882
15883
15884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
15885$as_echo_n "checking for inline... " >&6; }
15886if ${ac_cv_c_inline+:} false; then :
15887  $as_echo_n "(cached) " >&6
15888else
15889  ac_cv_c_inline=no
15890for ac_kw in inline __inline__ __inline; do
15891  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15892/* end confdefs.h.  */
15893#ifndef __cplusplus
15894typedef int foo_t;
15895static $ac_kw foo_t static_foo () {return 0; }
15896$ac_kw foo_t foo () {return 0; }
15897#endif
15898
15899_ACEOF
15900if ac_fn_c_try_compile "$LINENO"; then :
15901  ac_cv_c_inline=$ac_kw
15902fi
15903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15904  test "$ac_cv_c_inline" != no && break
15905done
15906
15907fi
15908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
15909$as_echo "$ac_cv_c_inline" >&6; }
15910
15911case $ac_cv_c_inline in
15912  inline | yes) ;;
15913  *)
15914    case $ac_cv_c_inline in
15915      no) ac_val=;;
15916      *) ac_val=$ac_cv_c_inline;;
15917    esac
15918    cat >>confdefs.h <<_ACEOF
15919#ifndef __cplusplus
15920#define inline $ac_val
15921#endif
15922_ACEOF
15923    ;;
15924esac
15925
15926
15927
15928
15929
15930
15931  GNULIB_EXPLICIT_BZERO=0;
15932  GNULIB_FFSL=0;
15933  GNULIB_FFSLL=0;
15934  GNULIB_MEMCHR=0;
15935  GNULIB_MEMMEM=0;
15936  GNULIB_MEMPCPY=0;
15937  GNULIB_MEMRCHR=0;
15938  GNULIB_RAWMEMCHR=0;
15939  GNULIB_STPCPY=0;
15940  GNULIB_STPNCPY=0;
15941  GNULIB_STRCHRNUL=0;
15942  GNULIB_STRDUP=0;
15943  GNULIB_STRNCAT=0;
15944  GNULIB_STRNDUP=0;
15945  GNULIB_STRNLEN=0;
15946  GNULIB_STRPBRK=0;
15947  GNULIB_STRSEP=0;
15948  GNULIB_STRSTR=0;
15949  GNULIB_STRCASESTR=0;
15950  GNULIB_STRTOK_R=0;
15951  GNULIB_MBSLEN=0;
15952  GNULIB_MBSNLEN=0;
15953  GNULIB_MBSCHR=0;
15954  GNULIB_MBSRCHR=0;
15955  GNULIB_MBSSTR=0;
15956  GNULIB_MBSCASECMP=0;
15957  GNULIB_MBSNCASECMP=0;
15958  GNULIB_MBSPCASECMP=0;
15959  GNULIB_MBSCASESTR=0;
15960  GNULIB_MBSCSPN=0;
15961  GNULIB_MBSPBRK=0;
15962  GNULIB_MBSSPN=0;
15963  GNULIB_MBSSEP=0;
15964  GNULIB_MBSTOK_R=0;
15965  GNULIB_STRERROR=0;
15966  GNULIB_STRERROR_R=0;
15967  GNULIB_STRERRORNAME_NP=0;
15968  GNULIB_SIGABBREV_NP=0;
15969  GNULIB_SIGDESCR_NP=0;
15970  GNULIB_STRSIGNAL=0;
15971  GNULIB_STRVERSCMP=0;
15972  HAVE_MBSLEN=0;
15973    GNULIB_MDA_MEMCCPY=1;
15974  GNULIB_MDA_STRDUP=1;
15975    HAVE_EXPLICIT_BZERO=1;
15976  HAVE_FFSL=1;
15977  HAVE_FFSLL=1;
15978  HAVE_DECL_MEMMEM=1;
15979  HAVE_MEMPCPY=1;
15980  HAVE_DECL_MEMRCHR=1;
15981  HAVE_RAWMEMCHR=1;
15982  HAVE_STPCPY=1;
15983  HAVE_STPNCPY=1;
15984  HAVE_STRCHRNUL=1;
15985  HAVE_DECL_STRDUP=1;
15986  HAVE_DECL_STRNDUP=1;
15987  HAVE_DECL_STRNLEN=1;
15988  HAVE_STRPBRK=1;
15989  HAVE_STRSEP=1;
15990  HAVE_STRCASESTR=1;
15991  HAVE_DECL_STRTOK_R=1;
15992  HAVE_DECL_STRERROR_R=1;
15993  HAVE_STRERRORNAME_NP=1;
15994  HAVE_SIGABBREV_NP=1;
15995  HAVE_SIGDESCR_NP=1;
15996  HAVE_DECL_STRSIGNAL=1;
15997  HAVE_STRVERSCMP=1;
15998  REPLACE_FFSLL=0;
15999  REPLACE_MEMCHR=0;
16000  REPLACE_MEMMEM=0;
16001  REPLACE_STPNCPY=0;
16002  REPLACE_STRCHRNUL=0;
16003  REPLACE_STRDUP=0;
16004  REPLACE_STRNCAT=0;
16005  REPLACE_STRNDUP=0;
16006  REPLACE_STRNLEN=0;
16007  REPLACE_STRSTR=0;
16008  REPLACE_STRCASESTR=0;
16009  REPLACE_STRTOK_R=0;
16010  REPLACE_STRERROR=0;
16011  REPLACE_STRERROR_R=0;
16012  REPLACE_STRERRORNAME_NP=0;
16013  REPLACE_STRSIGNAL=0;
16014  UNDEFINE_STRTOK_R=0;
16015
16016
16017
16018
16019
16020
16021  # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
16022  # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
16023  # irrelevant for anonymous mappings.
16024  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
16025if test "x$ac_cv_func_mmap" = xyes; then :
16026  gl_have_mmap=yes
16027else
16028  gl_have_mmap=no
16029fi
16030
16031
16032  # Try to allow MAP_ANONYMOUS.
16033  gl_have_mmap_anonymous=no
16034  if test $gl_have_mmap = yes; then
16035    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
16036$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
16037    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16038/* end confdefs.h.  */
16039
16040#include <sys/mman.h>
16041#ifdef MAP_ANONYMOUS
16042    I cannot identify this map
16043#endif
16044
16045_ACEOF
16046if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16047  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
16048  gl_have_mmap_anonymous=yes
16049fi
16050rm -f conftest*
16051
16052    if test $gl_have_mmap_anonymous != yes; then
16053      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16054/* end confdefs.h.  */
16055
16056#include <sys/mman.h>
16057#ifdef MAP_ANON
16058    I cannot identify this map
16059#endif
16060
16061_ACEOF
16062if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16063  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
16064
16065$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
16066
16067         gl_have_mmap_anonymous=yes
16068fi
16069rm -f conftest*
16070
16071    fi
16072    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
16073$as_echo "$gl_have_mmap_anonymous" >&6; }
16074    if test $gl_have_mmap_anonymous = yes; then
16075
16076$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
16077
16078    fi
16079  fi
16080
16081
16082
16083
16084
16085  # Detect platform-specific bugs in some versions of glibc:
16086  # memchr should not dereference anything with length 0
16087  #   https://bugzilla.redhat.com/show_bug.cgi?id=499689
16088  # memchr should not dereference overestimated length after a match
16089  #   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
16090  #   https://sourceware.org/bugzilla/show_bug.cgi?id=10162
16091  # memchr should cast the second argument to 'unsigned char'.
16092  #   This bug exists in Android 4.3.
16093  # Assume that memchr works on platforms that lack mprotect.
16094  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
16095$as_echo_n "checking whether memchr works... " >&6; }
16096if ${gl_cv_func_memchr_works+:} false; then :
16097  $as_echo_n "(cached) " >&6
16098else
16099  if test "$cross_compiling" = yes; then :
16100  case "$host_os" in
16101                           # Guess no on Android.
16102          linux*-android*) gl_cv_func_memchr_works="guessing no" ;;
16103                           # Guess yes on native Windows.
16104          mingw*)          gl_cv_func_memchr_works="guessing yes" ;;
16105                           # If we don't know, obey --enable-cross-guesses.
16106          *)               gl_cv_func_memchr_works="$gl_cross_guess_normal" ;;
16107        esac
16108
16109else
16110  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16111/* end confdefs.h.  */
16112
16113#include <string.h>
16114#if HAVE_SYS_MMAN_H
16115# include <fcntl.h>
16116# include <unistd.h>
16117# include <sys/types.h>
16118# include <sys/mman.h>
16119# ifndef MAP_FILE
16120#  define MAP_FILE 0
16121# endif
16122#endif
16123
16124int
16125main ()
16126{
16127
16128  int result = 0;
16129  char *fence = NULL;
16130#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
16131# if HAVE_MAP_ANONYMOUS
16132  const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
16133  const int fd = -1;
16134# else /* !HAVE_MAP_ANONYMOUS */
16135  const int flags = MAP_FILE | MAP_PRIVATE;
16136  int fd = open ("/dev/zero", O_RDONLY, 0666);
16137  if (fd >= 0)
16138# endif
16139    {
16140      int pagesize = getpagesize ();
16141      char *two_pages =
16142        (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
16143                       flags, fd, 0);
16144      if (two_pages != (char *)(-1)
16145          && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
16146        fence = two_pages + pagesize;
16147    }
16148#endif
16149  if (fence)
16150    {
16151      /* Test against bugs on glibc systems.  */
16152      if (memchr (fence, 0, 0))
16153        result |= 1;
16154      strcpy (fence - 9, "12345678");
16155      if (memchr (fence - 9, 0, 79) != fence - 1)
16156        result |= 2;
16157      if (memchr (fence - 1, 0, 3) != fence - 1)
16158        result |= 4;
16159      /* Test against bug on AIX 7.2.  */
16160      if (memchr (fence - 4, '6', 16) != fence - 4)
16161        result |= 8;
16162    }
16163  /* Test against bug on Android 4.3.  */
16164  {
16165    char input[3];
16166    input[0] = 'a';
16167    input[1] = 'b';
16168    input[2] = 'c';
16169    if (memchr (input, 0x789abc00 | 'b', 3) != input + 1)
16170      result |= 16;
16171  }
16172  return result;
16173
16174  ;
16175  return 0;
16176}
16177_ACEOF
16178if ac_fn_c_try_run "$LINENO"; then :
16179  gl_cv_func_memchr_works=yes
16180else
16181  gl_cv_func_memchr_works=no
16182fi
16183rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16184  conftest.$ac_objext conftest.beam conftest.$ac_ext
16185fi
16186
16187
16188fi
16189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
16190$as_echo "$gl_cv_func_memchr_works" >&6; }
16191  case "$gl_cv_func_memchr_works" in
16192    *yes) ;;
16193    *) REPLACE_MEMCHR=1 ;;
16194  esac
16195
16196ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
16197if test "x$ac_cv_have_decl_memmem" = xyes; then :
16198  ac_have_decl=1
16199else
16200  ac_have_decl=0
16201fi
16202
16203cat >>confdefs.h <<_ACEOF
16204#define HAVE_DECL_MEMMEM $ac_have_decl
16205_ACEOF
16206
16207
16208
16209
16210
16211  for ac_func in memmem
16212do :
16213  ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
16214if test "x$ac_cv_func_memmem" = xyes; then :
16215  cat >>confdefs.h <<_ACEOF
16216#define HAVE_MEMMEM 1
16217_ACEOF
16218
16219fi
16220done
16221
16222  if test $ac_cv_func_memmem = yes; then
16223    HAVE_MEMMEM=1
16224  else
16225    HAVE_MEMMEM=0
16226  fi
16227
16228  if test $ac_cv_have_decl_memmem = no; then
16229    HAVE_DECL_MEMMEM=0
16230  else
16231            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
16232$as_echo_n "checking whether memmem works... " >&6; }
16233if ${gl_cv_func_memmem_works_always+:} false; then :
16234  $as_echo_n "(cached) " >&6
16235else
16236  if test "$cross_compiling" = yes; then :
16237                                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16238/* end confdefs.h.  */
16239
16240#ifdef __GNU_LIBRARY__
16241 #include <features.h>
16242 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
16243                          || __GLIBC_MINOR__ > 12)) \
16244      || (__GLIBC__ > 2)) \
16245     || defined __UCLIBC__
16246  Lucky user
16247 #endif
16248#elif defined __CYGWIN__
16249 #include <cygwin/version.h>
16250 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
16251  Lucky user
16252 #endif
16253#else
16254  Lucky user
16255#endif
16256
16257_ACEOF
16258if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16259  $EGREP "Lucky user" >/dev/null 2>&1; then :
16260  gl_cv_func_memmem_works_always="guessing yes"
16261else
16262  gl_cv_func_memmem_works_always="$gl_cross_guess_normal"
16263fi
16264rm -f conftest*
16265
16266
16267else
16268  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16269/* end confdefs.h.  */
16270
16271#include <string.h> /* for memmem */
16272#define P "_EF_BF_BD"
16273#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
16274#define NEEDLE P P P P P
16275
16276int
16277main ()
16278{
16279
16280    int result = 0;
16281    if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
16282      result |= 1;
16283    /* Check for empty needle behavior.  */
16284    {
16285      const char *haystack = "AAA";
16286      if (memmem (haystack, 3, (const char *) 1, 0) != haystack)
16287        result |= 2;
16288    }
16289    return result;
16290
16291  ;
16292  return 0;
16293}
16294_ACEOF
16295if ac_fn_c_try_run "$LINENO"; then :
16296  gl_cv_func_memmem_works_always=yes
16297else
16298  gl_cv_func_memmem_works_always=no
16299fi
16300rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16301  conftest.$ac_objext conftest.beam conftest.$ac_ext
16302fi
16303
16304
16305fi
16306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
16307$as_echo "$gl_cv_func_memmem_works_always" >&6; }
16308    case "$gl_cv_func_memmem_works_always" in
16309      *yes) ;;
16310      *)
16311        REPLACE_MEMMEM=1
16312        ;;
16313    esac
16314  fi
16315  :
16316
16317ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
16318if test "x$ac_cv_have_decl_memrchr" = xyes; then :
16319  ac_have_decl=1
16320else
16321  ac_have_decl=0
16322fi
16323
16324cat >>confdefs.h <<_ACEOF
16325#define HAVE_DECL_MEMRCHR $ac_have_decl
16326_ACEOF
16327
16328
16329
16330
16331
16332  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5
16333$as_echo_n "checking whether <limits.h> defines MIN and MAX... " >&6; }
16334if ${gl_cv_minmax_in_limits_h+:} false; then :
16335  $as_echo_n "(cached) " >&6
16336else
16337  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16338/* end confdefs.h.  */
16339#include <limits.h>
16340            int x = MIN (42, 17);
16341int
16342main ()
16343{
16344
16345  ;
16346  return 0;
16347}
16348_ACEOF
16349if ac_fn_c_try_compile "$LINENO"; then :
16350  gl_cv_minmax_in_limits_h=yes
16351else
16352  gl_cv_minmax_in_limits_h=no
16353fi
16354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16355fi
16356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5
16357$as_echo "$gl_cv_minmax_in_limits_h" >&6; }
16358  if test $gl_cv_minmax_in_limits_h = yes; then
16359
16360$as_echo "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h
16361
16362  fi
16363
16364
16365
16366
16367
16368
16369  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5
16370$as_echo_n "checking whether <sys/param.h> defines MIN and MAX... " >&6; }
16371if ${gl_cv_minmax_in_sys_param_h+:} false; then :
16372  $as_echo_n "(cached) " >&6
16373else
16374  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16375/* end confdefs.h.  */
16376#include <sys/param.h>
16377            int x = MIN (42, 17);
16378int
16379main ()
16380{
16381
16382  ;
16383  return 0;
16384}
16385_ACEOF
16386if ac_fn_c_try_compile "$LINENO"; then :
16387  gl_cv_minmax_in_sys_param_h=yes
16388else
16389  gl_cv_minmax_in_sys_param_h=no
16390fi
16391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16392fi
16393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5
16394$as_echo "$gl_cv_minmax_in_sys_param_h" >&6; }
16395  if test $gl_cv_minmax_in_sys_param_h = yes; then
16396
16397$as_echo "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
16398
16399  fi
16400
16401
16402
16403
16404
16405
16406
16407
16408
16409
16410  GNULIB_GETADDRINFO=0;
16411    HAVE_STRUCT_ADDRINFO=1;
16412  HAVE_DECL_FREEADDRINFO=1;
16413  HAVE_DECL_GAI_STRERROR=1;
16414  HAVE_DECL_GETADDRINFO=1;
16415  HAVE_DECL_GETNAMEINFO=1;
16416  REPLACE_GAI_STRERROR=0;
16417  REPLACE_GETADDRINFO=0;
16418
16419
16420  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
16421$as_echo_n "checking for O_CLOEXEC... " >&6; }
16422if ${gl_cv_macro_O_CLOEXEC+:} false; then :
16423  $as_echo_n "(cached) " >&6
16424else
16425  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16426/* end confdefs.h.  */
16427#include <fcntl.h>
16428                          #ifndef O_CLOEXEC
16429                            choke me;
16430                          #endif
16431
16432int
16433main ()
16434{
16435return O_CLOEXEC;
16436  ;
16437  return 0;
16438}
16439_ACEOF
16440if ac_fn_c_try_compile "$LINENO"; then :
16441  gl_cv_macro_O_CLOEXEC=yes
16442else
16443  gl_cv_macro_O_CLOEXEC=no
16444fi
16445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16446fi
16447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
16448$as_echo "$gl_cv_macro_O_CLOEXEC" >&6; }
16449
16450
16451
16452  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
16453$as_echo_n "checking for promoted mode_t type... " >&6; }
16454if ${gl_cv_promoted_mode_t+:} false; then :
16455  $as_echo_n "(cached) " >&6
16456else
16457
16458                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16459/* end confdefs.h.  */
16460#include <sys/types.h>
16461int
16462main ()
16463{
16464typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
16465  ;
16466  return 0;
16467}
16468_ACEOF
16469if ac_fn_c_try_compile "$LINENO"; then :
16470  gl_cv_promoted_mode_t='int'
16471else
16472  gl_cv_promoted_mode_t='mode_t'
16473fi
16474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16475
16476fi
16477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
16478$as_echo "$gl_cv_promoted_mode_t" >&6; }
16479
16480cat >>confdefs.h <<_ACEOF
16481#define PROMOTED_MODE_T $gl_cv_promoted_mode_t
16482_ACEOF
16483
16484
16485
16486
16487
16488
16489
16490
16491
16492
16493
16494  GNULIB_PSELECT=0;
16495  GNULIB_SELECT=0;
16496    HAVE_PSELECT=1;
16497  REPLACE_PSELECT=0;
16498  REPLACE_SELECT=0;
16499
16500
16501
16502
16503
16504
16505  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
16506$as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
16507if ${gl_cv_header_sys_select_h_selfcontained+:} false; then :
16508  $as_echo_n "(cached) " >&6
16509else
16510
16511                                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16512/* end confdefs.h.  */
16513#include <sys/select.h>
16514int
16515main ()
16516{
16517struct timeval b;
16518  ;
16519  return 0;
16520}
16521_ACEOF
16522if ac_fn_c_try_compile "$LINENO"; then :
16523  gl_cv_header_sys_select_h_selfcontained=yes
16524else
16525  gl_cv_header_sys_select_h_selfcontained=no
16526fi
16527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16528                        if test $gl_cv_header_sys_select_h_selfcontained = yes; then
16529        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16530/* end confdefs.h.  */
16531#include <sys/select.h>
16532int
16533main ()
16534{
16535int memset; int bzero;
16536  ;
16537  return 0;
16538}
16539
16540_ACEOF
16541if ac_fn_c_try_compile "$LINENO"; then :
16542  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16543/* end confdefs.h.  */
16544#include <sys/select.h>
16545int
16546main ()
16547{
16548
16549                  #undef memset
16550                  #define memset nonexistent_memset
16551                  extern
16552                  #ifdef __cplusplus
16553                  "C"
16554                  #endif
16555                  void *memset (void *, int, unsigned long);
16556                  #undef bzero
16557                  #define bzero nonexistent_bzero
16558                  extern
16559                  #ifdef __cplusplus
16560                  "C"
16561                  #endif
16562                  void bzero (void *, unsigned long);
16563                  fd_set fds;
16564                  FD_ZERO (&fds);
16565
16566  ;
16567  return 0;
16568}
16569
16570_ACEOF
16571if ac_fn_c_try_link "$LINENO"; then :
16572
16573else
16574  gl_cv_header_sys_select_h_selfcontained=no
16575fi
16576rm -f core conftest.err conftest.$ac_objext \
16577    conftest$ac_exeext conftest.$ac_ext
16578
16579fi
16580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16581      fi
16582
16583fi
16584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
16585$as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
16586
16587
16588
16589
16590
16591
16592
16593
16594
16595     if test $gl_cv_have_include_next = yes; then
16596       gl_cv_next_sys_select_h='<'sys/select.h'>'
16597     else
16598       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
16599$as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
16600if ${gl_cv_next_sys_select_h+:} false; then :
16601  $as_echo_n "(cached) " >&6
16602else
16603
16604             if test $ac_cv_header_sys_select_h = yes; then
16605
16606
16607
16608
16609  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16610/* end confdefs.h.  */
16611#include <sys/select.h>
16612_ACEOF
16613                case "$host_os" in
16614    aix*) gl_absname_cpp="$ac_cpp -C" ;;
16615    *)    gl_absname_cpp="$ac_cpp" ;;
16616  esac
16617
16618  case "$host_os" in
16619    mingw*)
16620                                          gl_dirsep_regex='[/\\]'
16621      ;;
16622    *)
16623      gl_dirsep_regex='\/'
16624      ;;
16625  esac
16626      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16627  gl_header_literal_regex=`echo 'sys/select.h' \
16628                           | sed -e "$gl_make_literal_regex_sed"`
16629  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16630      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16631      s|^/[^/]|//&|
16632      p
16633      q
16634    }'
16635
16636        gl_cv_absolute_sys_select_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16637  sed -n "$gl_absolute_header_sed"`
16638
16639           gl_header=$gl_cv_absolute_sys_select_h
16640           gl_cv_next_sys_select_h='"'$gl_header'"'
16641          else
16642               gl_cv_next_sys_select_h='<'sys/select.h'>'
16643             fi
16644
16645
16646fi
16647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
16648$as_echo "$gl_cv_next_sys_select_h" >&6; }
16649     fi
16650     NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
16651
16652     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16653       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16654       gl_next_as_first_directive='<'sys/select.h'>'
16655     else
16656       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16657       gl_next_as_first_directive=$gl_cv_next_sys_select_h
16658     fi
16659     NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
16660
16661
16662
16663
16664  if test $ac_cv_header_sys_select_h = yes; then
16665    HAVE_SYS_SELECT_H=1
16666  else
16667    HAVE_SYS_SELECT_H=0
16668  fi
16669
16670
16671
16672
16673
16674  if test $ac_cv_header_sys_socket_h != yes; then
16675                    for ac_header in winsock2.h
16676do :
16677  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
16678if test "x$ac_cv_header_winsock2_h" = xyes; then :
16679  cat >>confdefs.h <<_ACEOF
16680#define HAVE_WINSOCK2_H 1
16681_ACEOF
16682
16683fi
16684
16685done
16686
16687  fi
16688  if test "$ac_cv_header_winsock2_h" = yes; then
16689    HAVE_WINSOCK2_H=1
16690    UNISTD_H_HAVE_WINSOCK2_H=1
16691    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
16692  else
16693    HAVE_WINSOCK2_H=0
16694  fi
16695
16696
16697
16698
16699
16700
16701
16702
16703
16704
16705
16706
16707  if test $ac_cv_header_sys_socket_h != yes; then
16708                    for ac_header in winsock2.h
16709do :
16710  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
16711if test "x$ac_cv_header_winsock2_h" = xyes; then :
16712  cat >>confdefs.h <<_ACEOF
16713#define HAVE_WINSOCK2_H 1
16714_ACEOF
16715
16716fi
16717
16718done
16719
16720  fi
16721  if test "$ac_cv_header_winsock2_h" = yes; then
16722    HAVE_WINSOCK2_H=1
16723    UNISTD_H_HAVE_WINSOCK2_H=1
16724    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
16725  else
16726    HAVE_WINSOCK2_H=0
16727  fi
16728
16729   LIBSOCKET=
16730  if test $HAVE_WINSOCK2_H = 1; then
16731                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WSAStartup" >&5
16732$as_echo_n "checking for WSAStartup... " >&6; }
16733if ${gl_cv_func_wsastartup+:} false; then :
16734  $as_echo_n "(cached) " >&6
16735else
16736
16737       gl_save_LIBS="$LIBS"
16738       LIBS="$LIBS -lws2_32"
16739       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16740/* end confdefs.h.  */
16741
16742#ifdef HAVE_WINSOCK2_H
16743# include <winsock2.h>
16744#endif
16745int
16746main ()
16747{
16748
16749            WORD wVersionRequested = MAKEWORD(1, 1);
16750            WSADATA wsaData;
16751            int err = WSAStartup(wVersionRequested, &wsaData);
16752            WSACleanup ();
16753
16754  ;
16755  return 0;
16756}
16757
16758_ACEOF
16759if ac_fn_c_try_link "$LINENO"; then :
16760  gl_cv_func_wsastartup=yes
16761else
16762  gl_cv_func_wsastartup=no
16763fi
16764rm -f core conftest.err conftest.$ac_objext \
16765    conftest$ac_exeext conftest.$ac_ext
16766       LIBS="$gl_save_LIBS"
16767
16768fi
16769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5
16770$as_echo "$gl_cv_func_wsastartup" >&6; }
16771    if test "$gl_cv_func_wsastartup" = "yes"; then
16772
16773$as_echo "#define WINDOWS_SOCKETS 1" >>confdefs.h
16774
16775      LIBSOCKET='-lws2_32'
16776    fi
16777  else
16778                                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
16779$as_echo_n "checking for library containing setsockopt... " >&6; }
16780if ${gl_cv_lib_socket+:} false; then :
16781  $as_echo_n "(cached) " >&6
16782else
16783
16784      gl_cv_lib_socket=
16785      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16786/* end confdefs.h.  */
16787extern
16788#ifdef __cplusplus
16789"C"
16790#endif
16791char setsockopt();
16792int
16793main ()
16794{
16795setsockopt();
16796  ;
16797  return 0;
16798}
16799_ACEOF
16800if ac_fn_c_try_link "$LINENO"; then :
16801
16802else
16803  gl_save_LIBS="$LIBS"
16804         LIBS="$gl_save_LIBS -lsocket"
16805         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16806/* end confdefs.h.  */
16807extern
16808#ifdef __cplusplus
16809"C"
16810#endif
16811char setsockopt();
16812int
16813main ()
16814{
16815setsockopt();
16816  ;
16817  return 0;
16818}
16819_ACEOF
16820if ac_fn_c_try_link "$LINENO"; then :
16821  gl_cv_lib_socket="-lsocket"
16822fi
16823rm -f core conftest.err conftest.$ac_objext \
16824    conftest$ac_exeext conftest.$ac_ext
16825         if test -z "$gl_cv_lib_socket"; then
16826           LIBS="$gl_save_LIBS -lnetwork"
16827           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16828/* end confdefs.h.  */
16829extern
16830#ifdef __cplusplus
16831"C"
16832#endif
16833char setsockopt();
16834int
16835main ()
16836{
16837setsockopt();
16838  ;
16839  return 0;
16840}
16841_ACEOF
16842if ac_fn_c_try_link "$LINENO"; then :
16843  gl_cv_lib_socket="-lnetwork"
16844fi
16845rm -f core conftest.err conftest.$ac_objext \
16846    conftest$ac_exeext conftest.$ac_ext
16847           if test -z "$gl_cv_lib_socket"; then
16848             LIBS="$gl_save_LIBS -lnet"
16849             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16850/* end confdefs.h.  */
16851extern
16852#ifdef __cplusplus
16853"C"
16854#endif
16855char setsockopt();
16856int
16857main ()
16858{
16859setsockopt();
16860  ;
16861  return 0;
16862}
16863_ACEOF
16864if ac_fn_c_try_link "$LINENO"; then :
16865  gl_cv_lib_socket="-lnet"
16866fi
16867rm -f core conftest.err conftest.$ac_objext \
16868    conftest$ac_exeext conftest.$ac_ext
16869           fi
16870         fi
16871         LIBS="$gl_save_LIBS"
16872
16873fi
16874rm -f core conftest.err conftest.$ac_objext \
16875    conftest$ac_exeext conftest.$ac_ext
16876      if test -z "$gl_cv_lib_socket"; then
16877        gl_cv_lib_socket="none needed"
16878      fi
16879
16880fi
16881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5
16882$as_echo "$gl_cv_lib_socket" >&6; }
16883    if test "$gl_cv_lib_socket" != "none needed"; then
16884      LIBSOCKET="$gl_cv_lib_socket"
16885    fi
16886  fi
16887
16888
16889
16890
16891
16892
16893  :
16894
16895
16896ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
16897if test "x$ac_cv_have_decl_setenv" = xyes; then :
16898  ac_have_decl=1
16899else
16900  ac_have_decl=0
16901fi
16902
16903cat >>confdefs.h <<_ACEOF
16904#define HAVE_DECL_SETENV $ac_have_decl
16905_ACEOF
16906
16907
16908
16909
16910
16911
16912  if test $ac_cv_have_decl_setenv = no; then
16913    HAVE_DECL_SETENV=0
16914  fi
16915
16916
16917
16918
16919
16920  for ac_header in search.h
16921do :
16922  ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
16923if test "x$ac_cv_header_search_h" = xyes; then :
16924  cat >>confdefs.h <<_ACEOF
16925#define HAVE_SEARCH_H 1
16926_ACEOF
16927
16928fi
16929
16930done
16931
16932  for ac_func in tsearch
16933do :
16934  ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
16935if test "x$ac_cv_func_tsearch" = xyes; then :
16936  cat >>confdefs.h <<_ACEOF
16937#define HAVE_TSEARCH 1
16938_ACEOF
16939
16940fi
16941done
16942
16943
16944
16945
16946  GNULIB_PTHREAD_SIGMASK=0;
16947  GNULIB_RAISE=0;
16948  GNULIB_SIGNAL_H_SIGPIPE=0;
16949  GNULIB_SIGPROCMASK=0;
16950  GNULIB_SIGACTION=0;
16951    HAVE_POSIX_SIGNALBLOCKING=1;
16952  HAVE_PTHREAD_SIGMASK=1;
16953  HAVE_RAISE=1;
16954  HAVE_SIGSET_T=1;
16955  HAVE_SIGINFO_T=1;
16956  HAVE_SIGACTION=1;
16957  HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
16958
16959  HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
16960
16961  HAVE_SIGHANDLER_T=1;
16962  REPLACE_PTHREAD_SIGMASK=0;
16963  REPLACE_RAISE=0;
16964
16965
16966  ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
16967      #include <signal.h>
16968      /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
16969      #include <sys/types.h>
16970
16971"
16972if test "x$ac_cv_type_sigset_t" = xyes; then :
16973
16974cat >>confdefs.h <<_ACEOF
16975#define HAVE_SIGSET_T 1
16976_ACEOF
16977
16978gl_cv_type_sigset_t=yes
16979else
16980  gl_cv_type_sigset_t=no
16981fi
16982
16983  if test $gl_cv_type_sigset_t != yes; then
16984    HAVE_SIGSET_T=0
16985  fi
16986
16987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
16988$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
16989if ${ac_cv_header_stdbool_h+:} false; then :
16990  $as_echo_n "(cached) " >&6
16991else
16992  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16993/* end confdefs.h.  */
16994
16995             #include <stdbool.h>
16996
16997             #ifdef __cplusplus
16998              typedef bool Bool;
16999             #else
17000              typedef _Bool Bool;
17001              #ifndef bool
17002               "error: bool is not defined"
17003              #endif
17004              #ifndef false
17005               "error: false is not defined"
17006              #endif
17007              #if false
17008               "error: false is not 0"
17009              #endif
17010              #ifndef true
17011               "error: true is not defined"
17012              #endif
17013              #if true != 1
17014               "error: true is not 1"
17015              #endif
17016             #endif
17017
17018             #ifndef __bool_true_false_are_defined
17019              "error: __bool_true_false_are_defined is not defined"
17020             #endif
17021
17022             struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
17023
17024             char a[true == 1 ? 1 : -1];
17025             char b[false == 0 ? 1 : -1];
17026             char c[__bool_true_false_are_defined == 1 ? 1 : -1];
17027             char d[(bool) 0.5 == true ? 1 : -1];
17028             /* See body of main program for 'e'.  */
17029             char f[(Bool) 0.0 == false ? 1 : -1];
17030             char g[true];
17031             char h[sizeof (Bool)];
17032             char i[sizeof s.t];
17033             enum { j = false, k = true, l = false * true, m = true * 256 };
17034             /* The following fails for
17035                HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
17036             Bool n[m];
17037             char o[sizeof n == m * sizeof n[0] ? 1 : -1];
17038             char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
17039             /* Catch a bug in an HP-UX C compiler.  See
17040                https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
17041                https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
17042              */
17043             Bool q = true;
17044             Bool *pq = &q;
17045             bool *qq = &q;
17046
17047int
17048main ()
17049{
17050
17051             bool e = &s;
17052             *pq |= q; *pq |= ! q;
17053             *qq |= q; *qq |= ! q;
17054             /* Refer to every declared value, to avoid compiler optimizations.  */
17055             return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
17056                     + !m + !n + !o + !p + !q + !pq + !qq);
17057
17058  ;
17059  return 0;
17060}
17061_ACEOF
17062if ac_fn_c_try_compile "$LINENO"; then :
17063  ac_cv_header_stdbool_h=yes
17064else
17065  ac_cv_header_stdbool_h=no
17066fi
17067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17068fi
17069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
17070$as_echo "$ac_cv_header_stdbool_h" >&6; }
17071   ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
17072if test "x$ac_cv_type__Bool" = xyes; then :
17073
17074cat >>confdefs.h <<_ACEOF
17075#define HAVE__BOOL 1
17076_ACEOF
17077
17078
17079fi
17080
17081
17082ac_fn_c_check_decl "$LINENO" "fcloseall" "ac_cv_have_decl_fcloseall" "$ac_includes_default"
17083if test "x$ac_cv_have_decl_fcloseall" = xyes; then :
17084  ac_have_decl=1
17085else
17086  ac_have_decl=0
17087fi
17088
17089cat >>confdefs.h <<_ACEOF
17090#define HAVE_DECL_FCLOSEALL $ac_have_decl
17091_ACEOF
17092
17093ac_fn_c_check_decl "$LINENO" "ecvt" "ac_cv_have_decl_ecvt" "$ac_includes_default"
17094if test "x$ac_cv_have_decl_ecvt" = xyes; then :
17095  ac_have_decl=1
17096else
17097  ac_have_decl=0
17098fi
17099
17100cat >>confdefs.h <<_ACEOF
17101#define HAVE_DECL_ECVT $ac_have_decl
17102_ACEOF
17103
17104ac_fn_c_check_decl "$LINENO" "fcvt" "ac_cv_have_decl_fcvt" "$ac_includes_default"
17105if test "x$ac_cv_have_decl_fcvt" = xyes; then :
17106  ac_have_decl=1
17107else
17108  ac_have_decl=0
17109fi
17110
17111cat >>confdefs.h <<_ACEOF
17112#define HAVE_DECL_FCVT $ac_have_decl
17113_ACEOF
17114
17115ac_fn_c_check_decl "$LINENO" "gcvt" "ac_cv_have_decl_gcvt" "$ac_includes_default"
17116if test "x$ac_cv_have_decl_gcvt" = xyes; then :
17117  ac_have_decl=1
17118else
17119  ac_have_decl=0
17120fi
17121
17122cat >>confdefs.h <<_ACEOF
17123#define HAVE_DECL_GCVT $ac_have_decl
17124_ACEOF
17125
17126ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
17127if test "x$ac_cv_have_decl_strdup" = xyes; then :
17128  ac_have_decl=1
17129else
17130  ac_have_decl=0
17131fi
17132
17133cat >>confdefs.h <<_ACEOF
17134#define HAVE_DECL_STRDUP $ac_have_decl
17135_ACEOF
17136
17137
17138     REPLACE_STRERROR_0=0
17139  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
17140$as_echo_n "checking whether strerror(0) succeeds... " >&6; }
17141if ${gl_cv_func_strerror_0_works+:} false; then :
17142  $as_echo_n "(cached) " >&6
17143else
17144  if test "$cross_compiling" = yes; then :
17145  case "$host_os" in
17146                        # Guess yes on glibc systems.
17147         *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
17148                        # Guess yes on musl systems.
17149         *-musl*)       gl_cv_func_strerror_0_works="guessing yes" ;;
17150                        # Guess yes on native Windows.
17151         mingw*)        gl_cv_func_strerror_0_works="guessing yes" ;;
17152                        # If we don't know, obey --enable-cross-guesses.
17153         *)             gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;;
17154       esac
17155
17156else
17157  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17158/* end confdefs.h.  */
17159#include <string.h>
17160           #include <errno.h>
17161
17162int
17163main ()
17164{
17165int result = 0;
17166           char *str;
17167           errno = 0;
17168           str = strerror (0);
17169           if (!*str) result |= 1;
17170           if (errno) result |= 2;
17171           if (strstr (str, "nknown") || strstr (str, "ndefined"))
17172             result |= 4;
17173           return result;
17174  ;
17175  return 0;
17176}
17177_ACEOF
17178if ac_fn_c_try_run "$LINENO"; then :
17179  gl_cv_func_strerror_0_works=yes
17180else
17181  gl_cv_func_strerror_0_works=no
17182fi
17183rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17184  conftest.$ac_objext conftest.beam conftest.$ac_ext
17185fi
17186
17187
17188fi
17189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
17190$as_echo "$gl_cv_func_strerror_0_works" >&6; }
17191  case "$gl_cv_func_strerror_0_works" in
17192    *yes) ;;
17193    *)
17194      REPLACE_STRERROR_0=1
17195
17196$as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
17197
17198      ;;
17199  esac
17200
17201
17202
17203
17204
17205
17206
17207
17208
17209
17210  if test $ac_cv_func_strerror_r = yes; then
17211    if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
17212                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
17213$as_echo_n "checking for strerror_r with POSIX signature... " >&6; }
17214if ${gl_cv_func_strerror_r_posix_signature+:} false; then :
17215  $as_echo_n "(cached) " >&6
17216else
17217  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17218/* end confdefs.h.  */
17219#include <string.h>
17220                int strerror_r (int, char *, size_t);
17221
17222int
17223main ()
17224{
17225
17226  ;
17227  return 0;
17228}
17229_ACEOF
17230if ac_fn_c_try_compile "$LINENO"; then :
17231  gl_cv_func_strerror_r_posix_signature=yes
17232else
17233  gl_cv_func_strerror_r_posix_signature=no
17234fi
17235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17236
17237fi
17238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
17239$as_echo "$gl_cv_func_strerror_r_posix_signature" >&6; }
17240      if test $gl_cv_func_strerror_r_posix_signature = yes; then
17241                                                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
17242$as_echo_n "checking whether strerror_r works... " >&6; }
17243if ${gl_cv_func_strerror_r_works+:} false; then :
17244  $as_echo_n "(cached) " >&6
17245else
17246  if test "$cross_compiling" = yes; then :
17247
17248              case "$host_os" in
17249                       # Guess no on AIX.
17250                aix*)  gl_cv_func_strerror_r_works="guessing no";;
17251                       # Guess no on HP-UX.
17252                hpux*) gl_cv_func_strerror_r_works="guessing no";;
17253                       # Guess no on BSD variants.
17254                *bsd*)  gl_cv_func_strerror_r_works="guessing no";;
17255                       # Guess yes otherwise.
17256                *)     gl_cv_func_strerror_r_works="guessing yes";;
17257              esac
17258
17259else
17260  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17261/* end confdefs.h.  */
17262#include <errno.h>
17263                  #include <string.h>
17264
17265int
17266main ()
17267{
17268int result = 0;
17269                  char buf[79];
17270                  if (strerror_r (EACCES, buf, 0) < 0)
17271                    result |= 1;
17272                  errno = 0;
17273                  if (strerror_r (EACCES, buf, sizeof buf) != 0)
17274                    result |= 2;
17275                  strcpy (buf, "Unknown");
17276                  if (strerror_r (0, buf, sizeof buf) != 0)
17277                    result |= 4;
17278                  if (errno)
17279                    result |= 8;
17280                  if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
17281                    result |= 0x10;
17282                  errno = 0;
17283                  *buf = 0;
17284                  if (strerror_r (-3, buf, sizeof buf) < 0)
17285                    result |= 0x20;
17286                  if (errno)
17287                    result |= 0x40;
17288                  if (!*buf)
17289                    result |= 0x80;
17290                  return result;
17291
17292  ;
17293  return 0;
17294}
17295_ACEOF
17296if ac_fn_c_try_run "$LINENO"; then :
17297  gl_cv_func_strerror_r_works=yes
17298else
17299  gl_cv_func_strerror_r_works=no
17300fi
17301rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17302  conftest.$ac_objext conftest.beam conftest.$ac_ext
17303fi
17304
17305
17306fi
17307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
17308$as_echo "$gl_cv_func_strerror_r_works" >&6; }
17309      else
17310
17311                        if test $ac_cv_func___xpg_strerror_r = yes; then
17312          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
17313$as_echo_n "checking whether __xpg_strerror_r works... " >&6; }
17314if ${gl_cv_func_strerror_r_works+:} false; then :
17315  $as_echo_n "(cached) " >&6
17316else
17317  if test "$cross_compiling" = yes; then :
17318                                  gl_cv_func_strerror_r_works="$gl_cross_guess_normal"
17319
17320else
17321  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17322/* end confdefs.h.  */
17323#include <errno.h>
17324                    #include <string.h>
17325                    extern
17326                    #ifdef __cplusplus
17327                    "C"
17328                    #endif
17329                    int __xpg_strerror_r(int, char *, size_t);
17330
17331int
17332main ()
17333{
17334int result = 0;
17335                    char buf[256] = "^";
17336                    char copy[256];
17337                    char *str = strerror (-1);
17338                    strcpy (copy, str);
17339                    if (__xpg_strerror_r (-2, buf, 1) == 0)
17340                      result |= 1;
17341                    if (*buf)
17342                      result |= 2;
17343                    __xpg_strerror_r (-2, buf, 256);
17344                    if (strcmp (str, copy))
17345                      result |= 4;
17346                    return result;
17347
17348  ;
17349  return 0;
17350}
17351_ACEOF
17352if ac_fn_c_try_run "$LINENO"; then :
17353  gl_cv_func_strerror_r_works=yes
17354else
17355  gl_cv_func_strerror_r_works=no
17356fi
17357rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17358  conftest.$ac_objext conftest.beam conftest.$ac_ext
17359fi
17360
17361
17362fi
17363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
17364$as_echo "$gl_cv_func_strerror_r_works" >&6; }
17365        fi
17366      fi
17367    fi
17368  fi
17369
17370ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
17371if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
17372  ac_have_decl=1
17373else
17374  ac_have_decl=0
17375fi
17376
17377cat >>confdefs.h <<_ACEOF
17378#define HAVE_DECL_STRERROR_R $ac_have_decl
17379_ACEOF
17380
17381
17382
17383
17384
17385
17386
17387
17388
17389
17390
17391
17392
17393
17394
17395     if test $gl_cv_have_include_next = yes; then
17396       gl_cv_next_string_h='<'string.h'>'
17397     else
17398       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
17399$as_echo_n "checking absolute name of <string.h>... " >&6; }
17400if ${gl_cv_next_string_h+:} false; then :
17401  $as_echo_n "(cached) " >&6
17402else
17403
17404
17405
17406  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17407/* end confdefs.h.  */
17408#include <string.h>
17409_ACEOF
17410                case "$host_os" in
17411    aix*) gl_absname_cpp="$ac_cpp -C" ;;
17412    *)    gl_absname_cpp="$ac_cpp" ;;
17413  esac
17414
17415  case "$host_os" in
17416    mingw*)
17417                                          gl_dirsep_regex='[/\\]'
17418      ;;
17419    *)
17420      gl_dirsep_regex='\/'
17421      ;;
17422  esac
17423      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17424  gl_header_literal_regex=`echo 'string.h' \
17425                           | sed -e "$gl_make_literal_regex_sed"`
17426  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17427      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17428      s|^/[^/]|//&|
17429      p
17430      q
17431    }'
17432
17433        gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17434  sed -n "$gl_absolute_header_sed"`
17435
17436           gl_header=$gl_cv_absolute_string_h
17437           gl_cv_next_string_h='"'$gl_header'"'
17438
17439
17440fi
17441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
17442$as_echo "$gl_cv_next_string_h" >&6; }
17443     fi
17444     NEXT_STRING_H=$gl_cv_next_string_h
17445
17446     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17447       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17448       gl_next_as_first_directive='<'string.h'>'
17449     else
17450       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17451       gl_next_as_first_directive=$gl_cv_next_string_h
17452     fi
17453     NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
17454
17455
17456
17457
17458
17459
17460
17461
17462
17463
17464
17465
17466
17467
17468
17469
17470
17471
17472
17473
17474
17475
17476
17477
17478
17479     if test $gl_cv_have_include_next = yes; then
17480       gl_cv_next_strings_h='<'strings.h'>'
17481     else
17482       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
17483$as_echo_n "checking absolute name of <strings.h>... " >&6; }
17484if ${gl_cv_next_strings_h+:} false; then :
17485  $as_echo_n "(cached) " >&6
17486else
17487
17488             if test $ac_cv_header_strings_h = yes; then
17489
17490
17491
17492
17493  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17494/* end confdefs.h.  */
17495#include <strings.h>
17496_ACEOF
17497                case "$host_os" in
17498    aix*) gl_absname_cpp="$ac_cpp -C" ;;
17499    *)    gl_absname_cpp="$ac_cpp" ;;
17500  esac
17501
17502  case "$host_os" in
17503    mingw*)
17504                                          gl_dirsep_regex='[/\\]'
17505      ;;
17506    *)
17507      gl_dirsep_regex='\/'
17508      ;;
17509  esac
17510      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17511  gl_header_literal_regex=`echo 'strings.h' \
17512                           | sed -e "$gl_make_literal_regex_sed"`
17513  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17514      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17515      s|^/[^/]|//&|
17516      p
17517      q
17518    }'
17519
17520        gl_cv_absolute_strings_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17521  sed -n "$gl_absolute_header_sed"`
17522
17523           gl_header=$gl_cv_absolute_strings_h
17524           gl_cv_next_strings_h='"'$gl_header'"'
17525          else
17526               gl_cv_next_strings_h='<'strings.h'>'
17527             fi
17528
17529
17530fi
17531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
17532$as_echo "$gl_cv_next_strings_h" >&6; }
17533     fi
17534     NEXT_STRINGS_H=$gl_cv_next_strings_h
17535
17536     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17537       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17538       gl_next_as_first_directive='<'strings.h'>'
17539     else
17540       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17541       gl_next_as_first_directive=$gl_cv_next_strings_h
17542     fi
17543     NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
17544
17545
17546
17547
17548  if test $ac_cv_header_strings_h = yes; then
17549    HAVE_STRINGS_H=1
17550  else
17551    HAVE_STRINGS_H=0
17552  fi
17553
17554
17555
17556
17557
17558
17559ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
17560if test "x$ac_cv_have_decl_strnlen" = xyes; then :
17561  ac_have_decl=1
17562else
17563  ac_have_decl=0
17564fi
17565
17566cat >>confdefs.h <<_ACEOF
17567#define HAVE_DECL_STRNLEN $ac_have_decl
17568_ACEOF
17569
17570
17571
17572
17573  if test $REPLACE_MEMCHR = 1; then
17574    REPLACE_STRSTR=1
17575  else
17576            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
17577$as_echo_n "checking whether strstr works... " >&6; }
17578if ${gl_cv_func_strstr_works_always+:} false; then :
17579  $as_echo_n "(cached) " >&6
17580else
17581  if test "$cross_compiling" = yes; then :
17582                                                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17583/* end confdefs.h.  */
17584
17585#ifdef __GNU_LIBRARY__
17586 #include <features.h>
17587 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
17588     || defined __UCLIBC__
17589  Lucky user
17590 #endif
17591#elif defined __CYGWIN__
17592 #include <cygwin/version.h>
17593 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
17594  Lucky user
17595 #endif
17596#else
17597  Lucky user
17598#endif
17599
17600_ACEOF
17601if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17602  $EGREP "Lucky user" >/dev/null 2>&1; then :
17603  gl_cv_func_strstr_works_always="guessing yes"
17604else
17605  gl_cv_func_strstr_works_always="$gl_cross_guess_normal"
17606fi
17607rm -f conftest*
17608
17609
17610else
17611  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17612/* end confdefs.h.  */
17613
17614#include <string.h> /* for strstr */
17615#ifdef __GNU_LIBRARY__
17616 #include <features.h>
17617 #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28
17618  Unlucky user
17619 #endif
17620#endif
17621#define P "_EF_BF_BD"
17622#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
17623#define NEEDLE P P P P P
17624
17625int
17626main ()
17627{
17628return !!strstr (HAYSTACK, NEEDLE);
17629
17630  ;
17631  return 0;
17632}
17633_ACEOF
17634if ac_fn_c_try_run "$LINENO"; then :
17635  gl_cv_func_strstr_works_always=yes
17636else
17637  gl_cv_func_strstr_works_always=no
17638fi
17639rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17640  conftest.$ac_objext conftest.beam conftest.$ac_ext
17641fi
17642
17643
17644fi
17645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
17646$as_echo "$gl_cv_func_strstr_works_always" >&6; }
17647    case "$gl_cv_func_strstr_works_always" in
17648      *yes) ;;
17649      *)
17650        REPLACE_STRSTR=1
17651        ;;
17652    esac
17653  fi
17654
17655ac_fn_c_check_decl "$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "$ac_includes_default"
17656if test "x$ac_cv_have_decl_strtok_r" = xyes; then :
17657  ac_have_decl=1
17658else
17659  ac_have_decl=0
17660fi
17661
17662cat >>confdefs.h <<_ACEOF
17663#define HAVE_DECL_STRTOK_R $ac_have_decl
17664_ACEOF
17665
17666
17667
17668
17669
17670
17671
17672
17673
17674
17675
17676
17677
17678$as_echo "#define _USE_STD_STAT 1" >>confdefs.h
17679
17680
17681
17682
17683
17684
17685
17686
17687
17688
17689
17690     if test $gl_cv_have_include_next = yes; then
17691       gl_cv_next_sys_types_h='<'sys/types.h'>'
17692     else
17693       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
17694$as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
17695if ${gl_cv_next_sys_types_h+:} false; then :
17696  $as_echo_n "(cached) " >&6
17697else
17698
17699
17700
17701  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17702/* end confdefs.h.  */
17703#include <sys/types.h>
17704_ACEOF
17705                case "$host_os" in
17706    aix*) gl_absname_cpp="$ac_cpp -C" ;;
17707    *)    gl_absname_cpp="$ac_cpp" ;;
17708  esac
17709
17710  case "$host_os" in
17711    mingw*)
17712                                          gl_dirsep_regex='[/\\]'
17713      ;;
17714    *)
17715      gl_dirsep_regex='\/'
17716      ;;
17717  esac
17718      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17719  gl_header_literal_regex=`echo 'sys/types.h' \
17720                           | sed -e "$gl_make_literal_regex_sed"`
17721  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17722      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17723      s|^/[^/]|//&|
17724      p
17725      q
17726    }'
17727
17728        gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17729  sed -n "$gl_absolute_header_sed"`
17730
17731           gl_header=$gl_cv_absolute_sys_types_h
17732           gl_cv_next_sys_types_h='"'$gl_header'"'
17733
17734
17735fi
17736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
17737$as_echo "$gl_cv_next_sys_types_h" >&6; }
17738     fi
17739     NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
17740
17741     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17742       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17743       gl_next_as_first_directive='<'sys/types.h'>'
17744     else
17745       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17746       gl_next_as_first_directive=$gl_cv_next_sys_types_h
17747     fi
17748     NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
17749
17750
17751
17752
17753
17754
17755
17756
17757
17758
17759
17760
17761    WINDOWS_STAT_INODES=0
17762
17763
17764
17765
17766
17767
17768
17769
17770  GNULIB_CTIME=0;
17771  GNULIB_MKTIME=0;
17772  GNULIB_LOCALTIME=0;
17773  GNULIB_NANOSLEEP=0;
17774  GNULIB_STRFTIME=0;
17775  GNULIB_STRPTIME=0;
17776  GNULIB_TIMEGM=0;
17777  GNULIB_TIMESPEC_GET=0;
17778  GNULIB_TIME_R=0;
17779  GNULIB_TIME_RZ=0;
17780  GNULIB_TZSET=0;
17781    GNULIB_MDA_TZSET=1;
17782    HAVE_DECL_LOCALTIME_R=1;
17783  HAVE_NANOSLEEP=1;
17784  HAVE_STRPTIME=1;
17785  HAVE_TIMEGM=1;
17786  HAVE_TIMESPEC_GET=1;
17787    HAVE_TIMEZONE_T=0;
17788        REPLACE_CTIME=GNULIB_PORTCHECK;
17789  REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
17790  REPLACE_MKTIME=GNULIB_PORTCHECK;
17791  REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
17792  REPLACE_STRFTIME=GNULIB_PORTCHECK;
17793  REPLACE_TIMEGM=GNULIB_PORTCHECK;
17794  REPLACE_TZSET=GNULIB_PORTCHECK;
17795
17796      : ${GNULIB_GETTIMEOFDAY=0};
17797        REPLACE_GMTIME=0;
17798  REPLACE_LOCALTIME=0;
17799
17800
17801
17802  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
17803$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
17804if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
17805  $as_echo_n "(cached) " >&6
17806else
17807  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17808/* end confdefs.h.  */
17809#include <time.h>
17810
17811int
17812main ()
17813{
17814static struct timespec x; x.tv_sec = x.tv_nsec;
17815  ;
17816  return 0;
17817}
17818_ACEOF
17819if ac_fn_c_try_compile "$LINENO"; then :
17820  gl_cv_sys_struct_timespec_in_time_h=yes
17821else
17822  gl_cv_sys_struct_timespec_in_time_h=no
17823fi
17824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17825fi
17826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
17827$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
17828
17829  TIME_H_DEFINES_STRUCT_TIMESPEC=0
17830  SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
17831  PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
17832  UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
17833  if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
17834    TIME_H_DEFINES_STRUCT_TIMESPEC=1
17835  else
17836    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
17837$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
17838if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
17839  $as_echo_n "(cached) " >&6
17840else
17841  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17842/* end confdefs.h.  */
17843#include <sys/time.h>
17844
17845int
17846main ()
17847{
17848static struct timespec x; x.tv_sec = x.tv_nsec;
17849  ;
17850  return 0;
17851}
17852_ACEOF
17853if ac_fn_c_try_compile "$LINENO"; then :
17854  gl_cv_sys_struct_timespec_in_sys_time_h=yes
17855else
17856  gl_cv_sys_struct_timespec_in_sys_time_h=no
17857fi
17858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17859fi
17860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
17861$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
17862    if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
17863      SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
17864    else
17865      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
17866$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
17867if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
17868  $as_echo_n "(cached) " >&6
17869else
17870  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17871/* end confdefs.h.  */
17872#include <pthread.h>
17873
17874int
17875main ()
17876{
17877static struct timespec x; x.tv_sec = x.tv_nsec;
17878  ;
17879  return 0;
17880}
17881_ACEOF
17882if ac_fn_c_try_compile "$LINENO"; then :
17883  gl_cv_sys_struct_timespec_in_pthread_h=yes
17884else
17885  gl_cv_sys_struct_timespec_in_pthread_h=no
17886fi
17887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17888fi
17889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
17890$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
17891      if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
17892        PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
17893      else
17894        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
17895$as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
17896if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then :
17897  $as_echo_n "(cached) " >&6
17898else
17899  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17900/* end confdefs.h.  */
17901#include <unistd.h>
17902
17903int
17904main ()
17905{
17906static struct timespec x; x.tv_sec = x.tv_nsec;
17907  ;
17908  return 0;
17909}
17910_ACEOF
17911if ac_fn_c_try_compile "$LINENO"; then :
17912  gl_cv_sys_struct_timespec_in_unistd_h=yes
17913else
17914  gl_cv_sys_struct_timespec_in_unistd_h=no
17915fi
17916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17917fi
17918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
17919$as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
17920        if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
17921          UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
17922        fi
17923      fi
17924    fi
17925  fi
17926
17927
17928
17929
17930
17931
17932
17933
17934
17935
17936
17937
17938
17939
17940
17941
17942     if test $gl_cv_have_include_next = yes; then
17943       gl_cv_next_time_h='<'time.h'>'
17944     else
17945       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
17946$as_echo_n "checking absolute name of <time.h>... " >&6; }
17947if ${gl_cv_next_time_h+:} false; then :
17948  $as_echo_n "(cached) " >&6
17949else
17950
17951
17952
17953  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17954/* end confdefs.h.  */
17955#include <time.h>
17956_ACEOF
17957                case "$host_os" in
17958    aix*) gl_absname_cpp="$ac_cpp -C" ;;
17959    *)    gl_absname_cpp="$ac_cpp" ;;
17960  esac
17961
17962  case "$host_os" in
17963    mingw*)
17964                                          gl_dirsep_regex='[/\\]'
17965      ;;
17966    *)
17967      gl_dirsep_regex='\/'
17968      ;;
17969  esac
17970      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17971  gl_header_literal_regex=`echo 'time.h' \
17972                           | sed -e "$gl_make_literal_regex_sed"`
17973  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17974      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17975      s|^/[^/]|//&|
17976      p
17977      q
17978    }'
17979
17980        gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17981  sed -n "$gl_absolute_header_sed"`
17982
17983           gl_header=$gl_cv_absolute_time_h
17984           gl_cv_next_time_h='"'$gl_header'"'
17985
17986
17987fi
17988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
17989$as_echo "$gl_cv_next_time_h" >&6; }
17990     fi
17991     NEXT_TIME_H=$gl_cv_next_time_h
17992
17993     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17994       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17995       gl_next_as_first_directive='<'time.h'>'
17996     else
17997       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17998       gl_next_as_first_directive=$gl_cv_next_time_h
17999     fi
18000     NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
18001
18002
18003
18004
18005
18006
18007
18008
18009  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME_UTC in <time.h>" >&5
18010$as_echo_n "checking for TIME_UTC in <time.h>... " >&6; }
18011if ${gl_cv_time_h_has_TIME_UTC+:} false; then :
18012  $as_echo_n "(cached) " >&6
18013else
18014  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18015/* end confdefs.h.  */
18016#include <time.h>
18017
18018int
18019main ()
18020{
18021static int x = TIME_UTC; x++;
18022  ;
18023  return 0;
18024}
18025_ACEOF
18026if ac_fn_c_try_compile "$LINENO"; then :
18027  gl_cv_time_h_has_TIME_UTC=yes
18028else
18029  gl_cv_time_h_has_TIME_UTC=no
18030fi
18031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18032fi
18033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_h_has_TIME_UTC" >&5
18034$as_echo "$gl_cv_time_h_has_TIME_UTC" >&6; }
18035  if test $gl_cv_time_h_has_TIME_UTC = yes; then
18036    TIME_H_DEFINES_TIME_UTC=1
18037  else
18038    TIME_H_DEFINES_TIME_UTC=0
18039  fi
18040
18041
18042
18043
18044ac_fn_c_check_decl "$LINENO" "execvpe" "ac_cv_have_decl_execvpe" "$ac_includes_default"
18045if test "x$ac_cv_have_decl_execvpe" = xyes; then :
18046  ac_have_decl=1
18047else
18048  ac_have_decl=0
18049fi
18050
18051cat >>confdefs.h <<_ACEOF
18052#define HAVE_DECL_EXECVPE $ac_have_decl
18053_ACEOF
18054
18055ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
18056if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
18057  ac_have_decl=1
18058else
18059  ac_have_decl=0
18060fi
18061
18062cat >>confdefs.h <<_ACEOF
18063#define HAVE_DECL_UNSETENV $ac_have_decl
18064_ACEOF
18065
18066
18067
18068
18069
18070  if test $ac_cv_header_crtdefs_h = yes; then
18071    HAVE_CRTDEFS_H=1
18072  else
18073    HAVE_CRTDEFS_H=0
18074  fi
18075
18076
18077
18078  GNULIB_ISWBLANK=0;
18079  GNULIB_ISWDIGIT=0;
18080  GNULIB_ISWXDIGIT=0;
18081  GNULIB_WCTYPE=0;
18082  GNULIB_ISWCTYPE=0;
18083  GNULIB_WCTRANS=0;
18084  GNULIB_TOWCTRANS=0;
18085    HAVE_ISWBLANK=1;
18086  HAVE_WCTYPE_T=1;
18087  HAVE_WCTRANS_T=1;
18088  REPLACE_ISWBLANK=0;
18089  REPLACE_ISWDIGIT=0;
18090  REPLACE_ISWXDIGIT=0;
18091
18092
18093
18094
18095
18096
18097
18098
18099   if false; then
18100  GL_COND_LIBTOOL_TRUE=
18101  GL_COND_LIBTOOL_FALSE='#'
18102else
18103  GL_COND_LIBTOOL_TRUE='#'
18104  GL_COND_LIBTOOL_FALSE=
18105fi
18106
18107  gl_cond_libtool=false
18108  gl_libdeps=
18109  gl_ltlibdeps=
18110  gl_m4_base='import/m4'
18111
18112
18113
18114
18115
18116
18117
18118
18119
18120
18121  gl_source_base='import'
18122
18123
18124  if test $ac_cv_func_alloca_works = no; then
18125    :
18126  fi
18127
18128  # Define an additional variable used in the Makefile substitution.
18129  if test $ac_cv_working_alloca_h = yes; then
18130    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
18131$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
18132if ${gl_cv_rpl_alloca+:} false; then :
18133  $as_echo_n "(cached) " >&6
18134else
18135
18136      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18137/* end confdefs.h.  */
18138
18139#if defined __GNUC__ || defined _AIX || defined _MSC_VER
18140        Need own alloca
18141#endif
18142
18143_ACEOF
18144if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18145  $EGREP "Need own alloca" >/dev/null 2>&1; then :
18146  gl_cv_rpl_alloca=yes
18147else
18148  gl_cv_rpl_alloca=no
18149fi
18150rm -f conftest*
18151
18152
18153fi
18154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
18155$as_echo "$gl_cv_rpl_alloca" >&6; }
18156    if test $gl_cv_rpl_alloca = yes; then
18157
18158$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
18159
18160      ALLOCA_H=alloca.h
18161    else
18162                  ALLOCA_H=
18163    fi
18164  else
18165    ALLOCA_H=alloca.h
18166  fi
18167
18168   if test -n "$ALLOCA_H"; then
18169  GL_GENERATE_ALLOCA_H_TRUE=
18170  GL_GENERATE_ALLOCA_H_FALSE='#'
18171else
18172  GL_GENERATE_ALLOCA_H_TRUE='#'
18173  GL_GENERATE_ALLOCA_H_FALSE=
18174fi
18175
18176
18177  if test $ac_cv_working_alloca_h = yes; then
18178    HAVE_ALLOCA_H=1
18179  else
18180    HAVE_ALLOCA_H=0
18181  fi
18182
18183
18184
18185
18186
18187
18188  if test $ac_cv_header_arpa_inet_h = yes; then
18189    HAVE_ARPA_INET_H=1
18190  else
18191    HAVE_ARPA_INET_H=0
18192  fi
18193
18194
18195
18196
18197
18198
18199
18200
18201
18202
18203     if test $gl_cv_have_include_next = yes; then
18204       gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
18205     else
18206       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
18207$as_echo_n "checking absolute name of <arpa/inet.h>... " >&6; }
18208if ${gl_cv_next_arpa_inet_h+:} false; then :
18209  $as_echo_n "(cached) " >&6
18210else
18211
18212             if test $ac_cv_header_arpa_inet_h = yes; then
18213
18214
18215
18216
18217  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18218/* end confdefs.h.  */
18219#include <arpa/inet.h>
18220_ACEOF
18221                case "$host_os" in
18222    aix*) gl_absname_cpp="$ac_cpp -C" ;;
18223    *)    gl_absname_cpp="$ac_cpp" ;;
18224  esac
18225
18226  case "$host_os" in
18227    mingw*)
18228                                          gl_dirsep_regex='[/\\]'
18229      ;;
18230    *)
18231      gl_dirsep_regex='\/'
18232      ;;
18233  esac
18234      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18235  gl_header_literal_regex=`echo 'arpa/inet.h' \
18236                           | sed -e "$gl_make_literal_regex_sed"`
18237  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18238      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18239      s|^/[^/]|//&|
18240      p
18241      q
18242    }'
18243
18244        gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18245  sed -n "$gl_absolute_header_sed"`
18246
18247           gl_header=$gl_cv_absolute_arpa_inet_h
18248           gl_cv_next_arpa_inet_h='"'$gl_header'"'
18249          else
18250               gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
18251             fi
18252
18253
18254fi
18255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
18256$as_echo "$gl_cv_next_arpa_inet_h" >&6; }
18257     fi
18258     NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
18259
18260     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18261       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18262       gl_next_as_first_directive='<'arpa/inet.h'>'
18263     else
18264       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18265       gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
18266     fi
18267     NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
18268
18269
18270
18271
18272
18273
18274
18275
18276
18277  if test $ac_cv_header_sys_socket_h = yes; then
18278    HAVE_WS2TCPIP_H=0
18279  else
18280    if test $ac_cv_header_ws2tcpip_h = yes; then
18281      HAVE_WS2TCPIP_H=1
18282    else
18283      HAVE_WS2TCPIP_H=0
18284    fi
18285  fi
18286
18287
18288
18289
18290
18291
18292
18293
18294
18295
18296
18297
18298
18299
18300
18301  if test $ac_cv_func_btowc = no; then
18302    HAVE_BTOWC=0
18303  else
18304
18305
18306
18307
18308        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
18309$as_echo_n "checking whether btowc(0) is correct... " >&6; }
18310if ${gl_cv_func_btowc_nul+:} false; then :
18311  $as_echo_n "(cached) " >&6
18312else
18313
18314        if test "$cross_compiling" = yes; then :
18315
18316           case "$host_os" in
18317                      # Guess no on Cygwin.
18318             cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
18319                      # Guess yes on native Windows.
18320             mingw*)  gl_cv_func_btowc_nul="guessing yes" ;;
18321                      # Guess yes otherwise.
18322             *)       gl_cv_func_btowc_nul="guessing yes" ;;
18323           esac
18324
18325else
18326  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18327/* end confdefs.h.  */
18328
18329#include <wchar.h>
18330int main ()
18331{
18332  if (btowc ('\0') != 0)
18333    return 1;
18334  return 0;
18335}
18336_ACEOF
18337if ac_fn_c_try_run "$LINENO"; then :
18338  gl_cv_func_btowc_nul=yes
18339else
18340  gl_cv_func_btowc_nul=no
18341fi
18342rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18343  conftest.$ac_objext conftest.beam conftest.$ac_ext
18344fi
18345
18346
18347fi
18348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
18349$as_echo "$gl_cv_func_btowc_nul" >&6; }
18350
18351        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
18352$as_echo_n "checking whether btowc(EOF) is correct... " >&6; }
18353if ${gl_cv_func_btowc_eof+:} false; then :
18354  $as_echo_n "(cached) " >&6
18355else
18356
18357                        case "$host_os" in
18358                  # Guess no on IRIX.
18359          irix*)  gl_cv_func_btowc_eof="guessing no" ;;
18360                  # Guess yes on native Windows.
18361          mingw*) gl_cv_func_btowc_eof="guessing yes" ;;
18362                  # Guess yes otherwise.
18363          *)      gl_cv_func_btowc_eof="guessing yes" ;;
18364        esac
18365        if test $LOCALE_FR != none; then
18366          if test "$cross_compiling" = yes; then :
18367  :
18368else
18369  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18370/* end confdefs.h.  */
18371
18372#include <locale.h>
18373#include <stdio.h>
18374#include <wchar.h>
18375int main ()
18376{
18377  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
18378    {
18379      if (btowc (EOF) != WEOF)
18380        return 1;
18381    }
18382  return 0;
18383}
18384_ACEOF
18385if ac_fn_c_try_run "$LINENO"; then :
18386  gl_cv_func_btowc_eof=yes
18387else
18388  gl_cv_func_btowc_eof=no
18389fi
18390rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18391  conftest.$ac_objext conftest.beam conftest.$ac_ext
18392fi
18393
18394        fi
18395
18396fi
18397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
18398$as_echo "$gl_cv_func_btowc_eof" >&6; }
18399
18400    case "$gl_cv_func_btowc_nul" in
18401      *yes) ;;
18402      *) REPLACE_BTOWC=1 ;;
18403    esac
18404    case "$gl_cv_func_btowc_eof" in
18405      *yes) ;;
18406      *) REPLACE_BTOWC=1 ;;
18407    esac
18408  fi
18409
18410  if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
18411
18412
18413
18414
18415
18416
18417
18418
18419  gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
18420
18421
18422  :
18423
18424  fi
18425
18426
18427
18428
18429
18430          GNULIB_BTOWC=1
18431
18432
18433
18434
18435
18436$as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
18437
18438
18439
18440
18441  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
18442$as_echo_n "checking for __builtin_expect... " >&6; }
18443if ${gl_cv___builtin_expect+:} false; then :
18444  $as_echo_n "(cached) " >&6
18445else
18446  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18447/* end confdefs.h.  */
18448
18449         int
18450         main (int argc, char **argv)
18451         {
18452           argc = __builtin_expect (argc, 100);
18453           return argv[argc != 100][0];
18454         }
18455_ACEOF
18456if ac_fn_c_try_link "$LINENO"; then :
18457  gl_cv___builtin_expect=yes
18458else
18459  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18460/* end confdefs.h.  */
18461
18462             #include <builtins.h>
18463             int
18464             main (int argc, char **argv)
18465             {
18466               argc = __builtin_expect (argc, 100);
18467               return argv[argc != 100][0];
18468             }
18469_ACEOF
18470if ac_fn_c_try_link "$LINENO"; then :
18471  gl_cv___builtin_expect="in <builtins.h>"
18472else
18473  gl_cv___builtin_expect=no
18474fi
18475rm -f core conftest.err conftest.$ac_objext \
18476    conftest$ac_exeext conftest.$ac_ext
18477fi
18478rm -f core conftest.err conftest.$ac_objext \
18479    conftest$ac_exeext conftest.$ac_ext
18480fi
18481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5
18482$as_echo "$gl_cv___builtin_expect" >&6; }
18483  if test "$gl_cv___builtin_expect" = yes; then
18484    $as_echo "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h
18485
18486  elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
18487    $as_echo "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
18488
18489  fi
18490
18491
18492
18493
18494
18495  if test $ac_cv_func_canonicalize_file_name = no; then
18496    HAVE_CANONICALIZE_FILE_NAME=0
18497    if test $ac_cv_func_realpath = no; then
18498      HAVE_REALPATH=0
18499    else
18500      case "$gl_cv_func_realpath_works" in
18501        *yes) ;;
18502        *)    REPLACE_REALPATH=1 ;;
18503      esac
18504    fi
18505  else
18506    case "$gl_cv_func_realpath_works" in
18507      *yes)
18508        ;;
18509      *)
18510        REPLACE_CANONICALIZE_FILE_NAME=1
18511        REPLACE_REALPATH=1
18512        ;;
18513    esac
18514  fi
18515
18516  if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
18517
18518
18519
18520
18521
18522
18523
18524
18525  gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
18526
18527  fi
18528
18529
18530cat >>confdefs.h <<_ACEOF
18531#define GNULIB_CANONICALIZE_LGPL 1
18532_ACEOF
18533
18534
18535
18536
18537
18538
18539
18540          GNULIB_CANONICALIZE_FILE_NAME=1
18541
18542
18543
18544
18545
18546$as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
18547
18548
18549
18550
18551
18552
18553
18554
18555          GNULIB_REALPATH=1
18556
18557
18558
18559
18560
18561$as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
18562
18563
18564
18565
18566
18567
18568
18569
18570          GNULIB_CHDIR=1
18571
18572
18573
18574
18575
18576$as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
18577
18578
18579
18580
18581
18582  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system supports file names of any length" >&5
18583$as_echo_n "checking whether this system supports file names of any length... " >&6; }
18584if ${gl_cv_have_unlimited_file_name_length+:} false; then :
18585  $as_echo_n "(cached) " >&6
18586else
18587  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18588/* end confdefs.h.  */
18589
18590/* Arrange to define PATH_MAX, like "pathmax.h" does. */
18591#if HAVE_UNISTD_H
18592# include <unistd.h>
18593#endif
18594#include <limits.h>
18595#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
18596# include <sys/param.h>
18597#endif
18598#if !defined PATH_MAX && defined MAXPATHLEN
18599# define PATH_MAX MAXPATHLEN
18600#endif
18601#ifdef __hpux
18602# undef PATH_MAX
18603# define PATH_MAX 1024
18604#endif
18605#if defined _WIN32 && ! defined __CYGWIN__
18606# undef PATH_MAX
18607# define PATH_MAX 260
18608#endif
18609
18610#ifdef PATH_MAX
18611have_arbitrary_file_name_length_limit
18612#endif
18613_ACEOF
18614if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18615  $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
18616  gl_cv_have_unlimited_file_name_length=no
18617else
18618  gl_cv_have_unlimited_file_name_length=yes
18619fi
18620rm -f conftest*
18621
18622fi
18623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_unlimited_file_name_length" >&5
18624$as_echo "$gl_cv_have_unlimited_file_name_length" >&6; }
18625
18626  if test $gl_cv_have_unlimited_file_name_length = no; then
18627
18628
18629
18630
18631
18632
18633
18634
18635  gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
18636
18637    :
18638  fi
18639
18640  if test $HAVE_CHOWN = 0 || test $REPLACE_CHOWN = 1; then
18641
18642
18643
18644
18645
18646
18647
18648
18649  gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext"
18650
18651  fi
18652  if test $REPLACE_CHOWN = 1 && test $ac_cv_func_fchown = no; then
18653
18654
18655
18656
18657
18658
18659
18660
18661  gl_LIBOBJS="$gl_LIBOBJS fchown-stub.$ac_objext"
18662
18663  fi
18664
18665
18666
18667
18668
18669          GNULIB_CHOWN=1
18670
18671
18672
18673
18674
18675$as_echo "#define GNULIB_TEST_CHOWN 1" >>confdefs.h
18676
18677
18678
18679
18680
18681
18682  # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
18683  # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
18684
18685  # Save and restore LIBS so e.g., -lrt, isn't added to it.  Otherwise, *all*
18686  # programs in the package would end up linked with that potentially-shared
18687  # library, inducing unnecessary run-time overhead.
18688  LIB_CLOCK_GETTIME=
18689
18690  gl_saved_libs=$LIBS
18691    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
18692$as_echo_n "checking for library containing clock_gettime... " >&6; }
18693if ${ac_cv_search_clock_gettime+:} false; then :
18694  $as_echo_n "(cached) " >&6
18695else
18696  ac_func_search_save_LIBS=$LIBS
18697cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18698/* end confdefs.h.  */
18699
18700/* Override any GCC internal prototype to avoid an error.
18701   Use char because int might match the return type of a GCC
18702   builtin and then its argument prototype would still apply.  */
18703#ifdef __cplusplus
18704extern "C"
18705#endif
18706char clock_gettime ();
18707int
18708main ()
18709{
18710return clock_gettime ();
18711  ;
18712  return 0;
18713}
18714_ACEOF
18715for ac_lib in '' rt posix4; do
18716  if test -z "$ac_lib"; then
18717    ac_res="none required"
18718  else
18719    ac_res=-l$ac_lib
18720    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18721  fi
18722  if ac_fn_c_try_link "$LINENO"; then :
18723  ac_cv_search_clock_gettime=$ac_res
18724fi
18725rm -f core conftest.err conftest.$ac_objext \
18726    conftest$ac_exeext
18727  if ${ac_cv_search_clock_gettime+:} false; then :
18728  break
18729fi
18730done
18731if ${ac_cv_search_clock_gettime+:} false; then :
18732
18733else
18734  ac_cv_search_clock_gettime=no
18735fi
18736rm conftest.$ac_ext
18737LIBS=$ac_func_search_save_LIBS
18738fi
18739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
18740$as_echo "$ac_cv_search_clock_gettime" >&6; }
18741ac_res=$ac_cv_search_clock_gettime
18742if test "$ac_res" != no; then :
18743  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18744  test "$ac_cv_search_clock_gettime" = "none required" ||
18745                    LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
18746fi
18747
18748    for ac_func in clock_gettime clock_settime
18749do :
18750  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18751ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18752if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
18753  cat >>confdefs.h <<_ACEOF
18754#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18755_ACEOF
18756
18757fi
18758done
18759
18760  LIBS=$gl_saved_libs
18761
18762
18763
18764$as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
18765
18766
18767
18768
18769
18770
18771    if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
18772      REPLACE_CLOSE=1
18773    fi
18774
18775
18776
18777
18778
18779
18780  if test $ac_cv_header_sys_socket_h != yes; then
18781                    for ac_header in winsock2.h
18782do :
18783  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
18784if test "x$ac_cv_header_winsock2_h" = xyes; then :
18785  cat >>confdefs.h <<_ACEOF
18786#define HAVE_WINSOCK2_H 1
18787_ACEOF
18788
18789fi
18790
18791done
18792
18793  fi
18794  if test "$ac_cv_header_winsock2_h" = yes; then
18795    HAVE_WINSOCK2_H=1
18796    UNISTD_H_HAVE_WINSOCK2_H=1
18797    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
18798  else
18799    HAVE_WINSOCK2_H=0
18800  fi
18801
18802
18803    if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
18804                        REPLACE_CLOSE=1
18805    fi
18806
18807
18808    if test $REPLACE_CLOSE = 0; then
18809
18810
18811
18812  if test $ac_cv_func_fchdir = no; then
18813    HAVE_FCHDIR=0
18814  fi
18815
18816      if test $HAVE_FCHDIR = 0; then
18817        REPLACE_CLOSE=1
18818      fi
18819    fi
18820
18821
18822  if test $REPLACE_CLOSE = 1; then
18823
18824
18825
18826
18827
18828
18829
18830
18831  gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
18832
18833  fi
18834
18835
18836
18837
18838
18839          GNULIB_CLOSE=1
18840
18841
18842
18843
18844
18845$as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
18846
18847
18848
18849
18850
18851
18852  for ac_func in closedir
18853do :
18854  ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
18855if test "x$ac_cv_func_closedir" = xyes; then :
18856  cat >>confdefs.h <<_ACEOF
18857#define HAVE_CLOSEDIR 1
18858_ACEOF
18859
18860fi
18861done
18862
18863  if test $ac_cv_func_closedir = no; then
18864    HAVE_CLOSEDIR=0
18865  fi
18866
18867
18868
18869
18870  if test $ac_cv_func_fchdir = no; then
18871    HAVE_FCHDIR=0
18872  fi
18873
18874    if test $HAVE_FCHDIR = 0; then
18875      if test $HAVE_CLOSEDIR = 1; then
18876        REPLACE_CLOSEDIR=1
18877      fi
18878    fi
18879
18880    case $host_os,$HAVE_CLOSEDIR in
18881    os2*,1)
18882      REPLACE_CLOSEDIR=1;;
18883  esac
18884
18885  if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
18886
18887
18888
18889
18890
18891
18892
18893
18894  gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
18895
18896  fi
18897
18898
18899
18900
18901
18902          GNULIB_CLOSEDIR=1
18903
18904
18905
18906
18907
18908$as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
18909
18910
18911
18912
18913
18914
18915
18916
18917
18918
18919
18920
18921
18922
18923     if test $gl_cv_have_include_next = yes; then
18924       gl_cv_next_ctype_h='<'ctype.h'>'
18925     else
18926       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5
18927$as_echo_n "checking absolute name of <ctype.h>... " >&6; }
18928if ${gl_cv_next_ctype_h+:} false; then :
18929  $as_echo_n "(cached) " >&6
18930else
18931
18932
18933
18934  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18935/* end confdefs.h.  */
18936#include <ctype.h>
18937_ACEOF
18938                case "$host_os" in
18939    aix*) gl_absname_cpp="$ac_cpp -C" ;;
18940    *)    gl_absname_cpp="$ac_cpp" ;;
18941  esac
18942
18943  case "$host_os" in
18944    mingw*)
18945                                          gl_dirsep_regex='[/\\]'
18946      ;;
18947    *)
18948      gl_dirsep_regex='\/'
18949      ;;
18950  esac
18951      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18952  gl_header_literal_regex=`echo 'ctype.h' \
18953                           | sed -e "$gl_make_literal_regex_sed"`
18954  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18955      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18956      s|^/[^/]|//&|
18957      p
18958      q
18959    }'
18960
18961        gl_cv_absolute_ctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18962  sed -n "$gl_absolute_header_sed"`
18963
18964           gl_header=$gl_cv_absolute_ctype_h
18965           gl_cv_next_ctype_h='"'$gl_header'"'
18966
18967
18968fi
18969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5
18970$as_echo "$gl_cv_next_ctype_h" >&6; }
18971     fi
18972     NEXT_CTYPE_H=$gl_cv_next_ctype_h
18973
18974     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18975       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18976       gl_next_as_first_directive='<'ctype.h'>'
18977     else
18978       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18979       gl_next_as_first_directive=$gl_cv_next_ctype_h
18980     fi
18981     NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive
18982
18983
18984
18985
18986
18987
18988
18989
18990
18991      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
18992$as_echo_n "checking for d_ino member in directory struct... " >&6; }
18993if ${gl_cv_struct_dirent_d_ino+:} false; then :
18994  $as_echo_n "(cached) " >&6
18995else
18996  if test "$cross_compiling" = yes; then :
18997  case "$host_os" in
18998                            # Guess yes on glibc systems with Linux kernel.
18999              linux*-gnu*)  gl_cv_struct_dirent_d_ino="guessing yes" ;;
19000                            # Guess yes on musl systems with Linux kernel.
19001              linux*-musl*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
19002                            # Guess no on native Windows.
19003              mingw*)       gl_cv_struct_dirent_d_ino="guessing no" ;;
19004                            # If we don't know, obey --enable-cross-guesses.
19005              *)            gl_cv_struct_dirent_d_ino="$gl_cross_guess_normal" ;;
19006            esac
19007
19008else
19009  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19010/* end confdefs.h.  */
19011#include <sys/types.h>
19012             #include <sys/stat.h>
19013             #include <dirent.h>
19014
19015int
19016main ()
19017{
19018DIR *dp = opendir (".");
19019             struct dirent *e;
19020             struct stat st;
19021             if (! dp)
19022               return 1;
19023             e = readdir (dp);
19024             if (! e)
19025               { closedir (dp); return 2; }
19026             if (lstat (e->d_name, &st) != 0)
19027               { closedir (dp); return 3; }
19028             if (e->d_ino != st.st_ino)
19029               { closedir (dp); return 4; }
19030             closedir (dp);
19031             return 0;
19032
19033  ;
19034  return 0;
19035}
19036_ACEOF
19037if ac_fn_c_try_run "$LINENO"; then :
19038  gl_cv_struct_dirent_d_ino=yes
19039else
19040  gl_cv_struct_dirent_d_ino=no
19041fi
19042rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19043  conftest.$ac_objext conftest.beam conftest.$ac_ext
19044fi
19045
19046fi
19047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
19048$as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
19049   case "$gl_cv_struct_dirent_d_ino" in
19050     *yes)
19051
19052$as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
19053
19054       ;;
19055   esac
19056
19057
19058  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
19059$as_echo_n "checking for d_type member in directory struct... " >&6; }
19060if ${gl_cv_struct_dirent_d_type+:} false; then :
19061  $as_echo_n "(cached) " >&6
19062else
19063  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19064/* end confdefs.h.  */
19065
19066#include <sys/types.h>
19067#include <dirent.h>
19068
19069int
19070main ()
19071{
19072struct dirent dp; dp.d_type = 0;
19073  ;
19074  return 0;
19075}
19076_ACEOF
19077if ac_fn_c_try_link "$LINENO"; then :
19078  gl_cv_struct_dirent_d_type=yes
19079else
19080  gl_cv_struct_dirent_d_type=no
19081fi
19082rm -f core conftest.err conftest.$ac_objext \
19083    conftest$ac_exeext conftest.$ac_ext
19084
19085
19086fi
19087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5
19088$as_echo "$gl_cv_struct_dirent_d_type" >&6; }
19089   if test $gl_cv_struct_dirent_d_type = yes; then
19090
19091$as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
19092
19093   fi
19094
19095
19096
19097
19098
19099
19100
19101
19102
19103
19104
19105
19106
19107
19108     if test $gl_cv_have_include_next = yes; then
19109       gl_cv_next_dirent_h='<'dirent.h'>'
19110     else
19111       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
19112$as_echo_n "checking absolute name of <dirent.h>... " >&6; }
19113if ${gl_cv_next_dirent_h+:} false; then :
19114  $as_echo_n "(cached) " >&6
19115else
19116
19117             if test $ac_cv_header_dirent_h = yes; then
19118
19119
19120
19121
19122  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19123/* end confdefs.h.  */
19124#include <dirent.h>
19125_ACEOF
19126                case "$host_os" in
19127    aix*) gl_absname_cpp="$ac_cpp -C" ;;
19128    *)    gl_absname_cpp="$ac_cpp" ;;
19129  esac
19130
19131  case "$host_os" in
19132    mingw*)
19133                                          gl_dirsep_regex='[/\\]'
19134      ;;
19135    *)
19136      gl_dirsep_regex='\/'
19137      ;;
19138  esac
19139      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19140  gl_header_literal_regex=`echo 'dirent.h' \
19141                           | sed -e "$gl_make_literal_regex_sed"`
19142  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19143      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19144      s|^/[^/]|//&|
19145      p
19146      q
19147    }'
19148
19149        gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19150  sed -n "$gl_absolute_header_sed"`
19151
19152           gl_header=$gl_cv_absolute_dirent_h
19153           gl_cv_next_dirent_h='"'$gl_header'"'
19154          else
19155               gl_cv_next_dirent_h='<'dirent.h'>'
19156             fi
19157
19158
19159fi
19160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
19161$as_echo "$gl_cv_next_dirent_h" >&6; }
19162     fi
19163     NEXT_DIRENT_H=$gl_cv_next_dirent_h
19164
19165     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19166       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19167       gl_next_as_first_directive='<'dirent.h'>'
19168     else
19169       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19170       gl_next_as_first_directive=$gl_cv_next_dirent_h
19171     fi
19172     NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
19173
19174
19175
19176
19177  if test $ac_cv_header_dirent_h = yes; then
19178    HAVE_DIRENT_H=1
19179  else
19180    HAVE_DIRENT_H=0
19181  fi
19182
19183
19184
19185
19186
19187
19188
19189
19190
19191
19192
19193  for ac_func in dirfd
19194do :
19195  ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
19196if test "x$ac_cv_func_dirfd" = xyes; then :
19197  cat >>confdefs.h <<_ACEOF
19198#define HAVE_DIRFD 1
19199_ACEOF
19200
19201fi
19202done
19203
19204  ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
19205      #include <dirent.h>
19206"
19207if test "x$ac_cv_have_decl_dirfd" = xyes; then :
19208  ac_have_decl=1
19209else
19210  ac_have_decl=0
19211fi
19212
19213cat >>confdefs.h <<_ACEOF
19214#define HAVE_DECL_DIRFD $ac_have_decl
19215_ACEOF
19216
19217  if test $ac_cv_have_decl_dirfd = no; then
19218    HAVE_DECL_DIRFD=0
19219  fi
19220
19221  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
19222$as_echo_n "checking whether dirfd is a macro... " >&6; }
19223if ${gl_cv_func_dirfd_macro+:} false; then :
19224  $as_echo_n "(cached) " >&6
19225else
19226  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19227/* end confdefs.h.  */
19228
19229#include <sys/types.h>
19230#include <dirent.h>
19231#ifdef dirfd
19232 dirent_header_defines_dirfd
19233#endif
19234_ACEOF
19235if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19236  $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
19237  gl_cv_func_dirfd_macro=yes
19238else
19239  gl_cv_func_dirfd_macro=no
19240fi
19241rm -f conftest*
19242
19243fi
19244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
19245$as_echo "$gl_cv_func_dirfd_macro" >&6; }
19246
19247  # Use the replacement if we have no function or macro with that name,
19248  # or if OS/2 kLIBC whose dirfd() does not work.
19249  # Replace only if the system declares dirfd already.
19250  case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
19251    no,no,*,yes | *,*,os2*,yes)
19252      REPLACE_DIRFD=1
19253
19254$as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
19255;;
19256  esac
19257
19258  if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
19259     || test $REPLACE_DIRFD = 1; then
19260
19261
19262
19263
19264
19265
19266
19267
19268  gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
19269
19270
19271  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
19272$as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
19273if ${gl_cv_sys_dir_fd_member_name+:} false; then :
19274  $as_echo_n "(cached) " >&6
19275else
19276
19277      dirfd_save_CFLAGS=$CFLAGS
19278      for ac_expr in d_fd dd_fd; do
19279
19280        CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
19281        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19282/* end confdefs.h.  */
19283
19284           #include <sys/types.h>
19285           #include <dirent.h>
19286int
19287main ()
19288{
19289DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
19290  ;
19291  return 0;
19292}
19293_ACEOF
19294if ac_fn_c_try_compile "$LINENO"; then :
19295  dir_fd_found=yes
19296
19297fi
19298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19299        CFLAGS=$dirfd_save_CFLAGS
19300        test "$dir_fd_found" = yes && break
19301      done
19302      test "$dir_fd_found" = yes || ac_expr=no_such_member
19303
19304      gl_cv_sys_dir_fd_member_name=$ac_expr
19305
19306
19307fi
19308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
19309$as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
19310  if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
19311
19312cat >>confdefs.h <<_ACEOF
19313#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
19314_ACEOF
19315
19316  fi
19317
19318
19319  fi
19320
19321
19322
19323
19324
19325          GNULIB_DIRFD=1
19326
19327
19328
19329
19330
19331$as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
19332
19333
19334
19335
19336
19337  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
19338$as_echo_n "checking whether // is distinct from /... " >&6; }
19339if ${gl_cv_double_slash_root+:} false; then :
19340  $as_echo_n "(cached) " >&6
19341else
19342   if test x"$cross_compiling" = xyes ; then
19343        # When cross-compiling, there is no way to tell whether // is special
19344        # short of a list of hosts.  However, the only known hosts to date
19345        # that have a distinct // are Apollo DomainOS (too old to port to),
19346        # Cygwin, and z/OS.  If anyone knows of another system for which // has
19347        # special semantics and is distinct from /, please report it to
19348        # <bug-gnulib@gnu.org>.
19349        case $host in
19350          *-cygwin | i370-ibm-openedition)
19351            gl_cv_double_slash_root=yes ;;
19352          *)
19353            # Be optimistic and assume that / and // are the same when we
19354            # don't know.
19355            gl_cv_double_slash_root='unknown, assuming no' ;;
19356        esac
19357      else
19358        set x `ls -di / // 2>/dev/null`
19359        if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
19360          gl_cv_double_slash_root=no
19361        else
19362          gl_cv_double_slash_root=yes
19363        fi
19364      fi
19365fi
19366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
19367$as_echo "$gl_cv_double_slash_root" >&6; }
19368  if test "$gl_cv_double_slash_root" = yes; then
19369
19370$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
19371
19372  fi
19373
19374
19375
19376
19377
19378    if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
19379      REPLACE_DUP=1
19380    fi
19381
19382
19383
19384
19385
19386  if test $ac_cv_func_fchdir = no; then
19387    HAVE_FCHDIR=0
19388  fi
19389
19390    if test $HAVE_FCHDIR = 0; then
19391      REPLACE_DUP=1
19392    fi
19393
19394  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
19395$as_echo_n "checking whether dup works... " >&6; }
19396if ${gl_cv_func_dup_works+:} false; then :
19397  $as_echo_n "(cached) " >&6
19398else
19399  if test "$cross_compiling" = yes; then :
19400  case "$host_os" in
19401                 # Guess no on native Windows.
19402         mingw*) gl_cv_func_dup_works="guessing no" ;;
19403         *)      gl_cv_func_dup_works="guessing yes" ;;
19404       esac
19405
19406else
19407  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19408/* end confdefs.h.  */
19409#include <unistd.h>
19410                         #include <fcntl.h>
19411                         #include <errno.h>
19412
19413
19414$gl_mda_defines
19415
19416int
19417main ()
19418{
19419/* On OS/2 kLIBC, dup does not work on a directory fd.  */
19420           int fd = open (".", O_RDONLY);
19421           return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
19422
19423  ;
19424  return 0;
19425}
19426
19427_ACEOF
19428if ac_fn_c_try_run "$LINENO"; then :
19429  gl_cv_func_dup_works=yes
19430else
19431  gl_cv_func_dup_works=no
19432fi
19433rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19434  conftest.$ac_objext conftest.beam conftest.$ac_ext
19435fi
19436
19437
19438fi
19439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
19440$as_echo "$gl_cv_func_dup_works" >&6; }
19441  case "$gl_cv_func_dup_works" in
19442    *yes) ;;
19443    *)
19444      REPLACE_DUP=1
19445      ;;
19446  esac
19447
19448  if test $REPLACE_DUP = 1; then
19449
19450
19451
19452
19453
19454
19455
19456
19457  gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
19458
19459    :
19460  fi
19461
19462
19463
19464
19465
19466          GNULIB_DUP=1
19467
19468
19469
19470
19471
19472$as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
19473
19474
19475
19476
19477
19478
19479  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
19480$as_echo_n "checking whether dup2 works... " >&6; }
19481if ${gl_cv_func_dup2_works+:} false; then :
19482  $as_echo_n "(cached) " >&6
19483else
19484  if test "$cross_compiling" = yes; then :
19485  case "$host_os" in
19486         mingw*) # on this platform, dup2 always returns 0 for success
19487           gl_cv_func_dup2_works="guessing no" ;;
19488         cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
19489           gl_cv_func_dup2_works="guessing no" ;;
19490         aix* | freebsd*)
19491                 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
19492                 # not EBADF.
19493           gl_cv_func_dup2_works="guessing no" ;;
19494         haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
19495           gl_cv_func_dup2_works="guessing no" ;;
19496         *-android*) # implemented using dup3(), which fails if oldfd == newfd
19497           gl_cv_func_dup2_works="guessing no" ;;
19498         os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
19499           gl_cv_func_dup2_works="guessing no" ;;
19500         *) gl_cv_func_dup2_works="guessing yes" ;;
19501       esac
19502else
19503  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19504/* end confdefs.h.  */
19505
19506       #include <errno.h>
19507           #include <fcntl.h>
19508           #include <limits.h>
19509           #include <sys/resource.h>
19510           #include <unistd.h>
19511
19512
19513$gl_mda_defines
19514
19515           #ifndef RLIM_SAVED_CUR
19516           # define RLIM_SAVED_CUR RLIM_INFINITY
19517           #endif
19518           #ifndef RLIM_SAVED_MAX
19519           # define RLIM_SAVED_MAX RLIM_INFINITY
19520           #endif
19521
19522int
19523main ()
19524{
19525int result = 0;
19526           int bad_fd = INT_MAX;
19527           struct rlimit rlim;
19528           if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
19529               && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
19530               && rlim.rlim_cur != RLIM_INFINITY
19531               && rlim.rlim_cur != RLIM_SAVED_MAX
19532               && rlim.rlim_cur != RLIM_SAVED_CUR)
19533             bad_fd = rlim.rlim_cur;
19534           #ifdef FD_CLOEXEC
19535             if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
19536               result |= 1;
19537           #endif
19538           if (dup2 (1, 1) != 1)
19539             result |= 2;
19540           #ifdef FD_CLOEXEC
19541             if (fcntl (1, F_GETFD) != FD_CLOEXEC)
19542               result |= 4;
19543           #endif
19544           close (0);
19545           if (dup2 (0, 0) != -1)
19546             result |= 8;
19547           /* Many gnulib modules require POSIX conformance of EBADF.  */
19548           if (dup2 (2, bad_fd) == -1 && errno != EBADF)
19549             result |= 16;
19550           /* Flush out some cygwin core dumps.  */
19551           if (dup2 (2, -1) != -1 || errno != EBADF)
19552             result |= 32;
19553           dup2 (2, 255);
19554           dup2 (2, 256);
19555           /* On OS/2 kLIBC, dup2() does not work on a directory fd.  */
19556           {
19557             int fd = open (".", O_RDONLY);
19558             if (fd == -1)
19559               result |= 64;
19560             else if (dup2 (fd, fd + 1) == -1)
19561               result |= 128;
19562             close (fd);
19563           }
19564           return result;
19565  ;
19566  return 0;
19567}
19568
19569_ACEOF
19570if ac_fn_c_try_run "$LINENO"; then :
19571  gl_cv_func_dup2_works=yes
19572else
19573  gl_cv_func_dup2_works=no
19574fi
19575rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19576  conftest.$ac_objext conftest.beam conftest.$ac_ext
19577fi
19578
19579
19580fi
19581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
19582$as_echo "$gl_cv_func_dup2_works" >&6; }
19583  case "$gl_cv_func_dup2_works" in
19584    *yes) ;;
19585    *)
19586      REPLACE_DUP2=1
19587      for ac_func in setdtablesize
19588do :
19589  ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
19590if test "x$ac_cv_func_setdtablesize" = xyes; then :
19591  cat >>confdefs.h <<_ACEOF
19592#define HAVE_SETDTABLESIZE 1
19593_ACEOF
19594
19595fi
19596done
19597
19598      ;;
19599  esac
19600
19601
19602
19603
19604  if test $ac_cv_func_fchdir = no; then
19605    HAVE_FCHDIR=0
19606  fi
19607
19608    if test $HAVE_FCHDIR = 0; then
19609      REPLACE_DUP2=1
19610    fi
19611
19612
19613  if test $REPLACE_DUP2 = 1; then
19614
19615
19616
19617
19618
19619
19620
19621
19622  gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
19623
19624
19625  fi
19626
19627
19628
19629
19630
19631          GNULIB_DUP2=1
19632
19633
19634
19635
19636
19637$as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
19638
19639
19640
19641
19642
19643
19644
19645
19646
19647          GNULIB_ENVIRON=1
19648
19649
19650
19651
19652
19653$as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
19654
19655
19656
19657
19658
19659      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
19660$as_echo_n "checking for error_at_line... " >&6; }
19661if ${ac_cv_lib_error_at_line+:} false; then :
19662  $as_echo_n "(cached) " >&6
19663else
19664  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19665/* end confdefs.h.  */
19666#include <error.h>
19667int
19668main ()
19669{
19670error_at_line (0, 0, "", 0, "an error occurred");
19671  ;
19672  return 0;
19673}
19674_ACEOF
19675if ac_fn_c_try_link "$LINENO"; then :
19676  ac_cv_lib_error_at_line=yes
19677else
19678  ac_cv_lib_error_at_line=no
19679fi
19680rm -f core conftest.err conftest.$ac_objext \
19681    conftest$ac_exeext conftest.$ac_ext
19682fi
19683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
19684$as_echo "$ac_cv_lib_error_at_line" >&6; }
19685
19686  if test $ac_cv_lib_error_at_line = no; then
19687
19688
19689
19690
19691
19692
19693
19694
19695  gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
19696
19697
19698
19699  :
19700
19701  fi
19702
19703
19704
19705
19706
19707
19708
19709  if test $ac_cv_have_decl_fchdir = no; then
19710    HAVE_DECL_FCHDIR=0
19711  fi
19712
19713
19714  if test $HAVE_FCHDIR = 0; then
19715
19716
19717
19718
19719
19720
19721
19722
19723  gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
19724
19725    :
19726
19727$as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
19728
19729                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
19730$as_echo_n "checking whether open can visit directories... " >&6; }
19731if ${gl_cv_func_open_directory_works+:} false; then :
19732  $as_echo_n "(cached) " >&6
19733else
19734  if test "$cross_compiling" = yes; then :
19735  case "$host_os" in
19736                             # Guess yes on Linux systems.
19737            linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;;
19738                             # Guess yes on glibc systems.
19739            *-gnu* | gnu*)   gl_cv_func_open_directory_works="guessing yes" ;;
19740                             # Guess no on native Windows.
19741            mingw*)          gl_cv_func_open_directory_works="guessing no" ;;
19742                             # If we don't know, obey --enable-cross-guesses.
19743            *)               gl_cv_func_open_directory_works="$gl_cross_guess_normal" ;;
19744          esac
19745
19746else
19747  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19748/* end confdefs.h.  */
19749#include <fcntl.h>
19750
19751
19752$gl_mda_defines
19753
19754int
19755main ()
19756{
19757return open(".", O_RDONLY) < 0;
19758  ;
19759  return 0;
19760}
19761_ACEOF
19762if ac_fn_c_try_run "$LINENO"; then :
19763  gl_cv_func_open_directory_works=yes
19764else
19765  gl_cv_func_open_directory_works=no
19766fi
19767rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19768  conftest.$ac_objext conftest.beam conftest.$ac_ext
19769fi
19770
19771fi
19772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
19773$as_echo "$gl_cv_func_open_directory_works" >&6; }
19774    case "$gl_cv_func_open_directory_works" in
19775      *yes) ;;
19776      *)
19777
19778$as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
19779
19780        ;;
19781    esac
19782  fi
19783
19784
19785
19786
19787
19788
19789          GNULIB_FCHDIR=1
19790
19791
19792
19793
19794
19795$as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
19796
19797
19798
19799
19800
19801
19802
19803
19804  if test $ac_cv_func_fcntl = no; then
19805
19806
19807
19808  if test $ac_cv_func_fcntl = no; then
19809    HAVE_FCNTL=0
19810  else
19811    REPLACE_FCNTL=1
19812  fi
19813
19814  else
19815            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
19816$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
19817if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
19818  $as_echo_n "(cached) " >&6
19819else
19820  if test "$cross_compiling" = yes; then :
19821  case $host_os in
19822            aix* | cygwin* | haiku*)
19823               gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
19824            *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
19825          esac
19826else
19827  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19828/* end confdefs.h.  */
19829#include <errno.h>
19830              #include <fcntl.h>
19831              #include <limits.h>
19832              #include <sys/resource.h>
19833              #include <unistd.h>
19834
19835
19836$gl_mda_defines
19837
19838              #ifndef RLIM_SAVED_CUR
19839              # define RLIM_SAVED_CUR RLIM_INFINITY
19840              #endif
19841              #ifndef RLIM_SAVED_MAX
19842              # define RLIM_SAVED_MAX RLIM_INFINITY
19843              #endif
19844
19845int
19846main ()
19847{
19848int result = 0;
19849              int bad_fd = INT_MAX;
19850              struct rlimit rlim;
19851              if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
19852                  && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
19853                  && rlim.rlim_cur != RLIM_INFINITY
19854                  && rlim.rlim_cur != RLIM_SAVED_MAX
19855                  && rlim.rlim_cur != RLIM_SAVED_CUR)
19856                bad_fd = rlim.rlim_cur;
19857              if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
19858              if (errno != EINVAL) result |= 2;
19859              if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
19860              if (errno != EINVAL) result |= 8;
19861              /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
19862              {
19863                int fd;
19864                fd = open (".", O_RDONLY);
19865                if (fd == -1)
19866                  result |= 16;
19867                else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
19868                  result |= 32;
19869
19870                close (fd);
19871              }
19872              return result;
19873  ;
19874  return 0;
19875}
19876_ACEOF
19877if ac_fn_c_try_run "$LINENO"; then :
19878  gl_cv_func_fcntl_f_dupfd_works=yes
19879else
19880  gl_cv_func_fcntl_f_dupfd_works=no
19881fi
19882rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19883  conftest.$ac_objext conftest.beam conftest.$ac_ext
19884fi
19885
19886fi
19887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
19888$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
19889    case $gl_cv_func_fcntl_f_dupfd_works in
19890      *yes) ;;
19891      *)
19892
19893
19894  if test $ac_cv_func_fcntl = no; then
19895    HAVE_FCNTL=0
19896  else
19897    REPLACE_FCNTL=1
19898  fi
19899
19900
19901$as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
19902 ;;
19903    esac
19904
19905            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
19906$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
19907if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
19908  $as_echo_n "(cached) " >&6
19909else
19910  if test "$cross_compiling" = yes; then :
19911  case "$host_os" in
19912                     # Guess no on NetBSD.
19913            netbsd*) gl_cv_func_fcntl_f_dupfd_cloexec="guessing no" ;;
19914            *)       gl_cv_func_fcntl_f_dupfd_cloexec="$gl_cross_guess_normal" ;;
19915          esac
19916
19917else
19918  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19919/* end confdefs.h.  */
19920#include <fcntl.h>
19921              #include <unistd.h>
19922              int main (int argc, char *argv[])
19923              {
19924                if (argc == 1)
19925                  /* parent process */
19926                  {
19927                    if (fcntl (1, F_DUPFD_CLOEXEC, 10) < 0)
19928                      return 1;
19929                    return execl ("./conftest", "./conftest", "child", NULL);
19930                  }
19931                else
19932                  /* child process */
19933                  return (fcntl (10, F_GETFL) < 0 ? 0 : 42);
19934              }
19935
19936
19937_ACEOF
19938if ac_fn_c_try_run "$LINENO"; then :
19939  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19940/* end confdefs.h.  */
19941
19942#ifdef __linux__
19943/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
19944   it to support the semantics on older kernels that failed with EINVAL.  */
19945choke me
19946#endif
19947
19948int
19949main ()
19950{
19951
19952  ;
19953  return 0;
19954}
19955_ACEOF
19956if ac_fn_c_try_compile "$LINENO"; then :
19957  gl_cv_func_fcntl_f_dupfd_cloexec=yes
19958else
19959  gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
19960fi
19961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19962
19963else
19964  gl_cv_func_fcntl_f_dupfd_cloexec=no
19965fi
19966rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19967  conftest.$ac_objext conftest.beam conftest.$ac_ext
19968fi
19969
19970
19971fi
19972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
19973$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
19974    case "$gl_cv_func_fcntl_f_dupfd_cloexec" in
19975      *yes) ;;
19976      *)
19977
19978
19979  if test $ac_cv_func_fcntl = no; then
19980    HAVE_FCNTL=0
19981  else
19982    REPLACE_FCNTL=1
19983  fi
19984
19985                        ;;
19986    esac
19987  fi
19988
19989
19990
19991
19992  if test $ac_cv_func_fchdir = no; then
19993    HAVE_FCHDIR=0
19994  fi
19995
19996    if test $HAVE_FCHDIR = 0; then
19997
19998
19999
20000  if test $ac_cv_func_fcntl = no; then
20001    HAVE_FCNTL=0
20002  else
20003    REPLACE_FCNTL=1
20004  fi
20005
20006    fi
20007
20008
20009  if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
20010
20011
20012
20013
20014
20015
20016
20017
20018  gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
20019
20020  fi
20021
20022
20023
20024
20025
20026          GNULIB_FCNTL=1
20027
20028
20029
20030
20031
20032$as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
20033
20034
20035
20036
20037
20038
20039
20040
20041
20042
20043
20044
20045
20046
20047     if test $gl_cv_have_include_next = yes; then
20048       gl_cv_next_fcntl_h='<'fcntl.h'>'
20049     else
20050       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
20051$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
20052if ${gl_cv_next_fcntl_h+:} false; then :
20053  $as_echo_n "(cached) " >&6
20054else
20055
20056
20057
20058  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20059/* end confdefs.h.  */
20060#include <fcntl.h>
20061_ACEOF
20062                case "$host_os" in
20063    aix*) gl_absname_cpp="$ac_cpp -C" ;;
20064    *)    gl_absname_cpp="$ac_cpp" ;;
20065  esac
20066
20067  case "$host_os" in
20068    mingw*)
20069                                          gl_dirsep_regex='[/\\]'
20070      ;;
20071    *)
20072      gl_dirsep_regex='\/'
20073      ;;
20074  esac
20075      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20076  gl_header_literal_regex=`echo 'fcntl.h' \
20077                           | sed -e "$gl_make_literal_regex_sed"`
20078  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20079      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20080      s|^/[^/]|//&|
20081      p
20082      q
20083    }'
20084
20085        gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20086  sed -n "$gl_absolute_header_sed"`
20087
20088           gl_header=$gl_cv_absolute_fcntl_h
20089           gl_cv_next_fcntl_h='"'$gl_header'"'
20090
20091
20092fi
20093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
20094$as_echo "$gl_cv_next_fcntl_h" >&6; }
20095     fi
20096     NEXT_FCNTL_H=$gl_cv_next_fcntl_h
20097
20098     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20099       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20100       gl_next_as_first_directive='<'fcntl.h'>'
20101     else
20102       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20103       gl_next_as_first_directive=$gl_cv_next_fcntl_h
20104     fi
20105     NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
20106
20107
20108
20109
20110
20111
20112
20113
20114
20115
20116
20117
20118
20119
20120
20121cat >>confdefs.h <<_ACEOF
20122#define GNULIB_FD_SAFER_FLAG 1
20123_ACEOF
20124
20125
20126
20127
20128
20129
20130
20131    ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
20132#include <dirent.h>
20133
20134"
20135if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
20136  ac_have_decl=1
20137else
20138  ac_have_decl=0
20139fi
20140
20141cat >>confdefs.h <<_ACEOF
20142#define HAVE_DECL_FDOPENDIR $ac_have_decl
20143_ACEOF
20144if test $ac_have_decl = 1; then :
20145
20146else
20147  HAVE_DECL_FDOPENDIR=0
20148fi
20149
20150
20151  if test $ac_cv_func_fdopendir = no; then
20152    HAVE_FDOPENDIR=0
20153  else
20154    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
20155$as_echo_n "checking whether fdopendir works... " >&6; }
20156if ${gl_cv_func_fdopendir_works+:} false; then :
20157  $as_echo_n "(cached) " >&6
20158else
20159  if test "$cross_compiling" = yes; then :
20160  case "$host_os" in
20161                     # Guess yes on glibc systems.
20162            *-gnu*)  gl_cv_func_fdopendir_works="guessing yes" ;;
20163                     # Guess yes on musl systems.
20164            *-musl*) gl_cv_func_fdopendir_works="guessing yes" ;;
20165                     # If we don't know, obey --enable-cross-guesses.
20166            *)       gl_cv_func_fdopendir_works="$gl_cross_guess_normal" ;;
20167          esac
20168
20169else
20170  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20171/* end confdefs.h.  */
20172
20173#include <dirent.h>
20174#include <fcntl.h>
20175#include <unistd.h>
20176
20177
20178$gl_mda_defines
20179
20180#if !HAVE_DECL_FDOPENDIR
20181extern
20182# ifdef __cplusplus
20183"C"
20184# endif
20185DIR *fdopendir (int);
20186#endif
20187
20188int
20189main ()
20190{
20191int result = 0;
20192              int fd = open ("conftest.c", O_RDONLY);
20193              if (fd < 0) result |= 1;
20194              if (fdopendir (fd)) result |= 2;
20195              if (close (fd)) result |= 4;
20196              return result;
20197
20198  ;
20199  return 0;
20200}
20201_ACEOF
20202if ac_fn_c_try_run "$LINENO"; then :
20203  gl_cv_func_fdopendir_works=yes
20204else
20205  gl_cv_func_fdopendir_works=no
20206fi
20207rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20208  conftest.$ac_objext conftest.beam conftest.$ac_ext
20209fi
20210
20211fi
20212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
20213$as_echo "$gl_cv_func_fdopendir_works" >&6; }
20214    case "$gl_cv_func_fdopendir_works" in
20215      *yes) ;;
20216      *)
20217        REPLACE_FDOPENDIR=1
20218        ;;
20219    esac
20220  fi
20221
20222  if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
20223
20224
20225
20226
20227
20228
20229
20230
20231  gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
20232
20233  fi
20234
20235
20236
20237
20238
20239          GNULIB_FDOPENDIR=1
20240
20241
20242
20243
20244
20245$as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
20246
20247
20248
20249
20250
20251cat >>confdefs.h <<_ACEOF
20252#define GNULIB_FDOPENDIR 1
20253_ACEOF
20254
20255
20256
20257
20258
20259            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ffs" >&5
20260$as_echo_n "checking for ffs... " >&6; }
20261if ${gl_cv_func_ffs+:} false; then :
20262  $as_echo_n "(cached) " >&6
20263else
20264  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20265/* end confdefs.h.  */
20266#include <strings.h>
20267            int x;
20268
20269int
20270main ()
20271{
20272int (*func) (int) = ffs;
20273            return func (x);
20274
20275  ;
20276  return 0;
20277}
20278
20279_ACEOF
20280if ac_fn_c_try_link "$LINENO"; then :
20281  gl_cv_func_ffs=yes
20282else
20283  gl_cv_func_ffs=no
20284fi
20285rm -f core conftest.err conftest.$ac_objext \
20286    conftest$ac_exeext conftest.$ac_ext
20287
20288fi
20289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ffs" >&5
20290$as_echo "$gl_cv_func_ffs" >&6; }
20291  if test $gl_cv_func_ffs = no; then
20292    HAVE_FFS=0
20293  fi
20294
20295  if test $HAVE_FFS = 0; then
20296
20297
20298
20299
20300
20301
20302
20303
20304  gl_LIBOBJS="$gl_LIBOBJS ffs.$ac_objext"
20305
20306  fi
20307
20308
20309
20310
20311
20312          GNULIB_FFS=1
20313
20314
20315
20316
20317
20318
20319
20320
20321  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
20322$as_echo_n "checking for flexible array member... " >&6; }
20323if ${ac_cv_c_flexmember+:} false; then :
20324  $as_echo_n "(cached) " >&6
20325else
20326  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20327/* end confdefs.h.  */
20328#include <stdlib.h>
20329            #include <stdio.h>
20330            #include <stddef.h>
20331            struct m { struct m *next, **list; char name[]; };
20332            struct s { struct s *p; struct m *m; int n; double d[]; };
20333int
20334main ()
20335{
20336int m = getchar ();
20337            size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
20338            nbytes += sizeof (struct s) - 1;
20339            nbytes -= nbytes % sizeof (struct s);
20340            struct s *p = malloc (nbytes);
20341            p->p = p;
20342            p->m = NULL;
20343            p->d[0] = 0.0;
20344            return p->d != (double *) NULL;
20345  ;
20346  return 0;
20347}
20348_ACEOF
20349if ac_fn_c_try_compile "$LINENO"; then :
20350  ac_cv_c_flexmember=yes
20351else
20352  ac_cv_c_flexmember=no
20353fi
20354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20355fi
20356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
20357$as_echo "$ac_cv_c_flexmember" >&6; }
20358  if test $ac_cv_c_flexmember = yes; then
20359
20360$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
20361
20362  else
20363    $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
20364
20365  fi
20366
20367
20368
20369
20370  FLOAT_H=
20371  REPLACE_FLOAT_LDBL=0
20372  case "$host_os" in
20373    aix* | beos* | openbsd* | mirbsd* | irix*)
20374      FLOAT_H=float.h
20375      ;;
20376    freebsd* | dragonfly*)
20377      case "$host_cpu" in
20378        i[34567]86 )
20379          FLOAT_H=float.h
20380          ;;
20381        x86_64 )
20382          # On x86_64 systems, the C compiler may still be generating
20383          # 32-bit code.
20384          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20385/* end confdefs.h.  */
20386#if defined __LP64__ || defined __x86_64__ || defined __amd64__
20387                  int ok;
20388                 #else
20389                  error fail
20390                 #endif
20391
20392_ACEOF
20393if ac_fn_c_try_compile "$LINENO"; then :
20394
20395else
20396  FLOAT_H=float.h
20397fi
20398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20399          ;;
20400      esac
20401      ;;
20402    linux*)
20403      case "$host_cpu" in
20404        powerpc*)
20405          FLOAT_H=float.h
20406          ;;
20407      esac
20408      ;;
20409  esac
20410  case "$host_os" in
20411    aix* | freebsd* | dragonfly* | linux*)
20412      if test -n "$FLOAT_H"; then
20413        REPLACE_FLOAT_LDBL=1
20414      fi
20415      ;;
20416  esac
20417
20418    REPLACE_ITOLD=0
20419  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
20420$as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
20421if ${gl_cv_func_itold_works+:} false; then :
20422  $as_echo_n "(cached) " >&6
20423else
20424
20425      if test "$cross_compiling" = yes; then :
20426  case "$host" in
20427           sparc*-*-linux*)
20428             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20429/* end confdefs.h.  */
20430#if defined __LP64__ || defined __arch64__
20431                    int ok;
20432                   #else
20433                    error fail
20434                   #endif
20435
20436_ACEOF
20437if ac_fn_c_try_compile "$LINENO"; then :
20438  gl_cv_func_itold_works="guessing no"
20439else
20440  gl_cv_func_itold_works="guessing yes"
20441fi
20442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20443             ;;
20444                   # Guess yes on native Windows.
20445           mingw*) gl_cv_func_itold_works="guessing yes" ;;
20446           *)      gl_cv_func_itold_works="guessing yes" ;;
20447         esac
20448
20449else
20450  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20451/* end confdefs.h.  */
20452
20453int i = -1;
20454volatile long double ld;
20455int main ()
20456{
20457  ld += i * 1.0L;
20458  if (ld > 0)
20459    return 1;
20460  return 0;
20461}
20462_ACEOF
20463if ac_fn_c_try_run "$LINENO"; then :
20464  gl_cv_func_itold_works=yes
20465else
20466  gl_cv_func_itold_works=no
20467fi
20468rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20469  conftest.$ac_objext conftest.beam conftest.$ac_ext
20470fi
20471
20472
20473fi
20474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
20475$as_echo "$gl_cv_func_itold_works" >&6; }
20476  case "$gl_cv_func_itold_works" in
20477    *no)
20478      REPLACE_ITOLD=1
20479                  FLOAT_H=float.h
20480      ;;
20481  esac
20482
20483  if test -n "$FLOAT_H"; then
20484
20485
20486
20487
20488
20489
20490
20491
20492     if test $gl_cv_have_include_next = yes; then
20493       gl_cv_next_float_h='<'float.h'>'
20494     else
20495       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
20496$as_echo_n "checking absolute name of <float.h>... " >&6; }
20497if ${gl_cv_next_float_h+:} false; then :
20498  $as_echo_n "(cached) " >&6
20499else
20500
20501
20502
20503  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20504/* end confdefs.h.  */
20505#include <float.h>
20506_ACEOF
20507                case "$host_os" in
20508    aix*) gl_absname_cpp="$ac_cpp -C" ;;
20509    *)    gl_absname_cpp="$ac_cpp" ;;
20510  esac
20511
20512  case "$host_os" in
20513    mingw*)
20514                                          gl_dirsep_regex='[/\\]'
20515      ;;
20516    *)
20517      gl_dirsep_regex='\/'
20518      ;;
20519  esac
20520      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20521  gl_header_literal_regex=`echo 'float.h' \
20522                           | sed -e "$gl_make_literal_regex_sed"`
20523  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20524      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20525      s|^/[^/]|//&|
20526      p
20527      q
20528    }'
20529
20530        gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20531  sed -n "$gl_absolute_header_sed"`
20532
20533           gl_header=$gl_cv_absolute_float_h
20534           gl_cv_next_float_h='"'$gl_header'"'
20535
20536
20537fi
20538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
20539$as_echo "$gl_cv_next_float_h" >&6; }
20540     fi
20541     NEXT_FLOAT_H=$gl_cv_next_float_h
20542
20543     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20544       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20545       gl_next_as_first_directive='<'float.h'>'
20546     else
20547       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20548       gl_next_as_first_directive=$gl_cv_next_float_h
20549     fi
20550     NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
20551
20552
20553
20554
20555  fi
20556
20557   if test -n "$FLOAT_H"; then
20558  GL_GENERATE_FLOAT_H_TRUE=
20559  GL_GENERATE_FLOAT_H_FALSE='#'
20560else
20561  GL_GENERATE_FLOAT_H_TRUE='#'
20562  GL_GENERATE_FLOAT_H_FALSE=
20563fi
20564
20565
20566
20567  if test $REPLACE_FLOAT_LDBL = 1; then
20568
20569
20570
20571
20572
20573
20574
20575
20576  gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
20577
20578  fi
20579  if test $REPLACE_ITOLD = 1; then
20580
20581
20582
20583
20584
20585
20586
20587
20588  gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
20589
20590  fi
20591
20592
20593
20594
20595     gl_fnmatch_required_lowercase=`
20596    echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
20597  `
20598
20599  if test $ac_cv_func_fnmatch = no; then
20600    HAVE_FNMATCH=0
20601  else
20602    gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
20603    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
20604$as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
20605if eval \${$gl_fnmatch_cache_var+:} false; then :
20606  $as_echo_n "(cached) " >&6
20607else
20608                                     if test $gl_fnmatch_required = GNU; then
20609         gl_fnmatch_gnu_start=
20610         gl_fnmatch_gnu_end=
20611       else
20612         gl_fnmatch_gnu_start='#if 0'
20613         gl_fnmatch_gnu_end='#endif'
20614       fi
20615       if test "$cross_compiling" = yes; then :
20616  case "$host_os" in
20617                     # Guess yes on musl systems.
20618            *-musl*) eval "$gl_fnmatch_cache_var=\"guessing yes\"" ;;
20619                     # Guess no otherwise, even on glibc systems.
20620            *)       eval "$gl_fnmatch_cache_var=\"guessing no\"" ;;
20621          esac
20622
20623else
20624  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20625/* end confdefs.h.  */
20626#include <fnmatch.h>
20627              static int
20628              y (char const *pattern, char const *string, int flags)
20629              {
20630                return fnmatch (pattern, string, flags) == 0;
20631              }
20632              static int
20633              n (char const *pattern, char const *string, int flags)
20634              {
20635                return fnmatch (pattern, string, flags) == FNM_NOMATCH;
20636              }
20637
20638int
20639main ()
20640{
20641char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
20642              char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
20643              static char const A_1[] = { 'A' - 1, 0 };
20644              static char const A01[] = { 'A' + 1, 0 };
20645              static char const a_1[] = { 'a' - 1, 0 };
20646              static char const a01[] = { 'a' + 1, 0 };
20647              static char const bs_1[] = { '\\\\' - 1, 0 };
20648              static char const bs01[] = { '\\\\' + 1, 0 };
20649              int result = 0;
20650              if (!n ("a*", "", 0))
20651                return 1;
20652              if (!y ("a*", "abc", 0))
20653                return 1;
20654              if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
20655                return 1;
20656              if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
20657                return 2;
20658              if (!y ("a\\\\bc", "abc", 0))
20659                return 3;
20660              if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
20661                return 3;
20662              if (!y ("*x", ".x", 0))
20663                return 4;
20664              if (!n ("*x", ".x", FNM_PERIOD))
20665                return 4;
20666              if (!y (Apat, "\\\\", 0))
20667                return 5;
20668              if (!y (Apat, "A", 0))
20669                return 5;
20670              if (!y (apat, "\\\\", 0))
20671                return 5;
20672              if (!y (apat, "a", 0))
20673                return 5;
20674              if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
20675                return 5;
20676              if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
20677                return 5;
20678              if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
20679                return 5;
20680              if (!(y (apat, a01, 0) == ('a' < '\\\\')))
20681                return 5;
20682              if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
20683                return 5;
20684              if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
20685                return 5;
20686              if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
20687                return 5;
20688              if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
20689                return 5;
20690              $gl_fnmatch_gnu_start
20691              if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
20692                result |= 8;
20693              if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
20694                result |= 16;
20695              if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
20696                result |= 32;
20697              if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
20698                result |= 64;
20699              if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
20700                result |= 64;
20701              if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
20702                result |= 64;
20703              $gl_fnmatch_gnu_end
20704              return result;
20705
20706  ;
20707  return 0;
20708}
20709_ACEOF
20710if ac_fn_c_try_run "$LINENO"; then :
20711  eval "$gl_fnmatch_cache_var=yes"
20712else
20713  eval "$gl_fnmatch_cache_var=no"
20714fi
20715rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20716  conftest.$ac_objext conftest.beam conftest.$ac_ext
20717fi
20718
20719
20720fi
20721eval ac_res=\$$gl_fnmatch_cache_var
20722	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20723$as_echo "$ac_res" >&6; }
20724    eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
20725    case "$gl_fnmatch_result" in
20726      *yes) ;;
20727      *) REPLACE_FNMATCH=1 ;;
20728    esac
20729  fi
20730  if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
20731
20732
20733  FNMATCH_H='fnmatch.h'
20734   if test -n "$FNMATCH_H"; then
20735  GL_GENERATE_FNMATCH_H_TRUE=
20736  GL_GENERATE_FNMATCH_H_FALSE='#'
20737else
20738  GL_GENERATE_FNMATCH_H_TRUE='#'
20739  GL_GENERATE_FNMATCH_H_FALSE=
20740fi
20741
20742
20743  fi
20744
20745  if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
20746
20747
20748
20749
20750
20751
20752
20753
20754  gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
20755
20756
20757
20758
20759
20760  fi
20761
20762
20763
20764
20765
20766          GNULIB_FNMATCH=1
20767
20768
20769
20770
20771
20772$as_echo "#define GNULIB_TEST_FNMATCH 1" >>confdefs.h
20773
20774
20775
20776
20777
20778
20779
20780
20781  if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
20782
20783
20784
20785
20786
20787
20788
20789
20790  gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
20791
20792
20793
20794
20795
20796  fi
20797
20798
20799cat >>confdefs.h <<_ACEOF
20800#define GNULIB_FNMATCH_GNU 1
20801_ACEOF
20802
20803
20804
20805
20806
20807
20808                          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether free is known to preserve errno" >&5
20809$as_echo_n "checking whether free is known to preserve errno... " >&6; }
20810if ${gl_cv_func_free_preserves_errno+:} false; then :
20811  $as_echo_n "(cached) " >&6
20812else
20813  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20814/* end confdefs.h.  */
20815#include <stdlib.h>
20816
20817int
20818main ()
20819{
20820#if 2 < __GLIBC__ + (33 <= __GLIBC_MINOR__)
20821            #elif defined __OpenBSD__
20822            #elif defined __sun
20823            #else
20824              #error "'free' is not known to preserve errno"
20825            #endif
20826
20827  ;
20828  return 0;
20829}
20830_ACEOF
20831if ac_fn_c_try_compile "$LINENO"; then :
20832  gl_cv_func_free_preserves_errno=yes
20833else
20834  gl_cv_func_free_preserves_errno=no
20835fi
20836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20837
20838fi
20839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_free_preserves_errno" >&5
20840$as_echo "$gl_cv_func_free_preserves_errno" >&6; }
20841
20842  case $gl_cv_func_free_preserves_errno in
20843   *yes) ;;
20844   *) REPLACE_FREE=1 ;;
20845  esac
20846
20847  if test $REPLACE_FREE = 1; then
20848
20849
20850
20851
20852
20853
20854
20855
20856  gl_LIBOBJS="$gl_LIBOBJS free.$ac_objext"
20857
20858    :
20859  fi
20860
20861
20862
20863
20864
20865          GNULIB_FREE_POSIX=1
20866
20867
20868
20869
20870
20871$as_echo "#define GNULIB_TEST_FREE_POSIX 1" >>confdefs.h
20872
20873
20874
20875
20876  if test $gl_func_frexp != yes; then
20877
20878
20879
20880
20881
20882
20883
20884
20885  gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
20886
20887  fi
20888
20889
20890
20891
20892
20893          GNULIB_FREXP=1
20894
20895
20896
20897
20898
20899$as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
20900
20901
20902
20903
20904  if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
20905
20906
20907
20908
20909
20910
20911
20912
20913  gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
20914
20915  fi
20916
20917
20918
20919
20920
20921          GNULIB_FREXPL=1
20922
20923
20924
20925
20926
20927$as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
20928
20929
20930
20931
20932
20933
20934
20935  case "$host_os" in
20936    mingw* | solaris*)
20937                        REPLACE_FSTAT=1
20938      ;;
20939  esac
20940
20941
20942
20943
20944
20945  if test $ac_cv_func_fchdir = no; then
20946    HAVE_FCHDIR=0
20947  fi
20948
20949    if test $HAVE_FCHDIR = 0; then
20950      case "$gl_cv_func_open_directory_works" in
20951        *yes) ;;
20952        *)
20953          REPLACE_FSTAT=1
20954          ;;
20955      esac
20956    fi
20957
20958
20959  if test $REPLACE_FSTAT = 1; then
20960
20961
20962
20963
20964
20965
20966
20967
20968  gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
20969
20970    case "$host_os" in
20971      mingw*)
20972
20973
20974
20975
20976
20977
20978
20979
20980  gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
20981
20982        ;;
20983    esac
20984
20985
20986
20987  :
20988
20989  fi
20990
20991
20992
20993
20994
20995          GNULIB_FSTAT=1
20996
20997
20998
20999
21000
21001$as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
21002
21003
21004
21005
21006
21007
21008
21009
21010
21011
21012  if test $ac_cv_func_fstatat = no; then
21013    HAVE_FSTATAT=0
21014  else
21015            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
21016$as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
21017if ${gl_cv_func_fstatat_zero_flag+:} false; then :
21018  $as_echo_n "(cached) " >&6
21019else
21020  if test "$cross_compiling" = yes; then :
21021  case "$host_os" in
21022            aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
21023            *)    gl_cv_func_fstatat_zero_flag="guessing yes";;
21024          esac
21025
21026else
21027  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21028/* end confdefs.h.  */
21029
21030              #include <fcntl.h>
21031              #include <sys/stat.h>
21032              int
21033              main (void)
21034              {
21035                struct stat a;
21036                return fstatat (AT_FDCWD, ".", &a, 0) != 0;
21037              }
21038
21039_ACEOF
21040if ac_fn_c_try_run "$LINENO"; then :
21041  gl_cv_func_fstatat_zero_flag=yes
21042else
21043  gl_cv_func_fstatat_zero_flag=no
21044fi
21045rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21046  conftest.$ac_objext conftest.beam conftest.$ac_ext
21047fi
21048
21049
21050fi
21051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
21052$as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
21053
21054    case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
21055    *yes+*yes) ;;
21056    *) REPLACE_FSTATAT=1 ;;
21057    esac
21058
21059    case $host_os in
21060      solaris*)
21061        REPLACE_FSTATAT=1 ;;
21062    esac
21063
21064    case $REPLACE_FSTATAT,$gl_cv_func_fstatat_zero_flag in
21065      1,*yes)
21066
21067$as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
21068
21069         ;;
21070    esac
21071  fi
21072
21073  if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
21074
21075
21076
21077
21078
21079
21080
21081
21082  gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
21083
21084  fi
21085
21086
21087
21088
21089
21090          GNULIB_FSTATAT=1
21091
21092
21093
21094
21095
21096$as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
21097
21098
21099
21100
21101
21102
21103
21104
21105  gl_abort_bug=no
21106  case "$host_os" in
21107    mingw*)
21108      gl_cv_func_getcwd_path_max=yes
21109      ;;
21110    *)
21111
21112
21113
21114
21115
21116  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
21117$as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
21118if ${gl_cv_func_getcwd_path_max+:} false; then :
21119  $as_echo_n "(cached) " >&6
21120else
21121  # Arrange for deletion of the temporary directory this test creates.
21122     ac_clean_files="$ac_clean_files confdir3"
21123          if test "$cross_compiling" = yes; then :
21124  # Cross-compilation guesses:
21125        case "$host_os" in
21126          aix*) # On AIX, it has the AIX bug.
21127            gl_cv_func_getcwd_path_max='guessing no, it has the AIX bug' ;;
21128          gnu*) # On Hurd, it is 'yes'.
21129            gl_cv_func_getcwd_path_max='guessing yes' ;;
21130          linux* | kfreebsd*)
21131            # On older Linux+glibc it's 'no, but it is partly working',
21132            # on newer Linux+glibc it's 'yes'.
21133            # On Linux+musl libc, it's 'no, but it is partly working'.
21134            # On kFreeBSD+glibc, it's 'no, but it is partly working'.
21135            gl_cv_func_getcwd_path_max='guessing no, but it is partly working' ;;
21136          *) # If we don't know, obey --enable-cross-guesses.
21137            gl_cv_func_getcwd_path_max="$gl_cross_guess_normal" ;;
21138        esac
21139
21140else
21141  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21142/* end confdefs.h.  */
21143
21144#include <errno.h>
21145#include <stdlib.h>
21146#if HAVE_UNISTD_H
21147# include <unistd.h>
21148#else
21149# include <direct.h>
21150#endif
21151#include <string.h>
21152#include <limits.h>
21153#include <sys/stat.h>
21154#include <sys/types.h>
21155#include <fcntl.h>
21156
21157
21158/* Arrange to define PATH_MAX, like "pathmax.h" does. */
21159#if HAVE_UNISTD_H
21160# include <unistd.h>
21161#endif
21162#include <limits.h>
21163#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
21164# include <sys/param.h>
21165#endif
21166#if !defined PATH_MAX && defined MAXPATHLEN
21167# define PATH_MAX MAXPATHLEN
21168#endif
21169#ifdef __hpux
21170# undef PATH_MAX
21171# define PATH_MAX 1024
21172#endif
21173#if defined _WIN32 && ! defined __CYGWIN__
21174# undef PATH_MAX
21175# define PATH_MAX 260
21176#endif
21177
21178
21179#ifndef AT_FDCWD
21180# define AT_FDCWD 0
21181#endif
21182#ifdef ENAMETOOLONG
21183# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
21184#else
21185# define is_ENAMETOOLONG(x) 0
21186#endif
21187
21188/* Use the getcwd function, not any macro.  */
21189#undef getcwd
21190
21191
21192
21193$gl_mda_defines
21194
21195
21196#ifndef S_IRWXU
21197# define S_IRWXU 0700
21198#endif
21199
21200/* The length of this name must be 8.  */
21201#define DIR_NAME "confdir3"
21202#define DIR_NAME_LEN 8
21203#define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
21204
21205/* The length of "../".  */
21206#define DOTDOTSLASH_LEN 3
21207
21208/* Leftover bytes in the buffer, to work around library or OS bugs.  */
21209#define BUF_SLOP 20
21210
21211int
21212main ()
21213{
21214#ifndef PATH_MAX
21215  /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
21216     at least not on a local file system.  And if we were to start worrying
21217     about remote file systems, we'd have to enable the wrapper function
21218     all of the time, just to be safe.  That's not worth the cost.  */
21219  exit (0);
21220#elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
21221        - DIR_NAME_SIZE - BUF_SLOP) \
21222       <= PATH_MAX)
21223  /* FIXME: Assuming there's a system for which this is true,
21224     this should be done in a compile test.  */
21225  exit (0);
21226#else
21227  char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
21228           + DIR_NAME_SIZE + BUF_SLOP];
21229  char *cwd = getcwd (buf, PATH_MAX);
21230  size_t initial_cwd_len;
21231  size_t cwd_len;
21232  int fail = 0;
21233  size_t n_chdirs = 0;
21234
21235  if (cwd == NULL)
21236    exit (10);
21237
21238  cwd_len = initial_cwd_len = strlen (cwd);
21239
21240  while (1)
21241    {
21242      size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
21243      char *c = NULL;
21244
21245      cwd_len += DIR_NAME_SIZE;
21246      /* If mkdir or chdir fails, it could be that this system cannot create
21247         any file with an absolute name longer than PATH_MAX, such as cygwin.
21248         If so, leave fail as 0, because the current working directory can't
21249         be too long for getcwd if it can't even be created.  On Linux with
21250         the 9p file system, mkdir fails with error EINVAL when cwd_len gets
21251         too long; ignore this failure because the getcwd() system call
21252         produces good results whereas the gnulib substitute calls getdents64
21253         which fails with error EPROTO.
21254         For other errors, be pessimistic and consider that as a failure,
21255         too.  */
21256      if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
21257        {
21258          if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
21259            #ifdef __linux__
21260            if (! (errno == EINVAL))
21261            #endif
21262              fail = 20;
21263          break;
21264        }
21265
21266      if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
21267        {
21268          struct stat sb;
21269
21270          c = getcwd (buf, PATH_MAX);
21271          if (!c && errno == ENOENT)
21272            {
21273              fail = 11;
21274              break;
21275            }
21276          if (c)
21277            {
21278              fail = 31;
21279              break;
21280            }
21281          if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
21282            {
21283              fail = 21;
21284              break;
21285            }
21286
21287          /* Our replacement needs to be able to stat() long ../../paths,
21288             so generate a path larger than PATH_MAX to check,
21289             avoiding the replacement if we can't stat().  */
21290          c = getcwd (buf, cwd_len + 1);
21291          if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno))
21292            {
21293              fail = 32;
21294              break;
21295            }
21296        }
21297
21298      if (dotdot_max <= cwd_len - initial_cwd_len)
21299        {
21300          if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
21301            break;
21302          c = getcwd (buf, cwd_len + 1);
21303          if (!c)
21304            {
21305              if (! (errno == ERANGE || errno == ENOENT
21306                     || is_ENAMETOOLONG (errno)))
21307                {
21308                  fail = 22;
21309                  break;
21310                }
21311              if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
21312                {
21313                  fail = 12;
21314                  break;
21315                }
21316            }
21317        }
21318
21319      if (c && strlen (c) != cwd_len)
21320        {
21321          fail = 23;
21322          break;
21323        }
21324      ++n_chdirs;
21325    }
21326
21327  /* Leaving behind such a deep directory is not polite.
21328     So clean up here, right away, even though the driving
21329     shell script would also clean up.  */
21330  {
21331    size_t i;
21332
21333    /* Try rmdir first, in case the chdir failed.  */
21334    rmdir (DIR_NAME);
21335    for (i = 0; i <= n_chdirs; i++)
21336      {
21337        if (chdir ("..") < 0)
21338          break;
21339        if (rmdir (DIR_NAME) != 0)
21340          break;
21341      }
21342  }
21343
21344  exit (fail);
21345#endif
21346}
21347
21348_ACEOF
21349if ac_fn_c_try_run "$LINENO"; then :
21350  gl_cv_func_getcwd_path_max=yes
21351else
21352  case $? in
21353        10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
21354        31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
21355        32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';;
21356        *) gl_cv_func_getcwd_path_max=no;;
21357        esac
21358fi
21359rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21360  conftest.$ac_objext conftest.beam conftest.$ac_ext
21361fi
21362
21363
21364fi
21365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
21366$as_echo "$gl_cv_func_getcwd_path_max" >&6; }
21367
21368      case "$gl_cv_func_getcwd_null" in
21369        *yes)
21370
21371
21372
21373
21374
21375
21376      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
21377$as_echo_n "checking for getpagesize... " >&6; }
21378if ${gl_cv_func_getpagesize+:} false; then :
21379  $as_echo_n "(cached) " >&6
21380else
21381  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21382/* end confdefs.h.  */
21383#include <unistd.h>
21384int
21385main ()
21386{
21387return getpagesize();
21388  ;
21389  return 0;
21390}
21391
21392_ACEOF
21393if ac_fn_c_try_link "$LINENO"; then :
21394  gl_cv_func_getpagesize=yes
21395else
21396  gl_cv_func_getpagesize=no
21397fi
21398rm -f core conftest.err conftest.$ac_objext \
21399    conftest$ac_exeext conftest.$ac_ext
21400
21401fi
21402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getpagesize" >&5
21403$as_echo "$gl_cv_func_getpagesize" >&6; }
21404
21405  if test $gl_cv_func_getpagesize = yes; then
21406
21407cat >>confdefs.h <<_ACEOF
21408#define HAVE_GETPAGESIZE 1
21409_ACEOF
21410
21411  fi
21412
21413  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd succeeds when 4k < cwd_length < 16k" >&5
21414$as_echo_n "checking whether getcwd succeeds when 4k < cwd_length < 16k... " >&6; }
21415if ${gl_cv_func_getcwd_succeeds_beyond_4k+:} false; then :
21416  $as_echo_n "(cached) " >&6
21417else
21418  # Remove any remnants of a previous test.
21419     rm -rf confdir-14B---
21420     # Arrange for deletion of the temporary directory this test creates.
21421     ac_clean_files="$ac_clean_files confdir-14B---"
21422          if test "$cross_compiling" = yes; then :
21423  case "$host_os" in
21424                   # Guess yes on musl systems.
21425          *-musl*) gl_cv_func_getcwd_succeeds_beyond_4k="guessing yes" ;;
21426                   # Guess no otherwise, even on glibc systems.
21427          *)       gl_cv_func_getcwd_succeeds_beyond_4k="guessing no"
21428        esac
21429
21430else
21431  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21432/* end confdefs.h.  */
21433
21434#include <errno.h>
21435#include <stdlib.h>
21436#if HAVE_UNISTD_H
21437# include <unistd.h>
21438#else /* on Windows with MSVC */
21439# include <direct.h>
21440#endif
21441#include <string.h>
21442#include <sys/stat.h>
21443
21444
21445/* Arrange to define PATH_MAX, like "pathmax.h" does. */
21446#if HAVE_UNISTD_H
21447# include <unistd.h>
21448#endif
21449#include <limits.h>
21450#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
21451# include <sys/param.h>
21452#endif
21453#if !defined PATH_MAX && defined MAXPATHLEN
21454# define PATH_MAX MAXPATHLEN
21455#endif
21456#ifdef __hpux
21457# undef PATH_MAX
21458# define PATH_MAX 1024
21459#endif
21460#if defined _WIN32 && ! defined __CYGWIN__
21461# undef PATH_MAX
21462# define PATH_MAX 260
21463#endif
21464
21465
21466
21467$gl_mda_defines
21468
21469
21470#ifndef S_IRWXU
21471# define S_IRWXU 0700
21472#endif
21473
21474/* FIXME: skip the run-test altogether on systems without getpagesize.  */
21475#if ! HAVE_GETPAGESIZE
21476# define getpagesize() 0
21477#endif
21478
21479/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
21480   the 16kB pagesize on ia64 linux.  Those conditions make the code below
21481   trigger a bug in glibc's getcwd implementation before 2.4.90-10.  */
21482#define TARGET_LEN (5 * 1024)
21483
21484int
21485main ()
21486{
21487  char *cwd;
21488  size_t initial_cwd_len;
21489  int fail = 0;
21490
21491  /* The bug is triggered when PATH_MAX < getpagesize (), so skip
21492     this relatively expensive and invasive test if that's not true.  */
21493#ifdef PATH_MAX
21494  int bug_possible = PATH_MAX < getpagesize ();
21495#else
21496  int bug_possible = 0;
21497#endif
21498  if (! bug_possible)
21499    return 0;
21500
21501  cwd = getcwd (NULL, 0);
21502  if (cwd == NULL)
21503    return 2;
21504
21505  initial_cwd_len = strlen (cwd);
21506  free (cwd);
21507
21508  if (1)
21509    {
21510      static char const dir_name[] = "confdir-14B---";
21511      size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
21512                              / sizeof dir_name);
21513      size_t d;
21514      for (d = 0; d < desired_depth; d++)
21515        {
21516          if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
21517            {
21518              if (! (errno == ERANGE || errno == ENAMETOOLONG
21519                     || errno == ENOENT))
21520                fail = 3; /* Unable to construct deep hierarchy.  */
21521              break;
21522            }
21523        }
21524
21525      /* If libc has the bug in question, this invocation of getcwd
21526         results in a failed assertion.  */
21527      cwd = getcwd (NULL, 0);
21528      if (cwd == NULL)
21529        fail = 4; /* getcwd didn't assert, but it failed for a long name
21530                     where the answer could have been learned.  */
21531      free (cwd);
21532
21533      /* Call rmdir first, in case the above chdir failed.  */
21534      rmdir (dir_name);
21535      while (0 < d--)
21536        {
21537          if (chdir ("..") < 0)
21538            {
21539              fail = 5;
21540              break;
21541            }
21542          rmdir (dir_name);
21543        }
21544    }
21545
21546  return fail;
21547}
21548
21549_ACEOF
21550if ac_fn_c_try_run "$LINENO"; then :
21551  gl_cv_func_getcwd_succeeds_beyond_4k=yes
21552else
21553                                                  ret=$?
21554        if test $ret -ge 128 || test $ret = 4; then
21555          gl_cv_func_getcwd_succeeds_beyond_4k=no
21556        else
21557          gl_cv_func_getcwd_succeeds_beyond_4k=yes
21558        fi
21559
21560fi
21561rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21562  conftest.$ac_objext conftest.beam conftest.$ac_ext
21563fi
21564
21565
21566fi
21567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_succeeds_beyond_4k" >&5
21568$as_echo "$gl_cv_func_getcwd_succeeds_beyond_4k" >&6; }
21569  case "$gl_cv_func_getcwd_succeeds_beyond_4k" in
21570    *no)
21571      gl_abort_bug=yes
21572      ;;
21573    *)
21574
21575      ;;
21576  esac
21577
21578          ;;
21579      esac
21580      ;;
21581  esac
21582      case "$gl_cv_func_getcwd_path_max" in
21583    *"no" | *"no, it has the AIX bug") ;;
21584    *)
21585
21586$as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
21587
21588      ;;
21589  esac
21590  case "$gl_cv_func_getcwd_path_max" in
21591    *"no, but it is partly working")
21592
21593$as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
21594
21595      ;;
21596    *"yes, but with shorter paths")
21597
21598$as_echo "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h
21599
21600      ;;
21601  esac
21602
21603  if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
21604     || test $gl_cv_func_getcwd_posix_signature != yes \
21605     || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \
21606     || test $gl_abort_bug = yes; then
21607    REPLACE_GETCWD=1
21608  fi
21609
21610  if test $REPLACE_GETCWD = 1; then
21611
21612
21613
21614
21615
21616
21617
21618
21619  gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
21620
21621
21622
21623
21624  :
21625
21626  fi
21627
21628
21629cat >>confdefs.h <<_ACEOF
21630#define GNULIB_GETCWD 1
21631_ACEOF
21632
21633
21634
21635
21636
21637
21638
21639          GNULIB_GETCWD=1
21640
21641
21642
21643
21644
21645$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
21646
21647
21648
21649
21650
21651
21652
21653
21654  case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
21655  *yes,yes) ;;
21656  *)
21657        REPLACE_GETCWD=1
21658    ;;
21659  esac
21660
21661  if test $REPLACE_GETCWD = 1; then
21662
21663
21664
21665
21666
21667
21668
21669
21670  gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
21671
21672  fi
21673
21674
21675
21676
21677
21678          GNULIB_GETCWD=1
21679
21680
21681
21682
21683
21684$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
21685
21686
21687
21688
21689
21690
21691
21692
21693
21694
21695
21696  if test $ac_cv_func_getdelim = yes; then
21697    HAVE_GETDELIM=1
21698        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5
21699$as_echo_n "checking for working getdelim function... " >&6; }
21700if ${gl_cv_func_working_getdelim+:} false; then :
21701  $as_echo_n "(cached) " >&6
21702else
21703  echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
21704       if test "$cross_compiling" = yes; then :
21705                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21706/* end confdefs.h.  */
21707
21708#include <features.h>
21709#ifdef __GNU_LIBRARY__
21710 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
21711  Lucky GNU user
21712 #endif
21713#endif
21714
21715_ACEOF
21716if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21717  $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
21718  gl_cv_func_working_getdelim="guessing yes"
21719else
21720  case "$host_os" in
21721               *-musl*) gl_cv_func_working_getdelim="guessing yes" ;;
21722               *)       gl_cv_func_working_getdelim="$gl_cross_guess_normal" ;;
21723             esac
21724
21725fi
21726rm -f conftest*
21727
21728
21729else
21730  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21731/* end confdefs.h.  */
21732
21733#    include <stdio.h>
21734#    include <stdlib.h>
21735#    include <string.h>
21736    int main ()
21737    {
21738      FILE *in = fopen ("./conftest.data", "r");
21739      if (!in)
21740        return 1;
21741      {
21742        /* Test result for a NULL buffer and a zero size.
21743           Based on a test program from Karl Heuer.  */
21744        char *line = NULL;
21745        size_t siz = 0;
21746        int len = getdelim (&line, &siz, '\n', in);
21747        if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
21748          { free (line); fclose (in); return 2; }
21749        free (line);
21750      }
21751      {
21752        /* Test result for a NULL buffer and a non-zero size.
21753           This crashes on FreeBSD 8.0.  */
21754        char *line = NULL;
21755        size_t siz = (size_t)(~0) / 4;
21756        if (getdelim (&line, &siz, '\n', in) == -1)
21757          { fclose (in); return 3; }
21758        free (line);
21759      }
21760      fclose (in);
21761      return 0;
21762    }
21763
21764_ACEOF
21765if ac_fn_c_try_run "$LINENO"; then :
21766  gl_cv_func_working_getdelim=yes
21767else
21768  gl_cv_func_working_getdelim=no
21769fi
21770rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21771  conftest.$ac_objext conftest.beam conftest.$ac_ext
21772fi
21773
21774
21775fi
21776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5
21777$as_echo "$gl_cv_func_working_getdelim" >&6; }
21778    case "$gl_cv_func_working_getdelim" in
21779      *yes) ;;
21780      *) REPLACE_GETDELIM=1 ;;
21781    esac
21782  else
21783    HAVE_GETDELIM=0
21784  fi
21785
21786  if test $ac_cv_have_decl_getdelim = no; then
21787    HAVE_DECL_GETDELIM=0
21788  fi
21789
21790  if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
21791
21792
21793
21794
21795
21796
21797
21798
21799  gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext"
21800
21801
21802  for ac_func in flockfile funlockfile
21803do :
21804  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21805ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
21806if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
21807  cat >>confdefs.h <<_ACEOF
21808#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21809_ACEOF
21810
21811fi
21812done
21813
21814  ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
21815if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
21816  ac_have_decl=1
21817else
21818  ac_have_decl=0
21819fi
21820
21821cat >>confdefs.h <<_ACEOF
21822#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
21823_ACEOF
21824
21825
21826  fi
21827
21828
21829
21830
21831
21832          GNULIB_GETDELIM=1
21833
21834
21835
21836
21837
21838$as_echo "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h
21839
21840
21841
21842
21843
21844
21845
21846
21847  if test $ac_cv_func_getdtablesize = yes &&
21848     test $ac_cv_have_decl_getdtablesize = yes; then
21849    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
21850$as_echo_n "checking whether getdtablesize works... " >&6; }
21851if ${gl_cv_func_getdtablesize_works+:} false; then :
21852  $as_echo_n "(cached) " >&6
21853else
21854                                                   case "$host_os" in
21855         vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
21856         *)
21857                                                       if test "$cross_compiling" = yes; then :
21858  case "$host_os" in
21859                cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
21860                  gl_cv_func_getdtablesize_works="guessing no" ;;
21861                *) gl_cv_func_getdtablesize_works="guessing yes" ;;
21862              esac
21863
21864else
21865  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21866/* end confdefs.h.  */
21867
21868             #include <unistd.h>
21869
21870
21871$gl_mda_defines
21872
21873
21874int
21875main ()
21876{
21877int size = getdtablesize();
21878                 if (dup2 (0, getdtablesize()) != -1)
21879                   return 1;
21880                 if (size != getdtablesize())
21881                   return 2;
21882
21883  ;
21884  return 0;
21885}
21886_ACEOF
21887if ac_fn_c_try_run "$LINENO"; then :
21888  gl_cv_func_getdtablesize_works=yes
21889else
21890  gl_cv_func_getdtablesize_works=no
21891fi
21892rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21893  conftest.$ac_objext conftest.beam conftest.$ac_ext
21894fi
21895
21896           ;;
21897       esac
21898
21899fi
21900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
21901$as_echo "$gl_cv_func_getdtablesize_works" >&6; }
21902    case "$gl_cv_func_getdtablesize_works" in
21903      *yes | "no (limitation)") ;;
21904      *) REPLACE_GETDTABLESIZE=1 ;;
21905    esac
21906  else
21907    HAVE_GETDTABLESIZE=0
21908  fi
21909
21910  if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
21911
21912
21913
21914
21915
21916
21917
21918
21919  gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
21920
21921    :
21922  fi
21923
21924
21925
21926
21927
21928          GNULIB_GETDTABLESIZE=1
21929
21930
21931
21932
21933
21934$as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
21935
21936
21937
21938
21939
21940
21941
21942
21943
21944
21945  gl_getline_needs_run_time_check=no
21946  ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline"
21947if test "x$ac_cv_func_getline" = xyes; then :
21948                   gl_getline_needs_run_time_check=yes
21949else
21950  am_cv_func_working_getline=no
21951fi
21952
21953  if test $gl_getline_needs_run_time_check = yes; then
21954    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getline function" >&5
21955$as_echo_n "checking for working getline function... " >&6; }
21956if ${am_cv_func_working_getline+:} false; then :
21957  $as_echo_n "(cached) " >&6
21958else
21959  echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
21960       if test "$cross_compiling" = yes; then :
21961                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21962/* end confdefs.h.  */
21963
21964#include <features.h>
21965#ifdef __GNU_LIBRARY__
21966 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
21967  Lucky GNU user
21968 #endif
21969#endif
21970
21971_ACEOF
21972if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21973  $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
21974  am_cv_func_working_getline="guessing yes"
21975else
21976  case "$host_os" in
21977               *-musl*) am_cv_func_working_getline="guessing yes" ;;
21978               *)       am_cv_func_working_getline="$gl_cross_guess_normal" ;;
21979             esac
21980
21981fi
21982rm -f conftest*
21983
21984
21985else
21986  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21987/* end confdefs.h.  */
21988
21989#    include <stdio.h>
21990#    include <stdlib.h>
21991#    include <string.h>
21992    int main ()
21993    {
21994      FILE *in = fopen ("./conftest.data", "r");
21995      if (!in)
21996        return 1;
21997      {
21998        /* Test result for a NULL buffer and a zero size.
21999           Based on a test program from Karl Heuer.  */
22000        char *line = NULL;
22001        size_t siz = 0;
22002        int len = getline (&line, &siz, in);
22003        if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
22004          { free (line); fclose (in); return 2; }
22005        free (line);
22006      }
22007      {
22008        /* Test result for a NULL buffer and a non-zero size.
22009           This crashes on FreeBSD 8.0.  */
22010        char *line = NULL;
22011        size_t siz = (size_t)(~0) / 4;
22012        if (getline (&line, &siz, in) == -1)
22013          { fclose (in); return 3; }
22014        free (line);
22015      }
22016      fclose (in);
22017      return 0;
22018    }
22019
22020_ACEOF
22021if ac_fn_c_try_run "$LINENO"; then :
22022  am_cv_func_working_getline=yes
22023else
22024  am_cv_func_working_getline=no
22025fi
22026rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22027  conftest.$ac_objext conftest.beam conftest.$ac_ext
22028fi
22029
22030
22031fi
22032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_working_getline" >&5
22033$as_echo "$am_cv_func_working_getline" >&6; }
22034  fi
22035
22036  if test $ac_cv_have_decl_getline = no; then
22037    HAVE_DECL_GETLINE=0
22038  fi
22039
22040  case "$am_cv_func_working_getline" in
22041    *yes) ;;
22042    *)
22043                        REPLACE_GETLINE=1
22044      ;;
22045  esac
22046
22047  if test $REPLACE_GETLINE = 1; then
22048
22049
22050
22051
22052
22053
22054
22055
22056  gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext"
22057
22058
22059  :
22060
22061  fi
22062
22063
22064
22065
22066
22067          GNULIB_GETLINE=1
22068
22069
22070
22071
22072
22073$as_echo "#define GNULIB_TEST_GETLINE 1" >>confdefs.h
22074
22075
22076
22077
22078
22079
22080
22081
22082
22083  if test $ac_cv_have_decl_getlogin_r = no; then
22084    HAVE_DECL_GETLOGIN_R=0
22085  fi
22086
22087
22088  if test $ac_cv_func_getlogin_r = no; then
22089    HAVE_GETLOGIN_R=0
22090  else
22091    HAVE_GETLOGIN_R=1
22092
22093    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getlogin_r works with small buffers" >&5
22094$as_echo_n "checking whether getlogin_r works with small buffers... " >&6; }
22095if ${gl_cv_func_getlogin_r_works+:} false; then :
22096  $as_echo_n "(cached) " >&6
22097else
22098
22099                case "$host_os" in
22100                          # Guess no on Mac OS X, OSF/1.
22101          darwin* | osf*) gl_cv_func_getlogin_r_works="guessing no" ;;
22102                          # Guess yes otherwise.
22103          *)              gl_cv_func_getlogin_r_works="guessing yes" ;;
22104        esac
22105        if test "$cross_compiling" = yes; then :
22106  :
22107else
22108  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22109/* end confdefs.h.  */
22110
22111#include <stddef.h>
22112#include <string.h>
22113#include <unistd.h>
22114#if !HAVE_DECL_GETLOGIN_R
22115extern
22116# ifdef __cplusplus
22117"C"
22118# endif
22119int getlogin_r (char *, size_t);
22120#endif
22121int
22122main (void)
22123{
22124  int result = 0;
22125  char buf[100];
22126
22127  if (getlogin_r (buf, 0) == 0)
22128    result |= 1;
22129  if (getlogin_r (buf, 1) == 0)
22130    result |= 2;
22131  if (getlogin_r (buf, 100) == 0)
22132    {
22133      size_t n = strlen (buf);
22134      if (getlogin_r (buf, n) == 0)
22135        result |= 4;
22136    }
22137  return result;
22138}
22139_ACEOF
22140if ac_fn_c_try_run "$LINENO"; then :
22141  gl_cv_func_getlogin_r_works=yes
22142else
22143  gl_cv_func_getlogin_r_works=no
22144fi
22145rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22146  conftest.$ac_objext conftest.beam conftest.$ac_ext
22147fi
22148
22149
22150fi
22151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getlogin_r_works" >&5
22152$as_echo "$gl_cv_func_getlogin_r_works" >&6; }
22153    case "$gl_cv_func_getlogin_r_works" in
22154      *yes) ;;
22155      *) REPLACE_GETLOGIN_R=1 ;;
22156    esac
22157  fi
22158
22159  if test $HAVE_GETLOGIN_R = 0 || test $REPLACE_GETLOGIN_R = 1; then
22160
22161
22162
22163
22164
22165
22166
22167
22168  gl_LIBOBJS="$gl_LIBOBJS getlogin_r.$ac_objext"
22169
22170
22171
22172
22173  fi
22174
22175
22176
22177
22178
22179          GNULIB_GETLOGIN_R=1
22180
22181
22182
22183
22184
22185$as_echo "#define GNULIB_TEST_GETLOGIN_R 1" >>confdefs.h
22186
22187
22188
22189
22190
22191
22192
22193  ac_found=0
22194  ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
22195"
22196if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
22197  ac_have_decl=1
22198else
22199  ac_have_decl=0
22200fi
22201
22202cat >>confdefs.h <<_ACEOF
22203#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
22204_ACEOF
22205if test $ac_have_decl = 1; then :
22206  ac_found=1
22207fi
22208
22209  ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
22210"
22211if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
22212  ac_have_decl=1
22213else
22214  ac_have_decl=0
22215fi
22216
22217cat >>confdefs.h <<_ACEOF
22218#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
22219_ACEOF
22220if test $ac_have_decl = 1; then :
22221  ac_found=1
22222fi
22223
22224  ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
22225"
22226if test "x$ac_cv_have_decl___argv" = xyes; then :
22227  ac_have_decl=1
22228else
22229  ac_have_decl=0
22230fi
22231
22232cat >>confdefs.h <<_ACEOF
22233#define HAVE_DECL___ARGV $ac_have_decl
22234_ACEOF
22235if test $ac_have_decl = 1; then :
22236  ac_found=1
22237fi
22238
22239
22240  # Incur the cost of this test only if none of the above worked.
22241  if test $ac_found = 0; then
22242    # On OpenBSD 5.1, using the global __progname variable appears to be
22243    # the only way to implement getprogname.
22244    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
22245$as_echo_n "checking whether __progname is defined in default libraries... " >&6; }
22246if ${gl_cv_var___progname+:} false; then :
22247  $as_echo_n "(cached) " >&6
22248else
22249
22250        gl_cv_var___progname=
22251        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22252/* end confdefs.h.  */
22253extern char *__progname;
22254int
22255main ()
22256{
22257return *__progname;
22258
22259  ;
22260  return 0;
22261}
22262_ACEOF
22263if ac_fn_c_try_link "$LINENO"; then :
22264  gl_cv_var___progname=yes
22265
22266fi
22267rm -f core conftest.err conftest.$ac_objext \
22268    conftest$ac_exeext conftest.$ac_ext
22269
22270
22271fi
22272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
22273$as_echo "$gl_cv_var___progname" >&6; }
22274    if test "$gl_cv_var___progname" = yes; then
22275
22276$as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
22277
22278    fi
22279  fi
22280
22281
22282
22283
22284
22285  if test "$ac_cv_func_getrandom" != yes; then
22286    HAVE_GETRANDOM=0
22287  else
22288        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getrandom is compatible with its GNU+BSD signature" >&5
22289$as_echo_n "checking whether getrandom is compatible with its GNU+BSD signature... " >&6; }
22290if ${gl_cv_func_getrandom_ok+:} false; then :
22291  $as_echo_n "(cached) " >&6
22292else
22293  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22294/* end confdefs.h.  */
22295/* Additional includes are needed before <sys/random.h> on uClibc
22296                 and Mac OS X.  */
22297              #include <sys/types.h>
22298              #include <stdlib.h>
22299              #include <sys/random.h>
22300              ssize_t getrandom (void *, size_t, unsigned int);
22301
22302int
22303main ()
22304{
22305
22306  ;
22307  return 0;
22308}
22309
22310_ACEOF
22311if ac_fn_c_try_compile "$LINENO"; then :
22312  gl_cv_func_getrandom_ok=yes
22313else
22314  gl_cv_func_getrandom_ok=no
22315fi
22316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22317
22318fi
22319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getrandom_ok" >&5
22320$as_echo "$gl_cv_func_getrandom_ok" >&6; }
22321    if test $gl_cv_func_getrandom_ok = no; then
22322      REPLACE_GETRANDOM=1
22323    fi
22324  fi
22325
22326  case "$host_os" in
22327    mingw*)
22328      for ac_header in bcrypt.h
22329do :
22330  ac_fn_c_check_header_compile "$LINENO" "bcrypt.h" "ac_cv_header_bcrypt_h" "#include <windows.h>
22331
22332"
22333if test "x$ac_cv_header_bcrypt_h" = xyes; then :
22334  cat >>confdefs.h <<_ACEOF
22335#define HAVE_BCRYPT_H 1
22336_ACEOF
22337
22338fi
22339
22340done
22341
22342      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the bcrypt library is guaranteed to be present" >&5
22343$as_echo_n "checking whether the bcrypt library is guaranteed to be present... " >&6; }
22344if ${gl_cv_lib_assume_bcrypt+:} false; then :
22345  $as_echo_n "(cached) " >&6
22346else
22347  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22348/* end confdefs.h.  */
22349#include <windows.h>
22350int
22351main ()
22352{
22353#if !(_WIN32_WINNT >= _WIN32_WINNT_WIN7)
22354                  cannot assume it
22355                #endif
22356
22357  ;
22358  return 0;
22359}
22360
22361_ACEOF
22362if ac_fn_c_try_compile "$LINENO"; then :
22363  gl_cv_lib_assume_bcrypt=yes
22364else
22365  gl_cv_lib_assume_bcrypt=no
22366fi
22367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22368
22369fi
22370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_assume_bcrypt" >&5
22371$as_echo "$gl_cv_lib_assume_bcrypt" >&6; }
22372      if test $gl_cv_lib_assume_bcrypt = yes; then
22373
22374$as_echo "#define HAVE_LIB_BCRYPT 1" >>confdefs.h
22375
22376        LIB_GETRANDOM='-lbcrypt'
22377      else
22378        LIB_GETRANDOM='-ladvapi32'
22379      fi
22380      ;;
22381    *)
22382      LIB_GETRANDOM= ;;
22383  esac
22384
22385
22386  if test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1; then
22387
22388
22389
22390
22391
22392
22393
22394
22395  gl_LIBOBJS="$gl_LIBOBJS getrandom.$ac_objext"
22396
22397  fi
22398
22399
22400
22401
22402
22403          GNULIB_GETRANDOM=1
22404
22405
22406
22407
22408
22409$as_echo "#define GNULIB_TEST_GETRANDOM 1" >>confdefs.h
22410
22411
22412
22413
22414
22415
22416
22417
22418
22419
22420
22421
22422  gl_gettimeofday_timezone=void
22423  if test $ac_cv_func_gettimeofday != yes; then
22424    HAVE_GETTIMEOFDAY=0
22425  else
22426    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
22427$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
22428if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
22429  $as_echo_n "(cached) " >&6
22430else
22431  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22432/* end confdefs.h.  */
22433#include <sys/time.h>
22434              struct timeval c;
22435              int gettimeofday (struct timeval *restrict, void *restrict);
22436
22437int
22438main ()
22439{
22440/* glibc uses struct timezone * rather than the POSIX void *
22441                 if _GNU_SOURCE is defined.  However, since the only portable
22442                 use of gettimeofday uses NULL as the second parameter, and
22443                 since the glibc definition is actually more typesafe, it is
22444                 not worth wrapping this to get a compliant signature.  */
22445              int (*f) (struct timeval *restrict, void *restrict)
22446                = gettimeofday;
22447              int x = f (&c, 0);
22448              return !(x | c.tv_sec | c.tv_usec);
22449
22450  ;
22451  return 0;
22452}
22453_ACEOF
22454if ac_fn_c_try_compile "$LINENO"; then :
22455  gl_cv_func_gettimeofday_posix_signature=yes
22456else
22457  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22458/* end confdefs.h.  */
22459#include <sys/time.h>
22460int gettimeofday (struct timeval *restrict, struct timezone *restrict);
22461
22462int
22463main ()
22464{
22465
22466  ;
22467  return 0;
22468}
22469_ACEOF
22470if ac_fn_c_try_compile "$LINENO"; then :
22471  gl_cv_func_gettimeofday_posix_signature=almost
22472else
22473  gl_cv_func_gettimeofday_posix_signature=no
22474fi
22475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22476fi
22477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22478fi
22479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
22480$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
22481    if test $gl_cv_func_gettimeofday_posix_signature = almost; then
22482      gl_gettimeofday_timezone='struct timezone'
22483    elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
22484      REPLACE_GETTIMEOFDAY=1
22485    fi
22486        if test $REPLACE_STRUCT_TIMEVAL = 1; then
22487      REPLACE_GETTIMEOFDAY=1
22488    fi
22489            case "$host_os" in
22490      mingw*) REPLACE_GETTIMEOFDAY=1 ;;
22491    esac
22492  fi
22493
22494cat >>confdefs.h <<_ACEOF
22495#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
22496_ACEOF
22497
22498
22499  if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
22500
22501
22502
22503
22504
22505
22506
22507
22508  gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
22509
22510    :
22511  fi
22512
22513
22514
22515
22516
22517          GNULIB_GETTIMEOFDAY=1
22518
22519
22520
22521
22522
22523$as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
22524
22525
22526
22527
22528
22529
22530
22531  if test $ac_cv_func_glob = no; then
22532    HAVE_GLOB=0
22533  else
22534
22535    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU glob interface version 1 or 2" >&5
22536$as_echo_n "checking for GNU glob interface version 1 or 2... " >&6; }
22537if ${gl_cv_gnu_glob_interface_version_1_2+:} false; then :
22538  $as_echo_n "(cached) " >&6
22539else
22540       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22541/* end confdefs.h.  */
22542#include <gnu-versions.h>
22543char a[_GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 ? 1 : -1];
22544_ACEOF
22545if ac_fn_c_try_compile "$LINENO"; then :
22546  gl_cv_gnu_glob_interface_version_1_2=yes
22547else
22548  gl_cv_gnu_glob_interface_version_1_2=no
22549fi
22550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22551fi
22552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_gnu_glob_interface_version_1_2" >&5
22553$as_echo "$gl_cv_gnu_glob_interface_version_1_2" >&6; }
22554    if test "$gl_cv_gnu_glob_interface_version_1_2" = "no"; then
22555      REPLACE_GLOB=1
22556    fi
22557
22558    if test $REPLACE_GLOB = 0; then
22559      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether glob lists broken symlinks" >&5
22560$as_echo_n "checking whether glob lists broken symlinks... " >&6; }
22561if ${gl_cv_glob_lists_symlinks+:} false; then :
22562  $as_echo_n "(cached) " >&6
22563else
22564  if test $cross_compiling != yes; then
22565           if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then
22566             gl_cv_glob_lists_symlinks=maybe
22567           else
22568             # If we can't make a symlink, then we cannot test this issue.  Be
22569             # pessimistic about this.
22570             gl_cv_glob_lists_symlinks=no
22571           fi
22572           if test $gl_cv_glob_lists_symlinks = maybe; then
22573             if test "$cross_compiling" = yes; then :
22574                  :
22575
22576else
22577  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22578/* end confdefs.h.  */
22579#include <stddef.h>
22580                    #include <glob.h>
22581int
22582main ()
22583{
22584glob_t found;
22585                    if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH)
22586                      return 1;
22587                    globfree (&found);
22588
22589  ;
22590  return 0;
22591}
22592_ACEOF
22593if ac_fn_c_try_run "$LINENO"; then :
22594  gl_cv_glob_lists_symlinks=yes
22595else
22596  gl_cv_glob_lists_symlinks=no
22597fi
22598rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22599  conftest.$ac_objext conftest.beam conftest.$ac_ext
22600fi
22601
22602           fi
22603           rm -f conf$$-globtest
22604         else
22605           gl_cv_glob_lists_symlinks="$gl_cross_guess_normal"
22606         fi
22607
22608fi
22609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_glob_lists_symlinks" >&5
22610$as_echo "$gl_cv_glob_lists_symlinks" >&6; }
22611      case "$gl_cv_glob_lists_symlinks" in
22612        *yes) ;;
22613        *) REPLACE_GLOB=1 ;;
22614      esac
22615    fi
22616
22617  fi
22618
22619  if test $ac_cv_func_glob_pattern_p = no; then
22620    HAVE_GLOB_PATTERN_P=0
22621  else
22622    if test $REPLACE_GLOB = 1; then
22623      REPLACE_GLOB_PATTERN_P=1
22624    fi
22625  fi
22626
22627  if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then
22628
22629
22630  GLOB_H='glob.h'
22631   if test -n "$GLOB_H"; then
22632  GL_GENERATE_GLOB_H_TRUE=
22633  GL_GENERATE_GLOB_H_FALSE='#'
22634else
22635  GL_GENERATE_GLOB_H_TRUE='#'
22636  GL_GENERATE_GLOB_H_FALSE=
22637fi
22638
22639
22640  fi
22641
22642  if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then
22643
22644
22645
22646
22647
22648
22649
22650
22651  gl_LIBOBJS="$gl_LIBOBJS glob.$ac_objext"
22652
22653
22654
22655
22656
22657
22658
22659
22660
22661  gl_LIBOBJS="$gl_LIBOBJS globfree.$ac_objext"
22662
22663
22664
22665
22666
22667
22668  fi
22669  if test $HAVE_GLOB_PATTERN_P = 0 || test $REPLACE_GLOB_PATTERN_P = 1; then
22670
22671
22672
22673
22674
22675
22676
22677
22678  gl_LIBOBJS="$gl_LIBOBJS glob_pattern_p.$ac_objext"
22679
22680  fi
22681
22682
22683
22684
22685
22686          GNULIB_GLOB=1
22687
22688
22689
22690
22691
22692$as_echo "#define GNULIB_TEST_GLOB 1" >>confdefs.h
22693
22694
22695
22696
22697
22698  LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL"
22699
22700
22701
22702
22703
22704
22705
22706
22707                HAVE_INET_NTOP=1
22708  INET_NTOP_LIB=
22709
22710
22711
22712
22713  if test $ac_cv_header_sys_socket_h != yes; then
22714                    for ac_header in winsock2.h
22715do :
22716  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
22717if test "x$ac_cv_header_winsock2_h" = xyes; then :
22718  cat >>confdefs.h <<_ACEOF
22719#define HAVE_WINSOCK2_H 1
22720_ACEOF
22721
22722fi
22723
22724done
22725
22726  fi
22727  if test "$ac_cv_header_winsock2_h" = yes; then
22728    HAVE_WINSOCK2_H=1
22729    UNISTD_H_HAVE_WINSOCK2_H=1
22730    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
22731  else
22732    HAVE_WINSOCK2_H=0
22733  fi
22734
22735
22736  if test $HAVE_WINSOCK2_H = 1; then
22737                    REPLACE_INET_NTOP=1
22738    ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <ws2tcpip.h>
22739"
22740if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
22741  ac_have_decl=1
22742else
22743  ac_have_decl=0
22744fi
22745
22746cat >>confdefs.h <<_ACEOF
22747#define HAVE_DECL_INET_NTOP $ac_have_decl
22748_ACEOF
22749
22750    if test $ac_cv_have_decl_inet_ntop = yes; then
22751      INET_NTOP_LIB="-lws2_32"
22752    else
22753      HAVE_DECL_INET_NTOP=0
22754    fi
22755  else
22756    gl_save_LIBS=$LIBS
22757    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
22758$as_echo_n "checking for library containing inet_ntop... " >&6; }
22759if ${ac_cv_search_inet_ntop+:} false; then :
22760  $as_echo_n "(cached) " >&6
22761else
22762  ac_func_search_save_LIBS=$LIBS
22763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22764/* end confdefs.h.  */
22765
22766/* Override any GCC internal prototype to avoid an error.
22767   Use char because int might match the return type of a GCC
22768   builtin and then its argument prototype would still apply.  */
22769#ifdef __cplusplus
22770extern "C"
22771#endif
22772char inet_ntop ();
22773int
22774main ()
22775{
22776return inet_ntop ();
22777  ;
22778  return 0;
22779}
22780_ACEOF
22781for ac_lib in '' nsl resolv network; do
22782  if test -z "$ac_lib"; then
22783    ac_res="none required"
22784  else
22785    ac_res=-l$ac_lib
22786    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
22787  fi
22788  if ac_fn_c_try_link "$LINENO"; then :
22789  ac_cv_search_inet_ntop=$ac_res
22790fi
22791rm -f core conftest.err conftest.$ac_objext \
22792    conftest$ac_exeext
22793  if ${ac_cv_search_inet_ntop+:} false; then :
22794  break
22795fi
22796done
22797if ${ac_cv_search_inet_ntop+:} false; then :
22798
22799else
22800  ac_cv_search_inet_ntop=no
22801fi
22802rm conftest.$ac_ext
22803LIBS=$ac_func_search_save_LIBS
22804fi
22805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
22806$as_echo "$ac_cv_search_inet_ntop" >&6; }
22807ac_res=$ac_cv_search_inet_ntop
22808if test "$ac_res" != no; then :
22809  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22810
22811else
22812  for ac_func in inet_ntop
22813do :
22814  ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
22815if test "x$ac_cv_func_inet_ntop" = xyes; then :
22816  cat >>confdefs.h <<_ACEOF
22817#define HAVE_INET_NTOP 1
22818_ACEOF
22819
22820fi
22821done
22822
22823       if test $ac_cv_func_inet_ntop = no; then
22824         HAVE_INET_NTOP=0
22825       fi
22826
22827fi
22828
22829    LIBS=$gl_save_LIBS
22830
22831    if test "$ac_cv_search_inet_ntop" != "no" \
22832       && test "$ac_cv_search_inet_ntop" != "none required"; then
22833      INET_NTOP_LIB="$ac_cv_search_inet_ntop"
22834    fi
22835
22836
22837    ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <arpa/inet.h>
22838        #if HAVE_NETDB_H
22839        # include <netdb.h>
22840        #endif
22841
22842"
22843if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
22844  ac_have_decl=1
22845else
22846  ac_have_decl=0
22847fi
22848
22849cat >>confdefs.h <<_ACEOF
22850#define HAVE_DECL_INET_NTOP $ac_have_decl
22851_ACEOF
22852
22853    if test $ac_cv_have_decl_inet_ntop = no; then
22854      HAVE_DECL_INET_NTOP=0
22855    fi
22856  fi
22857
22858
22859  if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then
22860
22861
22862
22863
22864
22865
22866
22867
22868  gl_LIBOBJS="$gl_LIBOBJS inet_ntop.$ac_objext"
22869
22870
22871
22872
22873  fi
22874
22875
22876
22877
22878
22879          GNULIB_INET_NTOP=1
22880
22881
22882
22883
22884
22885
22886
22887  PRIPTR_PREFIX=
22888  if test -n "$STDINT_H"; then
22889            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22890/* end confdefs.h.  */
22891
22892         #ifdef _WIN64
22893         LLP64
22894         #endif
22895
22896int
22897main ()
22898{
22899
22900  ;
22901  return 0;
22902}
22903
22904_ACEOF
22905if ac_fn_c_try_compile "$LINENO"; then :
22906  PRIPTR_PREFIX='"l"'
22907else
22908  PRIPTR_PREFIX='"ll"'
22909fi
22910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22911  else
22912        for glpfx in '' l ll I64; do
22913      case $glpfx in
22914        '')  gltype1='int';;
22915        l)   gltype1='long int';;
22916        ll)  gltype1='long long int';;
22917        I64) gltype1='__int64';;
22918      esac
22919      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22920/* end confdefs.h.  */
22921#include <stdint.h>
22922           extern intptr_t foo;
22923           extern $gltype1 foo;
22924int
22925main ()
22926{
22927
22928  ;
22929  return 0;
22930}
22931_ACEOF
22932if ac_fn_c_try_compile "$LINENO"; then :
22933  PRIPTR_PREFIX='"'$glpfx'"'
22934fi
22935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22936      test -n "$PRIPTR_PREFIX" && break
22937    done
22938  fi
22939
22940
22941
22942  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
22943$as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
22944if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
22945  $as_echo_n "(cached) " >&6
22946else
22947  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22948/* end confdefs.h.  */
22949/* Work also in C++ mode.  */
22950            #define __STDC_LIMIT_MACROS 1
22951
22952            /* Work if build is not clean.  */
22953            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
22954
22955            #include <limits.h>
22956            #if HAVE_STDINT_H
22957             #include <stdint.h>
22958            #endif
22959
22960            #if defined INT32_MAX && defined INTMAX_MAX
22961             #define CONDITION (INT32_MAX < INTMAX_MAX)
22962            #else
22963             #define CONDITION (sizeof (int) < sizeof (long long int))
22964            #endif
22965            int test[CONDITION ? 1 : -1];
22966int
22967main ()
22968{
22969
22970  ;
22971  return 0;
22972}
22973_ACEOF
22974if ac_fn_c_try_compile "$LINENO"; then :
22975  gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
22976else
22977  gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
22978fi
22979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22980fi
22981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
22982$as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
22983  if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
22984    INT32_MAX_LT_INTMAX_MAX=1;
22985  else
22986    INT32_MAX_LT_INTMAX_MAX=0;
22987  fi
22988
22989
22990  if test $APPLE_UNIVERSAL_BUILD = 0; then
22991
22992  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
22993$as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
22994if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
22995  $as_echo_n "(cached) " >&6
22996else
22997  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22998/* end confdefs.h.  */
22999/* Work also in C++ mode.  */
23000            #define __STDC_LIMIT_MACROS 1
23001
23002            /* Work if build is not clean.  */
23003            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
23004
23005            #include <limits.h>
23006            #if HAVE_STDINT_H
23007             #include <stdint.h>
23008            #endif
23009
23010            #if defined INT64_MAX
23011             #define CONDITION (INT64_MAX == LONG_MAX)
23012            #else
23013             #define CONDITION (sizeof (long long int) == sizeof (long int))
23014            #endif
23015            int test[CONDITION ? 1 : -1];
23016int
23017main ()
23018{
23019
23020  ;
23021  return 0;
23022}
23023_ACEOF
23024if ac_fn_c_try_compile "$LINENO"; then :
23025  gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
23026else
23027  gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
23028fi
23029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23030fi
23031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
23032$as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
23033  if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
23034    INT64_MAX_EQ_LONG_MAX=1;
23035  else
23036    INT64_MAX_EQ_LONG_MAX=0;
23037  fi
23038
23039
23040  else
23041    INT64_MAX_EQ_LONG_MAX=-1
23042  fi
23043
23044  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
23045$as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
23046if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
23047  $as_echo_n "(cached) " >&6
23048else
23049  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23050/* end confdefs.h.  */
23051/* Work also in C++ mode.  */
23052            #define __STDC_LIMIT_MACROS 1
23053
23054            /* Work if build is not clean.  */
23055            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
23056
23057            #include <limits.h>
23058            #if HAVE_STDINT_H
23059             #include <stdint.h>
23060            #endif
23061
23062            #if defined UINT32_MAX && defined UINTMAX_MAX
23063             #define CONDITION (UINT32_MAX < UINTMAX_MAX)
23064            #else
23065             #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
23066            #endif
23067            int test[CONDITION ? 1 : -1];
23068int
23069main ()
23070{
23071
23072  ;
23073  return 0;
23074}
23075_ACEOF
23076if ac_fn_c_try_compile "$LINENO"; then :
23077  gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
23078else
23079  gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
23080fi
23081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23082fi
23083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
23084$as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
23085  if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
23086    UINT32_MAX_LT_UINTMAX_MAX=1;
23087  else
23088    UINT32_MAX_LT_UINTMAX_MAX=0;
23089  fi
23090
23091
23092  if test $APPLE_UNIVERSAL_BUILD = 0; then
23093
23094  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
23095$as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
23096if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
23097  $as_echo_n "(cached) " >&6
23098else
23099  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23100/* end confdefs.h.  */
23101/* Work also in C++ mode.  */
23102            #define __STDC_LIMIT_MACROS 1
23103
23104            /* Work if build is not clean.  */
23105            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
23106
23107            #include <limits.h>
23108            #if HAVE_STDINT_H
23109             #include <stdint.h>
23110            #endif
23111
23112            #if defined UINT64_MAX
23113             #define CONDITION (UINT64_MAX == ULONG_MAX)
23114            #else
23115             #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
23116            #endif
23117            int test[CONDITION ? 1 : -1];
23118int
23119main ()
23120{
23121
23122  ;
23123  return 0;
23124}
23125_ACEOF
23126if ac_fn_c_try_compile "$LINENO"; then :
23127  gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
23128else
23129  gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
23130fi
23131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23132fi
23133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
23134$as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
23135  if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
23136    UINT64_MAX_EQ_ULONG_MAX=1;
23137  else
23138    UINT64_MAX_EQ_ULONG_MAX=0;
23139  fi
23140
23141
23142  else
23143    UINT64_MAX_EQ_ULONG_MAX=-1
23144  fi
23145
23146
23147
23148
23149
23150
23151
23152
23153  if test $ac_cv_func_isblank = no; then
23154    HAVE_ISBLANK=0
23155  fi
23156
23157  if test $HAVE_ISBLANK = 0; then
23158
23159
23160
23161
23162
23163
23164
23165
23166  gl_LIBOBJS="$gl_LIBOBJS isblank.$ac_objext"
23167
23168  fi
23169
23170
23171cat >>confdefs.h <<_ACEOF
23172#define GNULIB_ISBLANK 1
23173_ACEOF
23174
23175
23176
23177
23178
23179
23180
23181          GNULIB_ISBLANK=1
23182
23183
23184
23185
23186
23187
23188  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
23189$as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
23190if ${gl_cv_func_isnand_no_libm+:} false; then :
23191  $as_echo_n "(cached) " >&6
23192else
23193
23194      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23195/* end confdefs.h.  */
23196#include <math.h>
23197             #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
23198             # undef isnand
23199             # define isnand(x) __builtin_isnan ((double)(x))
23200             #else
23201             # undef isnand
23202             # define isnand(x) isnan ((double)(x))
23203             #endif
23204             double x;
23205int
23206main ()
23207{
23208return isnand (x);
23209  ;
23210  return 0;
23211}
23212_ACEOF
23213if ac_fn_c_try_link "$LINENO"; then :
23214  gl_cv_func_isnand_no_libm=yes
23215else
23216  gl_cv_func_isnand_no_libm=no
23217fi
23218rm -f core conftest.err conftest.$ac_objext \
23219    conftest$ac_exeext conftest.$ac_ext
23220
23221fi
23222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
23223$as_echo "$gl_cv_func_isnand_no_libm" >&6; }
23224
23225  gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
23226  if test $gl_cv_func_isnand_no_libm = yes; then
23227
23228$as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
23229
23230  fi
23231
23232  if test $gl_func_isnand_no_libm != yes; then
23233
23234
23235
23236
23237
23238
23239
23240
23241  gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
23242
23243
23244
23245
23246  fi
23247
23248
23249  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
23250$as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
23251if ${gl_cv_func_isnanl_no_libm+:} false; then :
23252  $as_echo_n "(cached) " >&6
23253else
23254
23255      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23256/* end confdefs.h.  */
23257#include <math.h>
23258             #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
23259             # undef isnanl
23260             # define isnanl(x) __builtin_isnan ((long double)(x))
23261             #elif defined isnan
23262             # undef isnanl
23263             # define isnanl(x) isnan ((long double)(x))
23264             #endif
23265             long double x;
23266int
23267main ()
23268{
23269return isnanl (x);
23270  ;
23271  return 0;
23272}
23273_ACEOF
23274if ac_fn_c_try_link "$LINENO"; then :
23275  gl_cv_func_isnanl_no_libm=yes
23276else
23277  gl_cv_func_isnanl_no_libm=no
23278fi
23279rm -f core conftest.err conftest.$ac_objext \
23280    conftest$ac_exeext conftest.$ac_ext
23281
23282fi
23283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
23284$as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
23285
23286  gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
23287  if test $gl_func_isnanl_no_libm = yes; then
23288
23289
23290
23291
23292     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
23293$as_echo_n "checking whether isnanl works... " >&6; }
23294if ${gl_cv_func_isnanl_works+:} false; then :
23295  $as_echo_n "(cached) " >&6
23296else
23297
23298      if test "$cross_compiling" = yes; then :
23299  case "$host_os" in
23300           mingw*) # Guess yes on mingw, no on MSVC.
23301             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23302/* end confdefs.h.  */
23303
23304#ifdef __MINGW32__
23305 Known
23306#endif
23307
23308_ACEOF
23309if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23310  $EGREP "Known" >/dev/null 2>&1; then :
23311  gl_cv_func_isnanl_works="guessing yes"
23312else
23313  gl_cv_func_isnanl_works="guessing no"
23314fi
23315rm -f conftest*
23316
23317             ;;
23318           *) gl_cv_func_isnanl_works="guessing yes" ;;
23319         esac
23320
23321else
23322  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23323/* end confdefs.h.  */
23324
23325#include <float.h>
23326#include <limits.h>
23327#include <math.h>
23328#if (__GNUC__ >= 4) || (__clang_major__ >= 4)
23329# undef isnanl
23330# define isnanl(x) __builtin_isnan ((long double)(x))
23331#elif defined isnan
23332# undef isnanl
23333# define isnanl(x) isnan ((long double)(x))
23334#endif
23335#define NWORDS \
23336  ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
23337typedef union { unsigned int word[NWORDS]; long double value; }
23338        memory_long_double;
23339/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
23340   runtime type conversion.  */
23341#ifdef __sgi
23342static long double NaNl ()
23343{
23344  double zero = 0.0;
23345  return zero / zero;
23346}
23347#else
23348# define NaNl() (0.0L / 0.0L)
23349#endif
23350int main ()
23351{
23352  int result = 0;
23353
23354  if (!isnanl (NaNl ()))
23355    result |= 1;
23356
23357  {
23358    memory_long_double m;
23359    unsigned int i;
23360
23361    /* The isnanl function should be immune against changes in the sign bit and
23362       in the mantissa bits.  The xor operation twiddles a bit that can only be
23363       a sign bit or a mantissa bit (since the exponent never extends to
23364       bit 31).  */
23365    m.value = NaNl ();
23366    m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
23367    for (i = 0; i < NWORDS; i++)
23368      m.word[i] |= 1;
23369    if (!isnanl (m.value))
23370      result |= 1;
23371  }
23372
23373#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
23374/* Representation of an 80-bit 'long double' as an initializer for a sequence
23375   of 'unsigned int' words.  */
23376# ifdef WORDS_BIGENDIAN
23377#  define LDBL80_WORDS(exponent,manthi,mantlo) \
23378     { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
23379       ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16),   \
23380       (unsigned int) (mantlo) << 16                                        \
23381     }
23382# else
23383#  define LDBL80_WORDS(exponent,manthi,mantlo) \
23384     { mantlo, manthi, exponent }
23385# endif
23386  { /* Quiet NaN.  */
23387    static memory_long_double x =
23388      { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
23389    if (!isnanl (x.value))
23390      result |= 2;
23391  }
23392  {
23393    /* Signalling NaN.  */
23394    static memory_long_double x =
23395      { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
23396    if (!isnanl (x.value))
23397      result |= 2;
23398  }
23399  /* isnanl should return something even for noncanonical values.  */
23400  { /* Pseudo-NaN.  */
23401    static memory_long_double x =
23402      { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
23403    if (isnanl (x.value) && !isnanl (x.value))
23404      result |= 4;
23405  }
23406  { /* Pseudo-Infinity.  */
23407    static memory_long_double x =
23408      { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
23409    if (isnanl (x.value) && !isnanl (x.value))
23410      result |= 8;
23411  }
23412  { /* Pseudo-Zero.  */
23413    static memory_long_double x =
23414      { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
23415    if (isnanl (x.value) && !isnanl (x.value))
23416      result |= 16;
23417  }
23418  { /* Unnormalized number.  */
23419    static memory_long_double x =
23420      { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
23421    if (isnanl (x.value) && !isnanl (x.value))
23422      result |= 32;
23423  }
23424  { /* Pseudo-Denormal.  */
23425    static memory_long_double x =
23426      { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
23427    if (isnanl (x.value) && !isnanl (x.value))
23428      result |= 64;
23429  }
23430#endif
23431
23432  return result;
23433}
23434_ACEOF
23435if ac_fn_c_try_run "$LINENO"; then :
23436  gl_cv_func_isnanl_works=yes
23437else
23438  gl_cv_func_isnanl_works=no
23439fi
23440rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23441  conftest.$ac_objext conftest.beam conftest.$ac_ext
23442fi
23443
23444
23445fi
23446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
23447$as_echo "$gl_cv_func_isnanl_works" >&6; }
23448
23449    case "$gl_cv_func_isnanl_works" in
23450      *yes) ;;
23451      *)    gl_func_isnanl_no_libm=no ;;
23452    esac
23453  fi
23454  if test $gl_func_isnanl_no_libm = yes; then
23455
23456$as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
23457
23458  fi
23459
23460  if test $gl_func_isnanl_no_libm != yes; then
23461
23462
23463
23464
23465
23466
23467
23468
23469  gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
23470
23471
23472
23473
23474     { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
23475$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
23476if ${gl_cv_cc_long_double_expbit0+:} false; then :
23477  $as_echo_n "(cached) " >&6
23478else
23479
23480      if test "$cross_compiling" = yes; then :
23481
23482                              gl_cv_cc_long_double_expbit0="unknown"
23483          case "$host_os" in
23484            mingw*) # On native Windows (little-endian), we know the result
23485                    # in two cases: mingw, MSVC.
23486              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23487/* end confdefs.h.  */
23488
23489#ifdef __MINGW32__
23490 Known
23491#endif
23492
23493_ACEOF
23494if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23495  $EGREP "Known" >/dev/null 2>&1; then :
23496  gl_cv_cc_long_double_expbit0="word 2 bit 0"
23497fi
23498rm -f conftest*
23499
23500              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23501/* end confdefs.h.  */
23502
23503#ifdef _MSC_VER
23504 Known
23505#endif
23506
23507_ACEOF
23508if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23509  $EGREP "Known" >/dev/null 2>&1; then :
23510  gl_cv_cc_long_double_expbit0="word 1 bit 20"
23511fi
23512rm -f conftest*
23513
23514              ;;
23515          esac
23516
23517else
23518  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23519/* end confdefs.h.  */
23520
23521#include <float.h>
23522#include <stddef.h>
23523#include <stdio.h>
23524#include <string.h>
23525#define NWORDS \
23526  ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
23527typedef union { long double value; unsigned int word[NWORDS]; }
23528        memory_long_double;
23529static unsigned int ored_words[NWORDS];
23530static unsigned int anded_words[NWORDS];
23531static void add_to_ored_words (long double *x)
23532{
23533  memory_long_double m;
23534  size_t i;
23535  /* Clear it first, in case
23536     sizeof (long double) < sizeof (memory_long_double).  */
23537  memset (&m, 0, sizeof (memory_long_double));
23538  m.value = *x;
23539  for (i = 0; i < NWORDS; i++)
23540    {
23541      ored_words[i] |= m.word[i];
23542      anded_words[i] &= m.word[i];
23543    }
23544}
23545int main ()
23546{
23547  static long double samples[5] = { 0.25L, 0.5L, 1.0L, 2.0L, 4.0L };
23548  size_t j;
23549  FILE *fp = fopen ("conftest.out", "w");
23550  if (fp == NULL)
23551    return 1;
23552  for (j = 0; j < NWORDS; j++)
23553    anded_words[j] = ~ (unsigned int) 0;
23554  for (j = 0; j < 5; j++)
23555    add_to_ored_words (&samples[j]);
23556  /* Remove bits that are common (e.g. if representation of the first mantissa
23557     bit is explicit).  */
23558  for (j = 0; j < NWORDS; j++)
23559    ored_words[j] &= ~anded_words[j];
23560  /* Now find the nonzero word.  */
23561  for (j = 0; j < NWORDS; j++)
23562    if (ored_words[j] != 0)
23563      break;
23564  if (j < NWORDS)
23565    {
23566      size_t i;
23567      for (i = j + 1; i < NWORDS; i++)
23568        if (ored_words[i] != 0)
23569          {
23570            fprintf (fp, "unknown");
23571            return (fclose (fp) != 0);
23572          }
23573      for (i = 0; ; i++)
23574        if ((ored_words[j] >> i) & 1)
23575          {
23576            fprintf (fp, "word %d bit %d", (int) j, (int) i);
23577            return (fclose (fp) != 0);
23578          }
23579    }
23580  fprintf (fp, "unknown");
23581  return (fclose (fp) != 0);
23582}
23583
23584_ACEOF
23585if ac_fn_c_try_run "$LINENO"; then :
23586  gl_cv_cc_long_double_expbit0=`cat conftest.out`
23587else
23588  gl_cv_cc_long_double_expbit0="unknown"
23589fi
23590rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23591  conftest.$ac_objext conftest.beam conftest.$ac_ext
23592fi
23593
23594      rm -f conftest.out
23595
23596fi
23597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
23598$as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
23599  case "$gl_cv_cc_long_double_expbit0" in
23600    word*bit*)
23601      word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
23602      bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
23603
23604cat >>confdefs.h <<_ACEOF
23605#define LDBL_EXPBIT0_WORD $word
23606_ACEOF
23607
23608
23609cat >>confdefs.h <<_ACEOF
23610#define LDBL_EXPBIT0_BIT $bit
23611_ACEOF
23612
23613      ;;
23614  esac
23615
23616
23617
23618  fi
23619
23620
23621  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5
23622$as_echo_n "checking whether the compiler supports the __inline keyword... " >&6; }
23623if ${gl_cv_c___inline+:} false; then :
23624  $as_echo_n "(cached) " >&6
23625else
23626  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23627/* end confdefs.h.  */
23628typedef int foo_t;
23629           static __inline foo_t foo (void) { return 0; }
23630int
23631main ()
23632{
23633return foo ();
23634  ;
23635  return 0;
23636}
23637_ACEOF
23638if ac_fn_c_try_compile "$LINENO"; then :
23639  gl_cv_c___inline=yes
23640else
23641  gl_cv_c___inline=no
23642fi
23643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23644fi
23645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5
23646$as_echo "$gl_cv_c___inline" >&6; }
23647  if test $gl_cv_c___inline = yes; then
23648
23649$as_echo "#define HAVE___INLINE 1" >>confdefs.h
23650
23651  fi
23652
23653
23654
23655
23656
23657    LOCALCHARSET_TESTS_ENVIRONMENT=
23658
23659
23660
23661
23662
23663
23664
23665
23666
23667
23668
23669  case "$host_os" in
23670    solaris*)
23671
23672$as_echo "#define _LCONV_C99 1" >>confdefs.h
23673
23674      ;;
23675  esac
23676
23677  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
23678$as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
23679if ${gl_cv_header_locale_h_posix2001+:} false; then :
23680  $as_echo_n "(cached) " >&6
23681else
23682  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23683/* end confdefs.h.  */
23684#include <locale.h>
23685            int x = LC_MESSAGES;
23686            int y = sizeof (((struct lconv *) 0)->decimal_point);
23687int
23688main ()
23689{
23690
23691  ;
23692  return 0;
23693}
23694_ACEOF
23695if ac_fn_c_try_compile "$LINENO"; then :
23696  gl_cv_header_locale_h_posix2001=yes
23697else
23698  gl_cv_header_locale_h_posix2001=no
23699fi
23700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23701fi
23702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
23703$as_echo "$gl_cv_header_locale_h_posix2001" >&6; }
23704
23705          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
23706$as_echo_n "checking whether struct lconv is properly defined... " >&6; }
23707if ${gl_cv_sys_struct_lconv_ok+:} false; then :
23708  $as_echo_n "(cached) " >&6
23709else
23710  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23711/* end confdefs.h.  */
23712#include <locale.h>
23713            struct lconv l;
23714            int x = sizeof (l.decimal_point);
23715            int y = sizeof (l.int_p_cs_precedes);
23716int
23717main ()
23718{
23719
23720  ;
23721  return 0;
23722}
23723_ACEOF
23724if ac_fn_c_try_compile "$LINENO"; then :
23725  gl_cv_sys_struct_lconv_ok=yes
23726else
23727  gl_cv_sys_struct_lconv_ok=no
23728fi
23729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23730
23731fi
23732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
23733$as_echo "$gl_cv_sys_struct_lconv_ok" >&6; }
23734  if test $gl_cv_sys_struct_lconv_ok = no; then
23735            case "$host_os" in
23736      mingw*)
23737        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23738/* end confdefs.h.  */
23739
23740#ifdef _MSC_VER
23741 Special
23742#endif
23743
23744_ACEOF
23745if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23746  $EGREP "Special" >/dev/null 2>&1; then :
23747
23748else
23749  REPLACE_STRUCT_LCONV=1
23750fi
23751rm -f conftest*
23752
23753        ;;
23754      *) REPLACE_STRUCT_LCONV=1 ;;
23755    esac
23756  fi
23757
23758
23759
23760
23761
23762
23763
23764
23765
23766     if test $gl_cv_have_include_next = yes; then
23767       gl_cv_next_locale_h='<'locale.h'>'
23768     else
23769       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
23770$as_echo_n "checking absolute name of <locale.h>... " >&6; }
23771if ${gl_cv_next_locale_h+:} false; then :
23772  $as_echo_n "(cached) " >&6
23773else
23774
23775
23776
23777  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23778/* end confdefs.h.  */
23779#include <locale.h>
23780_ACEOF
23781                case "$host_os" in
23782    aix*) gl_absname_cpp="$ac_cpp -C" ;;
23783    *)    gl_absname_cpp="$ac_cpp" ;;
23784  esac
23785
23786  case "$host_os" in
23787    mingw*)
23788                                          gl_dirsep_regex='[/\\]'
23789      ;;
23790    *)
23791      gl_dirsep_regex='\/'
23792      ;;
23793  esac
23794      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23795  gl_header_literal_regex=`echo 'locale.h' \
23796                           | sed -e "$gl_make_literal_regex_sed"`
23797  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23798      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23799      s|^/[^/]|//&|
23800      p
23801      q
23802    }'
23803
23804        gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23805  sed -n "$gl_absolute_header_sed"`
23806
23807           gl_header=$gl_cv_absolute_locale_h
23808           gl_cv_next_locale_h='"'$gl_header'"'
23809
23810
23811fi
23812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
23813$as_echo "$gl_cv_next_locale_h" >&6; }
23814     fi
23815     NEXT_LOCALE_H=$gl_cv_next_locale_h
23816
23817     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23818       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23819       gl_next_as_first_directive='<'locale.h'>'
23820     else
23821       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23822       gl_next_as_first_directive=$gl_cv_next_locale_h
23823     fi
23824     NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
23825
23826
23827
23828
23829
23830
23831
23832
23833
23834
23835
23836  if test "$gl_threads_api" = posix; then
23837    # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
23838    # pthread_rwlock_* functions.
23839    has_rwlock=false
23840    ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
23841"
23842if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
23843  has_rwlock=true
23844
23845$as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
23846
23847fi
23848
23849    if $has_rwlock; then
23850
23851
23852     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5
23853$as_echo_n "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; }
23854if ${gl_cv_pthread_rwlock_rdlock_prefer_writer+:} false; then :
23855  $as_echo_n "(cached) " >&6
23856else
23857  save_LIBS="$LIBS"
23858     LIBS="$LIBS $LIBMULTITHREAD"
23859     if test "$cross_compiling" = yes; then :
23860  case "$host_os" in
23861                         # Guess no on glibc systems.
23862          *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
23863                         # Guess no on musl systems.
23864          *-musl*)       gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
23865                         # Guess no on bionic systems.
23866          *-android*)    gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
23867                         # Guess yes on native Windows with the mingw-w64 winpthreads library.
23868                         # Guess no on native Windows with the gnulib windows-rwlock module.
23869          mingw*)        if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
23870                           gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
23871                         else
23872                           gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no"
23873                         fi
23874                         ;;
23875                         # If we don't know, obey --enable-cross-guesses.
23876          *)             gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;;
23877         esac
23878
23879else
23880  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23881/* end confdefs.h.  */
23882
23883#include <errno.h>
23884#include <pthread.h>
23885#include <stdlib.h>
23886#include <unistd.h>
23887
23888#define SUCCEED() exit (0)
23889#define FAILURE() exit (1)
23890#define UNEXPECTED(n) (exit (10 + (n)))
23891
23892/* The main thread creates the waiting writer and the requesting reader threads
23893   in the default way; this guarantees that they have the same priority.
23894   We can reuse the main thread as first reader thread.  */
23895
23896static pthread_rwlock_t lock;
23897static pthread_t reader1;
23898static pthread_t writer;
23899static pthread_t reader2;
23900static pthread_t timer;
23901/* Used to pass control from writer to reader2 and from reader2 to timer,
23902   as in a relay race.
23903   Passing control from one running thread to another running thread
23904   is most likely faster than to create the second thread.  */
23905static pthread_mutex_t baton;
23906
23907static void *
23908timer_func (void *ignored)
23909{
23910  /* Step 13 (can be before or after step 12):
23911     The timer thread takes the baton, then waits a moment to make sure
23912     it can tell whether the second reader thread is blocked at step 12.  */
23913  if (pthread_mutex_lock (&baton))
23914    UNEXPECTED (13);
23915  usleep (100000);
23916  /* By the time we get here, it's clear that the second reader thread is
23917     blocked at step 12.  This is the desired behaviour.  */
23918  SUCCEED ();
23919}
23920
23921static void *
23922reader2_func (void *ignored)
23923{
23924  int err;
23925
23926  /* Step 8 (can be before or after step 7):
23927     The second reader thread takes the baton, then waits a moment to make sure
23928     the writer thread has reached step 7.  */
23929  if (pthread_mutex_lock (&baton))
23930    UNEXPECTED (8);
23931  usleep (100000);
23932  /* Step 9: The second reader thread requests the lock.  */
23933  err = pthread_rwlock_tryrdlock (&lock);
23934  if (err == 0)
23935    FAILURE ();
23936  else if (err != EBUSY)
23937    UNEXPECTED (9);
23938  /* Step 10: Launch a timer, to test whether the next call blocks.  */
23939  if (pthread_create (&timer, NULL, timer_func, NULL))
23940    UNEXPECTED (10);
23941  /* Step 11: Release the baton.  */
23942  if (pthread_mutex_unlock (&baton))
23943    UNEXPECTED (11);
23944  /* Step 12: The second reader thread requests the lock.  */
23945  err = pthread_rwlock_rdlock (&lock);
23946  if (err == 0)
23947    FAILURE ();
23948  else
23949    UNEXPECTED (12);
23950}
23951
23952static void *
23953writer_func (void *ignored)
23954{
23955  /* Step 4: Take the baton, so that the second reader thread does not go ahead
23956     too early.  */
23957  if (pthread_mutex_lock (&baton))
23958    UNEXPECTED (4);
23959  /* Step 5: Create the second reader thread.  */
23960  if (pthread_create (&reader2, NULL, reader2_func, NULL))
23961    UNEXPECTED (5);
23962  /* Step 6: Release the baton.  */
23963  if (pthread_mutex_unlock (&baton))
23964    UNEXPECTED (6);
23965  /* Step 7: The writer thread requests the lock.  */
23966  if (pthread_rwlock_wrlock (&lock))
23967    UNEXPECTED (7);
23968  return NULL;
23969}
23970
23971int
23972main ()
23973{
23974  reader1 = pthread_self ();
23975
23976  /* Step 1: The main thread initializes the lock and the baton.  */
23977  if (pthread_rwlock_init (&lock, NULL))
23978    UNEXPECTED (1);
23979  if (pthread_mutex_init (&baton, NULL))
23980    UNEXPECTED (1);
23981  /* Step 2: The main thread acquires the lock as a reader.  */
23982  if (pthread_rwlock_rdlock (&lock))
23983    UNEXPECTED (2);
23984  /* Step 3: Create the writer thread.  */
23985  if (pthread_create (&writer, NULL, writer_func, NULL))
23986    UNEXPECTED (3);
23987  /* Job done.  Go to sleep.  */
23988  for (;;)
23989    {
23990      sleep (1);
23991    }
23992}
23993
23994_ACEOF
23995if ac_fn_c_try_run "$LINENO"; then :
23996  gl_cv_pthread_rwlock_rdlock_prefer_writer=yes
23997else
23998  gl_cv_pthread_rwlock_rdlock_prefer_writer=no
23999fi
24000rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24001  conftest.$ac_objext conftest.beam conftest.$ac_ext
24002fi
24003
24004     LIBS="$save_LIBS"
24005
24006fi
24007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5
24008$as_echo "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; }
24009  case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
24010    *yes)
24011
24012$as_echo "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
24013
24014      ;;
24015  esac
24016
24017    fi
24018    # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
24019    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24020/* end confdefs.h.  */
24021
24022      #include <pthread.h>
24023int
24024main ()
24025{
24026
24027#if __FreeBSD__ == 4
24028error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
24029#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
24030       && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
24031error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
24032#else
24033int x = (int)PTHREAD_MUTEX_RECURSIVE;
24034return !x;
24035#endif
24036
24037  ;
24038  return 0;
24039}
24040_ACEOF
24041if ac_fn_c_try_compile "$LINENO"; then :
24042
24043$as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
24044
24045fi
24046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24047  fi
24048  :
24049
24050
24051
24052cat >>confdefs.h <<_ACEOF
24053#define GNULIB_LOCK 1
24054_ACEOF
24055
24056
24057
24058
24059
24060
24061  if test $ac_cv_func_lstat = yes; then
24062
24063    case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
24064      solaris* | *no)
24065        REPLACE_LSTAT=1
24066        ;;
24067    esac
24068  else
24069    HAVE_LSTAT=0
24070  fi
24071
24072  if test $REPLACE_LSTAT = 1; then
24073
24074
24075
24076
24077
24078
24079
24080
24081  gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
24082
24083    :
24084  fi
24085
24086
24087
24088
24089
24090          GNULIB_LSTAT=1
24091
24092
24093
24094
24095
24096$as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
24097
24098
24099
24100
24101
24102
24103  if test $gl_cv_func_malloc_posix = yes; then
24104
24105$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
24106
24107  else
24108    REPLACE_MALLOC=1
24109  fi
24110
24111  if test $REPLACE_MALLOC = 1; then
24112
24113
24114
24115
24116
24117
24118
24119
24120  gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
24121
24122  fi
24123
24124
24125
24126
24127
24128          GNULIB_MALLOC_POSIX=1
24129
24130
24131
24132
24133
24134$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
24135
24136
24137
24138
24139
24140
24141
24142
24143
24144
24145
24146
24147
24148
24149
24150
24151
24152     if test $gl_cv_have_include_next = yes; then
24153       gl_cv_next_math_h='<'math.h'>'
24154     else
24155       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
24156$as_echo_n "checking absolute name of <math.h>... " >&6; }
24157if ${gl_cv_next_math_h+:} false; then :
24158  $as_echo_n "(cached) " >&6
24159else
24160
24161             if test $ac_cv_header_math_h = yes; then
24162
24163
24164
24165
24166  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24167/* end confdefs.h.  */
24168#include <math.h>
24169_ACEOF
24170                case "$host_os" in
24171    aix*) gl_absname_cpp="$ac_cpp -C" ;;
24172    *)    gl_absname_cpp="$ac_cpp" ;;
24173  esac
24174
24175  case "$host_os" in
24176    mingw*)
24177                                          gl_dirsep_regex='[/\\]'
24178      ;;
24179    *)
24180      gl_dirsep_regex='\/'
24181      ;;
24182  esac
24183      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24184  gl_header_literal_regex=`echo 'math.h' \
24185                           | sed -e "$gl_make_literal_regex_sed"`
24186  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24187      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24188      s|^/[^/]|//&|
24189      p
24190      q
24191    }'
24192
24193        gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24194  sed -n "$gl_absolute_header_sed"`
24195
24196           gl_header=$gl_cv_absolute_math_h
24197           gl_cv_next_math_h='"'$gl_header'"'
24198          else
24199               gl_cv_next_math_h='<'math.h'>'
24200             fi
24201
24202
24203fi
24204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
24205$as_echo "$gl_cv_next_math_h" >&6; }
24206     fi
24207     NEXT_MATH_H=$gl_cv_next_math_h
24208
24209     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24210       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24211       gl_next_as_first_directive='<'math.h'>'
24212     else
24213       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24214       gl_next_as_first_directive=$gl_cv_next_math_h
24215     fi
24216     NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
24217
24218
24219
24220
24221
24222  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
24223$as_echo_n "checking whether NAN macro works... " >&6; }
24224if ${gl_cv_header_math_nan_works+:} false; then :
24225  $as_echo_n "(cached) " >&6
24226else
24227  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24228/* end confdefs.h.  */
24229#include <math.h>
24230int
24231main ()
24232{
24233/* Solaris 10 has a broken definition of NAN.  Other platforms
24234        fail to provide NAN, or provide it only in C99 mode; this
24235        test only needs to fail when NAN is provided but wrong.  */
24236         float f = 1.0f;
24237#ifdef NAN
24238         f = NAN;
24239#endif
24240         return f == 0;
24241  ;
24242  return 0;
24243}
24244_ACEOF
24245if ac_fn_c_try_compile "$LINENO"; then :
24246  gl_cv_header_math_nan_works=yes
24247else
24248  gl_cv_header_math_nan_works=no
24249fi
24250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24251fi
24252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
24253$as_echo "$gl_cv_header_math_nan_works" >&6; }
24254  if test $gl_cv_header_math_nan_works = no; then
24255    REPLACE_NAN=1
24256  fi
24257  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
24258$as_echo_n "checking whether HUGE_VAL works... " >&6; }
24259if ${gl_cv_header_math_huge_val_works+:} false; then :
24260  $as_echo_n "(cached) " >&6
24261else
24262  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24263/* end confdefs.h.  */
24264#include <math.h>
24265int
24266main ()
24267{
24268/* Solaris 10 has a broken definition of HUGE_VAL.  */
24269         double d = HUGE_VAL;
24270         return d == 0;
24271  ;
24272  return 0;
24273}
24274_ACEOF
24275if ac_fn_c_try_compile "$LINENO"; then :
24276  gl_cv_header_math_huge_val_works=yes
24277else
24278  gl_cv_header_math_huge_val_works=no
24279fi
24280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24281fi
24282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
24283$as_echo "$gl_cv_header_math_huge_val_works" >&6; }
24284  if test $gl_cv_header_math_huge_val_works = no; then
24285    REPLACE_HUGE_VAL=1
24286  fi
24287
24288
24289
24290
24291
24292
24293
24294
24295
24296
24297
24298
24299
24300
24301
24302
24303
24304
24305        if case "$host_os" in
24306       mingw*) true ;;
24307       *) test $ac_cv_func_mbsinit = yes ;;
24308     esac \
24309    && test $ac_cv_func_mbrtowc = yes; then
24310
24311
24312
24313
24314     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
24315$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
24316if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
24317  $as_echo_n "(cached) " >&6
24318else
24319
24320                  case "$host_os" in
24321                     # Guess no on AIX and OSF/1.
24322        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
24323                     # Guess yes otherwise.
24324        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
24325      esac
24326      if test $LOCALE_JA != none; then
24327        if test "$cross_compiling" = yes; then :
24328  :
24329else
24330  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24331/* end confdefs.h.  */
24332
24333#include <locale.h>
24334#include <string.h>
24335#include <wchar.h>
24336int main ()
24337{
24338  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24339    {
24340      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
24341      mbstate_t state;
24342      wchar_t wc;
24343
24344      memset (&state, '\0', sizeof (mbstate_t));
24345      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24346        if (mbsinit (&state))
24347          return 2;
24348    }
24349  return 0;
24350}
24351_ACEOF
24352if ac_fn_c_try_run "$LINENO"; then :
24353  gl_cv_func_mbrtowc_incomplete_state=yes
24354else
24355  gl_cv_func_mbrtowc_incomplete_state=no
24356fi
24357rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24358  conftest.$ac_objext conftest.beam conftest.$ac_ext
24359fi
24360
24361      else
24362        if test $LOCALE_FR_UTF8 != none; then
24363          if test "$cross_compiling" = yes; then :
24364  :
24365else
24366  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24367/* end confdefs.h.  */
24368
24369#include <locale.h>
24370#include <string.h>
24371#include <wchar.h>
24372int main ()
24373{
24374  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24375    {
24376      const char input[] = "B\303\274\303\237er"; /* "Büßer" */
24377      mbstate_t state;
24378      wchar_t wc;
24379
24380      memset (&state, '\0', sizeof (mbstate_t));
24381      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24382        if (mbsinit (&state))
24383          return 2;
24384    }
24385  return 0;
24386}
24387_ACEOF
24388if ac_fn_c_try_run "$LINENO"; then :
24389  gl_cv_func_mbrtowc_incomplete_state=yes
24390else
24391  gl_cv_func_mbrtowc_incomplete_state=no
24392fi
24393rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24394  conftest.$ac_objext conftest.beam conftest.$ac_ext
24395fi
24396
24397        fi
24398      fi
24399
24400fi
24401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
24402$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
24403
24404
24405
24406
24407     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
24408$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
24409if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
24410  $as_echo_n "(cached) " >&6
24411else
24412
24413                  case "$host_os" in
24414                    # Guess no on Solaris 8.
24415        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
24416                    # Guess yes otherwise.
24417        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
24418      esac
24419      if test $LOCALE_ZH_CN != none; then
24420        if test "$cross_compiling" = yes; then :
24421  :
24422else
24423  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24424/* end confdefs.h.  */
24425
24426#include <locale.h>
24427#include <stdlib.h>
24428#include <string.h>
24429#include <wchar.h>
24430int main ()
24431{
24432  /* This fails on Solaris 8:
24433     mbrtowc returns 2, and sets wc to 0x00F0.
24434     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
24435  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
24436    {
24437      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
24438      mbstate_t state;
24439      wchar_t wc;
24440
24441      memset (&state, '\0', sizeof (mbstate_t));
24442      if (mbrtowc (&wc, input + 3, 6, &state) != 4
24443          && mbtowc (&wc, input + 3, 6) == 4)
24444        return 2;
24445    }
24446  return 0;
24447}
24448_ACEOF
24449if ac_fn_c_try_run "$LINENO"; then :
24450  gl_cv_func_mbrtowc_sanitycheck=yes
24451else
24452  gl_cv_func_mbrtowc_sanitycheck=no
24453fi
24454rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24455  conftest.$ac_objext conftest.beam conftest.$ac_ext
24456fi
24457
24458      fi
24459
24460fi
24461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
24462$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
24463
24464    REPLACE_MBSTATE_T=0
24465    case "$gl_cv_func_mbrtowc_incomplete_state" in
24466      *yes) ;;
24467      *) REPLACE_MBSTATE_T=1 ;;
24468    esac
24469    case "$gl_cv_func_mbrtowc_sanitycheck" in
24470      *yes) ;;
24471      *) REPLACE_MBSTATE_T=1 ;;
24472    esac
24473  else
24474    REPLACE_MBSTATE_T=1
24475  fi
24476
24477
24478
24479  if test $ac_cv_func_mbrtowc = no; then
24480    HAVE_MBRTOWC=0
24481    ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
24482      #include <wchar.h>
24483
24484"
24485if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
24486  ac_have_decl=1
24487else
24488  ac_have_decl=0
24489fi
24490
24491cat >>confdefs.h <<_ACEOF
24492#define HAVE_DECL_MBRTOWC $ac_have_decl
24493_ACEOF
24494
24495    if test $ac_cv_have_decl_mbrtowc = yes; then
24496                        REPLACE_MBRTOWC=1
24497    fi
24498  else
24499    if test $REPLACE_MBSTATE_T = 1; then
24500      REPLACE_MBRTOWC=1
24501    else
24502
24503
24504
24505     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
24506$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
24507if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
24508  $as_echo_n "(cached) " >&6
24509else
24510
24511                  case "$host_os" in
24512                  # Guess no on Solaris.
24513        solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
24514                  # Guess yes otherwise.
24515        *)        gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
24516      esac
24517      if test $LOCALE_FR_UTF8 != none; then
24518        if test "$cross_compiling" = yes; then :
24519  :
24520else
24521  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24522/* end confdefs.h.  */
24523
24524#include <locale.h>
24525#include <stdlib.h>
24526#include <string.h>
24527#include <wchar.h>
24528int main ()
24529{
24530  int result = 0;
24531
24532  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24533    {
24534      char input[] = "\303\237er";
24535      mbstate_t state;
24536      wchar_t wc;
24537      size_t ret;
24538
24539      memset (&state, '\0', sizeof (mbstate_t));
24540      wc = (wchar_t) 0xBADFACE;
24541      ret = mbrtowc (&wc, input, 5, &state);
24542      if (ret != 2)
24543        result |= 1;
24544      if (!mbsinit (&state))
24545        result |= 2;
24546
24547      memset (&state, '\0', sizeof (mbstate_t));
24548      ret = mbrtowc (NULL, input, 5, &state);
24549      if (ret != 2) /* Solaris 7 fails here: ret is -1.  */
24550        result |= 4;
24551      if (!mbsinit (&state))
24552        result |= 8;
24553    }
24554  return result;
24555}
24556_ACEOF
24557if ac_fn_c_try_run "$LINENO"; then :
24558  gl_cv_func_mbrtowc_null_arg1=yes
24559else
24560  gl_cv_func_mbrtowc_null_arg1=no
24561fi
24562rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24563  conftest.$ac_objext conftest.beam conftest.$ac_ext
24564fi
24565
24566      fi
24567
24568fi
24569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
24570$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
24571
24572
24573
24574
24575     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
24576$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
24577if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
24578  $as_echo_n "(cached) " >&6
24579else
24580
24581                  case "$host_os" in
24582              # Guess no on OSF/1.
24583        osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
24584              # Guess yes otherwise.
24585        *)    gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
24586      esac
24587      if test $LOCALE_FR_UTF8 != none; then
24588        if test "$cross_compiling" = yes; then :
24589  :
24590else
24591  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24592/* end confdefs.h.  */
24593
24594#include <locale.h>
24595#include <string.h>
24596#include <wchar.h>
24597int main ()
24598{
24599  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24600    {
24601      mbstate_t state;
24602      wchar_t wc;
24603      int ret;
24604
24605      memset (&state, '\0', sizeof (mbstate_t));
24606      wc = (wchar_t) 0xBADFACE;
24607      mbrtowc (&wc, NULL, 5, &state);
24608      /* Check that wc was not modified.  */
24609      if (wc != (wchar_t) 0xBADFACE)
24610        return 2;
24611    }
24612  return 0;
24613}
24614_ACEOF
24615if ac_fn_c_try_run "$LINENO"; then :
24616  gl_cv_func_mbrtowc_null_arg2=yes
24617else
24618  gl_cv_func_mbrtowc_null_arg2=no
24619fi
24620rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24621  conftest.$ac_objext conftest.beam conftest.$ac_ext
24622fi
24623
24624      fi
24625
24626fi
24627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
24628$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
24629
24630
24631
24632
24633
24634
24635  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
24636$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
24637if ${gl_cv_func_mbrtowc_retval+:} false; then :
24638  $as_echo_n "(cached) " >&6
24639else
24640
24641                  case "$host_os" in
24642                                   # Guess no on HP-UX, Solaris, native Windows.
24643        hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
24644                                   # Guess yes otherwise.
24645        *)                         gl_cv_func_mbrtowc_retval="guessing yes" ;;
24646      esac
24647      if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
24648         || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
24649        if test "$cross_compiling" = yes; then :
24650  :
24651else
24652  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24653/* end confdefs.h.  */
24654
24655#include <locale.h>
24656#include <string.h>
24657#include <wchar.h>
24658int main ()
24659{
24660  int result = 0;
24661  int found_some_locale = 0;
24662  /* This fails on Solaris.  */
24663  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24664    {
24665      char input[] = "B\303\274\303\237er"; /* "Büßer" */
24666      mbstate_t state;
24667      wchar_t wc;
24668
24669      memset (&state, '\0', sizeof (mbstate_t));
24670      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24671        {
24672          input[1] = '\0';
24673          if (mbrtowc (&wc, input + 2, 5, &state) != 1)
24674            result |= 1;
24675        }
24676      found_some_locale = 1;
24677    }
24678  /* This fails on HP-UX 11.11.  */
24679  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24680    {
24681      char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
24682      mbstate_t state;
24683      wchar_t wc;
24684
24685      memset (&state, '\0', sizeof (mbstate_t));
24686      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24687        {
24688          input[1] = '\0';
24689          if (mbrtowc (&wc, input + 2, 5, &state) != 2)
24690            result |= 2;
24691        }
24692      found_some_locale = 1;
24693    }
24694  /* This fails on native Windows.  */
24695  if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
24696    {
24697      char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
24698      mbstate_t state;
24699      wchar_t wc;
24700
24701      memset (&state, '\0', sizeof (mbstate_t));
24702      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
24703        {
24704          input[3] = '\0';
24705          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
24706            result |= 4;
24707        }
24708      found_some_locale = 1;
24709    }
24710  if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
24711    {
24712      char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
24713      mbstate_t state;
24714      wchar_t wc;
24715
24716      memset (&state, '\0', sizeof (mbstate_t));
24717      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
24718        {
24719          input[3] = '\0';
24720          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
24721            result |= 8;
24722        }
24723      found_some_locale = 1;
24724    }
24725  if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
24726    {
24727      char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
24728      mbstate_t state;
24729      wchar_t wc;
24730
24731      memset (&state, '\0', sizeof (mbstate_t));
24732      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
24733        {
24734          input[3] = '\0';
24735          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
24736            result |= 16;
24737        }
24738      found_some_locale = 1;
24739    }
24740  return (found_some_locale ? result : 77);
24741}
24742_ACEOF
24743if ac_fn_c_try_run "$LINENO"; then :
24744  gl_cv_func_mbrtowc_retval=yes
24745else
24746  if test $? != 77; then
24747             gl_cv_func_mbrtowc_retval=no
24748           fi
24749
24750fi
24751rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24752  conftest.$ac_objext conftest.beam conftest.$ac_ext
24753fi
24754
24755      fi
24756
24757fi
24758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
24759$as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
24760
24761
24762
24763
24764     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
24765$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
24766if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
24767  $as_echo_n "(cached) " >&6
24768else
24769
24770                  case "$host_os" in
24771                       # Guess no on Solaris 8 and 9.
24772        solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
24773                       # Guess yes otherwise.
24774        *)             gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
24775      esac
24776      if test $LOCALE_ZH_CN != none; then
24777        if test "$cross_compiling" = yes; then :
24778  :
24779else
24780  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24781/* end confdefs.h.  */
24782
24783#include <locale.h>
24784#include <string.h>
24785#include <wchar.h>
24786int main ()
24787{
24788  /* This fails on Solaris 8 and 9.  */
24789  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
24790    {
24791      mbstate_t state;
24792      wchar_t wc;
24793
24794      memset (&state, '\0', sizeof (mbstate_t));
24795      if (mbrtowc (&wc, "", 1, &state) != 0)
24796        return 2;
24797    }
24798  return 0;
24799}
24800_ACEOF
24801if ac_fn_c_try_run "$LINENO"; then :
24802  gl_cv_func_mbrtowc_nul_retval=yes
24803else
24804  gl_cv_func_mbrtowc_nul_retval=no
24805fi
24806rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24807  conftest.$ac_objext conftest.beam conftest.$ac_ext
24808fi
24809
24810      fi
24811
24812fi
24813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
24814$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
24815
24816
24817
24818     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc stores incomplete characters" >&5
24819$as_echo_n "checking whether mbrtowc stores incomplete characters... " >&6; }
24820if ${gl_cv_func_mbrtowc_stores_incomplete+:} false; then :
24821  $as_echo_n "(cached) " >&6
24822else
24823
24824               case "$host_os" in
24825               # Guess yes on native Windows.
24826       mingw*) gl_cv_func_mbrtowc_stores_incomplete="guessing yes" ;;
24827       *)      gl_cv_func_mbrtowc_stores_incomplete="guessing no" ;;
24828     esac
24829     case "$host_os" in
24830       mingw*)
24831         if test "$cross_compiling" = yes; then :
24832  :
24833else
24834  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24835/* end confdefs.h.  */
24836
24837#include <locale.h>
24838#include <string.h>
24839#include <wchar.h>
24840int main ()
24841{
24842  int result = 0;
24843  if (setlocale (LC_ALL, "French_France.65001") != NULL)
24844    {
24845      wchar_t wc = (wchar_t) 0xBADFACE;
24846      mbstate_t state;
24847
24848      memset (&state, '\0', sizeof (mbstate_t));
24849      if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
24850          && wc != (wchar_t) 0xBADFACE)
24851        result |= 1;
24852    }
24853  if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
24854    {
24855      wchar_t wc = (wchar_t) 0xBADFACE;
24856      mbstate_t state;
24857
24858      memset (&state, '\0', sizeof (mbstate_t));
24859      if (mbrtowc (&wc, "\226", 1, &state) == (size_t)(-2)
24860          && wc != (wchar_t) 0xBADFACE)
24861        result |= 2;
24862    }
24863  if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
24864    {
24865      wchar_t wc = (wchar_t) 0xBADFACE;
24866      mbstate_t state;
24867
24868      memset (&state, '\0', sizeof (mbstate_t));
24869      if (mbrtowc (&wc, "\245", 1, &state) == (size_t)(-2)
24870          && wc != (wchar_t) 0xBADFACE)
24871        result |= 4;
24872    }
24873  if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
24874    {
24875      wchar_t wc = (wchar_t) 0xBADFACE;
24876      mbstate_t state;
24877
24878      memset (&state, '\0', sizeof (mbstate_t));
24879      if (mbrtowc (&wc, "\261", 1, &state) == (size_t)(-2)
24880          && wc != (wchar_t) 0xBADFACE)
24881        result |= 8;
24882    }
24883  return result;
24884}
24885_ACEOF
24886if ac_fn_c_try_run "$LINENO"; then :
24887  gl_cv_func_mbrtowc_stores_incomplete=no
24888else
24889  gl_cv_func_mbrtowc_stores_incomplete=yes
24890fi
24891rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24892  conftest.$ac_objext conftest.beam conftest.$ac_ext
24893fi
24894
24895         ;;
24896       *)
24897
24898         if test $LOCALE_FR_UTF8 != none; then
24899           if test "$cross_compiling" = yes; then :
24900  :
24901else
24902  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24903/* end confdefs.h.  */
24904
24905#include <locale.h>
24906#include <string.h>
24907#include <wchar.h>
24908int main ()
24909{
24910  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24911    {
24912      wchar_t wc = (wchar_t) 0xBADFACE;
24913      mbstate_t state;
24914
24915      memset (&state, '\0', sizeof (mbstate_t));
24916      if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
24917          && wc != (wchar_t) 0xBADFACE)
24918        return 1;
24919    }
24920  return 0;
24921}
24922_ACEOF
24923if ac_fn_c_try_run "$LINENO"; then :
24924  gl_cv_func_mbrtowc_stores_incomplete=no
24925else
24926  gl_cv_func_mbrtowc_stores_incomplete=yes
24927fi
24928rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24929  conftest.$ac_objext conftest.beam conftest.$ac_ext
24930fi
24931
24932         fi
24933         ;;
24934     esac
24935
24936fi
24937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_stores_incomplete" >&5
24938$as_echo "$gl_cv_func_mbrtowc_stores_incomplete" >&6; }
24939
24940
24941
24942     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
24943$as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
24944if ${gl_cv_func_mbrtowc_empty_input+:} false; then :
24945  $as_echo_n "(cached) " >&6
24946else
24947
24948                  case "$host_os" in
24949                              # Guess no on AIX and glibc systems.
24950        aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
24951                              # Guess yes on native Windows.
24952        mingw*)               gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
24953        *)                    gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
24954      esac
24955      if test "$cross_compiling" = yes; then :
24956  :
24957else
24958  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24959/* end confdefs.h.  */
24960
24961           #include <wchar.h>
24962           static wchar_t wc;
24963           static mbstate_t mbs;
24964           int
24965           main (void)
24966           {
24967             return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
24968           }
24969_ACEOF
24970if ac_fn_c_try_run "$LINENO"; then :
24971  gl_cv_func_mbrtowc_empty_input=yes
24972else
24973  gl_cv_func_mbrtowc_empty_input=no
24974fi
24975rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24976  conftest.$ac_objext conftest.beam conftest.$ac_ext
24977fi
24978
24979
24980fi
24981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
24982$as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
24983
24984
24985     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
24986$as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
24987if ${gl_cv_func_mbrtowc_C_locale_sans_EILSEQ+:} false; then :
24988  $as_echo_n "(cached) " >&6
24989else
24990
24991               gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
24992
24993     if test "$cross_compiling" = yes; then :
24994  case "$host_os" in
24995                 # Guess yes on native Windows.
24996         mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
24997       esac
24998
24999else
25000  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25001/* end confdefs.h.  */
25002#include <limits.h>
25003            #include <locale.h>
25004            #include <wchar.h>
25005
25006int
25007main ()
25008{
25009
25010            int i;
25011            char *locale = setlocale (LC_ALL, "C");
25012            if (! locale)
25013              return 2;
25014            for (i = CHAR_MIN; i <= CHAR_MAX; i++)
25015              {
25016                char c = i;
25017                wchar_t wc;
25018                mbstate_t mbs = { 0, };
25019                size_t ss = mbrtowc (&wc, &c, 1, &mbs);
25020                if (1 < ss)
25021                  return 3;
25022              }
25023            return 0;
25024
25025  ;
25026  return 0;
25027}
25028_ACEOF
25029if ac_fn_c_try_run "$LINENO"; then :
25030  gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes
25031else
25032  gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no
25033fi
25034rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25035  conftest.$ac_objext conftest.beam conftest.$ac_ext
25036fi
25037
25038
25039fi
25040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&5
25041$as_echo "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&6; }
25042
25043      case "$gl_cv_func_mbrtowc_null_arg1" in
25044        *yes) ;;
25045        *)
25046$as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
25047
25048           REPLACE_MBRTOWC=1
25049           ;;
25050      esac
25051      case "$gl_cv_func_mbrtowc_null_arg2" in
25052        *yes) ;;
25053        *)
25054$as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
25055
25056           REPLACE_MBRTOWC=1
25057           ;;
25058      esac
25059      case "$gl_cv_func_mbrtowc_retval" in
25060        *yes) ;;
25061        *)
25062$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
25063
25064           REPLACE_MBRTOWC=1
25065           ;;
25066      esac
25067      case "$gl_cv_func_mbrtowc_nul_retval" in
25068        *yes) ;;
25069        *)
25070$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
25071
25072           REPLACE_MBRTOWC=1
25073           ;;
25074      esac
25075      case "$gl_cv_func_mbrtowc_stores_incomplete" in
25076        *no) ;;
25077        *)
25078$as_echo "#define MBRTOWC_STORES_INCOMPLETE_BUG 1" >>confdefs.h
25079
25080           REPLACE_MBRTOWC=1
25081           ;;
25082      esac
25083      case "$gl_cv_func_mbrtowc_empty_input" in
25084        *yes) ;;
25085        *)
25086$as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
25087
25088           REPLACE_MBRTOWC=1
25089           ;;
25090      esac
25091      case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
25092        *yes) ;;
25093        *)
25094$as_echo "#define MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
25095
25096           REPLACE_MBRTOWC=1
25097           ;;
25098      esac
25099    fi
25100  fi
25101  if test $REPLACE_MBSTATE_T = 1; then
25102    case "$host_os" in
25103      mingw*) LIB_MBRTOWC= ;;
25104      *)
25105
25106
25107  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
25108$as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
25109if ${gl_cv_have_weak+:} false; then :
25110  $as_echo_n "(cached) " >&6
25111else
25112  gl_cv_have_weak=no
25113          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25114/* end confdefs.h.  */
25115extern void xyzzy ();
25116#pragma weak xyzzy
25117int
25118main ()
25119{
25120xyzzy();
25121  ;
25122  return 0;
25123}
25124_ACEOF
25125if ac_fn_c_try_link "$LINENO"; then :
25126  gl_cv_have_weak=maybe
25127fi
25128rm -f core conftest.err conftest.$ac_objext \
25129    conftest$ac_exeext conftest.$ac_ext
25130     if test $gl_cv_have_weak = maybe; then
25131                     if test "$cross_compiling" = yes; then :
25132                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25133/* end confdefs.h.  */
25134#ifdef __ELF__
25135             Extensible Linking Format
25136             #endif
25137
25138_ACEOF
25139if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25140  $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
25141  gl_cv_have_weak="guessing yes"
25142else
25143  gl_cv_have_weak="guessing no"
25144fi
25145rm -f conftest*
25146
25147
25148else
25149  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25150/* end confdefs.h.  */
25151
25152#include <stdio.h>
25153#pragma weak fputs
25154int main ()
25155{
25156  return (fputs == NULL);
25157}
25158_ACEOF
25159if ac_fn_c_try_run "$LINENO"; then :
25160  gl_cv_have_weak=yes
25161else
25162  gl_cv_have_weak=no
25163fi
25164rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25165  conftest.$ac_objext conftest.beam conftest.$ac_ext
25166fi
25167
25168     fi
25169          case " $LDFLAGS " in
25170       *" -static "*) gl_cv_have_weak=no ;;
25171     esac
25172                    case "$gl_cv_have_weak" in
25173       *yes)
25174         case "$host_os" in
25175           freebsd* | dragonfly*)
25176             : > conftest1.c
25177             $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
25178             cat <<EOF > conftest2.c
25179#include <pthread.h>
25180#pragma weak pthread_mutexattr_gettype
25181int main ()
25182{
25183  return (pthread_mutexattr_gettype != NULL);
25184}
25185EOF
25186             $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
25187               || gl_cv_have_weak=no
25188             rm -f conftest1.c libempty.so conftest2.c conftest
25189             ;;
25190         esac
25191         ;;
25192     esac
25193
25194fi
25195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
25196$as_echo "$gl_cv_have_weak" >&6; }
25197  case "$gl_cv_have_weak" in
25198    *yes)
25199
25200$as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
25201
25202      ;;
25203  esac
25204
25205        case "$gl_cv_have_weak" in
25206          *yes) LIB_MBRTOWC= ;;
25207          *)    LIB_MBRTOWC="$LIBPTHREAD" ;;
25208        esac
25209        ;;
25210    esac
25211  else
25212    LIB_MBRTOWC=
25213  fi
25214
25215
25216  if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
25217
25218
25219
25220
25221
25222
25223
25224
25225  gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
25226
25227    if test $REPLACE_MBSTATE_T = 1; then
25228
25229
25230
25231
25232
25233
25234
25235
25236  gl_LIBOBJS="$gl_LIBOBJS lc-charset-dispatch.$ac_objext"
25237
25238
25239
25240
25241
25242
25243
25244
25245
25246  gl_LIBOBJS="$gl_LIBOBJS mbtowc-lock.$ac_objext"
25247
25248
25249
25250
25251  CFLAG_VISIBILITY=
25252  HAVE_VISIBILITY=0
25253  if test -n "$GCC"; then
25254                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
25255$as_echo_n "checking whether the -Werror option is usable... " >&6; }
25256if ${gl_cv_cc_vis_werror+:} false; then :
25257  $as_echo_n "(cached) " >&6
25258else
25259  gl_save_CFLAGS="$CFLAGS"
25260       CFLAGS="$CFLAGS -Werror"
25261       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25262/* end confdefs.h.  */
25263
25264int
25265main ()
25266{
25267
25268  ;
25269  return 0;
25270}
25271_ACEOF
25272if ac_fn_c_try_compile "$LINENO"; then :
25273  gl_cv_cc_vis_werror=yes
25274else
25275  gl_cv_cc_vis_werror=no
25276fi
25277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25278       CFLAGS="$gl_save_CFLAGS"
25279
25280fi
25281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
25282$as_echo "$gl_cv_cc_vis_werror" >&6; }
25283        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
25284$as_echo_n "checking for simple visibility declarations... " >&6; }
25285if ${gl_cv_cc_visibility+:} false; then :
25286  $as_echo_n "(cached) " >&6
25287else
25288  gl_save_CFLAGS="$CFLAGS"
25289       CFLAGS="$CFLAGS -fvisibility=hidden"
25290                                          if test $gl_cv_cc_vis_werror = yes; then
25291         CFLAGS="$CFLAGS -Werror"
25292       fi
25293       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25294/* end confdefs.h.  */
25295extern __attribute__((__visibility__("hidden"))) int hiddenvar;
25296              extern __attribute__((__visibility__("default"))) int exportedvar;
25297              extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
25298              extern __attribute__((__visibility__("default"))) int exportedfunc (void);
25299              void dummyfunc (void) {}
25300
25301int
25302main ()
25303{
25304
25305  ;
25306  return 0;
25307}
25308_ACEOF
25309if ac_fn_c_try_compile "$LINENO"; then :
25310  gl_cv_cc_visibility=yes
25311else
25312  gl_cv_cc_visibility=no
25313fi
25314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25315       CFLAGS="$gl_save_CFLAGS"
25316
25317fi
25318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
25319$as_echo "$gl_cv_cc_visibility" >&6; }
25320    if test $gl_cv_cc_visibility = yes; then
25321      CFLAG_VISIBILITY="-fvisibility=hidden"
25322      HAVE_VISIBILITY=1
25323    fi
25324  fi
25325
25326
25327
25328cat >>confdefs.h <<_ACEOF
25329#define HAVE_VISIBILITY $HAVE_VISIBILITY
25330_ACEOF
25331
25332
25333
25334    fi
25335
25336
25337  :
25338
25339  fi
25340
25341
25342
25343
25344
25345          GNULIB_MBRTOWC=1
25346
25347
25348
25349
25350
25351$as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
25352
25353
25354
25355
25356
25357
25358
25359
25360
25361
25362
25363
25364
25365
25366
25367        if case "$host_os" in
25368       mingw*) true ;;
25369       *) test $ac_cv_func_mbsinit = yes ;;
25370     esac \
25371    && test $ac_cv_func_mbrtowc = yes; then
25372
25373
25374
25375
25376     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
25377$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
25378if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
25379  $as_echo_n "(cached) " >&6
25380else
25381
25382                  case "$host_os" in
25383                     # Guess no on AIX and OSF/1.
25384        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
25385                     # Guess yes otherwise.
25386        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
25387      esac
25388      if test $LOCALE_JA != none; then
25389        if test "$cross_compiling" = yes; then :
25390  :
25391else
25392  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25393/* end confdefs.h.  */
25394
25395#include <locale.h>
25396#include <string.h>
25397#include <wchar.h>
25398int main ()
25399{
25400  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
25401    {
25402      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
25403      mbstate_t state;
25404      wchar_t wc;
25405
25406      memset (&state, '\0', sizeof (mbstate_t));
25407      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
25408        if (mbsinit (&state))
25409          return 2;
25410    }
25411  return 0;
25412}
25413_ACEOF
25414if ac_fn_c_try_run "$LINENO"; then :
25415  gl_cv_func_mbrtowc_incomplete_state=yes
25416else
25417  gl_cv_func_mbrtowc_incomplete_state=no
25418fi
25419rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25420  conftest.$ac_objext conftest.beam conftest.$ac_ext
25421fi
25422
25423      else
25424        if test $LOCALE_FR_UTF8 != none; then
25425          if test "$cross_compiling" = yes; then :
25426  :
25427else
25428  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25429/* end confdefs.h.  */
25430
25431#include <locale.h>
25432#include <string.h>
25433#include <wchar.h>
25434int main ()
25435{
25436  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
25437    {
25438      const char input[] = "B\303\274\303\237er"; /* "Büßer" */
25439      mbstate_t state;
25440      wchar_t wc;
25441
25442      memset (&state, '\0', sizeof (mbstate_t));
25443      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
25444        if (mbsinit (&state))
25445          return 2;
25446    }
25447  return 0;
25448}
25449_ACEOF
25450if ac_fn_c_try_run "$LINENO"; then :
25451  gl_cv_func_mbrtowc_incomplete_state=yes
25452else
25453  gl_cv_func_mbrtowc_incomplete_state=no
25454fi
25455rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25456  conftest.$ac_objext conftest.beam conftest.$ac_ext
25457fi
25458
25459        fi
25460      fi
25461
25462fi
25463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
25464$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
25465
25466
25467
25468
25469     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
25470$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
25471if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
25472  $as_echo_n "(cached) " >&6
25473else
25474
25475                  case "$host_os" in
25476                    # Guess no on Solaris 8.
25477        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
25478                    # Guess yes otherwise.
25479        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
25480      esac
25481      if test $LOCALE_ZH_CN != none; then
25482        if test "$cross_compiling" = yes; then :
25483  :
25484else
25485  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25486/* end confdefs.h.  */
25487
25488#include <locale.h>
25489#include <stdlib.h>
25490#include <string.h>
25491#include <wchar.h>
25492int main ()
25493{
25494  /* This fails on Solaris 8:
25495     mbrtowc returns 2, and sets wc to 0x00F0.
25496     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
25497  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
25498    {
25499      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
25500      mbstate_t state;
25501      wchar_t wc;
25502
25503      memset (&state, '\0', sizeof (mbstate_t));
25504      if (mbrtowc (&wc, input + 3, 6, &state) != 4
25505          && mbtowc (&wc, input + 3, 6) == 4)
25506        return 2;
25507    }
25508  return 0;
25509}
25510_ACEOF
25511if ac_fn_c_try_run "$LINENO"; then :
25512  gl_cv_func_mbrtowc_sanitycheck=yes
25513else
25514  gl_cv_func_mbrtowc_sanitycheck=no
25515fi
25516rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25517  conftest.$ac_objext conftest.beam conftest.$ac_ext
25518fi
25519
25520      fi
25521
25522fi
25523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
25524$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
25525
25526    REPLACE_MBSTATE_T=0
25527    case "$gl_cv_func_mbrtowc_incomplete_state" in
25528      *yes) ;;
25529      *) REPLACE_MBSTATE_T=1 ;;
25530    esac
25531    case "$gl_cv_func_mbrtowc_sanitycheck" in
25532      *yes) ;;
25533      *) REPLACE_MBSTATE_T=1 ;;
25534    esac
25535  else
25536    REPLACE_MBSTATE_T=1
25537  fi
25538
25539
25540
25541  if test $ac_cv_func_mbsinit = no; then
25542    HAVE_MBSINIT=0
25543    ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
25544      #include <wchar.h>
25545
25546"
25547if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
25548  ac_have_decl=1
25549else
25550  ac_have_decl=0
25551fi
25552
25553cat >>confdefs.h <<_ACEOF
25554#define HAVE_DECL_MBSINIT $ac_have_decl
25555_ACEOF
25556
25557    if test $ac_cv_have_decl_mbsinit = yes; then
25558                        REPLACE_MBSINIT=1
25559    fi
25560  else
25561    if test $REPLACE_MBSTATE_T = 1; then
25562      REPLACE_MBSINIT=1
25563    else
25564                        case "$host_os" in
25565        mingw*) REPLACE_MBSINIT=1 ;;
25566      esac
25567    fi
25568  fi
25569
25570  if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
25571
25572
25573
25574
25575
25576
25577
25578
25579  gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
25580
25581
25582  :
25583
25584  fi
25585
25586
25587
25588
25589
25590          GNULIB_MBSINIT=1
25591
25592
25593
25594
25595
25596$as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
25597
25598
25599
25600
25601
25602
25603
25604
25605
25606
25607
25608
25609
25610
25611        if case "$host_os" in
25612       mingw*) true ;;
25613       *) test $ac_cv_func_mbsinit = yes ;;
25614     esac \
25615    && test $ac_cv_func_mbrtowc = yes; then
25616
25617
25618
25619
25620     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
25621$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
25622if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
25623  $as_echo_n "(cached) " >&6
25624else
25625
25626                  case "$host_os" in
25627                     # Guess no on AIX and OSF/1.
25628        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
25629                     # Guess yes otherwise.
25630        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
25631      esac
25632      if test $LOCALE_JA != none; then
25633        if test "$cross_compiling" = yes; then :
25634  :
25635else
25636  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25637/* end confdefs.h.  */
25638
25639#include <locale.h>
25640#include <string.h>
25641#include <wchar.h>
25642int main ()
25643{
25644  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
25645    {
25646      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
25647      mbstate_t state;
25648      wchar_t wc;
25649
25650      memset (&state, '\0', sizeof (mbstate_t));
25651      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
25652        if (mbsinit (&state))
25653          return 2;
25654    }
25655  return 0;
25656}
25657_ACEOF
25658if ac_fn_c_try_run "$LINENO"; then :
25659  gl_cv_func_mbrtowc_incomplete_state=yes
25660else
25661  gl_cv_func_mbrtowc_incomplete_state=no
25662fi
25663rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25664  conftest.$ac_objext conftest.beam conftest.$ac_ext
25665fi
25666
25667      else
25668        if test $LOCALE_FR_UTF8 != none; then
25669          if test "$cross_compiling" = yes; then :
25670  :
25671else
25672  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25673/* end confdefs.h.  */
25674
25675#include <locale.h>
25676#include <string.h>
25677#include <wchar.h>
25678int main ()
25679{
25680  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
25681    {
25682      const char input[] = "B\303\274\303\237er"; /* "Büßer" */
25683      mbstate_t state;
25684      wchar_t wc;
25685
25686      memset (&state, '\0', sizeof (mbstate_t));
25687      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
25688        if (mbsinit (&state))
25689          return 2;
25690    }
25691  return 0;
25692}
25693_ACEOF
25694if ac_fn_c_try_run "$LINENO"; then :
25695  gl_cv_func_mbrtowc_incomplete_state=yes
25696else
25697  gl_cv_func_mbrtowc_incomplete_state=no
25698fi
25699rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25700  conftest.$ac_objext conftest.beam conftest.$ac_ext
25701fi
25702
25703        fi
25704      fi
25705
25706fi
25707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
25708$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
25709
25710
25711
25712
25713     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
25714$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
25715if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
25716  $as_echo_n "(cached) " >&6
25717else
25718
25719                  case "$host_os" in
25720                    # Guess no on Solaris 8.
25721        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
25722                    # Guess yes otherwise.
25723        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
25724      esac
25725      if test $LOCALE_ZH_CN != none; then
25726        if test "$cross_compiling" = yes; then :
25727  :
25728else
25729  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25730/* end confdefs.h.  */
25731
25732#include <locale.h>
25733#include <stdlib.h>
25734#include <string.h>
25735#include <wchar.h>
25736int main ()
25737{
25738  /* This fails on Solaris 8:
25739     mbrtowc returns 2, and sets wc to 0x00F0.
25740     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
25741  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
25742    {
25743      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
25744      mbstate_t state;
25745      wchar_t wc;
25746
25747      memset (&state, '\0', sizeof (mbstate_t));
25748      if (mbrtowc (&wc, input + 3, 6, &state) != 4
25749          && mbtowc (&wc, input + 3, 6) == 4)
25750        return 2;
25751    }
25752  return 0;
25753}
25754_ACEOF
25755if ac_fn_c_try_run "$LINENO"; then :
25756  gl_cv_func_mbrtowc_sanitycheck=yes
25757else
25758  gl_cv_func_mbrtowc_sanitycheck=no
25759fi
25760rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25761  conftest.$ac_objext conftest.beam conftest.$ac_ext
25762fi
25763
25764      fi
25765
25766fi
25767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
25768$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
25769
25770    REPLACE_MBSTATE_T=0
25771    case "$gl_cv_func_mbrtowc_incomplete_state" in
25772      *yes) ;;
25773      *) REPLACE_MBSTATE_T=1 ;;
25774    esac
25775    case "$gl_cv_func_mbrtowc_sanitycheck" in
25776      *yes) ;;
25777      *) REPLACE_MBSTATE_T=1 ;;
25778    esac
25779  else
25780    REPLACE_MBSTATE_T=1
25781  fi
25782
25783
25784
25785  if test $ac_cv_func_mbsrtowcs = no; then
25786    HAVE_MBSRTOWCS=0
25787    ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
25788      #include <wchar.h>
25789
25790"
25791if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
25792  ac_have_decl=1
25793else
25794  ac_have_decl=0
25795fi
25796
25797cat >>confdefs.h <<_ACEOF
25798#define HAVE_DECL_MBSRTOWCS $ac_have_decl
25799_ACEOF
25800
25801    if test $ac_cv_have_decl_mbsrtowcs = yes; then
25802                        REPLACE_MBSRTOWCS=1
25803    fi
25804  else
25805    if test $REPLACE_MBSTATE_T = 1; then
25806      REPLACE_MBSRTOWCS=1
25807    else
25808
25809
25810
25811
25812
25813
25814     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
25815$as_echo_n "checking whether mbsrtowcs works... " >&6; }
25816if ${gl_cv_func_mbsrtowcs_works+:} false; then :
25817  $as_echo_n "(cached) " >&6
25818else
25819
25820                  case "$host_os" in
25821                                   # Guess no on HP-UX, Solaris, mingw.
25822        hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
25823                                   # Guess yes otherwise.
25824        *)                         gl_cv_func_mbsrtowcs_works="guessing yes" ;;
25825      esac
25826      if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
25827        if test "$cross_compiling" = yes; then :
25828  :
25829else
25830  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25831/* end confdefs.h.  */
25832
25833#include <locale.h>
25834#include <string.h>
25835#include <wchar.h>
25836int main ()
25837{
25838  int result = 0;
25839  /* Test whether the function supports a NULL destination argument.
25840     This fails on native Windows.  */
25841  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
25842    {
25843      const char input[] = "\337er";
25844      const char *src = input;
25845      mbstate_t state;
25846
25847      memset (&state, '\0', sizeof (mbstate_t));
25848      if (mbsrtowcs (NULL, &src, 1, &state) != 3
25849          || src != input)
25850        result |= 1;
25851    }
25852  /* Test whether the function works when started with a conversion state
25853     in non-initial state.  This fails on HP-UX 11.11 and Solaris 10.  */
25854  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
25855    {
25856      const char input[] = "B\303\274\303\237er";
25857      mbstate_t state;
25858
25859      memset (&state, '\0', sizeof (mbstate_t));
25860      if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
25861        if (!mbsinit (&state))
25862          {
25863            const char *src = input + 2;
25864            if (mbsrtowcs (NULL, &src, 10, &state) != 4)
25865              result |= 2;
25866          }
25867    }
25868  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
25869    {
25870      const char input[] = "<\306\374\313\334\270\354>";
25871      mbstate_t state;
25872
25873      memset (&state, '\0', sizeof (mbstate_t));
25874      if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
25875        if (!mbsinit (&state))
25876          {
25877            const char *src = input + 4;
25878            if (mbsrtowcs (NULL, &src, 10, &state) != 3)
25879              result |= 4;
25880          }
25881    }
25882  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
25883    {
25884      const char input[] = "B\250\271\201\060\211\070er";
25885      mbstate_t state;
25886
25887      memset (&state, '\0', sizeof (mbstate_t));
25888      if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
25889        if (!mbsinit (&state))
25890          {
25891            const char *src = input + 2;
25892            if (mbsrtowcs (NULL, &src, 10, &state) != 4)
25893              result |= 8;
25894          }
25895    }
25896  return result;
25897}
25898_ACEOF
25899if ac_fn_c_try_run "$LINENO"; then :
25900  gl_cv_func_mbsrtowcs_works=yes
25901else
25902  gl_cv_func_mbsrtowcs_works=no
25903fi
25904rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25905  conftest.$ac_objext conftest.beam conftest.$ac_ext
25906fi
25907
25908      fi
25909
25910fi
25911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
25912$as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
25913
25914      case "$gl_cv_func_mbsrtowcs_works" in
25915        *yes) ;;
25916        *) REPLACE_MBSRTOWCS=1 ;;
25917      esac
25918    fi
25919  fi
25920
25921  if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
25922
25923
25924
25925
25926
25927
25928
25929
25930  gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
25931
25932
25933
25934
25935
25936
25937
25938
25939
25940  gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
25941
25942
25943  :
25944
25945  fi
25946
25947
25948
25949
25950
25951          GNULIB_MBSRTOWCS=1
25952
25953
25954
25955
25956
25957$as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
25958
25959
25960
25961
25962
25963
25964  for ac_func in mbtowc
25965do :
25966  ac_fn_c_check_func "$LINENO" "mbtowc" "ac_cv_func_mbtowc"
25967if test "x$ac_cv_func_mbtowc" = xyes; then :
25968  cat >>confdefs.h <<_ACEOF
25969#define HAVE_MBTOWC 1
25970_ACEOF
25971
25972fi
25973done
25974
25975  if test $ac_cv_func_mbtowc = no; then
25976    HAVE_MBTOWC=0
25977  else
25978    if false; then
25979      REPLACE_MBTOWC=1
25980    fi
25981  fi
25982
25983  if test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1; then
25984
25985
25986
25987
25988
25989
25990
25991
25992  gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext"
25993
25994
25995  :
25996
25997  fi
25998
25999
26000
26001
26002
26003          GNULIB_MBTOWC=1
26004
26005
26006
26007
26008
26009$as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
26010
26011
26012
26013
26014  if test $REPLACE_MEMCHR = 1; then
26015
26016
26017
26018
26019
26020
26021
26022
26023  gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
26024
26025
26026  for ac_header in bp-sym.h
26027do :
26028  ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
26029if test "x$ac_cv_header_bp_sym_h" = xyes; then :
26030  cat >>confdefs.h <<_ACEOF
26031#define HAVE_BP_SYM_H 1
26032_ACEOF
26033
26034fi
26035
26036done
26037
26038
26039  fi
26040
26041
26042
26043
26044
26045          GNULIB_MEMCHR=1
26046
26047
26048
26049
26050
26051$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
26052
26053
26054
26055
26056
26057  if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then
26058    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
26059$as_echo_n "checking whether memmem works in linear time... " >&6; }
26060if ${gl_cv_func_memmem_works_fast+:} false; then :
26061  $as_echo_n "(cached) " >&6
26062else
26063  if test "$cross_compiling" = yes; then :
26064                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26065/* end confdefs.h.  */
26066
26067#include <features.h>
26068#ifdef __GNU_LIBRARY__
26069 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)) \
26070     && !defined __UCLIBC__
26071  Lucky user
26072 #endif
26073#endif
26074#ifdef __CYGWIN__
26075 #include <cygwin/version.h>
26076 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 0)
26077  Lucky user
26078 #endif
26079#endif
26080
26081_ACEOF
26082if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26083  $EGREP "Lucky user" >/dev/null 2>&1; then :
26084  gl_cv_func_memmem_works_fast="guessing yes"
26085else
26086  gl_cv_func_memmem_works_fast="$gl_cross_guess_normal"
26087fi
26088rm -f conftest*
26089
26090
26091else
26092  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26093/* end confdefs.h.  */
26094
26095#include <signal.h> /* for signal */
26096#include <string.h> /* for memmem */
26097#include <stdlib.h> /* for malloc */
26098#include <unistd.h> /* for alarm */
26099static void quit (int sig) { _exit (sig + 128); }
26100
26101int
26102main ()
26103{
26104
26105    int result = 0;
26106    size_t m = 1000000;
26107    char *haystack = (char *) malloc (2 * m + 1);
26108    char *needle = (char *) malloc (m + 1);
26109    /* Failure to compile this test due to missing alarm is okay,
26110       since all such platforms (mingw) also lack memmem.  */
26111    signal (SIGALRM, quit);
26112    alarm (5);
26113    /* Check for quadratic performance.  */
26114    if (haystack && needle)
26115      {
26116        memset (haystack, 'A', 2 * m);
26117        haystack[2 * m] = 'B';
26118        memset (needle, 'A', m);
26119        needle[m] = 'B';
26120        if (!memmem (haystack, 2 * m + 1, needle, m + 1))
26121          result |= 1;
26122      }
26123    /* Free allocated memory, in case some sanitizer is watching.  */
26124    free (haystack);
26125    free (needle);
26126    return result;
26127
26128  ;
26129  return 0;
26130}
26131_ACEOF
26132if ac_fn_c_try_run "$LINENO"; then :
26133  gl_cv_func_memmem_works_fast=yes
26134else
26135  gl_cv_func_memmem_works_fast=no
26136fi
26137rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26138  conftest.$ac_objext conftest.beam conftest.$ac_ext
26139fi
26140
26141
26142fi
26143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_fast" >&5
26144$as_echo "$gl_cv_func_memmem_works_fast" >&6; }
26145    case "$gl_cv_func_memmem_works_fast" in
26146      *yes) ;;
26147      *)
26148        REPLACE_MEMMEM=1
26149        ;;
26150    esac
26151  fi
26152
26153  if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
26154
26155
26156
26157
26158
26159
26160
26161
26162  gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
26163
26164  fi
26165
26166
26167
26168
26169  for ac_func in memmem
26170do :
26171  ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
26172if test "x$ac_cv_func_memmem" = xyes; then :
26173  cat >>confdefs.h <<_ACEOF
26174#define HAVE_MEMMEM 1
26175_ACEOF
26176
26177fi
26178done
26179
26180  if test $ac_cv_func_memmem = yes; then
26181    HAVE_MEMMEM=1
26182  else
26183    HAVE_MEMMEM=0
26184  fi
26185
26186  if test $ac_cv_have_decl_memmem = no; then
26187    HAVE_DECL_MEMMEM=0
26188  else
26189            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
26190$as_echo_n "checking whether memmem works... " >&6; }
26191if ${gl_cv_func_memmem_works_always+:} false; then :
26192  $as_echo_n "(cached) " >&6
26193else
26194  if test "$cross_compiling" = yes; then :
26195                                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26196/* end confdefs.h.  */
26197
26198#ifdef __GNU_LIBRARY__
26199 #include <features.h>
26200 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
26201                          || __GLIBC_MINOR__ > 12)) \
26202      || (__GLIBC__ > 2)) \
26203     || defined __UCLIBC__
26204  Lucky user
26205 #endif
26206#elif defined __CYGWIN__
26207 #include <cygwin/version.h>
26208 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
26209  Lucky user
26210 #endif
26211#else
26212  Lucky user
26213#endif
26214
26215_ACEOF
26216if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26217  $EGREP "Lucky user" >/dev/null 2>&1; then :
26218  gl_cv_func_memmem_works_always="guessing yes"
26219else
26220  gl_cv_func_memmem_works_always="$gl_cross_guess_normal"
26221fi
26222rm -f conftest*
26223
26224
26225else
26226  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26227/* end confdefs.h.  */
26228
26229#include <string.h> /* for memmem */
26230#define P "_EF_BF_BD"
26231#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
26232#define NEEDLE P P P P P
26233
26234int
26235main ()
26236{
26237
26238    int result = 0;
26239    if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
26240      result |= 1;
26241    /* Check for empty needle behavior.  */
26242    {
26243      const char *haystack = "AAA";
26244      if (memmem (haystack, 3, (const char *) 1, 0) != haystack)
26245        result |= 2;
26246    }
26247    return result;
26248
26249  ;
26250  return 0;
26251}
26252_ACEOF
26253if ac_fn_c_try_run "$LINENO"; then :
26254  gl_cv_func_memmem_works_always=yes
26255else
26256  gl_cv_func_memmem_works_always=no
26257fi
26258rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26259  conftest.$ac_objext conftest.beam conftest.$ac_ext
26260fi
26261
26262
26263fi
26264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
26265$as_echo "$gl_cv_func_memmem_works_always" >&6; }
26266    case "$gl_cv_func_memmem_works_always" in
26267      *yes) ;;
26268      *)
26269        REPLACE_MEMMEM=1
26270        ;;
26271    esac
26272  fi
26273  :
26274
26275  if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
26276
26277
26278
26279
26280
26281
26282
26283
26284  gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
26285
26286  fi
26287
26288
26289
26290
26291
26292          GNULIB_MEMMEM=1
26293
26294
26295
26296
26297
26298$as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
26299
26300
26301
26302
26303
26304
26305
26306
26307
26308  for ac_func in mempcpy
26309do :
26310  ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
26311if test "x$ac_cv_func_mempcpy" = xyes; then :
26312  cat >>confdefs.h <<_ACEOF
26313#define HAVE_MEMPCPY 1
26314_ACEOF
26315
26316fi
26317done
26318
26319  if test $ac_cv_func_mempcpy = no; then
26320    HAVE_MEMPCPY=0
26321  fi
26322
26323  if test $HAVE_MEMPCPY = 0; then
26324
26325
26326
26327
26328
26329
26330
26331
26332  gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
26333
26334
26335  :
26336
26337  fi
26338
26339
26340
26341
26342
26343          GNULIB_MEMPCPY=1
26344
26345
26346
26347
26348
26349$as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
26350
26351
26352
26353
26354
26355
26356
26357
26358  if test $ac_cv_have_decl_memrchr = no; then
26359    HAVE_DECL_MEMRCHR=0
26360  fi
26361
26362  for ac_func in memrchr
26363do :
26364  ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
26365if test "x$ac_cv_func_memrchr" = xyes; then :
26366  cat >>confdefs.h <<_ACEOF
26367#define HAVE_MEMRCHR 1
26368_ACEOF
26369
26370fi
26371done
26372
26373
26374  if test $ac_cv_func_memrchr = no; then
26375
26376
26377
26378
26379
26380
26381
26382
26383  gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
26384
26385    :
26386  fi
26387
26388
26389
26390
26391
26392          GNULIB_MEMRCHR=1
26393
26394
26395
26396
26397
26398$as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
26399
26400
26401
26402
26403
26404
26405
26406
26407  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
26408$as_echo_n "checking whether mkdir handles trailing slash... " >&6; }
26409if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then :
26410  $as_echo_n "(cached) " >&6
26411else
26412  rm -rf conftest.dir
26413     if test "$cross_compiling" = yes; then :
26414  case "$host_os" in
26415                           # Guess yes on Linux systems.
26416          linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
26417                           # Guess yes on glibc systems.
26418          *-gnu* | gnu*)   gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
26419                           # Guess yes on MSVC, no on mingw.
26420          mingw*)          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26421/* end confdefs.h.  */
26422
26423#ifdef _MSC_VER
26424 Known
26425#endif
26426
26427_ACEOF
26428if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26429  $EGREP "Known" >/dev/null 2>&1; then :
26430  gl_cv_func_mkdir_trailing_slash_works="guessing yes"
26431else
26432  gl_cv_func_mkdir_trailing_slash_works="guessing no"
26433fi
26434rm -f conftest*
26435
26436                           ;;
26437                           # If we don't know, obey --enable-cross-guesses.
26438          *)               gl_cv_func_mkdir_trailing_slash_works="$gl_cross_guess_normal" ;;
26439        esac
26440
26441else
26442  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26443/* end confdefs.h.  */
26444
26445          #include <sys/types.h>
26446          #include <sys/stat.h>
26447
26448
26449$gl_mda_defines
26450
26451int
26452main ()
26453{
26454return mkdir ("conftest.dir/", 0700);
26455  ;
26456  return 0;
26457}
26458_ACEOF
26459if ac_fn_c_try_run "$LINENO"; then :
26460  gl_cv_func_mkdir_trailing_slash_works=yes
26461else
26462  gl_cv_func_mkdir_trailing_slash_works=no
26463fi
26464rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26465  conftest.$ac_objext conftest.beam conftest.$ac_ext
26466fi
26467
26468     rm -rf conftest.dir
26469
26470fi
26471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
26472$as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
26473  case "$gl_cv_func_mkdir_trailing_slash_works" in
26474    *yes) ;;
26475    *)
26476      REPLACE_MKDIR=1
26477      ;;
26478  esac
26479
26480  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
26481$as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
26482if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then :
26483  $as_echo_n "(cached) " >&6
26484else
26485  rm -rf conftest.dir
26486     if test "$cross_compiling" = yes; then :
26487  case "$host_os" in
26488                         # Guess yes on glibc systems.
26489          *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
26490                         # Guess yes on musl systems.
26491          *-musl*)       gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
26492                         # Guess no on native Windows.
26493          mingw*)        gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
26494                         # If we don't know, obey --enable-cross-guesses.
26495          *)             gl_cv_func_mkdir_trailing_dot_works="$gl_cross_guess_normal" ;;
26496        esac
26497
26498else
26499  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26500/* end confdefs.h.  */
26501
26502          #include <sys/types.h>
26503          #include <sys/stat.h>
26504
26505
26506$gl_mda_defines
26507
26508int
26509main ()
26510{
26511return !mkdir ("conftest.dir/./", 0700);
26512  ;
26513  return 0;
26514}
26515_ACEOF
26516if ac_fn_c_try_run "$LINENO"; then :
26517  gl_cv_func_mkdir_trailing_dot_works=yes
26518else
26519  gl_cv_func_mkdir_trailing_dot_works=no
26520fi
26521rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26522  conftest.$ac_objext conftest.beam conftest.$ac_ext
26523fi
26524
26525     rm -rf conftest.dir
26526
26527
26528fi
26529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
26530$as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
26531  case "$gl_cv_func_mkdir_trailing_dot_works" in
26532    *yes) ;;
26533    *)
26534      REPLACE_MKDIR=1
26535
26536$as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
26537
26538      ;;
26539  esac
26540
26541  if test $REPLACE_MKDIR = 1; then
26542
26543
26544
26545
26546
26547
26548
26549
26550  gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
26551
26552  fi
26553
26554
26555
26556
26557
26558          GNULIB_MKDIR=1
26559
26560
26561
26562
26563
26564$as_echo "#define GNULIB_TEST_MKDIR 1" >>confdefs.h
26565
26566
26567
26568
26569
26570  for ac_func in mkdtemp
26571do :
26572  ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
26573if test "x$ac_cv_func_mkdtemp" = xyes; then :
26574  cat >>confdefs.h <<_ACEOF
26575#define HAVE_MKDTEMP 1
26576_ACEOF
26577
26578fi
26579done
26580
26581  if test $ac_cv_func_mkdtemp = no; then
26582    HAVE_MKDTEMP=0
26583  fi
26584
26585  if test $HAVE_MKDTEMP = 0; then
26586
26587
26588
26589
26590
26591
26592
26593
26594  gl_LIBOBJS="$gl_LIBOBJS mkdtemp.$ac_objext"
26595
26596    :
26597
26598  fi
26599
26600
26601
26602
26603
26604          GNULIB_MKDTEMP=1
26605
26606
26607
26608
26609
26610$as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
26611
26612
26613
26614
26615
26616
26617
26618
26619
26620  if test $ac_cv_func_mkostemp != yes; then
26621    HAVE_MKOSTEMP=0
26622  fi
26623
26624  if test $HAVE_MKOSTEMP = 0; then
26625
26626
26627
26628
26629
26630
26631
26632
26633  gl_LIBOBJS="$gl_LIBOBJS mkostemp.$ac_objext"
26634
26635
26636
26637  fi
26638
26639
26640cat >>confdefs.h <<_ACEOF
26641#define GNULIB_MKOSTEMP 1
26642_ACEOF
26643
26644
26645
26646
26647
26648
26649
26650          GNULIB_MKOSTEMP=1
26651
26652
26653
26654
26655
26656$as_echo "#define GNULIB_TEST_MKOSTEMP 1" >>confdefs.h
26657
26658
26659
26660
26661  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
26662
26663
26664
26665
26666
26667
26668
26669
26670  gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
26671
26672  fi
26673
26674  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
26675
26676
26677
26678
26679
26680
26681
26682
26683  gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
26684
26685  fi
26686
26687
26688cat >>confdefs.h <<_ACEOF
26689#define GNULIB_MSVC_NOTHROW 1
26690_ACEOF
26691
26692
26693
26694
26695
26696
26697
26698
26699
26700
26701
26702
26703
26704
26705     if test $gl_cv_have_include_next = yes; then
26706       gl_cv_next_netdb_h='<'netdb.h'>'
26707     else
26708       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netdb.h>" >&5
26709$as_echo_n "checking absolute name of <netdb.h>... " >&6; }
26710if ${gl_cv_next_netdb_h+:} false; then :
26711  $as_echo_n "(cached) " >&6
26712else
26713
26714             if test $ac_cv_header_netdb_h = yes; then
26715
26716
26717
26718
26719  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26720/* end confdefs.h.  */
26721#include <netdb.h>
26722_ACEOF
26723                case "$host_os" in
26724    aix*) gl_absname_cpp="$ac_cpp -C" ;;
26725    *)    gl_absname_cpp="$ac_cpp" ;;
26726  esac
26727
26728  case "$host_os" in
26729    mingw*)
26730                                          gl_dirsep_regex='[/\\]'
26731      ;;
26732    *)
26733      gl_dirsep_regex='\/'
26734      ;;
26735  esac
26736      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26737  gl_header_literal_regex=`echo 'netdb.h' \
26738                           | sed -e "$gl_make_literal_regex_sed"`
26739  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26740      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26741      s|^/[^/]|//&|
26742      p
26743      q
26744    }'
26745
26746        gl_cv_absolute_netdb_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26747  sed -n "$gl_absolute_header_sed"`
26748
26749           gl_header=$gl_cv_absolute_netdb_h
26750           gl_cv_next_netdb_h='"'$gl_header'"'
26751          else
26752               gl_cv_next_netdb_h='<'netdb.h'>'
26753             fi
26754
26755
26756fi
26757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netdb_h" >&5
26758$as_echo "$gl_cv_next_netdb_h" >&6; }
26759     fi
26760     NEXT_NETDB_H=$gl_cv_next_netdb_h
26761
26762     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26763       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26764       gl_next_as_first_directive='<'netdb.h'>'
26765     else
26766       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26767       gl_next_as_first_directive=$gl_cv_next_netdb_h
26768     fi
26769     NEXT_AS_FIRST_DIRECTIVE_NETDB_H=$gl_next_as_first_directive
26770
26771
26772
26773
26774  if test $ac_cv_header_netdb_h = yes; then
26775    HAVE_NETDB_H=1
26776  else
26777    HAVE_NETDB_H=0
26778  fi
26779
26780
26781
26782
26783
26784
26785
26786  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
26787$as_echo_n "checking whether <netinet/in.h> is self-contained... " >&6; }
26788if ${gl_cv_header_netinet_in_h_selfcontained+:} false; then :
26789  $as_echo_n "(cached) " >&6
26790else
26791
26792      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26793/* end confdefs.h.  */
26794#include <netinet/in.h>
26795int
26796main ()
26797{
26798
26799  ;
26800  return 0;
26801}
26802_ACEOF
26803if ac_fn_c_try_compile "$LINENO"; then :
26804  gl_cv_header_netinet_in_h_selfcontained=yes
26805else
26806  gl_cv_header_netinet_in_h_selfcontained=no
26807fi
26808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26809
26810fi
26811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
26812$as_echo "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
26813  if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
26814    NETINET_IN_H=''
26815  else
26816    NETINET_IN_H='netinet/in.h'
26817    for ac_header in netinet/in.h
26818do :
26819  ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
26820if test "x$ac_cv_header_netinet_in_h" = xyes; then :
26821  cat >>confdefs.h <<_ACEOF
26822#define HAVE_NETINET_IN_H 1
26823_ACEOF
26824
26825fi
26826
26827done
26828
26829
26830
26831
26832
26833
26834
26835
26836
26837
26838     if test $gl_cv_have_include_next = yes; then
26839       gl_cv_next_netinet_in_h='<'netinet/in.h'>'
26840     else
26841       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5
26842$as_echo_n "checking absolute name of <netinet/in.h>... " >&6; }
26843if ${gl_cv_next_netinet_in_h+:} false; then :
26844  $as_echo_n "(cached) " >&6
26845else
26846
26847             if test $ac_cv_header_netinet_in_h = yes; then
26848
26849
26850
26851
26852  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26853/* end confdefs.h.  */
26854#include <netinet/in.h>
26855_ACEOF
26856                case "$host_os" in
26857    aix*) gl_absname_cpp="$ac_cpp -C" ;;
26858    *)    gl_absname_cpp="$ac_cpp" ;;
26859  esac
26860
26861  case "$host_os" in
26862    mingw*)
26863                                          gl_dirsep_regex='[/\\]'
26864      ;;
26865    *)
26866      gl_dirsep_regex='\/'
26867      ;;
26868  esac
26869      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26870  gl_header_literal_regex=`echo 'netinet/in.h' \
26871                           | sed -e "$gl_make_literal_regex_sed"`
26872  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26873      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26874      s|^/[^/]|//&|
26875      p
26876      q
26877    }'
26878
26879        gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26880  sed -n "$gl_absolute_header_sed"`
26881
26882           gl_header=$gl_cv_absolute_netinet_in_h
26883           gl_cv_next_netinet_in_h='"'$gl_header'"'
26884          else
26885               gl_cv_next_netinet_in_h='<'netinet/in.h'>'
26886             fi
26887
26888
26889fi
26890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5
26891$as_echo "$gl_cv_next_netinet_in_h" >&6; }
26892     fi
26893     NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
26894
26895     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26896       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26897       gl_next_as_first_directive='<'netinet/in.h'>'
26898     else
26899       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26900       gl_next_as_first_directive=$gl_cv_next_netinet_in_h
26901     fi
26902     NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive
26903
26904
26905
26906
26907    if test $ac_cv_header_netinet_in_h = yes; then
26908      HAVE_NETINET_IN_H=1
26909    else
26910      HAVE_NETINET_IN_H=0
26911    fi
26912
26913  fi
26914
26915   if test -n "$NETINET_IN_H"; then
26916  GL_GENERATE_NETINET_IN_H_TRUE=
26917  GL_GENERATE_NETINET_IN_H_FALSE='#'
26918else
26919  GL_GENERATE_NETINET_IN_H_TRUE='#'
26920  GL_GENERATE_NETINET_IN_H_FALSE=
26921fi
26922
26923
26924
26925
26926
26927
26928  case "$host_os" in
26929    mingw* | pw*)
26930      REPLACE_OPEN=1
26931      ;;
26932    *)
26933
26934      if test "$gl_cv_macro_O_CLOEXEC" != yes; then
26935        REPLACE_OPEN=1
26936      fi
26937
26938
26939  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
26940$as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
26941if ${gl_cv_func_open_slash+:} false; then :
26942  $as_echo_n "(cached) " >&6
26943else
26944  # Assume that if we have lstat, we can also check symlinks.
26945     if test $ac_cv_func_lstat = yes; then
26946       touch conftest.tmp
26947       ln -s conftest.tmp conftest.lnk
26948     fi
26949     if test "$cross_compiling" = yes; then :
26950
26951        case "$host_os" in
26952          freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
26953            gl_cv_func_open_slash="guessing no" ;;
26954          *)
26955            gl_cv_func_open_slash="guessing yes" ;;
26956        esac
26957
26958else
26959  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26960/* end confdefs.h.  */
26961
26962#include <fcntl.h>
26963#if HAVE_UNISTD_H
26964# include <unistd.h>
26965#endif
26966
26967
26968$gl_mda_defines
26969
26970int main ()
26971{
26972  int result = 0;
26973#if HAVE_LSTAT
26974  if (open ("conftest.lnk/", O_RDONLY) != -1)
26975    result |= 1;
26976#endif
26977  if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
26978    result |= 2;
26979  return result;
26980}
26981_ACEOF
26982if ac_fn_c_try_run "$LINENO"; then :
26983  gl_cv_func_open_slash=yes
26984else
26985  gl_cv_func_open_slash=no
26986fi
26987rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26988  conftest.$ac_objext conftest.beam conftest.$ac_ext
26989fi
26990
26991     rm -f conftest.sl conftest.tmp conftest.lnk
26992
26993fi
26994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
26995$as_echo "$gl_cv_func_open_slash" >&6; }
26996  case "$gl_cv_func_open_slash" in
26997    *no)
26998
26999$as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
27000
27001      ;;
27002  esac
27003
27004      case "$gl_cv_func_open_slash" in
27005        *no)
27006          REPLACE_OPEN=1
27007          ;;
27008      esac
27009      ;;
27010  esac
27011
27012    if test $REPLACE_OPEN = 0; then
27013
27014
27015
27016  if test $ac_cv_func_fchdir = no; then
27017    HAVE_FCHDIR=0
27018  fi
27019
27020      if test $HAVE_FCHDIR = 0; then
27021        REPLACE_OPEN=1
27022      fi
27023    fi
27024
27025
27026
27027  if test $REPLACE_OPEN = 1; then
27028
27029
27030
27031
27032
27033
27034
27035
27036  gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
27037
27038
27039
27040  :
27041
27042  fi
27043
27044
27045
27046
27047
27048          GNULIB_OPEN=1
27049
27050
27051
27052
27053
27054$as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
27055
27056
27057
27058
27059
27060
27061
27062
27063
27064  case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink+$gl_cv_macro_O_CLOEXEC in
27065  yes+*yes+yes)
27066    ;;
27067  yes+*)
27068    # Solaris 10 lacks O_CLOEXEC.
27069    # Solaris 9 has *at functions, but uniformly mishandles trailing
27070    # slash in all of them.
27071    REPLACE_OPENAT=1
27072    ;;
27073  *)
27074    HAVE_OPENAT=0
27075    ;;
27076  esac
27077
27078  if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
27079
27080
27081
27082
27083
27084
27085
27086
27087  gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
27088
27089
27090
27091  :
27092
27093  fi
27094
27095
27096cat >>confdefs.h <<_ACEOF
27097#define GNULIB_OPENAT 1
27098_ACEOF
27099
27100
27101
27102
27103
27104
27105          GNULIB_OPENAT=1
27106
27107
27108
27109
27110
27111$as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
27112
27113
27114
27115
27116
27117
27118  for ac_func in opendir
27119do :
27120  ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
27121if test "x$ac_cv_func_opendir" = xyes; then :
27122  cat >>confdefs.h <<_ACEOF
27123#define HAVE_OPENDIR 1
27124_ACEOF
27125
27126fi
27127done
27128
27129  if test $ac_cv_func_opendir = no; then
27130    HAVE_OPENDIR=0
27131  fi
27132
27133
27134
27135
27136  if test $ac_cv_func_fchdir = no; then
27137    HAVE_FCHDIR=0
27138  fi
27139
27140    if test $HAVE_FCHDIR = 0; then
27141      if test $HAVE_OPENDIR = 1; then
27142        REPLACE_OPENDIR=1
27143      fi
27144    fi
27145
27146      case $host_os,$HAVE_OPENDIR in
27147    os2*,1)
27148      REPLACE_OPENDIR=1;;
27149  esac
27150
27151  if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
27152
27153
27154
27155
27156
27157
27158
27159
27160  gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
27161
27162  fi
27163
27164
27165
27166
27167
27168          GNULIB_OPENDIR=1
27169
27170
27171
27172
27173
27174$as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
27175
27176
27177
27178
27179
27180
27181
27182
27183
27184
27185  if test $ac_cv_func_pipe != yes; then
27186    HAVE_PIPE=0
27187  fi
27188
27189  if test $HAVE_PIPE = 0; then
27190
27191
27192
27193
27194
27195
27196
27197
27198  gl_LIBOBJS="$gl_LIBOBJS pipe.$ac_objext"
27199
27200  fi
27201
27202
27203
27204
27205
27206          GNULIB_PIPE=1
27207
27208
27209
27210
27211
27212$as_echo "#define GNULIB_TEST_PIPE 1" >>confdefs.h
27213
27214
27215
27216
27217
27218
27219
27220  for ac_func in rawmemchr
27221do :
27222  ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
27223if test "x$ac_cv_func_rawmemchr" = xyes; then :
27224  cat >>confdefs.h <<_ACEOF
27225#define HAVE_RAWMEMCHR 1
27226_ACEOF
27227
27228fi
27229done
27230
27231  if test $ac_cv_func_rawmemchr = no; then
27232    HAVE_RAWMEMCHR=0
27233  fi
27234
27235  if test $HAVE_RAWMEMCHR = 0; then
27236
27237
27238
27239
27240
27241
27242
27243
27244  gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
27245
27246    :
27247  fi
27248
27249
27250
27251
27252
27253          GNULIB_RAWMEMCHR=1
27254
27255
27256
27257
27258
27259$as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
27260
27261
27262
27263
27264
27265
27266  for ac_func in readdir
27267do :
27268  ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
27269if test "x$ac_cv_func_readdir" = xyes; then :
27270  cat >>confdefs.h <<_ACEOF
27271#define HAVE_READDIR 1
27272_ACEOF
27273
27274fi
27275done
27276
27277  if test $ac_cv_func_readdir = no; then
27278    HAVE_READDIR=0
27279  fi
27280
27281  if test $HAVE_READDIR = 0; then
27282
27283
27284
27285
27286
27287
27288
27289
27290  gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
27291
27292  fi
27293
27294
27295
27296
27297
27298          GNULIB_READDIR=1
27299
27300
27301
27302
27303
27304$as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
27305
27306
27307
27308
27309
27310
27311  if test $ac_cv_func_readlink = no; then
27312    HAVE_READLINK=0
27313  else
27314    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
27315$as_echo_n "checking whether readlink signature is correct... " >&6; }
27316if ${gl_cv_decl_readlink_works+:} false; then :
27317  $as_echo_n "(cached) " >&6
27318else
27319  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27320/* end confdefs.h.  */
27321#include <unistd.h>
27322      /* Cause compilation failure if original declaration has wrong type.  */
27323      ssize_t readlink (const char *, char *, size_t);
27324int
27325main ()
27326{
27327
27328  ;
27329  return 0;
27330}
27331_ACEOF
27332if ac_fn_c_try_compile "$LINENO"; then :
27333  gl_cv_decl_readlink_works=yes
27334else
27335  gl_cv_decl_readlink_works=no
27336fi
27337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27338fi
27339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
27340$as_echo "$gl_cv_decl_readlink_works" >&6; }
27341            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
27342$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
27343if ${gl_cv_func_readlink_trailing_slash+:} false; then :
27344  $as_echo_n "(cached) " >&6
27345else
27346  # We have readlink, so assume ln -s works.
27347       ln -s conftest.no-such conftest.link
27348       ln -s conftest.link conftest.lnk2
27349       if test "$cross_compiling" = yes; then :
27350  case "$host_os" in
27351            # Guess yes on Linux or glibc systems.
27352            linux-* | linux | *-gnu* | gnu*)
27353              gl_cv_func_readlink_trailing_slash="guessing yes" ;;
27354            # Guess no on AIX or HP-UX.
27355            aix* | hpux*)
27356              gl_cv_func_readlink_trailing_slash="guessing no" ;;
27357            # If we don't know, obey --enable-cross-guesses.
27358            *)
27359              gl_cv_func_readlink_trailing_slash="$gl_cross_guess_normal" ;;
27360          esac
27361
27362else
27363  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27364/* end confdefs.h.  */
27365#include <unistd.h>
27366
27367int
27368main ()
27369{
27370char buf[20];
27371      return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
27372  ;
27373  return 0;
27374}
27375_ACEOF
27376if ac_fn_c_try_run "$LINENO"; then :
27377  gl_cv_func_readlink_trailing_slash=yes
27378else
27379  gl_cv_func_readlink_trailing_slash=no
27380fi
27381rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27382  conftest.$ac_objext conftest.beam conftest.$ac_ext
27383fi
27384
27385      rm -f conftest.link conftest.lnk2
27386fi
27387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_trailing_slash" >&5
27388$as_echo "$gl_cv_func_readlink_trailing_slash" >&6; }
27389    case "$gl_cv_func_readlink_trailing_slash" in
27390      *yes)
27391        if test "$gl_cv_decl_readlink_works" != yes; then
27392          REPLACE_READLINK=1
27393        fi
27394        ;;
27395      *)
27396
27397$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
27398
27399        REPLACE_READLINK=1
27400        ;;
27401    esac
27402
27403    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink truncates results correctly" >&5
27404$as_echo_n "checking whether readlink truncates results correctly... " >&6; }
27405if ${gl_cv_func_readlink_truncate+:} false; then :
27406  $as_echo_n "(cached) " >&6
27407else
27408  # We have readlink, so assume ln -s works.
27409       ln -s ab conftest.link
27410       if test "$cross_compiling" = yes; then :
27411  case "$host_os" in
27412            # Guess yes on Linux or glibc systems.
27413            linux-* | linux | *-gnu* | gnu*)
27414              gl_cv_func_readlink_truncate="guessing yes" ;;
27415            # Guess no on AIX or HP-UX.
27416            aix* | hpux*)
27417              gl_cv_func_readlink_truncate="guessing no" ;;
27418            # If we don't know, obey --enable-cross-guesses.
27419            *)
27420              gl_cv_func_readlink_truncate="$gl_cross_guess_normal" ;;
27421          esac
27422
27423else
27424  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27425/* end confdefs.h.  */
27426#include <unistd.h>
27427
27428int
27429main ()
27430{
27431char c;
27432      return readlink ("conftest.link", &c, 1) != 1;
27433  ;
27434  return 0;
27435}
27436_ACEOF
27437if ac_fn_c_try_run "$LINENO"; then :
27438  gl_cv_func_readlink_truncate=yes
27439else
27440  gl_cv_func_readlink_truncate=no
27441fi
27442rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27443  conftest.$ac_objext conftest.beam conftest.$ac_ext
27444fi
27445
27446      rm -f conftest.link conftest.lnk2
27447fi
27448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_truncate" >&5
27449$as_echo "$gl_cv_func_readlink_truncate" >&6; }
27450    case $gl_cv_func_readlink_truncate in
27451      *yes)
27452        if test "$gl_cv_decl_readlink_works" != yes; then
27453          REPLACE_READLINK=1
27454        fi
27455        ;;
27456      *)
27457
27458$as_echo "#define READLINK_TRUNCATE_BUG 1" >>confdefs.h
27459
27460        REPLACE_READLINK=1
27461        ;;
27462    esac
27463  fi
27464
27465  if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
27466
27467
27468
27469
27470
27471
27472
27473
27474  gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
27475
27476
27477  :
27478
27479  fi
27480
27481
27482
27483
27484
27485          GNULIB_READLINK=1
27486
27487
27488
27489
27490
27491$as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
27492
27493
27494
27495
27496
27497
27498  if test $gl_cv_func_malloc_posix = yes; then
27499
27500$as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
27501
27502  else
27503    REPLACE_REALLOC=1
27504  fi
27505
27506  if test $REPLACE_REALLOC = 1; then
27507
27508
27509
27510
27511
27512
27513
27514
27515  gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
27516
27517  fi
27518
27519
27520
27521
27522
27523          GNULIB_REALLOC_POSIX=1
27524
27525
27526
27527
27528
27529$as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
27530
27531
27532
27533
27534
27535
27536
27537
27538                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
27539$as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
27540if ${gl_cv_func_rename_slash_dst_works+:} false; then :
27541  $as_echo_n "(cached) " >&6
27542else
27543  rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
27544    touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
27545      as_fn_error $? "cannot create temporary files" "$LINENO" 5
27546    # Assume that if we have lstat, we can also check symlinks.
27547    if test $ac_cv_func_lstat = yes; then
27548      ln -s conftest.f conftest.lnk
27549    fi
27550    if test "$cross_compiling" = yes; then :
27551        case "$host_os" in
27552                          # Guess yes on Linux systems.
27553         linux-* | linux) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
27554                          # Guess yes on glibc systems.
27555         *-gnu*)          gl_cv_func_rename_slash_dst_works="guessing yes" ;;
27556                          # Guess no on native Windows.
27557         mingw*)          gl_cv_func_rename_slash_dst_works="guessing no" ;;
27558                          # If we don't know, obey --enable-cross-guesses.
27559         *)               gl_cv_func_rename_slash_dst_works="$gl_cross_guess_normal" ;;
27560       esac
27561
27562else
27563  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27564/* end confdefs.h.  */
27565
27566#        include <stdio.h>
27567#        include <stdlib.h>
27568
27569int
27570main ()
27571{
27572int result = 0;
27573           if (rename ("conftest.f1", "conftest.f2/") == 0)
27574             result |= 1;
27575           if (rename ("conftest.d1", "conftest.d2/") != 0)
27576             result |= 2;
27577#if HAVE_LSTAT
27578           if (rename ("conftest.f", "conftest.lnk/") == 0)
27579             result |= 4;
27580#endif
27581           return result;
27582
27583  ;
27584  return 0;
27585}
27586_ACEOF
27587if ac_fn_c_try_run "$LINENO"; then :
27588  gl_cv_func_rename_slash_dst_works=yes
27589else
27590  gl_cv_func_rename_slash_dst_works=no
27591fi
27592rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27593  conftest.$ac_objext conftest.beam conftest.$ac_ext
27594fi
27595
27596    rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
27597
27598fi
27599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
27600$as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
27601  case "$gl_cv_func_rename_slash_dst_works" in
27602    *yes) ;;
27603    *)
27604      REPLACE_RENAME=1
27605
27606$as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
27607
27608      ;;
27609  esac
27610
27611            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
27612$as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
27613if ${gl_cv_func_rename_slash_src_works+:} false; then :
27614  $as_echo_n "(cached) " >&6
27615else
27616  rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
27617    touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
27618      as_fn_error $? "cannot create temporary files" "$LINENO" 5
27619    # Assume that if we have lstat, we can also check symlinks.
27620    if test $ac_cv_func_lstat = yes; then
27621      ln -s conftest.f conftest.lnk
27622    fi
27623    if test "$cross_compiling" = yes; then :
27624        case "$host_os" in
27625                          # Guess yes on Linux systems.
27626         linux-* | linux) gl_cv_func_rename_slash_src_works="guessing yes" ;;
27627                          # Guess yes on glibc systems.
27628         *-gnu*)          gl_cv_func_rename_slash_src_works="guessing yes" ;;
27629                          # Guess yes on native Windows.
27630         mingw*)          gl_cv_func_rename_slash_src_works="guessing yes" ;;
27631                          # If we don't know, obey --enable-cross-guesses.
27632         *)               gl_cv_func_rename_slash_src_works="$gl_cross_guess_normal" ;;
27633       esac
27634
27635else
27636  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27637/* end confdefs.h.  */
27638
27639#        include <stdio.h>
27640#        include <stdlib.h>
27641
27642int
27643main ()
27644{
27645int result = 0;
27646           if (rename ("conftest.f1/", "conftest.d3") == 0)
27647             result |= 1;
27648           if (rename ("conftest.d1/", "conftest.d2") != 0)
27649             result |= 2;
27650#if HAVE_LSTAT
27651           if (rename ("conftest.lnk/", "conftest.f") == 0)
27652             result |= 4;
27653#endif
27654           return result;
27655
27656  ;
27657  return 0;
27658}
27659_ACEOF
27660if ac_fn_c_try_run "$LINENO"; then :
27661  gl_cv_func_rename_slash_src_works=yes
27662else
27663  gl_cv_func_rename_slash_src_works=no
27664fi
27665rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27666  conftest.$ac_objext conftest.beam conftest.$ac_ext
27667fi
27668
27669    rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
27670
27671fi
27672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
27673$as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
27674  case "$gl_cv_func_rename_slash_src_works" in
27675    *yes) ;;
27676    *)
27677      REPLACE_RENAME=1
27678
27679$as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
27680
27681      ;;
27682  esac
27683
27684
27685  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
27686$as_echo_n "checking whether rename manages hard links correctly... " >&6; }
27687if ${gl_cv_func_rename_link_works+:} false; then :
27688  $as_echo_n "(cached) " >&6
27689else
27690  if test $ac_cv_func_link = yes; then
27691       if test $cross_compiling != yes; then
27692         rm -rf conftest.f conftest.f1 conftest.f2
27693         if touch conftest.f conftest.f2 && ln conftest.f conftest.f1 &&
27694             set x `ls -i conftest.f conftest.f1` && test "" = ""; then
27695           if test "$cross_compiling" = yes; then :
27696                :
27697
27698else
27699  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27700/* end confdefs.h.  */
27701
27702#               include <errno.h>
27703#               include <stdio.h>
27704#               include <stdlib.h>
27705#               include <unistd.h>
27706
27707
27708$gl_mda_defines
27709
27710int
27711main ()
27712{
27713int result = 0;
27714                  if (rename ("conftest.f", "conftest.f1"))
27715                    result |= 1;
27716                  if (unlink ("conftest.f1"))
27717                    result |= 2;
27718
27719                  /* Allow either the POSIX-required behavior, where the
27720                     previous rename kept conftest.f, or the (better) NetBSD
27721                     behavior, where it removed conftest.f.  */
27722                  if (rename ("conftest.f", "conftest.f") != 0
27723                      && errno != ENOENT)
27724                    result |= 4;
27725
27726                  if (rename ("conftest.f1", "conftest.f1") == 0)
27727                    result |= 8;
27728                  if (rename ("conftest.f2", "conftest.f2") != 0)
27729                    result |= 16;
27730                  return result;
27731
27732  ;
27733  return 0;
27734}
27735_ACEOF
27736if ac_fn_c_try_run "$LINENO"; then :
27737  gl_cv_func_rename_link_works=yes
27738else
27739  gl_cv_func_rename_link_works=no
27740fi
27741rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27742  conftest.$ac_objext conftest.beam conftest.$ac_ext
27743fi
27744
27745         else
27746           gl_cv_func_rename_link_works="guessing no"
27747         fi
27748         rm -rf conftest.f conftest.f1 conftest.f2
27749       else
27750                  case "$host_os" in
27751                            # Guess yes on Linux systems.
27752           linux-* | linux) gl_cv_func_rename_link_works="guessing yes" ;;
27753                            # Guess yes on glibc systems.
27754           *-gnu*)          gl_cv_func_rename_link_works="guessing yes" ;;
27755                            # Guess yes on native Windows.
27756           mingw*)          gl_cv_func_rename_link_works="guessing yes" ;;
27757                            # If we don't know, obey --enable-cross-guesses.
27758           *)               gl_cv_func_rename_link_works="$gl_cross_guess_normal" ;;
27759         esac
27760       fi
27761     else
27762       gl_cv_func_rename_link_works=yes
27763     fi
27764
27765fi
27766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
27767$as_echo "$gl_cv_func_rename_link_works" >&6; }
27768  case "$gl_cv_func_rename_link_works" in
27769    *yes) ;;
27770    *)
27771      REPLACE_RENAME=1
27772
27773$as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
27774
27775      ;;
27776  esac
27777
27778          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
27779$as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
27780if ${gl_cv_func_rename_dest_works+:} false; then :
27781  $as_echo_n "(cached) " >&6
27782else
27783  rm -rf conftest.f conftest.d1 conftest.d2
27784    touch conftest.f && mkdir conftest.d1 conftest.d2 ||
27785      as_fn_error $? "cannot create temporary files" "$LINENO" 5
27786    if test "$cross_compiling" = yes; then :
27787        case "$host_os" in
27788                          # Guess yes on Linux systems.
27789         linux-* | linux) gl_cv_func_rename_dest_works="guessing yes" ;;
27790                          # Guess yes on glibc systems.
27791         *-gnu*)          gl_cv_func_rename_dest_works="guessing yes" ;;
27792                          # Guess no on native Windows.
27793         mingw*)          gl_cv_func_rename_dest_works="guessing no" ;;
27794                          # If we don't know, obey --enable-cross-guesses.
27795         *)               gl_cv_func_rename_dest_works="$gl_cross_guess_normal" ;;
27796       esac
27797
27798else
27799  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27800/* end confdefs.h.  */
27801
27802#        include <stdio.h>
27803#        include <stdlib.h>
27804
27805int
27806main ()
27807{
27808int result = 0;
27809           if (rename ("conftest.d1", "conftest.d2") != 0)
27810             result |= 1;
27811           if (rename ("conftest.d2", "conftest.f") == 0)
27812             result |= 2;
27813           return result;
27814
27815  ;
27816  return 0;
27817}
27818_ACEOF
27819if ac_fn_c_try_run "$LINENO"; then :
27820  gl_cv_func_rename_dest_works=yes
27821else
27822  gl_cv_func_rename_dest_works=no
27823fi
27824rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27825  conftest.$ac_objext conftest.beam conftest.$ac_ext
27826fi
27827
27828    rm -rf conftest.f conftest.d1 conftest.d2
27829
27830fi
27831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
27832$as_echo "$gl_cv_func_rename_dest_works" >&6; }
27833  case "$gl_cv_func_rename_dest_works" in
27834    *yes) ;;
27835    *)
27836      REPLACE_RENAME=1
27837
27838$as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
27839
27840      ;;
27841  esac
27842
27843  if test $REPLACE_RENAME = 1; then
27844
27845
27846
27847
27848
27849
27850
27851
27852  gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
27853
27854  fi
27855
27856
27857
27858
27859
27860          GNULIB_RENAME=1
27861
27862
27863
27864
27865
27866$as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
27867
27868
27869
27870
27871
27872
27873  for ac_func in rewinddir
27874do :
27875  ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
27876if test "x$ac_cv_func_rewinddir" = xyes; then :
27877  cat >>confdefs.h <<_ACEOF
27878#define HAVE_REWINDDIR 1
27879_ACEOF
27880
27881fi
27882done
27883
27884  if test $ac_cv_func_rewinddir = no; then
27885    HAVE_REWINDDIR=0
27886  fi
27887
27888  if test $HAVE_REWINDDIR = 0; then
27889
27890
27891
27892
27893
27894
27895
27896
27897  gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
27898
27899  fi
27900
27901
27902
27903
27904
27905          GNULIB_REWINDDIR=1
27906
27907
27908
27909
27910
27911$as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
27912
27913
27914
27915
27916
27917
27918  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
27919$as_echo_n "checking whether rmdir works... " >&6; }
27920if ${gl_cv_func_rmdir_works+:} false; then :
27921  $as_echo_n "(cached) " >&6
27922else
27923  mkdir conftest.dir
27924     touch conftest.file
27925     if test "$cross_compiling" = yes; then :
27926  case "$host_os" in
27927                           # Guess yes on Linux systems.
27928          linux-* | linux) gl_cv_func_rmdir_works="guessing yes" ;;
27929                           # Guess yes on glibc systems.
27930          *-gnu* | gnu*)   gl_cv_func_rmdir_works="guessing yes" ;;
27931                           # Guess no on native Windows.
27932          mingw*)          gl_cv_func_rmdir_works="guessing no" ;;
27933                           # If we don't know, obey --enable-cross-guesses.
27934          *)               gl_cv_func_rmdir_works="$gl_cross_guess_normal" ;;
27935        esac
27936
27937else
27938  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27939/* end confdefs.h.  */
27940#include <stdio.h>
27941           #include <errno.h>
27942           #if HAVE_UNISTD_H
27943           # include <unistd.h>
27944           #else /* on Windows with MSVC */
27945           # include <direct.h>
27946           #endif
27947
27948
27949$gl_mda_defines
27950
27951int
27952main ()
27953{
27954int result = 0;
27955           if (!rmdir ("conftest.file/"))
27956             result |= 1;
27957           else if (errno != ENOTDIR)
27958             result |= 2;
27959           if (!rmdir ("conftest.dir/./"))
27960             result |= 4;
27961           return result;
27962
27963  ;
27964  return 0;
27965}
27966_ACEOF
27967if ac_fn_c_try_run "$LINENO"; then :
27968  gl_cv_func_rmdir_works=yes
27969else
27970  gl_cv_func_rmdir_works=no
27971fi
27972rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27973  conftest.$ac_objext conftest.beam conftest.$ac_ext
27974fi
27975
27976     rm -rf conftest.dir conftest.file
27977fi
27978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
27979$as_echo "$gl_cv_func_rmdir_works" >&6; }
27980  case "$gl_cv_func_rmdir_works" in
27981    *yes) ;;
27982    *)
27983      REPLACE_RMDIR=1
27984      ;;
27985  esac
27986
27987  if test $REPLACE_RMDIR = 1; then
27988
27989
27990
27991
27992
27993
27994
27995
27996  gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
27997
27998  fi
27999
28000
28001
28002
28003
28004          GNULIB_RMDIR=1
28005
28006
28007
28008
28009
28010$as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
28011
28012
28013
28014
28015
28016
28017
28018
28019
28020
28021  if test "$ac_cv_header_winsock2_h" = yes; then
28022    REPLACE_SELECT=1
28023  else
28024
28025    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
28026$as_echo_n "checking whether select supports a 0 argument... " >&6; }
28027if ${gl_cv_func_select_supports0+:} false; then :
28028  $as_echo_n "(cached) " >&6
28029else
28030
28031        if test "$cross_compiling" = yes; then :
28032
28033           case "$host_os" in
28034                       # Guess no on Interix.
28035             interix*) gl_cv_func_select_supports0="guessing no";;
28036                       # Guess yes otherwise.
28037             *)        gl_cv_func_select_supports0="guessing yes";;
28038           esac
28039
28040else
28041  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28042/* end confdefs.h.  */
28043
28044#include <sys/types.h>
28045#include <sys/time.h>
28046#if HAVE_SYS_SELECT_H
28047#include <sys/select.h>
28048#endif
28049int main ()
28050{
28051  struct timeval timeout;
28052  timeout.tv_sec = 0;
28053  timeout.tv_usec = 5;
28054  return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
28055}
28056_ACEOF
28057if ac_fn_c_try_run "$LINENO"; then :
28058  gl_cv_func_select_supports0=yes
28059else
28060  gl_cv_func_select_supports0=no
28061fi
28062rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28063  conftest.$ac_objext conftest.beam conftest.$ac_ext
28064fi
28065
28066
28067fi
28068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
28069$as_echo "$gl_cv_func_select_supports0" >&6; }
28070    case "$gl_cv_func_select_supports0" in
28071      *yes) ;;
28072      *) REPLACE_SELECT=1 ;;
28073    esac
28074
28075        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
28076$as_echo_n "checking whether select detects invalid fds... " >&6; }
28077if ${gl_cv_func_select_detects_ebadf+:} false; then :
28078  $as_echo_n "(cached) " >&6
28079else
28080
28081        if test "$cross_compiling" = yes; then :
28082
28083           case "$host_os" in
28084                             # Guess yes on Linux systems.
28085            linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;;
28086                             # Guess yes on glibc systems.
28087            *-gnu* | gnu*)   gl_cv_func_select_detects_ebadf="guessing yes" ;;
28088                             # If we don't know, obey --enable-cross-guesses.
28089            *)               gl_cv_func_select_detects_ebadf="$gl_cross_guess_normal" ;;
28090           esac
28091
28092else
28093  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28094/* end confdefs.h.  */
28095
28096#include <sys/types.h>
28097#include <sys/time.h>
28098#if HAVE_SYS_SELECT_H
28099# include <sys/select.h>
28100#endif
28101#include <unistd.h>
28102#include <errno.h>
28103
28104
28105$gl_mda_defines
28106
28107int
28108main ()
28109{
28110
28111  fd_set set;
28112  dup2(0, 16);
28113  FD_ZERO(&set);
28114  FD_SET(16, &set);
28115  close(16);
28116  struct timeval timeout;
28117  timeout.tv_sec = 0;
28118  timeout.tv_usec = 5;
28119  return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
28120
28121  ;
28122  return 0;
28123}
28124_ACEOF
28125if ac_fn_c_try_run "$LINENO"; then :
28126  gl_cv_func_select_detects_ebadf=yes
28127else
28128  gl_cv_func_select_detects_ebadf=no
28129fi
28130rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28131  conftest.$ac_objext conftest.beam conftest.$ac_ext
28132fi
28133
28134
28135fi
28136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
28137$as_echo "$gl_cv_func_select_detects_ebadf" >&6; }
28138    case $gl_cv_func_select_detects_ebadf in
28139      *yes) ;;
28140      *) REPLACE_SELECT=1 ;;
28141    esac
28142  fi
28143
28144    LIB_SELECT="$LIBSOCKET"
28145  if test $REPLACE_SELECT = 1; then
28146    case "$host_os" in
28147      mingw*)
28148                                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28149/* end confdefs.h.  */
28150
28151#define WIN32_LEAN_AND_MEAN
28152#include <windows.h>
28153int
28154main ()
28155{
28156  MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
28157  return 0;
28158}
28159_ACEOF
28160if ac_fn_c_try_link "$LINENO"; then :
28161
28162else
28163  LIB_SELECT="$LIB_SELECT -luser32"
28164fi
28165rm -f core conftest.err conftest.$ac_objext \
28166    conftest$ac_exeext conftest.$ac_ext
28167        ;;
28168    esac
28169  fi
28170
28171
28172  if test $REPLACE_SELECT = 1; then
28173
28174
28175
28176
28177
28178
28179
28180
28181  gl_LIBOBJS="$gl_LIBOBJS select.$ac_objext"
28182
28183  fi
28184
28185
28186
28187
28188
28189          GNULIB_SELECT=1
28190
28191
28192
28193
28194
28195$as_echo "#define GNULIB_TEST_SELECT 1" >>confdefs.h
28196
28197
28198
28199
28200
28201     if test $ac_cv_func_setenv = no; then
28202    HAVE_SETENV=0
28203  else
28204    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
28205$as_echo_n "checking whether setenv validates arguments... " >&6; }
28206if ${gl_cv_func_setenv_works+:} false; then :
28207  $as_echo_n "(cached) " >&6
28208else
28209  if test "$cross_compiling" = yes; then :
28210  case "$host_os" in
28211                        # Guess yes on glibc systems.
28212         *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;;
28213                        # Guess yes on musl systems.
28214         *-musl*)       gl_cv_func_setenv_works="guessing yes" ;;
28215                        # If we don't know, obey --enable-cross-guesses.
28216         *)             gl_cv_func_setenv_works="$gl_cross_guess_normal" ;;
28217       esac
28218
28219else
28220  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28221/* end confdefs.h.  */
28222
28223       #include <stdlib.h>
28224       #include <errno.h>
28225       #include <string.h>
28226
28227int
28228main ()
28229{
28230
28231       int result = 0;
28232       {
28233         if (setenv ("", "", 0) != -1)
28234           result |= 1;
28235         else if (errno != EINVAL)
28236           result |= 2;
28237       }
28238       {
28239         if (setenv ("a", "=", 1) != 0)
28240           result |= 4;
28241         else if (strcmp (getenv ("a"), "=") != 0)
28242           result |= 8;
28243       }
28244       return result;
28245
28246  ;
28247  return 0;
28248}
28249_ACEOF
28250if ac_fn_c_try_run "$LINENO"; then :
28251  gl_cv_func_setenv_works=yes
28252else
28253  gl_cv_func_setenv_works=no
28254fi
28255rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28256  conftest.$ac_objext conftest.beam conftest.$ac_ext
28257fi
28258
28259fi
28260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
28261$as_echo "$gl_cv_func_setenv_works" >&6; }
28262    case "$gl_cv_func_setenv_works" in
28263      *yes) ;;
28264      *)
28265        REPLACE_SETENV=1
28266        ;;
28267    esac
28268  fi
28269
28270  if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
28271
28272
28273
28274
28275
28276
28277
28278
28279  gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
28280
28281  fi
28282
28283
28284
28285
28286
28287          GNULIB_SETENV=1
28288
28289
28290
28291
28292
28293$as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
28294
28295
28296
28297
28298
28299
28300
28301
28302  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
28303$as_echo_n "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
28304if ${gl_cv_func_setlocale_null_all_mtsafe+:} false; then :
28305  $as_echo_n "(cached) " >&6
28306else
28307  case "$host_os" in
28308       # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
28309       *-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
28310         gl_cv_func_setlocale_null_all_mtsafe=no ;;
28311       # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
28312       *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
28313         gl_cv_func_setlocale_null_all_mtsafe=yes ;;
28314       # If we don't know, obey --enable-cross-guesses.
28315       *)
28316         gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
28317     esac
28318
28319fi
28320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
28321$as_echo "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
28322    case "$host_os" in
28323    mingw*) ;;
28324    *)
28325      if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
28326        gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
28327      fi
28328      ;;
28329  esac
28330  case "$gl_cv_func_setlocale_null_all_mtsafe" in
28331    *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
28332    *)    SETLOCALE_NULL_ALL_MTSAFE=0 ;;
28333  esac
28334
28335cat >>confdefs.h <<_ACEOF
28336#define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE
28337_ACEOF
28338
28339
28340    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
28341$as_echo_n "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
28342if ${gl_cv_func_setlocale_null_one_mtsafe+:} false; then :
28343  $as_echo_n "(cached) " >&6
28344else
28345  case "$host_os" in
28346       # Guess no on OpenBSD, AIX.
28347       openbsd* | aix*)
28348         gl_cv_func_setlocale_null_one_mtsafe=no ;;
28349       # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
28350       *-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
28351         gl_cv_func_setlocale_null_one_mtsafe=yes ;;
28352       # If we don't know, obey --enable-cross-guesses.
28353       *)
28354         gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
28355     esac
28356
28357fi
28358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
28359$as_echo "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
28360    case "$host_os" in
28361    mingw*) ;;
28362    *)
28363      if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
28364        gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
28365      fi
28366      ;;
28367  esac
28368  case "$gl_cv_func_setlocale_null_one_mtsafe" in
28369    *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
28370    *)    SETLOCALE_NULL_ONE_MTSAFE=0 ;;
28371  esac
28372
28373cat >>confdefs.h <<_ACEOF
28374#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE
28375_ACEOF
28376
28377
28378    if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
28379    case "$host_os" in
28380      mingw*) LIB_SETLOCALE_NULL= ;;
28381      *)
28382
28383
28384  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
28385$as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
28386if ${gl_cv_have_weak+:} false; then :
28387  $as_echo_n "(cached) " >&6
28388else
28389  gl_cv_have_weak=no
28390          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28391/* end confdefs.h.  */
28392extern void xyzzy ();
28393#pragma weak xyzzy
28394int
28395main ()
28396{
28397xyzzy();
28398  ;
28399  return 0;
28400}
28401_ACEOF
28402if ac_fn_c_try_link "$LINENO"; then :
28403  gl_cv_have_weak=maybe
28404fi
28405rm -f core conftest.err conftest.$ac_objext \
28406    conftest$ac_exeext conftest.$ac_ext
28407     if test $gl_cv_have_weak = maybe; then
28408                     if test "$cross_compiling" = yes; then :
28409                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28410/* end confdefs.h.  */
28411#ifdef __ELF__
28412             Extensible Linking Format
28413             #endif
28414
28415_ACEOF
28416if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28417  $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
28418  gl_cv_have_weak="guessing yes"
28419else
28420  gl_cv_have_weak="guessing no"
28421fi
28422rm -f conftest*
28423
28424
28425else
28426  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28427/* end confdefs.h.  */
28428
28429#include <stdio.h>
28430#pragma weak fputs
28431int main ()
28432{
28433  return (fputs == NULL);
28434}
28435_ACEOF
28436if ac_fn_c_try_run "$LINENO"; then :
28437  gl_cv_have_weak=yes
28438else
28439  gl_cv_have_weak=no
28440fi
28441rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28442  conftest.$ac_objext conftest.beam conftest.$ac_ext
28443fi
28444
28445     fi
28446          case " $LDFLAGS " in
28447       *" -static "*) gl_cv_have_weak=no ;;
28448     esac
28449                    case "$gl_cv_have_weak" in
28450       *yes)
28451         case "$host_os" in
28452           freebsd* | dragonfly*)
28453             : > conftest1.c
28454             $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
28455             cat <<EOF > conftest2.c
28456#include <pthread.h>
28457#pragma weak pthread_mutexattr_gettype
28458int main ()
28459{
28460  return (pthread_mutexattr_gettype != NULL);
28461}
28462EOF
28463             $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
28464               || gl_cv_have_weak=no
28465             rm -f conftest1.c libempty.so conftest2.c conftest
28466             ;;
28467         esac
28468         ;;
28469     esac
28470
28471fi
28472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
28473$as_echo "$gl_cv_have_weak" >&6; }
28474  case "$gl_cv_have_weak" in
28475    *yes)
28476
28477$as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
28478
28479      ;;
28480  esac
28481
28482        case "$gl_cv_have_weak" in
28483          *yes) LIB_SETLOCALE_NULL= ;;
28484          *)    LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
28485        esac
28486        ;;
28487    esac
28488  else
28489    LIB_SETLOCALE_NULL=
28490  fi
28491
28492
28493  if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
28494
28495
28496
28497
28498
28499
28500
28501
28502  gl_LIBOBJS="$gl_LIBOBJS setlocale-lock.$ac_objext"
28503
28504
28505
28506
28507  CFLAG_VISIBILITY=
28508  HAVE_VISIBILITY=0
28509  if test -n "$GCC"; then
28510                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
28511$as_echo_n "checking whether the -Werror option is usable... " >&6; }
28512if ${gl_cv_cc_vis_werror+:} false; then :
28513  $as_echo_n "(cached) " >&6
28514else
28515  gl_save_CFLAGS="$CFLAGS"
28516       CFLAGS="$CFLAGS -Werror"
28517       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28518/* end confdefs.h.  */
28519
28520int
28521main ()
28522{
28523
28524  ;
28525  return 0;
28526}
28527_ACEOF
28528if ac_fn_c_try_compile "$LINENO"; then :
28529  gl_cv_cc_vis_werror=yes
28530else
28531  gl_cv_cc_vis_werror=no
28532fi
28533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28534       CFLAGS="$gl_save_CFLAGS"
28535
28536fi
28537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
28538$as_echo "$gl_cv_cc_vis_werror" >&6; }
28539        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
28540$as_echo_n "checking for simple visibility declarations... " >&6; }
28541if ${gl_cv_cc_visibility+:} false; then :
28542  $as_echo_n "(cached) " >&6
28543else
28544  gl_save_CFLAGS="$CFLAGS"
28545       CFLAGS="$CFLAGS -fvisibility=hidden"
28546                                          if test $gl_cv_cc_vis_werror = yes; then
28547         CFLAGS="$CFLAGS -Werror"
28548       fi
28549       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28550/* end confdefs.h.  */
28551extern __attribute__((__visibility__("hidden"))) int hiddenvar;
28552              extern __attribute__((__visibility__("default"))) int exportedvar;
28553              extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
28554              extern __attribute__((__visibility__("default"))) int exportedfunc (void);
28555              void dummyfunc (void) {}
28556
28557int
28558main ()
28559{
28560
28561  ;
28562  return 0;
28563}
28564_ACEOF
28565if ac_fn_c_try_compile "$LINENO"; then :
28566  gl_cv_cc_visibility=yes
28567else
28568  gl_cv_cc_visibility=no
28569fi
28570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28571       CFLAGS="$gl_save_CFLAGS"
28572
28573fi
28574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
28575$as_echo "$gl_cv_cc_visibility" >&6; }
28576    if test $gl_cv_cc_visibility = yes; then
28577      CFLAG_VISIBILITY="-fvisibility=hidden"
28578      HAVE_VISIBILITY=1
28579    fi
28580  fi
28581
28582
28583
28584cat >>confdefs.h <<_ACEOF
28585#define HAVE_VISIBILITY $HAVE_VISIBILITY
28586_ACEOF
28587
28588
28589
28590  fi
28591
28592
28593
28594
28595
28596          GNULIB_SETLOCALE_NULL=1
28597
28598
28599
28600
28601
28602$as_echo "#define GNULIB_TEST_SETLOCALE_NULL 1" >>confdefs.h
28603
28604
28605
28606
28607
28608
28609
28610
28611
28612
28613
28614
28615
28616
28617     if test $gl_cv_have_include_next = yes; then
28618       gl_cv_next_signal_h='<'signal.h'>'
28619     else
28620       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
28621$as_echo_n "checking absolute name of <signal.h>... " >&6; }
28622if ${gl_cv_next_signal_h+:} false; then :
28623  $as_echo_n "(cached) " >&6
28624else
28625
28626
28627
28628  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28629/* end confdefs.h.  */
28630#include <signal.h>
28631_ACEOF
28632                case "$host_os" in
28633    aix*) gl_absname_cpp="$ac_cpp -C" ;;
28634    *)    gl_absname_cpp="$ac_cpp" ;;
28635  esac
28636
28637  case "$host_os" in
28638    mingw*)
28639                                          gl_dirsep_regex='[/\\]'
28640      ;;
28641    *)
28642      gl_dirsep_regex='\/'
28643      ;;
28644  esac
28645      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28646  gl_header_literal_regex=`echo 'signal.h' \
28647                           | sed -e "$gl_make_literal_regex_sed"`
28648  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28649      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28650      s|^/[^/]|//&|
28651      p
28652      q
28653    }'
28654
28655        gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28656  sed -n "$gl_absolute_header_sed"`
28657
28658           gl_header=$gl_cv_absolute_signal_h
28659           gl_cv_next_signal_h='"'$gl_header'"'
28660
28661
28662fi
28663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
28664$as_echo "$gl_cv_next_signal_h" >&6; }
28665     fi
28666     NEXT_SIGNAL_H=$gl_cv_next_signal_h
28667
28668     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28669       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28670       gl_next_as_first_directive='<'signal.h'>'
28671     else
28672       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28673       gl_next_as_first_directive=$gl_cv_next_signal_h
28674     fi
28675     NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
28676
28677
28678
28679
28680
28681# AIX declares sig_atomic_t to already include volatile, and C89 compilers
28682# then choke on 'volatile sig_atomic_t'.  C99 requires that it compile.
28683  ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
28684#include <signal.h>
28685
28686"
28687if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
28688
28689else
28690  HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
28691fi
28692
28693
28694
28695
28696
28697
28698
28699  ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
28700#include <signal.h>
28701
28702"
28703if test "x$ac_cv_type_sighandler_t" = xyes; then :
28704
28705else
28706  HAVE_SIGHANDLER_T=0
28707fi
28708
28709
28710
28711
28712
28713
28714
28715
28716
28717
28718     ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
28719/* <sys/types.h> is not needed according to POSIX, but the
28720   <sys/socket.h> in i386-unknown-freebsd4.10 and
28721   powerpc-apple-darwin5.5 required it. */
28722#include <sys/types.h>
28723#if HAVE_SYS_SOCKET_H
28724# include <sys/socket.h>
28725#elif HAVE_WS2TCPIP_H
28726# include <ws2tcpip.h>
28727#endif
28728
28729"
28730if test "x$ac_cv_type_socklen_t" = xyes; then :
28731
28732else
28733  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
28734$as_echo_n "checking for socklen_t equivalent... " >&6; }
28735if ${gl_cv_socklen_t_equiv+:} false; then :
28736  $as_echo_n "(cached) " >&6
28737else
28738  # Systems have either "struct sockaddr *" or
28739         # "void *" as the second argument to getpeername
28740         gl_cv_socklen_t_equiv=
28741         for arg2 in "struct sockaddr" void; do
28742           for t in int size_t "unsigned int" "long int" "unsigned long int"; do
28743             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28744/* end confdefs.h.  */
28745#include <sys/types.h>
28746                   #include <sys/socket.h>
28747
28748                   int getpeername (int, $arg2 *, $t *);
28749int
28750main ()
28751{
28752$t len;
28753                  getpeername (0, 0, &len);
28754  ;
28755  return 0;
28756}
28757_ACEOF
28758if ac_fn_c_try_compile "$LINENO"; then :
28759  gl_cv_socklen_t_equiv="$t"
28760fi
28761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28762             test "$gl_cv_socklen_t_equiv" != "" && break
28763           done
28764           test "$gl_cv_socklen_t_equiv" != "" && break
28765         done
28766         if test "$gl_cv_socklen_t_equiv" = ""; then
28767           as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
28768         fi
28769
28770fi
28771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
28772$as_echo "$gl_cv_socklen_t_equiv" >&6; }
28773
28774cat >>confdefs.h <<_ACEOF
28775#define socklen_t $gl_cv_socklen_t_equiv
28776_ACEOF
28777
28778fi
28779
28780
28781  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
28782$as_echo_n "checking for ssize_t... " >&6; }
28783if ${gt_cv_ssize_t+:} false; then :
28784  $as_echo_n "(cached) " >&6
28785else
28786  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28787/* end confdefs.h.  */
28788#include <sys/types.h>
28789int
28790main ()
28791{
28792int x = sizeof (ssize_t *) + sizeof (ssize_t);
28793            return !x;
28794  ;
28795  return 0;
28796}
28797_ACEOF
28798if ac_fn_c_try_compile "$LINENO"; then :
28799  gt_cv_ssize_t=yes
28800else
28801  gt_cv_ssize_t=no
28802fi
28803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28804fi
28805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
28806$as_echo "$gt_cv_ssize_t" >&6; }
28807  if test $gt_cv_ssize_t = no; then
28808
28809$as_echo "#define ssize_t int" >>confdefs.h
28810
28811  fi
28812
28813
28814
28815
28816
28817  case "$host_os" in
28818    mingw*)
28819                        ;;
28820    *)
28821                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
28822$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
28823if ${gl_cv_func_stat_file_slash+:} false; then :
28824  $as_echo_n "(cached) " >&6
28825else
28826  touch conftest.tmp
28827         # Assume that if we have lstat, we can also check symlinks.
28828         if test $ac_cv_func_lstat = yes; then
28829           ln -s conftest.tmp conftest.lnk
28830         fi
28831         if test "$cross_compiling" = yes; then :
28832  case "$host_os" in
28833                               # Guess yes on Linux systems.
28834              linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;;
28835                               # Guess yes on glibc systems.
28836              *-gnu* | gnu*)   gl_cv_func_stat_file_slash="guessing yes" ;;
28837                               # If we don't know, obey --enable-cross-guesses.
28838              *)               gl_cv_func_stat_file_slash="$gl_cross_guess_normal" ;;
28839            esac
28840
28841else
28842  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28843/* end confdefs.h.  */
28844#include <sys/stat.h>
28845
28846int
28847main ()
28848{
28849int result = 0;
28850               struct stat st;
28851               if (!stat ("conftest.tmp/", &st))
28852                 result |= 1;
28853#if HAVE_LSTAT
28854               if (!stat ("conftest.lnk/", &st))
28855                 result |= 2;
28856#endif
28857               return result;
28858
28859  ;
28860  return 0;
28861}
28862_ACEOF
28863if ac_fn_c_try_run "$LINENO"; then :
28864  gl_cv_func_stat_file_slash=yes
28865else
28866  gl_cv_func_stat_file_slash=no
28867fi
28868rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28869  conftest.$ac_objext conftest.beam conftest.$ac_ext
28870fi
28871
28872         rm -f conftest.tmp conftest.lnk
28873fi
28874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
28875$as_echo "$gl_cv_func_stat_file_slash" >&6; }
28876      case $gl_cv_func_stat_file_slash in
28877        *no)
28878          REPLACE_STAT=1
28879
28880$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
28881;;
28882      esac
28883      case $host_os in
28884                solaris*)
28885          REPLACE_FSTAT=1 ;;
28886      esac
28887      ;;
28888  esac
28889
28890  if test $REPLACE_STAT = 1; then
28891
28892
28893
28894
28895
28896
28897
28898
28899  gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
28900
28901    case "$host_os" in
28902      mingw*)
28903
28904
28905
28906
28907
28908
28909
28910
28911  gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
28912
28913        ;;
28914    esac
28915
28916
28917
28918  :
28919
28920  fi
28921
28922
28923
28924
28925
28926          GNULIB_STAT=1
28927
28928
28929
28930
28931
28932$as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
28933
28934
28935
28936
28937
28938
28939
28940  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>
28941     #include <sys/stat.h>
28942"
28943if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
28944
28945cat >>confdefs.h <<_ACEOF
28946#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
28947_ACEOF
28948
28949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
28950$as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
28951if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
28952  $as_echo_n "(cached) " >&6
28953else
28954  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28955/* end confdefs.h.  */
28956
28957            #include <sys/types.h>
28958            #include <sys/stat.h>
28959            #if HAVE_SYS_TIME_H
28960            # include <sys/time.h>
28961            #endif
28962            #include <time.h>
28963            struct timespec ts;
28964            struct stat st;
28965
28966int
28967main ()
28968{
28969
28970            st.st_atim = ts;
28971
28972  ;
28973  return 0;
28974}
28975_ACEOF
28976if ac_fn_c_try_compile "$LINENO"; then :
28977  ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
28978else
28979  ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
28980fi
28981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28982fi
28983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
28984$as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
28985     if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
28986
28987$as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
28988
28989     fi
28990else
28991  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>
28992        #include <sys/stat.h>
28993"
28994if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
28995
28996cat >>confdefs.h <<_ACEOF
28997#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
28998_ACEOF
28999
29000
29001else
29002  ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
29003           #include <sys/stat.h>
29004"
29005if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
29006
29007cat >>confdefs.h <<_ACEOF
29008#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
29009_ACEOF
29010
29011
29012else
29013  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>
29014              #include <sys/stat.h>
29015"
29016if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
29017
29018cat >>confdefs.h <<_ACEOF
29019#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
29020_ACEOF
29021
29022
29023fi
29024
29025fi
29026
29027fi
29028
29029fi
29030
29031
29032
29033
29034
29035  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>
29036     #include <sys/stat.h>
29037"
29038if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then :
29039
29040cat >>confdefs.h <<_ACEOF
29041#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
29042_ACEOF
29043
29044
29045else
29046  ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
29047        #include <sys/stat.h>
29048"
29049if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then :
29050
29051cat >>confdefs.h <<_ACEOF
29052#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
29053_ACEOF
29054
29055
29056else
29057  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>
29058          #include <sys/stat.h>
29059"
29060if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then :
29061
29062cat >>confdefs.h <<_ACEOF
29063#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
29064_ACEOF
29065
29066
29067fi
29068
29069fi
29070
29071fi
29072
29073
29074
29075  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
29076$as_echo_n "checking for working stdalign.h... " >&6; }
29077if ${gl_cv_header_working_stdalign_h+:} false; then :
29078  $as_echo_n "(cached) " >&6
29079else
29080  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29081/* end confdefs.h.  */
29082#include <stdalign.h>
29083            #include <stddef.h>
29084
29085            /* Test that alignof yields a result consistent with offsetof.
29086               This catches GCC bug 52023
29087               <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.  */
29088            #ifdef __cplusplus
29089               template <class t> struct alignof_helper { char a; t b; };
29090            # define ao(type) offsetof (alignof_helper<type>, b)
29091            #else
29092            # define ao(type) offsetof (struct { char a; type b; }, b)
29093            #endif
29094            char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
29095            char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
29096            char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
29097
29098            /* Test _Alignas only on platforms where gnulib can help.  */
29099            #if \
29100                ((defined __cplusplus && 201103 <= __cplusplus) \
29101                 || (defined __APPLE__ && defined __MACH__ \
29102                     ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
29103                     : __GNUC__) \
29104                 || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
29105                 || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \
29106                 || 1300 <= _MSC_VER)
29107              struct alignas_test { char c; char alignas (8) alignas_8; };
29108              char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
29109                                ? 1 : -1];
29110            #endif
29111
29112int
29113main ()
29114{
29115
29116  ;
29117  return 0;
29118}
29119_ACEOF
29120if ac_fn_c_try_compile "$LINENO"; then :
29121  gl_cv_header_working_stdalign_h=yes
29122else
29123  gl_cv_header_working_stdalign_h=no
29124fi
29125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29126fi
29127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
29128$as_echo "$gl_cv_header_working_stdalign_h" >&6; }
29129
29130  if test $gl_cv_header_working_stdalign_h = yes; then
29131    STDALIGN_H=''
29132  else
29133    STDALIGN_H='stdalign.h'
29134  fi
29135
29136
29137   if test -n "$STDALIGN_H"; then
29138  GL_GENERATE_STDALIGN_H_TRUE=
29139  GL_GENERATE_STDALIGN_H_FALSE='#'
29140else
29141  GL_GENERATE_STDALIGN_H_TRUE='#'
29142  GL_GENERATE_STDALIGN_H_FALSE=
29143fi
29144
29145
29146
29147
29148
29149
29150          if test "$ac_cv_header_stdbool_h" = yes; then
29151    case "$host_os" in
29152      solaris*)
29153        if test -z "$GCC"; then
29154          STDBOOL_H='stdbool.h'
29155        else
29156          STDBOOL_H=''
29157        fi
29158        ;;
29159      *)
29160        STDBOOL_H=''
29161        ;;
29162    esac
29163  else
29164    STDBOOL_H='stdbool.h'
29165  fi
29166
29167   if test -n "$STDBOOL_H"; then
29168  GL_GENERATE_STDBOOL_H_TRUE=
29169  GL_GENERATE_STDBOOL_H_FALSE='#'
29170else
29171  GL_GENERATE_STDBOOL_H_TRUE='#'
29172  GL_GENERATE_STDBOOL_H_FALSE=
29173fi
29174
29175
29176  if test "$ac_cv_type__Bool" = yes; then
29177    HAVE__BOOL=1
29178  else
29179    HAVE__BOOL=0
29180  fi
29181
29182
29183
29184
29185
29186
29187
29188
29189  STDDEF_H=
29190
29191      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
29192$as_echo_n "checking for good max_align_t... " >&6; }
29193if ${gl_cv_type_max_align_t+:} false; then :
29194  $as_echo_n "(cached) " >&6
29195else
29196  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29197/* end confdefs.h.  */
29198#include <stddef.h>
29199            unsigned int s = sizeof (max_align_t);
29200            #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
29201            int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
29202            int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
29203            #endif
29204            typedef struct { char a; max_align_t b; } max_helper;
29205            typedef struct { char a; long b; } long_helper;
29206            typedef struct { char a; double b; } double_helper;
29207            typedef struct { char a; long double b; } long_double_helper;
29208            int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
29209            int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
29210            int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
29211
29212int
29213main ()
29214{
29215
29216  ;
29217  return 0;
29218}
29219_ACEOF
29220if ac_fn_c_try_compile "$LINENO"; then :
29221  gl_cv_type_max_align_t=yes
29222else
29223  gl_cv_type_max_align_t=no
29224fi
29225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29226
29227fi
29228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
29229$as_echo "$gl_cv_type_max_align_t" >&6; }
29230  if test $gl_cv_type_max_align_t = no; then
29231    HAVE_MAX_ALIGN_T=0
29232    STDDEF_H=stddef.h
29233  fi
29234
29235  if test $gt_cv_c_wchar_t = no; then
29236    HAVE_WCHAR_T=0
29237    STDDEF_H=stddef.h
29238  fi
29239
29240  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
29241$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
29242if ${gl_cv_decl_null_works+:} false; then :
29243  $as_echo_n "(cached) " >&6
29244else
29245  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29246/* end confdefs.h.  */
29247#include <stddef.h>
29248      int test[2 * (sizeof NULL == sizeof (void *)) -1];
29249
29250int
29251main ()
29252{
29253
29254  ;
29255  return 0;
29256}
29257_ACEOF
29258if ac_fn_c_try_compile "$LINENO"; then :
29259  gl_cv_decl_null_works=yes
29260else
29261  gl_cv_decl_null_works=no
29262fi
29263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29264fi
29265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
29266$as_echo "$gl_cv_decl_null_works" >&6; }
29267  if test $gl_cv_decl_null_works = no; then
29268    REPLACE_NULL=1
29269    STDDEF_H=stddef.h
29270  fi
29271
29272
29273   if test -n "$STDDEF_H"; then
29274  GL_GENERATE_STDDEF_H_TRUE=
29275  GL_GENERATE_STDDEF_H_FALSE='#'
29276else
29277  GL_GENERATE_STDDEF_H_TRUE='#'
29278  GL_GENERATE_STDDEF_H_FALSE=
29279fi
29280
29281  if test -n "$STDDEF_H"; then
29282
29283
29284
29285
29286
29287
29288
29289
29290     if test $gl_cv_have_include_next = yes; then
29291       gl_cv_next_stddef_h='<'stddef.h'>'
29292     else
29293       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
29294$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
29295if ${gl_cv_next_stddef_h+:} false; then :
29296  $as_echo_n "(cached) " >&6
29297else
29298
29299
29300
29301  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29302/* end confdefs.h.  */
29303#include <stddef.h>
29304_ACEOF
29305                case "$host_os" in
29306    aix*) gl_absname_cpp="$ac_cpp -C" ;;
29307    *)    gl_absname_cpp="$ac_cpp" ;;
29308  esac
29309
29310  case "$host_os" in
29311    mingw*)
29312                                          gl_dirsep_regex='[/\\]'
29313      ;;
29314    *)
29315      gl_dirsep_regex='\/'
29316      ;;
29317  esac
29318      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29319  gl_header_literal_regex=`echo 'stddef.h' \
29320                           | sed -e "$gl_make_literal_regex_sed"`
29321  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29322      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29323      s|^/[^/]|//&|
29324      p
29325      q
29326    }'
29327
29328        gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29329  sed -n "$gl_absolute_header_sed"`
29330
29331           gl_header=$gl_cv_absolute_stddef_h
29332           gl_cv_next_stddef_h='"'$gl_header'"'
29333
29334
29335fi
29336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
29337$as_echo "$gl_cv_next_stddef_h" >&6; }
29338     fi
29339     NEXT_STDDEF_H=$gl_cv_next_stddef_h
29340
29341     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29342       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29343       gl_next_as_first_directive='<'stddef.h'>'
29344     else
29345       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29346       gl_next_as_first_directive=$gl_cv_next_stddef_h
29347     fi
29348     NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
29349
29350
29351
29352
29353  fi
29354
29355
29356
29357
29358  $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
29359
29360
29361
29362
29363
29364
29365
29366
29367
29368
29369     if test $gl_cv_have_include_next = yes; then
29370       gl_cv_next_stdio_h='<'stdio.h'>'
29371     else
29372       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
29373$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
29374if ${gl_cv_next_stdio_h+:} false; then :
29375  $as_echo_n "(cached) " >&6
29376else
29377
29378
29379
29380  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29381/* end confdefs.h.  */
29382#include <stdio.h>
29383_ACEOF
29384                case "$host_os" in
29385    aix*) gl_absname_cpp="$ac_cpp -C" ;;
29386    *)    gl_absname_cpp="$ac_cpp" ;;
29387  esac
29388
29389  case "$host_os" in
29390    mingw*)
29391                                          gl_dirsep_regex='[/\\]'
29392      ;;
29393    *)
29394      gl_dirsep_regex='\/'
29395      ;;
29396  esac
29397      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29398  gl_header_literal_regex=`echo 'stdio.h' \
29399                           | sed -e "$gl_make_literal_regex_sed"`
29400  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29401      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29402      s|^/[^/]|//&|
29403      p
29404      q
29405    }'
29406
29407        gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29408  sed -n "$gl_absolute_header_sed"`
29409
29410           gl_header=$gl_cv_absolute_stdio_h
29411           gl_cv_next_stdio_h='"'$gl_header'"'
29412
29413
29414fi
29415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
29416$as_echo "$gl_cv_next_stdio_h" >&6; }
29417     fi
29418     NEXT_STDIO_H=$gl_cv_next_stdio_h
29419
29420     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29421       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29422       gl_next_as_first_directive='<'stdio.h'>'
29423     else
29424       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29425       gl_next_as_first_directive=$gl_cv_next_stdio_h
29426     fi
29427     NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
29428
29429
29430
29431
29432
29433        { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
29434$as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
29435if ${gl_cv_func_printf_attribute_flavor+:} false; then :
29436  $as_echo_n "(cached) " >&6
29437else
29438  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29439/* end confdefs.h.  */
29440
29441       #define __STDC_FORMAT_MACROS 1
29442       #include <stdio.h>
29443       #include <inttypes.h>
29444       /* For non-mingw systems, compilation will trivially succeed.
29445          For mingw, compilation will succeed for older mingw (system
29446          printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
29447       #if (defined _WIN32 && ! defined __CYGWIN__) && \
29448         (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
29449       extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
29450       #endif
29451
29452int
29453main ()
29454{
29455
29456  ;
29457  return 0;
29458}
29459_ACEOF
29460if ac_fn_c_try_compile "$LINENO"; then :
29461  gl_cv_func_printf_attribute_flavor=system
29462else
29463  gl_cv_func_printf_attribute_flavor=gnu
29464fi
29465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29466fi
29467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
29468$as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
29469  if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
29470
29471$as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
29472
29473  fi
29474
29475      GNULIB_FSCANF=1
29476
29477
29478cat >>confdefs.h <<_ACEOF
29479#define GNULIB_FSCANF 1
29480_ACEOF
29481
29482
29483  GNULIB_SCANF=1
29484
29485
29486cat >>confdefs.h <<_ACEOF
29487#define GNULIB_SCANF 1
29488_ACEOF
29489
29490
29491  GNULIB_FGETC=1
29492  GNULIB_GETC=1
29493  GNULIB_GETCHAR=1
29494  GNULIB_FGETS=1
29495  GNULIB_FREAD=1
29496
29497
29498      GNULIB_FPRINTF=1
29499  GNULIB_PRINTF=1
29500  GNULIB_VFPRINTF=1
29501  GNULIB_VPRINTF=1
29502  GNULIB_FPUTC=1
29503  GNULIB_PUTC=1
29504  GNULIB_PUTCHAR=1
29505  GNULIB_FPUTS=1
29506  GNULIB_PUTS=1
29507  GNULIB_FWRITE=1
29508
29509
29510
29511
29512
29513
29514
29515
29516
29517
29518  if test $ac_cv_have_decl_fcloseall = no; then
29519    HAVE_DECL_FCLOSEALL=0
29520  fi
29521
29522
29523
29524
29525
29526
29527
29528
29529
29530
29531
29532     if test $gl_cv_have_include_next = yes; then
29533       gl_cv_next_stdlib_h='<'stdlib.h'>'
29534     else
29535       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
29536$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
29537if ${gl_cv_next_stdlib_h+:} false; then :
29538  $as_echo_n "(cached) " >&6
29539else
29540
29541
29542
29543  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29544/* end confdefs.h.  */
29545#include <stdlib.h>
29546_ACEOF
29547                case "$host_os" in
29548    aix*) gl_absname_cpp="$ac_cpp -C" ;;
29549    *)    gl_absname_cpp="$ac_cpp" ;;
29550  esac
29551
29552  case "$host_os" in
29553    mingw*)
29554                                          gl_dirsep_regex='[/\\]'
29555      ;;
29556    *)
29557      gl_dirsep_regex='\/'
29558      ;;
29559  esac
29560      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29561  gl_header_literal_regex=`echo 'stdlib.h' \
29562                           | sed -e "$gl_make_literal_regex_sed"`
29563  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29564      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29565      s|^/[^/]|//&|
29566      p
29567      q
29568    }'
29569
29570        gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29571  sed -n "$gl_absolute_header_sed"`
29572
29573           gl_header=$gl_cv_absolute_stdlib_h
29574           gl_cv_next_stdlib_h='"'$gl_header'"'
29575
29576
29577fi
29578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
29579$as_echo "$gl_cv_next_stdlib_h" >&6; }
29580     fi
29581     NEXT_STDLIB_H=$gl_cv_next_stdlib_h
29582
29583     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29584       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29585       gl_next_as_first_directive='<'stdlib.h'>'
29586     else
29587       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29588       gl_next_as_first_directive=$gl_cv_next_stdlib_h
29589     fi
29590     NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
29591
29592
29593
29594
29595
29596
29597
29598
29599
29600
29601
29602
29603  if test $ac_cv_have_decl_ecvt = no; then
29604    HAVE_DECL_ECVT=0
29605  fi
29606
29607  if test $ac_cv_have_decl_fcvt = no; then
29608    HAVE_DECL_FCVT=0
29609  fi
29610
29611  if test $ac_cv_have_decl_gcvt = no; then
29612    HAVE_DECL_GCVT=0
29613  fi
29614
29615
29616
29617
29618
29619  for ac_func in strchrnul
29620do :
29621  ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
29622if test "x$ac_cv_func_strchrnul" = xyes; then :
29623  cat >>confdefs.h <<_ACEOF
29624#define HAVE_STRCHRNUL 1
29625_ACEOF
29626
29627fi
29628done
29629
29630  if test $ac_cv_func_strchrnul = no; then
29631    HAVE_STRCHRNUL=0
29632  else
29633    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
29634$as_echo_n "checking whether strchrnul works... " >&6; }
29635if ${gl_cv_func_strchrnul_works+:} false; then :
29636  $as_echo_n "(cached) " >&6
29637else
29638  if test "$cross_compiling" = yes; then :
29639           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29640/* end confdefs.h.  */
29641
29642#if defined __CYGWIN__
29643 #include <cygwin/version.h>
29644 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
29645  Lucky user
29646 #endif
29647#else
29648  Lucky user
29649#endif
29650
29651_ACEOF
29652if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29653  $EGREP "Lucky user" >/dev/null 2>&1; then :
29654  gl_cv_func_strchrnul_works="guessing yes"
29655else
29656  gl_cv_func_strchrnul_works="guessing no"
29657fi
29658rm -f conftest*
29659
29660
29661else
29662  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29663/* end confdefs.h.  */
29664
29665#include <string.h> /* for strchrnul */
29666
29667int
29668main ()
29669{
29670const char *buf = "a";
29671      return strchrnul (buf, 'b') != buf + 1;
29672
29673  ;
29674  return 0;
29675}
29676_ACEOF
29677if ac_fn_c_try_run "$LINENO"; then :
29678  gl_cv_func_strchrnul_works=yes
29679else
29680  gl_cv_func_strchrnul_works=no
29681fi
29682rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29683  conftest.$ac_objext conftest.beam conftest.$ac_ext
29684fi
29685
29686
29687fi
29688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
29689$as_echo "$gl_cv_func_strchrnul_works" >&6; }
29690    case "$gl_cv_func_strchrnul_works" in
29691      *yes) ;;
29692      *) REPLACE_STRCHRNUL=1 ;;
29693    esac
29694  fi
29695
29696  if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
29697
29698
29699
29700
29701
29702
29703
29704
29705  gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
29706
29707    :
29708  fi
29709
29710
29711
29712
29713
29714          GNULIB_STRCHRNUL=1
29715
29716
29717
29718
29719
29720$as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
29721
29722
29723
29724
29725
29726
29727  if test $gl_cv_func_malloc_posix != yes; then
29728    REPLACE_STRDUP=1
29729  fi
29730
29731  if test $ac_cv_have_decl_strdup = no; then
29732    HAVE_DECL_STRDUP=0
29733  fi
29734
29735  if test $REPLACE_STRDUP = 1; then
29736
29737
29738
29739
29740
29741
29742
29743
29744  gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
29745
29746    :
29747  fi
29748
29749
29750
29751
29752
29753          GNULIB_STRDUP=1
29754
29755
29756
29757
29758
29759$as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
29760
29761
29762
29763
29764
29765
29766
29767
29768
29769
29770  if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
29771    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
29772$as_echo_n "checking for working strerror function... " >&6; }
29773if ${gl_cv_func_working_strerror+:} false; then :
29774  $as_echo_n "(cached) " >&6
29775else
29776  if test "$cross_compiling" = yes; then :
29777  case "$host_os" in
29778                          # Guess yes on glibc systems.
29779           *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
29780                          # Guess yes on musl systems.
29781           *-musl*)       gl_cv_func_working_strerror="guessing yes" ;;
29782                          # If we don't know, obey --enable-cross-guesses.
29783           *)             gl_cv_func_working_strerror="$gl_cross_guess_normal" ;;
29784         esac
29785
29786else
29787  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29788/* end confdefs.h.  */
29789#include <string.h>
29790
29791int
29792main ()
29793{
29794if (!*strerror (-2)) return 1;
29795  ;
29796  return 0;
29797}
29798_ACEOF
29799if ac_fn_c_try_run "$LINENO"; then :
29800  gl_cv_func_working_strerror=yes
29801else
29802  gl_cv_func_working_strerror=no
29803fi
29804rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29805  conftest.$ac_objext conftest.beam conftest.$ac_ext
29806fi
29807
29808
29809fi
29810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
29811$as_echo "$gl_cv_func_working_strerror" >&6; }
29812    case "$gl_cv_func_working_strerror" in
29813      *yes) ;;
29814      *)
29815                        REPLACE_STRERROR=1
29816        ;;
29817    esac
29818
29819                  case "$gl_cv_func_strerror_r_works" in
29820        *no) REPLACE_STRERROR=1 ;;
29821      esac
29822
29823  else
29824            REPLACE_STRERROR=1
29825  fi
29826
29827  if test $REPLACE_STRERROR = 1; then
29828
29829
29830
29831
29832
29833
29834
29835
29836  gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
29837
29838  fi
29839
29840
29841cat >>confdefs.h <<_ACEOF
29842#define GNULIB_STRERROR 1
29843_ACEOF
29844
29845
29846
29847
29848
29849
29850
29851          GNULIB_STRERROR=1
29852
29853
29854
29855
29856
29857$as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
29858
29859
29860
29861
29862
29863  if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
29864
29865
29866
29867
29868
29869
29870
29871
29872  gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
29873
29874
29875
29876
29877
29878  if test $ac_cv_header_sys_socket_h != yes; then
29879                    for ac_header in winsock2.h
29880do :
29881  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
29882if test "x$ac_cv_header_winsock2_h" = xyes; then :
29883  cat >>confdefs.h <<_ACEOF
29884#define HAVE_WINSOCK2_H 1
29885_ACEOF
29886
29887fi
29888
29889done
29890
29891  fi
29892  if test "$ac_cv_header_winsock2_h" = yes; then
29893    HAVE_WINSOCK2_H=1
29894    UNISTD_H_HAVE_WINSOCK2_H=1
29895    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
29896  else
29897    HAVE_WINSOCK2_H=0
29898  fi
29899
29900
29901  fi
29902
29903
29904
29905
29906
29907
29908
29909  if test $ac_cv_have_decl_strerror_r = no; then
29910    HAVE_DECL_STRERROR_R=0
29911  fi
29912
29913  if test $ac_cv_func_strerror_r = yes; then
29914    if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
29915      if test $gl_cv_func_strerror_r_posix_signature = yes; then
29916        case "$gl_cv_func_strerror_r_works" in
29917                    *no) REPLACE_STRERROR_R=1 ;;
29918        esac
29919      else
29920                REPLACE_STRERROR_R=1
29921      fi
29922    else
29923                  REPLACE_STRERROR_R=1
29924    fi
29925  fi
29926
29927  if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
29928
29929
29930
29931
29932
29933
29934
29935
29936  gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext"
29937
29938
29939
29940
29941
29942
29943  fi
29944
29945
29946
29947
29948
29949          GNULIB_STRERROR_R=1
29950
29951
29952
29953
29954
29955$as_echo "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
29956
29957
29958
29959
29960
29961cat >>confdefs.h <<_ACEOF
29962#define GNULIB_STRERROR_R_POSIX 1
29963_ACEOF
29964
29965
29966
29967
29968
29969
29970
29971
29972
29973
29974
29975
29976
29977
29978  if test $ac_cv_have_decl_strnlen = no; then
29979    HAVE_DECL_STRNLEN=0
29980  else
29981
29982         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
29983$as_echo_n "checking for working strnlen... " >&6; }
29984if ${ac_cv_func_strnlen_working+:} false; then :
29985  $as_echo_n "(cached) " >&6
29986else
29987  if test "$cross_compiling" = yes; then :
29988  # Guess no on AIX systems, yes otherwise.
29989		case "$host_os" in
29990		  aix*) ac_cv_func_strnlen_working=no;;
29991		  *)    ac_cv_func_strnlen_working=yes;;
29992		esac
29993else
29994  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29995/* end confdefs.h.  */
29996$ac_includes_default
29997int
29998main ()
29999{
30000
30001#define S "foobar"
30002#define S_LEN (sizeof S - 1)
30003
30004  /* At least one implementation is buggy: that of AIX 4.3 would
30005     give strnlen (S, 1) == 3.  */
30006
30007  int i;
30008  for (i = 0; i < S_LEN + 1; ++i)
30009    {
30010      int expected = i <= S_LEN ? i : S_LEN;
30011      if (strnlen (S, i) != expected)
30012	return 1;
30013    }
30014  return 0;
30015
30016  ;
30017  return 0;
30018}
30019_ACEOF
30020if ac_fn_c_try_run "$LINENO"; then :
30021  ac_cv_func_strnlen_working=yes
30022else
30023  ac_cv_func_strnlen_working=no
30024fi
30025rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30026  conftest.$ac_objext conftest.beam conftest.$ac_ext
30027fi
30028
30029fi
30030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
30031$as_echo "$ac_cv_func_strnlen_working" >&6; }
30032test $ac_cv_func_strnlen_working = no && :
30033
30034
30035    if test $ac_cv_func_strnlen_working = no; then
30036      REPLACE_STRNLEN=1
30037    fi
30038  fi
30039
30040  if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
30041
30042
30043
30044
30045
30046
30047
30048
30049  gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
30050
30051    :
30052  fi
30053
30054
30055
30056
30057
30058          GNULIB_STRNLEN=1
30059
30060
30061
30062
30063
30064$as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
30065
30066
30067
30068
30069
30070  if test $REPLACE_STRSTR = 0; then
30071    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
30072$as_echo_n "checking whether strstr works in linear time... " >&6; }
30073if ${gl_cv_func_strstr_linear+:} false; then :
30074  $as_echo_n "(cached) " >&6
30075else
30076  if test "$cross_compiling" = yes; then :
30077                             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30078/* end confdefs.h.  */
30079
30080#include <features.h>
30081#ifdef __GNU_LIBRARY__
30082 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
30083     && !(defined __i386__ || defined __x86_64__) \
30084     && !defined __UCLIBC__
30085  Lucky user
30086 #endif
30087#endif
30088#ifdef __CYGWIN__
30089 #include <cygwin/version.h>
30090 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
30091  Lucky user
30092 #endif
30093#endif
30094
30095_ACEOF
30096if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
30097  $EGREP "Lucky user" >/dev/null 2>&1; then :
30098  gl_cv_func_strstr_linear="guessing yes"
30099else
30100  gl_cv_func_strstr_linear="$gl_cross_guess_normal"
30101fi
30102rm -f conftest*
30103
30104
30105else
30106  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30107/* end confdefs.h.  */
30108
30109#ifdef __MVS__
30110/* z/OS does not deliver signals while strstr() is running (thanks to
30111   restrictions on its LE runtime), which prevents us from limiting the
30112   running time of this test.  */
30113# error "This test does not work properly on z/OS"
30114#endif
30115#include <signal.h> /* for signal */
30116#include <string.h> /* for strstr */
30117#include <stdlib.h> /* for malloc */
30118#include <unistd.h> /* for alarm */
30119static void quit (int sig) { _exit (sig + 128); }
30120
30121int
30122main ()
30123{
30124
30125    int result = 0;
30126    size_t m = 1000000;
30127    char *haystack = (char *) malloc (2 * m + 2);
30128    char *needle = (char *) malloc (m + 2);
30129    /* Failure to compile this test due to missing alarm is okay,
30130       since all such platforms (mingw) also have quadratic strstr.  */
30131    signal (SIGALRM, quit);
30132    alarm (5);
30133    /* Check for quadratic performance.  */
30134    if (haystack && needle)
30135      {
30136        memset (haystack, 'A', 2 * m);
30137        haystack[2 * m] = 'B';
30138        haystack[2 * m + 1] = 0;
30139        memset (needle, 'A', m);
30140        needle[m] = 'B';
30141        needle[m + 1] = 0;
30142        if (!strstr (haystack, needle))
30143          result |= 1;
30144      }
30145    /* Free allocated memory, in case some sanitizer is watching.  */
30146    free (haystack);
30147    free (needle);
30148    return result;
30149
30150  ;
30151  return 0;
30152}
30153_ACEOF
30154if ac_fn_c_try_run "$LINENO"; then :
30155  gl_cv_func_strstr_linear=yes
30156else
30157  gl_cv_func_strstr_linear=no
30158fi
30159rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30160  conftest.$ac_objext conftest.beam conftest.$ac_ext
30161fi
30162
30163
30164fi
30165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
30166$as_echo "$gl_cv_func_strstr_linear" >&6; }
30167    case "$gl_cv_func_strstr_linear" in
30168      *yes) ;;
30169      *)
30170        REPLACE_STRSTR=1
30171        ;;
30172    esac
30173  fi
30174
30175  if test $REPLACE_STRSTR = 1; then
30176
30177
30178
30179
30180
30181
30182
30183
30184  gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
30185
30186  fi
30187
30188
30189
30190  if test $REPLACE_MEMCHR = 1; then
30191    REPLACE_STRSTR=1
30192  else
30193            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
30194$as_echo_n "checking whether strstr works... " >&6; }
30195if ${gl_cv_func_strstr_works_always+:} false; then :
30196  $as_echo_n "(cached) " >&6
30197else
30198  if test "$cross_compiling" = yes; then :
30199                                                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30200/* end confdefs.h.  */
30201
30202#ifdef __GNU_LIBRARY__
30203 #include <features.h>
30204 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
30205     || defined __UCLIBC__
30206  Lucky user
30207 #endif
30208#elif defined __CYGWIN__
30209 #include <cygwin/version.h>
30210 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
30211  Lucky user
30212 #endif
30213#else
30214  Lucky user
30215#endif
30216
30217_ACEOF
30218if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
30219  $EGREP "Lucky user" >/dev/null 2>&1; then :
30220  gl_cv_func_strstr_works_always="guessing yes"
30221else
30222  gl_cv_func_strstr_works_always="$gl_cross_guess_normal"
30223fi
30224rm -f conftest*
30225
30226
30227else
30228  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30229/* end confdefs.h.  */
30230
30231#include <string.h> /* for strstr */
30232#ifdef __GNU_LIBRARY__
30233 #include <features.h>
30234 #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28
30235  Unlucky user
30236 #endif
30237#endif
30238#define P "_EF_BF_BD"
30239#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
30240#define NEEDLE P P P P P
30241
30242int
30243main ()
30244{
30245return !!strstr (HAYSTACK, NEEDLE);
30246
30247  ;
30248  return 0;
30249}
30250_ACEOF
30251if ac_fn_c_try_run "$LINENO"; then :
30252  gl_cv_func_strstr_works_always=yes
30253else
30254  gl_cv_func_strstr_works_always=no
30255fi
30256rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30257  conftest.$ac_objext conftest.beam conftest.$ac_ext
30258fi
30259
30260
30261fi
30262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
30263$as_echo "$gl_cv_func_strstr_works_always" >&6; }
30264    case "$gl_cv_func_strstr_works_always" in
30265      *yes) ;;
30266      *)
30267        REPLACE_STRSTR=1
30268        ;;
30269    esac
30270  fi
30271
30272  if test $REPLACE_STRSTR = 1; then
30273
30274
30275
30276
30277
30278
30279
30280
30281  gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
30282
30283  fi
30284
30285
30286
30287
30288
30289          GNULIB_STRSTR=1
30290
30291
30292
30293
30294
30295$as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
30296
30297
30298
30299
30300
30301
30302
30303     for ac_func in strtok_r
30304do :
30305  ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
30306if test "x$ac_cv_func_strtok_r" = xyes; then :
30307  cat >>confdefs.h <<_ACEOF
30308#define HAVE_STRTOK_R 1
30309_ACEOF
30310
30311fi
30312done
30313
30314  if test $ac_cv_func_strtok_r = yes; then
30315    HAVE_STRTOK_R=1
30316                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtok_r works" >&5
30317$as_echo_n "checking whether strtok_r works... " >&6; }
30318if ${gl_cv_func_strtok_r_works+:} false; then :
30319  $as_echo_n "(cached) " >&6
30320else
30321  if test "$cross_compiling" = yes; then :
30322  case "$host_os" in
30323                           # Guess no on glibc systems.
30324            *-gnu* | gnu*) gl_cv_func_strtok_r_works="guessing no" ;;
30325                           # Guess yes on native Windows.
30326            mingw*)        gl_cv_func_strtok_r_works="guessing yes" ;;
30327            *)             gl_cv_func_strtok_r_works="guessing yes" ;;
30328          esac
30329
30330else
30331  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30332/* end confdefs.h.  */
30333
30334              #ifndef __OPTIMIZE__
30335              # define __OPTIMIZE__ 1
30336              #endif
30337              #undef __OPTIMIZE_SIZE__
30338              #undef __NO_INLINE__
30339              #include <stdlib.h>
30340              #include <string.h>
30341
30342int
30343main ()
30344{
30345static const char dummy[] = "\177\01a";
30346              char delimiters[] = "xxxxxxxx";
30347              char *save_ptr = (char *) dummy;
30348              strtok_r (delimiters, "x", &save_ptr);
30349              strtok_r (NULL, "x", &save_ptr);
30350              return 0;
30351
30352  ;
30353  return 0;
30354}
30355
30356_ACEOF
30357if ac_fn_c_try_run "$LINENO"; then :
30358  gl_cv_func_strtok_r_works=yes
30359else
30360  gl_cv_func_strtok_r_works=no
30361fi
30362rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30363  conftest.$ac_objext conftest.beam conftest.$ac_ext
30364fi
30365
30366
30367fi
30368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtok_r_works" >&5
30369$as_echo "$gl_cv_func_strtok_r_works" >&6; }
30370    case "$gl_cv_func_strtok_r_works" in
30371      *no)
30372                                UNDEFINE_STRTOK_R=1
30373        ;;
30374    esac
30375  else
30376    HAVE_STRTOK_R=0
30377  fi
30378
30379  if test $ac_cv_have_decl_strtok_r = no; then
30380    HAVE_DECL_STRTOK_R=0
30381  fi
30382
30383  if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
30384
30385
30386
30387
30388
30389
30390
30391
30392  gl_LIBOBJS="$gl_LIBOBJS strtok_r.$ac_objext"
30393
30394
30395  :
30396
30397  fi
30398
30399
30400
30401
30402
30403          GNULIB_STRTOK_R=1
30404
30405
30406
30407
30408
30409$as_echo "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h
30410
30411
30412
30413
30414
30415
30416
30417
30418
30419
30420
30421
30422
30423
30424     if test $gl_cv_have_include_next = yes; then
30425       gl_cv_next_sys_random_h='<'sys/random.h'>'
30426     else
30427       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/random.h>" >&5
30428$as_echo_n "checking absolute name of <sys/random.h>... " >&6; }
30429if ${gl_cv_next_sys_random_h+:} false; then :
30430  $as_echo_n "(cached) " >&6
30431else
30432
30433             if test $ac_cv_header_sys_random_h = yes; then
30434
30435
30436
30437
30438  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30439/* end confdefs.h.  */
30440#include <sys/random.h>
30441_ACEOF
30442                case "$host_os" in
30443    aix*) gl_absname_cpp="$ac_cpp -C" ;;
30444    *)    gl_absname_cpp="$ac_cpp" ;;
30445  esac
30446
30447  case "$host_os" in
30448    mingw*)
30449                                          gl_dirsep_regex='[/\\]'
30450      ;;
30451    *)
30452      gl_dirsep_regex='\/'
30453      ;;
30454  esac
30455      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30456  gl_header_literal_regex=`echo 'sys/random.h' \
30457                           | sed -e "$gl_make_literal_regex_sed"`
30458  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30459      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30460      s|^/[^/]|//&|
30461      p
30462      q
30463    }'
30464
30465        gl_cv_absolute_sys_random_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30466  sed -n "$gl_absolute_header_sed"`
30467
30468           gl_header=$gl_cv_absolute_sys_random_h
30469           gl_cv_next_sys_random_h='"'$gl_header'"'
30470          else
30471               gl_cv_next_sys_random_h='<'sys/random.h'>'
30472             fi
30473
30474
30475fi
30476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_random_h" >&5
30477$as_echo "$gl_cv_next_sys_random_h" >&6; }
30478     fi
30479     NEXT_SYS_RANDOM_H=$gl_cv_next_sys_random_h
30480
30481     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30482       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30483       gl_next_as_first_directive='<'sys/random.h'>'
30484     else
30485       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30486       gl_next_as_first_directive=$gl_cv_next_sys_random_h
30487     fi
30488     NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H=$gl_next_as_first_directive
30489
30490
30491
30492
30493  if test $ac_cv_header_sys_random_h = yes; then
30494    HAVE_SYS_RANDOM_H=1
30495  else
30496    HAVE_SYS_RANDOM_H=0
30497  fi
30498
30499
30500
30501  if test $ac_cv_header_sys_random_h = yes; then
30502    UNISTD_H_HAVE_SYS_RANDOM_H=1
30503  fi
30504
30505
30506
30507
30508
30509
30510
30511
30512
30513
30514
30515
30516
30517
30518
30519
30520
30521
30522
30523
30524
30525
30526
30527
30528     if test $gl_cv_have_include_next = yes; then
30529       gl_cv_next_sys_stat_h='<'sys/stat.h'>'
30530     else
30531       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
30532$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
30533if ${gl_cv_next_sys_stat_h+:} false; then :
30534  $as_echo_n "(cached) " >&6
30535else
30536
30537             if test $ac_cv_header_sys_stat_h = yes; then
30538
30539
30540
30541
30542  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30543/* end confdefs.h.  */
30544#include <sys/stat.h>
30545_ACEOF
30546                case "$host_os" in
30547    aix*) gl_absname_cpp="$ac_cpp -C" ;;
30548    *)    gl_absname_cpp="$ac_cpp" ;;
30549  esac
30550
30551  case "$host_os" in
30552    mingw*)
30553                                          gl_dirsep_regex='[/\\]'
30554      ;;
30555    *)
30556      gl_dirsep_regex='\/'
30557      ;;
30558  esac
30559      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30560  gl_header_literal_regex=`echo 'sys/stat.h' \
30561                           | sed -e "$gl_make_literal_regex_sed"`
30562  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30563      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30564      s|^/[^/]|//&|
30565      p
30566      q
30567    }'
30568
30569        gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30570  sed -n "$gl_absolute_header_sed"`
30571
30572           gl_header=$gl_cv_absolute_sys_stat_h
30573           gl_cv_next_sys_stat_h='"'$gl_header'"'
30574          else
30575               gl_cv_next_sys_stat_h='<'sys/stat.h'>'
30576             fi
30577
30578
30579fi
30580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
30581$as_echo "$gl_cv_next_sys_stat_h" >&6; }
30582     fi
30583     NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
30584
30585     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30586       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30587       gl_next_as_first_directive='<'sys/stat.h'>'
30588     else
30589       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30590       gl_next_as_first_directive=$gl_cv_next_sys_stat_h
30591     fi
30592     NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
30593
30594
30595
30596
30597
30598
30599
30600
30601    WINDOWS_STAT_TIMESPEC=0
30602
30603
30604
30605
30606
30607
30608
30609
30610      ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
30611     #include <sys/stat.h>
30612"
30613if test "x$ac_cv_type_nlink_t" = xyes; then :
30614
30615else
30616
30617$as_echo "#define nlink_t int" >>confdefs.h
30618
30619fi
30620
30621
30622
30623
30624
30625
30626
30627
30628
30629
30630
30631
30632
30633
30634
30635
30636
30637
30638
30639
30640
30641
30642
30643
30644
30645
30646     if test $gl_cv_have_include_next = yes; then
30647       gl_cv_next_sys_uio_h='<'sys/uio.h'>'
30648     else
30649       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
30650$as_echo_n "checking absolute name of <sys/uio.h>... " >&6; }
30651if ${gl_cv_next_sys_uio_h+:} false; then :
30652  $as_echo_n "(cached) " >&6
30653else
30654
30655             if test $ac_cv_header_sys_uio_h = yes; then
30656
30657
30658
30659
30660  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30661/* end confdefs.h.  */
30662#include <sys/uio.h>
30663_ACEOF
30664                case "$host_os" in
30665    aix*) gl_absname_cpp="$ac_cpp -C" ;;
30666    *)    gl_absname_cpp="$ac_cpp" ;;
30667  esac
30668
30669  case "$host_os" in
30670    mingw*)
30671                                          gl_dirsep_regex='[/\\]'
30672      ;;
30673    *)
30674      gl_dirsep_regex='\/'
30675      ;;
30676  esac
30677      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30678  gl_header_literal_regex=`echo 'sys/uio.h' \
30679                           | sed -e "$gl_make_literal_regex_sed"`
30680  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30681      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30682      s|^/[^/]|//&|
30683      p
30684      q
30685    }'
30686
30687        gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30688  sed -n "$gl_absolute_header_sed"`
30689
30690           gl_header=$gl_cv_absolute_sys_uio_h
30691           gl_cv_next_sys_uio_h='"'$gl_header'"'
30692          else
30693               gl_cv_next_sys_uio_h='<'sys/uio.h'>'
30694             fi
30695
30696
30697fi
30698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
30699$as_echo "$gl_cv_next_sys_uio_h" >&6; }
30700     fi
30701     NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
30702
30703     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30704       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30705       gl_next_as_first_directive='<'sys/uio.h'>'
30706     else
30707       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30708       gl_next_as_first_directive=$gl_cv_next_sys_uio_h
30709     fi
30710     NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
30711
30712
30713
30714
30715  if test $ac_cv_header_sys_uio_h = yes; then
30716    HAVE_SYS_UIO_H=1
30717  else
30718    HAVE_SYS_UIO_H=0
30719  fi
30720
30721
30722
30723
30724
30725  :
30726
30727
30728
30729
30730cat >>confdefs.h <<_ACEOF
30731#define GNULIB_TEMPNAME 1
30732_ACEOF
30733
30734
30735
30736
30737
30738
30739
30740
30741
30742
30743
30744
30745      ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "/* mingw's <time.h> provides the functions asctime_r, ctime_r,
30746         gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
30747         been included before.  */
30748      #if defined __MINGW32__
30749      # include <unistd.h>
30750      #endif
30751      #include <time.h>
30752
30753"
30754if test "x$ac_cv_have_decl_localtime_r" = xyes; then :
30755  ac_have_decl=1
30756else
30757  ac_have_decl=0
30758fi
30759
30760cat >>confdefs.h <<_ACEOF
30761#define HAVE_DECL_LOCALTIME_R $ac_have_decl
30762_ACEOF
30763
30764  if test $ac_cv_have_decl_localtime_r = no; then
30765    HAVE_DECL_LOCALTIME_R=0
30766  fi
30767
30768
30769  if test $ac_cv_func_localtime_r = yes; then
30770    HAVE_LOCALTIME_R=1
30771    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
30772$as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
30773if ${gl_cv_time_r_posix+:} false; then :
30774  $as_echo_n "(cached) " >&6
30775else
30776  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30777/* end confdefs.h.  */
30778/* mingw's <time.h> provides the functions asctime_r, ctime_r,
30779                 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
30780                 been included before.  */
30781              #if defined __MINGW32__
30782              # include <unistd.h>
30783              #endif
30784              #include <time.h>
30785
30786int
30787main ()
30788{
30789/* We don't need to append 'restrict's to the argument types,
30790                 even though the POSIX signature has the 'restrict's,
30791                 since C99 says they can't affect type compatibility.  */
30792              struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
30793              if (ptr) return 0;
30794              /* Check the return type is a pointer.
30795                 On HP-UX 10 it is 'int'.  */
30796              *localtime_r (0, 0);
30797  ;
30798  return 0;
30799}
30800
30801_ACEOF
30802if ac_fn_c_try_compile "$LINENO"; then :
30803  gl_cv_time_r_posix=yes
30804else
30805  gl_cv_time_r_posix=no
30806fi
30807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30808
30809fi
30810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
30811$as_echo "$gl_cv_time_r_posix" >&6; }
30812    if test $gl_cv_time_r_posix = yes; then
30813      REPLACE_LOCALTIME_R=0
30814    else
30815      REPLACE_LOCALTIME_R=1
30816    fi
30817  else
30818    HAVE_LOCALTIME_R=0
30819                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r exists as an inline function" >&5
30820$as_echo_n "checking whether localtime_r exists as an inline function... " >&6; }
30821if ${gl_cv_func_localtime_r_inline+:} false; then :
30822  $as_echo_n "(cached) " >&6
30823else
30824  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30825/* end confdefs.h.  */
30826/* mingw's <time.h> provides the functions asctime_r, ctime_r,
30827                 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
30828                 been included before.  */
30829              #if defined __MINGW32__
30830              # include <unistd.h>
30831              #endif
30832              #include <time.h>
30833
30834int
30835main ()
30836{
30837time_t a;
30838              struct tm r;
30839              localtime_r (&a, &r);
30840
30841  ;
30842  return 0;
30843}
30844
30845_ACEOF
30846if ac_fn_c_try_link "$LINENO"; then :
30847  gl_cv_func_localtime_r_inline=yes
30848else
30849  gl_cv_func_localtime_r_inline=no
30850fi
30851rm -f core conftest.err conftest.$ac_objext \
30852    conftest$ac_exeext conftest.$ac_ext
30853
30854fi
30855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localtime_r_inline" >&5
30856$as_echo "$gl_cv_func_localtime_r_inline" >&6; }
30857    if test $gl_cv_func_localtime_r_inline = yes; then
30858      REPLACE_LOCALTIME_R=1
30859    fi
30860  fi
30861
30862  if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
30863
30864
30865
30866
30867
30868
30869
30870
30871  gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
30872
30873
30874  :
30875
30876  fi
30877
30878
30879
30880
30881
30882          GNULIB_TIME_R=1
30883
30884
30885
30886
30887
30888$as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
30889
30890
30891
30892
30893
30894
30895
30896
30897
30898
30899
30900
30901
30902
30903
30904     if test $gl_cv_have_include_next = yes; then
30905       gl_cv_next_unistd_h='<'unistd.h'>'
30906     else
30907       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
30908$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
30909if ${gl_cv_next_unistd_h+:} false; then :
30910  $as_echo_n "(cached) " >&6
30911else
30912
30913             if test $ac_cv_header_unistd_h = yes; then
30914
30915
30916
30917
30918  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30919/* end confdefs.h.  */
30920#include <unistd.h>
30921_ACEOF
30922                case "$host_os" in
30923    aix*) gl_absname_cpp="$ac_cpp -C" ;;
30924    *)    gl_absname_cpp="$ac_cpp" ;;
30925  esac
30926
30927  case "$host_os" in
30928    mingw*)
30929                                          gl_dirsep_regex='[/\\]'
30930      ;;
30931    *)
30932      gl_dirsep_regex='\/'
30933      ;;
30934  esac
30935      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30936  gl_header_literal_regex=`echo 'unistd.h' \
30937                           | sed -e "$gl_make_literal_regex_sed"`
30938  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30939      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30940      s|^/[^/]|//&|
30941      p
30942      q
30943    }'
30944
30945        gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30946  sed -n "$gl_absolute_header_sed"`
30947
30948           gl_header=$gl_cv_absolute_unistd_h
30949           gl_cv_next_unistd_h='"'$gl_header'"'
30950          else
30951               gl_cv_next_unistd_h='<'unistd.h'>'
30952             fi
30953
30954
30955fi
30956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
30957$as_echo "$gl_cv_next_unistd_h" >&6; }
30958     fi
30959     NEXT_UNISTD_H=$gl_cv_next_unistd_h
30960
30961     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30962       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30963       gl_next_as_first_directive='<'unistd.h'>'
30964     else
30965       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30966       gl_next_as_first_directive=$gl_cv_next_unistd_h
30967     fi
30968     NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
30969
30970
30971
30972
30973  if test $ac_cv_header_unistd_h = yes; then
30974    HAVE_UNISTD_H=1
30975  else
30976    HAVE_UNISTD_H=0
30977  fi
30978
30979
30980
30981
30982
30983
30984
30985
30986
30987
30988
30989
30990
30991  if test $ac_cv_have_decl_execvpe = no; then
30992    HAVE_DECL_EXECVPE=0
30993  fi
30994
30995
30996
30997
30998
30999
31000
31001  if test $ac_cv_have_decl_unsetenv = no; then
31002    HAVE_DECL_UNSETENV=0
31003  fi
31004  for ac_func in unsetenv
31005do :
31006  ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
31007if test "x$ac_cv_func_unsetenv" = xyes; then :
31008  cat >>confdefs.h <<_ACEOF
31009#define HAVE_UNSETENV 1
31010_ACEOF
31011
31012fi
31013done
31014
31015  if test $ac_cv_func_unsetenv = no; then
31016    HAVE_UNSETENV=0
31017  else
31018    HAVE_UNSETENV=1
31019        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
31020$as_echo_n "checking for unsetenv() return type... " >&6; }
31021if ${gt_cv_func_unsetenv_ret+:} false; then :
31022  $as_echo_n "(cached) " >&6
31023else
31024  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31025/* end confdefs.h.  */
31026
31027#undef _BSD
31028#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
31029#include <stdlib.h>
31030extern
31031#ifdef __cplusplus
31032"C"
31033#endif
31034int unsetenv (const char *name);
31035
31036int
31037main ()
31038{
31039
31040  ;
31041  return 0;
31042}
31043_ACEOF
31044if ac_fn_c_try_compile "$LINENO"; then :
31045  gt_cv_func_unsetenv_ret='int'
31046else
31047  gt_cv_func_unsetenv_ret='void'
31048fi
31049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31050fi
31051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
31052$as_echo "$gt_cv_func_unsetenv_ret" >&6; }
31053    if test $gt_cv_func_unsetenv_ret = 'void'; then
31054
31055$as_echo "#define VOID_UNSETENV 1" >>confdefs.h
31056
31057      REPLACE_UNSETENV=1
31058    fi
31059
31060                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
31061$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
31062if ${gl_cv_func_unsetenv_works+:} false; then :
31063  $as_echo_n "(cached) " >&6
31064else
31065  if test "$cross_compiling" = yes; then :
31066  case "$host_os" in
31067                    # Guess yes on glibc systems.
31068            *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
31069                    # If we don't know, obey --enable-cross-guesses.
31070            *)      gl_cv_func_unsetenv_works="$gl_cross_guess_normal" ;;
31071          esac
31072
31073else
31074  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31075/* end confdefs.h.  */
31076
31077            #include <stdlib.h>
31078            #include <errno.h>
31079            extern char **environ;
31080
31081
31082$gl_mda_defines
31083
31084int
31085main ()
31086{
31087
31088            char entry1[] = "a=1";
31089            char entry2[] = "b=2";
31090            char *env[] = { entry1, entry2, NULL };
31091            if (putenv ((char *) "a=1")) return 1;
31092            if (putenv (entry2)) return 2;
31093            entry2[0] = 'a';
31094            unsetenv ("a");
31095            if (getenv ("a")) return 3;
31096            if (!unsetenv ("") || errno != EINVAL) return 4;
31097            entry2[0] = 'b';
31098            environ = env;
31099            if (!getenv ("a")) return 5;
31100            entry2[0] = 'a';
31101            unsetenv ("a");
31102            if (getenv ("a")) return 6;
31103
31104  ;
31105  return 0;
31106}
31107_ACEOF
31108if ac_fn_c_try_run "$LINENO"; then :
31109  gl_cv_func_unsetenv_works=yes
31110else
31111  gl_cv_func_unsetenv_works=no
31112fi
31113rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31114  conftest.$ac_objext conftest.beam conftest.$ac_ext
31115fi
31116
31117
31118fi
31119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
31120$as_echo "$gl_cv_func_unsetenv_works" >&6; }
31121    case "$gl_cv_func_unsetenv_works" in
31122      *yes) ;;
31123      *)
31124        REPLACE_UNSETENV=1
31125        ;;
31126    esac
31127  fi
31128
31129  if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
31130
31131
31132
31133
31134
31135
31136
31137
31138  gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
31139
31140
31141
31142
31143
31144  fi
31145
31146
31147
31148
31149
31150          GNULIB_UNSETENV=1
31151
31152
31153
31154
31155
31156$as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
31157
31158
31159
31160
31161
31162
31163
31164
31165
31166
31167
31168
31169
31170
31171
31172     if test $gl_cv_have_include_next = yes; then
31173       gl_cv_next_wchar_h='<'wchar.h'>'
31174     else
31175       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
31176$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
31177if ${gl_cv_next_wchar_h+:} false; then :
31178  $as_echo_n "(cached) " >&6
31179else
31180
31181             if test $ac_cv_header_wchar_h = yes; then
31182
31183
31184
31185
31186  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31187/* end confdefs.h.  */
31188#include <wchar.h>
31189_ACEOF
31190                case "$host_os" in
31191    aix*) gl_absname_cpp="$ac_cpp -C" ;;
31192    *)    gl_absname_cpp="$ac_cpp" ;;
31193  esac
31194
31195  case "$host_os" in
31196    mingw*)
31197                                          gl_dirsep_regex='[/\\]'
31198      ;;
31199    *)
31200      gl_dirsep_regex='\/'
31201      ;;
31202  esac
31203      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31204  gl_header_literal_regex=`echo 'wchar.h' \
31205                           | sed -e "$gl_make_literal_regex_sed"`
31206  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31207      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31208      s|^/[^/]|//&|
31209      p
31210      q
31211    }'
31212
31213        gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31214  sed -n "$gl_absolute_header_sed"`
31215
31216           gl_header=$gl_cv_absolute_wchar_h
31217           gl_cv_next_wchar_h='"'$gl_header'"'
31218          else
31219               gl_cv_next_wchar_h='<'wchar.h'>'
31220             fi
31221
31222
31223fi
31224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
31225$as_echo "$gl_cv_next_wchar_h" >&6; }
31226     fi
31227     NEXT_WCHAR_H=$gl_cv_next_wchar_h
31228
31229     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31230       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31231       gl_next_as_first_directive='<'wchar.h'>'
31232     else
31233       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31234       gl_next_as_first_directive=$gl_cv_next_wchar_h
31235     fi
31236     NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
31237
31238
31239
31240
31241  if test $ac_cv_header_wchar_h = yes; then
31242    HAVE_WCHAR_H=1
31243  else
31244    HAVE_WCHAR_H=0
31245  fi
31246
31247
31248
31249
31250
31251  if test $gt_cv_c_wint_t = yes; then
31252    HAVE_WINT_T=1
31253  else
31254    HAVE_WINT_T=0
31255  fi
31256
31257
31258
31259
31260
31261
31262
31263
31264
31265
31266  ac_fn_c_check_decl "$LINENO" "wcsdup" "ac_cv_have_decl_wcsdup" "
31267      #include <wchar.h>
31268
31269"
31270if test "x$ac_cv_have_decl_wcsdup" = xyes; then :
31271  ac_have_decl=1
31272else
31273  ac_have_decl=0
31274fi
31275
31276cat >>confdefs.h <<_ACEOF
31277#define HAVE_DECL_WCSDUP $ac_have_decl
31278_ACEOF
31279
31280  if test $ac_cv_have_decl_wcsdup = no; then
31281    HAVE_DECL_WCSDUP=0
31282  fi
31283
31284
31285
31286
31287
31288
31289  if test $ac_cv_func_iswcntrl = yes; then
31290    HAVE_ISWCNTRL=1
31291  else
31292    HAVE_ISWCNTRL=0
31293  fi
31294
31295
31296
31297  if test $gt_cv_c_wint_t = yes; then
31298    HAVE_WINT_T=1
31299  else
31300    HAVE_WINT_T=0
31301  fi
31302
31303
31304
31305
31306
31307
31308
31309
31310
31311
31312
31313
31314
31315     if test $gl_cv_have_include_next = yes; then
31316       gl_cv_next_wctype_h='<'wctype.h'>'
31317     else
31318       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
31319$as_echo_n "checking absolute name of <wctype.h>... " >&6; }
31320if ${gl_cv_next_wctype_h+:} false; then :
31321  $as_echo_n "(cached) " >&6
31322else
31323
31324             if test $ac_cv_header_wctype_h = yes; then
31325
31326
31327
31328
31329  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31330/* end confdefs.h.  */
31331#include <wctype.h>
31332_ACEOF
31333                case "$host_os" in
31334    aix*) gl_absname_cpp="$ac_cpp -C" ;;
31335    *)    gl_absname_cpp="$ac_cpp" ;;
31336  esac
31337
31338  case "$host_os" in
31339    mingw*)
31340                                          gl_dirsep_regex='[/\\]'
31341      ;;
31342    *)
31343      gl_dirsep_regex='\/'
31344      ;;
31345  esac
31346      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31347  gl_header_literal_regex=`echo 'wctype.h' \
31348                           | sed -e "$gl_make_literal_regex_sed"`
31349  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31350      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31351      s|^/[^/]|//&|
31352      p
31353      q
31354    }'
31355
31356        gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31357  sed -n "$gl_absolute_header_sed"`
31358
31359           gl_header=$gl_cv_absolute_wctype_h
31360           gl_cv_next_wctype_h='"'$gl_header'"'
31361          else
31362               gl_cv_next_wctype_h='<'wctype.h'>'
31363             fi
31364
31365
31366fi
31367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
31368$as_echo "$gl_cv_next_wctype_h" >&6; }
31369     fi
31370     NEXT_WCTYPE_H=$gl_cv_next_wctype_h
31371
31372     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31373       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31374       gl_next_as_first_directive='<'wctype.h'>'
31375     else
31376       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31377       gl_next_as_first_directive=$gl_cv_next_wctype_h
31378     fi
31379     NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
31380
31381
31382
31383
31384  if test $ac_cv_header_wctype_h = yes; then
31385    if test $ac_cv_func_iswcntrl = yes; then
31386                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
31387$as_echo_n "checking whether iswcntrl works... " >&6; }
31388if ${gl_cv_func_iswcntrl_works+:} false; then :
31389  $as_echo_n "(cached) " >&6
31390else
31391
31392          if test "$cross_compiling" = yes; then :
31393               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31394/* end confdefs.h.  */
31395#include <stdlib.h>
31396                          #if __GNU_LIBRARY__ == 1
31397                          Linux libc5 i18n is broken.
31398                          #endif
31399int
31400main ()
31401{
31402
31403  ;
31404  return 0;
31405}
31406_ACEOF
31407if ac_fn_c_try_compile "$LINENO"; then :
31408  gl_cv_func_iswcntrl_works="guessing yes"
31409else
31410  gl_cv_func_iswcntrl_works="guessing no"
31411fi
31412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31413
31414else
31415  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31416/* end confdefs.h.  */
31417
31418               #include <wchar.h>
31419               #include <wctype.h>
31420               int main () { return iswprint ('x') == 0; }
31421
31422_ACEOF
31423if ac_fn_c_try_run "$LINENO"; then :
31424  gl_cv_func_iswcntrl_works=yes
31425else
31426  gl_cv_func_iswcntrl_works=no
31427fi
31428rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31429  conftest.$ac_objext conftest.beam conftest.$ac_ext
31430fi
31431
31432
31433fi
31434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
31435$as_echo "$gl_cv_func_iswcntrl_works" >&6; }
31436    fi
31437    HAVE_WCTYPE_H=1
31438  else
31439    HAVE_WCTYPE_H=0
31440  fi
31441
31442
31443  if test $GNULIB_OVERRIDES_WINT_T = 1; then
31444    REPLACE_ISWCNTRL=1
31445  else
31446    case "$gl_cv_func_iswcntrl_works" in
31447      *yes) REPLACE_ISWCNTRL=0 ;;
31448      *)    REPLACE_ISWCNTRL=1 ;;
31449    esac
31450  fi
31451
31452
31453  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
31454        :
31455  fi
31456
31457  if test $REPLACE_ISWCNTRL = 1; then
31458    REPLACE_TOWLOWER=1
31459  else
31460    for ac_func in towlower
31461do :
31462  ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
31463if test "x$ac_cv_func_towlower" = xyes; then :
31464  cat >>confdefs.h <<_ACEOF
31465#define HAVE_TOWLOWER 1
31466_ACEOF
31467
31468fi
31469done
31470
31471    if test $ac_cv_func_towlower = yes; then
31472      REPLACE_TOWLOWER=0
31473    else
31474      ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "#include <wchar.h>
31475          #if HAVE_WCTYPE_H
31476          # include <wctype.h>
31477          #endif
31478
31479"
31480if test "x$ac_cv_have_decl_towlower" = xyes; then :
31481  ac_have_decl=1
31482else
31483  ac_have_decl=0
31484fi
31485
31486cat >>confdefs.h <<_ACEOF
31487#define HAVE_DECL_TOWLOWER $ac_have_decl
31488_ACEOF
31489
31490      if test $ac_cv_have_decl_towlower = yes; then
31491                                REPLACE_TOWLOWER=1
31492      else
31493        REPLACE_TOWLOWER=0
31494      fi
31495    fi
31496  fi
31497
31498
31499  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
31500        :
31501  fi
31502
31503          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
31504$as_echo_n "checking for wctype_t... " >&6; }
31505if ${gl_cv_type_wctype_t+:} false; then :
31506  $as_echo_n "(cached) " >&6
31507else
31508  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31509/* end confdefs.h.  */
31510#include <wchar.h>
31511            #if HAVE_WCTYPE_H
31512            # include <wctype.h>
31513            #endif
31514            wctype_t a;
31515
31516int
31517main ()
31518{
31519
31520  ;
31521  return 0;
31522}
31523_ACEOF
31524if ac_fn_c_try_compile "$LINENO"; then :
31525  gl_cv_type_wctype_t=yes
31526else
31527  gl_cv_type_wctype_t=no
31528fi
31529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31530
31531fi
31532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
31533$as_echo "$gl_cv_type_wctype_t" >&6; }
31534  if test $gl_cv_type_wctype_t = no; then
31535    HAVE_WCTYPE_T=0
31536  fi
31537
31538      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
31539$as_echo_n "checking for wctrans_t... " >&6; }
31540if ${gl_cv_type_wctrans_t+:} false; then :
31541  $as_echo_n "(cached) " >&6
31542else
31543  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31544/* end confdefs.h.  */
31545#include <wchar.h>
31546            #include <wctype.h>
31547            wctrans_t a;
31548
31549int
31550main ()
31551{
31552
31553  ;
31554  return 0;
31555}
31556_ACEOF
31557if ac_fn_c_try_compile "$LINENO"; then :
31558  gl_cv_type_wctrans_t=yes
31559else
31560  gl_cv_type_wctrans_t=no
31561fi
31562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31563
31564fi
31565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
31566$as_echo "$gl_cv_type_wctrans_t" >&6; }
31567  if test $gl_cv_type_wctrans_t = no; then
31568    HAVE_WCTRANS_T=0
31569  fi
31570
31571
31572
31573
31574
31575
31576  case "$host_os" in
31577    mingw*)
31578
31579
31580
31581
31582
31583
31584
31585
31586  gl_LIBOBJS="$gl_LIBOBJS windows-mutex.$ac_objext"
31587
31588      ;;
31589  esac
31590
31591  case "$host_os" in
31592    mingw*)
31593
31594
31595
31596
31597
31598
31599
31600
31601  gl_LIBOBJS="$gl_LIBOBJS windows-once.$ac_objext"
31602
31603      ;;
31604  esac
31605
31606  case "$host_os" in
31607    mingw*)
31608
31609
31610
31611
31612
31613
31614
31615
31616  gl_LIBOBJS="$gl_LIBOBJS windows-recmutex.$ac_objext"
31617
31618      ;;
31619  esac
31620
31621  case "$host_os" in
31622    mingw*)
31623
31624
31625
31626
31627
31628
31629
31630
31631  gl_LIBOBJS="$gl_LIBOBJS windows-rwlock.$ac_objext"
31632
31633      ;;
31634  esac
31635
31636
31637      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wmemchr" >&5
31638$as_echo_n "checking for wmemchr... " >&6; }
31639if ${gl_cv_func_wmemchr+:} false; then :
31640  $as_echo_n "(cached) " >&6
31641else
31642  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31643/* end confdefs.h.  */
31644#include <wchar.h>
31645
31646int
31647main ()
31648{
31649return ! wmemchr ((const wchar_t *) 0, (wchar_t) ' ', 0);
31650  ;
31651  return 0;
31652}
31653
31654_ACEOF
31655if ac_fn_c_try_link "$LINENO"; then :
31656  gl_cv_func_wmemchr=yes
31657else
31658  gl_cv_func_wmemchr=no
31659fi
31660rm -f core conftest.err conftest.$ac_objext \
31661    conftest$ac_exeext conftest.$ac_ext
31662
31663fi
31664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wmemchr" >&5
31665$as_echo "$gl_cv_func_wmemchr" >&6; }
31666  if test $gl_cv_func_wmemchr = no; then
31667    HAVE_WMEMCHR=0
31668  fi
31669
31670  if test $HAVE_WMEMCHR = 0; then
31671
31672
31673
31674
31675
31676
31677
31678
31679  gl_LIBOBJS="$gl_LIBOBJS wmemchr.$ac_objext"
31680
31681  fi
31682
31683
31684
31685
31686
31687          GNULIB_WMEMCHR=1
31688
31689
31690
31691
31692
31693$as_echo "#define GNULIB_TEST_WMEMCHR 1" >>confdefs.h
31694
31695
31696
31697
31698
31699
31700
31701
31702
31703
31704
31705  if test $ac_cv_func_wmempcpy = no; then
31706    HAVE_WMEMPCPY=0
31707  fi
31708
31709  if test $HAVE_WMEMPCPY = 0; then
31710
31711
31712
31713
31714
31715
31716
31717
31718  gl_LIBOBJS="$gl_LIBOBJS wmempcpy.$ac_objext"
31719
31720  fi
31721
31722
31723
31724
31725
31726          GNULIB_WMEMPCPY=1
31727
31728
31729
31730
31731
31732$as_echo "#define GNULIB_TEST_WMEMPCPY 1" >>confdefs.h
31733
31734
31735
31736  # End of code from modules
31737
31738
31739
31740
31741
31742
31743
31744
31745
31746  gltests_libdeps=
31747  gltests_ltlibdeps=
31748
31749
31750
31751
31752
31753
31754
31755
31756
31757
31758  gl_source_base='tests'
31759  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
31760
31761  gl_module_indicator_condition=$gltests_WITNESS
31762
31763
31764
31765
31766
31767
31768
31769
31770
31771  LIBGNU_LIBDEPS="$gl_libdeps"
31772
31773  LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
31774
31775
31776
31777am__api_version='1.15'
31778
31779# Find a good install program.  We prefer a C program (faster),
31780# so one script is as good as another.  But avoid the broken or
31781# incompatible versions:
31782# SysV /etc/install, /usr/sbin/install
31783# SunOS /usr/etc/install
31784# IRIX /sbin/install
31785# AIX /bin/install
31786# AmigaOS /C/install, which installs bootblocks on floppy discs
31787# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
31788# AFS /usr/afsws/bin/install, which mishandles nonexistent args
31789# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
31790# OS/2's system install, which has a completely different semantic
31791# ./install, which can be erroneously created by make from ./install.sh.
31792# Reject install programs that cannot install multiple files.
31793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
31794$as_echo_n "checking for a BSD-compatible install... " >&6; }
31795if test -z "$INSTALL"; then
31796if ${ac_cv_path_install+:} false; then :
31797  $as_echo_n "(cached) " >&6
31798else
31799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31800for as_dir in $PATH
31801do
31802  IFS=$as_save_IFS
31803  test -z "$as_dir" && as_dir=.
31804    # Account for people who put trailing slashes in PATH elements.
31805case $as_dir/ in #((
31806  ./ | .// | /[cC]/* | \
31807  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
31808  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
31809  /usr/ucb/* ) ;;
31810  *)
31811    # OSF1 and SCO ODT 3.0 have their own names for install.
31812    # Don't use installbsd from OSF since it installs stuff as root
31813    # by default.
31814    for ac_prog in ginstall scoinst install; do
31815      for ac_exec_ext in '' $ac_executable_extensions; do
31816	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
31817	  if test $ac_prog = install &&
31818	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
31819	    # AIX install.  It has an incompatible calling convention.
31820	    :
31821	  elif test $ac_prog = install &&
31822	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
31823	    # program-specific install script used by HP pwplus--don't use.
31824	    :
31825	  else
31826	    rm -rf conftest.one conftest.two conftest.dir
31827	    echo one > conftest.one
31828	    echo two > conftest.two
31829	    mkdir conftest.dir
31830	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
31831	      test -s conftest.one && test -s conftest.two &&
31832	      test -s conftest.dir/conftest.one &&
31833	      test -s conftest.dir/conftest.two
31834	    then
31835	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
31836	      break 3
31837	    fi
31838	  fi
31839	fi
31840      done
31841    done
31842    ;;
31843esac
31844
31845  done
31846IFS=$as_save_IFS
31847
31848rm -rf conftest.one conftest.two conftest.dir
31849
31850fi
31851  if test "${ac_cv_path_install+set}" = set; then
31852    INSTALL=$ac_cv_path_install
31853  else
31854    # As a last resort, use the slow shell script.  Don't cache a
31855    # value for INSTALL within a source directory, because that will
31856    # break other packages using the cache if that directory is
31857    # removed, or if the value is a relative name.
31858    INSTALL=$ac_install_sh
31859  fi
31860fi
31861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
31862$as_echo "$INSTALL" >&6; }
31863
31864# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
31865# It thinks the first close brace ends the variable substitution.
31866test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
31867
31868test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
31869
31870test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
31871
31872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
31873$as_echo_n "checking whether build environment is sane... " >&6; }
31874# Reject unsafe characters in $srcdir or the absolute working directory
31875# name.  Accept space and tab only in the latter.
31876am_lf='
31877'
31878case `pwd` in
31879  *[\\\"\#\$\&\'\`$am_lf]*)
31880    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
31881esac
31882case $srcdir in
31883  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
31884    as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
31885esac
31886
31887# Do 'set' in a subshell so we don't clobber the current shell's
31888# arguments.  Must try -L first in case configure is actually a
31889# symlink; some systems play weird games with the mod time of symlinks
31890# (eg FreeBSD returns the mod time of the symlink's containing
31891# directory).
31892if (
31893   am_has_slept=no
31894   for am_try in 1 2; do
31895     echo "timestamp, slept: $am_has_slept" > conftest.file
31896     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
31897     if test "$*" = "X"; then
31898	# -L didn't work.
31899	set X `ls -t "$srcdir/configure" conftest.file`
31900     fi
31901     if test "$*" != "X $srcdir/configure conftest.file" \
31902	&& test "$*" != "X conftest.file $srcdir/configure"; then
31903
31904	# If neither matched, then we have a broken ls.  This can happen
31905	# if, for instance, CONFIG_SHELL is bash and it inherits a
31906	# broken ls alias from the environment.  This has actually
31907	# happened.  Such a system could not be considered "sane".
31908	as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
31909  alias in your environment" "$LINENO" 5
31910     fi
31911     if test "$2" = conftest.file || test $am_try -eq 2; then
31912       break
31913     fi
31914     # Just in case.
31915     sleep 1
31916     am_has_slept=yes
31917   done
31918   test "$2" = conftest.file
31919   )
31920then
31921   # Ok.
31922   :
31923else
31924   as_fn_error $? "newly created file is older than distributed files!
31925Check your system clock" "$LINENO" 5
31926fi
31927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31928$as_echo "yes" >&6; }
31929# If we didn't sleep, we still need to ensure time stamps of config.status and
31930# generated files are strictly newer.
31931am_sleep_pid=
31932if grep 'slept: no' conftest.file >/dev/null 2>&1; then
31933  ( sleep 1 ) &
31934  am_sleep_pid=$!
31935fi
31936
31937rm -f conftest.file
31938
31939test "$program_prefix" != NONE &&
31940  program_transform_name="s&^&$program_prefix&;$program_transform_name"
31941# Use a double $ so make ignores it.
31942test "$program_suffix" != NONE &&
31943  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
31944# Double any \ or $.
31945# By default was `s,x,x', remove it if useless.
31946ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
31947program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
31948
31949# Expand $ac_aux_dir to an absolute path.
31950am_aux_dir=`cd "$ac_aux_dir" && pwd`
31951
31952if test x"${MISSING+set}" != xset; then
31953  case $am_aux_dir in
31954  *\ * | *\	*)
31955    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
31956  *)
31957    MISSING="\${SHELL} $am_aux_dir/missing" ;;
31958  esac
31959fi
31960# Use eval to expand $SHELL
31961if eval "$MISSING --is-lightweight"; then
31962  am_missing_run="$MISSING "
31963else
31964  am_missing_run=
31965  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
31966$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
31967fi
31968
31969if test x"${install_sh+set}" != xset; then
31970  case $am_aux_dir in
31971  *\ * | *\	*)
31972    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
31973  *)
31974    install_sh="\${SHELL} $am_aux_dir/install-sh"
31975  esac
31976fi
31977
31978# Installed binaries are usually stripped using 'strip' when the user
31979# run "make install-strip".  However 'strip' might not be the right
31980# tool to use in cross-compilation environments, therefore Automake
31981# will honor the 'STRIP' environment variable to overrule this program.
31982if test "$cross_compiling" != no; then
31983  if test -n "$ac_tool_prefix"; then
31984  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
31985set dummy ${ac_tool_prefix}strip; ac_word=$2
31986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31987$as_echo_n "checking for $ac_word... " >&6; }
31988if ${ac_cv_prog_STRIP+:} false; then :
31989  $as_echo_n "(cached) " >&6
31990else
31991  if test -n "$STRIP"; then
31992  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
31993else
31994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31995for as_dir in $PATH
31996do
31997  IFS=$as_save_IFS
31998  test -z "$as_dir" && as_dir=.
31999    for ac_exec_ext in '' $ac_executable_extensions; do
32000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32001    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
32002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32003    break 2
32004  fi
32005done
32006  done
32007IFS=$as_save_IFS
32008
32009fi
32010fi
32011STRIP=$ac_cv_prog_STRIP
32012if test -n "$STRIP"; then
32013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
32014$as_echo "$STRIP" >&6; }
32015else
32016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32017$as_echo "no" >&6; }
32018fi
32019
32020
32021fi
32022if test -z "$ac_cv_prog_STRIP"; then
32023  ac_ct_STRIP=$STRIP
32024  # Extract the first word of "strip", so it can be a program name with args.
32025set dummy strip; ac_word=$2
32026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32027$as_echo_n "checking for $ac_word... " >&6; }
32028if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
32029  $as_echo_n "(cached) " >&6
32030else
32031  if test -n "$ac_ct_STRIP"; then
32032  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
32033else
32034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32035for as_dir in $PATH
32036do
32037  IFS=$as_save_IFS
32038  test -z "$as_dir" && as_dir=.
32039    for ac_exec_ext in '' $ac_executable_extensions; do
32040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32041    ac_cv_prog_ac_ct_STRIP="strip"
32042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32043    break 2
32044  fi
32045done
32046  done
32047IFS=$as_save_IFS
32048
32049fi
32050fi
32051ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
32052if test -n "$ac_ct_STRIP"; then
32053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
32054$as_echo "$ac_ct_STRIP" >&6; }
32055else
32056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32057$as_echo "no" >&6; }
32058fi
32059
32060  if test "x$ac_ct_STRIP" = x; then
32061    STRIP=":"
32062  else
32063    case $cross_compiling:$ac_tool_warned in
32064yes:)
32065{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32066$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32067ac_tool_warned=yes ;;
32068esac
32069    STRIP=$ac_ct_STRIP
32070  fi
32071else
32072  STRIP="$ac_cv_prog_STRIP"
32073fi
32074
32075fi
32076INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
32077
32078for ac_prog in gawk mawk nawk awk
32079do
32080  # Extract the first word of "$ac_prog", so it can be a program name with args.
32081set dummy $ac_prog; ac_word=$2
32082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32083$as_echo_n "checking for $ac_word... " >&6; }
32084if ${ac_cv_prog_AWK+:} false; then :
32085  $as_echo_n "(cached) " >&6
32086else
32087  if test -n "$AWK"; then
32088  ac_cv_prog_AWK="$AWK" # Let the user override the test.
32089else
32090as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32091for as_dir in $PATH
32092do
32093  IFS=$as_save_IFS
32094  test -z "$as_dir" && as_dir=.
32095    for ac_exec_ext in '' $ac_executable_extensions; do
32096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32097    ac_cv_prog_AWK="$ac_prog"
32098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32099    break 2
32100  fi
32101done
32102  done
32103IFS=$as_save_IFS
32104
32105fi
32106fi
32107AWK=$ac_cv_prog_AWK
32108if test -n "$AWK"; then
32109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
32110$as_echo "$AWK" >&6; }
32111else
32112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32113$as_echo "no" >&6; }
32114fi
32115
32116
32117  test -n "$AWK" && break
32118done
32119
32120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
32121$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
32122set x ${MAKE-make}
32123ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
32124if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
32125  $as_echo_n "(cached) " >&6
32126else
32127  cat >conftest.make <<\_ACEOF
32128SHELL = /bin/sh
32129all:
32130	@echo '@@@%%%=$(MAKE)=@@@%%%'
32131_ACEOF
32132# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
32133case `${MAKE-make} -f conftest.make 2>/dev/null` in
32134  *@@@%%%=?*=@@@%%%*)
32135    eval ac_cv_prog_make_${ac_make}_set=yes;;
32136  *)
32137    eval ac_cv_prog_make_${ac_make}_set=no;;
32138esac
32139rm -f conftest.make
32140fi
32141if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
32142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32143$as_echo "yes" >&6; }
32144  SET_MAKE=
32145else
32146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32147$as_echo "no" >&6; }
32148  SET_MAKE="MAKE=${MAKE-make}"
32149fi
32150
32151rm -rf .tst 2>/dev/null
32152mkdir .tst 2>/dev/null
32153if test -d .tst; then
32154  am__leading_dot=.
32155else
32156  am__leading_dot=_
32157fi
32158rmdir .tst 2>/dev/null
32159
32160DEPDIR="${am__leading_dot}deps"
32161
32162ac_config_commands="$ac_config_commands depfiles"
32163
32164
32165am_make=${MAKE-make}
32166cat > confinc << 'END'
32167am__doit:
32168	@echo this is the am__doit target
32169.PHONY: am__doit
32170END
32171# If we don't find an include directive, just comment out the code.
32172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
32173$as_echo_n "checking for style of include used by $am_make... " >&6; }
32174am__include="#"
32175am__quote=
32176_am_result=none
32177# First try GNU make style include.
32178echo "include confinc" > confmf
32179# Ignore all kinds of additional output from 'make'.
32180case `$am_make -s -f confmf 2> /dev/null` in #(
32181*the\ am__doit\ target*)
32182  am__include=include
32183  am__quote=
32184  _am_result=GNU
32185  ;;
32186esac
32187# Now try BSD make style include.
32188if test "$am__include" = "#"; then
32189   echo '.include "confinc"' > confmf
32190   case `$am_make -s -f confmf 2> /dev/null` in #(
32191   *the\ am__doit\ target*)
32192     am__include=.include
32193     am__quote="\""
32194     _am_result=BSD
32195     ;;
32196   esac
32197fi
32198
32199
32200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
32201$as_echo "$_am_result" >&6; }
32202rm -f confinc confmf
32203
32204# Check whether --enable-dependency-tracking was given.
32205if test "${enable_dependency_tracking+set}" = set; then :
32206  enableval=$enable_dependency_tracking;
32207fi
32208
32209if test "x$enable_dependency_tracking" != xno; then
32210  am_depcomp="$ac_aux_dir/depcomp"
32211  AMDEPBACKSLASH='\'
32212  am__nodep='_no'
32213fi
32214 if test "x$enable_dependency_tracking" != xno; then
32215  AMDEP_TRUE=
32216  AMDEP_FALSE='#'
32217else
32218  AMDEP_TRUE='#'
32219  AMDEP_FALSE=
32220fi
32221
32222
32223# Check whether --enable-silent-rules was given.
32224if test "${enable_silent_rules+set}" = set; then :
32225  enableval=$enable_silent_rules;
32226fi
32227
32228case $enable_silent_rules in # (((
32229  yes) AM_DEFAULT_VERBOSITY=0;;
32230   no) AM_DEFAULT_VERBOSITY=1;;
32231    *) AM_DEFAULT_VERBOSITY=1;;
32232esac
32233am_make=${MAKE-make}
32234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
32235$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
32236if ${am_cv_make_support_nested_variables+:} false; then :
32237  $as_echo_n "(cached) " >&6
32238else
32239  if $as_echo 'TRUE=$(BAR$(V))
32240BAR0=false
32241BAR1=true
32242V=1
32243am__doit:
32244	@$(TRUE)
32245.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
32246  am_cv_make_support_nested_variables=yes
32247else
32248  am_cv_make_support_nested_variables=no
32249fi
32250fi
32251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
32252$as_echo "$am_cv_make_support_nested_variables" >&6; }
32253if test $am_cv_make_support_nested_variables = yes; then
32254    AM_V='$(V)'
32255  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
32256else
32257  AM_V=$AM_DEFAULT_VERBOSITY
32258  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
32259fi
32260AM_BACKSLASH='\'
32261
32262if test "`cd $srcdir && pwd`" != "`pwd`"; then
32263  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
32264  # is not polluted with repeated "-I."
32265  am__isrc=' -I$(srcdir)'
32266  # test to see if srcdir already configured
32267  if test -f $srcdir/config.status; then
32268    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
32269  fi
32270fi
32271
32272# test whether we have cygpath
32273if test -z "$CYGPATH_W"; then
32274  if (cygpath --version) >/dev/null 2>/dev/null; then
32275    CYGPATH_W='cygpath -w'
32276  else
32277    CYGPATH_W=echo
32278  fi
32279fi
32280
32281
32282# Define the identity of the package.
32283 PACKAGE='libgnu'
32284 VERSION='UNUSED-VERSION'
32285
32286
32287# Some tools Automake needs.
32288
32289ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
32290
32291
32292AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
32293
32294
32295AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
32296
32297
32298AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
32299
32300
32301MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
32302
32303# For better backward compatibility.  To be removed once Automake 1.9.x
32304# dies out for good.  For more background, see:
32305# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
32306# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
32307mkdir_p='$(MKDIR_P)'
32308
32309# We need awk for the "check" target (and possibly the TAP driver).  The
32310# system "awk" is bad on some platforms.
32311# Always define AMTAR for backward compatibility.  Yes, it's still used
32312# in the wild :-(  We should find a proper way to deprecate it ...
32313AMTAR='$${TAR-tar}'
32314
32315
32316# We'll loop over all known methods to create a tar archive until one works.
32317_am_tools='gnutar  pax cpio none'
32318
32319am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
32320
32321
32322
32323
32324
32325depcc="$CC"   am_compiler_list=
32326
32327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
32328$as_echo_n "checking dependency style of $depcc... " >&6; }
32329if ${am_cv_CC_dependencies_compiler_type+:} false; then :
32330  $as_echo_n "(cached) " >&6
32331else
32332  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
32333  # We make a subdir and do the tests there.  Otherwise we can end up
32334  # making bogus files that we don't know about and never remove.  For
32335  # instance it was reported that on HP-UX the gcc test will end up
32336  # making a dummy file named 'D' -- because '-MD' means "put the output
32337  # in D".
32338  rm -rf conftest.dir
32339  mkdir conftest.dir
32340  # Copy depcomp to subdir because otherwise we won't find it if we're
32341  # using a relative directory.
32342  cp "$am_depcomp" conftest.dir
32343  cd conftest.dir
32344  # We will build objects and dependencies in a subdirectory because
32345  # it helps to detect inapplicable dependency modes.  For instance
32346  # both Tru64's cc and ICC support -MD to output dependencies as a
32347  # side effect of compilation, but ICC will put the dependencies in
32348  # the current directory while Tru64 will put them in the object
32349  # directory.
32350  mkdir sub
32351
32352  am_cv_CC_dependencies_compiler_type=none
32353  if test "$am_compiler_list" = ""; then
32354     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
32355  fi
32356  am__universal=false
32357  case " $depcc " in #(
32358     *\ -arch\ *\ -arch\ *) am__universal=true ;;
32359     esac
32360
32361  for depmode in $am_compiler_list; do
32362    # Setup a source with many dependencies, because some compilers
32363    # like to wrap large dependency lists on column 80 (with \), and
32364    # we should not choose a depcomp mode which is confused by this.
32365    #
32366    # We need to recreate these files for each test, as the compiler may
32367    # overwrite some of them when testing with obscure command lines.
32368    # This happens at least with the AIX C compiler.
32369    : > sub/conftest.c
32370    for i in 1 2 3 4 5 6; do
32371      echo '#include "conftst'$i'.h"' >> sub/conftest.c
32372      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
32373      # Solaris 10 /bin/sh.
32374      echo '/* dummy */' > sub/conftst$i.h
32375    done
32376    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
32377
32378    # We check with '-c' and '-o' for the sake of the "dashmstdout"
32379    # mode.  It turns out that the SunPro C++ compiler does not properly
32380    # handle '-M -o', and we need to detect this.  Also, some Intel
32381    # versions had trouble with output in subdirs.
32382    am__obj=sub/conftest.${OBJEXT-o}
32383    am__minus_obj="-o $am__obj"
32384    case $depmode in
32385    gcc)
32386      # This depmode causes a compiler race in universal mode.
32387      test "$am__universal" = false || continue
32388      ;;
32389    nosideeffect)
32390      # After this tag, mechanisms are not by side-effect, so they'll
32391      # only be used when explicitly requested.
32392      if test "x$enable_dependency_tracking" = xyes; then
32393	continue
32394      else
32395	break
32396      fi
32397      ;;
32398    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
32399      # This compiler won't grok '-c -o', but also, the minuso test has
32400      # not run yet.  These depmodes are late enough in the game, and
32401      # so weak that their functioning should not be impacted.
32402      am__obj=conftest.${OBJEXT-o}
32403      am__minus_obj=
32404      ;;
32405    none) break ;;
32406    esac
32407    if depmode=$depmode \
32408       source=sub/conftest.c object=$am__obj \
32409       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
32410       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
32411         >/dev/null 2>conftest.err &&
32412       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
32413       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
32414       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
32415       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
32416      # icc doesn't choke on unknown options, it will just issue warnings
32417      # or remarks (even with -Werror).  So we grep stderr for any message
32418      # that says an option was ignored or not supported.
32419      # When given -MP, icc 7.0 and 7.1 complain thusly:
32420      #   icc: Command line warning: ignoring option '-M'; no argument required
32421      # The diagnosis changed in icc 8.0:
32422      #   icc: Command line remark: option '-MP' not supported
32423      if (grep 'ignoring option' conftest.err ||
32424          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
32425        am_cv_CC_dependencies_compiler_type=$depmode
32426        break
32427      fi
32428    fi
32429  done
32430
32431  cd ..
32432  rm -rf conftest.dir
32433else
32434  am_cv_CC_dependencies_compiler_type=none
32435fi
32436
32437fi
32438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
32439$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
32440CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
32441
32442 if
32443  test "x$enable_dependency_tracking" != xno \
32444  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
32445  am__fastdepCC_TRUE=
32446  am__fastdepCC_FALSE='#'
32447else
32448  am__fastdepCC_TRUE='#'
32449  am__fastdepCC_FALSE=
32450fi
32451
32452
32453
32454# POSIX will say in a future version that running "rm -f" with no argument
32455# is OK; and we want to be able to make that assumption in our Makefile
32456# recipes.  So use an aggressive probe to check that the usage we want is
32457# actually supported "in the wild" to an acceptable degree.
32458# See automake bug#10828.
32459# To make any issue more visible, cause the running configure to be aborted
32460# by default if the 'rm' program in use doesn't match our expectations; the
32461# user can still override this though.
32462if rm -f && rm -fr && rm -rf; then : OK; else
32463  cat >&2 <<'END'
32464Oops!
32465
32466Your 'rm' program seems unable to run without file operands specified
32467on the command line, even when the '-f' option is present.  This is contrary
32468to the behaviour of most rm programs out there, and not conforming with
32469the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
32470
32471Please tell bug-automake@gnu.org about your system, including the value
32472of your $PATH and any error possibly output before this message.  This
32473can help us improve future automake versions.
32474
32475END
32476  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
32477    echo 'Configuration will proceed anyway, since you have set the' >&2
32478    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
32479    echo >&2
32480  else
32481    cat >&2 <<'END'
32482Aborting the configuration process, to ensure you take notice of the issue.
32483
32484You can download and install GNU coreutils to get an 'rm' implementation
32485that behaves properly: <http://www.gnu.org/software/coreutils/>.
32486
32487If you want to complete the configuration process using your problematic
32488'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
32489to "yes", and re-run configure.
32490
32491END
32492    as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
32493  fi
32494fi
32495
32496
32497# Check whether --enable-silent-rules was given.
32498if test "${enable_silent_rules+set}" = set; then :
32499  enableval=$enable_silent_rules;
32500fi
32501
32502case $enable_silent_rules in # (((
32503  yes) AM_DEFAULT_VERBOSITY=0;;
32504   no) AM_DEFAULT_VERBOSITY=1;;
32505    *) AM_DEFAULT_VERBOSITY=0;;
32506esac
32507am_make=${MAKE-make}
32508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
32509$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
32510if ${am_cv_make_support_nested_variables+:} false; then :
32511  $as_echo_n "(cached) " >&6
32512else
32513  if $as_echo 'TRUE=$(BAR$(V))
32514BAR0=false
32515BAR1=true
32516V=1
32517am__doit:
32518	@$(TRUE)
32519.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
32520  am_cv_make_support_nested_variables=yes
32521else
32522  am_cv_make_support_nested_variables=no
32523fi
32524fi
32525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
32526$as_echo "$am_cv_make_support_nested_variables" >&6; }
32527if test $am_cv_make_support_nested_variables = yes; then
32528    AM_V='$(V)'
32529  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
32530else
32531  AM_V=$AM_DEFAULT_VERBOSITY
32532  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
32533fi
32534AM_BACKSLASH='\'
32535
32536
32537# --------------------- #
32538# Checks for programs.  #
32539# --------------------- #
32540
32541
32542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
32543$as_echo_n "checking whether ln -s works... " >&6; }
32544LN_S=$as_ln_s
32545if test "$LN_S" = "ln -s"; then
32546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32547$as_echo "yes" >&6; }
32548else
32549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
32550$as_echo "no, using $LN_S" >&6; }
32551fi
32552
32553if test -n "$ac_tool_prefix"; then
32554  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
32555set dummy ${ac_tool_prefix}ranlib; ac_word=$2
32556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32557$as_echo_n "checking for $ac_word... " >&6; }
32558if ${ac_cv_prog_RANLIB+:} false; then :
32559  $as_echo_n "(cached) " >&6
32560else
32561  if test -n "$RANLIB"; then
32562  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
32563else
32564as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32565for as_dir in $PATH
32566do
32567  IFS=$as_save_IFS
32568  test -z "$as_dir" && as_dir=.
32569    for ac_exec_ext in '' $ac_executable_extensions; do
32570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32571    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
32572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32573    break 2
32574  fi
32575done
32576  done
32577IFS=$as_save_IFS
32578
32579fi
32580fi
32581RANLIB=$ac_cv_prog_RANLIB
32582if test -n "$RANLIB"; then
32583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
32584$as_echo "$RANLIB" >&6; }
32585else
32586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32587$as_echo "no" >&6; }
32588fi
32589
32590
32591fi
32592if test -z "$ac_cv_prog_RANLIB"; then
32593  ac_ct_RANLIB=$RANLIB
32594  # Extract the first word of "ranlib", so it can be a program name with args.
32595set dummy ranlib; ac_word=$2
32596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32597$as_echo_n "checking for $ac_word... " >&6; }
32598if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
32599  $as_echo_n "(cached) " >&6
32600else
32601  if test -n "$ac_ct_RANLIB"; then
32602  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
32603else
32604as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32605for as_dir in $PATH
32606do
32607  IFS=$as_save_IFS
32608  test -z "$as_dir" && as_dir=.
32609    for ac_exec_ext in '' $ac_executable_extensions; do
32610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32611    ac_cv_prog_ac_ct_RANLIB="ranlib"
32612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32613    break 2
32614  fi
32615done
32616  done
32617IFS=$as_save_IFS
32618
32619fi
32620fi
32621ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
32622if test -n "$ac_ct_RANLIB"; then
32623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
32624$as_echo "$ac_ct_RANLIB" >&6; }
32625else
32626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32627$as_echo "no" >&6; }
32628fi
32629
32630  if test "x$ac_ct_RANLIB" = x; then
32631    RANLIB=":"
32632  else
32633    case $cross_compiling:$ac_tool_warned in
32634yes:)
32635{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32636$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32637ac_tool_warned=yes ;;
32638esac
32639    RANLIB=$ac_ct_RANLIB
32640  fi
32641else
32642  RANLIB="$ac_cv_prog_RANLIB"
32643fi
32644
32645
32646if test -n "$ac_tool_prefix"; then
32647  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
32648set dummy ${ac_tool_prefix}ar; ac_word=$2
32649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32650$as_echo_n "checking for $ac_word... " >&6; }
32651if ${ac_cv_prog_AR+:} false; then :
32652  $as_echo_n "(cached) " >&6
32653else
32654  if test -n "$AR"; then
32655  ac_cv_prog_AR="$AR" # Let the user override the test.
32656else
32657as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32658for as_dir in $PATH
32659do
32660  IFS=$as_save_IFS
32661  test -z "$as_dir" && as_dir=.
32662    for ac_exec_ext in '' $ac_executable_extensions; do
32663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32664    ac_cv_prog_AR="${ac_tool_prefix}ar"
32665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32666    break 2
32667  fi
32668done
32669  done
32670IFS=$as_save_IFS
32671
32672fi
32673fi
32674AR=$ac_cv_prog_AR
32675if test -n "$AR"; then
32676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32677$as_echo "$AR" >&6; }
32678else
32679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32680$as_echo "no" >&6; }
32681fi
32682
32683
32684fi
32685if test -z "$ac_cv_prog_AR"; then
32686  ac_ct_AR=$AR
32687  # Extract the first word of "ar", so it can be a program name with args.
32688set dummy ar; ac_word=$2
32689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32690$as_echo_n "checking for $ac_word... " >&6; }
32691if ${ac_cv_prog_ac_ct_AR+:} false; then :
32692  $as_echo_n "(cached) " >&6
32693else
32694  if test -n "$ac_ct_AR"; then
32695  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32696else
32697as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32698for as_dir in $PATH
32699do
32700  IFS=$as_save_IFS
32701  test -z "$as_dir" && as_dir=.
32702    for ac_exec_ext in '' $ac_executable_extensions; do
32703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32704    ac_cv_prog_ac_ct_AR="ar"
32705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32706    break 2
32707  fi
32708done
32709  done
32710IFS=$as_save_IFS
32711
32712fi
32713fi
32714ac_ct_AR=$ac_cv_prog_ac_ct_AR
32715if test -n "$ac_ct_AR"; then
32716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32717$as_echo "$ac_ct_AR" >&6; }
32718else
32719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32720$as_echo "no" >&6; }
32721fi
32722
32723  if test "x$ac_ct_AR" = x; then
32724    AR=""
32725  else
32726    case $cross_compiling:$ac_tool_warned in
32727yes:)
32728{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32729$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32730ac_tool_warned=yes ;;
32731esac
32732    AR=$ac_ct_AR
32733  fi
32734else
32735  AR="$ac_cv_prog_AR"
32736fi
32737
32738
32739# ---------------------- #
32740# Checks for libraries.  #
32741# ---------------------- #
32742
32743ac_config_files="$ac_config_files Makefile.gnulib.inc"
32744
32745
32746ac_config_files="$ac_config_files Makefile import/Makefile"
32747
32748ac_config_commands="$ac_config_commands default"
32749
32750cat >confcache <<\_ACEOF
32751# This file is a shell script that caches the results of configure
32752# tests run on this system so they can be shared between configure
32753# scripts and configure runs, see configure's option --config-cache.
32754# It is not useful on other systems.  If it contains results you don't
32755# want to keep, you may remove or edit it.
32756#
32757# config.status only pays attention to the cache file if you give it
32758# the --recheck option to rerun configure.
32759#
32760# `ac_cv_env_foo' variables (set or unset) will be overridden when
32761# loading this file, other *unset* `ac_cv_foo' will be assigned the
32762# following values.
32763
32764_ACEOF
32765
32766# The following way of writing the cache mishandles newlines in values,
32767# but we know of no workaround that is simple, portable, and efficient.
32768# So, we kill variables containing newlines.
32769# Ultrix sh set writes to stderr and can't be redirected directly,
32770# and sets the high bit in the cache file unless we assign to the vars.
32771(
32772  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
32773    eval ac_val=\$$ac_var
32774    case $ac_val in #(
32775    *${as_nl}*)
32776      case $ac_var in #(
32777      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
32778$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
32779      esac
32780      case $ac_var in #(
32781      _ | IFS | as_nl) ;; #(
32782      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
32783      *) { eval $ac_var=; unset $ac_var;} ;;
32784      esac ;;
32785    esac
32786  done
32787
32788  (set) 2>&1 |
32789    case $as_nl`(ac_space=' '; set) 2>&1` in #(
32790    *${as_nl}ac_space=\ *)
32791      # `set' does not quote correctly, so add quotes: double-quote
32792      # substitution turns \\\\ into \\, and sed turns \\ into \.
32793      sed -n \
32794	"s/'/'\\\\''/g;
32795	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
32796      ;; #(
32797    *)
32798      # `set' quotes correctly as required by POSIX, so do not add quotes.
32799      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
32800      ;;
32801    esac |
32802    sort
32803) |
32804  sed '
32805     /^ac_cv_env_/b end
32806     t clear
32807     :clear
32808     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
32809     t end
32810     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
32811     :end' >>confcache
32812if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
32813  if test -w "$cache_file"; then
32814    if test "x$cache_file" != "x/dev/null"; then
32815      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
32816$as_echo "$as_me: updating cache $cache_file" >&6;}
32817      if test ! -f "$cache_file" || test -h "$cache_file"; then
32818	cat confcache >"$cache_file"
32819      else
32820        case $cache_file in #(
32821        */* | ?:*)
32822	  mv -f confcache "$cache_file"$$ &&
32823	  mv -f "$cache_file"$$ "$cache_file" ;; #(
32824        *)
32825	  mv -f confcache "$cache_file" ;;
32826	esac
32827      fi
32828    fi
32829  else
32830    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
32831$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
32832  fi
32833fi
32834rm -f confcache
32835
32836test "x$prefix" = xNONE && prefix=$ac_default_prefix
32837# Let make expand exec_prefix.
32838test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
32839
32840DEFS=-DHAVE_CONFIG_H
32841
32842ac_libobjs=
32843ac_ltlibobjs=
32844for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
32845  # 1. Remove the extension, and $U if already installed.
32846  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
32847  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
32848  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
32849  #    will be set to the directory where LIBOBJS objects are built.
32850  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
32851  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
32852done
32853LIBOBJS=$ac_libobjs
32854
32855LTLIBOBJS=$ac_ltlibobjs
32856
32857
32858if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
32859  as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
32860Usually this means the macro was only invoked conditionally." "$LINENO" 5
32861fi
32862if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
32863  as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
32864Usually this means the macro was only invoked conditionally." "$LINENO" 5
32865fi
32866if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
32867  as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
32868Usually this means the macro was only invoked conditionally." "$LINENO" 5
32869fi
32870if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
32871  as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
32872Usually this means the macro was only invoked conditionally." "$LINENO" 5
32873fi
32874if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
32875  as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
32876Usually this means the macro was only invoked conditionally." "$LINENO" 5
32877fi
32878if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
32879  as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
32880Usually this means the macro was only invoked conditionally." "$LINENO" 5
32881fi
32882if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
32883  as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
32884Usually this means the macro was only invoked conditionally." "$LINENO" 5
32885fi
32886if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
32887  as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined.
32888Usually this means the macro was only invoked conditionally." "$LINENO" 5
32889fi
32890if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
32891  as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined.
32892Usually this means the macro was only invoked conditionally." "$LINENO" 5
32893fi
32894if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
32895  as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
32896Usually this means the macro was only invoked conditionally." "$LINENO" 5
32897fi
32898if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
32899  as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
32900Usually this means the macro was only invoked conditionally." "$LINENO" 5
32901fi
32902if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
32903  as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
32904Usually this means the macro was only invoked conditionally." "$LINENO" 5
32905fi
32906
32907
32908if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
32909  as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
32910Usually this means the macro was only invoked conditionally." "$LINENO" 5
32911fi
32912if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
32913  as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined.
32914Usually this means the macro was only invoked conditionally." "$LINENO" 5
32915fi
32916if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
32917  as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
32918Usually this means the macro was only invoked conditionally." "$LINENO" 5
32919fi
32920if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
32921  as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
32922Usually this means the macro was only invoked conditionally." "$LINENO" 5
32923fi
32924if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
32925  as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
32926Usually this means the macro was only invoked conditionally." "$LINENO" 5
32927fi
32928
32929    gl_libobjs=
32930    gl_ltlibobjs=
32931    if test -n "$gl_LIBOBJS"; then
32932      # Remove the extension.
32933      sed_drop_objext='s/\.o$//;s/\.obj$//'
32934      for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
32935        gl_libobjs="$gl_libobjs $i.$ac_objext"
32936        gl_ltlibobjs="$gl_ltlibobjs $i.lo"
32937      done
32938    fi
32939    gl_LIBOBJS=$gl_libobjs
32940
32941    gl_LTLIBOBJS=$gl_ltlibobjs
32942
32943
32944
32945    gltests_libobjs=
32946    gltests_ltlibobjs=
32947    if test -n "$gltests_LIBOBJS"; then
32948      # Remove the extension.
32949      sed_drop_objext='s/\.o$//;s/\.obj$//'
32950      for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
32951        gltests_libobjs="$gltests_libobjs $i.$ac_objext"
32952        gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
32953      done
32954    fi
32955    gltests_LIBOBJS=$gltests_libobjs
32956
32957    gltests_LTLIBOBJS=$gltests_ltlibobjs
32958
32959
32960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
32961$as_echo_n "checking that generated files are newer than configure... " >&6; }
32962   if test -n "$am_sleep_pid"; then
32963     # Hide warnings about reused PIDs.
32964     wait $am_sleep_pid 2>/dev/null
32965   fi
32966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
32967$as_echo "done" >&6; }
32968if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
32969  as_fn_error $? "conditional \"AMDEP\" was never defined.
32970Usually this means the macro was only invoked conditionally." "$LINENO" 5
32971fi
32972if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
32973  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
32974Usually this means the macro was only invoked conditionally." "$LINENO" 5
32975fi
32976 if test -n "$EXEEXT"; then
32977  am__EXEEXT_TRUE=
32978  am__EXEEXT_FALSE='#'
32979else
32980  am__EXEEXT_TRUE='#'
32981  am__EXEEXT_FALSE=
32982fi
32983
32984
32985: "${CONFIG_STATUS=./config.status}"
32986ac_write_fail=0
32987ac_clean_files_save=$ac_clean_files
32988ac_clean_files="$ac_clean_files $CONFIG_STATUS"
32989{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
32990$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
32991as_write_fail=0
32992cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
32993#! $SHELL
32994# Generated by $as_me.
32995# Run this file to recreate the current configuration.
32996# Compiler output produced by configure, useful for debugging
32997# configure, is in config.log if it exists.
32998
32999debug=false
33000ac_cs_recheck=false
33001ac_cs_silent=false
33002
33003SHELL=\${CONFIG_SHELL-$SHELL}
33004export SHELL
33005_ASEOF
33006cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33007## -------------------- ##
33008## M4sh Initialization. ##
33009## -------------------- ##
33010
33011# Be more Bourne compatible
33012DUALCASE=1; export DUALCASE # for MKS sh
33013if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33014  emulate sh
33015  NULLCMD=:
33016  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33017  # is contrary to our usage.  Disable this feature.
33018  alias -g '${1+"$@"}'='"$@"'
33019  setopt NO_GLOB_SUBST
33020else
33021  case `(set -o) 2>/dev/null` in #(
33022  *posix*) :
33023    set -o posix ;; #(
33024  *) :
33025     ;;
33026esac
33027fi
33028
33029
33030as_nl='
33031'
33032export as_nl
33033# Printing a long string crashes Solaris 7 /usr/bin/printf.
33034as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33035as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33036as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33037# Prefer a ksh shell builtin over an external printf program on Solaris,
33038# but without wasting forks for bash or zsh.
33039if test -z "$BASH_VERSION$ZSH_VERSION" \
33040    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33041  as_echo='print -r --'
33042  as_echo_n='print -rn --'
33043elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33044  as_echo='printf %s\n'
33045  as_echo_n='printf %s'
33046else
33047  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33048    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33049    as_echo_n='/usr/ucb/echo -n'
33050  else
33051    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33052    as_echo_n_body='eval
33053      arg=$1;
33054      case $arg in #(
33055      *"$as_nl"*)
33056	expr "X$arg" : "X\\(.*\\)$as_nl";
33057	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33058      esac;
33059      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33060    '
33061    export as_echo_n_body
33062    as_echo_n='sh -c $as_echo_n_body as_echo'
33063  fi
33064  export as_echo_body
33065  as_echo='sh -c $as_echo_body as_echo'
33066fi
33067
33068# The user is always right.
33069if test "${PATH_SEPARATOR+set}" != set; then
33070  PATH_SEPARATOR=:
33071  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33072    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33073      PATH_SEPARATOR=';'
33074  }
33075fi
33076
33077
33078# IFS
33079# We need space, tab and new line, in precisely that order.  Quoting is
33080# there to prevent editors from complaining about space-tab.
33081# (If _AS_PATH_WALK were called with IFS unset, it would disable word
33082# splitting by setting IFS to empty value.)
33083IFS=" ""	$as_nl"
33084
33085# Find who we are.  Look in the path if we contain no directory separator.
33086as_myself=
33087case $0 in #((
33088  *[\\/]* ) as_myself=$0 ;;
33089  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33090for as_dir in $PATH
33091do
33092  IFS=$as_save_IFS
33093  test -z "$as_dir" && as_dir=.
33094    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33095  done
33096IFS=$as_save_IFS
33097
33098     ;;
33099esac
33100# We did not find ourselves, most probably we were run as `sh COMMAND'
33101# in which case we are not to be found in the path.
33102if test "x$as_myself" = x; then
33103  as_myself=$0
33104fi
33105if test ! -f "$as_myself"; then
33106  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33107  exit 1
33108fi
33109
33110# Unset variables that we do not need and which cause bugs (e.g. in
33111# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
33112# suppresses any "Segmentation fault" message there.  '((' could
33113# trigger a bug in pdksh 5.2.14.
33114for as_var in BASH_ENV ENV MAIL MAILPATH
33115do eval test x\${$as_var+set} = xset \
33116  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33117done
33118PS1='$ '
33119PS2='> '
33120PS4='+ '
33121
33122# NLS nuisances.
33123LC_ALL=C
33124export LC_ALL
33125LANGUAGE=C
33126export LANGUAGE
33127
33128# CDPATH.
33129(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33130
33131
33132# as_fn_error STATUS ERROR [LINENO LOG_FD]
33133# ----------------------------------------
33134# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33135# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33136# script with STATUS, using 1 if that was 0.
33137as_fn_error ()
33138{
33139  as_status=$1; test $as_status -eq 0 && as_status=1
33140  if test "$4"; then
33141    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33142    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33143  fi
33144  $as_echo "$as_me: error: $2" >&2
33145  as_fn_exit $as_status
33146} # as_fn_error
33147
33148
33149# as_fn_set_status STATUS
33150# -----------------------
33151# Set $? to STATUS, without forking.
33152as_fn_set_status ()
33153{
33154  return $1
33155} # as_fn_set_status
33156
33157# as_fn_exit STATUS
33158# -----------------
33159# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33160as_fn_exit ()
33161{
33162  set +e
33163  as_fn_set_status $1
33164  exit $1
33165} # as_fn_exit
33166
33167# as_fn_unset VAR
33168# ---------------
33169# Portably unset VAR.
33170as_fn_unset ()
33171{
33172  { eval $1=; unset $1;}
33173}
33174as_unset=as_fn_unset
33175# as_fn_append VAR VALUE
33176# ----------------------
33177# Append the text in VALUE to the end of the definition contained in VAR. Take
33178# advantage of any shell optimizations that allow amortized linear growth over
33179# repeated appends, instead of the typical quadratic growth present in naive
33180# implementations.
33181if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33182  eval 'as_fn_append ()
33183  {
33184    eval $1+=\$2
33185  }'
33186else
33187  as_fn_append ()
33188  {
33189    eval $1=\$$1\$2
33190  }
33191fi # as_fn_append
33192
33193# as_fn_arith ARG...
33194# ------------------
33195# Perform arithmetic evaluation on the ARGs, and store the result in the
33196# global $as_val. Take advantage of shells that can avoid forks. The arguments
33197# must be portable across $(()) and expr.
33198if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
33199  eval 'as_fn_arith ()
33200  {
33201    as_val=$(( $* ))
33202  }'
33203else
33204  as_fn_arith ()
33205  {
33206    as_val=`expr "$@" || test $? -eq 1`
33207  }
33208fi # as_fn_arith
33209
33210
33211if expr a : '\(a\)' >/dev/null 2>&1 &&
33212   test "X`expr 00001 : '.*\(...\)'`" = X001; then
33213  as_expr=expr
33214else
33215  as_expr=false
33216fi
33217
33218if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
33219  as_basename=basename
33220else
33221  as_basename=false
33222fi
33223
33224if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
33225  as_dirname=dirname
33226else
33227  as_dirname=false
33228fi
33229
33230as_me=`$as_basename -- "$0" ||
33231$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
33232	 X"$0" : 'X\(//\)$' \| \
33233	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
33234$as_echo X/"$0" |
33235    sed '/^.*\/\([^/][^/]*\)\/*$/{
33236	    s//\1/
33237	    q
33238	  }
33239	  /^X\/\(\/\/\)$/{
33240	    s//\1/
33241	    q
33242	  }
33243	  /^X\/\(\/\).*/{
33244	    s//\1/
33245	    q
33246	  }
33247	  s/.*/./; q'`
33248
33249# Avoid depending upon Character Ranges.
33250as_cr_letters='abcdefghijklmnopqrstuvwxyz'
33251as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
33252as_cr_Letters=$as_cr_letters$as_cr_LETTERS
33253as_cr_digits='0123456789'
33254as_cr_alnum=$as_cr_Letters$as_cr_digits
33255
33256ECHO_C= ECHO_N= ECHO_T=
33257case `echo -n x` in #(((((
33258-n*)
33259  case `echo 'xy\c'` in
33260  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
33261  xy)  ECHO_C='\c';;
33262  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
33263       ECHO_T='	';;
33264  esac;;
33265*)
33266  ECHO_N='-n';;
33267esac
33268
33269rm -f conf$$ conf$$.exe conf$$.file
33270if test -d conf$$.dir; then
33271  rm -f conf$$.dir/conf$$.file
33272else
33273  rm -f conf$$.dir
33274  mkdir conf$$.dir 2>/dev/null
33275fi
33276if (echo >conf$$.file) 2>/dev/null; then
33277  if ln -s conf$$.file conf$$ 2>/dev/null; then
33278    as_ln_s='ln -s'
33279    # ... but there are two gotchas:
33280    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
33281    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
33282    # In both cases, we have to default to `cp -pR'.
33283    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
33284      as_ln_s='cp -pR'
33285  elif ln conf$$.file conf$$ 2>/dev/null; then
33286    as_ln_s=ln
33287  else
33288    as_ln_s='cp -pR'
33289  fi
33290else
33291  as_ln_s='cp -pR'
33292fi
33293rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
33294rmdir conf$$.dir 2>/dev/null
33295
33296
33297# as_fn_mkdir_p
33298# -------------
33299# Create "$as_dir" as a directory, including parents if necessary.
33300as_fn_mkdir_p ()
33301{
33302
33303  case $as_dir in #(
33304  -*) as_dir=./$as_dir;;
33305  esac
33306  test -d "$as_dir" || eval $as_mkdir_p || {
33307    as_dirs=
33308    while :; do
33309      case $as_dir in #(
33310      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
33311      *) as_qdir=$as_dir;;
33312      esac
33313      as_dirs="'$as_qdir' $as_dirs"
33314      as_dir=`$as_dirname -- "$as_dir" ||
33315$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33316	 X"$as_dir" : 'X\(//\)[^/]' \| \
33317	 X"$as_dir" : 'X\(//\)$' \| \
33318	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
33319$as_echo X"$as_dir" |
33320    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33321	    s//\1/
33322	    q
33323	  }
33324	  /^X\(\/\/\)[^/].*/{
33325	    s//\1/
33326	    q
33327	  }
33328	  /^X\(\/\/\)$/{
33329	    s//\1/
33330	    q
33331	  }
33332	  /^X\(\/\).*/{
33333	    s//\1/
33334	    q
33335	  }
33336	  s/.*/./; q'`
33337      test -d "$as_dir" && break
33338    done
33339    test -z "$as_dirs" || eval "mkdir $as_dirs"
33340  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
33341
33342
33343} # as_fn_mkdir_p
33344if mkdir -p . 2>/dev/null; then
33345  as_mkdir_p='mkdir -p "$as_dir"'
33346else
33347  test -d ./-p && rmdir ./-p
33348  as_mkdir_p=false
33349fi
33350
33351
33352# as_fn_executable_p FILE
33353# -----------------------
33354# Test if FILE is an executable regular file.
33355as_fn_executable_p ()
33356{
33357  test -f "$1" && test -x "$1"
33358} # as_fn_executable_p
33359as_test_x='test -x'
33360as_executable_p=as_fn_executable_p
33361
33362# Sed expression to map a string onto a valid CPP name.
33363as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
33364
33365# Sed expression to map a string onto a valid variable name.
33366as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
33367
33368
33369exec 6>&1
33370## ----------------------------------- ##
33371## Main body of $CONFIG_STATUS script. ##
33372## ----------------------------------- ##
33373_ASEOF
33374test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
33375
33376cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33377# Save the log message, to keep $0 and so on meaningful, and to
33378# report actual input values of CONFIG_FILES etc. instead of their
33379# values after options handling.
33380ac_log="
33381This file was extended by libgnu $as_me UNUSED-VERSION, which was
33382generated by GNU Autoconf 2.69.  Invocation command line was
33383
33384  CONFIG_FILES    = $CONFIG_FILES
33385  CONFIG_HEADERS  = $CONFIG_HEADERS
33386  CONFIG_LINKS    = $CONFIG_LINKS
33387  CONFIG_COMMANDS = $CONFIG_COMMANDS
33388  $ $0 $@
33389
33390on `(hostname || uname -n) 2>/dev/null | sed 1q`
33391"
33392
33393_ACEOF
33394
33395case $ac_config_files in *"
33396"*) set x $ac_config_files; shift; ac_config_files=$*;;
33397esac
33398
33399case $ac_config_headers in *"
33400"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
33401esac
33402
33403
33404cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33405# Files that config.status was made for.
33406config_files="$ac_config_files"
33407config_headers="$ac_config_headers"
33408config_commands="$ac_config_commands"
33409
33410_ACEOF
33411
33412cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33413ac_cs_usage="\
33414\`$as_me' instantiates files and other configuration actions
33415from templates according to the current configuration.  Unless the files
33416and actions are specified as TAGs, all are instantiated by default.
33417
33418Usage: $0 [OPTION]... [TAG]...
33419
33420  -h, --help       print this help, then exit
33421  -V, --version    print version number and configuration settings, then exit
33422      --config     print configuration, then exit
33423  -q, --quiet, --silent
33424                   do not print progress messages
33425  -d, --debug      don't remove temporary files
33426      --recheck    update $as_me by reconfiguring in the same conditions
33427      --file=FILE[:TEMPLATE]
33428                   instantiate the configuration file FILE
33429      --header=FILE[:TEMPLATE]
33430                   instantiate the configuration header FILE
33431
33432Configuration files:
33433$config_files
33434
33435Configuration headers:
33436$config_headers
33437
33438Configuration commands:
33439$config_commands
33440
33441Report bugs to the package provider."
33442
33443_ACEOF
33444cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33445ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
33446ac_cs_version="\\
33447libgnu config.status UNUSED-VERSION
33448configured by $0, generated by GNU Autoconf 2.69,
33449  with options \\"\$ac_cs_config\\"
33450
33451Copyright (C) 2012 Free Software Foundation, Inc.
33452This config.status script is free software; the Free Software Foundation
33453gives unlimited permission to copy, distribute and modify it."
33454
33455ac_pwd='$ac_pwd'
33456srcdir='$srcdir'
33457INSTALL='$INSTALL'
33458MKDIR_P='$MKDIR_P'
33459AWK='$AWK'
33460test -n "\$AWK" || AWK=awk
33461_ACEOF
33462
33463cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33464# The default lists apply if the user does not specify any file.
33465ac_need_defaults=:
33466while test $# != 0
33467do
33468  case $1 in
33469  --*=?*)
33470    ac_option=`expr "X$1" : 'X\([^=]*\)='`
33471    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
33472    ac_shift=:
33473    ;;
33474  --*=)
33475    ac_option=`expr "X$1" : 'X\([^=]*\)='`
33476    ac_optarg=
33477    ac_shift=:
33478    ;;
33479  *)
33480    ac_option=$1
33481    ac_optarg=$2
33482    ac_shift=shift
33483    ;;
33484  esac
33485
33486  case $ac_option in
33487  # Handling of the options.
33488  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
33489    ac_cs_recheck=: ;;
33490  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
33491    $as_echo "$ac_cs_version"; exit ;;
33492  --config | --confi | --conf | --con | --co | --c )
33493    $as_echo "$ac_cs_config"; exit ;;
33494  --debug | --debu | --deb | --de | --d | -d )
33495    debug=: ;;
33496  --file | --fil | --fi | --f )
33497    $ac_shift
33498    case $ac_optarg in
33499    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33500    '') as_fn_error $? "missing file argument" ;;
33501    esac
33502    as_fn_append CONFIG_FILES " '$ac_optarg'"
33503    ac_need_defaults=false;;
33504  --header | --heade | --head | --hea )
33505    $ac_shift
33506    case $ac_optarg in
33507    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33508    esac
33509    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
33510    ac_need_defaults=false;;
33511  --he | --h)
33512    # Conflict between --help and --header
33513    as_fn_error $? "ambiguous option: \`$1'
33514Try \`$0 --help' for more information.";;
33515  --help | --hel | -h )
33516    $as_echo "$ac_cs_usage"; exit ;;
33517  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
33518  | -silent | --silent | --silen | --sile | --sil | --si | --s)
33519    ac_cs_silent=: ;;
33520
33521  # This is an error.
33522  -*) as_fn_error $? "unrecognized option: \`$1'
33523Try \`$0 --help' for more information." ;;
33524
33525  *) as_fn_append ac_config_targets " $1"
33526     ac_need_defaults=false ;;
33527
33528  esac
33529  shift
33530done
33531
33532ac_configure_extra_args=
33533
33534if $ac_cs_silent; then
33535  exec 6>/dev/null
33536  ac_configure_extra_args="$ac_configure_extra_args --silent"
33537fi
33538
33539_ACEOF
33540cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33541if \$ac_cs_recheck; then
33542  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
33543  shift
33544  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
33545  CONFIG_SHELL='$SHELL'
33546  export CONFIG_SHELL
33547  exec "\$@"
33548fi
33549
33550_ACEOF
33551cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33552exec 5>>config.log
33553{
33554  echo
33555  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
33556## Running $as_me. ##
33557_ASBOX
33558  $as_echo "$ac_log"
33559} >&5
33560
33561_ACEOF
33562cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33563#
33564# INIT-COMMANDS
33565#
33566AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
33567
33568_ACEOF
33569
33570cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33571
33572# Handling of arguments.
33573for ac_config_target in $ac_config_targets
33574do
33575  case $ac_config_target in
33576    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
33577    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
33578    "Makefile.gnulib.inc") CONFIG_FILES="$CONFIG_FILES Makefile.gnulib.inc" ;;
33579    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
33580    "import/Makefile") CONFIG_FILES="$CONFIG_FILES import/Makefile" ;;
33581    "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
33582
33583  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
33584  esac
33585done
33586
33587
33588# If the user did not use the arguments to specify the items to instantiate,
33589# then the envvar interface is used.  Set only those that are not.
33590# We use the long form for the default assignment because of an extremely
33591# bizarre bug on SunOS 4.1.3.
33592if $ac_need_defaults; then
33593  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
33594  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
33595  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
33596fi
33597
33598# Have a temporary directory for convenience.  Make it in the build tree
33599# simply because there is no reason against having it here, and in addition,
33600# creating and moving files from /tmp can sometimes cause problems.
33601# Hook for its removal unless debugging.
33602# Note that there is a small window in which the directory will not be cleaned:
33603# after its creation but before its name has been assigned to `$tmp'.
33604$debug ||
33605{
33606  tmp= ac_tmp=
33607  trap 'exit_status=$?
33608  : "${ac_tmp:=$tmp}"
33609  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
33610' 0
33611  trap 'as_fn_exit 1' 1 2 13 15
33612}
33613# Create a (secure) tmp directory for tmp files.
33614
33615{
33616  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
33617  test -d "$tmp"
33618}  ||
33619{
33620  tmp=./conf$$-$RANDOM
33621  (umask 077 && mkdir "$tmp")
33622} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
33623ac_tmp=$tmp
33624
33625# Set up the scripts for CONFIG_FILES section.
33626# No need to generate them if there are no CONFIG_FILES.
33627# This happens for instance with `./config.status config.h'.
33628if test -n "$CONFIG_FILES"; then
33629
33630
33631ac_cr=`echo X | tr X '\015'`
33632# On cygwin, bash can eat \r inside `` if the user requested igncr.
33633# But we know of no other shell where ac_cr would be empty at this
33634# point, so we can use a bashism as a fallback.
33635if test "x$ac_cr" = x; then
33636  eval ac_cr=\$\'\\r\'
33637fi
33638ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
33639if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
33640  ac_cs_awk_cr='\\r'
33641else
33642  ac_cs_awk_cr=$ac_cr
33643fi
33644
33645echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
33646_ACEOF
33647
33648
33649{
33650  echo "cat >conf$$subs.awk <<_ACEOF" &&
33651  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
33652  echo "_ACEOF"
33653} >conf$$subs.sh ||
33654  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33655ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
33656ac_delim='%!_!# '
33657for ac_last_try in false false false false false :; do
33658  . ./conf$$subs.sh ||
33659    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33660
33661  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
33662  if test $ac_delim_n = $ac_delim_num; then
33663    break
33664  elif $ac_last_try; then
33665    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33666  else
33667    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
33668  fi
33669done
33670rm -f conf$$subs.sh
33671
33672cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33673cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
33674_ACEOF
33675sed -n '
33676h
33677s/^/S["/; s/!.*/"]=/
33678p
33679g
33680s/^[^!]*!//
33681:repl
33682t repl
33683s/'"$ac_delim"'$//
33684t delim
33685:nl
33686h
33687s/\(.\{148\}\)..*/\1/
33688t more1
33689s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
33690p
33691n
33692b repl
33693:more1
33694s/["\\]/\\&/g; s/^/"/; s/$/"\\/
33695p
33696g
33697s/.\{148\}//
33698t nl
33699:delim
33700h
33701s/\(.\{148\}\)..*/\1/
33702t more2
33703s/["\\]/\\&/g; s/^/"/; s/$/"/
33704p
33705b
33706:more2
33707s/["\\]/\\&/g; s/^/"/; s/$/"\\/
33708p
33709g
33710s/.\{148\}//
33711t delim
33712' <conf$$subs.awk | sed '
33713/^[^""]/{
33714  N
33715  s/\n//
33716}
33717' >>$CONFIG_STATUS || ac_write_fail=1
33718rm -f conf$$subs.awk
33719cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33720_ACAWK
33721cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
33722  for (key in S) S_is_set[key] = 1
33723  FS = ""
33724
33725}
33726{
33727  line = $ 0
33728  nfields = split(line, field, "@")
33729  substed = 0
33730  len = length(field[1])
33731  for (i = 2; i < nfields; i++) {
33732    key = field[i]
33733    keylen = length(key)
33734    if (S_is_set[key]) {
33735      value = S[key]
33736      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
33737      len += length(value) + length(field[++i])
33738      substed = 1
33739    } else
33740      len += 1 + keylen
33741  }
33742
33743  print line
33744}
33745
33746_ACAWK
33747_ACEOF
33748cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33749if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
33750  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
33751else
33752  cat
33753fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
33754  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
33755_ACEOF
33756
33757# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
33758# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
33759# trailing colons and then remove the whole line if VPATH becomes empty
33760# (actually we leave an empty line to preserve line numbers).
33761if test "x$srcdir" = x.; then
33762  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
33763h
33764s///
33765s/^/:/
33766s/[	 ]*$/:/
33767s/:\$(srcdir):/:/g
33768s/:\${srcdir}:/:/g
33769s/:@srcdir@:/:/g
33770s/^:*//
33771s/:*$//
33772x
33773s/\(=[	 ]*\).*/\1/
33774G
33775s/\n//
33776s/^[^=]*=[	 ]*$//
33777}'
33778fi
33779
33780cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33781fi # test -n "$CONFIG_FILES"
33782
33783# Set up the scripts for CONFIG_HEADERS section.
33784# No need to generate them if there are no CONFIG_HEADERS.
33785# This happens for instance with `./config.status Makefile'.
33786if test -n "$CONFIG_HEADERS"; then
33787cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
33788BEGIN {
33789_ACEOF
33790
33791# Transform confdefs.h into an awk script `defines.awk', embedded as
33792# here-document in config.status, that substitutes the proper values into
33793# config.h.in to produce config.h.
33794
33795# Create a delimiter string that does not exist in confdefs.h, to ease
33796# handling of long lines.
33797ac_delim='%!_!# '
33798for ac_last_try in false false :; do
33799  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
33800  if test -z "$ac_tt"; then
33801    break
33802  elif $ac_last_try; then
33803    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
33804  else
33805    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
33806  fi
33807done
33808
33809# For the awk script, D is an array of macro values keyed by name,
33810# likewise P contains macro parameters if any.  Preserve backslash
33811# newline sequences.
33812
33813ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
33814sed -n '
33815s/.\{148\}/&'"$ac_delim"'/g
33816t rset
33817:rset
33818s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
33819t def
33820d
33821:def
33822s/\\$//
33823t bsnl
33824s/["\\]/\\&/g
33825s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
33826D["\1"]=" \3"/p
33827s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
33828d
33829:bsnl
33830s/["\\]/\\&/g
33831s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
33832D["\1"]=" \3\\\\\\n"\\/p
33833t cont
33834s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
33835t cont
33836d
33837:cont
33838n
33839s/.\{148\}/&'"$ac_delim"'/g
33840t clear
33841:clear
33842s/\\$//
33843t bsnlc
33844s/["\\]/\\&/g; s/^/"/; s/$/"/p
33845d
33846:bsnlc
33847s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
33848b cont
33849' <confdefs.h | sed '
33850s/'"$ac_delim"'/"\\\
33851"/g' >>$CONFIG_STATUS || ac_write_fail=1
33852
33853cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33854  for (key in D) D_is_set[key] = 1
33855  FS = ""
33856}
33857/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
33858  line = \$ 0
33859  split(line, arg, " ")
33860  if (arg[1] == "#") {
33861    defundef = arg[2]
33862    mac1 = arg[3]
33863  } else {
33864    defundef = substr(arg[1], 2)
33865    mac1 = arg[2]
33866  }
33867  split(mac1, mac2, "(") #)
33868  macro = mac2[1]
33869  prefix = substr(line, 1, index(line, defundef) - 1)
33870  if (D_is_set[macro]) {
33871    # Preserve the white space surrounding the "#".
33872    print prefix "define", macro P[macro] D[macro]
33873    next
33874  } else {
33875    # Replace #undef with comments.  This is necessary, for example,
33876    # in the case of _POSIX_SOURCE, which is predefined and required
33877    # on some systems where configure will not decide to define it.
33878    if (defundef == "undef") {
33879      print "/*", prefix defundef, macro, "*/"
33880      next
33881    }
33882  }
33883}
33884{ print }
33885_ACAWK
33886_ACEOF
33887cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33888  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
33889fi # test -n "$CONFIG_HEADERS"
33890
33891
33892eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
33893shift
33894for ac_tag
33895do
33896  case $ac_tag in
33897  :[FHLC]) ac_mode=$ac_tag; continue;;
33898  esac
33899  case $ac_mode$ac_tag in
33900  :[FHL]*:*);;
33901  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
33902  :[FH]-) ac_tag=-:-;;
33903  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
33904  esac
33905  ac_save_IFS=$IFS
33906  IFS=:
33907  set x $ac_tag
33908  IFS=$ac_save_IFS
33909  shift
33910  ac_file=$1
33911  shift
33912
33913  case $ac_mode in
33914  :L) ac_source=$1;;
33915  :[FH])
33916    ac_file_inputs=
33917    for ac_f
33918    do
33919      case $ac_f in
33920      -) ac_f="$ac_tmp/stdin";;
33921      *) # Look for the file first in the build tree, then in the source tree
33922	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
33923	 # because $ac_f cannot contain `:'.
33924	 test -f "$ac_f" ||
33925	   case $ac_f in
33926	   [\\/$]*) false;;
33927	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
33928	   esac ||
33929	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
33930      esac
33931      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
33932      as_fn_append ac_file_inputs " '$ac_f'"
33933    done
33934
33935    # Let's still pretend it is `configure' which instantiates (i.e., don't
33936    # use $as_me), people would be surprised to read:
33937    #    /* config.h.  Generated by config.status.  */
33938    configure_input='Generated from '`
33939	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
33940	`' by configure.'
33941    if test x"$ac_file" != x-; then
33942      configure_input="$ac_file.  $configure_input"
33943      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
33944$as_echo "$as_me: creating $ac_file" >&6;}
33945    fi
33946    # Neutralize special characters interpreted by sed in replacement strings.
33947    case $configure_input in #(
33948    *\&* | *\|* | *\\* )
33949       ac_sed_conf_input=`$as_echo "$configure_input" |
33950       sed 's/[\\\\&|]/\\\\&/g'`;; #(
33951    *) ac_sed_conf_input=$configure_input;;
33952    esac
33953
33954    case $ac_tag in
33955    *:-:* | *:-) cat >"$ac_tmp/stdin" \
33956      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
33957    esac
33958    ;;
33959  esac
33960
33961  ac_dir=`$as_dirname -- "$ac_file" ||
33962$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33963	 X"$ac_file" : 'X\(//\)[^/]' \| \
33964	 X"$ac_file" : 'X\(//\)$' \| \
33965	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
33966$as_echo X"$ac_file" |
33967    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33968	    s//\1/
33969	    q
33970	  }
33971	  /^X\(\/\/\)[^/].*/{
33972	    s//\1/
33973	    q
33974	  }
33975	  /^X\(\/\/\)$/{
33976	    s//\1/
33977	    q
33978	  }
33979	  /^X\(\/\).*/{
33980	    s//\1/
33981	    q
33982	  }
33983	  s/.*/./; q'`
33984  as_dir="$ac_dir"; as_fn_mkdir_p
33985  ac_builddir=.
33986
33987case "$ac_dir" in
33988.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
33989*)
33990  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
33991  # A ".." for each directory in $ac_dir_suffix.
33992  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
33993  case $ac_top_builddir_sub in
33994  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
33995  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
33996  esac ;;
33997esac
33998ac_abs_top_builddir=$ac_pwd
33999ac_abs_builddir=$ac_pwd$ac_dir_suffix
34000# for backward compatibility:
34001ac_top_builddir=$ac_top_build_prefix
34002
34003case $srcdir in
34004  .)  # We are building in place.
34005    ac_srcdir=.
34006    ac_top_srcdir=$ac_top_builddir_sub
34007    ac_abs_top_srcdir=$ac_pwd ;;
34008  [\\/]* | ?:[\\/]* )  # Absolute name.
34009    ac_srcdir=$srcdir$ac_dir_suffix;
34010    ac_top_srcdir=$srcdir
34011    ac_abs_top_srcdir=$srcdir ;;
34012  *) # Relative name.
34013    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34014    ac_top_srcdir=$ac_top_build_prefix$srcdir
34015    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34016esac
34017ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34018
34019
34020  case $ac_mode in
34021  :F)
34022  #
34023  # CONFIG_FILE
34024  #
34025
34026  case $INSTALL in
34027  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
34028  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
34029  esac
34030  ac_MKDIR_P=$MKDIR_P
34031  case $MKDIR_P in
34032  [\\/$]* | ?:[\\/]* ) ;;
34033  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
34034  esac
34035_ACEOF
34036
34037cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34038# If the template does not know about datarootdir, expand it.
34039# FIXME: This hack should be removed a few years after 2.60.
34040ac_datarootdir_hack=; ac_datarootdir_seen=
34041ac_sed_dataroot='
34042/datarootdir/ {
34043  p
34044  q
34045}
34046/@datadir@/p
34047/@docdir@/p
34048/@infodir@/p
34049/@localedir@/p
34050/@mandir@/p'
34051case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34052*datarootdir*) ac_datarootdir_seen=yes;;
34053*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34054  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34055$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34056_ACEOF
34057cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34058  ac_datarootdir_hack='
34059  s&@datadir@&$datadir&g
34060  s&@docdir@&$docdir&g
34061  s&@infodir@&$infodir&g
34062  s&@localedir@&$localedir&g
34063  s&@mandir@&$mandir&g
34064  s&\\\${datarootdir}&$datarootdir&g' ;;
34065esac
34066_ACEOF
34067
34068# Neutralize VPATH when `$srcdir' = `.'.
34069# Shell code in configure.ac might set extrasub.
34070# FIXME: do we really want to maintain this feature?
34071cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34072ac_sed_extra="$ac_vpsub
34073$extrasub
34074_ACEOF
34075cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34076:t
34077/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34078s|@configure_input@|$ac_sed_conf_input|;t t
34079s&@top_builddir@&$ac_top_builddir_sub&;t t
34080s&@top_build_prefix@&$ac_top_build_prefix&;t t
34081s&@srcdir@&$ac_srcdir&;t t
34082s&@abs_srcdir@&$ac_abs_srcdir&;t t
34083s&@top_srcdir@&$ac_top_srcdir&;t t
34084s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34085s&@builddir@&$ac_builddir&;t t
34086s&@abs_builddir@&$ac_abs_builddir&;t t
34087s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34088s&@INSTALL@&$ac_INSTALL&;t t
34089s&@MKDIR_P@&$ac_MKDIR_P&;t t
34090$ac_datarootdir_hack
34091"
34092eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
34093  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34094
34095test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34096  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
34097  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
34098      "$ac_tmp/out"`; test -z "$ac_out"; } &&
34099  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34100which seems to be undefined.  Please make sure it is defined" >&5
34101$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34102which seems to be undefined.  Please make sure it is defined" >&2;}
34103
34104  rm -f "$ac_tmp/stdin"
34105  case $ac_file in
34106  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
34107  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
34108  esac \
34109  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34110 ;;
34111  :H)
34112  #
34113  # CONFIG_HEADER
34114  #
34115  if test x"$ac_file" != x-; then
34116    {
34117      $as_echo "/* $configure_input  */" \
34118      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
34119    } >"$ac_tmp/config.h" \
34120      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34121    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
34122      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34123$as_echo "$as_me: $ac_file is unchanged" >&6;}
34124    else
34125      rm -f "$ac_file"
34126      mv "$ac_tmp/config.h" "$ac_file" \
34127	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
34128    fi
34129  else
34130    $as_echo "/* $configure_input  */" \
34131      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
34132      || as_fn_error $? "could not create -" "$LINENO" 5
34133  fi
34134# Compute "$ac_file"'s index in $config_headers.
34135_am_arg="$ac_file"
34136_am_stamp_count=1
34137for _am_header in $config_headers :; do
34138  case $_am_header in
34139    $_am_arg | $_am_arg:* )
34140      break ;;
34141    * )
34142      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
34143  esac
34144done
34145echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
34146$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34147	 X"$_am_arg" : 'X\(//\)[^/]' \| \
34148	 X"$_am_arg" : 'X\(//\)$' \| \
34149	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
34150$as_echo X"$_am_arg" |
34151    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34152	    s//\1/
34153	    q
34154	  }
34155	  /^X\(\/\/\)[^/].*/{
34156	    s//\1/
34157	    q
34158	  }
34159	  /^X\(\/\/\)$/{
34160	    s//\1/
34161	    q
34162	  }
34163	  /^X\(\/\).*/{
34164	    s//\1/
34165	    q
34166	  }
34167	  s/.*/./; q'`/stamp-h$_am_stamp_count
34168 ;;
34169
34170  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
34171$as_echo "$as_me: executing $ac_file commands" >&6;}
34172 ;;
34173  esac
34174
34175
34176  case $ac_file$ac_mode in
34177    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
34178  # Older Autoconf quotes --file arguments for eval, but not when files
34179  # are listed without --file.  Let's play safe and only enable the eval
34180  # if we detect the quoting.
34181  case $CONFIG_FILES in
34182  *\'*) eval set x "$CONFIG_FILES" ;;
34183  *)   set x $CONFIG_FILES ;;
34184  esac
34185  shift
34186  for mf
34187  do
34188    # Strip MF so we end up with the name of the file.
34189    mf=`echo "$mf" | sed -e 's/:.*$//'`
34190    # Check whether this is an Automake generated Makefile or not.
34191    # We used to match only the files named 'Makefile.in', but
34192    # some people rename them; so instead we look at the file content.
34193    # Grep'ing the first line is not enough: some people post-process
34194    # each Makefile.in and add a new line on top of each file to say so.
34195    # Grep'ing the whole file is not good either: AIX grep has a line
34196    # limit of 2048, but all sed's we know have understand at least 4000.
34197    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
34198      dirpart=`$as_dirname -- "$mf" ||
34199$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34200	 X"$mf" : 'X\(//\)[^/]' \| \
34201	 X"$mf" : 'X\(//\)$' \| \
34202	 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
34203$as_echo X"$mf" |
34204    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34205	    s//\1/
34206	    q
34207	  }
34208	  /^X\(\/\/\)[^/].*/{
34209	    s//\1/
34210	    q
34211	  }
34212	  /^X\(\/\/\)$/{
34213	    s//\1/
34214	    q
34215	  }
34216	  /^X\(\/\).*/{
34217	    s//\1/
34218	    q
34219	  }
34220	  s/.*/./; q'`
34221    else
34222      continue
34223    fi
34224    # Extract the definition of DEPDIR, am__include, and am__quote
34225    # from the Makefile without running 'make'.
34226    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
34227    test -z "$DEPDIR" && continue
34228    am__include=`sed -n 's/^am__include = //p' < "$mf"`
34229    test -z "$am__include" && continue
34230    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
34231    # Find all dependency output files, they are included files with
34232    # $(DEPDIR) in their names.  We invoke sed twice because it is the
34233    # simplest approach to changing $(DEPDIR) to its actual value in the
34234    # expansion.
34235    for file in `sed -n "
34236      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
34237	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
34238      # Make sure the directory exists.
34239      test -f "$dirpart/$file" && continue
34240      fdir=`$as_dirname -- "$file" ||
34241$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34242	 X"$file" : 'X\(//\)[^/]' \| \
34243	 X"$file" : 'X\(//\)$' \| \
34244	 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
34245$as_echo X"$file" |
34246    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34247	    s//\1/
34248	    q
34249	  }
34250	  /^X\(\/\/\)[^/].*/{
34251	    s//\1/
34252	    q
34253	  }
34254	  /^X\(\/\/\)$/{
34255	    s//\1/
34256	    q
34257	  }
34258	  /^X\(\/\).*/{
34259	    s//\1/
34260	    q
34261	  }
34262	  s/.*/./; q'`
34263      as_dir=$dirpart/$fdir; as_fn_mkdir_p
34264      # echo "creating $dirpart/$file"
34265      echo '# dummy' > "$dirpart/$file"
34266    done
34267  done
34268}
34269 ;;
34270    "default":C)
34271case x$CONFIG_HEADERS in
34272xconfig.h:config.in)
34273echo > stamp-h ;;
34274esac
34275 ;;
34276
34277  esac
34278done # for ac_tag
34279
34280
34281as_fn_exit 0
34282_ACEOF
34283ac_clean_files=$ac_clean_files_save
34284
34285test $ac_write_fail = 0 ||
34286  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34287
34288
34289# configure is writing to config.log, and then calls config.status.
34290# config.status does its own redirection, appending to config.log.
34291# Unfortunately, on DOS this fails, as config.log is still kept open
34292# by configure, so config.status won't be able to write to it; its
34293# output is simply discarded.  So we exec the FD to /dev/null,
34294# effectively closing config.log, so it can be properly (re)opened and
34295# appended to by config.status.  When coming back to configure, we
34296# need to make the FD available again.
34297if test "$no_create" != yes; then
34298  ac_cs_success=:
34299  ac_config_status_args=
34300  test "$silent" = yes &&
34301    ac_config_status_args="$ac_config_status_args --quiet"
34302  exec 5>/dev/null
34303  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34304  exec 5>>config.log
34305  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34306  # would make configure fail if this is the last instruction.
34307  $ac_cs_success || as_fn_exit 1
34308fi
34309if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34310  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34311$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34312fi
34313
34314
34315exit 0
34316