1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for GNU tar 1.34.
4#
5# Report bugs to <bug-tar@gnu.org>.
6#
7#
8# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9#
10#
11# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
13## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
16
17# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
19if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20  emulate sh
21  NULLCMD=:
22  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23  # is contrary to our usage.  Disable this feature.
24  alias -g '${1+"$@"}'='"$@"'
25  setopt NO_GLOB_SUBST
26else
27  case `(set -o) 2>/dev/null` in #(
28  *posix*) :
29    set -o posix ;; #(
30  *) :
31     ;;
32esac
33fi
34
35
36as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47  as_echo='print -r --'
48  as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50  as_echo='printf %s\n'
51  as_echo_n='printf %s'
52else
53  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55    as_echo_n='/usr/ucb/echo -n'
56  else
57    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58    as_echo_n_body='eval
59      arg=$1;
60      case $arg in #(
61      *"$as_nl"*)
62	expr "X$arg" : "X\\(.*\\)$as_nl";
63	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64      esac;
65      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66    '
67    export as_echo_n_body
68    as_echo_n='sh -c $as_echo_n_body as_echo'
69  fi
70  export as_echo_body
71  as_echo='sh -c $as_echo_body as_echo'
72fi
73
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
76  PATH_SEPARATOR=:
77  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79      PATH_SEPARATOR=';'
80  }
81fi
82
83
84# IFS
85# We need space, tab and new line, in precisely that order.  Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
89IFS=" ""	$as_nl"
90
91# Find who we are.  Look in the path if we contain no directory separator.
92as_myself=
93case $0 in #((
94  *[\\/]* ) as_myself=$0 ;;
95  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96for as_dir in $PATH
97do
98  IFS=$as_save_IFS
99  test -z "$as_dir" && as_dir=.
100    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101  done
102IFS=$as_save_IFS
103
104     ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109  as_myself=$0
110fi
111if test ! -f "$as_myself"; then
112  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113  exit 1
114fi
115
116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there.  '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
133
134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
137# Use a proper internal environment variable to ensure we don't fall
138  # into an infinite loop, continuously re-executing ourselves.
139  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140    _as_can_reexec=no; export _as_can_reexec;
141    # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149  *v*x* | *x*v* ) as_opts=-vx ;;
150  *v* ) as_opts=-v ;;
151  *x* ) as_opts=-x ;;
152  * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159  fi
160  # We don't want this to propagate to other subprocesses.
161          { _as_can_reexec=; unset _as_can_reexec;}
162if test "x$CONFIG_SHELL" = x; then
163  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164  emulate sh
165  NULLCMD=:
166  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167  # is contrary to our usage.  Disable this feature.
168  alias -g '\${1+\"\$@\"}'='\"\$@\"'
169  setopt NO_GLOB_SUBST
170else
171  case \`(set -o) 2>/dev/null\` in #(
172  *posix*) :
173    set -o posix ;; #(
174  *) :
175     ;;
176esac
177fi
178"
179  as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193  exitcode=1; echo positional parameters were not saved.
194fi
195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
197  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202  if (eval "$as_required") 2>/dev/null; then :
203  as_have_required=yes
204else
205  as_have_required=no
206fi
207  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214  IFS=$as_save_IFS
215  test -z "$as_dir" && as_dir=.
216  as_found=:
217  case $as_dir in #(
218	 /*)
219	   for as_base in sh bash ksh sh5; do
220	     # Try only shells that exist, to save several forks.
221	     as_shell=$as_dir/$as_base
222	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224  CONFIG_SHELL=$as_shell as_have_required=yes
225		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226  break 2
227fi
228fi
229	   done;;
230       esac
231  as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235  CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240      if test "x$CONFIG_SHELL" != x; then :
241  export CONFIG_SHELL
242             # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250  *v*x* | *x*v* ) as_opts=-vx ;;
251  *v* ) as_opts=-v ;;
252  *x* ) as_opts=-x ;;
253  * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
260fi
261
262    if test x$as_have_required = xno; then :
263  $as_echo "$0: This script requires a shell more modern than all"
264  $as_echo "$0: the shells that I found on your system."
265  if test x${ZSH_VERSION+set} = xset ; then
266    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268  else
269    $as_echo "$0: Please tell bug-autoconf@gnu.org and bug-tar@gnu.org
270$0: about your system, including any error possibly output
271$0: before this message. Then install a modern shell, or
272$0: manually run the script under such a shell if you do
273$0: have one."
274  fi
275  exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293  { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302  return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310  set +e
311  as_fn_set_status $1
312  exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321  case $as_dir in #(
322  -*) as_dir=./$as_dir;;
323  esac
324  test -d "$as_dir" || eval $as_mkdir_p || {
325    as_dirs=
326    while :; do
327      case $as_dir in #(
328      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329      *) as_qdir=$as_dir;;
330      esac
331      as_dirs="'$as_qdir' $as_dirs"
332      as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334	 X"$as_dir" : 'X\(//\)[^/]' \| \
335	 X"$as_dir" : 'X\(//\)$' \| \
336	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339	    s//\1/
340	    q
341	  }
342	  /^X\(\/\/\)[^/].*/{
343	    s//\1/
344	    q
345	  }
346	  /^X\(\/\/\)$/{
347	    s//\1/
348	    q
349	  }
350	  /^X\(\/\).*/{
351	    s//\1/
352	    q
353	  }
354	  s/.*/./; q'`
355      test -d "$as_dir" && break
356    done
357    test -z "$as_dirs" || eval "mkdir $as_dirs"
358  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
359
360
361} # as_fn_mkdir_p
362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368  test -f "$1" && test -x "$1"
369} # as_fn_executable_p
370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377  eval 'as_fn_append ()
378  {
379    eval $1+=\$2
380  }'
381else
382  as_fn_append ()
383  {
384    eval $1=\$$1\$2
385  }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394  eval 'as_fn_arith ()
395  {
396    as_val=$(( $* ))
397  }'
398else
399  as_fn_arith ()
400  {
401    as_val=`expr "$@" || test $? -eq 1`
402  }
403fi # as_fn_arith
404
405
406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
410# script with STATUS, using 1 if that was 0.
411as_fn_error ()
412{
413  as_status=$1; test $as_status -eq 0 && as_status=1
414  if test "$4"; then
415    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
417  fi
418  $as_echo "$as_me: error: $2" >&2
419  as_fn_exit $as_status
420} # as_fn_error
421
422if expr a : '\(a\)' >/dev/null 2>&1 &&
423   test "X`expr 00001 : '.*\(...\)'`" = X001; then
424  as_expr=expr
425else
426  as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430  as_basename=basename
431else
432  as_basename=false
433fi
434
435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436  as_dirname=dirname
437else
438  as_dirname=false
439fi
440
441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443	 X"$0" : 'X\(//\)$' \| \
444	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
445$as_echo X/"$0" |
446    sed '/^.*\/\([^/][^/]*\)\/*$/{
447	    s//\1/
448	    q
449	  }
450	  /^X\/\(\/\/\)$/{
451	    s//\1/
452	    q
453	  }
454	  /^X\/\(\/\).*/{
455	    s//\1/
456	    q
457	  }
458	  s/.*/./; q'`
459
460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
466
467
468  as_lineno_1=$LINENO as_lineno_1a=$LINENO
469  as_lineno_2=$LINENO as_lineno_2a=$LINENO
470  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
473  sed -n '
474    p
475    /[$]LINENO/=
476  ' <$as_myself |
477    sed '
478      s/[$]LINENO.*/&-/
479      t lineno
480      b
481      :lineno
482      N
483      :loop
484      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
485      t loop
486      s/-\n.*//
487    ' >$as_me.lineno &&
488  chmod +x "$as_me.lineno" ||
489    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
490
491  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492  # already done that, so ensure we don't try to do so again and fall
493  # in an infinite loop.  This has already happened in practice.
494  _as_can_reexec=no; export _as_can_reexec
495  # Don't try to exec as it changes $[0], causing all sort of problems
496  # (the dirname of $[0] is not the place where we might find the
497  # original and so on.  Autoconf is especially sensitive to this).
498  . "./$as_me.lineno"
499  # Exit status is that of the last command.
500  exit
501}
502
503ECHO_C= ECHO_N= ECHO_T=
504case `echo -n x` in #(((((
505-n*)
506  case `echo 'xy\c'` in
507  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
508  xy)  ECHO_C='\c';;
509  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
510       ECHO_T='	';;
511  esac;;
512*)
513  ECHO_N='-n';;
514esac
515
516rm -f conf$$ conf$$.exe conf$$.file
517if test -d conf$$.dir; then
518  rm -f conf$$.dir/conf$$.file
519else
520  rm -f conf$$.dir
521  mkdir conf$$.dir 2>/dev/null
522fi
523if (echo >conf$$.file) 2>/dev/null; then
524  if ln -s conf$$.file conf$$ 2>/dev/null; then
525    as_ln_s='ln -s'
526    # ... but there are two gotchas:
527    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
529    # In both cases, we have to default to `cp -pR'.
530    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
531      as_ln_s='cp -pR'
532  elif ln conf$$.file conf$$ 2>/dev/null; then
533    as_ln_s=ln
534  else
535    as_ln_s='cp -pR'
536  fi
537else
538  as_ln_s='cp -pR'
539fi
540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
542
543if mkdir -p . 2>/dev/null; then
544  as_mkdir_p='mkdir -p "$as_dir"'
545else
546  test -d ./-p && rmdir ./-p
547  as_mkdir_p=false
548fi
549
550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
552
553# Sed expression to map a string onto a valid CPP name.
554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
555
556# Sed expression to map a string onto a valid variable name.
557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
558
559
560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
562
563# Name of the host.
564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
568#
569# Initializations.
570#
571ac_default_prefix=/usr/local
572ac_clean_files=
573ac_config_libobj_dir=.
574LIBOBJS=
575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
579
580# Identity of this package.
581PACKAGE_NAME='GNU tar'
582PACKAGE_TARNAME='tar'
583PACKAGE_VERSION='1.34'
584PACKAGE_STRING='GNU tar 1.34'
585PACKAGE_BUGREPORT='bug-tar@gnu.org'
586PACKAGE_URL='http://www.gnu.org/software/tar/'
587
588ac_unique_file="src/tar.c"
589ac_header_list=
590# Factoring default headers for most tests.
591ac_includes_default="\
592#include <stdio.h>
593#ifdef HAVE_SYS_TYPES_H
594# include <sys/types.h>
595#endif
596#ifdef HAVE_SYS_STAT_H
597# include <sys/stat.h>
598#endif
599#ifdef STDC_HEADERS
600# include <stdlib.h>
601# include <stddef.h>
602#else
603# ifdef HAVE_STDLIB_H
604#  include <stdlib.h>
605# endif
606#endif
607#ifdef HAVE_STRING_H
608# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
609#  include <memory.h>
610# endif
611# include <string.h>
612#endif
613#ifdef HAVE_STRINGS_H
614# include <strings.h>
615#endif
616#ifdef HAVE_INTTYPES_H
617# include <inttypes.h>
618#endif
619#ifdef HAVE_STDINT_H
620# include <stdint.h>
621#endif
622#ifdef HAVE_UNISTD_H
623# include <unistd.h>
624#endif"
625
626ac_func_list=
627gl_fnmatch_required=POSIX
628gl_getopt_required=POSIX
629gt_needs=
630ac_subst_vars='gltests_LTLIBOBJS
631gltests_LIBOBJS
632gl_LTLIBOBJS
633gl_LIBOBJS
634am__EXEEXT_FALSE
635am__EXEEXT_TRUE
636LTLIBOBJS
637BACKUP_SED_COND
638BACKUP_SBIN_SCRIPTS
639BACKUP_LIBEXEC_SCRIPTS
640AUTOM4TE
641POSUB
642INTLLIBS
643INTL_MACOSX_LIBS
644XGETTEXT_EXTRA_OPTIONS
645MSGMERGE_FOR_MSGFMT_OPTION
646MSGMERGE
647XGETTEXT_015
648XGETTEXT
649GMSGFMT_015
650GMSGFMT
651MSGFMT
652GETTEXT_MACRO_VERSION
653USE_NLS
654SED
655LTLIBICONV
656LIBICONV
657DEFAULT_QUOTING_STYLE
658DEFAULT_BLOCKING
659DEFAULT_ARCHIVE
660DEFAULT_ARCHIVE_FORMAT
661RSH
662LIBOBJS
663TAR_COND_XATTR_H_FALSE
664TAR_COND_XATTR_H_TRUE
665GNULIB_TEST_WARN_CFLAGS
666GNULIB_WARN_CFLAGS
667WARN_CFLAGS
668WERROR_CFLAGS
669PU_RMT_COND_FALSE
670PU_RMT_COND_TRUE
671DEFAULT_RMT_COMMAND
672DEFAULT_RMT_DIR
673PU_RMT_PROG
674LIB_SETSOCKOPT
675LIBGNU_LTLIBDEPS
676LIBGNU_LIBDEPS
677gltests_WITNESS
678NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
679NEXT_WCHAR_H
680HAVE_FEATURES_H
681HAVE_UTIME_H
682NEXT_AS_FIRST_DIRECTIVE_UTIME_H
683NEXT_UTIME_H
684REPLACE_UTIME
685HAVE_UTIME
686GNULIB_MDA_UTIME
687GNULIB_UTIME
688LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE
689LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE
690LIBUNISTRING_UNIWIDTH_H
691LIBUNISTRING_UNITYPES_H
692HAVE_UNISTD_H
693NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
694NEXT_UNISTD_H
695TIME_H_DEFINES_TIME_UTC
696UNISTD_H_DEFINES_STRUCT_TIMESPEC
697PTHREAD_H_DEFINES_STRUCT_TIMESPEC
698SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
699TIME_H_DEFINES_STRUCT_TIMESPEC
700NEXT_AS_FIRST_DIRECTIVE_TIME_H
701NEXT_TIME_H
702GL_GENERATE_SYSEXITS_H_FALSE
703GL_GENERATE_SYSEXITS_H_TRUE
704SYSEXITS_H
705HAVE_SYSEXITS_H
706NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H
707NEXT_SYSEXITS_H
708HAVE_SYS_RANDOM_H
709NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H
710NEXT_SYS_RANDOM_H
711HAVE_STRINGS_H
712NEXT_AS_FIRST_DIRECTIVE_STRINGS_H
713NEXT_STRINGS_H
714NEXT_AS_FIRST_DIRECTIVE_STRING_H
715NEXT_STRING_H
716HAVE_DECL_STRNCASECMP
717HAVE_STRCASECMP
718HAVE_FFS
719GNULIB_FFS
720NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
721NEXT_STDLIB_H
722NEXT_AS_FIRST_DIRECTIVE_STDIO_H
723NEXT_STDIO_H
724GL_GENERATE_STDARG_H_FALSE
725GL_GENERATE_STDARG_H_TRUE
726STDARG_H
727NEXT_AS_FIRST_DIRECTIVE_STDARG_H
728NEXT_STDARG_H
729GL_GENERATE_STDALIGN_H_FALSE
730GL_GENERATE_STDALIGN_H_TRUE
731STDALIGN_H
732NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
733NEXT_SIGNAL_H
734GL_GENERATE_SELINUX_LABEL_H_FALSE
735GL_GENERATE_SELINUX_LABEL_H_TRUE
736SELINUX_LABEL_H
737GL_GENERATE_SELINUX_CONTEXT_H_FALSE
738GL_GENERATE_SELINUX_CONTEXT_H_TRUE
739SELINUX_CONTEXT_H
740NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H
741NEXT_SELINUX_SELINUX_H
742LIB_SELINUX
743REPLACE_RAISE
744REPLACE_PTHREAD_SIGMASK
745HAVE_SIGHANDLER_T
746HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
747HAVE_STRUCT_SIGACTION_SA_SIGACTION
748HAVE_SIGACTION
749HAVE_SIGINFO_T
750HAVE_SIGSET_T
751HAVE_RAISE
752HAVE_PTHREAD_SIGMASK
753HAVE_POSIX_SIGNALBLOCKING
754GNULIB_SIGACTION
755GNULIB_SIGPROCMASK
756GNULIB_SIGNAL_H_SIGPIPE
757GNULIB_RAISE
758GNULIB_PTHREAD_SIGMASK
759HAVE__BOOL
760GL_GENERATE_STDBOOL_H_FALSE
761GL_GENERATE_STDBOOL_H_TRUE
762STDBOOL_H
763PARSE_DATETIME_BISON
764LIB_NL_LANGINFO
765REPLACE_LOCALTIME
766REPLACE_GMTIME
767REPLACE_TZSET
768REPLACE_TIMEGM
769REPLACE_STRFTIME
770REPLACE_NANOSLEEP
771REPLACE_MKTIME
772REPLACE_LOCALTIME_R
773REPLACE_CTIME
774HAVE_TIMEZONE_T
775HAVE_TIMESPEC_GET
776HAVE_TIMEGM
777HAVE_STRPTIME
778HAVE_NANOSLEEP
779HAVE_DECL_LOCALTIME_R
780GNULIB_MDA_TZSET
781GNULIB_TZSET
782GNULIB_TIME_RZ
783GNULIB_TIME_R
784GNULIB_TIMESPEC_GET
785GNULIB_TIMEGM
786GNULIB_STRPTIME
787GNULIB_STRFTIME
788GNULIB_NANOSLEEP
789GNULIB_LOCALTIME
790GNULIB_MKTIME
791GNULIB_CTIME
792UNDEFINE_STRTOK_R
793REPLACE_STRSIGNAL
794REPLACE_STRERRORNAME_NP
795REPLACE_STRERROR_R
796REPLACE_STRERROR
797REPLACE_STRTOK_R
798REPLACE_STRCASESTR
799REPLACE_STRSTR
800REPLACE_STRNLEN
801REPLACE_STRNDUP
802REPLACE_STRNCAT
803REPLACE_STRDUP
804REPLACE_STRCHRNUL
805REPLACE_STPNCPY
806REPLACE_MEMMEM
807REPLACE_MEMCHR
808REPLACE_FFSLL
809HAVE_STRVERSCMP
810HAVE_DECL_STRSIGNAL
811HAVE_SIGDESCR_NP
812HAVE_SIGABBREV_NP
813HAVE_STRERRORNAME_NP
814HAVE_DECL_STRERROR_R
815HAVE_DECL_STRTOK_R
816HAVE_STRCASESTR
817HAVE_STRSEP
818HAVE_STRPBRK
819HAVE_DECL_STRNLEN
820HAVE_DECL_STRNDUP
821HAVE_DECL_STRDUP
822HAVE_STRCHRNUL
823HAVE_STPNCPY
824HAVE_STPCPY
825HAVE_RAWMEMCHR
826HAVE_DECL_MEMRCHR
827HAVE_MEMPCPY
828HAVE_DECL_MEMMEM
829HAVE_FFSLL
830HAVE_FFSL
831HAVE_EXPLICIT_BZERO
832GNULIB_MDA_STRDUP
833GNULIB_MDA_MEMCCPY
834HAVE_MBSLEN
835GNULIB_STRVERSCMP
836GNULIB_STRSIGNAL
837GNULIB_SIGDESCR_NP
838GNULIB_SIGABBREV_NP
839GNULIB_STRERRORNAME_NP
840GNULIB_STRERROR_R
841GNULIB_STRERROR
842GNULIB_MBSTOK_R
843GNULIB_MBSSEP
844GNULIB_MBSSPN
845GNULIB_MBSPBRK
846GNULIB_MBSCSPN
847GNULIB_MBSCASESTR
848GNULIB_MBSPCASECMP
849GNULIB_MBSNCASECMP
850GNULIB_MBSCASECMP
851GNULIB_MBSSTR
852GNULIB_MBSRCHR
853GNULIB_MBSCHR
854GNULIB_MBSNLEN
855GNULIB_MBSLEN
856GNULIB_STRTOK_R
857GNULIB_STRCASESTR
858GNULIB_STRSTR
859GNULIB_STRSEP
860GNULIB_STRPBRK
861GNULIB_STRNLEN
862GNULIB_STRNDUP
863GNULIB_STRNCAT
864GNULIB_STRDUP
865GNULIB_STRCHRNUL
866GNULIB_STPNCPY
867GNULIB_STPCPY
868GNULIB_RAWMEMCHR
869GNULIB_MEMRCHR
870GNULIB_MEMPCPY
871GNULIB_MEMMEM
872GNULIB_MEMCHR
873GNULIB_FFSLL
874GNULIB_FFSL
875GNULIB_EXPLICIT_BZERO
876HAVE_VISIBILITY
877CFLAG_VISIBILITY
878LIB_MBRTOWC
879NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
880NEXT_LOCALE_H
881HAVE_XLOCALE_H
882NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
883NEXT_STDDEF_H
884GL_GENERATE_STDDEF_H_FALSE
885GL_GENERATE_STDDEF_H_TRUE
886STDDEF_H
887HAVE_WCHAR_T
888HAVE_MAX_ALIGN_T
889REPLACE_NULL
890REPLACE_STRUCT_LCONV
891REPLACE_FREELOCALE
892REPLACE_DUPLOCALE
893REPLACE_NEWLOCALE
894REPLACE_SETLOCALE
895REPLACE_LOCALECONV
896HAVE_FREELOCALE
897HAVE_DUPLOCALE
898HAVE_NEWLOCALE
899GNULIB_LOCALENAME
900GNULIB_DUPLOCALE
901GNULIB_SETLOCALE_NULL
902GNULIB_SETLOCALE
903GNULIB_LOCALECONV
904LOCALCHARSET_TESTS_ENVIRONMENT
905HAVE_LANGINFO_YESEXPR
906HAVE_LANGINFO_ERA
907HAVE_LANGINFO_ALTMON
908HAVE_LANGINFO_T_FMT_AMPM
909HAVE_LANGINFO_CODESET
910HAVE_LANGINFO_H
911NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
912NEXT_LANGINFO_H
913REPLACE_NL_LANGINFO
914HAVE_NL_LANGINFO
915GNULIB_NL_LANGINFO
916LOCALE_ZH_CN
917LOCALE_FR_UTF8
918LOCALE_JA
919REPLACE_TOWLOWER
920REPLACE_ISWCNTRL
921HAVE_WCTYPE_H
922NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
923NEXT_WCTYPE_H
924HAVE_CRTDEFS_H
925HAVE_WINT_T
926HAVE_ISWCNTRL
927REPLACE_ISWXDIGIT
928REPLACE_ISWDIGIT
929REPLACE_ISWBLANK
930HAVE_WCTRANS_T
931HAVE_WCTYPE_T
932HAVE_ISWBLANK
933GNULIB_TOWCTRANS
934GNULIB_WCTRANS
935GNULIB_ISWCTYPE
936GNULIB_WCTYPE
937GNULIB_ISWXDIGIT
938GNULIB_ISWDIGIT
939GNULIB_ISWBLANK
940NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
941NEXT_INTTYPES_H
942UINT64_MAX_EQ_ULONG_MAX
943UINT32_MAX_LT_UINTMAX_MAX
944PRIPTR_PREFIX
945INT64_MAX_EQ_LONG_MAX
946INT32_MAX_LT_INTMAX_MAX
947REPLACE_STRTOUMAX
948REPLACE_STRTOIMAX
949HAVE_IMAXDIV_T
950HAVE_DECL_STRTOUMAX
951HAVE_DECL_STRTOIMAX
952HAVE_DECL_IMAXDIV
953HAVE_DECL_IMAXABS
954GNULIB_STRTOUMAX
955GNULIB_STRTOIMAX
956GNULIB_IMAXDIV
957GNULIB_IMAXABS
958GL_GENERATE_STDINT_H_FALSE
959GL_GENERATE_STDINT_H_TRUE
960STDINT_H
961HAVE_SYS_INTTYPES_H
962HAVE_SYS_BITYPES_H
963HAVE_C99_STDINT_H
964WINT_T_SUFFIX
965WCHAR_T_SUFFIX
966SIG_ATOMIC_T_SUFFIX
967SIZE_T_SUFFIX
968PTRDIFF_T_SUFFIX
969HAVE_SIGNED_WINT_T
970HAVE_SIGNED_WCHAR_T
971HAVE_SIGNED_SIG_ATOMIC_T
972BITSIZEOF_WINT_T
973BITSIZEOF_WCHAR_T
974BITSIZEOF_SIG_ATOMIC_T
975BITSIZEOF_SIZE_T
976BITSIZEOF_PTRDIFF_T
977APPLE_UNIVERSAL_BUILD
978HAVE_STDINT_H
979NEXT_AS_FIRST_DIRECTIVE_STDINT_H
980NEXT_STDINT_H
981HAVE_SYS_TYPES_H
982HAVE_INTTYPES_H
983HAVE_WCHAR_H
984GNULIB_OVERRIDES_WINT_T
985GL_GENERATE_LIMITS_H_FALSE
986GL_GENERATE_LIMITS_H_TRUE
987LIMITS_H
988NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
989NEXT_LIMITS_H
990LIB_HARD_LOCALE
991LIB_SETLOCALE_NULL
992LIB_SCHED_YIELD
993LIBPMULTITHREAD
994LIBPTHREAD
995NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
996NEXT_SYS_TIME_H
997REPLACE_STRUCT_TIMEVAL
998REPLACE_GETTIMEOFDAY
999HAVE_SYS_TIME_H
1000HAVE_STRUCT_TIMEVAL
1001HAVE_GETTIMEOFDAY
1002GNULIB_GETTIMEOFDAY
1003LTLIBINTL
1004LIBINTL
1005LIB_GETRANDOM
1006REPLACE_GETRANDOM
1007HAVE_GETRANDOM
1008GNULIB_GETRANDOM
1009GNULIB_GL_UNISTD_H_GETOPT
1010GETOPT_CDEFS_H
1011GETOPT_H
1012HAVE_SYS_CDEFS_H
1013HAVE_GETOPT_H
1014NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
1015NEXT_GETOPT_H
1016WINDOWS_64_BIT_ST_SIZE
1017WINDOWS_STAT_TIMESPEC
1018NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1019NEXT_SYS_STAT_H
1020WINDOWS_STAT_INODES
1021WINDOWS_64_BIT_OFF_T
1022NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
1023NEXT_SYS_TYPES_H
1024REPLACE_VSPRINTF
1025REPLACE_VSNPRINTF
1026REPLACE_VPRINTF
1027REPLACE_VFPRINTF
1028REPLACE_VDPRINTF
1029REPLACE_VASPRINTF
1030REPLACE_TMPFILE
1031REPLACE_STDIO_WRITE_FUNCS
1032REPLACE_STDIO_READ_FUNCS
1033REPLACE_SPRINTF
1034REPLACE_SNPRINTF
1035REPLACE_RENAMEAT
1036REPLACE_RENAME
1037REPLACE_REMOVE
1038REPLACE_PRINTF
1039REPLACE_POPEN
1040REPLACE_PERROR
1041REPLACE_OBSTACK_PRINTF
1042REPLACE_GETLINE
1043REPLACE_GETDELIM
1044REPLACE_FTELLO
1045REPLACE_FTELL
1046REPLACE_FSEEKO
1047REPLACE_FSEEK
1048REPLACE_FREOPEN
1049REPLACE_FPURGE
1050REPLACE_FPRINTF
1051REPLACE_FOPEN
1052REPLACE_FFLUSH
1053REPLACE_FDOPEN
1054REPLACE_FCLOSE
1055REPLACE_DPRINTF
1056HAVE_VDPRINTF
1057HAVE_VASPRINTF
1058HAVE_RENAMEAT
1059HAVE_POPEN
1060HAVE_PCLOSE
1061HAVE_FTELLO
1062HAVE_FSEEKO
1063HAVE_DPRINTF
1064HAVE_DECL_VSNPRINTF
1065HAVE_DECL_SNPRINTF
1066HAVE_DECL_OBSTACK_PRINTF
1067HAVE_DECL_GETLINE
1068HAVE_DECL_GETDELIM
1069HAVE_DECL_FTELLO
1070HAVE_DECL_FSEEKO
1071HAVE_DECL_FPURGE
1072HAVE_DECL_FCLOSEALL
1073GNULIB_MDA_TEMPNAM
1074GNULIB_MDA_PUTW
1075GNULIB_MDA_GETW
1076GNULIB_MDA_FILENO
1077GNULIB_MDA_FDOPEN
1078GNULIB_MDA_FCLOSEALL
1079GNULIB_VSPRINTF_POSIX
1080GNULIB_VSNPRINTF
1081GNULIB_VPRINTF_POSIX
1082GNULIB_VPRINTF
1083GNULIB_VFPRINTF_POSIX
1084GNULIB_VFPRINTF
1085GNULIB_VDPRINTF
1086GNULIB_VSCANF
1087GNULIB_VFSCANF
1088GNULIB_VASPRINTF
1089GNULIB_TMPFILE
1090GNULIB_STDIO_H_SIGPIPE
1091GNULIB_STDIO_H_NONBLOCKING
1092GNULIB_SPRINTF_POSIX
1093GNULIB_SNPRINTF
1094GNULIB_SCANF
1095GNULIB_RENAMEAT
1096GNULIB_RENAME
1097GNULIB_REMOVE
1098GNULIB_PUTS
1099GNULIB_PUTCHAR
1100GNULIB_PUTC
1101GNULIB_PRINTF_POSIX
1102GNULIB_PRINTF
1103GNULIB_POPEN
1104GNULIB_PERROR
1105GNULIB_PCLOSE
1106GNULIB_OBSTACK_PRINTF_POSIX
1107GNULIB_OBSTACK_PRINTF
1108GNULIB_GETLINE
1109GNULIB_GETDELIM
1110GNULIB_GETCHAR
1111GNULIB_GETC
1112GNULIB_FWRITE
1113GNULIB_FTELLO
1114GNULIB_FTELL
1115GNULIB_FSEEKO
1116GNULIB_FSEEK
1117GNULIB_FSCANF
1118GNULIB_FREOPEN
1119GNULIB_FREAD
1120GNULIB_FPUTS
1121GNULIB_FPUTC
1122GNULIB_FPURGE
1123GNULIB_FPRINTF_POSIX
1124GNULIB_FPRINTF
1125GNULIB_FOPEN
1126GNULIB_FGETS
1127GNULIB_FGETC
1128GNULIB_FFLUSH
1129GNULIB_FDOPEN
1130GNULIB_FCLOSE
1131GNULIB_DPRINTF
1132GL_GENERATE_FNMATCH_H_FALSE
1133GL_GENERATE_FNMATCH_H_TRUE
1134FNMATCH_H
1135HAVE_FNMATCH_H
1136NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H
1137NEXT_FNMATCH_H
1138REPLACE_FNMATCH
1139HAVE_FNMATCH
1140GNULIB_FNMATCH
1141REPLACE_ITOLD
1142GL_GENERATE_FLOAT_H_FALSE
1143GL_GENERATE_FLOAT_H_TRUE
1144FLOAT_H
1145NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1146NEXT_FLOAT_H
1147LIB_HAS_ACL
1148NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1149NEXT_FCNTL_H
1150REPLACE_OPENAT
1151REPLACE_OPEN
1152REPLACE_FCNTL
1153REPLACE_CREAT
1154HAVE_OPENAT
1155HAVE_FCNTL
1156GNULIB_MDA_OPEN
1157GNULIB_MDA_CREAT
1158GNULIB_OPENAT
1159GNULIB_OPEN
1160GNULIB_NONBLOCKING
1161GNULIB_FCNTL
1162GNULIB_CREAT
1163REPLACE_UTIMENSAT
1164REPLACE_STAT
1165REPLACE_MKNODAT
1166REPLACE_MKNOD
1167REPLACE_MKFIFOAT
1168REPLACE_MKFIFO
1169REPLACE_MKDIR
1170REPLACE_LSTAT
1171REPLACE_FUTIMENS
1172REPLACE_FSTATAT
1173REPLACE_FSTAT
1174REPLACE_FCHMODAT
1175HAVE_UTIMENSAT
1176HAVE_MKNODAT
1177HAVE_MKNOD
1178HAVE_MKFIFOAT
1179HAVE_MKFIFO
1180HAVE_MKDIRAT
1181HAVE_LSTAT
1182HAVE_LCHMOD
1183HAVE_GETUMASK
1184HAVE_FUTIMENS
1185HAVE_FSTATAT
1186HAVE_FCHMODAT
1187GNULIB_MDA_UMASK
1188GNULIB_MDA_MKDIR
1189GNULIB_MDA_CHMOD
1190GNULIB_OVERRIDES_STRUCT_STAT
1191GNULIB_UTIMENSAT
1192GNULIB_STAT
1193GNULIB_MKNODAT
1194GNULIB_MKNOD
1195GNULIB_MKFIFOAT
1196GNULIB_MKFIFO
1197GNULIB_MKDIRAT
1198GNULIB_MKDIR
1199GNULIB_LSTAT
1200GNULIB_LCHMOD
1201GNULIB_GETUMASK
1202GNULIB_FUTIMENS
1203GNULIB_FSTATAT
1204GNULIB_FSTAT
1205GNULIB_FCHMODAT
1206LIB_EACCESS
1207EOVERFLOW_VALUE
1208EOVERFLOW_HIDDEN
1209ENOLINK_VALUE
1210ENOLINK_HIDDEN
1211EMULTIHOP_VALUE
1212EMULTIHOP_HIDDEN
1213GL_GENERATE_ERRNO_H_FALSE
1214GL_GENERATE_ERRNO_H_TRUE
1215ERRNO_H
1216NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1217NEXT_ERRNO_H
1218HAVE_DIRENT_H
1219NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1220NEXT_DIRENT_H
1221NEXT_AS_FIRST_DIRECTIVE_CTYPE_H
1222NEXT_CTYPE_H
1223PRAGMA_COLUMNS
1224PRAGMA_SYSTEM_HEADER
1225INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1226INCLUDE_NEXT
1227HAVE_ISBLANK
1228GNULIB_ISBLANK
1229pkglibexecdir
1230runstatedir
1231lispdir
1232REPLACE_FDOPENDIR
1233REPLACE_DIRFD
1234REPLACE_CLOSEDIR
1235REPLACE_OPENDIR
1236HAVE_ALPHASORT
1237HAVE_SCANDIR
1238HAVE_FDOPENDIR
1239HAVE_DECL_FDOPENDIR
1240HAVE_DECL_DIRFD
1241HAVE_CLOSEDIR
1242HAVE_REWINDDIR
1243HAVE_READDIR
1244HAVE_OPENDIR
1245GNULIB_ALPHASORT
1246GNULIB_SCANDIR
1247GNULIB_FDOPENDIR
1248GNULIB_DIRFD
1249GNULIB_CLOSEDIR
1250GNULIB_REWINDDIR
1251GNULIB_READDIR
1252GNULIB_OPENDIR
1253HAVE_WINSOCK2_H
1254HAVE_MSVC_INVALID_PARAMETER_HANDLER
1255LIB_CLOCK_GETTIME
1256UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1257UNISTD_H_HAVE_WINSOCK2_H
1258UNISTD_H_HAVE_SYS_RANDOM_H
1259REPLACE_WRITE
1260REPLACE_USLEEP
1261REPLACE_UNLINKAT
1262REPLACE_UNLINK
1263REPLACE_TTYNAME_R
1264REPLACE_TRUNCATE
1265REPLACE_SYMLINKAT
1266REPLACE_SYMLINK
1267REPLACE_SLEEP
1268REPLACE_RMDIR
1269REPLACE_READLINKAT
1270REPLACE_READLINK
1271REPLACE_READ
1272REPLACE_PWRITE
1273REPLACE_PREAD
1274REPLACE_LSEEK
1275REPLACE_LINKAT
1276REPLACE_LINK
1277REPLACE_LCHOWN
1278REPLACE_ISATTY
1279REPLACE_GETPASS
1280REPLACE_GETPAGESIZE
1281REPLACE_GETGROUPS
1282REPLACE_GETLOGIN_R
1283REPLACE_GETDTABLESIZE
1284REPLACE_GETDOMAINNAME
1285REPLACE_GETCWD
1286REPLACE_FTRUNCATE
1287REPLACE_FCHOWNAT
1288REPLACE_FACCESSAT
1289REPLACE_EXECVPE
1290REPLACE_EXECVP
1291REPLACE_EXECVE
1292REPLACE_EXECV
1293REPLACE_EXECLP
1294REPLACE_EXECLE
1295REPLACE_EXECL
1296REPLACE_DUP2
1297REPLACE_DUP
1298REPLACE_CLOSE
1299REPLACE_CHOWN
1300REPLACE_ACCESS
1301HAVE_SYS_PARAM_H
1302HAVE_OS_H
1303HAVE_DECL_TTYNAME_R
1304HAVE_DECL_TRUNCATE
1305HAVE_DECL_SETHOSTNAME
1306HAVE_DECL_GETUSERSHELL
1307HAVE_DECL_GETPAGESIZE
1308HAVE_DECL_GETLOGIN_R
1309HAVE_DECL_GETLOGIN
1310HAVE_DECL_GETDOMAINNAME
1311HAVE_DECL_FDATASYNC
1312HAVE_DECL_FCHDIR
1313HAVE_DECL_EXECVPE
1314HAVE_DECL_ENVIRON
1315HAVE_USLEEP
1316HAVE_UNLINKAT
1317HAVE_SYMLINKAT
1318HAVE_SYMLINK
1319HAVE_SLEEP
1320HAVE_SETHOSTNAME
1321HAVE_READLINKAT
1322HAVE_READLINK
1323HAVE_PWRITE
1324HAVE_PREAD
1325HAVE_PIPE2
1326HAVE_PIPE
1327HAVE_LINKAT
1328HAVE_LINK
1329HAVE_LCHOWN
1330HAVE_GROUP_MEMBER
1331HAVE_GETPASS
1332HAVE_GETPAGESIZE
1333HAVE_GETLOGIN
1334HAVE_GETHOSTNAME
1335HAVE_GETGROUPS
1336HAVE_GETENTROPY
1337HAVE_GETDTABLESIZE
1338HAVE_FTRUNCATE
1339HAVE_FSYNC
1340HAVE_FDATASYNC
1341HAVE_FCHOWNAT
1342HAVE_FCHDIR
1343HAVE_FACCESSAT
1344HAVE_EXECVPE
1345HAVE_EUIDACCESS
1346HAVE_DUP3
1347HAVE_COPY_FILE_RANGE
1348HAVE_CHOWN
1349GNULIB_MDA_WRITE
1350GNULIB_MDA_UNLINK
1351GNULIB_MDA_SWAB
1352GNULIB_MDA_RMDIR
1353GNULIB_MDA_READ
1354GNULIB_MDA_LSEEK
1355GNULIB_MDA_ISATTY
1356GNULIB_MDA_GETPID
1357GNULIB_MDA_GETCWD
1358GNULIB_MDA_EXECVPE
1359GNULIB_MDA_EXECVP
1360GNULIB_MDA_EXECVE
1361GNULIB_MDA_EXECV
1362GNULIB_MDA_EXECLP
1363GNULIB_MDA_EXECLE
1364GNULIB_MDA_EXECL
1365GNULIB_MDA_DUP2
1366GNULIB_MDA_DUP
1367GNULIB_MDA_CLOSE
1368GNULIB_MDA_CHDIR
1369GNULIB_MDA_ACCESS
1370GNULIB_WRITE
1371GNULIB_USLEEP
1372GNULIB_UNLINKAT
1373GNULIB_UNLINK
1374GNULIB_UNISTD_H_SIGPIPE
1375GNULIB_UNISTD_H_NONBLOCKING
1376GNULIB_TTYNAME_R
1377GNULIB_TRUNCATE
1378GNULIB_SYMLINKAT
1379GNULIB_SYMLINK
1380GNULIB_SLEEP
1381GNULIB_SETHOSTNAME
1382GNULIB_RMDIR
1383GNULIB_READLINKAT
1384GNULIB_READLINK
1385GNULIB_READ
1386GNULIB_PWRITE
1387GNULIB_PREAD
1388GNULIB_PIPE2
1389GNULIB_PIPE
1390GNULIB_LSEEK
1391GNULIB_LINKAT
1392GNULIB_LINK
1393GNULIB_LCHOWN
1394GNULIB_ISATTY
1395GNULIB_GROUP_MEMBER
1396GNULIB_GETUSERSHELL
1397GNULIB_GETPASS
1398GNULIB_GETPAGESIZE
1399GNULIB_GETOPT_POSIX
1400GNULIB_GETLOGIN_R
1401GNULIB_GETLOGIN
1402GNULIB_GETHOSTNAME
1403GNULIB_GETGROUPS
1404GNULIB_GETENTROPY
1405GNULIB_GETDTABLESIZE
1406GNULIB_GETDOMAINNAME
1407GNULIB_GETCWD
1408GNULIB_FTRUNCATE
1409GNULIB_FSYNC
1410GNULIB_FDATASYNC
1411GNULIB_FCHOWNAT
1412GNULIB_FCHDIR
1413GNULIB_FACCESSAT
1414GNULIB_EXECVPE
1415GNULIB_EXECVP
1416GNULIB_EXECVE
1417GNULIB_EXECV
1418GNULIB_EXECLP
1419GNULIB_EXECLE
1420GNULIB_EXECL
1421GNULIB_EUIDACCESS
1422GNULIB_ENVIRON
1423GNULIB_DUP3
1424GNULIB_DUP2
1425GNULIB_DUP
1426GNULIB_COPY_FILE_RANGE
1427GNULIB_CLOSE
1428GNULIB_CHOWN
1429GNULIB_CHDIR
1430GNULIB_ACCESS
1431REPLACE_WCTOMB
1432REPLACE_UNSETENV
1433REPLACE_STRTOLD
1434REPLACE_STRTOD
1435REPLACE_SETSTATE
1436REPLACE_SETENV
1437REPLACE_REALPATH
1438REPLACE_REALLOC
1439REPLACE_RANDOM_R
1440REPLACE_RANDOM
1441REPLACE_QSORT_R
1442REPLACE_PUTENV
1443REPLACE_PTSNAME_R
1444REPLACE_PTSNAME
1445REPLACE_POSIX_MEMALIGN
1446REPLACE_MKSTEMP
1447REPLACE_MBTOWC
1448REPLACE_MALLOC
1449REPLACE_INITSTATE
1450REPLACE_FREE
1451REPLACE_CANONICALIZE_FILE_NAME
1452REPLACE_CALLOC
1453REPLACE_ALIGNED_ALLOC
1454HAVE_DECL_UNSETENV
1455HAVE_UNLOCKPT
1456HAVE_SYS_LOADAVG_H
1457HAVE_STRUCT_RANDOM_DATA
1458HAVE_STRTOULL
1459HAVE_STRTOLL
1460HAVE_STRTOLD
1461HAVE_STRTOD
1462HAVE_DECL_SETSTATE
1463HAVE_SETSTATE
1464HAVE_DECL_SETENV
1465HAVE_SETENV
1466HAVE_SECURE_GETENV
1467HAVE_RPMATCH
1468HAVE_REALPATH
1469HAVE_REALLOCARRAY
1470HAVE_RANDOM_R
1471HAVE_RANDOM_H
1472HAVE_RANDOM
1473HAVE_QSORT_R
1474HAVE_PTSNAME_R
1475HAVE_PTSNAME
1476HAVE_POSIX_OPENPT
1477HAVE_POSIX_MEMALIGN
1478HAVE_MKSTEMPS
1479HAVE_MKSTEMP
1480HAVE_MKOSTEMPS
1481HAVE_MKOSTEMP
1482HAVE_MKDTEMP
1483HAVE_MBTOWC
1484HAVE_DECL_INITSTATE
1485HAVE_INITSTATE
1486HAVE_GRANTPT
1487HAVE_GETSUBOPT
1488HAVE_DECL_GETLOADAVG
1489HAVE_DECL_GCVT
1490HAVE_DECL_FCVT
1491HAVE_DECL_ECVT
1492HAVE_CANONICALIZE_FILE_NAME
1493HAVE_ATOLL
1494HAVE_ALIGNED_ALLOC
1495HAVE__EXIT
1496GNULIB_MDA_PUTENV
1497GNULIB_MDA_MKTEMP
1498GNULIB_MDA_GCVT
1499GNULIB_MDA_FCVT
1500GNULIB_MDA_ECVT
1501GNULIB_WCTOMB
1502GNULIB_UNSETENV
1503GNULIB_UNLOCKPT
1504GNULIB_SYSTEM_POSIX
1505GNULIB_STRTOULL
1506GNULIB_STRTOLL
1507GNULIB_STRTOLD
1508GNULIB_STRTOD
1509GNULIB_SETENV
1510GNULIB_SECURE_GETENV
1511GNULIB_RPMATCH
1512GNULIB_REALPATH
1513GNULIB_REALLOC_POSIX
1514GNULIB_REALLOCARRAY
1515GNULIB_RANDOM_R
1516GNULIB_RANDOM
1517GNULIB_QSORT_R
1518GNULIB_PUTENV
1519GNULIB_PTSNAME_R
1520GNULIB_PTSNAME
1521GNULIB_POSIX_OPENPT
1522GNULIB_POSIX_MEMALIGN
1523GNULIB_MKSTEMPS
1524GNULIB_MKSTEMP
1525GNULIB_MKOSTEMPS
1526GNULIB_MKOSTEMP
1527GNULIB_MKDTEMP
1528GNULIB_MBTOWC
1529GNULIB_MALLOC_POSIX
1530GNULIB_GRANTPT
1531GNULIB_GETSUBOPT
1532GNULIB_GETLOADAVG
1533GNULIB_FREE_POSIX
1534GNULIB_CANONICALIZE_FILE_NAME
1535GNULIB_CALLOC_POSIX
1536GNULIB_ATOLL
1537GNULIB_ALIGNED_ALLOC
1538GNULIB__EXIT
1539LOCALE_FR
1540REPLACE_WCSTOK
1541REPLACE_WCSFTIME
1542REPLACE_WCSWIDTH
1543REPLACE_WCWIDTH
1544REPLACE_WCSNRTOMBS
1545REPLACE_WCSRTOMBS
1546REPLACE_WCRTOMB
1547REPLACE_MBSNRTOWCS
1548REPLACE_MBSRTOWCS
1549REPLACE_MBRLEN
1550REPLACE_MBRTOWC
1551REPLACE_MBSINIT
1552REPLACE_WCTOB
1553REPLACE_BTOWC
1554REPLACE_MBSTATE_T
1555HAVE_DECL_WCWIDTH
1556HAVE_DECL_WCSDUP
1557HAVE_DECL_WCTOB
1558HAVE_WCSFTIME
1559HAVE_WCSWIDTH
1560HAVE_WCSTOK
1561HAVE_WCSSTR
1562HAVE_WCSPBRK
1563HAVE_WCSSPN
1564HAVE_WCSCSPN
1565HAVE_WCSRCHR
1566HAVE_WCSCHR
1567HAVE_WCSDUP
1568HAVE_WCSXFRM
1569HAVE_WCSCOLL
1570HAVE_WCSNCASECMP
1571HAVE_WCSCASECMP
1572HAVE_WCSNCMP
1573HAVE_WCSCMP
1574HAVE_WCSNCAT
1575HAVE_WCSCAT
1576HAVE_WCPNCPY
1577HAVE_WCSNCPY
1578HAVE_WCPCPY
1579HAVE_WCSCPY
1580HAVE_WCSNLEN
1581HAVE_WCSLEN
1582HAVE_WMEMSET
1583HAVE_WMEMPCPY
1584HAVE_WMEMMOVE
1585HAVE_WMEMCPY
1586HAVE_WMEMCMP
1587HAVE_WMEMCHR
1588HAVE_WCSNRTOMBS
1589HAVE_WCSRTOMBS
1590HAVE_WCRTOMB
1591HAVE_MBSNRTOWCS
1592HAVE_MBSRTOWCS
1593HAVE_MBRLEN
1594HAVE_MBRTOWC
1595HAVE_MBSINIT
1596HAVE_BTOWC
1597GNULIB_MDA_WCSDUP
1598GNULIB_WCSFTIME
1599GNULIB_WCSWIDTH
1600GNULIB_WCSTOK
1601GNULIB_WCSSTR
1602GNULIB_WCSPBRK
1603GNULIB_WCSSPN
1604GNULIB_WCSCSPN
1605GNULIB_WCSRCHR
1606GNULIB_WCSCHR
1607GNULIB_WCSDUP
1608GNULIB_WCSXFRM
1609GNULIB_WCSCOLL
1610GNULIB_WCSNCASECMP
1611GNULIB_WCSCASECMP
1612GNULIB_WCSNCMP
1613GNULIB_WCSCMP
1614GNULIB_WCSNCAT
1615GNULIB_WCSCAT
1616GNULIB_WCPNCPY
1617GNULIB_WCSNCPY
1618GNULIB_WCPCPY
1619GNULIB_WCSCPY
1620GNULIB_WCSNLEN
1621GNULIB_WCSLEN
1622GNULIB_WMEMSET
1623GNULIB_WMEMPCPY
1624GNULIB_WMEMMOVE
1625GNULIB_WMEMCPY
1626GNULIB_WMEMCMP
1627GNULIB_WMEMCHR
1628GNULIB_WCWIDTH
1629GNULIB_WCSNRTOMBS
1630GNULIB_WCSRTOMBS
1631GNULIB_WCRTOMB
1632GNULIB_MBSNRTOWCS
1633GNULIB_MBSRTOWCS
1634GNULIB_MBRLEN
1635GNULIB_MBRTOWC
1636GNULIB_MBSINIT
1637GNULIB_WCTOB
1638GNULIB_BTOWC
1639HAVE_ALLOCA_H
1640GL_GENERATE_ALLOCA_H_FALSE
1641GL_GENERATE_ALLOCA_H_TRUE
1642ALLOCA_H
1643ALLOCA
1644USE_ACL
1645LIB_ACL
1646GL_COND_LIBTOOL_FALSE
1647GL_COND_LIBTOOL_TRUE
1648ac_ct_AR
1649ARFLAGS
1650AR
1651host_os
1652host_vendor
1653host_cpu
1654host
1655build_os
1656build_vendor
1657build_cpu
1658build
1659EGREP
1660GREP
1661CPP
1662YFLAGS
1663YACC
1664RANLIB
1665am__fastdepCC_FALSE
1666am__fastdepCC_TRUE
1667CCDEPMODE
1668am__nodep
1669AMDEPBACKSLASH
1670AMDEP_FALSE
1671AMDEP_TRUE
1672am__quote
1673am__include
1674DEPDIR
1675OBJEXT
1676EXEEXT
1677ac_ct_CC
1678CPPFLAGS
1679LDFLAGS
1680CFLAGS
1681CC
1682AM_BACKSLASH
1683AM_DEFAULT_VERBOSITY
1684AM_DEFAULT_V
1685AM_V
1686am__untar
1687am__tar
1688AMTAR
1689am__leading_dot
1690SET_MAKE
1691AWK
1692mkdir_p
1693MKDIR_P
1694INSTALL_STRIP_PROGRAM
1695STRIP
1696install_sh
1697MAKEINFO
1698AUTOHEADER
1699AUTOMAKE
1700AUTOCONF
1701ACLOCAL
1702VERSION
1703PACKAGE
1704CYGPATH_W
1705am__isrc
1706INSTALL_DATA
1707INSTALL_SCRIPT
1708INSTALL_PROGRAM
1709target_alias
1710host_alias
1711build_alias
1712LIBS
1713ECHO_T
1714ECHO_N
1715ECHO_C
1716DEFS
1717mandir
1718localedir
1719libdir
1720psdir
1721pdfdir
1722dvidir
1723htmldir
1724infodir
1725docdir
1726oldincludedir
1727includedir
1728localstatedir
1729sharedstatedir
1730sysconfdir
1731datadir
1732datarootdir
1733libexecdir
1734sbindir
1735bindir
1736program_transform_name
1737prefix
1738exec_prefix
1739PACKAGE_URL
1740PACKAGE_BUGREPORT
1741PACKAGE_STRING
1742PACKAGE_VERSION
1743PACKAGE_TARNAME
1744PACKAGE_NAME
1745PATH_SEPARATOR
1746SHELL'
1747ac_subst_files=''
1748ac_user_opts='
1749enable_option_checking
1750enable_silent_rules
1751enable_dependency_tracking
1752enable_largefile
1753with_posix_acls
1754enable_cross_guesses
1755enable_acl
1756with_included_regex
1757with_selinux
1758with_packager
1759with_packager_version
1760with_packager_bug_reports
1761with_rmt
1762enable_gcc_warnings
1763with_xattrs
1764with_compress
1765with_gzip
1766with_bzip2
1767with_lzip
1768with_lzma
1769with_lzop
1770with_xz
1771with_zstd
1772with_gnu_ld
1773enable_rpath
1774with_libiconv_prefix
1775enable_nls
1776with_libintl_prefix
1777enable_backup_scripts
1778'
1779      ac_precious_vars='build_alias
1780host_alias
1781target_alias
1782CC
1783CFLAGS
1784LDFLAGS
1785LIBS
1786CPPFLAGS
1787YACC
1788YFLAGS
1789CPP
1790DEFAULT_RMT_DIR
1791RSH
1792DEFAULT_ARCHIVE_FORMAT
1793DEFAULT_ARCHIVE
1794DEFAULT_BLOCKING
1795DEFAULT_QUOTING_STYLE'
1796
1797
1798# Initialize some variables set by options.
1799ac_init_help=
1800ac_init_version=false
1801ac_unrecognized_opts=
1802ac_unrecognized_sep=
1803# The variables have the same names as the options, with
1804# dashes changed to underlines.
1805cache_file=/dev/null
1806exec_prefix=NONE
1807no_create=
1808no_recursion=
1809prefix=NONE
1810program_prefix=NONE
1811program_suffix=NONE
1812program_transform_name=s,x,x,
1813silent=
1814site=
1815srcdir=
1816verbose=
1817x_includes=NONE
1818x_libraries=NONE
1819
1820# Installation directory options.
1821# These are left unexpanded so users can "make install exec_prefix=/foo"
1822# and all the variables that are supposed to be based on exec_prefix
1823# by default will actually change.
1824# Use braces instead of parens because sh, perl, etc. also accept them.
1825# (The list follows the same order as the GNU Coding Standards.)
1826bindir='${exec_prefix}/bin'
1827sbindir='${exec_prefix}/sbin'
1828libexecdir='${exec_prefix}/libexec'
1829datarootdir='${prefix}/share'
1830datadir='${datarootdir}'
1831sysconfdir='${prefix}/etc'
1832sharedstatedir='${prefix}/com'
1833localstatedir='${prefix}/var'
1834includedir='${prefix}/include'
1835oldincludedir='/usr/include'
1836docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1837infodir='${datarootdir}/info'
1838htmldir='${docdir}'
1839dvidir='${docdir}'
1840pdfdir='${docdir}'
1841psdir='${docdir}'
1842libdir='${exec_prefix}/lib'
1843localedir='${datarootdir}/locale'
1844mandir='${datarootdir}/man'
1845
1846ac_prev=
1847ac_dashdash=
1848for ac_option
1849do
1850  # If the previous option needs an argument, assign it.
1851  if test -n "$ac_prev"; then
1852    eval $ac_prev=\$ac_option
1853    ac_prev=
1854    continue
1855  fi
1856
1857  case $ac_option in
1858  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1859  *=)   ac_optarg= ;;
1860  *)    ac_optarg=yes ;;
1861  esac
1862
1863  # Accept the important Cygnus configure options, so we can diagnose typos.
1864
1865  case $ac_dashdash$ac_option in
1866  --)
1867    ac_dashdash=yes ;;
1868
1869  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1870    ac_prev=bindir ;;
1871  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1872    bindir=$ac_optarg ;;
1873
1874  -build | --build | --buil | --bui | --bu)
1875    ac_prev=build_alias ;;
1876  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1877    build_alias=$ac_optarg ;;
1878
1879  -cache-file | --cache-file | --cache-fil | --cache-fi \
1880  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1881    ac_prev=cache_file ;;
1882  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1883  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1884    cache_file=$ac_optarg ;;
1885
1886  --config-cache | -C)
1887    cache_file=config.cache ;;
1888
1889  -datadir | --datadir | --datadi | --datad)
1890    ac_prev=datadir ;;
1891  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1892    datadir=$ac_optarg ;;
1893
1894  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1895  | --dataroo | --dataro | --datar)
1896    ac_prev=datarootdir ;;
1897  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1898  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1899    datarootdir=$ac_optarg ;;
1900
1901  -disable-* | --disable-*)
1902    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1903    # Reject names that are not valid shell variable names.
1904    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1905      as_fn_error $? "invalid feature name: $ac_useropt"
1906    ac_useropt_orig=$ac_useropt
1907    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1908    case $ac_user_opts in
1909      *"
1910"enable_$ac_useropt"
1911"*) ;;
1912      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1913	 ac_unrecognized_sep=', ';;
1914    esac
1915    eval enable_$ac_useropt=no ;;
1916
1917  -docdir | --docdir | --docdi | --doc | --do)
1918    ac_prev=docdir ;;
1919  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1920    docdir=$ac_optarg ;;
1921
1922  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1923    ac_prev=dvidir ;;
1924  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1925    dvidir=$ac_optarg ;;
1926
1927  -enable-* | --enable-*)
1928    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1929    # Reject names that are not valid shell variable names.
1930    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1931      as_fn_error $? "invalid feature name: $ac_useropt"
1932    ac_useropt_orig=$ac_useropt
1933    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1934    case $ac_user_opts in
1935      *"
1936"enable_$ac_useropt"
1937"*) ;;
1938      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1939	 ac_unrecognized_sep=', ';;
1940    esac
1941    eval enable_$ac_useropt=\$ac_optarg ;;
1942
1943  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1944  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1945  | --exec | --exe | --ex)
1946    ac_prev=exec_prefix ;;
1947  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1948  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1949  | --exec=* | --exe=* | --ex=*)
1950    exec_prefix=$ac_optarg ;;
1951
1952  -gas | --gas | --ga | --g)
1953    # Obsolete; use --with-gas.
1954    with_gas=yes ;;
1955
1956  -help | --help | --hel | --he | -h)
1957    ac_init_help=long ;;
1958  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1959    ac_init_help=recursive ;;
1960  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1961    ac_init_help=short ;;
1962
1963  -host | --host | --hos | --ho)
1964    ac_prev=host_alias ;;
1965  -host=* | --host=* | --hos=* | --ho=*)
1966    host_alias=$ac_optarg ;;
1967
1968  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1969    ac_prev=htmldir ;;
1970  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1971  | --ht=*)
1972    htmldir=$ac_optarg ;;
1973
1974  -includedir | --includedir | --includedi | --included | --include \
1975  | --includ | --inclu | --incl | --inc)
1976    ac_prev=includedir ;;
1977  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1978  | --includ=* | --inclu=* | --incl=* | --inc=*)
1979    includedir=$ac_optarg ;;
1980
1981  -infodir | --infodir | --infodi | --infod | --info | --inf)
1982    ac_prev=infodir ;;
1983  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1984    infodir=$ac_optarg ;;
1985
1986  -libdir | --libdir | --libdi | --libd)
1987    ac_prev=libdir ;;
1988  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1989    libdir=$ac_optarg ;;
1990
1991  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1992  | --libexe | --libex | --libe)
1993    ac_prev=libexecdir ;;
1994  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1995  | --libexe=* | --libex=* | --libe=*)
1996    libexecdir=$ac_optarg ;;
1997
1998  -localedir | --localedir | --localedi | --localed | --locale)
1999    ac_prev=localedir ;;
2000  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
2001    localedir=$ac_optarg ;;
2002
2003  -localstatedir | --localstatedir | --localstatedi | --localstated \
2004  | --localstate | --localstat | --localsta | --localst | --locals)
2005    ac_prev=localstatedir ;;
2006  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
2007  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
2008    localstatedir=$ac_optarg ;;
2009
2010  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2011    ac_prev=mandir ;;
2012  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2013    mandir=$ac_optarg ;;
2014
2015  -nfp | --nfp | --nf)
2016    # Obsolete; use --without-fp.
2017    with_fp=no ;;
2018
2019  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2020  | --no-cr | --no-c | -n)
2021    no_create=yes ;;
2022
2023  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
2024  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
2025    no_recursion=yes ;;
2026
2027  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
2028  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
2029  | --oldin | --oldi | --old | --ol | --o)
2030    ac_prev=oldincludedir ;;
2031  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
2032  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
2033  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
2034    oldincludedir=$ac_optarg ;;
2035
2036  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2037    ac_prev=prefix ;;
2038  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2039    prefix=$ac_optarg ;;
2040
2041  -program-prefix | --program-prefix | --program-prefi | --program-pref \
2042  | --program-pre | --program-pr | --program-p)
2043    ac_prev=program_prefix ;;
2044  -program-prefix=* | --program-prefix=* | --program-prefi=* \
2045  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2046    program_prefix=$ac_optarg ;;
2047
2048  -program-suffix | --program-suffix | --program-suffi | --program-suff \
2049  | --program-suf | --program-su | --program-s)
2050    ac_prev=program_suffix ;;
2051  -program-suffix=* | --program-suffix=* | --program-suffi=* \
2052  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2053    program_suffix=$ac_optarg ;;
2054
2055  -program-transform-name | --program-transform-name \
2056  | --program-transform-nam | --program-transform-na \
2057  | --program-transform-n | --program-transform- \
2058  | --program-transform | --program-transfor \
2059  | --program-transfo | --program-transf \
2060  | --program-trans | --program-tran \
2061  | --progr-tra | --program-tr | --program-t)
2062    ac_prev=program_transform_name ;;
2063  -program-transform-name=* | --program-transform-name=* \
2064  | --program-transform-nam=* | --program-transform-na=* \
2065  | --program-transform-n=* | --program-transform-=* \
2066  | --program-transform=* | --program-transfor=* \
2067  | --program-transfo=* | --program-transf=* \
2068  | --program-trans=* | --program-tran=* \
2069  | --progr-tra=* | --program-tr=* | --program-t=*)
2070    program_transform_name=$ac_optarg ;;
2071
2072  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2073    ac_prev=pdfdir ;;
2074  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2075    pdfdir=$ac_optarg ;;
2076
2077  -psdir | --psdir | --psdi | --psd | --ps)
2078    ac_prev=psdir ;;
2079  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2080    psdir=$ac_optarg ;;
2081
2082  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2083  | -silent | --silent | --silen | --sile | --sil)
2084    silent=yes ;;
2085
2086  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2087    ac_prev=sbindir ;;
2088  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2089  | --sbi=* | --sb=*)
2090    sbindir=$ac_optarg ;;
2091
2092  -sharedstatedir | --sharedstatedir | --sharedstatedi \
2093  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2094  | --sharedst | --shareds | --shared | --share | --shar \
2095  | --sha | --sh)
2096    ac_prev=sharedstatedir ;;
2097  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2098  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2099  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2100  | --sha=* | --sh=*)
2101    sharedstatedir=$ac_optarg ;;
2102
2103  -site | --site | --sit)
2104    ac_prev=site ;;
2105  -site=* | --site=* | --sit=*)
2106    site=$ac_optarg ;;
2107
2108  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2109    ac_prev=srcdir ;;
2110  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2111    srcdir=$ac_optarg ;;
2112
2113  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2114  | --syscon | --sysco | --sysc | --sys | --sy)
2115    ac_prev=sysconfdir ;;
2116  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2117  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2118    sysconfdir=$ac_optarg ;;
2119
2120  -target | --target | --targe | --targ | --tar | --ta | --t)
2121    ac_prev=target_alias ;;
2122  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2123    target_alias=$ac_optarg ;;
2124
2125  -v | -verbose | --verbose | --verbos | --verbo | --verb)
2126    verbose=yes ;;
2127
2128  -version | --version | --versio | --versi | --vers | -V)
2129    ac_init_version=: ;;
2130
2131  -with-* | --with-*)
2132    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2133    # Reject names that are not valid shell variable names.
2134    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2135      as_fn_error $? "invalid package name: $ac_useropt"
2136    ac_useropt_orig=$ac_useropt
2137    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2138    case $ac_user_opts in
2139      *"
2140"with_$ac_useropt"
2141"*) ;;
2142      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2143	 ac_unrecognized_sep=', ';;
2144    esac
2145    eval with_$ac_useropt=\$ac_optarg ;;
2146
2147  -without-* | --without-*)
2148    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2149    # Reject names that are not valid shell variable names.
2150    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2151      as_fn_error $? "invalid package name: $ac_useropt"
2152    ac_useropt_orig=$ac_useropt
2153    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2154    case $ac_user_opts in
2155      *"
2156"with_$ac_useropt"
2157"*) ;;
2158      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2159	 ac_unrecognized_sep=', ';;
2160    esac
2161    eval with_$ac_useropt=no ;;
2162
2163  --x)
2164    # Obsolete; use --with-x.
2165    with_x=yes ;;
2166
2167  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2168  | --x-incl | --x-inc | --x-in | --x-i)
2169    ac_prev=x_includes ;;
2170  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2171  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2172    x_includes=$ac_optarg ;;
2173
2174  -x-libraries | --x-libraries | --x-librarie | --x-librari \
2175  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2176    ac_prev=x_libraries ;;
2177  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2178  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2179    x_libraries=$ac_optarg ;;
2180
2181  -*) as_fn_error $? "unrecognized option: \`$ac_option'
2182Try \`$0 --help' for more information"
2183    ;;
2184
2185  *=*)
2186    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2187    # Reject names that are not valid shell variable names.
2188    case $ac_envvar in #(
2189      '' | [0-9]* | *[!_$as_cr_alnum]* )
2190      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2191    esac
2192    eval $ac_envvar=\$ac_optarg
2193    export $ac_envvar ;;
2194
2195  *)
2196    # FIXME: should be removed in autoconf 3.0.
2197    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2198    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2199      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
2200    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2201    ;;
2202
2203  esac
2204done
2205
2206if test -n "$ac_prev"; then
2207  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2208  as_fn_error $? "missing argument to $ac_option"
2209fi
2210
2211if test -n "$ac_unrecognized_opts"; then
2212  case $enable_option_checking in
2213    no) ;;
2214    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2215    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2216  esac
2217fi
2218
2219# Check all directory arguments for consistency.
2220for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
2221		datadir sysconfdir sharedstatedir localstatedir includedir \
2222		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2223		libdir localedir mandir
2224do
2225  eval ac_val=\$$ac_var
2226  # Remove trailing slashes.
2227  case $ac_val in
2228    */ )
2229      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2230      eval $ac_var=\$ac_val;;
2231  esac
2232  # Be sure to have absolute directory names.
2233  case $ac_val in
2234    [\\/$]* | ?:[\\/]* )  continue;;
2235    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2236  esac
2237  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2238done
2239
2240# There might be people who depend on the old broken behavior: `$host'
2241# used to hold the argument of --host etc.
2242# FIXME: To remove some day.
2243build=$build_alias
2244host=$host_alias
2245target=$target_alias
2246
2247# FIXME: To remove some day.
2248if test "x$host_alias" != x; then
2249  if test "x$build_alias" = x; then
2250    cross_compiling=maybe
2251  elif test "x$build_alias" != "x$host_alias"; then
2252    cross_compiling=yes
2253  fi
2254fi
2255
2256ac_tool_prefix=
2257test -n "$host_alias" && ac_tool_prefix=$host_alias-
2258
2259test "$silent" = yes && exec 6>/dev/null
2260
2261
2262ac_pwd=`pwd` && test -n "$ac_pwd" &&
2263ac_ls_di=`ls -di .` &&
2264ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2265  as_fn_error $? "working directory cannot be determined"
2266test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2267  as_fn_error $? "pwd does not report name of working directory"
2268
2269
2270# Find the source files, if location was not specified.
2271if test -z "$srcdir"; then
2272  ac_srcdir_defaulted=yes
2273  # Try the directory containing this script, then the parent directory.
2274  ac_confdir=`$as_dirname -- "$as_myself" ||
2275$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2276	 X"$as_myself" : 'X\(//\)[^/]' \| \
2277	 X"$as_myself" : 'X\(//\)$' \| \
2278	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2279$as_echo X"$as_myself" |
2280    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2281	    s//\1/
2282	    q
2283	  }
2284	  /^X\(\/\/\)[^/].*/{
2285	    s//\1/
2286	    q
2287	  }
2288	  /^X\(\/\/\)$/{
2289	    s//\1/
2290	    q
2291	  }
2292	  /^X\(\/\).*/{
2293	    s//\1/
2294	    q
2295	  }
2296	  s/.*/./; q'`
2297  srcdir=$ac_confdir
2298  if test ! -r "$srcdir/$ac_unique_file"; then
2299    srcdir=..
2300  fi
2301else
2302  ac_srcdir_defaulted=no
2303fi
2304if test ! -r "$srcdir/$ac_unique_file"; then
2305  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2306  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2307fi
2308ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2309ac_abs_confdir=`(
2310	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2311	pwd)`
2312# When building in place, set srcdir=.
2313if test "$ac_abs_confdir" = "$ac_pwd"; then
2314  srcdir=.
2315fi
2316# Remove unnecessary trailing slashes from srcdir.
2317# Double slashes in file names in object file debugging info
2318# mess up M-x gdb in Emacs.
2319case $srcdir in
2320*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2321esac
2322for ac_var in $ac_precious_vars; do
2323  eval ac_env_${ac_var}_set=\${${ac_var}+set}
2324  eval ac_env_${ac_var}_value=\$${ac_var}
2325  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2326  eval ac_cv_env_${ac_var}_value=\$${ac_var}
2327done
2328
2329#
2330# Report the --help message.
2331#
2332if test "$ac_init_help" = "long"; then
2333  # Omit some internal or obsolete options to make the list less imposing.
2334  # This message is too long to be a string in the A/UX 3.1 sh.
2335  cat <<_ACEOF
2336\`configure' configures GNU tar 1.34 to adapt to many kinds of systems.
2337
2338Usage: $0 [OPTION]... [VAR=VALUE]...
2339
2340To assign environment variables (e.g., CC, CFLAGS...), specify them as
2341VAR=VALUE.  See below for descriptions of some of the useful variables.
2342
2343Defaults for the options are specified in brackets.
2344
2345Configuration:
2346  -h, --help              display this help and exit
2347      --help=short        display options specific to this package
2348      --help=recursive    display the short help of all the included packages
2349  -V, --version           display version information and exit
2350  -q, --quiet, --silent   do not print \`checking ...' messages
2351      --cache-file=FILE   cache test results in FILE [disabled]
2352  -C, --config-cache      alias for \`--cache-file=config.cache'
2353  -n, --no-create         do not create output files
2354      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
2355
2356Installation directories:
2357  --prefix=PREFIX         install architecture-independent files in PREFIX
2358                          [$ac_default_prefix]
2359  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
2360                          [PREFIX]
2361
2362By default, \`make install' will install all the files in
2363\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
2364an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2365for instance \`--prefix=\$HOME'.
2366
2367For better control, use the options below.
2368
2369Fine tuning of the installation directories:
2370  --bindir=DIR            user executables [EPREFIX/bin]
2371  --sbindir=DIR           system admin executables [EPREFIX/sbin]
2372  --libexecdir=DIR        program executables [EPREFIX/libexec]
2373  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
2374  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
2375  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
2376  --libdir=DIR            object code libraries [EPREFIX/lib]
2377  --includedir=DIR        C header files [PREFIX/include]
2378  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
2379  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
2380  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
2381  --infodir=DIR           info documentation [DATAROOTDIR/info]
2382  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
2383  --mandir=DIR            man documentation [DATAROOTDIR/man]
2384  --docdir=DIR            documentation root [DATAROOTDIR/doc/tar]
2385  --htmldir=DIR           html documentation [DOCDIR]
2386  --dvidir=DIR            dvi documentation [DOCDIR]
2387  --pdfdir=DIR            pdf documentation [DOCDIR]
2388  --psdir=DIR             ps documentation [DOCDIR]
2389_ACEOF
2390
2391  cat <<\_ACEOF
2392
2393Program names:
2394  --program-prefix=PREFIX            prepend PREFIX to installed program names
2395  --program-suffix=SUFFIX            append SUFFIX to installed program names
2396  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
2397
2398System types:
2399  --build=BUILD     configure for building on BUILD [guessed]
2400  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
2401_ACEOF
2402fi
2403
2404if test -n "$ac_init_help"; then
2405  case $ac_init_help in
2406     short | recursive ) echo "Configuration of GNU tar 1.34:";;
2407   esac
2408  cat <<\_ACEOF
2409
2410Optional Features:
2411  --disable-option-checking  ignore unrecognized --enable/--with options
2412  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
2413  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
2414  --enable-silent-rules   less verbose build output (undo: "make V=1")
2415  --disable-silent-rules  verbose build output (undo: "make V=0")
2416  --enable-dependency-tracking
2417                          do not reject slow dependency extractors
2418  --disable-dependency-tracking
2419                          speeds up one-time build
2420  --disable-largefile     omit support for large files
2421  --enable-cross-guesses={conservative|risky}
2422                          specify policy for cross-compilation guesses
2423  --disable-acl           do not support ACLs
2424  --enable-gcc-warnings   turn on many GCC warnings (for developers; best with
2425                          GNU make)
2426  --disable-rpath         do not hardcode runtime library paths
2427  --disable-nls           do not use Native Language Support
2428  --enable-backup-scripts Create and install backup and restore scripts
2429
2430Optional Packages:
2431  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2432  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2433  --without-posix-acls    do not use POSIX.1e access control lists
2434  --without-included-regex
2435                          don't compile regex; this is the default on systems
2436                          with recent-enough versions of the GNU C Library
2437                          (use with caution on other systems).
2438  --without-selinux       do not use SELinux, even on systems with SELinux
2439  --with-packager         String identifying the packager of this software
2440  --with-packager-version Packager-specific version information
2441  --with-packager-bug-reports
2442                          Packager info for bug reports (URL/e-mail/...)
2443  --with-rmt=FILE         Use FILE as the default `rmt' program. Do not build
2444                          included copy of `rmt'.
2445  --without-xattrs        don't use linux extended attributes
2446  --with-compress=PROG    use PROG as compress compressor program
2447  --with-gzip=PROG        use PROG as gzip compressor program
2448  --with-bzip2=PROG       use PROG as bzip2 compressor program
2449  --with-lzip=PROG        use PROG as lzip compressor program
2450  --with-lzma=PROG        use PROG as lzma compressor program
2451  --with-lzop=PROG        use PROG as lzop compressor program
2452  --with-xz=PROG          use PROG as xz compressor program
2453  --with-zstd=PROG        use PROG as zstd compressor program
2454  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
2455  --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
2456  --without-libiconv-prefix     don't search for libiconv in includedir and libdir
2457  --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
2458  --without-libintl-prefix     don't search for libintl in includedir and libdir
2459
2460Some influential environment variables:
2461  CC          C compiler command
2462  CFLAGS      C compiler flags
2463  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2464              nonstandard directory <lib dir>
2465  LIBS        libraries to pass to the linker, e.g. -l<library>
2466  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2467              you have headers in a nonstandard directory <include dir>
2468  YACC        The `Yet Another Compiler Compiler' implementation to use.
2469              Defaults to the first program found out of: `bison -y', `byacc',
2470              `yacc'.
2471  YFLAGS      The list of arguments that will be passed by default to $YACC.
2472              This script will default YFLAGS to the empty string to avoid a
2473              default value of `-d' given by some make applications.
2474  CPP         C preprocessor
2475  DEFAULT_RMT_DIR
2476              Define full file name of the directory where to install `rmt'.
2477              (default: $(libexecdir))
2478  RSH         Configure absolute path to default remote shell binary
2479  DEFAULT_ARCHIVE_FORMAT
2480              Set the default archive format. Allowed values are: V7, OLDGNU,
2481              USTAR, POSIX, GNU. Default is GNU
2482  DEFAULT_ARCHIVE
2483              Set the name of the default archive (default: -)
2484  DEFAULT_BLOCKING
2485              Define default blocking factor (default: 20)
2486  DEFAULT_QUOTING_STYLE
2487              Set the default quoting style. Allowed values are: literal,
2488              shell, shell-always, c, escape, locale, clocale . Default is
2489              "escape".
2490
2491Use these variables to override the choices made by `configure' or to help
2492it to find libraries and programs with nonstandard names/locations.
2493
2494Report bugs to <bug-tar@gnu.org>.
2495GNU tar home page: <http://www.gnu.org/software/tar/>.
2496General help using GNU software: <http://www.gnu.org/gethelp/>.
2497_ACEOF
2498ac_status=$?
2499fi
2500
2501if test "$ac_init_help" = "recursive"; then
2502  # If there are subdirs, report their specific --help.
2503  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2504    test -d "$ac_dir" ||
2505      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2506      continue
2507    ac_builddir=.
2508
2509case "$ac_dir" in
2510.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2511*)
2512  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2513  # A ".." for each directory in $ac_dir_suffix.
2514  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2515  case $ac_top_builddir_sub in
2516  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2517  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2518  esac ;;
2519esac
2520ac_abs_top_builddir=$ac_pwd
2521ac_abs_builddir=$ac_pwd$ac_dir_suffix
2522# for backward compatibility:
2523ac_top_builddir=$ac_top_build_prefix
2524
2525case $srcdir in
2526  .)  # We are building in place.
2527    ac_srcdir=.
2528    ac_top_srcdir=$ac_top_builddir_sub
2529    ac_abs_top_srcdir=$ac_pwd ;;
2530  [\\/]* | ?:[\\/]* )  # Absolute name.
2531    ac_srcdir=$srcdir$ac_dir_suffix;
2532    ac_top_srcdir=$srcdir
2533    ac_abs_top_srcdir=$srcdir ;;
2534  *) # Relative name.
2535    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2536    ac_top_srcdir=$ac_top_build_prefix$srcdir
2537    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2538esac
2539ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2540
2541    cd "$ac_dir" || { ac_status=$?; continue; }
2542    # Check for guested configure.
2543    if test -f "$ac_srcdir/configure.gnu"; then
2544      echo &&
2545      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2546    elif test -f "$ac_srcdir/configure"; then
2547      echo &&
2548      $SHELL "$ac_srcdir/configure" --help=recursive
2549    else
2550      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2551    fi || ac_status=$?
2552    cd "$ac_pwd" || { ac_status=$?; break; }
2553  done
2554fi
2555
2556test -n "$ac_init_help" && exit $ac_status
2557if $ac_init_version; then
2558  cat <<\_ACEOF
2559GNU tar configure 1.34
2560generated by GNU Autoconf 2.69
2561
2562Copyright (C) 2012 Free Software Foundation, Inc.
2563This configure script is free software; the Free Software Foundation
2564gives unlimited permission to copy, distribute and modify it.
2565_ACEOF
2566  exit
2567fi
2568
2569## ------------------------ ##
2570## Autoconf initialization. ##
2571## ------------------------ ##
2572
2573# ac_fn_c_try_compile LINENO
2574# --------------------------
2575# Try to compile conftest.$ac_ext, and return whether this succeeded.
2576ac_fn_c_try_compile ()
2577{
2578  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2579  rm -f conftest.$ac_objext
2580  if { { ac_try="$ac_compile"
2581case "(($ac_try" in
2582  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2583  *) ac_try_echo=$ac_try;;
2584esac
2585eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2586$as_echo "$ac_try_echo"; } >&5
2587  (eval "$ac_compile") 2>conftest.err
2588  ac_status=$?
2589  if test -s conftest.err; then
2590    grep -v '^ *+' conftest.err >conftest.er1
2591    cat conftest.er1 >&5
2592    mv -f conftest.er1 conftest.err
2593  fi
2594  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2595  test $ac_status = 0; } && {
2596	 test -z "$ac_c_werror_flag" ||
2597	 test ! -s conftest.err
2598       } && test -s conftest.$ac_objext; then :
2599  ac_retval=0
2600else
2601  $as_echo "$as_me: failed program was:" >&5
2602sed 's/^/| /' conftest.$ac_ext >&5
2603
2604	ac_retval=1
2605fi
2606  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2607  as_fn_set_status $ac_retval
2608
2609} # ac_fn_c_try_compile
2610
2611# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2612# -------------------------------------------------------
2613# Tests whether HEADER exists and can be compiled using the include files in
2614# INCLUDES, setting the cache variable VAR accordingly.
2615ac_fn_c_check_header_compile ()
2616{
2617  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2618  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2619$as_echo_n "checking for $2... " >&6; }
2620if eval \${$3+:} false; then :
2621  $as_echo_n "(cached) " >&6
2622else
2623  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2624/* end confdefs.h.  */
2625$4
2626#include <$2>
2627_ACEOF
2628if ac_fn_c_try_compile "$LINENO"; then :
2629  eval "$3=yes"
2630else
2631  eval "$3=no"
2632fi
2633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2634fi
2635eval ac_res=\$$3
2636	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2637$as_echo "$ac_res" >&6; }
2638  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2639
2640} # ac_fn_c_check_header_compile
2641
2642# ac_fn_c_try_cpp LINENO
2643# ----------------------
2644# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2645ac_fn_c_try_cpp ()
2646{
2647  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2648  if { { ac_try="$ac_cpp conftest.$ac_ext"
2649case "(($ac_try" in
2650  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2651  *) ac_try_echo=$ac_try;;
2652esac
2653eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2654$as_echo "$ac_try_echo"; } >&5
2655  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2656  ac_status=$?
2657  if test -s conftest.err; then
2658    grep -v '^ *+' conftest.err >conftest.er1
2659    cat conftest.er1 >&5
2660    mv -f conftest.er1 conftest.err
2661  fi
2662  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2663  test $ac_status = 0; } > conftest.i && {
2664	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2665	 test ! -s conftest.err
2666       }; then :
2667  ac_retval=0
2668else
2669  $as_echo "$as_me: failed program was:" >&5
2670sed 's/^/| /' conftest.$ac_ext >&5
2671
2672    ac_retval=1
2673fi
2674  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2675  as_fn_set_status $ac_retval
2676
2677} # ac_fn_c_try_cpp
2678
2679# ac_fn_c_try_run LINENO
2680# ----------------------
2681# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2682# that executables *can* be run.
2683ac_fn_c_try_run ()
2684{
2685  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2686  if { { ac_try="$ac_link"
2687case "(($ac_try" in
2688  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2689  *) ac_try_echo=$ac_try;;
2690esac
2691eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2692$as_echo "$ac_try_echo"; } >&5
2693  (eval "$ac_link") 2>&5
2694  ac_status=$?
2695  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2696  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2697  { { case "(($ac_try" in
2698  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2699  *) ac_try_echo=$ac_try;;
2700esac
2701eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2702$as_echo "$ac_try_echo"; } >&5
2703  (eval "$ac_try") 2>&5
2704  ac_status=$?
2705  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2706  test $ac_status = 0; }; }; then :
2707  ac_retval=0
2708else
2709  $as_echo "$as_me: program exited with status $ac_status" >&5
2710       $as_echo "$as_me: failed program was:" >&5
2711sed 's/^/| /' conftest.$ac_ext >&5
2712
2713       ac_retval=$ac_status
2714fi
2715  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2716  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2717  as_fn_set_status $ac_retval
2718
2719} # ac_fn_c_try_run
2720
2721# ac_fn_c_try_link LINENO
2722# -----------------------
2723# Try to link conftest.$ac_ext, and return whether this succeeded.
2724ac_fn_c_try_link ()
2725{
2726  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2727  rm -f conftest.$ac_objext conftest$ac_exeext
2728  if { { ac_try="$ac_link"
2729case "(($ac_try" in
2730  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2731  *) ac_try_echo=$ac_try;;
2732esac
2733eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2734$as_echo "$ac_try_echo"; } >&5
2735  (eval "$ac_link") 2>conftest.err
2736  ac_status=$?
2737  if test -s conftest.err; then
2738    grep -v '^ *+' conftest.err >conftest.er1
2739    cat conftest.er1 >&5
2740    mv -f conftest.er1 conftest.err
2741  fi
2742  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2743  test $ac_status = 0; } && {
2744	 test -z "$ac_c_werror_flag" ||
2745	 test ! -s conftest.err
2746       } && test -s conftest$ac_exeext && {
2747	 test "$cross_compiling" = yes ||
2748	 test -x conftest$ac_exeext
2749       }; then :
2750  ac_retval=0
2751else
2752  $as_echo "$as_me: failed program was:" >&5
2753sed 's/^/| /' conftest.$ac_ext >&5
2754
2755	ac_retval=1
2756fi
2757  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2758  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2759  # interfere with the next link command; also delete a directory that is
2760  # left behind by Apple's compiler.  We do this before executing the actions.
2761  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2762  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2763  as_fn_set_status $ac_retval
2764
2765} # ac_fn_c_try_link
2766
2767# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2768# -------------------------------------------------------
2769# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2770# the include files in INCLUDES and setting the cache variable VAR
2771# accordingly.
2772ac_fn_c_check_header_mongrel ()
2773{
2774  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2775  if eval \${$3+:} false; then :
2776  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2777$as_echo_n "checking for $2... " >&6; }
2778if eval \${$3+:} false; then :
2779  $as_echo_n "(cached) " >&6
2780fi
2781eval ac_res=\$$3
2782	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2783$as_echo "$ac_res" >&6; }
2784else
2785  # Is the header compilable?
2786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2787$as_echo_n "checking $2 usability... " >&6; }
2788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2789/* end confdefs.h.  */
2790$4
2791#include <$2>
2792_ACEOF
2793if ac_fn_c_try_compile "$LINENO"; then :
2794  ac_header_compiler=yes
2795else
2796  ac_header_compiler=no
2797fi
2798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2800$as_echo "$ac_header_compiler" >&6; }
2801
2802# Is the header present?
2803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2804$as_echo_n "checking $2 presence... " >&6; }
2805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2806/* end confdefs.h.  */
2807#include <$2>
2808_ACEOF
2809if ac_fn_c_try_cpp "$LINENO"; then :
2810  ac_header_preproc=yes
2811else
2812  ac_header_preproc=no
2813fi
2814rm -f conftest.err conftest.i conftest.$ac_ext
2815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2816$as_echo "$ac_header_preproc" >&6; }
2817
2818# So?  What about this header?
2819case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2820  yes:no: )
2821    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2822$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2823    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2824$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2825    ;;
2826  no:yes:* )
2827    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2828$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2829    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2830$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2831    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2832$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2833    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2834$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2835    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2836$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2837( $as_echo "## ------------------------------ ##
2838## Report this to bug-tar@gnu.org ##
2839## ------------------------------ ##"
2840     ) | sed "s/^/$as_me: WARNING:     /" >&2
2841    ;;
2842esac
2843  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2844$as_echo_n "checking for $2... " >&6; }
2845if eval \${$3+:} false; then :
2846  $as_echo_n "(cached) " >&6
2847else
2848  eval "$3=\$ac_header_compiler"
2849fi
2850eval ac_res=\$$3
2851	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2852$as_echo "$ac_res" >&6; }
2853fi
2854  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2855
2856} # ac_fn_c_check_header_mongrel
2857
2858# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2859# -------------------------------------------
2860# Tests whether TYPE exists after having included INCLUDES, setting cache
2861# variable VAR accordingly.
2862ac_fn_c_check_type ()
2863{
2864  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2865  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2866$as_echo_n "checking for $2... " >&6; }
2867if eval \${$3+:} false; then :
2868  $as_echo_n "(cached) " >&6
2869else
2870  eval "$3=no"
2871  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2872/* end confdefs.h.  */
2873$4
2874int
2875main ()
2876{
2877if (sizeof ($2))
2878	 return 0;
2879  ;
2880  return 0;
2881}
2882_ACEOF
2883if ac_fn_c_try_compile "$LINENO"; then :
2884  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2885/* end confdefs.h.  */
2886$4
2887int
2888main ()
2889{
2890if (sizeof (($2)))
2891	    return 0;
2892  ;
2893  return 0;
2894}
2895_ACEOF
2896if ac_fn_c_try_compile "$LINENO"; then :
2897
2898else
2899  eval "$3=yes"
2900fi
2901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2902fi
2903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2904fi
2905eval ac_res=\$$3
2906	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2907$as_echo "$ac_res" >&6; }
2908  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2909
2910} # ac_fn_c_check_type
2911
2912# ac_fn_c_check_func LINENO FUNC VAR
2913# ----------------------------------
2914# Tests whether FUNC exists, setting the cache variable VAR accordingly
2915ac_fn_c_check_func ()
2916{
2917  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2918  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2919$as_echo_n "checking for $2... " >&6; }
2920if eval \${$3+:} false; then :
2921  $as_echo_n "(cached) " >&6
2922else
2923  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2924/* end confdefs.h.  */
2925/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2926   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2927#define $2 innocuous_$2
2928
2929/* System header to define __stub macros and hopefully few prototypes,
2930    which can conflict with char $2 (); below.
2931    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2932    <limits.h> exists even on freestanding compilers.  */
2933
2934#ifdef __STDC__
2935# include <limits.h>
2936#else
2937# include <assert.h>
2938#endif
2939
2940#undef $2
2941
2942/* Override any GCC internal prototype to avoid an error.
2943   Use char because int might match the return type of a GCC
2944   builtin and then its argument prototype would still apply.  */
2945#ifdef __cplusplus
2946extern "C"
2947#endif
2948char $2 ();
2949/* The GNU C library defines this for functions which it implements
2950    to always fail with ENOSYS.  Some functions are actually named
2951    something starting with __ and the normal name is an alias.  */
2952#if defined __stub_$2 || defined __stub___$2
2953choke me
2954#endif
2955
2956int
2957main ()
2958{
2959return $2 ();
2960  ;
2961  return 0;
2962}
2963_ACEOF
2964if ac_fn_c_try_link "$LINENO"; then :
2965  eval "$3=yes"
2966else
2967  eval "$3=no"
2968fi
2969rm -f core conftest.err conftest.$ac_objext \
2970    conftest$ac_exeext conftest.$ac_ext
2971fi
2972eval ac_res=\$$3
2973	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2974$as_echo "$ac_res" >&6; }
2975  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2976
2977} # ac_fn_c_check_func
2978
2979# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2980# ---------------------------------------------
2981# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2982# accordingly.
2983ac_fn_c_check_decl ()
2984{
2985  ac_save_ac_compile="$ac_compile"
2986  if test -n "$ac_compile_for_check_decl"; then
2987    ac_compile="$ac_compile_for_check_decl"
2988  fi
2989  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2990  as_decl_name=`echo $2|sed 's/ *(.*//'`
2991  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2992  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2993$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2994if eval \${$3+:} false; then :
2995  $as_echo_n "(cached) " >&6
2996else
2997  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2998/* end confdefs.h.  */
2999$4
3000int
3001main ()
3002{
3003#ifndef $as_decl_name
3004#ifdef __cplusplus
3005  (void) $as_decl_use;
3006#else
3007  (void) $as_decl_name;
3008#endif
3009#endif
3010
3011  ;
3012  return 0;
3013}
3014_ACEOF
3015if ac_fn_c_try_compile "$LINENO"; then :
3016  eval "$3=yes"
3017else
3018  eval "$3=no"
3019fi
3020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3021fi
3022eval ac_res=\$$3
3023	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3024$as_echo "$ac_res" >&6; }
3025  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3026  ac_compile="$ac_save_ac_compile"
3027
3028} # ac_fn_c_check_decl
3029
3030# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
3031# --------------------------------------------
3032# Tries to find the compile-time value of EXPR in a program that includes
3033# INCLUDES, setting VAR accordingly. Returns whether the value could be
3034# computed
3035ac_fn_c_compute_int ()
3036{
3037  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3038  if test "$cross_compiling" = yes; then
3039    # Depending upon the size, compute the lo and hi bounds.
3040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3041/* end confdefs.h.  */
3042$4
3043int
3044main ()
3045{
3046static int test_array [1 - 2 * !(($2) >= 0)];
3047test_array [0] = 0;
3048return test_array [0];
3049
3050  ;
3051  return 0;
3052}
3053_ACEOF
3054if ac_fn_c_try_compile "$LINENO"; then :
3055  ac_lo=0 ac_mid=0
3056  while :; do
3057    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3058/* end confdefs.h.  */
3059$4
3060int
3061main ()
3062{
3063static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3064test_array [0] = 0;
3065return test_array [0];
3066
3067  ;
3068  return 0;
3069}
3070_ACEOF
3071if ac_fn_c_try_compile "$LINENO"; then :
3072  ac_hi=$ac_mid; break
3073else
3074  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
3075			if test $ac_lo -le $ac_mid; then
3076			  ac_lo= ac_hi=
3077			  break
3078			fi
3079			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
3080fi
3081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3082  done
3083else
3084  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3085/* end confdefs.h.  */
3086$4
3087int
3088main ()
3089{
3090static int test_array [1 - 2 * !(($2) < 0)];
3091test_array [0] = 0;
3092return test_array [0];
3093
3094  ;
3095  return 0;
3096}
3097_ACEOF
3098if ac_fn_c_try_compile "$LINENO"; then :
3099  ac_hi=-1 ac_mid=-1
3100  while :; do
3101    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3102/* end confdefs.h.  */
3103$4
3104int
3105main ()
3106{
3107static int test_array [1 - 2 * !(($2) >= $ac_mid)];
3108test_array [0] = 0;
3109return test_array [0];
3110
3111  ;
3112  return 0;
3113}
3114_ACEOF
3115if ac_fn_c_try_compile "$LINENO"; then :
3116  ac_lo=$ac_mid; break
3117else
3118  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
3119			if test $ac_mid -le $ac_hi; then
3120			  ac_lo= ac_hi=
3121			  break
3122			fi
3123			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
3124fi
3125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3126  done
3127else
3128  ac_lo= ac_hi=
3129fi
3130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3131fi
3132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3133# Binary search between lo and hi bounds.
3134while test "x$ac_lo" != "x$ac_hi"; do
3135  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3136  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3137/* end confdefs.h.  */
3138$4
3139int
3140main ()
3141{
3142static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3143test_array [0] = 0;
3144return test_array [0];
3145
3146  ;
3147  return 0;
3148}
3149_ACEOF
3150if ac_fn_c_try_compile "$LINENO"; then :
3151  ac_hi=$ac_mid
3152else
3153  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3154fi
3155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3156done
3157case $ac_lo in #((
3158?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3159'') ac_retval=1 ;;
3160esac
3161  else
3162    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3163/* end confdefs.h.  */
3164$4
3165static long int longval () { return $2; }
3166static unsigned long int ulongval () { return $2; }
3167#include <stdio.h>
3168#include <stdlib.h>
3169int
3170main ()
3171{
3172
3173  FILE *f = fopen ("conftest.val", "w");
3174  if (! f)
3175    return 1;
3176  if (($2) < 0)
3177    {
3178      long int i = longval ();
3179      if (i != ($2))
3180	return 1;
3181      fprintf (f, "%ld", i);
3182    }
3183  else
3184    {
3185      unsigned long int i = ulongval ();
3186      if (i != ($2))
3187	return 1;
3188      fprintf (f, "%lu", i);
3189    }
3190  /* Do not output a trailing newline, as this causes \r\n confusion
3191     on some platforms.  */
3192  return ferror (f) || fclose (f) != 0;
3193
3194  ;
3195  return 0;
3196}
3197_ACEOF
3198if ac_fn_c_try_run "$LINENO"; then :
3199  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3200else
3201  ac_retval=1
3202fi
3203rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3204  conftest.$ac_objext conftest.beam conftest.$ac_ext
3205rm -f conftest.val
3206
3207  fi
3208  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3209  as_fn_set_status $ac_retval
3210
3211} # ac_fn_c_compute_int
3212
3213# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3214# ----------------------------------------------------
3215# Tries to find if the field MEMBER exists in type AGGR, after including
3216# INCLUDES, setting cache variable VAR accordingly.
3217ac_fn_c_check_member ()
3218{
3219  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3220  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3221$as_echo_n "checking for $2.$3... " >&6; }
3222if eval \${$4+:} false; then :
3223  $as_echo_n "(cached) " >&6
3224else
3225  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3226/* end confdefs.h.  */
3227$5
3228int
3229main ()
3230{
3231static $2 ac_aggr;
3232if (ac_aggr.$3)
3233return 0;
3234  ;
3235  return 0;
3236}
3237_ACEOF
3238if ac_fn_c_try_compile "$LINENO"; then :
3239  eval "$4=yes"
3240else
3241  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3242/* end confdefs.h.  */
3243$5
3244int
3245main ()
3246{
3247static $2 ac_aggr;
3248if (sizeof ac_aggr.$3)
3249return 0;
3250  ;
3251  return 0;
3252}
3253_ACEOF
3254if ac_fn_c_try_compile "$LINENO"; then :
3255  eval "$4=yes"
3256else
3257  eval "$4=no"
3258fi
3259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3260fi
3261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3262fi
3263eval ac_res=\$$4
3264	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3265$as_echo "$ac_res" >&6; }
3266  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3267
3268} # ac_fn_c_check_member
3269cat >config.log <<_ACEOF
3270This file contains any messages produced by compilers while
3271running configure, to aid debugging if configure makes a mistake.
3272
3273It was created by GNU tar $as_me 1.34, which was
3274generated by GNU Autoconf 2.69.  Invocation command line was
3275
3276  $ $0 $@
3277
3278_ACEOF
3279exec 5>>config.log
3280{
3281cat <<_ASUNAME
3282## --------- ##
3283## Platform. ##
3284## --------- ##
3285
3286hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3287uname -m = `(uname -m) 2>/dev/null || echo unknown`
3288uname -r = `(uname -r) 2>/dev/null || echo unknown`
3289uname -s = `(uname -s) 2>/dev/null || echo unknown`
3290uname -v = `(uname -v) 2>/dev/null || echo unknown`
3291
3292/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3293/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3294
3295/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3296/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3297/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3298/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3299/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3300/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3301/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3302
3303_ASUNAME
3304
3305as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3306for as_dir in $PATH
3307do
3308  IFS=$as_save_IFS
3309  test -z "$as_dir" && as_dir=.
3310    $as_echo "PATH: $as_dir"
3311  done
3312IFS=$as_save_IFS
3313
3314} >&5
3315
3316cat >&5 <<_ACEOF
3317
3318
3319## ----------- ##
3320## Core tests. ##
3321## ----------- ##
3322
3323_ACEOF
3324
3325
3326# Keep a trace of the command line.
3327# Strip out --no-create and --no-recursion so they do not pile up.
3328# Strip out --silent because we don't want to record it for future runs.
3329# Also quote any args containing shell meta-characters.
3330# Make two passes to allow for proper duplicate-argument suppression.
3331ac_configure_args=
3332ac_configure_args0=
3333ac_configure_args1=
3334ac_must_keep_next=false
3335for ac_pass in 1 2
3336do
3337  for ac_arg
3338  do
3339    case $ac_arg in
3340    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3341    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3342    | -silent | --silent | --silen | --sile | --sil)
3343      continue ;;
3344    *\'*)
3345      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3346    esac
3347    case $ac_pass in
3348    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3349    2)
3350      as_fn_append ac_configure_args1 " '$ac_arg'"
3351      if test $ac_must_keep_next = true; then
3352	ac_must_keep_next=false # Got value, back to normal.
3353      else
3354	case $ac_arg in
3355	  *=* | --config-cache | -C | -disable-* | --disable-* \
3356	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3357	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3358	  | -with-* | --with-* | -without-* | --without-* | --x)
3359	    case "$ac_configure_args0 " in
3360	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3361	    esac
3362	    ;;
3363	  -* ) ac_must_keep_next=true ;;
3364	esac
3365      fi
3366      as_fn_append ac_configure_args " '$ac_arg'"
3367      ;;
3368    esac
3369  done
3370done
3371{ ac_configure_args0=; unset ac_configure_args0;}
3372{ ac_configure_args1=; unset ac_configure_args1;}
3373
3374# When interrupted or exit'd, cleanup temporary files, and complete
3375# config.log.  We remove comments because anyway the quotes in there
3376# would cause problems or look ugly.
3377# WARNING: Use '\'' to represent an apostrophe within the trap.
3378# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3379trap 'exit_status=$?
3380  # Save into config.log some information that might help in debugging.
3381  {
3382    echo
3383
3384    $as_echo "## ---------------- ##
3385## Cache variables. ##
3386## ---------------- ##"
3387    echo
3388    # The following way of writing the cache mishandles newlines in values,
3389(
3390  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3391    eval ac_val=\$$ac_var
3392    case $ac_val in #(
3393    *${as_nl}*)
3394      case $ac_var in #(
3395      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3396$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3397      esac
3398      case $ac_var in #(
3399      _ | IFS | as_nl) ;; #(
3400      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3401      *) { eval $ac_var=; unset $ac_var;} ;;
3402      esac ;;
3403    esac
3404  done
3405  (set) 2>&1 |
3406    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3407    *${as_nl}ac_space=\ *)
3408      sed -n \
3409	"s/'\''/'\''\\\\'\'''\''/g;
3410	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3411      ;; #(
3412    *)
3413      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3414      ;;
3415    esac |
3416    sort
3417)
3418    echo
3419
3420    $as_echo "## ----------------- ##
3421## Output variables. ##
3422## ----------------- ##"
3423    echo
3424    for ac_var in $ac_subst_vars
3425    do
3426      eval ac_val=\$$ac_var
3427      case $ac_val in
3428      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3429      esac
3430      $as_echo "$ac_var='\''$ac_val'\''"
3431    done | sort
3432    echo
3433
3434    if test -n "$ac_subst_files"; then
3435      $as_echo "## ------------------- ##
3436## File substitutions. ##
3437## ------------------- ##"
3438      echo
3439      for ac_var in $ac_subst_files
3440      do
3441	eval ac_val=\$$ac_var
3442	case $ac_val in
3443	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3444	esac
3445	$as_echo "$ac_var='\''$ac_val'\''"
3446      done | sort
3447      echo
3448    fi
3449
3450    if test -s confdefs.h; then
3451      $as_echo "## ----------- ##
3452## confdefs.h. ##
3453## ----------- ##"
3454      echo
3455      cat confdefs.h
3456      echo
3457    fi
3458    test "$ac_signal" != 0 &&
3459      $as_echo "$as_me: caught signal $ac_signal"
3460    $as_echo "$as_me: exit $exit_status"
3461  } >&5
3462  rm -f core *.core core.conftest.* &&
3463    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3464    exit $exit_status
3465' 0
3466for ac_signal in 1 2 13 15; do
3467  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3468done
3469ac_signal=0
3470
3471# confdefs.h avoids OS command line length limits that DEFS can exceed.
3472rm -f -r conftest* confdefs.h
3473
3474$as_echo "/* confdefs.h */" > confdefs.h
3475
3476# Predefined preprocessor variables.
3477
3478cat >>confdefs.h <<_ACEOF
3479#define PACKAGE_NAME "$PACKAGE_NAME"
3480_ACEOF
3481
3482cat >>confdefs.h <<_ACEOF
3483#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3484_ACEOF
3485
3486cat >>confdefs.h <<_ACEOF
3487#define PACKAGE_VERSION "$PACKAGE_VERSION"
3488_ACEOF
3489
3490cat >>confdefs.h <<_ACEOF
3491#define PACKAGE_STRING "$PACKAGE_STRING"
3492_ACEOF
3493
3494cat >>confdefs.h <<_ACEOF
3495#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3496_ACEOF
3497
3498cat >>confdefs.h <<_ACEOF
3499#define PACKAGE_URL "$PACKAGE_URL"
3500_ACEOF
3501
3502
3503# Let the site file select an alternate cache file if it wants to.
3504# Prefer an explicitly selected file to automatically selected ones.
3505ac_site_file1=NONE
3506ac_site_file2=NONE
3507if test -n "$CONFIG_SITE"; then
3508  # We do not want a PATH search for config.site.
3509  case $CONFIG_SITE in #((
3510    -*)  ac_site_file1=./$CONFIG_SITE;;
3511    */*) ac_site_file1=$CONFIG_SITE;;
3512    *)   ac_site_file1=./$CONFIG_SITE;;
3513  esac
3514elif test "x$prefix" != xNONE; then
3515  ac_site_file1=$prefix/share/config.site
3516  ac_site_file2=$prefix/etc/config.site
3517else
3518  ac_site_file1=$ac_default_prefix/share/config.site
3519  ac_site_file2=$ac_default_prefix/etc/config.site
3520fi
3521for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3522do
3523  test "x$ac_site_file" = xNONE && continue
3524  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3525    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3526$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3527    sed 's/^/| /' "$ac_site_file" >&5
3528    . "$ac_site_file" \
3529      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3530$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3531as_fn_error $? "failed to load site script $ac_site_file
3532See \`config.log' for more details" "$LINENO" 5; }
3533  fi
3534done
3535
3536if test -r "$cache_file"; then
3537  # Some versions of bash will fail to source /dev/null (special files
3538  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3539  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3540    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3541$as_echo "$as_me: loading cache $cache_file" >&6;}
3542    case $cache_file in
3543      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3544      *)                      . "./$cache_file";;
3545    esac
3546  fi
3547else
3548  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3549$as_echo "$as_me: creating cache $cache_file" >&6;}
3550  >$cache_file
3551fi
3552
3553as_fn_append ac_header_list " wchar.h"
3554as_fn_append ac_header_list " minix/config.h"
3555as_fn_append ac_header_list " fcntl.h"
3556as_fn_append ac_header_list " linux/fd.h"
3557as_fn_append ac_header_list " memory.h"
3558as_fn_append ac_header_list " net/errno.h"
3559as_fn_append ac_header_list " sgtty.h"
3560as_fn_append ac_header_list " string.h"
3561as_fn_append ac_header_list " sys/param.h"
3562as_fn_append ac_header_list " sys/device.h"
3563as_fn_append ac_header_list " sys/gentape.h"
3564as_fn_append ac_header_list " sys/inet.h"
3565as_fn_append ac_header_list " sys/io/trioctl.h"
3566as_fn_append ac_header_list " sys/mtio.h"
3567as_fn_append ac_header_list " sys/time.h"
3568as_fn_append ac_header_list " sys/tprintf.h"
3569as_fn_append ac_header_list " sys/tape.h"
3570as_fn_append ac_header_list " unistd.h"
3571as_fn_append ac_header_list " locale.h"
3572as_fn_append ac_header_list " sys/types.h"
3573as_fn_append ac_func_list " fchmod"
3574as_fn_append ac_func_list " flockfile"
3575as_fn_append ac_func_list " funlockfile"
3576as_fn_append ac_header_list " features.h"
3577as_fn_append ac_header_list " linewrap.h"
3578as_fn_append ac_func_list " pathconf"
3579as_fn_append ac_func_list " btowc"
3580as_fn_append ac_func_list " canonicalize_file_name"
3581as_fn_append ac_func_list " faccessat"
3582as_fn_append ac_func_list " realpath"
3583as_fn_append ac_func_list " readlinkat"
3584as_fn_append ac_func_list " chown"
3585as_fn_append ac_func_list " fchown"
3586as_fn_append ac_func_list " _set_invalid_parameter_handler"
3587as_fn_append ac_header_list " sys/socket.h"
3588as_fn_append ac_func_list " fchdir"
3589as_fn_append ac_header_list " dirent.h"
3590as_fn_append ac_func_list " fdopendir"
3591as_fn_append ac_func_list " fchmodat"
3592as_fn_append ac_func_list " lchmod"
3593as_fn_append ac_func_list " fcntl"
3594as_fn_append ac_func_list " symlink"
3595as_fn_append ac_func_list " mempcpy"
3596as_fn_append ac_header_list " fnmatch.h"
3597as_fn_append ac_func_list " fnmatch"
3598as_fn_append ac_func_list " mbsrtowcs"
3599gl_fnmatch_required=GNU
3600as_fn_append ac_header_list " stdio_ext.h"
3601as_fn_append ac_header_list " sys/stat.h"
3602as_fn_append ac_func_list " fstatat"
3603as_fn_append ac_func_list " futimens"
3604as_fn_append ac_func_list " getdelim"
3605as_fn_append ac_func_list " getdtablesize"
3606gl_getopt_required=GNU
3607as_fn_append ac_header_list " getopt.h"
3608as_fn_append ac_header_list " sys/cdefs.h"
3609as_fn_append ac_func_list " getprogname"
3610as_fn_append ac_func_list " getexecname"
3611as_fn_append ac_func_list " getrandom"
3612as_fn_append ac_func_list " gettimeofday"
3613as_fn_append ac_header_list " threads.h"
3614as_fn_append ac_header_list " limits.h"
3615as_fn_append ac_header_list " inttypes.h"
3616as_fn_append ac_header_list " stdint.h"
3617as_fn_append ac_func_list " isblank"
3618as_fn_append ac_func_list " iswcntrl"
3619as_fn_append ac_header_list " crtdefs.h"
3620as_fn_append ac_header_list " wctype.h"
3621as_fn_append ac_func_list " iswblank"
3622as_fn_append ac_header_list " langinfo.h"
3623as_fn_append ac_func_list " lstat"
3624as_fn_append ac_func_list " link"
3625as_fn_append ac_func_list " readlink"
3626as_fn_append ac_func_list " openat"
3627as_fn_append ac_func_list " linkat"
3628as_fn_append ac_header_list " xlocale.h"
3629as_fn_append ac_func_list " mbsinit"
3630as_fn_append ac_func_list " mbrtowc"
3631as_fn_append ac_header_list " sys/mman.h"
3632as_fn_append ac_func_list " mprotect"
3633as_fn_append ac_func_list " mkdirat"
3634as_fn_append ac_func_list " mkfifoat"
3635as_fn_append ac_func_list " mknodat"
3636as_fn_append ac_func_list " mknod"
3637as_fn_append ac_func_list " nl_langinfo"
3638as_fn_append ac_func_list " pipe"
3639as_fn_append ac_header_list " priv.h"
3640as_fn_append ac_header_list " malloc.h"
3641as_fn_append ac_func_list " iswctype"
3642as_fn_append ac_func_list " renameat"
3643as_fn_append ac_func_list " renameat2"
3644as_fn_append ac_header_list " selinux/selinux.h"
3645as_fn_append ac_func_list " setenv"
3646as_fn_append ac_func_list " sleep"
3647as_fn_append ac_func_list " snprintf"
3648as_fn_append ac_header_list " strings.h"
3649as_fn_append ac_func_list " strndup"
3650as_fn_append ac_func_list " strtoimax"
3651as_fn_append ac_func_list " strtoumax"
3652as_fn_append ac_func_list " symlinkat"
3653as_fn_append ac_header_list " sys/random.h"
3654as_fn_append ac_header_list " sysexits.h"
3655as_fn_append ac_func_list " localtime_r"
3656as_fn_append ac_func_list " timegm"
3657as_fn_append ac_func_list " unlinkat"
3658as_fn_append ac_header_list " utime.h"
3659as_fn_append ac_func_list " futimes"
3660as_fn_append ac_func_list " futimesat"
3661as_fn_append ac_func_list " utimensat"
3662as_fn_append ac_func_list " lutimes"
3663as_fn_append ac_func_list " vasnprintf"
3664as_fn_append ac_func_list " wcrtomb"
3665as_fn_append ac_func_list " wcwidth"
3666as_fn_append ac_func_list " wmempcpy"
3667as_fn_append ac_header_list " netdb.h"
3668as_fn_append ac_header_list " sys/wait.h"
3669as_fn_append ac_header_list " pwd.h"
3670as_fn_append ac_header_list " grp.h"
3671as_fn_append ac_func_list " mkfifo"
3672as_fn_append ac_func_list " setlocale"
3673as_fn_append ac_func_list " fsync"
3674gt_needs="$gt_needs need-formatstring-macros"
3675# Check that the precious variables saved in the cache have kept the same
3676# value.
3677ac_cache_corrupted=false
3678for ac_var in $ac_precious_vars; do
3679  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3680  eval ac_new_set=\$ac_env_${ac_var}_set
3681  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3682  eval ac_new_val=\$ac_env_${ac_var}_value
3683  case $ac_old_set,$ac_new_set in
3684    set,)
3685      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3686$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3687      ac_cache_corrupted=: ;;
3688    ,set)
3689      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3690$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3691      ac_cache_corrupted=: ;;
3692    ,);;
3693    *)
3694      if test "x$ac_old_val" != "x$ac_new_val"; then
3695	# differences in whitespace do not lead to failure.
3696	ac_old_val_w=`echo x $ac_old_val`
3697	ac_new_val_w=`echo x $ac_new_val`
3698	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3699	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3700$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3701	  ac_cache_corrupted=:
3702	else
3703	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3704$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3705	  eval $ac_var=\$ac_old_val
3706	fi
3707	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3708$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3709	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3710$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3711      fi;;
3712  esac
3713  # Pass precious variables to config.status.
3714  if test "$ac_new_set" = set; then
3715    case $ac_new_val in
3716    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3717    *) ac_arg=$ac_var=$ac_new_val ;;
3718    esac
3719    case " $ac_configure_args " in
3720      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3721      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3722    esac
3723  fi
3724done
3725if $ac_cache_corrupted; then
3726  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3727$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3728  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3729$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3730  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3731fi
3732## -------------------- ##
3733## Main body of script. ##
3734## -------------------- ##
3735
3736ac_ext=c
3737ac_cpp='$CPP $CPPFLAGS'
3738ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3739ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3740ac_compiler_gnu=$ac_cv_c_compiler_gnu
3741
3742
3743
3744ac_aux_dir=
3745for ac_dir in build-aux "$srcdir"/build-aux; do
3746  if test -f "$ac_dir/install-sh"; then
3747    ac_aux_dir=$ac_dir
3748    ac_install_sh="$ac_aux_dir/install-sh -c"
3749    break
3750  elif test -f "$ac_dir/install.sh"; then
3751    ac_aux_dir=$ac_dir
3752    ac_install_sh="$ac_aux_dir/install.sh -c"
3753    break
3754  elif test -f "$ac_dir/shtool"; then
3755    ac_aux_dir=$ac_dir
3756    ac_install_sh="$ac_aux_dir/shtool install -c"
3757    break
3758  fi
3759done
3760if test -z "$ac_aux_dir"; then
3761  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3762fi
3763
3764# These three variables are undocumented and unsupported,
3765# and are intended to be withdrawn in a future Autoconf release.
3766# They can cause serious problems if a builder's source tree is in a directory
3767# whose full name contains unusual characters.
3768ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3769ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3770ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3771
3772
3773ac_config_headers="$ac_config_headers config.h"
3774
3775
3776am__api_version='1.15'
3777
3778# Find a good install program.  We prefer a C program (faster),
3779# so one script is as good as another.  But avoid the broken or
3780# incompatible versions:
3781# SysV /etc/install, /usr/sbin/install
3782# SunOS /usr/etc/install
3783# IRIX /sbin/install
3784# AIX /bin/install
3785# AmigaOS /C/install, which installs bootblocks on floppy discs
3786# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3787# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3788# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3789# OS/2's system install, which has a completely different semantic
3790# ./install, which can be erroneously created by make from ./install.sh.
3791# Reject install programs that cannot install multiple files.
3792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3793$as_echo_n "checking for a BSD-compatible install... " >&6; }
3794if test -z "$INSTALL"; then
3795if ${ac_cv_path_install+:} false; then :
3796  $as_echo_n "(cached) " >&6
3797else
3798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3799for as_dir in $PATH
3800do
3801  IFS=$as_save_IFS
3802  test -z "$as_dir" && as_dir=.
3803    # Account for people who put trailing slashes in PATH elements.
3804case $as_dir/ in #((
3805  ./ | .// | /[cC]/* | \
3806  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3807  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3808  /usr/ucb/* ) ;;
3809  *)
3810    # OSF1 and SCO ODT 3.0 have their own names for install.
3811    # Don't use installbsd from OSF since it installs stuff as root
3812    # by default.
3813    for ac_prog in ginstall scoinst install; do
3814      for ac_exec_ext in '' $ac_executable_extensions; do
3815	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3816	  if test $ac_prog = install &&
3817	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3818	    # AIX install.  It has an incompatible calling convention.
3819	    :
3820	  elif test $ac_prog = install &&
3821	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3822	    # program-specific install script used by HP pwplus--don't use.
3823	    :
3824	  else
3825	    rm -rf conftest.one conftest.two conftest.dir
3826	    echo one > conftest.one
3827	    echo two > conftest.two
3828	    mkdir conftest.dir
3829	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3830	      test -s conftest.one && test -s conftest.two &&
3831	      test -s conftest.dir/conftest.one &&
3832	      test -s conftest.dir/conftest.two
3833	    then
3834	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3835	      break 3
3836	    fi
3837	  fi
3838	fi
3839      done
3840    done
3841    ;;
3842esac
3843
3844  done
3845IFS=$as_save_IFS
3846
3847rm -rf conftest.one conftest.two conftest.dir
3848
3849fi
3850  if test "${ac_cv_path_install+set}" = set; then
3851    INSTALL=$ac_cv_path_install
3852  else
3853    # As a last resort, use the slow shell script.  Don't cache a
3854    # value for INSTALL within a source directory, because that will
3855    # break other packages using the cache if that directory is
3856    # removed, or if the value is a relative name.
3857    INSTALL=$ac_install_sh
3858  fi
3859fi
3860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3861$as_echo "$INSTALL" >&6; }
3862
3863# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3864# It thinks the first close brace ends the variable substitution.
3865test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3866
3867test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3868
3869test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3870
3871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3872$as_echo_n "checking whether build environment is sane... " >&6; }
3873# Reject unsafe characters in $srcdir or the absolute working directory
3874# name.  Accept space and tab only in the latter.
3875am_lf='
3876'
3877case `pwd` in
3878  *[\\\"\#\$\&\'\`$am_lf]*)
3879    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3880esac
3881case $srcdir in
3882  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
3883    as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
3884esac
3885
3886# Do 'set' in a subshell so we don't clobber the current shell's
3887# arguments.  Must try -L first in case configure is actually a
3888# symlink; some systems play weird games with the mod time of symlinks
3889# (eg FreeBSD returns the mod time of the symlink's containing
3890# directory).
3891if (
3892   am_has_slept=no
3893   for am_try in 1 2; do
3894     echo "timestamp, slept: $am_has_slept" > conftest.file
3895     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3896     if test "$*" = "X"; then
3897	# -L didn't work.
3898	set X `ls -t "$srcdir/configure" conftest.file`
3899     fi
3900     if test "$*" != "X $srcdir/configure conftest.file" \
3901	&& test "$*" != "X conftest.file $srcdir/configure"; then
3902
3903	# If neither matched, then we have a broken ls.  This can happen
3904	# if, for instance, CONFIG_SHELL is bash and it inherits a
3905	# broken ls alias from the environment.  This has actually
3906	# happened.  Such a system could not be considered "sane".
3907	as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
3908  alias in your environment" "$LINENO" 5
3909     fi
3910     if test "$2" = conftest.file || test $am_try -eq 2; then
3911       break
3912     fi
3913     # Just in case.
3914     sleep 1
3915     am_has_slept=yes
3916   done
3917   test "$2" = conftest.file
3918   )
3919then
3920   # Ok.
3921   :
3922else
3923   as_fn_error $? "newly created file is older than distributed files!
3924Check your system clock" "$LINENO" 5
3925fi
3926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3927$as_echo "yes" >&6; }
3928# If we didn't sleep, we still need to ensure time stamps of config.status and
3929# generated files are strictly newer.
3930am_sleep_pid=
3931if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3932  ( sleep 1 ) &
3933  am_sleep_pid=$!
3934fi
3935
3936rm -f conftest.file
3937
3938test "$program_prefix" != NONE &&
3939  program_transform_name="s&^&$program_prefix&;$program_transform_name"
3940# Use a double $ so make ignores it.
3941test "$program_suffix" != NONE &&
3942  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3943# Double any \ or $.
3944# By default was `s,x,x', remove it if useless.
3945ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3946program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3947
3948# Expand $ac_aux_dir to an absolute path.
3949am_aux_dir=`cd "$ac_aux_dir" && pwd`
3950
3951if test x"${MISSING+set}" != xset; then
3952  case $am_aux_dir in
3953  *\ * | *\	*)
3954    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3955  *)
3956    MISSING="\${SHELL} $am_aux_dir/missing" ;;
3957  esac
3958fi
3959# Use eval to expand $SHELL
3960if eval "$MISSING --is-lightweight"; then
3961  am_missing_run="$MISSING "
3962else
3963  am_missing_run=
3964  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
3965$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
3966fi
3967
3968if test x"${install_sh+set}" != xset; then
3969  case $am_aux_dir in
3970  *\ * | *\	*)
3971    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3972  *)
3973    install_sh="\${SHELL} $am_aux_dir/install-sh"
3974  esac
3975fi
3976
3977# Installed binaries are usually stripped using 'strip' when the user
3978# run "make install-strip".  However 'strip' might not be the right
3979# tool to use in cross-compilation environments, therefore Automake
3980# will honor the 'STRIP' environment variable to overrule this program.
3981if test "$cross_compiling" != no; then
3982  if test -n "$ac_tool_prefix"; then
3983  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3984set dummy ${ac_tool_prefix}strip; ac_word=$2
3985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3986$as_echo_n "checking for $ac_word... " >&6; }
3987if ${ac_cv_prog_STRIP+:} false; then :
3988  $as_echo_n "(cached) " >&6
3989else
3990  if test -n "$STRIP"; then
3991  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3992else
3993as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3994for as_dir in $PATH
3995do
3996  IFS=$as_save_IFS
3997  test -z "$as_dir" && as_dir=.
3998    for ac_exec_ext in '' $ac_executable_extensions; do
3999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4000    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4002    break 2
4003  fi
4004done
4005  done
4006IFS=$as_save_IFS
4007
4008fi
4009fi
4010STRIP=$ac_cv_prog_STRIP
4011if test -n "$STRIP"; then
4012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4013$as_echo "$STRIP" >&6; }
4014else
4015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4016$as_echo "no" >&6; }
4017fi
4018
4019
4020fi
4021if test -z "$ac_cv_prog_STRIP"; then
4022  ac_ct_STRIP=$STRIP
4023  # Extract the first word of "strip", so it can be a program name with args.
4024set dummy strip; ac_word=$2
4025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4026$as_echo_n "checking for $ac_word... " >&6; }
4027if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4028  $as_echo_n "(cached) " >&6
4029else
4030  if test -n "$ac_ct_STRIP"; then
4031  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4032else
4033as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4034for as_dir in $PATH
4035do
4036  IFS=$as_save_IFS
4037  test -z "$as_dir" && as_dir=.
4038    for ac_exec_ext in '' $ac_executable_extensions; do
4039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4040    ac_cv_prog_ac_ct_STRIP="strip"
4041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4042    break 2
4043  fi
4044done
4045  done
4046IFS=$as_save_IFS
4047
4048fi
4049fi
4050ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4051if test -n "$ac_ct_STRIP"; then
4052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4053$as_echo "$ac_ct_STRIP" >&6; }
4054else
4055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4056$as_echo "no" >&6; }
4057fi
4058
4059  if test "x$ac_ct_STRIP" = x; then
4060    STRIP=":"
4061  else
4062    case $cross_compiling:$ac_tool_warned in
4063yes:)
4064{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4065$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4066ac_tool_warned=yes ;;
4067esac
4068    STRIP=$ac_ct_STRIP
4069  fi
4070else
4071  STRIP="$ac_cv_prog_STRIP"
4072fi
4073
4074fi
4075INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4076
4077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
4078$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
4079if test -z "$MKDIR_P"; then
4080  if ${ac_cv_path_mkdir+:} false; then :
4081  $as_echo_n "(cached) " >&6
4082else
4083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4084for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
4085do
4086  IFS=$as_save_IFS
4087  test -z "$as_dir" && as_dir=.
4088    for ac_prog in mkdir gmkdir; do
4089	 for ac_exec_ext in '' $ac_executable_extensions; do
4090	   as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
4091	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
4092	     'mkdir (GNU coreutils) '* | \
4093	     'mkdir (coreutils) '* | \
4094	     'mkdir (fileutils) '4.1*)
4095	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
4096	       break 3;;
4097	   esac
4098	 done
4099       done
4100  done
4101IFS=$as_save_IFS
4102
4103fi
4104
4105  test -d ./--version && rmdir ./--version
4106  if test "${ac_cv_path_mkdir+set}" = set; then
4107    MKDIR_P="$ac_cv_path_mkdir -p"
4108  else
4109    # As a last resort, use the slow shell script.  Don't cache a
4110    # value for MKDIR_P within a source directory, because that will
4111    # break other packages using the cache if that directory is
4112    # removed, or if the value is a relative name.
4113    MKDIR_P="$ac_install_sh -d"
4114  fi
4115fi
4116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
4117$as_echo "$MKDIR_P" >&6; }
4118
4119for ac_prog in gawk mawk nawk awk
4120do
4121  # Extract the first word of "$ac_prog", so it can be a program name with args.
4122set dummy $ac_prog; ac_word=$2
4123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4124$as_echo_n "checking for $ac_word... " >&6; }
4125if ${ac_cv_prog_AWK+:} false; then :
4126  $as_echo_n "(cached) " >&6
4127else
4128  if test -n "$AWK"; then
4129  ac_cv_prog_AWK="$AWK" # Let the user override the test.
4130else
4131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4132for as_dir in $PATH
4133do
4134  IFS=$as_save_IFS
4135  test -z "$as_dir" && as_dir=.
4136    for ac_exec_ext in '' $ac_executable_extensions; do
4137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4138    ac_cv_prog_AWK="$ac_prog"
4139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4140    break 2
4141  fi
4142done
4143  done
4144IFS=$as_save_IFS
4145
4146fi
4147fi
4148AWK=$ac_cv_prog_AWK
4149if test -n "$AWK"; then
4150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4151$as_echo "$AWK" >&6; }
4152else
4153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4154$as_echo "no" >&6; }
4155fi
4156
4157
4158  test -n "$AWK" && break
4159done
4160
4161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4162$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4163set x ${MAKE-make}
4164ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4165if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
4166  $as_echo_n "(cached) " >&6
4167else
4168  cat >conftest.make <<\_ACEOF
4169SHELL = /bin/sh
4170all:
4171	@echo '@@@%%%=$(MAKE)=@@@%%%'
4172_ACEOF
4173# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4174case `${MAKE-make} -f conftest.make 2>/dev/null` in
4175  *@@@%%%=?*=@@@%%%*)
4176    eval ac_cv_prog_make_${ac_make}_set=yes;;
4177  *)
4178    eval ac_cv_prog_make_${ac_make}_set=no;;
4179esac
4180rm -f conftest.make
4181fi
4182if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4184$as_echo "yes" >&6; }
4185  SET_MAKE=
4186else
4187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4188$as_echo "no" >&6; }
4189  SET_MAKE="MAKE=${MAKE-make}"
4190fi
4191
4192rm -rf .tst 2>/dev/null
4193mkdir .tst 2>/dev/null
4194if test -d .tst; then
4195  am__leading_dot=.
4196else
4197  am__leading_dot=_
4198fi
4199rmdir .tst 2>/dev/null
4200
4201# Check whether --enable-silent-rules was given.
4202if test "${enable_silent_rules+set}" = set; then :
4203  enableval=$enable_silent_rules;
4204fi
4205
4206case $enable_silent_rules in # (((
4207  yes) AM_DEFAULT_VERBOSITY=0;;
4208   no) AM_DEFAULT_VERBOSITY=1;;
4209    *) AM_DEFAULT_VERBOSITY=1;;
4210esac
4211am_make=${MAKE-make}
4212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4213$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
4214if ${am_cv_make_support_nested_variables+:} false; then :
4215  $as_echo_n "(cached) " >&6
4216else
4217  if $as_echo 'TRUE=$(BAR$(V))
4218BAR0=false
4219BAR1=true
4220V=1
4221am__doit:
4222	@$(TRUE)
4223.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4224  am_cv_make_support_nested_variables=yes
4225else
4226  am_cv_make_support_nested_variables=no
4227fi
4228fi
4229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4230$as_echo "$am_cv_make_support_nested_variables" >&6; }
4231if test $am_cv_make_support_nested_variables = yes; then
4232    AM_V='$(V)'
4233  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4234else
4235  AM_V=$AM_DEFAULT_VERBOSITY
4236  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4237fi
4238AM_BACKSLASH='\'
4239
4240if test "`cd $srcdir && pwd`" != "`pwd`"; then
4241  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4242  # is not polluted with repeated "-I."
4243  am__isrc=' -I$(srcdir)'
4244  # test to see if srcdir already configured
4245  if test -f $srcdir/config.status; then
4246    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
4247  fi
4248fi
4249
4250# test whether we have cygpath
4251if test -z "$CYGPATH_W"; then
4252  if (cygpath --version) >/dev/null 2>/dev/null; then
4253    CYGPATH_W='cygpath -w'
4254  else
4255    CYGPATH_W=echo
4256  fi
4257fi
4258
4259
4260# Define the identity of the package.
4261 PACKAGE='tar'
4262 VERSION='1.34'
4263
4264
4265cat >>confdefs.h <<_ACEOF
4266#define PACKAGE "$PACKAGE"
4267_ACEOF
4268
4269
4270cat >>confdefs.h <<_ACEOF
4271#define VERSION "$VERSION"
4272_ACEOF
4273
4274# Some tools Automake needs.
4275
4276ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4277
4278
4279AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4280
4281
4282AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4283
4284
4285AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4286
4287
4288MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
4289
4290# For better backward compatibility.  To be removed once Automake 1.9.x
4291# dies out for good.  For more background, see:
4292# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
4293# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
4294mkdir_p='$(MKDIR_P)'
4295
4296# We need awk for the "check" target (and possibly the TAP driver).  The
4297# system "awk" is bad on some platforms.
4298# Always define AMTAR for backward compatibility.  Yes, it's still used
4299# in the wild :-(  We should find a proper way to deprecate it ...
4300AMTAR='$${TAR-tar}'
4301
4302
4303# We'll loop over all known methods to create a tar archive until one works.
4304_am_tools='gnutar plaintar pax cpio none'
4305
4306# The POSIX 1988 'ustar' format is defined with fixed-size fields.
4307      # There is notably a 21 bits limit for the UID and the GID.  In fact,
4308      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
4309      # and bug#13588).
4310      am_max_uid=2097151 # 2^21 - 1
4311      am_max_gid=$am_max_uid
4312      # The $UID and $GID variables are not portable, so we need to resort
4313      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
4314      # below are definitely unexpected, so allow the users to see them
4315      # (that is, avoid stderr redirection).
4316      am_uid=`id -u || echo unknown`
4317      am_gid=`id -g || echo unknown`
4318      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5
4319$as_echo_n "checking whether UID '$am_uid' is supported by ustar format... " >&6; }
4320      if test $am_uid -le $am_max_uid; then
4321         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4322$as_echo "yes" >&6; }
4323      else
4324         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4325$as_echo "no" >&6; }
4326         _am_tools=none
4327      fi
4328      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5
4329$as_echo_n "checking whether GID '$am_gid' is supported by ustar format... " >&6; }
4330      if test $am_gid -le $am_max_gid; then
4331         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4332$as_echo "yes" >&6; }
4333      else
4334        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4335$as_echo "no" >&6; }
4336        _am_tools=none
4337      fi
4338
4339  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5
4340$as_echo_n "checking how to create a ustar tar archive... " >&6; }
4341
4342  # Go ahead even if we have the value already cached.  We do so because we
4343  # need to set the values for the 'am__tar' and 'am__untar' variables.
4344  _am_tools=${am_cv_prog_tar_ustar-$_am_tools}
4345
4346  for _am_tool in $_am_tools; do
4347    case $_am_tool in
4348    gnutar)
4349      for _am_tar in tar gnutar gtar; do
4350        { echo "$as_me:$LINENO: $_am_tar --version" >&5
4351   ($_am_tar --version) >&5 2>&5
4352   ac_status=$?
4353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4354   (exit $ac_status); } && break
4355      done
4356      am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"'
4357      am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"'
4358      am__untar="$_am_tar -xf -"
4359      ;;
4360    plaintar)
4361      # Must skip GNU tar: if it does not support --format= it doesn't create
4362      # ustar tarball either.
4363      (tar --version) >/dev/null 2>&1 && continue
4364      am__tar='tar chf - "$$tardir"'
4365      am__tar_='tar chf - "$tardir"'
4366      am__untar='tar xf -'
4367      ;;
4368    pax)
4369      am__tar='pax -L -x ustar -w "$$tardir"'
4370      am__tar_='pax -L -x ustar -w "$tardir"'
4371      am__untar='pax -r'
4372      ;;
4373    cpio)
4374      am__tar='find "$$tardir" -print | cpio -o -H ustar -L'
4375      am__tar_='find "$tardir" -print | cpio -o -H ustar -L'
4376      am__untar='cpio -i -H ustar -d'
4377      ;;
4378    none)
4379      am__tar=false
4380      am__tar_=false
4381      am__untar=false
4382      ;;
4383    esac
4384
4385    # If the value was cached, stop now.  We just wanted to have am__tar
4386    # and am__untar set.
4387    test -n "${am_cv_prog_tar_ustar}" && break
4388
4389    # tar/untar a dummy directory, and stop if the command works.
4390    rm -rf conftest.dir
4391    mkdir conftest.dir
4392    echo GrepMe > conftest.dir/file
4393    { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5
4394   (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5
4395   ac_status=$?
4396   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4397   (exit $ac_status); }
4398    rm -rf conftest.dir
4399    if test -s conftest.tar; then
4400      { echo "$as_me:$LINENO: $am__untar <conftest.tar" >&5
4401   ($am__untar <conftest.tar) >&5 2>&5
4402   ac_status=$?
4403   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4404   (exit $ac_status); }
4405      { echo "$as_me:$LINENO: cat conftest.dir/file" >&5
4406   (cat conftest.dir/file) >&5 2>&5
4407   ac_status=$?
4408   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4409   (exit $ac_status); }
4410      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
4411    fi
4412  done
4413  rm -rf conftest.dir
4414
4415  if ${am_cv_prog_tar_ustar+:} false; then :
4416  $as_echo_n "(cached) " >&6
4417else
4418  am_cv_prog_tar_ustar=$_am_tool
4419fi
4420
4421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5
4422$as_echo "$am_cv_prog_tar_ustar" >&6; }
4423
4424
4425
4426
4427
4428
4429# POSIX will say in a future version that running "rm -f" with no argument
4430# is OK; and we want to be able to make that assumption in our Makefile
4431# recipes.  So use an aggressive probe to check that the usage we want is
4432# actually supported "in the wild" to an acceptable degree.
4433# See automake bug#10828.
4434# To make any issue more visible, cause the running configure to be aborted
4435# by default if the 'rm' program in use doesn't match our expectations; the
4436# user can still override this though.
4437if rm -f && rm -fr && rm -rf; then : OK; else
4438  cat >&2 <<'END'
4439Oops!
4440
4441Your 'rm' program seems unable to run without file operands specified
4442on the command line, even when the '-f' option is present.  This is contrary
4443to the behaviour of most rm programs out there, and not conforming with
4444the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
4445
4446Please tell bug-automake@gnu.org about your system, including the value
4447of your $PATH and any error possibly output before this message.  This
4448can help us improve future automake versions.
4449
4450END
4451  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
4452    echo 'Configuration will proceed anyway, since you have set the' >&2
4453    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
4454    echo >&2
4455  else
4456    cat >&2 <<'END'
4457Aborting the configuration process, to ensure you take notice of the issue.
4458
4459You can download and install GNU coreutils to get an 'rm' implementation
4460that behaves properly: <http://www.gnu.org/software/coreutils/>.
4461
4462If you want to complete the configuration process using your problematic
4463'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
4464to "yes", and re-run configure.
4465
4466END
4467    as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
4468  fi
4469fi
4470
4471
4472# Enable silent rules by default:
4473# Check whether --enable-silent-rules was given.
4474if test "${enable_silent_rules+set}" = set; then :
4475  enableval=$enable_silent_rules;
4476fi
4477
4478case $enable_silent_rules in # (((
4479  yes) AM_DEFAULT_VERBOSITY=0;;
4480   no) AM_DEFAULT_VERBOSITY=1;;
4481    *) AM_DEFAULT_VERBOSITY=0;;
4482esac
4483am_make=${MAKE-make}
4484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4485$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
4486if ${am_cv_make_support_nested_variables+:} false; then :
4487  $as_echo_n "(cached) " >&6
4488else
4489  if $as_echo 'TRUE=$(BAR$(V))
4490BAR0=false
4491BAR1=true
4492V=1
4493am__doit:
4494	@$(TRUE)
4495.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4496  am_cv_make_support_nested_variables=yes
4497else
4498  am_cv_make_support_nested_variables=no
4499fi
4500fi
4501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4502$as_echo "$am_cv_make_support_nested_variables" >&6; }
4503if test $am_cv_make_support_nested_variables = yes; then
4504    AM_V='$(V)'
4505  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4506else
4507  AM_V=$AM_DEFAULT_VERBOSITY
4508  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4509fi
4510AM_BACKSLASH='\'
4511
4512
4513DEPDIR="${am__leading_dot}deps"
4514
4515ac_config_commands="$ac_config_commands depfiles"
4516
4517
4518am_make=${MAKE-make}
4519cat > confinc << 'END'
4520am__doit:
4521	@echo this is the am__doit target
4522.PHONY: am__doit
4523END
4524# If we don't find an include directive, just comment out the code.
4525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
4526$as_echo_n "checking for style of include used by $am_make... " >&6; }
4527am__include="#"
4528am__quote=
4529_am_result=none
4530# First try GNU make style include.
4531echo "include confinc" > confmf
4532# Ignore all kinds of additional output from 'make'.
4533case `$am_make -s -f confmf 2> /dev/null` in #(
4534*the\ am__doit\ target*)
4535  am__include=include
4536  am__quote=
4537  _am_result=GNU
4538  ;;
4539esac
4540# Now try BSD make style include.
4541if test "$am__include" = "#"; then
4542   echo '.include "confinc"' > confmf
4543   case `$am_make -s -f confmf 2> /dev/null` in #(
4544   *the\ am__doit\ target*)
4545     am__include=.include
4546     am__quote="\""
4547     _am_result=BSD
4548     ;;
4549   esac
4550fi
4551
4552
4553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
4554$as_echo "$_am_result" >&6; }
4555rm -f confinc confmf
4556
4557# Check whether --enable-dependency-tracking was given.
4558if test "${enable_dependency_tracking+set}" = set; then :
4559  enableval=$enable_dependency_tracking;
4560fi
4561
4562if test "x$enable_dependency_tracking" != xno; then
4563  am_depcomp="$ac_aux_dir/depcomp"
4564  AMDEPBACKSLASH='\'
4565  am__nodep='_no'
4566fi
4567 if test "x$enable_dependency_tracking" != xno; then
4568  AMDEP_TRUE=
4569  AMDEP_FALSE='#'
4570else
4571  AMDEP_TRUE='#'
4572  AMDEP_FALSE=
4573fi
4574
4575
4576ac_ext=c
4577ac_cpp='$CPP $CPPFLAGS'
4578ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4579ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4580ac_compiler_gnu=$ac_cv_c_compiler_gnu
4581if test -n "$ac_tool_prefix"; then
4582  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4583set dummy ${ac_tool_prefix}gcc; ac_word=$2
4584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4585$as_echo_n "checking for $ac_word... " >&6; }
4586if ${ac_cv_prog_CC+:} false; then :
4587  $as_echo_n "(cached) " >&6
4588else
4589  if test -n "$CC"; then
4590  ac_cv_prog_CC="$CC" # Let the user override the test.
4591else
4592as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4593for as_dir in $PATH
4594do
4595  IFS=$as_save_IFS
4596  test -z "$as_dir" && as_dir=.
4597    for ac_exec_ext in '' $ac_executable_extensions; do
4598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4599    ac_cv_prog_CC="${ac_tool_prefix}gcc"
4600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4601    break 2
4602  fi
4603done
4604  done
4605IFS=$as_save_IFS
4606
4607fi
4608fi
4609CC=$ac_cv_prog_CC
4610if test -n "$CC"; then
4611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4612$as_echo "$CC" >&6; }
4613else
4614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4615$as_echo "no" >&6; }
4616fi
4617
4618
4619fi
4620if test -z "$ac_cv_prog_CC"; then
4621  ac_ct_CC=$CC
4622  # Extract the first word of "gcc", so it can be a program name with args.
4623set dummy gcc; ac_word=$2
4624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4625$as_echo_n "checking for $ac_word... " >&6; }
4626if ${ac_cv_prog_ac_ct_CC+:} false; then :
4627  $as_echo_n "(cached) " >&6
4628else
4629  if test -n "$ac_ct_CC"; then
4630  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4631else
4632as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4633for as_dir in $PATH
4634do
4635  IFS=$as_save_IFS
4636  test -z "$as_dir" && as_dir=.
4637    for ac_exec_ext in '' $ac_executable_extensions; do
4638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4639    ac_cv_prog_ac_ct_CC="gcc"
4640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4641    break 2
4642  fi
4643done
4644  done
4645IFS=$as_save_IFS
4646
4647fi
4648fi
4649ac_ct_CC=$ac_cv_prog_ac_ct_CC
4650if test -n "$ac_ct_CC"; then
4651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4652$as_echo "$ac_ct_CC" >&6; }
4653else
4654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4655$as_echo "no" >&6; }
4656fi
4657
4658  if test "x$ac_ct_CC" = x; then
4659    CC=""
4660  else
4661    case $cross_compiling:$ac_tool_warned in
4662yes:)
4663{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4664$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4665ac_tool_warned=yes ;;
4666esac
4667    CC=$ac_ct_CC
4668  fi
4669else
4670  CC="$ac_cv_prog_CC"
4671fi
4672
4673if test -z "$CC"; then
4674          if test -n "$ac_tool_prefix"; then
4675    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4676set dummy ${ac_tool_prefix}cc; ac_word=$2
4677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4678$as_echo_n "checking for $ac_word... " >&6; }
4679if ${ac_cv_prog_CC+:} false; then :
4680  $as_echo_n "(cached) " >&6
4681else
4682  if test -n "$CC"; then
4683  ac_cv_prog_CC="$CC" # Let the user override the test.
4684else
4685as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4686for as_dir in $PATH
4687do
4688  IFS=$as_save_IFS
4689  test -z "$as_dir" && as_dir=.
4690    for ac_exec_ext in '' $ac_executable_extensions; do
4691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4692    ac_cv_prog_CC="${ac_tool_prefix}cc"
4693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4694    break 2
4695  fi
4696done
4697  done
4698IFS=$as_save_IFS
4699
4700fi
4701fi
4702CC=$ac_cv_prog_CC
4703if test -n "$CC"; then
4704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4705$as_echo "$CC" >&6; }
4706else
4707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4708$as_echo "no" >&6; }
4709fi
4710
4711
4712  fi
4713fi
4714if test -z "$CC"; then
4715  # Extract the first word of "cc", so it can be a program name with args.
4716set dummy cc; ac_word=$2
4717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4718$as_echo_n "checking for $ac_word... " >&6; }
4719if ${ac_cv_prog_CC+:} false; then :
4720  $as_echo_n "(cached) " >&6
4721else
4722  if test -n "$CC"; then
4723  ac_cv_prog_CC="$CC" # Let the user override the test.
4724else
4725  ac_prog_rejected=no
4726as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4727for as_dir in $PATH
4728do
4729  IFS=$as_save_IFS
4730  test -z "$as_dir" && as_dir=.
4731    for ac_exec_ext in '' $ac_executable_extensions; do
4732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4733    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4734       ac_prog_rejected=yes
4735       continue
4736     fi
4737    ac_cv_prog_CC="cc"
4738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4739    break 2
4740  fi
4741done
4742  done
4743IFS=$as_save_IFS
4744
4745if test $ac_prog_rejected = yes; then
4746  # We found a bogon in the path, so make sure we never use it.
4747  set dummy $ac_cv_prog_CC
4748  shift
4749  if test $# != 0; then
4750    # We chose a different compiler from the bogus one.
4751    # However, it has the same basename, so the bogon will be chosen
4752    # first if we set CC to just the basename; use the full file name.
4753    shift
4754    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4755  fi
4756fi
4757fi
4758fi
4759CC=$ac_cv_prog_CC
4760if test -n "$CC"; then
4761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4762$as_echo "$CC" >&6; }
4763else
4764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4765$as_echo "no" >&6; }
4766fi
4767
4768
4769fi
4770if test -z "$CC"; then
4771  if test -n "$ac_tool_prefix"; then
4772  for ac_prog in cl.exe
4773  do
4774    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4775set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4777$as_echo_n "checking for $ac_word... " >&6; }
4778if ${ac_cv_prog_CC+:} false; then :
4779  $as_echo_n "(cached) " >&6
4780else
4781  if test -n "$CC"; then
4782  ac_cv_prog_CC="$CC" # Let the user override the test.
4783else
4784as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4785for as_dir in $PATH
4786do
4787  IFS=$as_save_IFS
4788  test -z "$as_dir" && as_dir=.
4789    for ac_exec_ext in '' $ac_executable_extensions; do
4790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4791    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4793    break 2
4794  fi
4795done
4796  done
4797IFS=$as_save_IFS
4798
4799fi
4800fi
4801CC=$ac_cv_prog_CC
4802if test -n "$CC"; then
4803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4804$as_echo "$CC" >&6; }
4805else
4806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4807$as_echo "no" >&6; }
4808fi
4809
4810
4811    test -n "$CC" && break
4812  done
4813fi
4814if test -z "$CC"; then
4815  ac_ct_CC=$CC
4816  for ac_prog in cl.exe
4817do
4818  # Extract the first word of "$ac_prog", so it can be a program name with args.
4819set dummy $ac_prog; ac_word=$2
4820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4821$as_echo_n "checking for $ac_word... " >&6; }
4822if ${ac_cv_prog_ac_ct_CC+:} false; then :
4823  $as_echo_n "(cached) " >&6
4824else
4825  if test -n "$ac_ct_CC"; then
4826  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4827else
4828as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4829for as_dir in $PATH
4830do
4831  IFS=$as_save_IFS
4832  test -z "$as_dir" && as_dir=.
4833    for ac_exec_ext in '' $ac_executable_extensions; do
4834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4835    ac_cv_prog_ac_ct_CC="$ac_prog"
4836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4837    break 2
4838  fi
4839done
4840  done
4841IFS=$as_save_IFS
4842
4843fi
4844fi
4845ac_ct_CC=$ac_cv_prog_ac_ct_CC
4846if test -n "$ac_ct_CC"; then
4847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4848$as_echo "$ac_ct_CC" >&6; }
4849else
4850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4851$as_echo "no" >&6; }
4852fi
4853
4854
4855  test -n "$ac_ct_CC" && break
4856done
4857
4858  if test "x$ac_ct_CC" = x; then
4859    CC=""
4860  else
4861    case $cross_compiling:$ac_tool_warned in
4862yes:)
4863{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4864$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4865ac_tool_warned=yes ;;
4866esac
4867    CC=$ac_ct_CC
4868  fi
4869fi
4870
4871fi
4872if test -z "$CC"; then
4873  if test -n "$ac_tool_prefix"; then
4874  # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
4875set dummy ${ac_tool_prefix}clang; ac_word=$2
4876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4877$as_echo_n "checking for $ac_word... " >&6; }
4878if ${ac_cv_prog_CC+:} false; then :
4879  $as_echo_n "(cached) " >&6
4880else
4881  if test -n "$CC"; then
4882  ac_cv_prog_CC="$CC" # Let the user override the test.
4883else
4884as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4885for as_dir in $PATH
4886do
4887  IFS=$as_save_IFS
4888  test -z "$as_dir" && as_dir=.
4889    for ac_exec_ext in '' $ac_executable_extensions; do
4890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4891    ac_cv_prog_CC="${ac_tool_prefix}clang"
4892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4893    break 2
4894  fi
4895done
4896  done
4897IFS=$as_save_IFS
4898
4899fi
4900fi
4901CC=$ac_cv_prog_CC
4902if test -n "$CC"; then
4903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4904$as_echo "$CC" >&6; }
4905else
4906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4907$as_echo "no" >&6; }
4908fi
4909
4910
4911fi
4912if test -z "$ac_cv_prog_CC"; then
4913  ac_ct_CC=$CC
4914  # Extract the first word of "clang", so it can be a program name with args.
4915set dummy clang; ac_word=$2
4916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4917$as_echo_n "checking for $ac_word... " >&6; }
4918if ${ac_cv_prog_ac_ct_CC+:} false; then :
4919  $as_echo_n "(cached) " >&6
4920else
4921  if test -n "$ac_ct_CC"; then
4922  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4923else
4924as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4925for as_dir in $PATH
4926do
4927  IFS=$as_save_IFS
4928  test -z "$as_dir" && as_dir=.
4929    for ac_exec_ext in '' $ac_executable_extensions; do
4930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4931    ac_cv_prog_ac_ct_CC="clang"
4932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4933    break 2
4934  fi
4935done
4936  done
4937IFS=$as_save_IFS
4938
4939fi
4940fi
4941ac_ct_CC=$ac_cv_prog_ac_ct_CC
4942if test -n "$ac_ct_CC"; then
4943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4944$as_echo "$ac_ct_CC" >&6; }
4945else
4946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4947$as_echo "no" >&6; }
4948fi
4949
4950  if test "x$ac_ct_CC" = x; then
4951    CC=""
4952  else
4953    case $cross_compiling:$ac_tool_warned in
4954yes:)
4955{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4956$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4957ac_tool_warned=yes ;;
4958esac
4959    CC=$ac_ct_CC
4960  fi
4961else
4962  CC="$ac_cv_prog_CC"
4963fi
4964
4965fi
4966
4967
4968test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4969$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4970as_fn_error $? "no acceptable C compiler found in \$PATH
4971See \`config.log' for more details" "$LINENO" 5; }
4972
4973# Provide some information about the compiler.
4974$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4975set X $ac_compile
4976ac_compiler=$2
4977for ac_option in --version -v -V -qversion -version; do
4978  { { ac_try="$ac_compiler $ac_option >&5"
4979case "(($ac_try" in
4980  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4981  *) ac_try_echo=$ac_try;;
4982esac
4983eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4984$as_echo "$ac_try_echo"; } >&5
4985  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4986  ac_status=$?
4987  if test -s conftest.err; then
4988    sed '10a\
4989... rest of stderr output deleted ...
4990         10q' conftest.err >conftest.er1
4991    cat conftest.er1 >&5
4992  fi
4993  rm -f conftest.er1 conftest.err
4994  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4995  test $ac_status = 0; }
4996done
4997
4998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4999/* end confdefs.h.  */
5000
5001int
5002main ()
5003{
5004
5005  ;
5006  return 0;
5007}
5008_ACEOF
5009ac_clean_files_save=$ac_clean_files
5010ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5011# Try to create an executable without -o first, disregard a.out.
5012# It will help us diagnose broken compilers, and finding out an intuition
5013# of exeext.
5014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5015$as_echo_n "checking whether the C compiler works... " >&6; }
5016ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5017
5018# The possible output files:
5019ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5020
5021ac_rmfiles=
5022for ac_file in $ac_files
5023do
5024  case $ac_file in
5025    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5026    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5027  esac
5028done
5029rm -f $ac_rmfiles
5030
5031if { { ac_try="$ac_link_default"
5032case "(($ac_try" in
5033  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5034  *) ac_try_echo=$ac_try;;
5035esac
5036eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5037$as_echo "$ac_try_echo"; } >&5
5038  (eval "$ac_link_default") 2>&5
5039  ac_status=$?
5040  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5041  test $ac_status = 0; }; then :
5042  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5043# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5044# in a Makefile.  We should not override ac_cv_exeext if it was cached,
5045# so that the user can short-circuit this test for compilers unknown to
5046# Autoconf.
5047for ac_file in $ac_files ''
5048do
5049  test -f "$ac_file" || continue
5050  case $ac_file in
5051    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5052	;;
5053    [ab].out )
5054	# We found the default executable, but exeext='' is most
5055	# certainly right.
5056	break;;
5057    *.* )
5058	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
5059	then :; else
5060	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5061	fi
5062	# We set ac_cv_exeext here because the later test for it is not
5063	# safe: cross compilers may not add the suffix if given an `-o'
5064	# argument, so we may need to know it at that point already.
5065	# Even if this section looks crufty: it has the advantage of
5066	# actually working.
5067	break;;
5068    * )
5069	break;;
5070  esac
5071done
5072test "$ac_cv_exeext" = no && ac_cv_exeext=
5073
5074else
5075  ac_file=''
5076fi
5077if test -z "$ac_file"; then :
5078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5079$as_echo "no" >&6; }
5080$as_echo "$as_me: failed program was:" >&5
5081sed 's/^/| /' conftest.$ac_ext >&5
5082
5083{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5084$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5085as_fn_error 77 "C compiler cannot create executables
5086See \`config.log' for more details" "$LINENO" 5; }
5087else
5088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5089$as_echo "yes" >&6; }
5090fi
5091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5092$as_echo_n "checking for C compiler default output file name... " >&6; }
5093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5094$as_echo "$ac_file" >&6; }
5095ac_exeext=$ac_cv_exeext
5096
5097rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5098ac_clean_files=$ac_clean_files_save
5099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5100$as_echo_n "checking for suffix of executables... " >&6; }
5101if { { ac_try="$ac_link"
5102case "(($ac_try" in
5103  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5104  *) ac_try_echo=$ac_try;;
5105esac
5106eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5107$as_echo "$ac_try_echo"; } >&5
5108  (eval "$ac_link") 2>&5
5109  ac_status=$?
5110  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5111  test $ac_status = 0; }; then :
5112  # If both `conftest.exe' and `conftest' are `present' (well, observable)
5113# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
5114# work properly (i.e., refer to `conftest.exe'), while it won't with
5115# `rm'.
5116for ac_file in conftest.exe conftest conftest.*; do
5117  test -f "$ac_file" || continue
5118  case $ac_file in
5119    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5120    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5121	  break;;
5122    * ) break;;
5123  esac
5124done
5125else
5126  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5127$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5128as_fn_error $? "cannot compute suffix of executables: cannot compile and link
5129See \`config.log' for more details" "$LINENO" 5; }
5130fi
5131rm -f conftest conftest$ac_cv_exeext
5132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5133$as_echo "$ac_cv_exeext" >&6; }
5134
5135rm -f conftest.$ac_ext
5136EXEEXT=$ac_cv_exeext
5137ac_exeext=$EXEEXT
5138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5139/* end confdefs.h.  */
5140#include <stdio.h>
5141int
5142main ()
5143{
5144FILE *f = fopen ("conftest.out", "w");
5145 return ferror (f) || fclose (f) != 0;
5146
5147  ;
5148  return 0;
5149}
5150_ACEOF
5151ac_clean_files="$ac_clean_files conftest.out"
5152# Check that the compiler produces executables we can run.  If not, either
5153# the compiler is broken, or we cross compile.
5154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5155$as_echo_n "checking whether we are cross compiling... " >&6; }
5156if test "$cross_compiling" != yes; then
5157  { { ac_try="$ac_link"
5158case "(($ac_try" in
5159  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5160  *) ac_try_echo=$ac_try;;
5161esac
5162eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5163$as_echo "$ac_try_echo"; } >&5
5164  (eval "$ac_link") 2>&5
5165  ac_status=$?
5166  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5167  test $ac_status = 0; }
5168  if { ac_try='./conftest$ac_cv_exeext'
5169  { { case "(($ac_try" in
5170  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5171  *) ac_try_echo=$ac_try;;
5172esac
5173eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5174$as_echo "$ac_try_echo"; } >&5
5175  (eval "$ac_try") 2>&5
5176  ac_status=$?
5177  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5178  test $ac_status = 0; }; }; then
5179    cross_compiling=no
5180  else
5181    if test "$cross_compiling" = maybe; then
5182	cross_compiling=yes
5183    else
5184	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5185$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5186as_fn_error $? "cannot run C compiled programs.
5187If you meant to cross compile, use \`--host'.
5188See \`config.log' for more details" "$LINENO" 5; }
5189    fi
5190  fi
5191fi
5192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5193$as_echo "$cross_compiling" >&6; }
5194
5195rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5196ac_clean_files=$ac_clean_files_save
5197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5198$as_echo_n "checking for suffix of object files... " >&6; }
5199if ${ac_cv_objext+:} false; then :
5200  $as_echo_n "(cached) " >&6
5201else
5202  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5203/* end confdefs.h.  */
5204
5205int
5206main ()
5207{
5208
5209  ;
5210  return 0;
5211}
5212_ACEOF
5213rm -f conftest.o conftest.obj
5214if { { ac_try="$ac_compile"
5215case "(($ac_try" in
5216  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5217  *) ac_try_echo=$ac_try;;
5218esac
5219eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5220$as_echo "$ac_try_echo"; } >&5
5221  (eval "$ac_compile") 2>&5
5222  ac_status=$?
5223  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5224  test $ac_status = 0; }; then :
5225  for ac_file in conftest.o conftest.obj conftest.*; do
5226  test -f "$ac_file" || continue;
5227  case $ac_file in
5228    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5229    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5230       break;;
5231  esac
5232done
5233else
5234  $as_echo "$as_me: failed program was:" >&5
5235sed 's/^/| /' conftest.$ac_ext >&5
5236
5237{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5238$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5239as_fn_error $? "cannot compute suffix of object files: cannot compile
5240See \`config.log' for more details" "$LINENO" 5; }
5241fi
5242rm -f conftest.$ac_cv_objext conftest.$ac_ext
5243fi
5244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5245$as_echo "$ac_cv_objext" >&6; }
5246OBJEXT=$ac_cv_objext
5247ac_objext=$OBJEXT
5248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5249$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
5250if ${ac_cv_c_compiler_gnu+:} false; then :
5251  $as_echo_n "(cached) " >&6
5252else
5253  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5254/* end confdefs.h.  */
5255
5256int
5257main ()
5258{
5259#ifndef __GNUC__
5260       choke me
5261#endif
5262
5263  ;
5264  return 0;
5265}
5266_ACEOF
5267if ac_fn_c_try_compile "$LINENO"; then :
5268  ac_compiler_gnu=yes
5269else
5270  ac_compiler_gnu=no
5271fi
5272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5273ac_cv_c_compiler_gnu=$ac_compiler_gnu
5274
5275fi
5276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5277$as_echo "$ac_cv_c_compiler_gnu" >&6; }
5278if test $ac_compiler_gnu = yes; then
5279  GCC=yes
5280else
5281  GCC=
5282fi
5283ac_test_CFLAGS=${CFLAGS+set}
5284ac_save_CFLAGS=$CFLAGS
5285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5286$as_echo_n "checking whether $CC accepts -g... " >&6; }
5287if ${ac_cv_prog_cc_g+:} false; then :
5288  $as_echo_n "(cached) " >&6
5289else
5290  ac_save_c_werror_flag=$ac_c_werror_flag
5291   ac_c_werror_flag=yes
5292   ac_cv_prog_cc_g=no
5293   CFLAGS="-g"
5294   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5295/* end confdefs.h.  */
5296
5297int
5298main ()
5299{
5300
5301  ;
5302  return 0;
5303}
5304_ACEOF
5305if ac_fn_c_try_compile "$LINENO"; then :
5306  ac_cv_prog_cc_g=yes
5307else
5308  CFLAGS=""
5309      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5310/* end confdefs.h.  */
5311
5312int
5313main ()
5314{
5315
5316  ;
5317  return 0;
5318}
5319_ACEOF
5320if ac_fn_c_try_compile "$LINENO"; then :
5321
5322else
5323  ac_c_werror_flag=$ac_save_c_werror_flag
5324	 CFLAGS="-g"
5325	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5326/* end confdefs.h.  */
5327
5328int
5329main ()
5330{
5331
5332  ;
5333  return 0;
5334}
5335_ACEOF
5336if ac_fn_c_try_compile "$LINENO"; then :
5337  ac_cv_prog_cc_g=yes
5338fi
5339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5340fi
5341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5342fi
5343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5344   ac_c_werror_flag=$ac_save_c_werror_flag
5345fi
5346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5347$as_echo "$ac_cv_prog_cc_g" >&6; }
5348if test "$ac_test_CFLAGS" = set; then
5349  CFLAGS=$ac_save_CFLAGS
5350elif test $ac_cv_prog_cc_g = yes; then
5351  if test "$GCC" = yes; then
5352    CFLAGS="-g -O2"
5353  else
5354    CFLAGS="-g"
5355  fi
5356else
5357  if test "$GCC" = yes; then
5358    CFLAGS="-O2"
5359  else
5360    CFLAGS=
5361  fi
5362fi
5363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
5364$as_echo_n "checking for $CC option to enable C11 features... " >&6; }
5365if ${ac_cv_prog_cc_c11+:} false; then :
5366  $as_echo_n "(cached) " >&6
5367else
5368  ac_cv_prog_cc_c11=no
5369ac_save_CC=$CC
5370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5371/* end confdefs.h.  */
5372#include <stdarg.h>
5373#include <stdbool.h>
5374#include <stddef.h>
5375#include <stdlib.h>
5376#include <wchar.h>
5377#include <stdio.h>
5378
5379// Check varargs macros.  These examples are taken from C99 6.10.3.5.
5380#define debug(...) fprintf (stderr, __VA_ARGS__)
5381#define showlist(...) puts (#__VA_ARGS__)
5382#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
5383static void
5384test_varargs_macros (void)
5385{
5386  int x = 1234;
5387  int y = 5678;
5388  debug ("Flag");
5389  debug ("X = %d\n", x);
5390  showlist (The first, second, and third items.);
5391  report (x>y, "x is %d but y is %d", x, y);
5392}
5393
5394// Check long long types.
5395#define BIG64 18446744073709551615ull
5396#define BIG32 4294967295ul
5397#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
5398#if !BIG_OK
5399  your preprocessor is broken;
5400#endif
5401#if BIG_OK
5402#else
5403  your preprocessor is broken;
5404#endif
5405static long long int bignum = -9223372036854775807LL;
5406static unsigned long long int ubignum = BIG64;
5407
5408struct incomplete_array
5409{
5410  int datasize;
5411  double data[];
5412};
5413
5414struct named_init {
5415  int number;
5416  const wchar_t *name;
5417  double average;
5418};
5419
5420typedef const char *ccp;
5421
5422static inline int
5423test_restrict (ccp restrict text)
5424{
5425  // See if C++-style comments work.
5426  // Iterate through items via the restricted pointer.
5427  // Also check for declarations in for loops.
5428  for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5429    continue;
5430  return 0;
5431}
5432
5433// Check varargs and va_copy.
5434static bool
5435test_varargs (const char *format, ...)
5436{
5437  va_list args;
5438  va_start (args, format);
5439  va_list args_copy;
5440  va_copy (args_copy, args);
5441
5442  const char *str = "";
5443  int number = 0;
5444  float fnumber = 0;
5445
5446  while (*format)
5447    {
5448      switch (*format++)
5449	{
5450	case 's': // string
5451	  str = va_arg (args_copy, const char *);
5452	  break;
5453	case 'd': // int
5454	  number = va_arg (args_copy, int);
5455	  break;
5456	case 'f': // float
5457	  fnumber = va_arg (args_copy, double);
5458	  break;
5459	default:
5460	  break;
5461	}
5462    }
5463  va_end (args_copy);
5464  va_end (args);
5465
5466  return *str && number && fnumber;
5467}
5468// Check _Alignas.
5469char _Alignas (double) aligned_as_double;
5470char _Alignas (0) no_special_alignment;
5471extern char aligned_as_int;
5472char _Alignas (0) _Alignas (int) aligned_as_int;
5473
5474// Check _Alignof.
5475enum
5476{
5477  int_alignment = _Alignof (int),
5478  int_array_alignment = _Alignof (int[100]),
5479  char_alignment = _Alignof (char)
5480};
5481_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
5482
5483// Check _Noreturn.
5484int _Noreturn does_not_return (void) { for (;;) continue; }
5485
5486// Check _Static_assert.
5487struct test_static_assert
5488{
5489  int x;
5490  _Static_assert (sizeof (int) <= sizeof (long int),
5491                  "_Static_assert does not work in struct");
5492  long int y;
5493};
5494
5495// Check UTF-8 literals.
5496#define u8 syntax error!
5497char const utf8_literal[] = u8"happens to be ASCII" "another string";
5498
5499// Check duplicate typedefs.
5500typedef long *long_ptr;
5501typedef long int *long_ptr;
5502typedef long_ptr long_ptr;
5503
5504// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
5505struct anonymous
5506{
5507  union {
5508    struct { int i; int j; };
5509    struct { int k; long int l; } w;
5510  };
5511  int m;
5512} v1;
5513
5514int
5515main ()
5516{
5517
5518  // Check bool.
5519  _Bool success = false;
5520
5521  // Check restrict.
5522  if (test_restrict ("String literal") == 0)
5523    success = true;
5524  char *restrict newvar = "Another string";
5525
5526  // Check varargs.
5527  success &= test_varargs ("s, d' f .", "string", 65, 34.234);
5528  test_varargs_macros ();
5529
5530  // Check flexible array members.
5531  struct incomplete_array *ia =
5532    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5533  ia->datasize = 10;
5534  for (int i = 0; i < ia->datasize; ++i)
5535    ia->data[i] = i * 1.234;
5536
5537  // Check named initializers.
5538  struct named_init ni = {
5539    .number = 34,
5540    .name = L"Test wide string",
5541    .average = 543.34343,
5542  };
5543
5544  ni.number = 58;
5545
5546  int dynamic_array[ni.number];
5547  dynamic_array[ni.number - 1] = 543;
5548
5549  // work around unused variable warnings
5550  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5551	  || dynamic_array[ni.number - 1] != 543);
5552
5553  v1.i = 2;
5554  v1.w.k = 5;
5555  _Static_assert ((offsetof (struct anonymous, i)
5556		   == offsetof (struct anonymous, w.k)),
5557		  "Anonymous union alignment botch");
5558
5559  ;
5560  return 0;
5561}
5562_ACEOF
5563for ac_arg in '' -std=gnu11
5564do
5565  CC="$ac_save_CC $ac_arg"
5566  if ac_fn_c_try_compile "$LINENO"; then :
5567  ac_cv_prog_cc_c11=$ac_arg
5568fi
5569rm -f core conftest.err conftest.$ac_objext
5570  test "x$ac_cv_prog_cc_c11" != "xno" && break
5571done
5572rm -f conftest.$ac_ext
5573CC=$ac_save_CC
5574
5575fi
5576# AC_CACHE_VAL
5577ac_prog_cc_stdc_options=
5578case "x$ac_cv_prog_cc_c11" in
5579  x)
5580    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5581$as_echo "none needed" >&6; } ;;
5582  xno)
5583    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5584$as_echo "unsupported" >&6; } ;;
5585  *)
5586    ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c11"
5587    CC=$CC$ac_prog_cc_stdc_options
5588    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
5589$as_echo "$ac_cv_prog_cc_c11" >&6; } ;;
5590esac
5591if test "x$ac_cv_prog_cc_c11" != xno; then :
5592  ac_prog_cc_stdc=c11
5593		 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
5594else
5595  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
5596$as_echo_n "checking for $CC option to enable C99 features... " >&6; }
5597if ${ac_cv_prog_cc_c99+:} false; then :
5598  $as_echo_n "(cached) " >&6
5599else
5600  ac_cv_prog_cc_c99=no
5601ac_save_CC=$CC
5602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5603/* end confdefs.h.  */
5604#include <stdarg.h>
5605#include <stdbool.h>
5606#include <stddef.h>
5607#include <stdlib.h>
5608#include <wchar.h>
5609#include <stdio.h>
5610
5611// Check varargs macros.  These examples are taken from C99 6.10.3.5.
5612#define debug(...) fprintf (stderr, __VA_ARGS__)
5613#define showlist(...) puts (#__VA_ARGS__)
5614#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
5615static void
5616test_varargs_macros (void)
5617{
5618  int x = 1234;
5619  int y = 5678;
5620  debug ("Flag");
5621  debug ("X = %d\n", x);
5622  showlist (The first, second, and third items.);
5623  report (x>y, "x is %d but y is %d", x, y);
5624}
5625
5626// Check long long types.
5627#define BIG64 18446744073709551615ull
5628#define BIG32 4294967295ul
5629#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
5630#if !BIG_OK
5631  your preprocessor is broken;
5632#endif
5633#if BIG_OK
5634#else
5635  your preprocessor is broken;
5636#endif
5637static long long int bignum = -9223372036854775807LL;
5638static unsigned long long int ubignum = BIG64;
5639
5640struct incomplete_array
5641{
5642  int datasize;
5643  double data[];
5644};
5645
5646struct named_init {
5647  int number;
5648  const wchar_t *name;
5649  double average;
5650};
5651
5652typedef const char *ccp;
5653
5654static inline int
5655test_restrict (ccp restrict text)
5656{
5657  // See if C++-style comments work.
5658  // Iterate through items via the restricted pointer.
5659  // Also check for declarations in for loops.
5660  for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5661    continue;
5662  return 0;
5663}
5664
5665// Check varargs and va_copy.
5666static bool
5667test_varargs (const char *format, ...)
5668{
5669  va_list args;
5670  va_start (args, format);
5671  va_list args_copy;
5672  va_copy (args_copy, args);
5673
5674  const char *str = "";
5675  int number = 0;
5676  float fnumber = 0;
5677
5678  while (*format)
5679    {
5680      switch (*format++)
5681	{
5682	case 's': // string
5683	  str = va_arg (args_copy, const char *);
5684	  break;
5685	case 'd': // int
5686	  number = va_arg (args_copy, int);
5687	  break;
5688	case 'f': // float
5689	  fnumber = va_arg (args_copy, double);
5690	  break;
5691	default:
5692	  break;
5693	}
5694    }
5695  va_end (args_copy);
5696  va_end (args);
5697
5698  return *str && number && fnumber;
5699}
5700int
5701main ()
5702{
5703
5704  // Check bool.
5705  _Bool success = false;
5706
5707  // Check restrict.
5708  if (test_restrict ("String literal") == 0)
5709    success = true;
5710  char *restrict newvar = "Another string";
5711
5712  // Check varargs.
5713  success &= test_varargs ("s, d' f .", "string", 65, 34.234);
5714  test_varargs_macros ();
5715
5716  // Check flexible array members.
5717  struct incomplete_array *ia =
5718    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5719  ia->datasize = 10;
5720  for (int i = 0; i < ia->datasize; ++i)
5721    ia->data[i] = i * 1.234;
5722
5723  // Check named initializers.
5724  struct named_init ni = {
5725    .number = 34,
5726    .name = L"Test wide string",
5727    .average = 543.34343,
5728  };
5729
5730  ni.number = 58;
5731
5732  int dynamic_array[ni.number];
5733  dynamic_array[ni.number - 1] = 543;
5734
5735  // work around unused variable warnings
5736  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5737	  || dynamic_array[ni.number - 1] != 543);
5738
5739  ;
5740  return 0;
5741}
5742_ACEOF
5743for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99
5744do
5745  CC="$ac_save_CC $ac_arg"
5746  if ac_fn_c_try_compile "$LINENO"; then :
5747  ac_cv_prog_cc_c99=$ac_arg
5748fi
5749rm -f core conftest.err conftest.$ac_objext
5750  test "x$ac_cv_prog_cc_c99" != "xno" && break
5751done
5752rm -f conftest.$ac_ext
5753CC=$ac_save_CC
5754
5755fi
5756# AC_CACHE_VAL
5757ac_prog_cc_stdc_options=
5758case "x$ac_cv_prog_cc_c99" in
5759  x)
5760    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5761$as_echo "none needed" >&6; } ;;
5762  xno)
5763    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5764$as_echo "unsupported" >&6; } ;;
5765  *)
5766    ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c99"
5767    CC=$CC$ac_prog_cc_stdc_options
5768    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5769$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
5770esac
5771if test "x$ac_cv_prog_cc_c99" != xno; then :
5772  ac_prog_cc_stdc=c99
5773		    ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5774else
5775  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
5776$as_echo_n "checking for $CC option to enable C89 features... " >&6; }
5777if ${ac_cv_prog_cc_c89+:} false; then :
5778  $as_echo_n "(cached) " >&6
5779else
5780  ac_cv_prog_cc_c89=no
5781ac_save_CC=$CC
5782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5783/* end confdefs.h.  */
5784#include <stdarg.h>
5785#include <stdio.h>
5786struct stat;
5787/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5788struct buf { int x; };
5789FILE * (*rcsopen) (struct buf *, struct stat *, int);
5790static char *e (p, i)
5791     char **p;
5792     int i;
5793{
5794  return p[i];
5795}
5796static char *f (char * (*g) (char **, int), char **p, ...)
5797{
5798  char *s;
5799  va_list v;
5800  va_start (v,p);
5801  s = g (p, va_arg (v,int));
5802  va_end (v);
5803  return s;
5804}
5805
5806/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5807   function prototypes and stuff, but not '\xHH' hex character constants.
5808   These don't provoke an error unfortunately, instead are silently treated
5809   as 'x'.  The following induces an error, until -std is added to get
5810   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5811   array size at least.  It's necessary to write '\x00'==0 to get something
5812   that's true only with -std.  */
5813int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5814
5815/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5816   inside strings and character constants.  */
5817#define FOO(x) 'x'
5818int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5819
5820int test (int i, double x);
5821struct s1 {int (*f) (int a);};
5822struct s2 {int (*f) (double a);};
5823int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5824int argc;
5825char **argv;
5826int
5827main ()
5828{
5829return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5830  ;
5831  return 0;
5832}
5833_ACEOF
5834for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5835	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5836do
5837  CC="$ac_save_CC $ac_arg"
5838  if ac_fn_c_try_compile "$LINENO"; then :
5839  ac_cv_prog_cc_c89=$ac_arg
5840fi
5841rm -f core conftest.err conftest.$ac_objext
5842  test "x$ac_cv_prog_cc_c89" != "xno" && break
5843done
5844rm -f conftest.$ac_ext
5845CC=$ac_save_CC
5846
5847fi
5848# AC_CACHE_VAL
5849ac_prog_cc_stdc_options=
5850case "x$ac_cv_prog_cc_c89" in
5851  x)
5852    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5853$as_echo "none needed" >&6; } ;;
5854  xno)
5855    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5856$as_echo "unsupported" >&6; } ;;
5857  *)
5858    ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c89"
5859    CC=$CC$ac_prog_cc_stdc_options
5860    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5861$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5862esac
5863if test "x$ac_cv_prog_cc_c89" != xno; then :
5864  ac_prog_cc_stdc=c89
5865		       ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5866else
5867  ac_prog_cc_stdc=no
5868		       ac_cv_prog_cc_stdc=no
5869fi
5870
5871fi
5872
5873fi
5874
5875ac_ext=c
5876ac_cpp='$CPP $CPPFLAGS'
5877ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5878ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5879ac_compiler_gnu=$ac_cv_c_compiler_gnu
5880
5881
5882  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
5883$as_echo_n "checking whether the compiler is clang... " >&6; }
5884if ${gl_cv_compiler_clang+:} false; then :
5885  $as_echo_n "(cached) " >&6
5886else
5887                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5888/* end confdefs.h.  */
5889
5890           #ifdef __clang__
5891           barfbarf
5892           #endif
5893
5894int
5895main ()
5896{
5897
5898  ;
5899  return 0;
5900}
5901
5902_ACEOF
5903if ac_fn_c_try_compile "$LINENO"; then :
5904  gl_cv_compiler_clang=no
5905else
5906  gl_cv_compiler_clang=yes
5907fi
5908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5909
5910fi
5911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_clang" >&5
5912$as_echo "$gl_cv_compiler_clang" >&6; }
5913
5914
5915  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option needed when checking for declarations" >&5
5916$as_echo_n "checking for compiler option needed when checking for declarations... " >&6; }
5917if ${gl_cv_compiler_check_decl_option+:} false; then :
5918  $as_echo_n "(cached) " >&6
5919else
5920  if test $gl_cv_compiler_clang = yes; then
5921                     save_ac_compile="$ac_compile"
5922       ac_compile="$ac_compile -Werror=implicit-function-declaration"
5923                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5924/* end confdefs.h.  */
5925
5926int
5927main ()
5928{
5929
5930  ;
5931  return 0;
5932}
5933_ACEOF
5934if ac_fn_c_try_compile "$LINENO"; then :
5935  gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'
5936else
5937  gl_cv_compiler_check_decl_option=none
5938fi
5939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5940       ac_compile="$save_ac_compile"
5941     else
5942       gl_cv_compiler_check_decl_option=none
5943     fi
5944
5945fi
5946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_check_decl_option" >&5
5947$as_echo "$gl_cv_compiler_check_decl_option" >&6; }
5948  if test "x$gl_cv_compiler_check_decl_option" != xnone; then
5949    ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option"
5950  else
5951    ac_compile_for_check_decl="$ac_compile"
5952  fi
5953
5954
5955depcc="$CC"   am_compiler_list=
5956
5957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5958$as_echo_n "checking dependency style of $depcc... " >&6; }
5959if ${am_cv_CC_dependencies_compiler_type+:} false; then :
5960  $as_echo_n "(cached) " >&6
5961else
5962  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5963  # We make a subdir and do the tests there.  Otherwise we can end up
5964  # making bogus files that we don't know about and never remove.  For
5965  # instance it was reported that on HP-UX the gcc test will end up
5966  # making a dummy file named 'D' -- because '-MD' means "put the output
5967  # in D".
5968  rm -rf conftest.dir
5969  mkdir conftest.dir
5970  # Copy depcomp to subdir because otherwise we won't find it if we're
5971  # using a relative directory.
5972  cp "$am_depcomp" conftest.dir
5973  cd conftest.dir
5974  # We will build objects and dependencies in a subdirectory because
5975  # it helps to detect inapplicable dependency modes.  For instance
5976  # both Tru64's cc and ICC support -MD to output dependencies as a
5977  # side effect of compilation, but ICC will put the dependencies in
5978  # the current directory while Tru64 will put them in the object
5979  # directory.
5980  mkdir sub
5981
5982  am_cv_CC_dependencies_compiler_type=none
5983  if test "$am_compiler_list" = ""; then
5984     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5985  fi
5986  am__universal=false
5987  case " $depcc " in #(
5988     *\ -arch\ *\ -arch\ *) am__universal=true ;;
5989     esac
5990
5991  for depmode in $am_compiler_list; do
5992    # Setup a source with many dependencies, because some compilers
5993    # like to wrap large dependency lists on column 80 (with \), and
5994    # we should not choose a depcomp mode which is confused by this.
5995    #
5996    # We need to recreate these files for each test, as the compiler may
5997    # overwrite some of them when testing with obscure command lines.
5998    # This happens at least with the AIX C compiler.
5999    : > sub/conftest.c
6000    for i in 1 2 3 4 5 6; do
6001      echo '#include "conftst'$i'.h"' >> sub/conftest.c
6002      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
6003      # Solaris 10 /bin/sh.
6004      echo '/* dummy */' > sub/conftst$i.h
6005    done
6006    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6007
6008    # We check with '-c' and '-o' for the sake of the "dashmstdout"
6009    # mode.  It turns out that the SunPro C++ compiler does not properly
6010    # handle '-M -o', and we need to detect this.  Also, some Intel
6011    # versions had trouble with output in subdirs.
6012    am__obj=sub/conftest.${OBJEXT-o}
6013    am__minus_obj="-o $am__obj"
6014    case $depmode in
6015    gcc)
6016      # This depmode causes a compiler race in universal mode.
6017      test "$am__universal" = false || continue
6018      ;;
6019    nosideeffect)
6020      # After this tag, mechanisms are not by side-effect, so they'll
6021      # only be used when explicitly requested.
6022      if test "x$enable_dependency_tracking" = xyes; then
6023	continue
6024      else
6025	break
6026      fi
6027      ;;
6028    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
6029      # This compiler won't grok '-c -o', but also, the minuso test has
6030      # not run yet.  These depmodes are late enough in the game, and
6031      # so weak that their functioning should not be impacted.
6032      am__obj=conftest.${OBJEXT-o}
6033      am__minus_obj=
6034      ;;
6035    none) break ;;
6036    esac
6037    if depmode=$depmode \
6038       source=sub/conftest.c object=$am__obj \
6039       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6040       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
6041         >/dev/null 2>conftest.err &&
6042       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
6043       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6044       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
6045       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6046      # icc doesn't choke on unknown options, it will just issue warnings
6047      # or remarks (even with -Werror).  So we grep stderr for any message
6048      # that says an option was ignored or not supported.
6049      # When given -MP, icc 7.0 and 7.1 complain thusly:
6050      #   icc: Command line warning: ignoring option '-M'; no argument required
6051      # The diagnosis changed in icc 8.0:
6052      #   icc: Command line remark: option '-MP' not supported
6053      if (grep 'ignoring option' conftest.err ||
6054          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6055        am_cv_CC_dependencies_compiler_type=$depmode
6056        break
6057      fi
6058    fi
6059  done
6060
6061  cd ..
6062  rm -rf conftest.dir
6063else
6064  am_cv_CC_dependencies_compiler_type=none
6065fi
6066
6067fi
6068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6069$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6070CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6071
6072 if
6073  test "x$enable_dependency_tracking" != xno \
6074  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
6075  am__fastdepCC_TRUE=
6076  am__fastdepCC_FALSE='#'
6077else
6078  am__fastdepCC_TRUE='#'
6079  am__fastdepCC_FALSE=
6080fi
6081
6082
6083
6084
6085if test -n "$ac_tool_prefix"; then
6086  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6087set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6089$as_echo_n "checking for $ac_word... " >&6; }
6090if ${ac_cv_prog_RANLIB+:} false; then :
6091  $as_echo_n "(cached) " >&6
6092else
6093  if test -n "$RANLIB"; then
6094  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6095else
6096as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6097for as_dir in $PATH
6098do
6099  IFS=$as_save_IFS
6100  test -z "$as_dir" && as_dir=.
6101    for ac_exec_ext in '' $ac_executable_extensions; do
6102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6103    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6105    break 2
6106  fi
6107done
6108  done
6109IFS=$as_save_IFS
6110
6111fi
6112fi
6113RANLIB=$ac_cv_prog_RANLIB
6114if test -n "$RANLIB"; then
6115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6116$as_echo "$RANLIB" >&6; }
6117else
6118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6119$as_echo "no" >&6; }
6120fi
6121
6122
6123fi
6124if test -z "$ac_cv_prog_RANLIB"; then
6125  ac_ct_RANLIB=$RANLIB
6126  # Extract the first word of "ranlib", so it can be a program name with args.
6127set dummy ranlib; ac_word=$2
6128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6129$as_echo_n "checking for $ac_word... " >&6; }
6130if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6131  $as_echo_n "(cached) " >&6
6132else
6133  if test -n "$ac_ct_RANLIB"; then
6134  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6135else
6136as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6137for as_dir in $PATH
6138do
6139  IFS=$as_save_IFS
6140  test -z "$as_dir" && as_dir=.
6141    for ac_exec_ext in '' $ac_executable_extensions; do
6142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6143    ac_cv_prog_ac_ct_RANLIB="ranlib"
6144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6145    break 2
6146  fi
6147done
6148  done
6149IFS=$as_save_IFS
6150
6151fi
6152fi
6153ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6154if test -n "$ac_ct_RANLIB"; then
6155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6156$as_echo "$ac_ct_RANLIB" >&6; }
6157else
6158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6159$as_echo "no" >&6; }
6160fi
6161
6162  if test "x$ac_ct_RANLIB" = x; then
6163    RANLIB=":"
6164  else
6165    case $cross_compiling:$ac_tool_warned in
6166yes:)
6167{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6168$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6169ac_tool_warned=yes ;;
6170esac
6171    RANLIB=$ac_ct_RANLIB
6172  fi
6173else
6174  RANLIB="$ac_cv_prog_RANLIB"
6175fi
6176
6177for ac_prog in 'bison -y' byacc
6178do
6179  # Extract the first word of "$ac_prog", so it can be a program name with args.
6180set dummy $ac_prog; ac_word=$2
6181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6182$as_echo_n "checking for $ac_word... " >&6; }
6183if ${ac_cv_prog_YACC+:} false; then :
6184  $as_echo_n "(cached) " >&6
6185else
6186  if test -n "$YACC"; then
6187  ac_cv_prog_YACC="$YACC" # Let the user override the test.
6188else
6189as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6190for as_dir in $PATH
6191do
6192  IFS=$as_save_IFS
6193  test -z "$as_dir" && as_dir=.
6194    for ac_exec_ext in '' $ac_executable_extensions; do
6195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6196    ac_cv_prog_YACC="$ac_prog"
6197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6198    break 2
6199  fi
6200done
6201  done
6202IFS=$as_save_IFS
6203
6204fi
6205fi
6206YACC=$ac_cv_prog_YACC
6207if test -n "$YACC"; then
6208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6209$as_echo "$YACC" >&6; }
6210else
6211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6212$as_echo "no" >&6; }
6213fi
6214
6215
6216  test -n "$YACC" && break
6217done
6218test -n "$YACC" || YACC="yacc"
6219
6220
6221
6222ac_ext=c
6223ac_cpp='$CPP $CPPFLAGS'
6224ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6225ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6226ac_compiler_gnu=$ac_cv_c_compiler_gnu
6227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6228$as_echo_n "checking how to run the C preprocessor... " >&6; }
6229# On Suns, sometimes $CPP names a directory.
6230if test -n "$CPP" && test -d "$CPP"; then
6231  CPP=
6232fi
6233if test -z "$CPP"; then
6234  if ${ac_cv_prog_CPP+:} false; then :
6235  $as_echo_n "(cached) " >&6
6236else
6237      # Double quotes because CPP needs to be expanded
6238    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6239    do
6240      ac_preproc_ok=false
6241for ac_c_preproc_warn_flag in '' yes
6242do
6243  # Use a header file that comes with gcc, so configuring glibc
6244  # with a fresh cross-compiler works.
6245  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6246  # <limits.h> exists even on freestanding compilers.
6247  # On the NeXT, cc -E runs the code through the compiler's parser,
6248  # not just through cpp. "Syntax error" is here to catch this case.
6249  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6250/* end confdefs.h.  */
6251#ifdef __STDC__
6252# include <limits.h>
6253#else
6254# include <assert.h>
6255#endif
6256		     Syntax error
6257_ACEOF
6258if ac_fn_c_try_cpp "$LINENO"; then :
6259
6260else
6261  # Broken: fails on valid input.
6262continue
6263fi
6264rm -f conftest.err conftest.i conftest.$ac_ext
6265
6266  # OK, works on sane cases.  Now check whether nonexistent headers
6267  # can be detected and how.
6268  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6269/* end confdefs.h.  */
6270#include <ac_nonexistent.h>
6271_ACEOF
6272if ac_fn_c_try_cpp "$LINENO"; then :
6273  # Broken: success on invalid input.
6274continue
6275else
6276  # Passes both tests.
6277ac_preproc_ok=:
6278break
6279fi
6280rm -f conftest.err conftest.i conftest.$ac_ext
6281
6282done
6283# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6284rm -f conftest.i conftest.err conftest.$ac_ext
6285if $ac_preproc_ok; then :
6286  break
6287fi
6288
6289    done
6290    ac_cv_prog_CPP=$CPP
6291
6292fi
6293  CPP=$ac_cv_prog_CPP
6294else
6295  ac_cv_prog_CPP=$CPP
6296fi
6297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6298$as_echo "$CPP" >&6; }
6299ac_preproc_ok=false
6300for ac_c_preproc_warn_flag in '' yes
6301do
6302  # Use a header file that comes with gcc, so configuring glibc
6303  # with a fresh cross-compiler works.
6304  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6305  # <limits.h> exists even on freestanding compilers.
6306  # On the NeXT, cc -E runs the code through the compiler's parser,
6307  # not just through cpp. "Syntax error" is here to catch this case.
6308  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6309/* end confdefs.h.  */
6310#ifdef __STDC__
6311# include <limits.h>
6312#else
6313# include <assert.h>
6314#endif
6315		     Syntax error
6316_ACEOF
6317if ac_fn_c_try_cpp "$LINENO"; then :
6318
6319else
6320  # Broken: fails on valid input.
6321continue
6322fi
6323rm -f conftest.err conftest.i conftest.$ac_ext
6324
6325  # OK, works on sane cases.  Now check whether nonexistent headers
6326  # can be detected and how.
6327  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6328/* end confdefs.h.  */
6329#include <ac_nonexistent.h>
6330_ACEOF
6331if ac_fn_c_try_cpp "$LINENO"; then :
6332  # Broken: success on invalid input.
6333continue
6334else
6335  # Passes both tests.
6336ac_preproc_ok=:
6337break
6338fi
6339rm -f conftest.err conftest.i conftest.$ac_ext
6340
6341done
6342# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6343rm -f conftest.i conftest.err conftest.$ac_ext
6344if $ac_preproc_ok; then :
6345
6346else
6347  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6348$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6349as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
6350See \`config.log' for more details" "$LINENO" 5; }
6351fi
6352
6353ac_ext=c
6354ac_cpp='$CPP $CPPFLAGS'
6355ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6356ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6357ac_compiler_gnu=$ac_cv_c_compiler_gnu
6358
6359
6360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6361$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6362if ${ac_cv_path_GREP+:} false; then :
6363  $as_echo_n "(cached) " >&6
6364else
6365  if test -z "$GREP"; then
6366  ac_path_GREP_found=false
6367  # Loop through the user's path and test for each of PROGNAME-LIST
6368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6369for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6370do
6371  IFS=$as_save_IFS
6372  test -z "$as_dir" && as_dir=.
6373    for ac_prog in grep ggrep; do
6374    for ac_exec_ext in '' $ac_executable_extensions; do
6375      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6376      as_fn_executable_p "$ac_path_GREP" || continue
6377# Check for GNU ac_path_GREP and select it if it is found.
6378  # Check for GNU $ac_path_GREP
6379case `"$ac_path_GREP" --version 2>&1` in
6380*GNU*)
6381  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6382*)
6383  ac_count=0
6384  $as_echo_n 0123456789 >"conftest.in"
6385  while :
6386  do
6387    cat "conftest.in" "conftest.in" >"conftest.tmp"
6388    mv "conftest.tmp" "conftest.in"
6389    cp "conftest.in" "conftest.nl"
6390    $as_echo 'GREP' >> "conftest.nl"
6391    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6392    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6393    as_fn_arith $ac_count + 1 && ac_count=$as_val
6394    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6395      # Best one so far, save it but keep looking for a better one
6396      ac_cv_path_GREP="$ac_path_GREP"
6397      ac_path_GREP_max=$ac_count
6398    fi
6399    # 10*(2^10) chars as input seems more than enough
6400    test $ac_count -gt 10 && break
6401  done
6402  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6403esac
6404
6405      $ac_path_GREP_found && break 3
6406    done
6407  done
6408  done
6409IFS=$as_save_IFS
6410  if test -z "$ac_cv_path_GREP"; then
6411    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6412  fi
6413else
6414  ac_cv_path_GREP=$GREP
6415fi
6416
6417fi
6418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6419$as_echo "$ac_cv_path_GREP" >&6; }
6420 GREP="$ac_cv_path_GREP"
6421
6422
6423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6424$as_echo_n "checking for egrep... " >&6; }
6425if ${ac_cv_path_EGREP+:} false; then :
6426  $as_echo_n "(cached) " >&6
6427else
6428  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6429   then ac_cv_path_EGREP="$GREP -E"
6430   else
6431     if test -z "$EGREP"; then
6432  ac_path_EGREP_found=false
6433  # Loop through the user's path and test for each of PROGNAME-LIST
6434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6435for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6436do
6437  IFS=$as_save_IFS
6438  test -z "$as_dir" && as_dir=.
6439    for ac_prog in egrep; do
6440    for ac_exec_ext in '' $ac_executable_extensions; do
6441      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6442      as_fn_executable_p "$ac_path_EGREP" || continue
6443# Check for GNU ac_path_EGREP and select it if it is found.
6444  # Check for GNU $ac_path_EGREP
6445case `"$ac_path_EGREP" --version 2>&1` in
6446*GNU*)
6447  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6448*)
6449  ac_count=0
6450  $as_echo_n 0123456789 >"conftest.in"
6451  while :
6452  do
6453    cat "conftest.in" "conftest.in" >"conftest.tmp"
6454    mv "conftest.tmp" "conftest.in"
6455    cp "conftest.in" "conftest.nl"
6456    $as_echo 'EGREP' >> "conftest.nl"
6457    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6458    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6459    as_fn_arith $ac_count + 1 && ac_count=$as_val
6460    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6461      # Best one so far, save it but keep looking for a better one
6462      ac_cv_path_EGREP="$ac_path_EGREP"
6463      ac_path_EGREP_max=$ac_count
6464    fi
6465    # 10*(2^10) chars as input seems more than enough
6466    test $ac_count -gt 10 && break
6467  done
6468  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6469esac
6470
6471      $ac_path_EGREP_found && break 3
6472    done
6473  done
6474  done
6475IFS=$as_save_IFS
6476  if test -z "$ac_cv_path_EGREP"; then
6477    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6478  fi
6479else
6480  ac_cv_path_EGREP=$EGREP
6481fi
6482
6483   fi
6484fi
6485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6486$as_echo "$ac_cv_path_EGREP" >&6; }
6487 EGREP="$ac_cv_path_EGREP"
6488
6489
6490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6491$as_echo_n "checking for ANSI C header files... " >&6; }
6492if ${ac_cv_header_stdc+:} false; then :
6493  $as_echo_n "(cached) " >&6
6494else
6495  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6496/* end confdefs.h.  */
6497#include <stdlib.h>
6498#include <stdarg.h>
6499#include <string.h>
6500#include <float.h>
6501
6502int
6503main ()
6504{
6505
6506  ;
6507  return 0;
6508}
6509_ACEOF
6510if ac_fn_c_try_compile "$LINENO"; then :
6511  ac_cv_header_stdc=yes
6512else
6513  ac_cv_header_stdc=no
6514fi
6515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6516
6517if test $ac_cv_header_stdc = yes; then
6518  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6519  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6520/* end confdefs.h.  */
6521#include <string.h>
6522
6523_ACEOF
6524if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6525  $EGREP "memchr" >/dev/null 2>&1; then :
6526
6527else
6528  ac_cv_header_stdc=no
6529fi
6530rm -f conftest*
6531
6532fi
6533
6534if test $ac_cv_header_stdc = yes; then
6535  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6536  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6537/* end confdefs.h.  */
6538#include <stdlib.h>
6539
6540_ACEOF
6541if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6542  $EGREP "free" >/dev/null 2>&1; then :
6543
6544else
6545  ac_cv_header_stdc=no
6546fi
6547rm -f conftest*
6548
6549fi
6550
6551if test $ac_cv_header_stdc = yes; then
6552  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6553  if test "$cross_compiling" = yes; then :
6554  :
6555else
6556  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6557/* end confdefs.h.  */
6558#include <ctype.h>
6559#include <stdlib.h>
6560#if ((' ' & 0x0FF) == 0x020)
6561# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6562# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6563#else
6564# define ISLOWER(c) \
6565		   (('a' <= (c) && (c) <= 'i') \
6566		     || ('j' <= (c) && (c) <= 'r') \
6567		     || ('s' <= (c) && (c) <= 'z'))
6568# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6569#endif
6570
6571#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6572int
6573main ()
6574{
6575  int i;
6576  for (i = 0; i < 256; i++)
6577    if (XOR (islower (i), ISLOWER (i))
6578	|| toupper (i) != TOUPPER (i))
6579      return 2;
6580  return 0;
6581}
6582_ACEOF
6583if ac_fn_c_try_run "$LINENO"; then :
6584
6585else
6586  ac_cv_header_stdc=no
6587fi
6588rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6589  conftest.$ac_objext conftest.beam conftest.$ac_ext
6590fi
6591
6592fi
6593fi
6594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6595$as_echo "$ac_cv_header_stdc" >&6; }
6596if test $ac_cv_header_stdc = yes; then
6597
6598$as_echo "#define STDC_HEADERS 1" >>confdefs.h
6599
6600fi
6601
6602# On IRIX 5.3, sys/types and inttypes.h are conflicting.
6603for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6604		  inttypes.h stdint.h unistd.h
6605do :
6606  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6607ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6608"
6609if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6610  cat >>confdefs.h <<_ACEOF
6611#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6612_ACEOF
6613
6614fi
6615
6616done
6617
6618
6619
6620
6621
6622  for ac_header in $ac_header_list
6623do :
6624  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6625ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6626"
6627if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6628  cat >>confdefs.h <<_ACEOF
6629#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6630_ACEOF
6631
6632fi
6633
6634done
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6645$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6646if ${ac_cv_safe_to_define___extensions__+:} false; then :
6647  $as_echo_n "(cached) " >&6
6648else
6649  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6650/* end confdefs.h.  */
6651
6652#         define __EXTENSIONS__ 1
6653          $ac_includes_default
6654int
6655main ()
6656{
6657
6658  ;
6659  return 0;
6660}
6661_ACEOF
6662if ac_fn_c_try_compile "$LINENO"; then :
6663  ac_cv_safe_to_define___extensions__=yes
6664else
6665  ac_cv_safe_to_define___extensions__=no
6666fi
6667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6668fi
6669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6670$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6671
6672  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6673$as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6674if ${ac_cv_should_define__xopen_source+:} false; then :
6675  $as_echo_n "(cached) " >&6
6676else
6677  ac_cv_should_define__xopen_source=no
6678    if test $ac_cv_header_wchar_h = yes; then :
6679  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6680/* end confdefs.h.  */
6681
6682          #include <wchar.h>
6683          mbstate_t x;
6684int
6685main ()
6686{
6687
6688  ;
6689  return 0;
6690}
6691_ACEOF
6692if ac_fn_c_try_compile "$LINENO"; then :
6693
6694else
6695  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6696/* end confdefs.h.  */
6697
6698            #define _XOPEN_SOURCE 500
6699            #include <wchar.h>
6700            mbstate_t x;
6701int
6702main ()
6703{
6704
6705  ;
6706  return 0;
6707}
6708_ACEOF
6709if ac_fn_c_try_compile "$LINENO"; then :
6710  ac_cv_should_define__xopen_source=yes
6711fi
6712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6713fi
6714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6715fi
6716fi
6717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6718$as_echo "$ac_cv_should_define__xopen_source" >&6; }
6719
6720  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6721
6722  $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6723
6724  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6725
6726  $as_echo "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
6727
6728  $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
6729
6730  $as_echo "#define _OPENBSD_SOURCE 1" >>confdefs.h
6731
6732  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6733
6734  $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
6735
6736  $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
6737
6738  $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
6739
6740  $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
6741
6742  $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
6743
6744  $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
6745
6746  $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
6747
6748  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6749
6750  if test $ac_cv_header_minix_config_h = yes; then :
6751  MINIX=yes
6752    $as_echo "#define _MINIX 1" >>confdefs.h
6753
6754    $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6755
6756    $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6757
6758else
6759  MINIX=
6760fi
6761  if test $ac_cv_safe_to_define___extensions__ = yes; then :
6762  $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6763
6764fi
6765  if test $ac_cv_should_define__xopen_source = yes; then :
6766  $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6767
6768fi
6769
6770# Make sure we can run config.sub.
6771$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6772  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6773
6774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6775$as_echo_n "checking build system type... " >&6; }
6776if ${ac_cv_build+:} false; then :
6777  $as_echo_n "(cached) " >&6
6778else
6779  ac_build_alias=$build_alias
6780test "x$ac_build_alias" = x &&
6781  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6782test "x$ac_build_alias" = x &&
6783  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6784ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6785  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6786
6787fi
6788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6789$as_echo "$ac_cv_build" >&6; }
6790case $ac_cv_build in
6791*-*-*) ;;
6792*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6793esac
6794build=$ac_cv_build
6795ac_save_IFS=$IFS; IFS='-'
6796set x $ac_cv_build
6797shift
6798build_cpu=$1
6799build_vendor=$2
6800shift; shift
6801# Remember, the first character of IFS is used to create $*,
6802# except with old shells:
6803build_os=$*
6804IFS=$ac_save_IFS
6805case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6806
6807
6808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6809$as_echo_n "checking host system type... " >&6; }
6810if ${ac_cv_host+:} false; then :
6811  $as_echo_n "(cached) " >&6
6812else
6813  if test "x$host_alias" = x; then
6814  ac_cv_host=$ac_cv_build
6815else
6816  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6817    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6818fi
6819
6820fi
6821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6822$as_echo "$ac_cv_host" >&6; }
6823case $ac_cv_host in
6824*-*-*) ;;
6825*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6826esac
6827host=$ac_cv_host
6828ac_save_IFS=$IFS; IFS='-'
6829set x $ac_cv_host
6830shift
6831host_cpu=$1
6832host_vendor=$2
6833shift; shift
6834# Remember, the first character of IFS is used to create $*,
6835# except with old shells:
6836host_os=$*
6837IFS=$ac_save_IFS
6838case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6839
6840
6841
6842
6843
6844
6845  case "$host_os" in
6846    openbsd*)
6847
6848$as_echo "#define _ISOC11_SOURCE 1" >>confdefs.h
6849
6850      ;;
6851  esac
6852
6853
6854
6855
6856  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6857$as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
6858if ${gl_cv_c_amsterdam_compiler+:} false; then :
6859  $as_echo_n "(cached) " >&6
6860else
6861
6862      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6863/* end confdefs.h.  */
6864
6865#ifdef __ACK__
6866Amsterdam
6867#endif
6868
6869_ACEOF
6870if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6871  $EGREP "Amsterdam" >/dev/null 2>&1; then :
6872  gl_cv_c_amsterdam_compiler=yes
6873else
6874  gl_cv_c_amsterdam_compiler=no
6875fi
6876rm -f conftest*
6877
6878
6879fi
6880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6881$as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6882
6883      if test $gl_cv_c_amsterdam_compiler = yes; then
6884    if test -z "$AR"; then
6885      AR='cc -c.a'
6886    fi
6887    if test -z "$ARFLAGS"; then
6888      ARFLAGS='-o'
6889    fi
6890  else
6891                                                :
6892  fi
6893
6894        if test -n "$ac_tool_prefix"; then
6895  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6896set dummy ${ac_tool_prefix}ar; ac_word=$2
6897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6898$as_echo_n "checking for $ac_word... " >&6; }
6899if ${ac_cv_prog_AR+:} false; then :
6900  $as_echo_n "(cached) " >&6
6901else
6902  if test -n "$AR"; then
6903  ac_cv_prog_AR="$AR" # Let the user override the test.
6904else
6905as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6906for as_dir in $PATH
6907do
6908  IFS=$as_save_IFS
6909  test -z "$as_dir" && as_dir=.
6910    for ac_exec_ext in '' $ac_executable_extensions; do
6911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6912    ac_cv_prog_AR="${ac_tool_prefix}ar"
6913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6914    break 2
6915  fi
6916done
6917  done
6918IFS=$as_save_IFS
6919
6920fi
6921fi
6922AR=$ac_cv_prog_AR
6923if test -n "$AR"; then
6924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6925$as_echo "$AR" >&6; }
6926else
6927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6928$as_echo "no" >&6; }
6929fi
6930
6931
6932fi
6933if test -z "$ac_cv_prog_AR"; then
6934  ac_ct_AR=$AR
6935  # Extract the first word of "ar", so it can be a program name with args.
6936set dummy ar; ac_word=$2
6937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6938$as_echo_n "checking for $ac_word... " >&6; }
6939if ${ac_cv_prog_ac_ct_AR+:} false; then :
6940  $as_echo_n "(cached) " >&6
6941else
6942  if test -n "$ac_ct_AR"; then
6943  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6944else
6945as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6946for as_dir in $PATH
6947do
6948  IFS=$as_save_IFS
6949  test -z "$as_dir" && as_dir=.
6950    for ac_exec_ext in '' $ac_executable_extensions; do
6951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6952    ac_cv_prog_ac_ct_AR="ar"
6953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6954    break 2
6955  fi
6956done
6957  done
6958IFS=$as_save_IFS
6959
6960fi
6961fi
6962ac_ct_AR=$ac_cv_prog_ac_ct_AR
6963if test -n "$ac_ct_AR"; then
6964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6965$as_echo "$ac_ct_AR" >&6; }
6966else
6967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6968$as_echo "no" >&6; }
6969fi
6970
6971  if test "x$ac_ct_AR" = x; then
6972    AR="ar"
6973  else
6974    case $cross_compiling:$ac_tool_warned in
6975yes:)
6976{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6977$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6978ac_tool_warned=yes ;;
6979esac
6980    AR=$ac_ct_AR
6981  fi
6982else
6983  AR="$ac_cv_prog_AR"
6984fi
6985
6986  if test -z "$ARFLAGS"; then
6987    ARFLAGS='cr'
6988  fi
6989
6990
6991
6992  if test -z "$RANLIB"; then
6993    if test $gl_cv_c_amsterdam_compiler = yes; then
6994      RANLIB=':'
6995    else
6996            if test -n "$ac_tool_prefix"; then
6997  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6998set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7000$as_echo_n "checking for $ac_word... " >&6; }
7001if ${ac_cv_prog_RANLIB+:} false; then :
7002  $as_echo_n "(cached) " >&6
7003else
7004  if test -n "$RANLIB"; then
7005  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7006else
7007as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7008for as_dir in $PATH
7009do
7010  IFS=$as_save_IFS
7011  test -z "$as_dir" && as_dir=.
7012    for ac_exec_ext in '' $ac_executable_extensions; do
7013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7014    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7016    break 2
7017  fi
7018done
7019  done
7020IFS=$as_save_IFS
7021
7022fi
7023fi
7024RANLIB=$ac_cv_prog_RANLIB
7025if test -n "$RANLIB"; then
7026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7027$as_echo "$RANLIB" >&6; }
7028else
7029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7030$as_echo "no" >&6; }
7031fi
7032
7033
7034fi
7035if test -z "$ac_cv_prog_RANLIB"; then
7036  ac_ct_RANLIB=$RANLIB
7037  # Extract the first word of "ranlib", so it can be a program name with args.
7038set dummy ranlib; ac_word=$2
7039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7040$as_echo_n "checking for $ac_word... " >&6; }
7041if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
7042  $as_echo_n "(cached) " >&6
7043else
7044  if test -n "$ac_ct_RANLIB"; then
7045  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7046else
7047as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7048for as_dir in $PATH
7049do
7050  IFS=$as_save_IFS
7051  test -z "$as_dir" && as_dir=.
7052    for ac_exec_ext in '' $ac_executable_extensions; do
7053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7054    ac_cv_prog_ac_ct_RANLIB="ranlib"
7055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7056    break 2
7057  fi
7058done
7059  done
7060IFS=$as_save_IFS
7061
7062fi
7063fi
7064ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7065if test -n "$ac_ct_RANLIB"; then
7066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7067$as_echo "$ac_ct_RANLIB" >&6; }
7068else
7069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7070$as_echo "no" >&6; }
7071fi
7072
7073  if test "x$ac_ct_RANLIB" = x; then
7074    RANLIB=":"
7075  else
7076    case $cross_compiling:$ac_tool_warned in
7077yes:)
7078{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7079$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7080ac_tool_warned=yes ;;
7081esac
7082    RANLIB=$ac_ct_RANLIB
7083  fi
7084else
7085  RANLIB="$ac_cv_prog_RANLIB"
7086fi
7087
7088    fi
7089  fi
7090
7091
7092
7093
7094
7095  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
7096$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
7097if ${ac_cv_sys_largefile_source+:} false; then :
7098  $as_echo_n "(cached) " >&6
7099else
7100  while :; do
7101  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7102/* end confdefs.h.  */
7103#include <sys/types.h> /* for off_t */
7104     #include <stdio.h>
7105int
7106main ()
7107{
7108int (*fp) (FILE *, off_t, int) = fseeko;
7109     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
7110  ;
7111  return 0;
7112}
7113_ACEOF
7114if ac_fn_c_try_link "$LINENO"; then :
7115  ac_cv_sys_largefile_source=no; break
7116fi
7117rm -f core conftest.err conftest.$ac_objext \
7118    conftest$ac_exeext conftest.$ac_ext
7119  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7120/* end confdefs.h.  */
7121#define _LARGEFILE_SOURCE 1
7122#include <sys/types.h> /* for off_t */
7123     #include <stdio.h>
7124int
7125main ()
7126{
7127int (*fp) (FILE *, off_t, int) = fseeko;
7128     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
7129  ;
7130  return 0;
7131}
7132_ACEOF
7133if ac_fn_c_try_link "$LINENO"; then :
7134  ac_cv_sys_largefile_source=1; break
7135fi
7136rm -f core conftest.err conftest.$ac_objext \
7137    conftest$ac_exeext conftest.$ac_ext
7138  ac_cv_sys_largefile_source=unknown
7139  break
7140done
7141fi
7142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
7143$as_echo "$ac_cv_sys_largefile_source" >&6; }
7144case $ac_cv_sys_largefile_source in #(
7145  no | unknown) ;;
7146  *)
7147cat >>confdefs.h <<_ACEOF
7148#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
7149_ACEOF
7150;;
7151esac
7152rm -rf conftest*
7153
7154# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
7155# in glibc 2.1.3, but that breaks too many other things.
7156# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
7157if test $ac_cv_sys_largefile_source != unknown; then
7158
7159$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
7160
7161fi
7162
7163  case "$host_os" in
7164    hpux*)
7165
7166$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
7167
7168      ;;
7169  esac
7170
7171# Check whether --enable-largefile was given.
7172if test "${enable_largefile+set}" = set; then :
7173  enableval=$enable_largefile;
7174fi
7175
7176if test "$enable_largefile" != no; then
7177
7178  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
7179$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
7180if ${ac_cv_sys_largefile_CC+:} false; then :
7181  $as_echo_n "(cached) " >&6
7182else
7183  ac_cv_sys_largefile_CC=no
7184     if test "$GCC" != yes; then
7185       ac_save_CC=$CC
7186       while :; do
7187         # IRIX 6.2 and later do not support large files by default,
7188         # so use the C compiler's -n32 option if that helps.
7189         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7190/* end confdefs.h.  */
7191#include <sys/types.h>
7192 /* Check that off_t can represent 2**63 - 1 correctly.
7193    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7194    since some C++ compilers masquerading as C compilers
7195    incorrectly reject 9223372036854775807.  */
7196#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
7197  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7198                       && LARGE_OFF_T % 2147483647 == 1)
7199                      ? 1 : -1];
7200int
7201main ()
7202{
7203
7204  ;
7205  return 0;
7206}
7207_ACEOF
7208         if ac_fn_c_try_compile "$LINENO"; then :
7209  break
7210fi
7211rm -f core conftest.err conftest.$ac_objext
7212         CC="$CC -n32"
7213         if ac_fn_c_try_compile "$LINENO"; then :
7214  ac_cv_sys_largefile_CC=' -n32'; break
7215fi
7216rm -f core conftest.err conftest.$ac_objext
7217         break
7218       done
7219       CC=$ac_save_CC
7220       rm -f conftest.$ac_ext
7221    fi
7222fi
7223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
7224$as_echo "$ac_cv_sys_largefile_CC" >&6; }
7225  if test "$ac_cv_sys_largefile_CC" != no; then
7226    CC=$CC$ac_cv_sys_largefile_CC
7227  fi
7228
7229  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7230$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
7231if ${ac_cv_sys_file_offset_bits+:} false; then :
7232  $as_echo_n "(cached) " >&6
7233else
7234  while :; do
7235  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7236/* end confdefs.h.  */
7237#include <sys/types.h>
7238 /* Check that off_t can represent 2**63 - 1 correctly.
7239    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7240    since some C++ compilers masquerading as C compilers
7241    incorrectly reject 9223372036854775807.  */
7242#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
7243  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7244                       && LARGE_OFF_T % 2147483647 == 1)
7245                      ? 1 : -1];
7246int
7247main ()
7248{
7249
7250  ;
7251  return 0;
7252}
7253_ACEOF
7254if ac_fn_c_try_compile "$LINENO"; then :
7255  ac_cv_sys_file_offset_bits=no; break
7256fi
7257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7258  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7259/* end confdefs.h.  */
7260#define _FILE_OFFSET_BITS 64
7261#include <sys/types.h>
7262 /* Check that off_t can represent 2**63 - 1 correctly.
7263    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7264    since some C++ compilers masquerading as C compilers
7265    incorrectly reject 9223372036854775807.  */
7266#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
7267  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7268                       && LARGE_OFF_T % 2147483647 == 1)
7269                      ? 1 : -1];
7270int
7271main ()
7272{
7273
7274  ;
7275  return 0;
7276}
7277_ACEOF
7278if ac_fn_c_try_compile "$LINENO"; then :
7279  ac_cv_sys_file_offset_bits=64; break
7280fi
7281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7282  ac_cv_sys_file_offset_bits=unknown
7283  break
7284done
7285fi
7286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
7287$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
7288case $ac_cv_sys_file_offset_bits in #(
7289  no | unknown) ;;
7290  *)
7291cat >>confdefs.h <<_ACEOF
7292#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7293_ACEOF
7294;;
7295esac
7296rm -rf conftest*
7297  if test $ac_cv_sys_file_offset_bits = unknown; then
7298    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
7299$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
7300if ${ac_cv_sys_large_files+:} false; then :
7301  $as_echo_n "(cached) " >&6
7302else
7303  while :; do
7304  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7305/* end confdefs.h.  */
7306#include <sys/types.h>
7307 /* Check that off_t can represent 2**63 - 1 correctly.
7308    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7309    since some C++ compilers masquerading as C compilers
7310    incorrectly reject 9223372036854775807.  */
7311#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
7312  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7313                       && LARGE_OFF_T % 2147483647 == 1)
7314                      ? 1 : -1];
7315int
7316main ()
7317{
7318
7319  ;
7320  return 0;
7321}
7322_ACEOF
7323if ac_fn_c_try_compile "$LINENO"; then :
7324  ac_cv_sys_large_files=no; break
7325fi
7326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7327  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7328/* end confdefs.h.  */
7329#define _LARGE_FILES 1
7330#include <sys/types.h>
7331 /* Check that off_t can represent 2**63 - 1 correctly.
7332    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7333    since some C++ compilers masquerading as C compilers
7334    incorrectly reject 9223372036854775807.  */
7335#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
7336  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7337                       && LARGE_OFF_T % 2147483647 == 1)
7338                      ? 1 : -1];
7339int
7340main ()
7341{
7342
7343  ;
7344  return 0;
7345}
7346_ACEOF
7347if ac_fn_c_try_compile "$LINENO"; then :
7348  ac_cv_sys_large_files=1; break
7349fi
7350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7351  ac_cv_sys_large_files=unknown
7352  break
7353done
7354fi
7355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
7356$as_echo "$ac_cv_sys_large_files" >&6; }
7357case $ac_cv_sys_large_files in #(
7358  no | unknown) ;;
7359  *)
7360cat >>confdefs.h <<_ACEOF
7361#define _LARGE_FILES $ac_cv_sys_large_files
7362_ACEOF
7363;;
7364esac
7365rm -rf conftest*
7366  fi
7367fi
7368
7369
7370
7371
7372  # Pre-early section.
7373
7374
7375
7376
7377  # Code from module absolute-header:
7378  # Code from module acl-permissions:
7379  # Code from module alignof:
7380  # Code from module alloca:
7381  # Code from module alloca-opt:
7382  # Code from module allocator:
7383  # Code from module areadlink:
7384  # Code from module areadlink-with-size:
7385  # Code from module areadlinkat:
7386  # Code from module areadlinkat-with-size:
7387  # Code from module argmatch:
7388  # Code from module argp:
7389  # Code from module argp-version-etc:
7390  # Code from module assure:
7391  # Code from module at-internal:
7392  # Code from module attribute:
7393  # Code from module backupfile:
7394  # Code from module basename-lgpl:
7395  # Code from module bison:
7396  # Code from module bitrotate:
7397  # Code from module btowc:
7398  # Code from module builtin-expect:
7399  # Code from module c-ctype:
7400  # Code from module c-strcase:
7401  # Code from module c-strcaseeq:
7402  # Code from module c99:
7403  # Code from module canonicalize-lgpl:
7404  # Code from module careadlinkat:
7405  # Code from module chdir:
7406  # Code from module chdir-long:
7407  # Code from module chown:
7408  # Code from module clock-time:
7409  # Code from module cloexec:
7410  # Code from module close:
7411  # Code from module close-stream:
7412  # Code from module closedir:
7413  # Code from module closeout:
7414  # Code from module configmake:
7415  # Code from module ctype:
7416  # Code from module d-ino:
7417  # Code from module dirent:
7418  # Code from module dirent-safer:
7419  # Code from module dirfd:
7420  # Code from module dirname:
7421  # Code from module dirname-lgpl:
7422  # Code from module double-slash-root:
7423  # Code from module dup:
7424  # Code from module dup2:
7425  # Code from module eloop-threshold:
7426  # Code from module environ:
7427  # Code from module errno:
7428  # Code from module error:
7429  # Code from module euidaccess:
7430  # Code from module exclude:
7431  # Code from module exitfail:
7432  # Code from module extensions:
7433  # Code from module extern-inline:
7434  # Code from module faccessat:
7435  # Code from module fchdir:
7436  # Code from module fchmodat:
7437  # Code from module fchownat:
7438  # Code from module fcntl:
7439  # Code from module fcntl-h:
7440  # Code from module fcntl-safer:
7441  # Code from module fd-hook:
7442  # Code from module fd-safer-flag:
7443  # Code from module fdopendir:
7444  # Code from module fdutimensat:
7445  # Code from module file-has-acl:
7446  # Code from module fileblocks:
7447  # Code from module filename:
7448  # Code from module filenamecat-lgpl:
7449  # Code from module flexmember:
7450  # Code from module float:
7451  # Code from module fnmatch:
7452  # Code from module fnmatch-gnu:
7453  # Code from module fnmatch-h:
7454  # Code from module fopen:
7455  # Code from module fopen-gnu:
7456  # Code from module fpending:
7457  # Code from module fprintftime:
7458  # Code from module free-posix:
7459  # Code from module fseek:
7460  # Code from module fseeko:
7461
7462  # Code from module fstat:
7463  # Code from module fstatat:
7464  # Code from module full-write:
7465  # Code from module futimens:
7466  # Code from module getcwd:
7467  # Code from module getcwd-lgpl:
7468  # Code from module getdelim:
7469  # Code from module getdtablesize:
7470  # Code from module getgroups:
7471  # Code from module getline:
7472  # Code from module getopt-gnu:
7473  # Code from module getopt-posix:
7474  # Code from module getpagesize:
7475  # Code from module getprogname:
7476  # Code from module getrandom:
7477  # Code from module gettext:
7478  # Code from module gettext-h:
7479  # Code from module gettime:
7480  # Code from module gettimeofday:
7481  # Code from module gitlog-to-changelog:
7482  # Code from module group-member:
7483  # Code from module hard-locale:
7484  # Code from module hash:
7485  # Code from module havelib:
7486  # Code from module human:
7487  # Code from module idx:
7488  # Code from module include_next:
7489  # Code from module intprops:
7490  # Code from module inttostr:
7491  # Code from module inttypes:
7492  # Code from module inttypes-incomplete:
7493  # Code from module isblank:
7494  # Code from module iswblank:
7495  # Code from module iswdigit:
7496  # Code from module iswxdigit:
7497  # Code from module langinfo:
7498  # Code from module largefile:
7499
7500  # Code from module lchmod:
7501  # Code from module lchown:
7502  # Code from module libc-config:
7503  # Code from module limits-h:
7504  # Code from module link:
7505  # Code from module link-follow:
7506  # Code from module linkat:
7507  # Code from module localcharset:
7508  # Code from module locale:
7509  # Code from module localeconv:
7510  # Code from module lseek:
7511  # Code from module lstat:
7512  # Code from module malloc-gnu:
7513  # Code from module malloc-posix:
7514  # Code from module malloca:
7515  # Code from module manywarnings:
7516  # Code from module mbchar:
7517  # Code from module mbrtowc:
7518  # Code from module mbscasecmp:
7519  # Code from module mbsinit:
7520  # Code from module mbsrtowcs:
7521  # Code from module mbtowc:
7522  # Code from module mbuiter:
7523  # Code from module memchr:
7524  # Code from module mempcpy:
7525  # Code from module memrchr:
7526  # Code from module minmax:
7527  # Code from module mkdir:
7528  # Code from module mkdirat:
7529  # Code from module mkdtemp:
7530  # Code from module mkfifo:
7531  # Code from module mkfifoat:
7532  # Code from module mknod:
7533  # Code from module mktime:
7534  # Code from module mktime-internal:
7535  # Code from module modechange:
7536  # Code from module msvc-inval:
7537  # Code from module msvc-nothrow:
7538  # Code from module multiarch:
7539  # Code from module nl_langinfo:
7540  # Code from module nocrash:
7541  # Code from module nstrftime:
7542  # Code from module obstack:
7543  # Code from module open:
7544  # Code from module openat:
7545  # Code from module openat-die:
7546  # Code from module openat-h:
7547  # Code from module openat-safer:
7548  # Code from module opendir:
7549  # Code from module opendirat:
7550  # Code from module parse-datetime:
7551  # Code from module pathmax:
7552  # Code from module pipe-posix:
7553  # Code from module priv-set:
7554  # Code from module progname:
7555  # Code from module quote:
7556  # Code from module quotearg:
7557  # Code from module quotearg-simple:
7558  # Code from module raise:
7559  # Code from module rawmemchr:
7560  # Code from module read:
7561  # Code from module readdir:
7562  # Code from module readlink:
7563  # Code from module readlinkat:
7564  # Code from module realloc-posix:
7565  # Code from module regex:
7566  # Code from module rename:
7567  # Code from module renameat:
7568  # Code from module renameatu:
7569  # Code from module rewinddir:
7570  # Code from module rmdir:
7571  # Code from module root-uid:
7572  # Code from module rpmatch:
7573  # Code from module safe-read:
7574  # Code from module safe-write:
7575  # Code from module same-inode:
7576  # Code from module save-cwd:
7577  # Code from module savedir:
7578  # Code from module scratch_buffer:
7579  # Code from module selinux-at:
7580  # Code from module selinux-h:
7581  # Code from module setenv:
7582  # Code from module setlocale-null:
7583  # Code from module signal-h:
7584  # Code from module size_max:
7585  # Code from module sleep:
7586  # Code from module snippet/_Noreturn:
7587  # Code from module snippet/arg-nonnull:
7588  # Code from module snippet/c++defs:
7589  # Code from module snippet/unused-parameter:
7590  # Code from module snippet/warn-on-use:
7591  # Code from module snprintf:
7592  # Code from module ssize_t:
7593  # Code from module stat:
7594  # Code from module stat-macros:
7595  # Code from module stat-time:
7596  # Code from module statat:
7597  # Code from module std-gnu11:
7598  # Code from module stdalign:
7599  # Code from module stdarg:
7600
7601
7602
7603  # Code from module stdbool:
7604  # Code from module stddef:
7605  # Code from module stdint:
7606  # Code from module stdio:
7607  # Code from module stdlib:
7608  # Code from module stdopen:
7609  # Code from module stpcpy:
7610  # Code from module strcase:
7611  # Code from module strchrnul:
7612  # Code from module strdup-posix:
7613  # Code from module streq:
7614  # Code from module strerror:
7615  # Code from module strerror-override:
7616  # Code from module string:
7617  # Code from module strings:
7618  # Code from module strndup:
7619  # Code from module strnlen:
7620  # Code from module strnlen1:
7621  # Code from module strtoimax:
7622  # Code from module strtol:
7623  # Code from module strtoll:
7624  # Code from module strtoul:
7625  # Code from module strtoull:
7626  # Code from module strtoumax:
7627  # Code from module symlink:
7628  # Code from module symlinkat:
7629  # Code from module sys_random:
7630  # Code from module sys_stat:
7631  # Code from module sys_time:
7632  # Code from module sys_types:
7633  # Code from module sysexits:
7634  # Code from module tempname:
7635  # Code from module time:
7636  # Code from module time_r:
7637  # Code from module time_rz:
7638  # Code from module timegm:
7639  # Code from module timespec:
7640  # Code from module timespec-sub:
7641  # Code from module tzset:
7642  # Code from module unistd:
7643  # Code from module unistd-safer:
7644  # Code from module unitypes:
7645  # Code from module uniwidth/base:
7646  # Code from module uniwidth/width:
7647  # Code from module unlink:
7648  # Code from module unlinkat:
7649  # Code from module unlinkdir:
7650  # Code from module unlocked-io:
7651  # Code from module unsetenv:
7652  # Code from module utime:
7653  # Code from module utime-h:
7654  # Code from module utimens:
7655  # Code from module utimensat:
7656  # Code from module vasnprintf:
7657  # Code from module vasprintf:
7658  # Code from module verify:
7659  # Code from module version-etc:
7660  # Code from module version-etc-fsf:
7661  # Code from module vsnprintf:
7662  # Code from module warnings:
7663  # Code from module wchar:
7664  # Code from module wcrtomb:
7665  # Code from module wctype-h:
7666  # Code from module wcwidth:
7667  # Code from module wmemchr:
7668  # Code from module wmempcpy:
7669  # Code from module write:
7670  # Code from module xalloc:
7671  # Code from module xalloc-die:
7672  # Code from module xalloc-oversized:
7673  # Code from module xgetcwd:
7674  # Code from module xsize:
7675  # Code from module xstrndup:
7676  # Code from module xstrtol:
7677  # Code from module xstrtoumax:
7678  # Code from module xvasprintf:
7679
7680if test -n "$ac_tool_prefix"; then
7681  for ac_prog in ar
7682  do
7683    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7684set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7686$as_echo_n "checking for $ac_word... " >&6; }
7687if ${ac_cv_prog_AR+:} false; then :
7688  $as_echo_n "(cached) " >&6
7689else
7690  if test -n "$AR"; then
7691  ac_cv_prog_AR="$AR" # Let the user override the test.
7692else
7693as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7694for as_dir in $PATH
7695do
7696  IFS=$as_save_IFS
7697  test -z "$as_dir" && as_dir=.
7698    for ac_exec_ext in '' $ac_executable_extensions; do
7699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7700    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
7701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7702    break 2
7703  fi
7704done
7705  done
7706IFS=$as_save_IFS
7707
7708fi
7709fi
7710AR=$ac_cv_prog_AR
7711if test -n "$AR"; then
7712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7713$as_echo "$AR" >&6; }
7714else
7715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7716$as_echo "no" >&6; }
7717fi
7718
7719
7720    test -n "$AR" && break
7721  done
7722fi
7723if test -z "$AR"; then
7724  ac_ct_AR=$AR
7725  for ac_prog in ar
7726do
7727  # Extract the first word of "$ac_prog", so it can be a program name with args.
7728set dummy $ac_prog; ac_word=$2
7729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7730$as_echo_n "checking for $ac_word... " >&6; }
7731if ${ac_cv_prog_ac_ct_AR+:} false; then :
7732  $as_echo_n "(cached) " >&6
7733else
7734  if test -n "$ac_ct_AR"; then
7735  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7736else
7737as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7738for as_dir in $PATH
7739do
7740  IFS=$as_save_IFS
7741  test -z "$as_dir" && as_dir=.
7742    for ac_exec_ext in '' $ac_executable_extensions; do
7743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7744    ac_cv_prog_ac_ct_AR="$ac_prog"
7745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7746    break 2
7747  fi
7748done
7749  done
7750IFS=$as_save_IFS
7751
7752fi
7753fi
7754ac_ct_AR=$ac_cv_prog_ac_ct_AR
7755if test -n "$ac_ct_AR"; then
7756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7757$as_echo "$ac_ct_AR" >&6; }
7758else
7759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7760$as_echo "no" >&6; }
7761fi
7762
7763
7764  test -n "$ac_ct_AR" && break
7765done
7766
7767  if test "x$ac_ct_AR" = x; then
7768    AR=""
7769  else
7770    case $cross_compiling:$ac_tool_warned in
7771yes:)
7772{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7773$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7774ac_tool_warned=yes ;;
7775esac
7776    AR=$ac_ct_AR
7777  fi
7778fi
7779
7780
7781# Check whether --enable-largefile was given.
7782if test "${enable_largefile+set}" = set; then :
7783  enableval=$enable_largefile;
7784fi
7785
7786if test "$enable_largefile" != no; then
7787
7788  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
7789$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
7790if ${ac_cv_sys_largefile_CC+:} false; then :
7791  $as_echo_n "(cached) " >&6
7792else
7793  ac_cv_sys_largefile_CC=no
7794     if test "$GCC" != yes; then
7795       ac_save_CC=$CC
7796       while :; do
7797         # IRIX 6.2 and later do not support large files by default,
7798         # so use the C compiler's -n32 option if that helps.
7799         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7800/* end confdefs.h.  */
7801#include <sys/types.h>
7802 /* Check that off_t can represent 2**63 - 1 correctly.
7803    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7804    since some C++ compilers masquerading as C compilers
7805    incorrectly reject 9223372036854775807.  */
7806#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
7807  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7808                       && LARGE_OFF_T % 2147483647 == 1)
7809                      ? 1 : -1];
7810int
7811main ()
7812{
7813
7814  ;
7815  return 0;
7816}
7817_ACEOF
7818         if ac_fn_c_try_compile "$LINENO"; then :
7819  break
7820fi
7821rm -f core conftest.err conftest.$ac_objext
7822         CC="$CC -n32"
7823         if ac_fn_c_try_compile "$LINENO"; then :
7824  ac_cv_sys_largefile_CC=' -n32'; break
7825fi
7826rm -f core conftest.err conftest.$ac_objext
7827         break
7828       done
7829       CC=$ac_save_CC
7830       rm -f conftest.$ac_ext
7831    fi
7832fi
7833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
7834$as_echo "$ac_cv_sys_largefile_CC" >&6; }
7835  if test "$ac_cv_sys_largefile_CC" != no; then
7836    CC=$CC$ac_cv_sys_largefile_CC
7837  fi
7838
7839  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7840$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
7841if ${ac_cv_sys_file_offset_bits+:} false; then :
7842  $as_echo_n "(cached) " >&6
7843else
7844  while :; do
7845  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7846/* end confdefs.h.  */
7847#include <sys/types.h>
7848 /* Check that off_t can represent 2**63 - 1 correctly.
7849    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7850    since some C++ compilers masquerading as C compilers
7851    incorrectly reject 9223372036854775807.  */
7852#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
7853  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7854                       && LARGE_OFF_T % 2147483647 == 1)
7855                      ? 1 : -1];
7856int
7857main ()
7858{
7859
7860  ;
7861  return 0;
7862}
7863_ACEOF
7864if ac_fn_c_try_compile "$LINENO"; then :
7865  ac_cv_sys_file_offset_bits=no; break
7866fi
7867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7868  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7869/* end confdefs.h.  */
7870#define _FILE_OFFSET_BITS 64
7871#include <sys/types.h>
7872 /* Check that off_t can represent 2**63 - 1 correctly.
7873    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7874    since some C++ compilers masquerading as C compilers
7875    incorrectly reject 9223372036854775807.  */
7876#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
7877  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7878                       && LARGE_OFF_T % 2147483647 == 1)
7879                      ? 1 : -1];
7880int
7881main ()
7882{
7883
7884  ;
7885  return 0;
7886}
7887_ACEOF
7888if ac_fn_c_try_compile "$LINENO"; then :
7889  ac_cv_sys_file_offset_bits=64; break
7890fi
7891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7892  ac_cv_sys_file_offset_bits=unknown
7893  break
7894done
7895fi
7896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
7897$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
7898case $ac_cv_sys_file_offset_bits in #(
7899  no | unknown) ;;
7900  *)
7901cat >>confdefs.h <<_ACEOF
7902#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7903_ACEOF
7904;;
7905esac
7906rm -rf conftest*
7907  if test $ac_cv_sys_file_offset_bits = unknown; then
7908    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
7909$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
7910if ${ac_cv_sys_large_files+:} false; then :
7911  $as_echo_n "(cached) " >&6
7912else
7913  while :; do
7914  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7915/* end confdefs.h.  */
7916#include <sys/types.h>
7917 /* Check that off_t can represent 2**63 - 1 correctly.
7918    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7919    since some C++ compilers masquerading as C compilers
7920    incorrectly reject 9223372036854775807.  */
7921#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
7922  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7923                       && LARGE_OFF_T % 2147483647 == 1)
7924                      ? 1 : -1];
7925int
7926main ()
7927{
7928
7929  ;
7930  return 0;
7931}
7932_ACEOF
7933if ac_fn_c_try_compile "$LINENO"; then :
7934  ac_cv_sys_large_files=no; break
7935fi
7936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7937  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7938/* end confdefs.h.  */
7939#define _LARGE_FILES 1
7940#include <sys/types.h>
7941 /* Check that off_t can represent 2**63 - 1 correctly.
7942    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7943    since some C++ compilers masquerading as C compilers
7944    incorrectly reject 9223372036854775807.  */
7945#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
7946  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7947                       && LARGE_OFF_T % 2147483647 == 1)
7948                      ? 1 : -1];
7949int
7950main ()
7951{
7952
7953  ;
7954  return 0;
7955}
7956_ACEOF
7957if ac_fn_c_try_compile "$LINENO"; then :
7958  ac_cv_sys_large_files=1; break
7959fi
7960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7961  ac_cv_sys_large_files=unknown
7962  break
7963done
7964fi
7965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
7966$as_echo "$ac_cv_sys_large_files" >&6; }
7967case $ac_cv_sys_large_files in #(
7968  no | unknown) ;;
7969  *)
7970cat >>confdefs.h <<_ACEOF
7971#define _LARGE_FILES $ac_cv_sys_large_files
7972_ACEOF
7973;;
7974esac
7975rm -rf conftest*
7976  fi
7977fi
7978
7979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
7980$as_echo_n "checking for inline... " >&6; }
7981if ${ac_cv_c_inline+:} false; then :
7982  $as_echo_n "(cached) " >&6
7983else
7984  ac_cv_c_inline=no
7985for ac_kw in inline __inline__ __inline; do
7986  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7987/* end confdefs.h.  */
7988#ifndef __cplusplus
7989typedef int foo_t;
7990static $ac_kw foo_t static_foo () {return 0; }
7991$ac_kw foo_t foo () {return 0; }
7992#endif
7993
7994_ACEOF
7995if ac_fn_c_try_compile "$LINENO"; then :
7996  ac_cv_c_inline=$ac_kw
7997fi
7998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7999  test "$ac_cv_c_inline" != no && break
8000done
8001
8002fi
8003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
8004$as_echo "$ac_cv_c_inline" >&6; }
8005
8006case $ac_cv_c_inline in
8007  inline | yes) ;;
8008  *)
8009    case $ac_cv_c_inline in
8010      no) ac_val=;;
8011      *) ac_val=$ac_cv_c_inline;;
8012    esac
8013    cat >>confdefs.h <<_ACEOF
8014#ifndef __cplusplus
8015#define inline $ac_val
8016#endif
8017_ACEOF
8018    ;;
8019esac
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058for ac_header in sys/buf.h
8059do :
8060  ac_fn_c_check_header_compile "$LINENO" "sys/buf.h" "ac_cv_header_sys_buf_h" "#if HAVE_SYS_PARAM_H
8061#include <sys/param.h>
8062#endif
8063"
8064if test "x$ac_cv_header_sys_buf_h" = xyes; then :
8065  cat >>confdefs.h <<_ACEOF
8066#define HAVE_SYS_BUF_H 1
8067_ACEOF
8068
8069fi
8070
8071done
8072
8073
8074
8075
8076
8077ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
8078if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
8079
8080$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
8081
8082fi
8083
8084
8085if test $ac_cv_header_sys_mkdev_h = no; then
8086  ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
8087if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
8088
8089$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
8090
8091fi
8092
8093
8094fi
8095
8096
8097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_fstype string in struct stat" >&5
8098$as_echo_n "checking for st_fstype string in struct stat... " >&6; }
8099if ${diff_cv_st_fstype_string+:} false; then :
8100  $as_echo_n "(cached) " >&6
8101else
8102  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8103/* end confdefs.h.  */
8104#include <sys/types.h>
8105#include <sys/stat.h>
8106int
8107main ()
8108{
8109struct stat s; s.st_fstype[0] = 'x';
8110  ;
8111  return 0;
8112}
8113_ACEOF
8114if ac_fn_c_try_compile "$LINENO"; then :
8115  diff_cv_st_fstype_string=yes
8116else
8117  diff_cv_st_fstype_string=no
8118fi
8119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8120fi
8121
8122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $diff_cv_st_fstype_string" >&5
8123$as_echo "$diff_cv_st_fstype_string" >&6; }
8124if test $diff_cv_st_fstype_string = yes; then
8125
8126$as_echo "#define HAVE_ST_FSTYPE_STRING 1" >>confdefs.h
8127
8128fi
8129
8130# even if we use gnulib's acl.h with integrated m4 file later on (used because
8131# of very useful file_has_acl() function) we need following checks that restrict
8132# tar to use POSIX.1e ACLs only.
8133
8134# Check whether --with-posix-acls was given.
8135if test "${with_posix_acls+set}" = set; then :
8136  withval=$with_posix_acls;
8137else
8138  with_posix_acls=yes
8139fi
8140
8141if test "x$with_posix_acls" != "xno"; then
8142  for ac_header in sys/acl.h
8143do :
8144  ac_fn_c_check_header_mongrel "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
8145if test "x$ac_cv_header_sys_acl_h" = xyes; then :
8146  cat >>confdefs.h <<_ACEOF
8147#define HAVE_SYS_ACL_H 1
8148_ACEOF
8149
8150else
8151  with_posix_acls=no
8152fi
8153
8154done
8155
8156  for tar_acl_func in acl_get_file acl_get_fd acl_set_file acl_set_fd \
8157		      acl_to_text acl_from_text acl_delete_def_file \
8158		      acl_free; do \
8159    test "x$with_posix_acls" = xno && break
8160    as_ac_Search=`$as_echo "ac_cv_search_$tar_acl_func" | $as_tr_sh`
8161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing $tar_acl_func" >&5
8162$as_echo_n "checking for library containing $tar_acl_func... " >&6; }
8163if eval \${$as_ac_Search+:} false; then :
8164  $as_echo_n "(cached) " >&6
8165else
8166  ac_func_search_save_LIBS=$LIBS
8167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8168/* end confdefs.h.  */
8169
8170/* Override any GCC internal prototype to avoid an error.
8171   Use char because int might match the return type of a GCC
8172   builtin and then its argument prototype would still apply.  */
8173#ifdef __cplusplus
8174extern "C"
8175#endif
8176char $tar_acl_func ();
8177int
8178main ()
8179{
8180return $tar_acl_func ();
8181  ;
8182  return 0;
8183}
8184_ACEOF
8185for ac_lib in '' acl pacl; do
8186  if test -z "$ac_lib"; then
8187    ac_res="none required"
8188  else
8189    ac_res=-l$ac_lib
8190    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8191  fi
8192  if ac_fn_c_try_link "$LINENO"; then :
8193  eval "$as_ac_Search=\$ac_res"
8194fi
8195rm -f core conftest.err conftest.$ac_objext \
8196    conftest$ac_exeext
8197  if eval \${$as_ac_Search+:} false; then :
8198  break
8199fi
8200done
8201if eval \${$as_ac_Search+:} false; then :
8202
8203else
8204  eval "$as_ac_Search=no"
8205fi
8206rm conftest.$ac_ext
8207LIBS=$ac_func_search_save_LIBS
8208fi
8209eval ac_res=\$$as_ac_Search
8210	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8211$as_echo "$ac_res" >&6; }
8212eval ac_res=\$$as_ac_Search
8213if test "$ac_res" != no; then :
8214  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8215
8216else
8217  with_posix_acls=no
8218fi
8219
8220  done
8221  if test "x$with_posix_acls" != xno; then
8222
8223$as_echo "#define HAVE_POSIX_ACLS /**/" >>confdefs.h
8224
8225  fi
8226else
8227  # disable acls in gnulib's checks
8228  export enable_acl=no
8229fi
8230
8231ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
8232if test "x$ac_cv_type_mode_t" = xyes; then :
8233
8234else
8235
8236cat >>confdefs.h <<_ACEOF
8237#define mode_t int
8238_ACEOF
8239
8240fi
8241
8242
8243  ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
8244"
8245if test "x$ac_cv_type_pid_t" = xyes; then :
8246
8247else
8248                                          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8249/* end confdefs.h.  */
8250
8251          #if defined _WIN64 && !defined __CYGWIN__
8252          LLP64
8253          #endif
8254
8255int
8256main ()
8257{
8258
8259  ;
8260  return 0;
8261}
8262
8263_ACEOF
8264if ac_fn_c_try_compile "$LINENO"; then :
8265  gl_pid_type='int'
8266else
8267  gl_pid_type='__int64'
8268fi
8269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8270
8271cat >>confdefs.h <<_ACEOF
8272#define pid_t $gl_pid_type
8273_ACEOF
8274
8275
8276fi
8277
8278
8279ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
8280if test "x$ac_cv_type_off_t" = xyes; then :
8281
8282else
8283
8284cat >>confdefs.h <<_ACEOF
8285#define off_t long int
8286_ACEOF
8287
8288fi
8289
8290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8291$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
8292if ${ac_cv_type_uid_t+:} false; then :
8293  $as_echo_n "(cached) " >&6
8294else
8295  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8296/* end confdefs.h.  */
8297#include <sys/types.h>
8298
8299_ACEOF
8300if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8301  $EGREP "uid_t" >/dev/null 2>&1; then :
8302  ac_cv_type_uid_t=yes
8303else
8304  ac_cv_type_uid_t=no
8305fi
8306rm -f conftest*
8307
8308fi
8309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8310$as_echo "$ac_cv_type_uid_t" >&6; }
8311if test $ac_cv_type_uid_t = no; then
8312
8313$as_echo "#define uid_t int" >>confdefs.h
8314
8315
8316$as_echo "#define gid_t int" >>confdefs.h
8317
8318fi
8319
8320ac_fn_c_check_type "$LINENO" "major_t" "ac_cv_type_major_t" "$ac_includes_default"
8321if test "x$ac_cv_type_major_t" = xyes; then :
8322
8323else
8324
8325$as_echo "#define major_t int" >>confdefs.h
8326
8327fi
8328
8329ac_fn_c_check_type "$LINENO" "minor_t" "ac_cv_type_minor_t" "$ac_includes_default"
8330if test "x$ac_cv_type_minor_t" = xyes; then :
8331
8332else
8333
8334$as_echo "#define minor_t int" >>confdefs.h
8335
8336fi
8337
8338ac_fn_c_check_type "$LINENO" "dev_t" "ac_cv_type_dev_t" "$ac_includes_default"
8339if test "x$ac_cv_type_dev_t" = xyes; then :
8340
8341else
8342
8343cat >>confdefs.h <<_ACEOF
8344#define dev_t unsigned
8345_ACEOF
8346
8347fi
8348
8349ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default"
8350if test "x$ac_cv_type_ino_t" = xyes; then :
8351
8352else
8353
8354cat >>confdefs.h <<_ACEOF
8355#define ino_t unsigned
8356_ACEOF
8357
8358fi
8359
8360
8361
8362  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
8363$as_echo_n "checking for ssize_t... " >&6; }
8364if ${gt_cv_ssize_t+:} false; then :
8365  $as_echo_n "(cached) " >&6
8366else
8367  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8368/* end confdefs.h.  */
8369#include <sys/types.h>
8370int
8371main ()
8372{
8373int x = sizeof (ssize_t *) + sizeof (ssize_t);
8374            return !x;
8375  ;
8376  return 0;
8377}
8378_ACEOF
8379if ac_fn_c_try_compile "$LINENO"; then :
8380  gt_cv_ssize_t=yes
8381else
8382  gt_cv_ssize_t=no
8383fi
8384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8385fi
8386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
8387$as_echo "$gt_cv_ssize_t" >&6; }
8388  if test $gt_cv_ssize_t = no; then
8389
8390$as_echo "#define ssize_t int" >>confdefs.h
8391
8392  fi
8393
8394
8395# gnulib modules
8396
8397
8398
8399
8400
8401
8402
8403
8404                        # Check whether --enable-cross-guesses was given.
8405if test "${enable_cross_guesses+set}" = set; then :
8406  enableval=$enable_cross_guesses; if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
8407       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-cross-guesses" >&5
8408$as_echo "$as_me: WARNING: invalid argument supplied to --enable-cross-guesses" >&2;}
8409       enableval=conservative
8410     fi
8411     gl_cross_guesses="$enableval"
8412else
8413  gl_cross_guesses=conservative
8414fi
8415
8416  if test $gl_cross_guesses = risky; then
8417    gl_cross_guess_normal="guessing yes"
8418    gl_cross_guess_inverted="guessing no"
8419  else
8420    gl_cross_guess_normal="guessing no"
8421    gl_cross_guess_inverted="guessing yes"
8422  fi
8423          LIBC_FATAL_STDERR_=1
8424  export LIBC_FATAL_STDERR_
8425
8426
8427
8428  gl_need_lib_has_acl=
8429  # Check whether --enable-acl was given.
8430if test "${enable_acl+set}" = set; then :
8431  enableval=$enable_acl;
8432else
8433  enable_acl=auto
8434fi
8435
8436
8437
8438
8439
8440  for ac_func in $ac_func_list
8441do :
8442  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8443ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8444if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8445  cat >>confdefs.h <<_ACEOF
8446#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8447_ACEOF
8448
8449fi
8450done
8451
8452
8453
8454ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
8455if test "x$ac_cv_type_size_t" = xyes; then :
8456
8457else
8458
8459cat >>confdefs.h <<_ACEOF
8460#define size_t unsigned int
8461_ACEOF
8462
8463fi
8464
8465# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8466# for constant arguments.  Useless!
8467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
8468$as_echo_n "checking for working alloca.h... " >&6; }
8469if ${ac_cv_working_alloca_h+:} false; then :
8470  $as_echo_n "(cached) " >&6
8471else
8472  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8473/* end confdefs.h.  */
8474#include <alloca.h>
8475int
8476main ()
8477{
8478char *p = (char *) alloca (2 * sizeof (int));
8479			  if (p) return 0;
8480  ;
8481  return 0;
8482}
8483_ACEOF
8484if ac_fn_c_try_link "$LINENO"; then :
8485  ac_cv_working_alloca_h=yes
8486else
8487  ac_cv_working_alloca_h=no
8488fi
8489rm -f core conftest.err conftest.$ac_objext \
8490    conftest$ac_exeext conftest.$ac_ext
8491fi
8492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
8493$as_echo "$ac_cv_working_alloca_h" >&6; }
8494if test $ac_cv_working_alloca_h = yes; then
8495
8496$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
8497
8498fi
8499
8500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
8501$as_echo_n "checking for alloca... " >&6; }
8502if ${ac_cv_func_alloca_works+:} false; then :
8503  $as_echo_n "(cached) " >&6
8504else
8505  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8506/* end confdefs.h.  */
8507#ifdef __GNUC__
8508# define alloca __builtin_alloca
8509#else
8510# ifdef _MSC_VER
8511#  include <malloc.h>
8512#  define alloca _alloca
8513# else
8514#  ifdef HAVE_ALLOCA_H
8515#   include <alloca.h>
8516#  else
8517#   ifdef _AIX
8518 #pragma alloca
8519#   else
8520#    ifndef alloca /* predefined by HP cc +Olibcalls */
8521void *alloca (size_t);
8522#    endif
8523#   endif
8524#  endif
8525# endif
8526#endif
8527
8528int
8529main ()
8530{
8531char *p = (char *) alloca (1);
8532				    if (p) return 0;
8533  ;
8534  return 0;
8535}
8536_ACEOF
8537if ac_fn_c_try_link "$LINENO"; then :
8538  ac_cv_func_alloca_works=yes
8539else
8540  ac_cv_func_alloca_works=no
8541fi
8542rm -f core conftest.err conftest.$ac_objext \
8543    conftest$ac_exeext conftest.$ac_ext
8544fi
8545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
8546$as_echo "$ac_cv_func_alloca_works" >&6; }
8547
8548if test $ac_cv_func_alloca_works = yes; then
8549
8550$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
8551
8552else
8553  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8554# that cause trouble.  Some versions do not even contain alloca or
8555# contain a buggy version.  If you still want to use their alloca,
8556# use ar to extract alloca.o from them instead of compiling alloca.c.
8557
8558
8559
8560
8561
8562ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
8563
8564$as_echo "#define C_ALLOCA 1" >>confdefs.h
8565
8566
8567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
8568$as_echo_n "checking stack direction for C alloca... " >&6; }
8569if ${ac_cv_c_stack_direction+:} false; then :
8570  $as_echo_n "(cached) " >&6
8571else
8572  if test "$cross_compiling" = yes; then :
8573  ac_cv_c_stack_direction=0
8574else
8575  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8576/* end confdefs.h.  */
8577$ac_includes_default
8578int
8579find_stack_direction (int *addr, int depth)
8580{
8581  int dir, dummy = 0;
8582  if (! addr)
8583    addr = &dummy;
8584  *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
8585  dir = depth ? find_stack_direction (addr, depth - 1) : 0;
8586  return dir + dummy;
8587}
8588
8589int
8590main (int argc, char **argv)
8591{
8592  return find_stack_direction (0, argc + !argv + 20) < 0;
8593}
8594_ACEOF
8595if ac_fn_c_try_run "$LINENO"; then :
8596  ac_cv_c_stack_direction=1
8597else
8598  ac_cv_c_stack_direction=-1
8599fi
8600rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8601  conftest.$ac_objext conftest.beam conftest.$ac_ext
8602fi
8603
8604fi
8605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
8606$as_echo "$ac_cv_c_stack_direction" >&6; }
8607cat >>confdefs.h <<_ACEOF
8608#define STACK_DIRECTION $ac_cv_c_stack_direction
8609_ACEOF
8610
8611
8612fi
8613
8614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
8615$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
8616if ${ac_cv_c_restrict+:} false; then :
8617  $as_echo_n "(cached) " >&6
8618else
8619  ac_cv_c_restrict=no
8620   # Put '__restrict__' first, to avoid problems with glibc and non-GCC; see:
8621   # https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html
8622   # Put 'restrict' last, because C++ lacks it.
8623   for ac_kw in __restrict__ __restrict _Restrict restrict; do
8624     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8625/* end confdefs.h.  */
8626typedef int *int_ptr;
8627           int foo (int_ptr $ac_kw ip) { return ip[0]; }
8628           int bar (int [$ac_kw]); /* Catch GCC bug 14050.  */
8629           int bar (int ip[$ac_kw]) { return ip[0]; }
8630
8631int
8632main ()
8633{
8634int s[1];
8635           int *$ac_kw t = s;
8636           t[0] = 0;
8637           return foo (t) + bar (t);
8638
8639  ;
8640  return 0;
8641}
8642_ACEOF
8643if ac_fn_c_try_compile "$LINENO"; then :
8644  ac_cv_c_restrict=$ac_kw
8645fi
8646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8647     test "$ac_cv_c_restrict" != no && break
8648   done
8649
8650fi
8651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
8652$as_echo "$ac_cv_c_restrict" >&6; }
8653
8654 case $ac_cv_c_restrict in
8655   restrict) ;;
8656   no) $as_echo "#define restrict /**/" >>confdefs.h
8657 ;;
8658   *)  cat >>confdefs.h <<_ACEOF
8659#define restrict $ac_cv_c_restrict
8660_ACEOF
8661 ;;
8662 esac
8663
8664ac_fn_c_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default"
8665if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes; then :
8666  ac_have_decl=1
8667else
8668  ac_have_decl=0
8669fi
8670
8671cat >>confdefs.h <<_ACEOF
8672#define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl
8673_ACEOF
8674
8675ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default"
8676if test "x$ac_cv_have_decl_feof_unlocked" = xyes; then :
8677  ac_have_decl=1
8678else
8679  ac_have_decl=0
8680fi
8681
8682cat >>confdefs.h <<_ACEOF
8683#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl
8684_ACEOF
8685
8686ac_fn_c_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default"
8687if test "x$ac_cv_have_decl_ferror_unlocked" = xyes; then :
8688  ac_have_decl=1
8689else
8690  ac_have_decl=0
8691fi
8692
8693cat >>confdefs.h <<_ACEOF
8694#define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl
8695_ACEOF
8696
8697ac_fn_c_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default"
8698if test "x$ac_cv_have_decl_fflush_unlocked" = xyes; then :
8699  ac_have_decl=1
8700else
8701  ac_have_decl=0
8702fi
8703
8704cat >>confdefs.h <<_ACEOF
8705#define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl
8706_ACEOF
8707
8708ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default"
8709if test "x$ac_cv_have_decl_fgets_unlocked" = xyes; then :
8710  ac_have_decl=1
8711else
8712  ac_have_decl=0
8713fi
8714
8715cat >>confdefs.h <<_ACEOF
8716#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl
8717_ACEOF
8718
8719ac_fn_c_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default"
8720if test "x$ac_cv_have_decl_fputc_unlocked" = xyes; then :
8721  ac_have_decl=1
8722else
8723  ac_have_decl=0
8724fi
8725
8726cat >>confdefs.h <<_ACEOF
8727#define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl
8728_ACEOF
8729
8730ac_fn_c_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default"
8731if test "x$ac_cv_have_decl_fputs_unlocked" = xyes; then :
8732  ac_have_decl=1
8733else
8734  ac_have_decl=0
8735fi
8736
8737cat >>confdefs.h <<_ACEOF
8738#define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl
8739_ACEOF
8740
8741ac_fn_c_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default"
8742if test "x$ac_cv_have_decl_fread_unlocked" = xyes; then :
8743  ac_have_decl=1
8744else
8745  ac_have_decl=0
8746fi
8747
8748cat >>confdefs.h <<_ACEOF
8749#define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl
8750_ACEOF
8751
8752ac_fn_c_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default"
8753if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes; then :
8754  ac_have_decl=1
8755else
8756  ac_have_decl=0
8757fi
8758
8759cat >>confdefs.h <<_ACEOF
8760#define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl
8761_ACEOF
8762
8763ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
8764if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
8765  ac_have_decl=1
8766else
8767  ac_have_decl=0
8768fi
8769
8770cat >>confdefs.h <<_ACEOF
8771#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
8772_ACEOF
8773
8774ac_fn_c_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default"
8775if test "x$ac_cv_have_decl_getchar_unlocked" = xyes; then :
8776  ac_have_decl=1
8777else
8778  ac_have_decl=0
8779fi
8780
8781cat >>confdefs.h <<_ACEOF
8782#define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl
8783_ACEOF
8784
8785ac_fn_c_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default"
8786if test "x$ac_cv_have_decl_putc_unlocked" = xyes; then :
8787  ac_have_decl=1
8788else
8789  ac_have_decl=0
8790fi
8791
8792cat >>confdefs.h <<_ACEOF
8793#define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl
8794_ACEOF
8795
8796ac_fn_c_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default"
8797if test "x$ac_cv_have_decl_putchar_unlocked" = xyes; then :
8798  ac_have_decl=1
8799else
8800  ac_have_decl=0
8801fi
8802
8803cat >>confdefs.h <<_ACEOF
8804#define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl
8805_ACEOF
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
8816if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
8817  ac_have_decl=1
8818else
8819  ac_have_decl=0
8820fi
8821
8822cat >>confdefs.h <<_ACEOF
8823#define HAVE_DECL_STRERROR_R $ac_have_decl
8824_ACEOF
8825
8826for ac_func in strerror_r
8827do :
8828  ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
8829if test "x$ac_cv_func_strerror_r" = xyes; then :
8830  cat >>confdefs.h <<_ACEOF
8831#define HAVE_STRERROR_R 1
8832_ACEOF
8833
8834fi
8835done
8836
8837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
8838$as_echo_n "checking whether strerror_r returns char *... " >&6; }
8839if ${ac_cv_func_strerror_r_char_p+:} false; then :
8840  $as_echo_n "(cached) " >&6
8841else
8842
8843    ac_cv_func_strerror_r_char_p=no
8844    if test $ac_cv_have_decl_strerror_r = yes; then
8845      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8846/* end confdefs.h.  */
8847$ac_includes_default
8848int
8849main ()
8850{
8851
8852	  char buf[100];
8853	  char x = *strerror_r (0, buf, sizeof buf);
8854	  char *p = strerror_r (0, buf, sizeof buf);
8855	  return !p || x;
8856
8857  ;
8858  return 0;
8859}
8860_ACEOF
8861if ac_fn_c_try_compile "$LINENO"; then :
8862  ac_cv_func_strerror_r_char_p=yes
8863fi
8864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8865    else
8866      # strerror_r is not declared.  Choose between
8867      # systems that have relatively inaccessible declarations for the
8868      # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
8869      # former has a strerror_r that returns char*, while the latter
8870      # has a strerror_r that returns `int'.
8871      # This test should segfault on the DEC system.
8872      if test "$cross_compiling" = yes; then :
8873  :
8874else
8875  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8876/* end confdefs.h.  */
8877$ac_includes_default
8878	extern char *strerror_r ();
8879int
8880main ()
8881{
8882char buf[100];
8883	  char x = *strerror_r (0, buf, sizeof buf);
8884	  return ! isalpha (x);
8885  ;
8886  return 0;
8887}
8888_ACEOF
8889if ac_fn_c_try_run "$LINENO"; then :
8890  ac_cv_func_strerror_r_char_p=yes
8891fi
8892rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8893  conftest.$ac_objext conftest.beam conftest.$ac_ext
8894fi
8895
8896    fi
8897
8898fi
8899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
8900$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
8901if test $ac_cv_func_strerror_r_char_p = yes; then
8902
8903$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
8904
8905fi
8906
8907
8908  XGETTEXT_EXTRA_OPTIONS=
8909
8910    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
8911$as_echo_n "checking for d_ino member in directory struct... " >&6; }
8912if ${gl_cv_struct_dirent_d_ino+:} false; then :
8913  $as_echo_n "(cached) " >&6
8914else
8915  if test "$cross_compiling" = yes; then :
8916  case "$host_os" in
8917                            # Guess yes on glibc systems with Linux kernel.
8918              linux*-gnu*)  gl_cv_struct_dirent_d_ino="guessing yes" ;;
8919                            # Guess yes on musl systems with Linux kernel.
8920              linux*-musl*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
8921                            # Guess no on native Windows.
8922              mingw*)       gl_cv_struct_dirent_d_ino="guessing no" ;;
8923                            # If we don't know, obey --enable-cross-guesses.
8924              *)            gl_cv_struct_dirent_d_ino="$gl_cross_guess_normal" ;;
8925            esac
8926
8927else
8928  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8929/* end confdefs.h.  */
8930#include <sys/types.h>
8931             #include <sys/stat.h>
8932             #include <dirent.h>
8933
8934int
8935main ()
8936{
8937DIR *dp = opendir (".");
8938             struct dirent *e;
8939             struct stat st;
8940             if (! dp)
8941               return 1;
8942             e = readdir (dp);
8943             if (! e)
8944               { closedir (dp); return 2; }
8945             if (lstat (e->d_name, &st) != 0)
8946               { closedir (dp); return 3; }
8947             if (e->d_ino != st.st_ino)
8948               { closedir (dp); return 4; }
8949             closedir (dp);
8950             return 0;
8951
8952  ;
8953  return 0;
8954}
8955_ACEOF
8956if ac_fn_c_try_run "$LINENO"; then :
8957  gl_cv_struct_dirent_d_ino=yes
8958else
8959  gl_cv_struct_dirent_d_ino=no
8960fi
8961rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8962  conftest.$ac_objext conftest.beam conftest.$ac_ext
8963fi
8964
8965fi
8966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
8967$as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
8968   case "$gl_cv_struct_dirent_d_ino" in
8969     *yes)
8970
8971$as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
8972
8973       ;;
8974   esac
8975
8976
8977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
8978$as_echo_n "checking for long file names... " >&6; }
8979if ${ac_cv_sys_long_file_names+:} false; then :
8980  $as_echo_n "(cached) " >&6
8981else
8982  ac_cv_sys_long_file_names=yes
8983# Test for long file names in all the places we know might matter:
8984#      .		the current directory, where building will happen
8985#      $prefix/lib	where we will be installing things
8986#      $exec_prefix/lib	likewise
8987#      $TMPDIR		if set, where it might want to write temporary files
8988#      /tmp		where it might want to write temporary files
8989#      /var/tmp		likewise
8990#      /usr/tmp		likewise
8991for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
8992  # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
8993  # in the usual case where exec_prefix is '${prefix}'.
8994  case $ac_dir in #(
8995    . | /* | ?:[\\/]*) ;; #(
8996    *) continue;;
8997  esac
8998  test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
8999  ac_xdir=$ac_dir/cf$$
9000  (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
9001  ac_tf1=$ac_xdir/conftest9012345
9002  ac_tf2=$ac_xdir/conftest9012346
9003  touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
9004    ac_cv_sys_long_file_names=no
9005  rm -f -r "$ac_xdir" 2>/dev/null
9006  test $ac_cv_sys_long_file_names = no && break
9007done
9008fi
9009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
9010$as_echo "$ac_cv_sys_long_file_names" >&6; }
9011if test $ac_cv_sys_long_file_names = yes; then
9012
9013$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
9014
9015fi
9016
9017
9018
9019
9020  GNULIB_BTOWC=0;
9021  GNULIB_WCTOB=0;
9022  GNULIB_MBSINIT=0;
9023  GNULIB_MBRTOWC=0;
9024  GNULIB_MBRLEN=0;
9025  GNULIB_MBSRTOWCS=0;
9026  GNULIB_MBSNRTOWCS=0;
9027  GNULIB_WCRTOMB=0;
9028  GNULIB_WCSRTOMBS=0;
9029  GNULIB_WCSNRTOMBS=0;
9030  GNULIB_WCWIDTH=0;
9031  GNULIB_WMEMCHR=0;
9032  GNULIB_WMEMCMP=0;
9033  GNULIB_WMEMCPY=0;
9034  GNULIB_WMEMMOVE=0;
9035  GNULIB_WMEMPCPY=0;
9036  GNULIB_WMEMSET=0;
9037  GNULIB_WCSLEN=0;
9038  GNULIB_WCSNLEN=0;
9039  GNULIB_WCSCPY=0;
9040  GNULIB_WCPCPY=0;
9041  GNULIB_WCSNCPY=0;
9042  GNULIB_WCPNCPY=0;
9043  GNULIB_WCSCAT=0;
9044  GNULIB_WCSNCAT=0;
9045  GNULIB_WCSCMP=0;
9046  GNULIB_WCSNCMP=0;
9047  GNULIB_WCSCASECMP=0;
9048  GNULIB_WCSNCASECMP=0;
9049  GNULIB_WCSCOLL=0;
9050  GNULIB_WCSXFRM=0;
9051  GNULIB_WCSDUP=0;
9052  GNULIB_WCSCHR=0;
9053  GNULIB_WCSRCHR=0;
9054  GNULIB_WCSCSPN=0;
9055  GNULIB_WCSSPN=0;
9056  GNULIB_WCSPBRK=0;
9057  GNULIB_WCSSTR=0;
9058  GNULIB_WCSTOK=0;
9059  GNULIB_WCSWIDTH=0;
9060  GNULIB_WCSFTIME=0;
9061    GNULIB_MDA_WCSDUP=1;
9062    HAVE_BTOWC=1;
9063  HAVE_MBSINIT=1;
9064  HAVE_MBRTOWC=1;
9065  HAVE_MBRLEN=1;
9066  HAVE_MBSRTOWCS=1;
9067  HAVE_MBSNRTOWCS=1;
9068  HAVE_WCRTOMB=1;
9069  HAVE_WCSRTOMBS=1;
9070  HAVE_WCSNRTOMBS=1;
9071  HAVE_WMEMCHR=1;
9072  HAVE_WMEMCMP=1;
9073  HAVE_WMEMCPY=1;
9074  HAVE_WMEMMOVE=1;
9075  HAVE_WMEMPCPY=1;
9076  HAVE_WMEMSET=1;
9077  HAVE_WCSLEN=1;
9078  HAVE_WCSNLEN=1;
9079  HAVE_WCSCPY=1;
9080  HAVE_WCPCPY=1;
9081  HAVE_WCSNCPY=1;
9082  HAVE_WCPNCPY=1;
9083  HAVE_WCSCAT=1;
9084  HAVE_WCSNCAT=1;
9085  HAVE_WCSCMP=1;
9086  HAVE_WCSNCMP=1;
9087  HAVE_WCSCASECMP=1;
9088  HAVE_WCSNCASECMP=1;
9089  HAVE_WCSCOLL=1;
9090  HAVE_WCSXFRM=1;
9091  HAVE_WCSDUP=1;
9092  HAVE_WCSCHR=1;
9093  HAVE_WCSRCHR=1;
9094  HAVE_WCSCSPN=1;
9095  HAVE_WCSSPN=1;
9096  HAVE_WCSPBRK=1;
9097  HAVE_WCSSTR=1;
9098  HAVE_WCSTOK=1;
9099  HAVE_WCSWIDTH=1;
9100  HAVE_WCSFTIME=1;
9101  HAVE_DECL_WCTOB=1;
9102  HAVE_DECL_WCSDUP=1;
9103  HAVE_DECL_WCWIDTH=1;
9104  REPLACE_MBSTATE_T=0;
9105  REPLACE_BTOWC=0;
9106  REPLACE_WCTOB=0;
9107  REPLACE_MBSINIT=0;
9108  REPLACE_MBRTOWC=0;
9109  REPLACE_MBRLEN=0;
9110  REPLACE_MBSRTOWCS=0;
9111  REPLACE_MBSNRTOWCS=0;
9112  REPLACE_WCRTOMB=0;
9113  REPLACE_WCSRTOMBS=0;
9114  REPLACE_WCSNRTOMBS=0;
9115  REPLACE_WCWIDTH=0;
9116  REPLACE_WCSWIDTH=0;
9117  REPLACE_WCSFTIME=0;
9118  REPLACE_WCSTOK=0;
9119
9120
9121
9122  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
9123$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
9124if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
9125  $as_echo_n "(cached) " >&6
9126else
9127  gl_cv_header_wchar_h_correct_inline=yes
9128     case "$host_os" in
9129       *-gnu* | gnu*)
9130         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9131/* end confdefs.h.  */
9132
9133
9134             #define wcstod renamed_wcstod
9135             #include <wchar.h>
9136             extern int zero (void);
9137             int main () { return zero(); }
9138
9139_ACEOF
9140                                                      save_ac_compile="$ac_compile"
9141         ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
9142         if echo '#include "conftest.c"' >conftest1.c \
9143            && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9144  (eval $ac_compile) 2>&5
9145  ac_status=$?
9146  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9147  test $ac_status = 0; }; then
9148           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9149/* end confdefs.h.  */
9150
9151
9152               #define wcstod renamed_wcstod
9153               #include <wchar.h>
9154               int zero (void) { return 0; }
9155
9156_ACEOF
9157                      ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
9158           if echo '#include "conftest.c"' >conftest2.c \
9159              && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9160  (eval $ac_compile) 2>&5
9161  ac_status=$?
9162  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9163  test $ac_status = 0; }; then
9164             if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
9165               :
9166             else
9167               gl_cv_header_wchar_h_correct_inline=no
9168             fi
9169           fi
9170         fi
9171         ac_compile="$save_ac_compile"
9172         rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext
9173         ;;
9174     esac
9175
9176fi
9177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
9178$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
9179  if test $gl_cv_header_wchar_h_correct_inline = no; then
9180    as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
9181This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
9182C99 mode. You have four options:
9183  - Add the flag -fgnu89-inline to CC and reconfigure, or
9184  - Fix your include files, using parts of
9185    <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
9186  - Use a gcc version older than 4.3, or
9187  - Don't use the flags -std=c99 or -std=gnu99.
9188Configuration aborted." "$LINENO" 5
9189  fi
9190
9191
9192
9193
9194  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
9195$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
9196if ${am_cv_langinfo_codeset+:} false; then :
9197  $as_echo_n "(cached) " >&6
9198else
9199  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9200/* end confdefs.h.  */
9201#include <langinfo.h>
9202int
9203main ()
9204{
9205char* cs = nl_langinfo(CODESET); return !cs;
9206  ;
9207  return 0;
9208}
9209_ACEOF
9210if ac_fn_c_try_link "$LINENO"; then :
9211  am_cv_langinfo_codeset=yes
9212else
9213  am_cv_langinfo_codeset=no
9214fi
9215rm -f core conftest.err conftest.$ac_objext \
9216    conftest$ac_exeext conftest.$ac_ext
9217
9218fi
9219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
9220$as_echo "$am_cv_langinfo_codeset" >&6; }
9221  if test $am_cv_langinfo_codeset = yes; then
9222
9223$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
9224
9225  fi
9226
9227
9228
9229
9230  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
9231$as_echo_n "checking for a traditional french locale... " >&6; }
9232if ${gt_cv_locale_fr+:} false; then :
9233  $as_echo_n "(cached) " >&6
9234else
9235
9236    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9237/* end confdefs.h.  */
9238
9239#include <locale.h>
9240#include <time.h>
9241#if HAVE_LANGINFO_CODESET
9242# include <langinfo.h>
9243#endif
9244#include <stdlib.h>
9245#include <string.h>
9246struct tm t;
9247char buf[16];
9248int main () {
9249  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
9250     imitates locale dependent behaviour by looking at the environment
9251     variables, and all locales use the UTF-8 encoding.  */
9252#if defined __BEOS__ || defined __HAIKU__
9253  return 1;
9254#else
9255  /* Check whether the given locale name is recognized by the system.  */
9256# if defined _WIN32 && !defined __CYGWIN__
9257  /* On native Windows, setlocale(category, "") looks at the system settings,
9258     not at the environment variables.  Also, when an encoding suffix such
9259     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
9260     category of the locale to "C".  */
9261  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
9262      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
9263    return 1;
9264# else
9265  if (setlocale (LC_ALL, "") == NULL) return 1;
9266# endif
9267  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
9268     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
9269     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
9270     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
9271     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
9272     some unit tests fail.
9273     On MirBSD 10, when an unsupported locale is specified, setlocale()
9274     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
9275# if HAVE_LANGINFO_CODESET
9276  {
9277    const char *cs = nl_langinfo (CODESET);
9278    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
9279        || strcmp (cs, "UTF-8") == 0)
9280      return 1;
9281  }
9282# endif
9283# ifdef __CYGWIN__
9284  /* On Cygwin, avoid locale names without encoding suffix, because the
9285     locale_charset() function relies on the encoding suffix.  Note that
9286     LC_ALL is set on the command line.  */
9287  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
9288# endif
9289  /* Check whether in the abbreviation of the second month, the second
9290     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
9291     one byte long. This excludes the UTF-8 encoding.  */
9292  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
9293  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
9294# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
9295  /* Check whether the decimal separator is a comma.
9296     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
9297     are nl_langinfo(RADIXCHAR) are both ".".  */
9298  if (localeconv () ->decimal_point[0] != ',') return 1;
9299# endif
9300  return 0;
9301#endif
9302}
9303
9304_ACEOF
9305    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
9306  (eval $ac_link) 2>&5
9307  ac_status=$?
9308  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9309  test $ac_status = 0; } && test -s conftest$ac_exeext; then
9310      case "$host_os" in
9311        # Handle native Windows specially, because there setlocale() interprets
9312        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
9313        # "fr" or "fra" as "French" or "French_France.1252",
9314        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
9315        # "ja" as "Japanese" or "Japanese_Japan.932",
9316        # and similar.
9317        mingw*)
9318          # Test for the native Windows locale name.
9319          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9320            gt_cv_locale_fr=French_France.1252
9321          else
9322            # None found.
9323            gt_cv_locale_fr=none
9324          fi
9325          ;;
9326        *)
9327          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
9328          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
9329          # configure script would override the LC_ALL setting. Likewise for
9330          # LC_CTYPE, which is also set at the beginning of the configure script.
9331          # Test for the usual locale name.
9332          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9333            gt_cv_locale_fr=fr_FR
9334          else
9335            # Test for the locale name with explicit encoding suffix.
9336            if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9337              gt_cv_locale_fr=fr_FR.ISO-8859-1
9338            else
9339              # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
9340              if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9341                gt_cv_locale_fr=fr_FR.ISO8859-1
9342              else
9343                # Test for the HP-UX locale name.
9344                if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9345                  gt_cv_locale_fr=fr_FR.iso88591
9346                else
9347                  # Test for the Solaris 7 locale name.
9348                  if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9349                    gt_cv_locale_fr=fr
9350                  else
9351                    # None found.
9352                    gt_cv_locale_fr=none
9353                  fi
9354                fi
9355              fi
9356            fi
9357          fi
9358          ;;
9359      esac
9360    fi
9361    rm -fr conftest*
9362
9363fi
9364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
9365$as_echo "$gt_cv_locale_fr" >&6; }
9366  LOCALE_FR=$gt_cv_locale_fr
9367
9368
9369
9370  GNULIB__EXIT=0;
9371  GNULIB_ALIGNED_ALLOC=0;
9372  GNULIB_ATOLL=0;
9373  GNULIB_CALLOC_POSIX=0;
9374  GNULIB_CANONICALIZE_FILE_NAME=0;
9375  GNULIB_FREE_POSIX=0;
9376  GNULIB_GETLOADAVG=0;
9377  GNULIB_GETSUBOPT=0;
9378  GNULIB_GRANTPT=0;
9379  GNULIB_MALLOC_POSIX=0;
9380  GNULIB_MBTOWC=0;
9381  GNULIB_MKDTEMP=0;
9382  GNULIB_MKOSTEMP=0;
9383  GNULIB_MKOSTEMPS=0;
9384  GNULIB_MKSTEMP=0;
9385  GNULIB_MKSTEMPS=0;
9386  GNULIB_POSIX_MEMALIGN=0;
9387  GNULIB_POSIX_OPENPT=0;
9388  GNULIB_PTSNAME=0;
9389  GNULIB_PTSNAME_R=0;
9390  GNULIB_PUTENV=0;
9391  GNULIB_QSORT_R=0;
9392  GNULIB_RANDOM=0;
9393  GNULIB_RANDOM_R=0;
9394  GNULIB_REALLOCARRAY=0;
9395  GNULIB_REALLOC_POSIX=0;
9396  GNULIB_REALPATH=0;
9397  GNULIB_RPMATCH=0;
9398  GNULIB_SECURE_GETENV=0;
9399  GNULIB_SETENV=0;
9400  GNULIB_STRTOD=0;
9401  GNULIB_STRTOLD=0;
9402  GNULIB_STRTOLL=0;
9403  GNULIB_STRTOULL=0;
9404  GNULIB_SYSTEM_POSIX=0;
9405  GNULIB_UNLOCKPT=0;
9406  GNULIB_UNSETENV=0;
9407  GNULIB_WCTOMB=0;
9408    GNULIB_MDA_ECVT=1;
9409  GNULIB_MDA_FCVT=1;
9410  GNULIB_MDA_GCVT=1;
9411  GNULIB_MDA_MKTEMP=1;
9412  GNULIB_MDA_PUTENV=1;
9413    HAVE__EXIT=1;
9414  HAVE_ALIGNED_ALLOC=1;
9415  HAVE_ATOLL=1;
9416  HAVE_CANONICALIZE_FILE_NAME=1;
9417  HAVE_DECL_ECVT=1;
9418  HAVE_DECL_FCVT=1;
9419  HAVE_DECL_GCVT=1;
9420  HAVE_DECL_GETLOADAVG=1;
9421  HAVE_GETSUBOPT=1;
9422  HAVE_GRANTPT=1;
9423  HAVE_INITSTATE=1;
9424  HAVE_DECL_INITSTATE=1;
9425  HAVE_MBTOWC=1;
9426  HAVE_MKDTEMP=1;
9427  HAVE_MKOSTEMP=1;
9428  HAVE_MKOSTEMPS=1;
9429  HAVE_MKSTEMP=1;
9430  HAVE_MKSTEMPS=1;
9431  HAVE_POSIX_MEMALIGN=1;
9432  HAVE_POSIX_OPENPT=1;
9433  HAVE_PTSNAME=1;
9434  HAVE_PTSNAME_R=1;
9435  HAVE_QSORT_R=1;
9436  HAVE_RANDOM=1;
9437  HAVE_RANDOM_H=1;
9438  HAVE_RANDOM_R=1;
9439  HAVE_REALLOCARRAY=1;
9440  HAVE_REALPATH=1;
9441  HAVE_RPMATCH=1;
9442  HAVE_SECURE_GETENV=1;
9443  HAVE_SETENV=1;
9444  HAVE_DECL_SETENV=1;
9445  HAVE_SETSTATE=1;
9446  HAVE_DECL_SETSTATE=1;
9447  HAVE_STRTOD=1;
9448  HAVE_STRTOLD=1;
9449  HAVE_STRTOLL=1;
9450  HAVE_STRTOULL=1;
9451  HAVE_STRUCT_RANDOM_DATA=1;
9452  HAVE_SYS_LOADAVG_H=0;
9453  HAVE_UNLOCKPT=1;
9454  HAVE_DECL_UNSETENV=1;
9455  REPLACE_ALIGNED_ALLOC=0;
9456  REPLACE_CALLOC=0;
9457  REPLACE_CANONICALIZE_FILE_NAME=0;
9458  REPLACE_FREE=0;
9459  REPLACE_INITSTATE=0;
9460  REPLACE_MALLOC=0;
9461  REPLACE_MBTOWC=0;
9462  REPLACE_MKSTEMP=0;
9463  REPLACE_POSIX_MEMALIGN=0;
9464  REPLACE_PTSNAME=0;
9465  REPLACE_PTSNAME_R=0;
9466  REPLACE_PUTENV=0;
9467  REPLACE_QSORT_R=0;
9468  REPLACE_RANDOM=0;
9469  REPLACE_RANDOM_R=0;
9470  REPLACE_REALLOC=0;
9471  REPLACE_REALPATH=0;
9472  REPLACE_SETENV=0;
9473  REPLACE_SETSTATE=0;
9474  REPLACE_STRTOD=0;
9475  REPLACE_STRTOLD=0;
9476  REPLACE_UNSETENV=0;
9477  REPLACE_WCTOMB=0;
9478
9479
9480         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
9481$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
9482if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
9483  $as_echo_n "(cached) " >&6
9484else
9485  rm -f conftest.sym conftest.file
9486     echo >conftest.file
9487     if test "$cross_compiling" = yes; then :
9488  case "$host_os" in
9489          linux-* | linux)
9490            # Guess yes on Linux systems.
9491            gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
9492          *-gnu* | gnu*)
9493            # Guess yes on glibc systems.
9494            gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
9495          mingw*)
9496            # Guess no on native Windows.
9497            gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
9498          *)
9499            # If we don't know, obey --enable-cross-guesses.
9500            gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;;
9501        esac
9502
9503else
9504  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9505/* end confdefs.h.  */
9506$ac_includes_default
9507int
9508main ()
9509{
9510struct stat sbuf;
9511            if (symlink ("conftest.file", "conftest.sym") != 0)
9512              return 1;
9513            /* Linux will dereference the symlink and fail, as required by
9514               POSIX.  That is better in the sense that it means we will not
9515               have to compile and use the lstat wrapper.  */
9516            return lstat ("conftest.sym/", &sbuf) == 0;
9517
9518  ;
9519  return 0;
9520}
9521_ACEOF
9522if ac_fn_c_try_run "$LINENO"; then :
9523  gl_cv_func_lstat_dereferences_slashed_symlink=yes
9524else
9525  gl_cv_func_lstat_dereferences_slashed_symlink=no
9526fi
9527rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9528  conftest.$ac_objext conftest.beam conftest.$ac_ext
9529fi
9530
9531     rm -f conftest.sym conftest.file
9532
9533fi
9534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
9535$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
9536  case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
9537    *yes)
9538
9539cat >>confdefs.h <<_ACEOF
9540#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
9541_ACEOF
9542
9543      ;;
9544  esac
9545
9546
9547
9548
9549
9550
9551
9552  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
9553$as_echo_n "checking whether // is distinct from /... " >&6; }
9554if ${gl_cv_double_slash_root+:} false; then :
9555  $as_echo_n "(cached) " >&6
9556else
9557   if test x"$cross_compiling" = xyes ; then
9558        # When cross-compiling, there is no way to tell whether // is special
9559        # short of a list of hosts.  However, the only known hosts to date
9560        # that have a distinct // are Apollo DomainOS (too old to port to),
9561        # Cygwin, and z/OS.  If anyone knows of another system for which // has
9562        # special semantics and is distinct from /, please report it to
9563        # <bug-gnulib@gnu.org>.
9564        case $host in
9565          *-cygwin | i370-ibm-openedition)
9566            gl_cv_double_slash_root=yes ;;
9567          *)
9568            # Be optimistic and assume that / and // are the same when we
9569            # don't know.
9570            gl_cv_double_slash_root='unknown, assuming no' ;;
9571        esac
9572      else
9573        set x `ls -di / // 2>/dev/null`
9574        if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
9575          gl_cv_double_slash_root=no
9576        else
9577          gl_cv_double_slash_root=yes
9578        fi
9579      fi
9580fi
9581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
9582$as_echo "$gl_cv_double_slash_root" >&6; }
9583  if test "$gl_cv_double_slash_root" = yes; then
9584
9585$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
9586
9587  fi
9588
9589
9590
9591
9592
9593     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
9594$as_echo_n "checking whether realpath works... " >&6; }
9595if ${gl_cv_func_realpath_works+:} false; then :
9596  $as_echo_n "(cached) " >&6
9597else
9598
9599    rm -rf conftest.a conftest.d
9600    touch conftest.a
9601    mkdir conftest.d
9602    if test "$cross_compiling" = yes; then :
9603  case "$host_os" in
9604                       # Guess yes on glibc systems.
9605        *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
9606                       # Guess yes on musl systems.
9607        *-musl*)       gl_cv_func_realpath_works="guessing yes" ;;
9608                       # Guess no on native Windows.
9609        mingw*)        gl_cv_func_realpath_works="guessing no" ;;
9610                       # If we don't know, obey --enable-cross-guesses.
9611        *)             gl_cv_func_realpath_works="$gl_cross_guess_normal" ;;
9612      esac
9613
9614else
9615  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9616/* end confdefs.h.  */
9617
9618
9619
9620#include <stdlib.h>
9621#if defined __MACH__ && defined __APPLE__
9622/* Avoid a crash on Mac OS X.  */
9623#include <mach/mach.h>
9624#include <mach/mach_error.h>
9625#include <mach/thread_status.h>
9626#include <mach/exception.h>
9627#include <mach/task.h>
9628#include <pthread.h>
9629/* The exception port on which our thread listens.  */
9630static mach_port_t our_exception_port;
9631/* The main function of the thread listening for exceptions of type
9632   EXC_BAD_ACCESS.  */
9633static void *
9634mach_exception_thread (void *arg)
9635{
9636  /* Buffer for a message to be received.  */
9637  struct {
9638    mach_msg_header_t head;
9639    mach_msg_body_t msgh_body;
9640    char data[1024];
9641  } msg;
9642  mach_msg_return_t retval;
9643  /* Wait for a message on the exception port.  */
9644  retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
9645                     our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
9646  if (retval != MACH_MSG_SUCCESS)
9647    abort ();
9648  exit (1);
9649}
9650static void
9651nocrash_init (void)
9652{
9653  mach_port_t self = mach_task_self ();
9654  /* Allocate a port on which the thread shall listen for exceptions.  */
9655  if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
9656      == KERN_SUCCESS) {
9657    /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
9658    if (mach_port_insert_right (self, our_exception_port, our_exception_port,
9659                                MACH_MSG_TYPE_MAKE_SEND)
9660        == KERN_SUCCESS) {
9661      /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
9662         for us.  */
9663      exception_mask_t mask = EXC_MASK_BAD_ACCESS;
9664      /* Create the thread listening on the exception port.  */
9665      pthread_attr_t attr;
9666      pthread_t thread;
9667      if (pthread_attr_init (&attr) == 0
9668          && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
9669          && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
9670        pthread_attr_destroy (&attr);
9671        /* Replace the exception port info for these exceptions with our own.
9672           Note that we replace the exception port for the entire task, not only
9673           for a particular thread.  This has the effect that when our exception
9674           port gets the message, the thread specific exception port has already
9675           been asked, and we don't need to bother about it.
9676           See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
9677        task_set_exception_ports (self, mask, our_exception_port,
9678                                  EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
9679      }
9680    }
9681  }
9682}
9683#elif defined _WIN32 && ! defined __CYGWIN__
9684/* Avoid a crash on native Windows.  */
9685#define WIN32_LEAN_AND_MEAN
9686#include <windows.h>
9687#include <winerror.h>
9688static LONG WINAPI
9689exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
9690{
9691  switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
9692    {
9693    case EXCEPTION_ACCESS_VIOLATION:
9694    case EXCEPTION_IN_PAGE_ERROR:
9695    case EXCEPTION_STACK_OVERFLOW:
9696    case EXCEPTION_GUARD_PAGE:
9697    case EXCEPTION_PRIV_INSTRUCTION:
9698    case EXCEPTION_ILLEGAL_INSTRUCTION:
9699    case EXCEPTION_DATATYPE_MISALIGNMENT:
9700    case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
9701    case EXCEPTION_NONCONTINUABLE_EXCEPTION:
9702      exit (1);
9703    }
9704  return EXCEPTION_CONTINUE_SEARCH;
9705}
9706static void
9707nocrash_init (void)
9708{
9709  SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
9710}
9711#else
9712/* Avoid a crash on POSIX systems.  */
9713#include <signal.h>
9714#include <unistd.h>
9715/* A POSIX signal handler.  */
9716static void
9717exception_handler (int sig)
9718{
9719  _exit (1);
9720}
9721static void
9722nocrash_init (void)
9723{
9724#ifdef SIGSEGV
9725  signal (SIGSEGV, exception_handler);
9726#endif
9727#ifdef SIGBUS
9728  signal (SIGBUS, exception_handler);
9729#endif
9730}
9731#endif
9732
9733        #include <stdlib.h>
9734        #include <string.h>
9735
9736int
9737main ()
9738{
9739
9740        int result = 0;
9741        {
9742          char *name = realpath ("conftest.a", NULL);
9743          if (!(name && *name == '/'))
9744            result |= 1;
9745          free (name);
9746        }
9747        {
9748          char *name = realpath ("conftest.b/../conftest.a", NULL);
9749          if (name != NULL)
9750            result |= 2;
9751          free (name);
9752        }
9753        {
9754          char *name = realpath ("conftest.a/", NULL);
9755          if (name != NULL)
9756            result |= 4;
9757          free (name);
9758        }
9759        {
9760          char *name1 = realpath (".", NULL);
9761          char *name2 = realpath ("conftest.d//./..", NULL);
9762          if (! name1 || ! name2 || strcmp (name1, name2))
9763            result |= 8;
9764          free (name1);
9765          free (name2);
9766        }
9767        return result;
9768
9769  ;
9770  return 0;
9771}
9772
9773_ACEOF
9774if ac_fn_c_try_run "$LINENO"; then :
9775  gl_cv_func_realpath_works=yes
9776else
9777  gl_cv_func_realpath_works=no
9778fi
9779rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9780  conftest.$ac_objext conftest.beam conftest.$ac_ext
9781fi
9782
9783    rm -rf conftest.a conftest.d
9784
9785fi
9786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
9787$as_echo "$gl_cv_func_realpath_works" >&6; }
9788  case "$gl_cv_func_realpath_works" in
9789    *yes)
9790
9791$as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
9792
9793      ;;
9794  esac
9795
9796
9797
9798
9799
9800
9801
9802  case "$host_os" in
9803    mingw*) ;;
9804    *)      for ac_func in getcwd
9805do :
9806  ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
9807if test "x$ac_cv_func_getcwd" = xyes; then :
9808  cat >>confdefs.h <<_ACEOF
9809#define HAVE_GETCWD 1
9810_ACEOF
9811
9812fi
9813done
9814 ;;
9815  esac
9816
9817
9818
9819
9820
9821
9822
9823
9824  GNULIB_ACCESS=0;
9825  GNULIB_CHDIR=0;
9826  GNULIB_CHOWN=0;
9827  GNULIB_CLOSE=0;
9828  GNULIB_COPY_FILE_RANGE=0;
9829  GNULIB_DUP=0;
9830  GNULIB_DUP2=0;
9831  GNULIB_DUP3=0;
9832  GNULIB_ENVIRON=0;
9833  GNULIB_EUIDACCESS=0;
9834  GNULIB_EXECL=0;
9835  GNULIB_EXECLE=0;
9836  GNULIB_EXECLP=0;
9837  GNULIB_EXECV=0;
9838  GNULIB_EXECVE=0;
9839  GNULIB_EXECVP=0;
9840  GNULIB_EXECVPE=0;
9841  GNULIB_FACCESSAT=0;
9842  GNULIB_FCHDIR=0;
9843  GNULIB_FCHOWNAT=0;
9844  GNULIB_FDATASYNC=0;
9845  GNULIB_FSYNC=0;
9846  GNULIB_FTRUNCATE=0;
9847  GNULIB_GETCWD=0;
9848  GNULIB_GETDOMAINNAME=0;
9849  GNULIB_GETDTABLESIZE=0;
9850  GNULIB_GETENTROPY=0;
9851  GNULIB_GETGROUPS=0;
9852  GNULIB_GETHOSTNAME=0;
9853  GNULIB_GETLOGIN=0;
9854  GNULIB_GETLOGIN_R=0;
9855  GNULIB_GETOPT_POSIX=0;
9856  GNULIB_GETPAGESIZE=0;
9857  GNULIB_GETPASS=0;
9858  GNULIB_GETUSERSHELL=0;
9859  GNULIB_GROUP_MEMBER=0;
9860  GNULIB_ISATTY=0;
9861  GNULIB_LCHOWN=0;
9862  GNULIB_LINK=0;
9863  GNULIB_LINKAT=0;
9864  GNULIB_LSEEK=0;
9865  GNULIB_PIPE=0;
9866  GNULIB_PIPE2=0;
9867  GNULIB_PREAD=0;
9868  GNULIB_PWRITE=0;
9869  GNULIB_READ=0;
9870  GNULIB_READLINK=0;
9871  GNULIB_READLINKAT=0;
9872  GNULIB_RMDIR=0;
9873  GNULIB_SETHOSTNAME=0;
9874  GNULIB_SLEEP=0;
9875  GNULIB_SYMLINK=0;
9876  GNULIB_SYMLINKAT=0;
9877  GNULIB_TRUNCATE=0;
9878  GNULIB_TTYNAME_R=0;
9879  GNULIB_UNISTD_H_NONBLOCKING=0;
9880  GNULIB_UNISTD_H_SIGPIPE=0;
9881  GNULIB_UNLINK=0;
9882  GNULIB_UNLINKAT=0;
9883  GNULIB_USLEEP=0;
9884  GNULIB_WRITE=0;
9885    GNULIB_MDA_ACCESS=1;
9886  GNULIB_MDA_CHDIR=1;
9887  GNULIB_MDA_CLOSE=1;
9888  GNULIB_MDA_DUP=1;
9889  GNULIB_MDA_DUP2=1;
9890  GNULIB_MDA_EXECL=1;
9891  GNULIB_MDA_EXECLE=1;
9892  GNULIB_MDA_EXECLP=1;
9893  GNULIB_MDA_EXECV=1;
9894  GNULIB_MDA_EXECVE=1;
9895  GNULIB_MDA_EXECVP=1;
9896  GNULIB_MDA_EXECVPE=1;
9897  GNULIB_MDA_GETCWD=1;
9898  GNULIB_MDA_GETPID=1;
9899  GNULIB_MDA_ISATTY=1;
9900  GNULIB_MDA_LSEEK=1;
9901  GNULIB_MDA_READ=1;
9902  GNULIB_MDA_RMDIR=1;
9903  GNULIB_MDA_SWAB=1;
9904  GNULIB_MDA_UNLINK=1;
9905  GNULIB_MDA_WRITE=1;
9906    HAVE_CHOWN=1;
9907  HAVE_COPY_FILE_RANGE=1;
9908  HAVE_DUP3=1;
9909  HAVE_EUIDACCESS=1;
9910  HAVE_EXECVPE=1;
9911  HAVE_FACCESSAT=1;
9912  HAVE_FCHDIR=1;
9913  HAVE_FCHOWNAT=1;
9914  HAVE_FDATASYNC=1;
9915  HAVE_FSYNC=1;
9916  HAVE_FTRUNCATE=1;
9917  HAVE_GETDTABLESIZE=1;
9918  HAVE_GETENTROPY=1;
9919  HAVE_GETGROUPS=1;
9920  HAVE_GETHOSTNAME=1;
9921  HAVE_GETLOGIN=1;
9922  HAVE_GETPAGESIZE=1;
9923  HAVE_GETPASS=1;
9924  HAVE_GROUP_MEMBER=1;
9925  HAVE_LCHOWN=1;
9926  HAVE_LINK=1;
9927  HAVE_LINKAT=1;
9928  HAVE_PIPE=1;
9929  HAVE_PIPE2=1;
9930  HAVE_PREAD=1;
9931  HAVE_PWRITE=1;
9932  HAVE_READLINK=1;
9933  HAVE_READLINKAT=1;
9934  HAVE_SETHOSTNAME=1;
9935  HAVE_SLEEP=1;
9936  HAVE_SYMLINK=1;
9937  HAVE_SYMLINKAT=1;
9938  HAVE_UNLINKAT=1;
9939  HAVE_USLEEP=1;
9940  HAVE_DECL_ENVIRON=1;
9941  HAVE_DECL_EXECVPE=1;
9942  HAVE_DECL_FCHDIR=1;
9943  HAVE_DECL_FDATASYNC=1;
9944  HAVE_DECL_GETDOMAINNAME=1;
9945  HAVE_DECL_GETLOGIN=1;
9946  HAVE_DECL_GETLOGIN_R=1;
9947  HAVE_DECL_GETPAGESIZE=1;
9948  HAVE_DECL_GETUSERSHELL=1;
9949  HAVE_DECL_SETHOSTNAME=1;
9950  HAVE_DECL_TRUNCATE=1;
9951  HAVE_DECL_TTYNAME_R=1;
9952  HAVE_OS_H=0;
9953  HAVE_SYS_PARAM_H=0;
9954  REPLACE_ACCESS=0;
9955  REPLACE_CHOWN=0;
9956  REPLACE_CLOSE=0;
9957  REPLACE_DUP=0;
9958  REPLACE_DUP2=0;
9959  REPLACE_EXECL=0;
9960  REPLACE_EXECLE=0;
9961  REPLACE_EXECLP=0;
9962  REPLACE_EXECV=0;
9963  REPLACE_EXECVE=0;
9964  REPLACE_EXECVP=0;
9965  REPLACE_EXECVPE=0;
9966  REPLACE_FACCESSAT=0;
9967  REPLACE_FCHOWNAT=0;
9968  REPLACE_FTRUNCATE=0;
9969  REPLACE_GETCWD=0;
9970  REPLACE_GETDOMAINNAME=0;
9971  REPLACE_GETDTABLESIZE=0;
9972  REPLACE_GETLOGIN_R=0;
9973  REPLACE_GETGROUPS=0;
9974  REPLACE_GETPAGESIZE=0;
9975  REPLACE_GETPASS=0;
9976  REPLACE_ISATTY=0;
9977  REPLACE_LCHOWN=0;
9978  REPLACE_LINK=0;
9979  REPLACE_LINKAT=0;
9980  REPLACE_LSEEK=0;
9981  REPLACE_PREAD=0;
9982  REPLACE_PWRITE=0;
9983  REPLACE_READ=0;
9984  REPLACE_READLINK=0;
9985  REPLACE_READLINKAT=0;
9986  REPLACE_RMDIR=0;
9987  REPLACE_SLEEP=0;
9988  REPLACE_SYMLINK=0;
9989  REPLACE_SYMLINKAT=0;
9990  REPLACE_TRUNCATE=0;
9991  REPLACE_TTYNAME_R=0;
9992  REPLACE_UNLINK=0;
9993  REPLACE_UNLINKAT=0;
9994  REPLACE_USLEEP=0;
9995  REPLACE_WRITE=0;
9996  UNISTD_H_HAVE_SYS_RANDOM_H=0;
9997  UNISTD_H_HAVE_WINSOCK2_H=0;
9998  UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
9999
10000
10001
10002
10003
10004gl_mda_defines='
10005#if defined _WIN32 && !defined __CYGWIN__
10006#define access    _access
10007#define chdir     _chdir
10008#define chmod     _chmod
10009#define close     _close
10010#define creat     _creat
10011#define dup       _dup
10012#define dup2      _dup2
10013#define ecvt      _ecvt
10014#define execl     _execl
10015#define execle    _execle
10016#define execlp    _execlp
10017#define execv     _execv
10018#define execve    _execve
10019#define execvp    _execvp
10020#define execvpe   _execvpe
10021#define fcloseall _fcloseall
10022#define fcvt      _fcvt
10023#define fdopen    _fdopen
10024#define fileno    _fileno
10025#define gcvt      _gcvt
10026#define getcwd    _getcwd
10027#define getpid    _getpid
10028#define getw      _getw
10029#define isatty    _isatty
10030#define j0        _j0
10031#define j1        _j1
10032#define jn        _jn
10033#define lfind     _lfind
10034#define lsearch   _lsearch
10035#define lseek     _lseek
10036#define memccpy   _memccpy
10037#define mkdir     _mkdir
10038#define mktemp    _mktemp
10039#define open      _open
10040#define putenv    _putenv
10041#define putw      _putw
10042#define read      _read
10043#define rmdir     _rmdir
10044#define strdup    _strdup
10045#define swab      _swab
10046#define tempnam   _tempnam
10047#define tzset     _tzset
10048#define umask     _umask
10049#define unlink    _unlink
10050#define utime     _utime
10051#define wcsdup    _wcsdup
10052#define write     _write
10053#define y0        _y0
10054#define y1        _y1
10055#define yn        _yn
10056#endif
10057'
10058
10059
10060      for ac_header in unistd.h
10061do :
10062  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
10063if test "x$ac_cv_header_unistd_h" = xyes; then :
10064  cat >>confdefs.h <<_ACEOF
10065#define HAVE_UNISTD_H 1
10066_ACEOF
10067
10068fi
10069
10070done
10071
10072  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
10073$as_echo_n "checking for working chown... " >&6; }
10074if ${ac_cv_func_chown_works+:} false; then :
10075  $as_echo_n "(cached) " >&6
10076else
10077  if test "$cross_compiling" = yes; then :
10078  case "$host_os" in # ((
10079                           # Guess yes on Linux systems.
10080          linux-* | linux) ac_cv_func_chown_works="guessing yes" ;;
10081                           # Guess yes on glibc systems.
10082          *-gnu* | gnu*)   ac_cv_func_chown_works="guessing yes" ;;
10083                           # Guess no on native Windows.
10084          mingw*)          ac_cv_func_chown_works="guessing no" ;;
10085                           # If we don't know, obey --enable-cross-guesses.
10086          *)               ac_cv_func_chown_works="$gl_cross_guess_normal" ;;
10087        esac
10088
10089else
10090  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10091/* end confdefs.h.  */
10092$ac_includes_default
10093           #include <fcntl.h>
10094
10095
10096$gl_mda_defines
10097
10098int
10099main ()
10100{
10101
10102            char *f = "conftest.chown";
10103            struct stat before, after;
10104
10105            if (creat (f, 0600) < 0)
10106              return 1;
10107            if (stat (f, &before) < 0)
10108              return 1;
10109            if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
10110              return 1;
10111            if (stat (f, &after) < 0)
10112              return 1;
10113            return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
10114
10115  ;
10116  return 0;
10117}
10118
10119_ACEOF
10120if ac_fn_c_try_run "$LINENO"; then :
10121  ac_cv_func_chown_works=yes
10122else
10123  ac_cv_func_chown_works=no
10124fi
10125rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10126  conftest.$ac_objext conftest.beam conftest.$ac_ext
10127fi
10128
10129     rm -f conftest.chown
10130
10131fi
10132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
10133$as_echo "$ac_cv_func_chown_works" >&6; }
10134  case "$ac_cv_func_chown_works" in
10135    *yes)
10136
10137$as_echo "#define HAVE_CHOWN 1" >>confdefs.h
10138
10139      ;;
10140  esac
10141
10142
10143  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown dereferences symlinks" >&5
10144$as_echo_n "checking whether chown dereferences symlinks... " >&6; }
10145if ${gl_cv_func_chown_follows_symlink+:} false; then :
10146  $as_echo_n "(cached) " >&6
10147else
10148
10149      if test "$cross_compiling" = yes; then :
10150  gl_cv_func_chown_follows_symlink="guessing yes"
10151
10152else
10153  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10154/* end confdefs.h.  */
10155
10156#include <unistd.h>
10157#include <stdlib.h>
10158#include <errno.h>
10159
10160
10161$gl_mda_defines
10162
10163        int
10164        main ()
10165        {
10166          int result = 0;
10167          char const *dangling_symlink = "conftest.dangle";
10168
10169          unlink (dangling_symlink);
10170          if (symlink ("conftest.no-such", dangling_symlink))
10171            abort ();
10172
10173          /* Exit successfully on a conforming system,
10174             i.e., where chown must fail with ENOENT.  */
10175          if (chown (dangling_symlink, getuid (), getgid ()) == 0)
10176            result |= 1;
10177          if (errno != ENOENT)
10178            result |= 2;
10179          return result;
10180        }
10181
10182_ACEOF
10183if ac_fn_c_try_run "$LINENO"; then :
10184  gl_cv_func_chown_follows_symlink=yes
10185else
10186  gl_cv_func_chown_follows_symlink=no
10187fi
10188rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10189  conftest.$ac_objext conftest.beam conftest.$ac_ext
10190fi
10191
10192
10193
10194fi
10195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_follows_symlink" >&5
10196$as_echo "$gl_cv_func_chown_follows_symlink" >&6; }
10197
10198  case "$gl_cv_func_chown_follows_symlink" in
10199    *yes) ;;
10200    *)
10201
10202$as_echo "#define CHOWN_MODIFIES_SYMLINK 1" >>confdefs.h
10203
10204      ;;
10205  esac
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218    if test $ac_cv_func_chown = no; then
10219    HAVE_CHOWN=0
10220  else
10221        case "$gl_cv_func_chown_follows_symlink" in
10222      *yes) ;;
10223      *) REPLACE_CHOWN=1 ;;
10224    esac
10225
10226        case "$ac_cv_func_chown_works" in
10227      *no)
10228
10229$as_echo "#define CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE 1" >>confdefs.h
10230
10231        REPLACE_CHOWN=1
10232        ;;
10233    esac
10234
10235                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown honors trailing slash" >&5
10236$as_echo_n "checking whether chown honors trailing slash... " >&6; }
10237if ${gl_cv_func_chown_slash_works+:} false; then :
10238  $as_echo_n "(cached) " >&6
10239else
10240  touch conftest.file && rm -f conftest.link
10241       if test "$cross_compiling" = yes; then :
10242  case "$host_os" in
10243                    # Guess yes on glibc systems.
10244           *-gnu*)  gl_cv_func_chown_slash_works="guessing yes" ;;
10245                    # Guess yes on musl systems.
10246           *-musl*) gl_cv_func_chown_slash_works="guessing yes" ;;
10247                    # If we don't know, obey --enable-cross-guesses.
10248           *)       gl_cv_func_chown_slash_works="$gl_cross_guess_normal" ;;
10249         esac
10250
10251else
10252  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10253/* end confdefs.h.  */
10254
10255#include <unistd.h>
10256#include <stdlib.h>
10257#include <errno.h>
10258
10259
10260$gl_mda_defines
10261
10262int
10263main ()
10264{
10265if (symlink ("conftest.file", "conftest.link")) return 1;
10266          if (chown ("conftest.link/", getuid (), getgid ()) == 0) return 2;
10267
10268  ;
10269  return 0;
10270}
10271_ACEOF
10272if ac_fn_c_try_run "$LINENO"; then :
10273  gl_cv_func_chown_slash_works=yes
10274else
10275  gl_cv_func_chown_slash_works=no
10276fi
10277rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10278  conftest.$ac_objext conftest.beam conftest.$ac_ext
10279fi
10280
10281      rm -f conftest.link conftest.file
10282fi
10283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_slash_works" >&5
10284$as_echo "$gl_cv_func_chown_slash_works" >&6; }
10285    case "$gl_cv_func_chown_slash_works" in
10286      *yes) ;;
10287      *)
10288
10289$as_echo "#define CHOWN_TRAILING_SLASH_BUG 1" >>confdefs.h
10290
10291        REPLACE_CHOWN=1
10292        ;;
10293    esac
10294
10295        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown always updates ctime" >&5
10296$as_echo_n "checking whether chown always updates ctime... " >&6; }
10297if ${gl_cv_func_chown_ctime_works+:} false; then :
10298  $as_echo_n "(cached) " >&6
10299else
10300  if test "$cross_compiling" = yes; then :
10301  case "$host_os" in
10302                    # Guess yes on glibc systems.
10303           *-gnu*)  gl_cv_func_chown_ctime_works="guessing yes" ;;
10304                    # Guess yes on musl systems.
10305           *-musl*) gl_cv_func_chown_ctime_works="guessing yes" ;;
10306                    # If we don't know, obey --enable-cross-guesses.
10307           *)       gl_cv_func_chown_ctime_works="$gl_cross_guess_normal" ;;
10308         esac
10309
10310else
10311  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10312/* end confdefs.h.  */
10313
10314#include <unistd.h>
10315#include <stdlib.h>
10316#include <errno.h>
10317#include <fcntl.h>
10318#include <sys/stat.h>
10319
10320
10321$gl_mda_defines
10322
10323int
10324main ()
10325{
10326struct stat st1, st2;
10327          if (close (creat ("conftest.file", 0600))) return 1;
10328          if (stat ("conftest.file", &st1)) return 2;
10329          sleep (1);
10330          if (chown ("conftest.file", st1.st_uid, st1.st_gid)) return 3;
10331          if (stat ("conftest.file", &st2)) return 4;
10332          if (st2.st_ctime <= st1.st_ctime) return 5;
10333
10334  ;
10335  return 0;
10336}
10337_ACEOF
10338if ac_fn_c_try_run "$LINENO"; then :
10339  gl_cv_func_chown_ctime_works=yes
10340else
10341  gl_cv_func_chown_ctime_works=no
10342fi
10343rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10344  conftest.$ac_objext conftest.beam conftest.$ac_ext
10345fi
10346
10347      rm -f conftest.file
10348fi
10349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_ctime_works" >&5
10350$as_echo "$gl_cv_func_chown_ctime_works" >&6; }
10351    case "$gl_cv_func_chown_ctime_works" in
10352      *yes) ;;
10353      *)
10354
10355$as_echo "#define CHOWN_CHANGE_TIME_BUG 1" >>confdefs.h
10356
10357        REPLACE_CHOWN=1
10358        ;;
10359    esac
10360  fi
10361
10362
10363
10364
10365
10366  if test $ac_cv_func__set_invalid_parameter_handler = yes; then
10367    HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
10368
10369$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
10370
10371  else
10372    HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
10373  fi
10374
10375
10376
10377
10378
10379
10380
10381     GNULIB_OPENDIR=0;
10382  GNULIB_READDIR=0;
10383  GNULIB_REWINDDIR=0;
10384  GNULIB_CLOSEDIR=0;
10385  GNULIB_DIRFD=0;
10386  GNULIB_FDOPENDIR=0;
10387  GNULIB_SCANDIR=0;
10388  GNULIB_ALPHASORT=0;
10389    HAVE_OPENDIR=1;
10390  HAVE_READDIR=1;
10391  HAVE_REWINDDIR=1;
10392  HAVE_CLOSEDIR=1;
10393  HAVE_DECL_DIRFD=1;
10394  HAVE_DECL_FDOPENDIR=1;
10395  HAVE_FDOPENDIR=1;
10396  HAVE_SCANDIR=1;
10397  HAVE_ALPHASORT=1;
10398  REPLACE_OPENDIR=0;
10399  REPLACE_CLOSEDIR=0;
10400  REPLACE_DIRFD=0;
10401  REPLACE_FDOPENDIR=0;
10402
10403
10404  GNULIB_ISBLANK=0;
10405    HAVE_ISBLANK=1;
10406
10407
10408
10409  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
10410$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
10411if ${gl_cv_have_include_next+:} false; then :
10412  $as_echo_n "(cached) " >&6
10413else
10414  rm -rf conftestd1a conftestd1b conftestd2
10415     mkdir conftestd1a conftestd1b conftestd2
10416                                                  cat <<EOF > conftestd1a/conftest.h
10417#define DEFINED_IN_CONFTESTD1
10418#include_next <conftest.h>
10419#ifdef DEFINED_IN_CONFTESTD2
10420int foo;
10421#else
10422#error "include_next doesn't work"
10423#endif
10424EOF
10425     cat <<EOF > conftestd1b/conftest.h
10426#define DEFINED_IN_CONFTESTD1
10427#include <stdio.h>
10428#include_next <conftest.h>
10429#ifdef DEFINED_IN_CONFTESTD2
10430int foo;
10431#else
10432#error "include_next doesn't work"
10433#endif
10434EOF
10435     cat <<EOF > conftestd2/conftest.h
10436#ifndef DEFINED_IN_CONFTESTD1
10437#error "include_next test doesn't work"
10438#endif
10439#define DEFINED_IN_CONFTESTD2
10440EOF
10441     gl_save_CPPFLAGS="$CPPFLAGS"
10442     CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
10443     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10444/* end confdefs.h.  */
10445#include <conftest.h>
10446_ACEOF
10447if ac_fn_c_try_compile "$LINENO"; then :
10448  gl_cv_have_include_next=yes
10449else
10450  CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
10451        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10452/* end confdefs.h.  */
10453#include <conftest.h>
10454_ACEOF
10455if ac_fn_c_try_compile "$LINENO"; then :
10456  gl_cv_have_include_next=buggy
10457else
10458  gl_cv_have_include_next=no
10459fi
10460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10461
10462fi
10463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10464     CPPFLAGS="$gl_save_CPPFLAGS"
10465     rm -rf conftestd1a conftestd1b conftestd2
10466
10467fi
10468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
10469$as_echo "$gl_cv_have_include_next" >&6; }
10470  PRAGMA_SYSTEM_HEADER=
10471  if test $gl_cv_have_include_next = yes; then
10472    INCLUDE_NEXT=include_next
10473    INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
10474    if test -n "$GCC"; then
10475      PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
10476    fi
10477  else
10478    if test $gl_cv_have_include_next = buggy; then
10479      INCLUDE_NEXT=include
10480      INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
10481    else
10482      INCLUDE_NEXT=include
10483      INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
10484    fi
10485  fi
10486
10487
10488
10489
10490      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether source code line length is unlimited" >&5
10491$as_echo_n "checking whether source code line length is unlimited... " >&6; }
10492if ${gl_cv_source_line_length_unlimited+:} false; then :
10493  $as_echo_n "(cached) " >&6
10494else
10495  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10496/* end confdefs.h.  */
10497
10498#ifdef __TANDEM
10499choke me
10500#endif
10501
10502_ACEOF
10503if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10504  $EGREP "choke me" >/dev/null 2>&1; then :
10505  gl_cv_source_line_length_unlimited=no
10506else
10507  gl_cv_source_line_length_unlimited=yes
10508fi
10509rm -f conftest*
10510
10511
10512fi
10513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_source_line_length_unlimited" >&5
10514$as_echo "$gl_cv_source_line_length_unlimited" >&6; }
10515  if test $gl_cv_source_line_length_unlimited = no; then
10516    PRAGMA_COLUMNS="#pragma COLUMNS 10000"
10517  else
10518    PRAGMA_COLUMNS=
10519  fi
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
10534$as_echo_n "checking if environ is properly declared... " >&6; }
10535if ${gt_cv_var_environ_declaration+:} false; then :
10536  $as_echo_n "(cached) " >&6
10537else
10538  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10539/* end confdefs.h.  */
10540#if HAVE_UNISTD_H
10541     #include <unistd.h>
10542     #endif
10543     /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>.  */
10544     #include <stdlib.h>
10545
10546            extern struct { int foo; } environ;
10547int
10548main ()
10549{
10550environ.foo = 1;
10551  ;
10552  return 0;
10553}
10554_ACEOF
10555if ac_fn_c_try_compile "$LINENO"; then :
10556  gt_cv_var_environ_declaration=no
10557else
10558  gt_cv_var_environ_declaration=yes
10559fi
10560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10561fi
10562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
10563$as_echo "$gt_cv_var_environ_declaration" >&6; }
10564  if test $gt_cv_var_environ_declaration = yes; then
10565
10566$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
10567
10568  fi
10569
10570
10571  if test $gt_cv_var_environ_declaration != yes; then
10572    HAVE_DECL_ENVIRON=0
10573  fi
10574
10575
10576
10577  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
10578$as_echo_n "checking for complete errno.h... " >&6; }
10579if ${gl_cv_header_errno_h_complete+:} false; then :
10580  $as_echo_n "(cached) " >&6
10581else
10582
10583    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10584/* end confdefs.h.  */
10585
10586#include <errno.h>
10587#if !defined ETXTBSY
10588booboo
10589#endif
10590#if !defined ENOMSG
10591booboo
10592#endif
10593#if !defined EIDRM
10594booboo
10595#endif
10596#if !defined ENOLINK
10597booboo
10598#endif
10599#if !defined EPROTO
10600booboo
10601#endif
10602#if !defined EMULTIHOP
10603booboo
10604#endif
10605#if !defined EBADMSG
10606booboo
10607#endif
10608#if !defined EOVERFLOW
10609booboo
10610#endif
10611#if !defined ENOTSUP
10612booboo
10613#endif
10614#if !defined ENETRESET
10615booboo
10616#endif
10617#if !defined ECONNABORTED
10618booboo
10619#endif
10620#if !defined ESTALE
10621booboo
10622#endif
10623#if !defined EDQUOT
10624booboo
10625#endif
10626#if !defined ECANCELED
10627booboo
10628#endif
10629#if !defined EOWNERDEAD
10630booboo
10631#endif
10632#if !defined ENOTRECOVERABLE
10633booboo
10634#endif
10635#if !defined EILSEQ
10636booboo
10637#endif
10638
10639_ACEOF
10640if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10641  $EGREP "booboo" >/dev/null 2>&1; then :
10642  gl_cv_header_errno_h_complete=no
10643else
10644  gl_cv_header_errno_h_complete=yes
10645fi
10646rm -f conftest*
10647
10648
10649fi
10650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
10651$as_echo "$gl_cv_header_errno_h_complete" >&6; }
10652  if test $gl_cv_header_errno_h_complete = yes; then
10653    ERRNO_H=''
10654  else
10655
10656
10657
10658
10659
10660
10661
10662
10663     if test $gl_cv_have_include_next = yes; then
10664       gl_cv_next_errno_h='<'errno.h'>'
10665     else
10666       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
10667$as_echo_n "checking absolute name of <errno.h>... " >&6; }
10668if ${gl_cv_next_errno_h+:} false; then :
10669  $as_echo_n "(cached) " >&6
10670else
10671
10672
10673
10674  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10675/* end confdefs.h.  */
10676#include <errno.h>
10677_ACEOF
10678                case "$host_os" in
10679    aix*) gl_absname_cpp="$ac_cpp -C" ;;
10680    *)    gl_absname_cpp="$ac_cpp" ;;
10681  esac
10682
10683  case "$host_os" in
10684    mingw*)
10685                                          gl_dirsep_regex='[/\\]'
10686      ;;
10687    *)
10688      gl_dirsep_regex='\/'
10689      ;;
10690  esac
10691      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10692  gl_header_literal_regex=`echo 'errno.h' \
10693                           | sed -e "$gl_make_literal_regex_sed"`
10694  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10695      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10696      s|^/[^/]|//&|
10697      p
10698      q
10699    }'
10700
10701        gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10702  sed -n "$gl_absolute_header_sed"`
10703
10704           gl_header=$gl_cv_absolute_errno_h
10705           gl_cv_next_errno_h='"'$gl_header'"'
10706
10707
10708fi
10709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
10710$as_echo "$gl_cv_next_errno_h" >&6; }
10711     fi
10712     NEXT_ERRNO_H=$gl_cv_next_errno_h
10713
10714     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10715       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10716       gl_next_as_first_directive='<'errno.h'>'
10717     else
10718       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10719       gl_next_as_first_directive=$gl_cv_next_errno_h
10720     fi
10721     NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
10722
10723
10724
10725
10726    ERRNO_H='errno.h'
10727  fi
10728
10729   if test -n "$ERRNO_H"; then
10730  GL_GENERATE_ERRNO_H_TRUE=
10731  GL_GENERATE_ERRNO_H_FALSE='#'
10732else
10733  GL_GENERATE_ERRNO_H_TRUE='#'
10734  GL_GENERATE_ERRNO_H_FALSE=
10735fi
10736
10737
10738  if test -n "$ERRNO_H"; then
10739    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
10740$as_echo_n "checking for EMULTIHOP value... " >&6; }
10741if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
10742  $as_echo_n "(cached) " >&6
10743else
10744
10745      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10746/* end confdefs.h.  */
10747
10748#include <errno.h>
10749#ifdef EMULTIHOP
10750yes
10751#endif
10752
10753_ACEOF
10754if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10755  $EGREP "yes" >/dev/null 2>&1; then :
10756  gl_cv_header_errno_h_EMULTIHOP=yes
10757else
10758  gl_cv_header_errno_h_EMULTIHOP=no
10759fi
10760rm -f conftest*
10761
10762      if test $gl_cv_header_errno_h_EMULTIHOP = no; then
10763        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10764/* end confdefs.h.  */
10765
10766#define _XOPEN_SOURCE_EXTENDED 1
10767#include <errno.h>
10768#ifdef EMULTIHOP
10769yes
10770#endif
10771
10772_ACEOF
10773if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10774  $EGREP "yes" >/dev/null 2>&1; then :
10775  gl_cv_header_errno_h_EMULTIHOP=hidden
10776fi
10777rm -f conftest*
10778
10779        if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
10780                              if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP"        "
10781#define _XOPEN_SOURCE_EXTENDED 1
10782#include <errno.h>
10783/* The following two lines are a workaround against an autoconf-2.52 bug.  */
10784#include <stdio.h>
10785#include <stdlib.h>
10786"; then :
10787
10788fi
10789
10790        fi
10791      fi
10792
10793fi
10794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
10795$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
10796    case $gl_cv_header_errno_h_EMULTIHOP in
10797      yes | no)
10798        EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
10799        ;;
10800      *)
10801        EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
10802        ;;
10803    esac
10804
10805
10806  fi
10807
10808
10809  if test -n "$ERRNO_H"; then
10810    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
10811$as_echo_n "checking for ENOLINK value... " >&6; }
10812if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
10813  $as_echo_n "(cached) " >&6
10814else
10815
10816      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10817/* end confdefs.h.  */
10818
10819#include <errno.h>
10820#ifdef ENOLINK
10821yes
10822#endif
10823
10824_ACEOF
10825if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10826  $EGREP "yes" >/dev/null 2>&1; then :
10827  gl_cv_header_errno_h_ENOLINK=yes
10828else
10829  gl_cv_header_errno_h_ENOLINK=no
10830fi
10831rm -f conftest*
10832
10833      if test $gl_cv_header_errno_h_ENOLINK = no; then
10834        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10835/* end confdefs.h.  */
10836
10837#define _XOPEN_SOURCE_EXTENDED 1
10838#include <errno.h>
10839#ifdef ENOLINK
10840yes
10841#endif
10842
10843_ACEOF
10844if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10845  $EGREP "yes" >/dev/null 2>&1; then :
10846  gl_cv_header_errno_h_ENOLINK=hidden
10847fi
10848rm -f conftest*
10849
10850        if test $gl_cv_header_errno_h_ENOLINK = hidden; then
10851                              if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK"        "
10852#define _XOPEN_SOURCE_EXTENDED 1
10853#include <errno.h>
10854/* The following two lines are a workaround against an autoconf-2.52 bug.  */
10855#include <stdio.h>
10856#include <stdlib.h>
10857"; then :
10858
10859fi
10860
10861        fi
10862      fi
10863
10864fi
10865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
10866$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
10867    case $gl_cv_header_errno_h_ENOLINK in
10868      yes | no)
10869        ENOLINK_HIDDEN=0; ENOLINK_VALUE=
10870        ;;
10871      *)
10872        ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
10873        ;;
10874    esac
10875
10876
10877  fi
10878
10879
10880  if test -n "$ERRNO_H"; then
10881    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
10882$as_echo_n "checking for EOVERFLOW value... " >&6; }
10883if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
10884  $as_echo_n "(cached) " >&6
10885else
10886
10887      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10888/* end confdefs.h.  */
10889
10890#include <errno.h>
10891#ifdef EOVERFLOW
10892yes
10893#endif
10894
10895_ACEOF
10896if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10897  $EGREP "yes" >/dev/null 2>&1; then :
10898  gl_cv_header_errno_h_EOVERFLOW=yes
10899else
10900  gl_cv_header_errno_h_EOVERFLOW=no
10901fi
10902rm -f conftest*
10903
10904      if test $gl_cv_header_errno_h_EOVERFLOW = no; then
10905        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10906/* end confdefs.h.  */
10907
10908#define _XOPEN_SOURCE_EXTENDED 1
10909#include <errno.h>
10910#ifdef EOVERFLOW
10911yes
10912#endif
10913
10914_ACEOF
10915if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10916  $EGREP "yes" >/dev/null 2>&1; then :
10917  gl_cv_header_errno_h_EOVERFLOW=hidden
10918fi
10919rm -f conftest*
10920
10921        if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
10922                              if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW"        "
10923#define _XOPEN_SOURCE_EXTENDED 1
10924#include <errno.h>
10925/* The following two lines are a workaround against an autoconf-2.52 bug.  */
10926#include <stdio.h>
10927#include <stdlib.h>
10928"; then :
10929
10930fi
10931
10932        fi
10933      fi
10934
10935fi
10936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
10937$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
10938    case $gl_cv_header_errno_h_EOVERFLOW in
10939      yes | no)
10940        EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
10941        ;;
10942      *)
10943        EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
10944        ;;
10945    esac
10946
10947
10948  fi
10949
10950
10951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
10952$as_echo_n "checking type of array argument to getgroups... " >&6; }
10953if ${ac_cv_type_getgroups+:} false; then :
10954  $as_echo_n "(cached) " >&6
10955else
10956  if test "$cross_compiling" = yes; then :
10957  ac_cv_type_getgroups=cross
10958else
10959  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10960/* end confdefs.h.  */
10961/* Thanks to Mike Rendell for this test.  */
10962$ac_includes_default
10963#define NGID 256
10964#undef MAX
10965#define MAX(x, y) ((x) > (y) ? (x) : (y))
10966
10967int
10968main ()
10969{
10970  gid_t gidset[NGID];
10971  int i, n;
10972  union { gid_t gval; long int lval; }  val;
10973
10974  val.lval = -1;
10975  for (i = 0; i < NGID; i++)
10976    gidset[i] = val.gval;
10977  n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
10978		 gidset);
10979  /* Exit non-zero if getgroups seems to require an array of ints.  This
10980     happens when gid_t is short int but getgroups modifies an array
10981     of ints.  */
10982  return n > 0 && gidset[n] != val.gval;
10983}
10984_ACEOF
10985if ac_fn_c_try_run "$LINENO"; then :
10986  ac_cv_type_getgroups=gid_t
10987else
10988  ac_cv_type_getgroups=int
10989fi
10990rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10991  conftest.$ac_objext conftest.beam conftest.$ac_ext
10992fi
10993
10994if test $ac_cv_type_getgroups = cross; then
10995        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10996/* end confdefs.h.  */
10997#include <unistd.h>
10998
10999_ACEOF
11000if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11001  $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then :
11002  ac_cv_type_getgroups=gid_t
11003else
11004  ac_cv_type_getgroups=int
11005fi
11006rm -f conftest*
11007
11008fi
11009fi
11010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5
11011$as_echo "$ac_cv_type_getgroups" >&6; }
11012
11013cat >>confdefs.h <<_ACEOF
11014#define GETGROUPS_T $ac_cv_type_getgroups
11015_ACEOF
11016
11017
11018
11019
11020
11021ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
11022if test "x$ac_cv_have_decl_fchdir" = xyes; then :
11023  ac_have_decl=1
11024else
11025  ac_have_decl=0
11026fi
11027
11028cat >>confdefs.h <<_ACEOF
11029#define HAVE_DECL_FCHDIR $ac_have_decl
11030_ACEOF
11031
11032
11033     GNULIB_FCHMODAT=0;
11034  GNULIB_FSTAT=0;
11035  GNULIB_FSTATAT=0;
11036  GNULIB_FUTIMENS=0;
11037  GNULIB_GETUMASK=0;
11038  GNULIB_LCHMOD=0;
11039  GNULIB_LSTAT=0;
11040  GNULIB_MKDIR=0;
11041  GNULIB_MKDIRAT=0;
11042  GNULIB_MKFIFO=0;
11043  GNULIB_MKFIFOAT=0;
11044  GNULIB_MKNOD=0;
11045  GNULIB_MKNODAT=0;
11046  GNULIB_STAT=0;
11047  GNULIB_UTIMENSAT=0;
11048  GNULIB_OVERRIDES_STRUCT_STAT=0;
11049    GNULIB_MDA_CHMOD=1;
11050  GNULIB_MDA_MKDIR=1;
11051  GNULIB_MDA_UMASK=1;
11052    HAVE_FCHMODAT=1;
11053  HAVE_FSTATAT=1;
11054  HAVE_FUTIMENS=1;
11055  HAVE_GETUMASK=1;
11056  HAVE_LCHMOD=1;
11057  HAVE_LSTAT=1;
11058  HAVE_MKDIRAT=1;
11059  HAVE_MKFIFO=1;
11060  HAVE_MKFIFOAT=1;
11061  HAVE_MKNOD=1;
11062  HAVE_MKNODAT=1;
11063  HAVE_UTIMENSAT=1;
11064  REPLACE_FCHMODAT=0;
11065  REPLACE_FSTAT=0;
11066  REPLACE_FSTATAT=0;
11067  REPLACE_FUTIMENS=0;
11068  REPLACE_LSTAT=0;
11069  REPLACE_MKDIR=0;
11070  REPLACE_MKFIFO=0;
11071  REPLACE_MKFIFOAT=0;
11072  REPLACE_MKNOD=0;
11073  REPLACE_MKNODAT=0;
11074  REPLACE_STAT=0;
11075  REPLACE_UTIMENSAT=0;
11076
11077
11078
11079
11080
11081
11082  GNULIB_CREAT=0;
11083  GNULIB_FCNTL=0;
11084  GNULIB_NONBLOCKING=0;
11085  GNULIB_OPEN=0;
11086  GNULIB_OPENAT=0;
11087    GNULIB_MDA_CREAT=1;
11088  GNULIB_MDA_OPEN=1;
11089    HAVE_FCNTL=1;
11090  HAVE_OPENAT=1;
11091  REPLACE_CREAT=0;
11092  REPLACE_FCNTL=0;
11093  REPLACE_OPEN=0;
11094  REPLACE_OPENAT=0;
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
11106$as_echo_n "checking for working fcntl.h... " >&6; }
11107if ${gl_cv_header_working_fcntl_h+:} false; then :
11108  $as_echo_n "(cached) " >&6
11109else
11110  if test "$cross_compiling" = yes; then :
11111  case "$host_os" in
11112                  # Guess 'no' on native Windows.
11113          mingw*) gl_cv_header_working_fcntl_h='no' ;;
11114          *)      gl_cv_header_working_fcntl_h=cross-compiling ;;
11115        esac
11116
11117else
11118  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11119/* end confdefs.h.  */
11120#include <sys/types.h>
11121           #include <sys/stat.h>
11122           #if HAVE_UNISTD_H
11123           # include <unistd.h>
11124           #else /* on Windows with MSVC */
11125           # include <io.h>
11126           # include <stdlib.h>
11127           # defined sleep(n) _sleep ((n) * 1000)
11128           #endif
11129           #include <fcntl.h>
11130
11131
11132$gl_mda_defines
11133
11134           #ifndef O_NOATIME
11135            #define O_NOATIME 0
11136           #endif
11137           #ifndef O_NOFOLLOW
11138            #define O_NOFOLLOW 0
11139           #endif
11140           static int const constants[] =
11141            {
11142              O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
11143              O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
11144            };
11145
11146int
11147main ()
11148{
11149
11150            int result = !constants;
11151            #if HAVE_SYMLINK
11152            {
11153              static char const sym[] = "conftest.sym";
11154              if (symlink ("/dev/null", sym) != 0)
11155                result |= 2;
11156              else
11157                {
11158                  int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
11159                  if (fd >= 0)
11160                    {
11161                      close (fd);
11162                      result |= 4;
11163                    }
11164                }
11165              if (unlink (sym) != 0 || symlink (".", sym) != 0)
11166                result |= 2;
11167              else
11168                {
11169                  int fd = open (sym, O_RDONLY | O_NOFOLLOW);
11170                  if (fd >= 0)
11171                    {
11172                      close (fd);
11173                      result |= 4;
11174                    }
11175                }
11176              unlink (sym);
11177            }
11178            #endif
11179            {
11180              static char const file[] = "confdefs.h";
11181              int fd = open (file, O_RDONLY | O_NOATIME);
11182              if (fd < 0)
11183                result |= 8;
11184              else
11185                {
11186                  struct stat st0;
11187                  if (fstat (fd, &st0) != 0)
11188                    result |= 16;
11189                  else
11190                    {
11191                      char c;
11192                      sleep (1);
11193                      if (read (fd, &c, 1) != 1)
11194                        result |= 24;
11195                      else
11196                        {
11197                          if (close (fd) != 0)
11198                            result |= 32;
11199                          else
11200                            {
11201                              struct stat st1;
11202                              if (stat (file, &st1) != 0)
11203                                result |= 40;
11204                              else
11205                                if (st0.st_atime != st1.st_atime)
11206                                  result |= 64;
11207                            }
11208                        }
11209                    }
11210                }
11211            }
11212            return result;
11213  ;
11214  return 0;
11215}
11216_ACEOF
11217if ac_fn_c_try_run "$LINENO"; then :
11218  gl_cv_header_working_fcntl_h=yes
11219else
11220  case $? in #(
11221        4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
11222        64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
11223        68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
11224         *) gl_cv_header_working_fcntl_h='no';;
11225        esac
11226fi
11227rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11228  conftest.$ac_objext conftest.beam conftest.$ac_ext
11229fi
11230
11231
11232fi
11233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
11234$as_echo "$gl_cv_header_working_fcntl_h" >&6; }
11235
11236  case $gl_cv_header_working_fcntl_h in #(
11237  *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
11238  *) ac_val=1;;
11239  esac
11240
11241cat >>confdefs.h <<_ACEOF
11242#define HAVE_WORKING_O_NOATIME $ac_val
11243_ACEOF
11244
11245
11246  case $gl_cv_header_working_fcntl_h in #(
11247  *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
11248  *) ac_val=1;;
11249  esac
11250
11251cat >>confdefs.h <<_ACEOF
11252#define HAVE_WORKING_O_NOFOLLOW $ac_val
11253_ACEOF
11254
11255
11256
11257
11258  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
11259$as_echo_n "checking for promoted mode_t type... " >&6; }
11260if ${gl_cv_promoted_mode_t+:} false; then :
11261  $as_echo_n "(cached) " >&6
11262else
11263
11264                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11265/* end confdefs.h.  */
11266#include <sys/types.h>
11267int
11268main ()
11269{
11270typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
11271  ;
11272  return 0;
11273}
11274_ACEOF
11275if ac_fn_c_try_compile "$LINENO"; then :
11276  gl_cv_promoted_mode_t='int'
11277else
11278  gl_cv_promoted_mode_t='mode_t'
11279fi
11280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11281
11282fi
11283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
11284$as_echo "$gl_cv_promoted_mode_t" >&6; }
11285
11286cat >>confdefs.h <<_ACEOF
11287#define PROMOTED_MODE_T $gl_cv_promoted_mode_t
11288_ACEOF
11289
11290
11291
11292
11293
11294  GNULIB_FNMATCH=0;
11295    HAVE_FNMATCH=1;
11296  REPLACE_FNMATCH=0;
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313     if test $gl_cv_have_include_next = yes; then
11314       gl_cv_next_fnmatch_h='<'fnmatch.h'>'
11315     else
11316       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fnmatch.h>" >&5
11317$as_echo_n "checking absolute name of <fnmatch.h>... " >&6; }
11318if ${gl_cv_next_fnmatch_h+:} false; then :
11319  $as_echo_n "(cached) " >&6
11320else
11321
11322             if test $ac_cv_header_fnmatch_h = yes; then
11323
11324
11325
11326
11327  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11328/* end confdefs.h.  */
11329#include <fnmatch.h>
11330_ACEOF
11331                case "$host_os" in
11332    aix*) gl_absname_cpp="$ac_cpp -C" ;;
11333    *)    gl_absname_cpp="$ac_cpp" ;;
11334  esac
11335
11336  case "$host_os" in
11337    mingw*)
11338                                          gl_dirsep_regex='[/\\]'
11339      ;;
11340    *)
11341      gl_dirsep_regex='\/'
11342      ;;
11343  esac
11344      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11345  gl_header_literal_regex=`echo 'fnmatch.h' \
11346                           | sed -e "$gl_make_literal_regex_sed"`
11347  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11348      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11349      s|^/[^/]|//&|
11350      p
11351      q
11352    }'
11353
11354        gl_cv_absolute_fnmatch_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11355  sed -n "$gl_absolute_header_sed"`
11356
11357           gl_header=$gl_cv_absolute_fnmatch_h
11358           gl_cv_next_fnmatch_h='"'$gl_header'"'
11359          else
11360               gl_cv_next_fnmatch_h='<'fnmatch.h'>'
11361             fi
11362
11363
11364fi
11365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fnmatch_h" >&5
11366$as_echo "$gl_cv_next_fnmatch_h" >&6; }
11367     fi
11368     NEXT_FNMATCH_H=$gl_cv_next_fnmatch_h
11369
11370     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11371       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11372       gl_next_as_first_directive='<'fnmatch.h'>'
11373     else
11374       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11375       gl_next_as_first_directive=$gl_cv_next_fnmatch_h
11376     fi
11377     NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H=$gl_next_as_first_directive
11378
11379
11380
11381
11382
11383
11384
11385  if test $ac_cv_header_fnmatch_h = yes; then
11386    HAVE_FNMATCH_H=1
11387  else
11388    HAVE_FNMATCH_H=0
11389  fi
11390
11391
11392  FNMATCH_H=''
11393     if false; then
11394              FNMATCH_H=fnmatch.h
11395     else
11396       if test $ac_cv_header_fnmatch_h != yes; then
11397                  FNMATCH_H=fnmatch.h
11398       fi
11399     fi
11400
11401
11402   if test -n "$FNMATCH_H"; then
11403  GL_GENERATE_FNMATCH_H_TRUE=
11404  GL_GENERATE_FNMATCH_H_FALSE='#'
11405else
11406  GL_GENERATE_FNMATCH_H_TRUE='#'
11407  GL_GENERATE_FNMATCH_H_FALSE=
11408fi
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
11420$as_echo_n "checking for mbstate_t... " >&6; }
11421if ${ac_cv_type_mbstate_t+:} false; then :
11422  $as_echo_n "(cached) " >&6
11423else
11424  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11425/* end confdefs.h.  */
11426$ac_includes_default
11427             #include <wchar.h>
11428int
11429main ()
11430{
11431mbstate_t x; return sizeof x;
11432  ;
11433  return 0;
11434}
11435_ACEOF
11436if ac_fn_c_try_compile "$LINENO"; then :
11437  ac_cv_type_mbstate_t=yes
11438else
11439  ac_cv_type_mbstate_t=no
11440fi
11441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11442fi
11443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
11444$as_echo "$ac_cv_type_mbstate_t" >&6; }
11445   if test $ac_cv_type_mbstate_t = yes; then
11446
11447$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
11448
11449   else
11450
11451$as_echo "#define mbstate_t int" >>confdefs.h
11452
11453   fi
11454
11455
11456
11457
11458  GNULIB_DPRINTF=0;
11459  GNULIB_FCLOSE=0;
11460  GNULIB_FDOPEN=0;
11461  GNULIB_FFLUSH=0;
11462  GNULIB_FGETC=0;
11463  GNULIB_FGETS=0;
11464  GNULIB_FOPEN=0;
11465  GNULIB_FPRINTF=0;
11466  GNULIB_FPRINTF_POSIX=0;
11467  GNULIB_FPURGE=0;
11468  GNULIB_FPUTC=0;
11469  GNULIB_FPUTS=0;
11470  GNULIB_FREAD=0;
11471  GNULIB_FREOPEN=0;
11472  GNULIB_FSCANF=0;
11473  GNULIB_FSEEK=0;
11474  GNULIB_FSEEKO=0;
11475  GNULIB_FTELL=0;
11476  GNULIB_FTELLO=0;
11477  GNULIB_FWRITE=0;
11478  GNULIB_GETC=0;
11479  GNULIB_GETCHAR=0;
11480  GNULIB_GETDELIM=0;
11481  GNULIB_GETLINE=0;
11482  GNULIB_OBSTACK_PRINTF=0;
11483  GNULIB_OBSTACK_PRINTF_POSIX=0;
11484  GNULIB_PCLOSE=0;
11485  GNULIB_PERROR=0;
11486  GNULIB_POPEN=0;
11487  GNULIB_PRINTF=0;
11488  GNULIB_PRINTF_POSIX=0;
11489  GNULIB_PUTC=0;
11490  GNULIB_PUTCHAR=0;
11491  GNULIB_PUTS=0;
11492  GNULIB_REMOVE=0;
11493  GNULIB_RENAME=0;
11494  GNULIB_RENAMEAT=0;
11495  GNULIB_SCANF=0;
11496  GNULIB_SNPRINTF=0;
11497  GNULIB_SPRINTF_POSIX=0;
11498  GNULIB_STDIO_H_NONBLOCKING=0;
11499  GNULIB_STDIO_H_SIGPIPE=0;
11500  GNULIB_TMPFILE=0;
11501  GNULIB_VASPRINTF=0;
11502  GNULIB_VFSCANF=0;
11503  GNULIB_VSCANF=0;
11504  GNULIB_VDPRINTF=0;
11505  GNULIB_VFPRINTF=0;
11506  GNULIB_VFPRINTF_POSIX=0;
11507  GNULIB_VPRINTF=0;
11508  GNULIB_VPRINTF_POSIX=0;
11509  GNULIB_VSNPRINTF=0;
11510  GNULIB_VSPRINTF_POSIX=0;
11511    GNULIB_MDA_FCLOSEALL=1;
11512  GNULIB_MDA_FDOPEN=1;
11513  GNULIB_MDA_FILENO=1;
11514  GNULIB_MDA_GETW=1;
11515  GNULIB_MDA_PUTW=1;
11516  GNULIB_MDA_TEMPNAM=1;
11517    HAVE_DECL_FCLOSEALL=1;
11518  HAVE_DECL_FPURGE=1;
11519  HAVE_DECL_FSEEKO=1;
11520  HAVE_DECL_FTELLO=1;
11521  HAVE_DECL_GETDELIM=1;
11522  HAVE_DECL_GETLINE=1;
11523  HAVE_DECL_OBSTACK_PRINTF=1;
11524  HAVE_DECL_SNPRINTF=1;
11525  HAVE_DECL_VSNPRINTF=1;
11526  HAVE_DPRINTF=1;
11527  HAVE_FSEEKO=1;
11528  HAVE_FTELLO=1;
11529  HAVE_PCLOSE=1;
11530  HAVE_POPEN=1;
11531  HAVE_RENAMEAT=1;
11532  HAVE_VASPRINTF=1;
11533  HAVE_VDPRINTF=1;
11534  REPLACE_DPRINTF=0;
11535  REPLACE_FCLOSE=0;
11536  REPLACE_FDOPEN=0;
11537  REPLACE_FFLUSH=0;
11538  REPLACE_FOPEN=0;
11539  REPLACE_FPRINTF=0;
11540  REPLACE_FPURGE=0;
11541  REPLACE_FREOPEN=0;
11542  REPLACE_FSEEK=0;
11543  REPLACE_FSEEKO=0;
11544  REPLACE_FTELL=0;
11545  REPLACE_FTELLO=0;
11546  REPLACE_GETDELIM=0;
11547  REPLACE_GETLINE=0;
11548  REPLACE_OBSTACK_PRINTF=0;
11549  REPLACE_PERROR=0;
11550  REPLACE_POPEN=0;
11551  REPLACE_PRINTF=0;
11552  REPLACE_REMOVE=0;
11553  REPLACE_RENAME=0;
11554  REPLACE_RENAMEAT=0;
11555  REPLACE_SNPRINTF=0;
11556  REPLACE_SPRINTF=0;
11557  REPLACE_STDIO_READ_FUNCS=0;
11558  REPLACE_STDIO_WRITE_FUNCS=0;
11559  REPLACE_TMPFILE=0;
11560  REPLACE_VASPRINTF=0;
11561  REPLACE_VDPRINTF=0;
11562  REPLACE_VFPRINTF=0;
11563  REPLACE_VPRINTF=0;
11564  REPLACE_VSNPRINTF=0;
11565  REPLACE_VSPRINTF=0;
11566
11567
11568
11569
11570    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
11571$as_echo_n "checking whether stdin defaults to large file offsets... " >&6; }
11572if ${gl_cv_var_stdin_large_offset+:} false; then :
11573  $as_echo_n "(cached) " >&6
11574else
11575  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11576/* end confdefs.h.  */
11577#include <stdio.h>
11578int
11579main ()
11580{
11581#if defined __SL64 && defined __SCLE /* cygwin */
11582  /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
11583     fseeko/ftello needlessly fail.  This bug was fixed in 1.5.25, and
11584     it is easier to do a version check than building a runtime test.  */
11585# include <cygwin/version.h>
11586# if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
11587  choke me
11588# endif
11589#endif
11590  ;
11591  return 0;
11592}
11593_ACEOF
11594if ac_fn_c_try_link "$LINENO"; then :
11595  gl_cv_var_stdin_large_offset=yes
11596else
11597  gl_cv_var_stdin_large_offset=no
11598fi
11599rm -f core conftest.err conftest.$ac_objext \
11600    conftest$ac_exeext conftest.$ac_ext
11601fi
11602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
11603$as_echo "$gl_cv_var_stdin_large_offset" >&6; }
11604
11605
11606
11607
11608
11609  case "$host_os" in
11610    mingw*)
11611                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
11612$as_echo_n "checking for 64-bit off_t... " >&6; }
11613if ${gl_cv_type_off_t_64+:} false; then :
11614  $as_echo_n "(cached) " >&6
11615else
11616  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11617/* end confdefs.h.  */
11618#include <sys/types.h>
11619                int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
11620
11621int
11622main ()
11623{
11624
11625  ;
11626  return 0;
11627}
11628_ACEOF
11629if ac_fn_c_try_compile "$LINENO"; then :
11630  gl_cv_type_off_t_64=yes
11631else
11632  gl_cv_type_off_t_64=no
11633fi
11634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11635
11636fi
11637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
11638$as_echo "$gl_cv_type_off_t_64" >&6; }
11639      if test $gl_cv_type_off_t_64 = no; then
11640        WINDOWS_64_BIT_OFF_T=1
11641      else
11642        WINDOWS_64_BIT_OFF_T=0
11643      fi
11644                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5
11645$as_echo_n "checking for 64-bit st_size... " >&6; }
11646if ${gl_cv_member_st_size_64+:} false; then :
11647  $as_echo_n "(cached) " >&6
11648else
11649  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11650/* end confdefs.h.  */
11651#include <sys/types.h>
11652                struct stat buf;
11653                int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
11654
11655int
11656main ()
11657{
11658
11659  ;
11660  return 0;
11661}
11662_ACEOF
11663if ac_fn_c_try_compile "$LINENO"; then :
11664  gl_cv_member_st_size_64=yes
11665else
11666  gl_cv_member_st_size_64=no
11667fi
11668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11669
11670fi
11671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
11672$as_echo "$gl_cv_member_st_size_64" >&6; }
11673      if test $gl_cv_member_st_size_64 = no; then
11674        WINDOWS_64_BIT_ST_SIZE=1
11675      else
11676        WINDOWS_64_BIT_ST_SIZE=0
11677      fi
11678      ;;
11679    *)
11680                                                      WINDOWS_64_BIT_OFF_T=0
11681      WINDOWS_64_BIT_ST_SIZE=0
11682      ;;
11683  esac
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693$as_echo "#define _USE_STD_STAT 1" >>confdefs.h
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705     if test $gl_cv_have_include_next = yes; then
11706       gl_cv_next_sys_types_h='<'sys/types.h'>'
11707     else
11708       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
11709$as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
11710if ${gl_cv_next_sys_types_h+:} false; then :
11711  $as_echo_n "(cached) " >&6
11712else
11713
11714
11715
11716  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11717/* end confdefs.h.  */
11718#include <sys/types.h>
11719_ACEOF
11720                case "$host_os" in
11721    aix*) gl_absname_cpp="$ac_cpp -C" ;;
11722    *)    gl_absname_cpp="$ac_cpp" ;;
11723  esac
11724
11725  case "$host_os" in
11726    mingw*)
11727                                          gl_dirsep_regex='[/\\]'
11728      ;;
11729    *)
11730      gl_dirsep_regex='\/'
11731      ;;
11732  esac
11733      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11734  gl_header_literal_regex=`echo 'sys/types.h' \
11735                           | sed -e "$gl_make_literal_regex_sed"`
11736  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11737      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11738      s|^/[^/]|//&|
11739      p
11740      q
11741    }'
11742
11743        gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11744  sed -n "$gl_absolute_header_sed"`
11745
11746           gl_header=$gl_cv_absolute_sys_types_h
11747           gl_cv_next_sys_types_h='"'$gl_header'"'
11748
11749
11750fi
11751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
11752$as_echo "$gl_cv_next_sys_types_h" >&6; }
11753     fi
11754     NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
11755
11756     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11757       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11758       gl_next_as_first_directive='<'sys/types.h'>'
11759     else
11760       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11761       gl_next_as_first_directive=$gl_cv_next_sys_types_h
11762     fi
11763     NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776    WINDOWS_STAT_INODES=0
11777
11778
11779
11780ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default"
11781if test "x$ac_cv_have_decl_fseeko" = xyes; then :
11782  ac_have_decl=1
11783else
11784  ac_have_decl=0
11785fi
11786
11787cat >>confdefs.h <<_ACEOF
11788#define HAVE_DECL_FSEEKO $ac_have_decl
11789_ACEOF
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
11800$as_echo_n "checking for fseeko... " >&6; }
11801if ${gl_cv_func_fseeko+:} false; then :
11802  $as_echo_n "(cached) " >&6
11803else
11804
11805      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11806/* end confdefs.h.  */
11807#include <stdio.h>
11808
11809int
11810main ()
11811{
11812fseeko (stdin, 0, 0);
11813  ;
11814  return 0;
11815}
11816_ACEOF
11817if ac_fn_c_try_link "$LINENO"; then :
11818  gl_cv_func_fseeko=yes
11819else
11820  gl_cv_func_fseeko=no
11821fi
11822rm -f core conftest.err conftest.$ac_objext \
11823    conftest$ac_exeext conftest.$ac_ext
11824
11825fi
11826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
11827$as_echo "$gl_cv_func_fseeko" >&6; }
11828
11829
11830  if test $ac_cv_have_decl_fseeko = no; then
11831    HAVE_DECL_FSEEKO=0
11832  fi
11833
11834  if test $gl_cv_func_fseeko = no; then
11835    HAVE_FSEEKO=0
11836  else
11837    if test $WINDOWS_64_BIT_OFF_T = 1; then
11838      REPLACE_FSEEKO=1
11839    fi
11840    if test $gl_cv_var_stdin_large_offset = no; then
11841      REPLACE_FSEEKO=1
11842    fi
11843
11844  fi
11845
11846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
11847$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
11848if ${ac_cv_header_stat_broken+:} false; then :
11849  $as_echo_n "(cached) " >&6
11850else
11851  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11852/* end confdefs.h.  */
11853#include <sys/types.h>
11854#include <sys/stat.h>
11855
11856#if defined S_ISBLK && defined S_IFDIR
11857extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
11858#endif
11859
11860#if defined S_ISBLK && defined S_IFCHR
11861extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
11862#endif
11863
11864#if defined S_ISLNK && defined S_IFREG
11865extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
11866#endif
11867
11868#if defined S_ISSOCK && defined S_IFREG
11869extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
11870#endif
11871
11872_ACEOF
11873if ac_fn_c_try_compile "$LINENO"; then :
11874  ac_cv_header_stat_broken=no
11875else
11876  ac_cv_header_stat_broken=yes
11877fi
11878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11879fi
11880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
11881$as_echo "$ac_cv_header_stat_broken" >&6; }
11882if test $ac_cv_header_stat_broken = yes; then
11883
11884$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
11885
11886fi
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904     if test $gl_cv_have_include_next = yes; then
11905       gl_cv_next_sys_stat_h='<'sys/stat.h'>'
11906     else
11907       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
11908$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
11909if ${gl_cv_next_sys_stat_h+:} false; then :
11910  $as_echo_n "(cached) " >&6
11911else
11912
11913             if test $ac_cv_header_sys_stat_h = yes; then
11914
11915
11916
11917
11918  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11919/* end confdefs.h.  */
11920#include <sys/stat.h>
11921_ACEOF
11922                case "$host_os" in
11923    aix*) gl_absname_cpp="$ac_cpp -C" ;;
11924    *)    gl_absname_cpp="$ac_cpp" ;;
11925  esac
11926
11927  case "$host_os" in
11928    mingw*)
11929                                          gl_dirsep_regex='[/\\]'
11930      ;;
11931    *)
11932      gl_dirsep_regex='\/'
11933      ;;
11934  esac
11935      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11936  gl_header_literal_regex=`echo 'sys/stat.h' \
11937                           | sed -e "$gl_make_literal_regex_sed"`
11938  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11939      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11940      s|^/[^/]|//&|
11941      p
11942      q
11943    }'
11944
11945        gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11946  sed -n "$gl_absolute_header_sed"`
11947
11948           gl_header=$gl_cv_absolute_sys_stat_h
11949           gl_cv_next_sys_stat_h='"'$gl_header'"'
11950          else
11951               gl_cv_next_sys_stat_h='<'sys/stat.h'>'
11952             fi
11953
11954
11955fi
11956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
11957$as_echo "$gl_cv_next_sys_stat_h" >&6; }
11958     fi
11959     NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
11960
11961     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11962       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11963       gl_next_as_first_directive='<'sys/stat.h'>'
11964     else
11965       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11966       gl_next_as_first_directive=$gl_cv_next_sys_stat_h
11967     fi
11968     NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
11969
11970
11971
11972
11973
11974
11975
11976
11977    WINDOWS_STAT_TIMESPEC=0
11978
11979
11980
11981
11982
11983
11984
11985
11986      ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
11987     #include <sys/stat.h>
11988"
11989if test "x$ac_cv_type_nlink_t" = xyes; then :
11990
11991else
11992
11993$as_echo "#define nlink_t int" >>confdefs.h
11994
11995fi
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006  case "$host_os" in
12007    mingw*)
12008      for ac_header in sdkddkver.h
12009do :
12010  ac_fn_c_check_header_mongrel "$LINENO" "sdkddkver.h" "ac_cv_header_sdkddkver_h" "$ac_includes_default"
12011if test "x$ac_cv_header_sdkddkver_h" = xyes; then :
12012  cat >>confdefs.h <<_ACEOF
12013#define HAVE_SDKDDKVER_H 1
12014_ACEOF
12015
12016fi
12017
12018done
12019
12020      ;;
12021  esac
12022
12023
12024
12025
12026
12027
12028
12029   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
12030$as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
12031if ${gl_cv_func_getcwd_null+:} false; then :
12032  $as_echo_n "(cached) " >&6
12033else
12034  if test "$cross_compiling" = yes; then :
12035  case "$host_os" in
12036                           # Guess yes on glibc systems.
12037            *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
12038                           # Guess yes on musl systems.
12039            *-musl*)       gl_cv_func_getcwd_null="guessing yes";;
12040                           # Guess yes on Cygwin.
12041            cygwin*)       gl_cv_func_getcwd_null="guessing yes";;
12042                           # If we don't know, obey --enable-cross-guesses.
12043            *)             gl_cv_func_getcwd_null="$gl_cross_guess_normal";;
12044          esac
12045
12046else
12047  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12048/* end confdefs.h.  */
12049
12050#	 include <stdlib.h>
12051#        if HAVE_UNISTD_H
12052#         include <unistd.h>
12053#        else /* on Windows with MSVC */
12054#         include <direct.h>
12055#        endif
12056
12057
12058$gl_mda_defines
12059
12060#        ifndef getcwd
12061         char *getcwd ();
12062#        endif
12063
12064int
12065main ()
12066{
12067
12068#if defined _WIN32 && ! defined __CYGWIN__
12069/* mingw cwd does not start with '/', but _getcwd does allocate.
12070   However, mingw fails to honor non-zero size.  */
12071#else
12072           if (chdir ("/") != 0)
12073             return 1;
12074           else
12075             {
12076               char *f = getcwd (NULL, 0);
12077               if (! f)
12078                 return 2;
12079               if (f[0] != '/')
12080                 { free (f); return 3; }
12081               if (f[1] != '\0')
12082                 { free (f); return 4; }
12083               free (f);
12084               return 0;
12085             }
12086#endif
12087
12088  ;
12089  return 0;
12090}
12091_ACEOF
12092if ac_fn_c_try_run "$LINENO"; then :
12093  gl_cv_func_getcwd_null=yes
12094else
12095  gl_cv_func_getcwd_null=no
12096fi
12097rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12098  conftest.$ac_objext conftest.beam conftest.$ac_ext
12099fi
12100
12101fi
12102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
12103$as_echo "$gl_cv_func_getcwd_null" >&6; }
12104
12105
12106  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
12107$as_echo_n "checking for getcwd with POSIX signature... " >&6; }
12108if ${gl_cv_func_getcwd_posix_signature+:} false; then :
12109  $as_echo_n "(cached) " >&6
12110else
12111  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12112/* end confdefs.h.  */
12113#include <unistd.h>
12114
12115
12116$gl_mda_defines
12117
12118int
12119main ()
12120{
12121extern
12122           #ifdef __cplusplus
12123           "C"
12124           #endif
12125           char *getcwd (char *, size_t);
12126
12127  ;
12128  return 0;
12129}
12130
12131_ACEOF
12132if ac_fn_c_try_compile "$LINENO"; then :
12133  gl_cv_func_getcwd_posix_signature=yes
12134else
12135  gl_cv_func_getcwd_posix_signature=no
12136fi
12137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12138
12139fi
12140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
12141$as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
12142
12143ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
12144if test "x$ac_cv_have_decl_getcwd" = xyes; then :
12145  ac_have_decl=1
12146else
12147  ac_have_decl=0
12148fi
12149
12150cat >>confdefs.h <<_ACEOF
12151#define HAVE_DECL_GETCWD $ac_have_decl
12152_ACEOF
12153
12154ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default"
12155if test "x$ac_cv_have_decl_getdelim" = xyes; then :
12156  ac_have_decl=1
12157else
12158  ac_have_decl=0
12159fi
12160
12161cat >>confdefs.h <<_ACEOF
12162#define HAVE_DECL_GETDELIM $ac_have_decl
12163_ACEOF
12164
12165
12166
12167
12168
12169ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
12170if test "x$ac_cv_have_decl_getdtablesize" = xyes; then :
12171  ac_have_decl=1
12172else
12173  ac_have_decl=0
12174fi
12175
12176cat >>confdefs.h <<_ACEOF
12177#define HAVE_DECL_GETDTABLESIZE $ac_have_decl
12178_ACEOF
12179
12180ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default"
12181if test "x$ac_cv_have_decl_getline" = xyes; then :
12182  ac_have_decl=1
12183else
12184  ac_have_decl=0
12185fi
12186
12187cat >>confdefs.h <<_ACEOF
12188#define HAVE_DECL_GETLINE $ac_have_decl
12189_ACEOF
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206     if test $gl_cv_have_include_next = yes; then
12207       gl_cv_next_getopt_h='<'getopt.h'>'
12208     else
12209       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
12210$as_echo_n "checking absolute name of <getopt.h>... " >&6; }
12211if ${gl_cv_next_getopt_h+:} false; then :
12212  $as_echo_n "(cached) " >&6
12213else
12214
12215             if test $ac_cv_header_getopt_h = yes; then
12216
12217
12218
12219
12220  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12221/* end confdefs.h.  */
12222#include <getopt.h>
12223_ACEOF
12224                case "$host_os" in
12225    aix*) gl_absname_cpp="$ac_cpp -C" ;;
12226    *)    gl_absname_cpp="$ac_cpp" ;;
12227  esac
12228
12229  case "$host_os" in
12230    mingw*)
12231                                          gl_dirsep_regex='[/\\]'
12232      ;;
12233    *)
12234      gl_dirsep_regex='\/'
12235      ;;
12236  esac
12237      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12238  gl_header_literal_regex=`echo 'getopt.h' \
12239                           | sed -e "$gl_make_literal_regex_sed"`
12240  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12241      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12242      s|^/[^/]|//&|
12243      p
12244      q
12245    }'
12246
12247        gl_cv_absolute_getopt_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12248  sed -n "$gl_absolute_header_sed"`
12249
12250           gl_header=$gl_cv_absolute_getopt_h
12251           gl_cv_next_getopt_h='"'$gl_header'"'
12252          else
12253               gl_cv_next_getopt_h='<'getopt.h'>'
12254             fi
12255
12256
12257fi
12258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
12259$as_echo "$gl_cv_next_getopt_h" >&6; }
12260     fi
12261     NEXT_GETOPT_H=$gl_cv_next_getopt_h
12262
12263     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12264       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12265       gl_next_as_first_directive='<'getopt.h'>'
12266     else
12267       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12268       gl_next_as_first_directive=$gl_cv_next_getopt_h
12269     fi
12270     NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
12271
12272
12273
12274
12275  if test $ac_cv_header_getopt_h = yes; then
12276    HAVE_GETOPT_H=1
12277  else
12278    HAVE_GETOPT_H=0
12279  fi
12280
12281
12282  gl_replace_getopt=
12283
12284    if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
12285    for ac_header in getopt.h
12286do :
12287  ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
12288if test "x$ac_cv_header_getopt_h" = xyes; then :
12289  cat >>confdefs.h <<_ACEOF
12290#define HAVE_GETOPT_H 1
12291_ACEOF
12292
12293else
12294  gl_replace_getopt=yes
12295fi
12296
12297done
12298
12299  fi
12300
12301    if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
12302    for ac_func in getopt_long_only
12303do :
12304  ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
12305if test "x$ac_cv_func_getopt_long_only" = xyes; then :
12306  cat >>confdefs.h <<_ACEOF
12307#define HAVE_GETOPT_LONG_ONLY 1
12308_ACEOF
12309
12310else
12311  gl_replace_getopt=yes
12312fi
12313done
12314
12315  fi
12316
12317          if test -z "$gl_replace_getopt"; then
12318    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
12319$as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
12320if ${gl_cv_func_getopt_posix+:} false; then :
12321  $as_echo_n "(cached) " >&6
12322else
12323
12324                                                if test $cross_compiling = no; then
12325                              if test "$cross_compiling" = yes; then :
12326  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12327$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12328as_fn_error $? "cannot run test program while cross compiling
12329See \`config.log' for more details" "$LINENO" 5; }
12330else
12331  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12332/* end confdefs.h.  */
12333
12334#include <unistd.h>
12335#include <stdlib.h>
12336#include <string.h>
12337
12338int
12339main ()
12340{
12341  static char program[] = "program";
12342  static char a[] = "-a";
12343  static char foo[] = "foo";
12344  static char bar[] = "bar";
12345  char *argv[] = { program, a, foo, bar, NULL };
12346  int c;
12347
12348  c = getopt (4, argv, "ab");
12349  if (!(c == 'a'))
12350    return 1;
12351  c = getopt (4, argv, "ab");
12352  if (!(c == -1))
12353    return 2;
12354  if (!(optind == 2))
12355    return 3;
12356  return 0;
12357}
12358
12359_ACEOF
12360if ac_fn_c_try_run "$LINENO"; then :
12361  gl_cv_func_getopt_posix=maybe
12362else
12363  gl_cv_func_getopt_posix=no
12364fi
12365rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12366  conftest.$ac_objext conftest.beam conftest.$ac_ext
12367fi
12368
12369          if test $gl_cv_func_getopt_posix = maybe; then
12370                                    if test "$cross_compiling" = yes; then :
12371  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12372$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12373as_fn_error $? "cannot run test program while cross compiling
12374See \`config.log' for more details" "$LINENO" 5; }
12375else
12376  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12377/* end confdefs.h.  */
12378
12379#include <unistd.h>
12380#include <stdlib.h>
12381#include <string.h>
12382
12383int
12384main ()
12385{
12386  static char program[] = "program";
12387  static char donald[] = "donald";
12388  static char p[] = "-p";
12389  static char billy[] = "billy";
12390  static char duck[] = "duck";
12391  static char a[] = "-a";
12392  static char bar[] = "bar";
12393  char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
12394  int c;
12395
12396  c = getopt (7, argv, "+abp:q:");
12397  if (!(c == -1))
12398    return 4;
12399  if (!(strcmp (argv[0], "program") == 0))
12400    return 5;
12401  if (!(strcmp (argv[1], "donald") == 0))
12402    return 6;
12403  if (!(strcmp (argv[2], "-p") == 0))
12404    return 7;
12405  if (!(strcmp (argv[3], "billy") == 0))
12406    return 8;
12407  if (!(strcmp (argv[4], "duck") == 0))
12408    return 9;
12409  if (!(strcmp (argv[5], "-a") == 0))
12410    return 10;
12411  if (!(strcmp (argv[6], "bar") == 0))
12412    return 11;
12413  if (!(optind == 1))
12414    return 12;
12415  return 0;
12416}
12417
12418_ACEOF
12419if ac_fn_c_try_run "$LINENO"; then :
12420  gl_cv_func_getopt_posix=maybe
12421else
12422  gl_cv_func_getopt_posix=no
12423fi
12424rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12425  conftest.$ac_objext conftest.beam conftest.$ac_ext
12426fi
12427
12428          fi
12429          if test $gl_cv_func_getopt_posix = maybe; then
12430                        if test "$cross_compiling" = yes; then :
12431  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12432$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12433as_fn_error $? "cannot run test program while cross compiling
12434See \`config.log' for more details" "$LINENO" 5; }
12435else
12436  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12437/* end confdefs.h.  */
12438
12439#include <unistd.h>
12440#include <stdlib.h>
12441#include <string.h>
12442
12443int
12444main ()
12445{
12446  static char program[] = "program";
12447  static char ab[] = "-ab";
12448  char *argv[3] = { program, ab, NULL };
12449  if (getopt (2, argv, "ab:") != 'a')
12450    return 13;
12451  if (getopt (2, argv, "ab:") != '?')
12452    return 14;
12453  if (optopt != 'b')
12454    return 15;
12455  if (optind != 2)
12456    return 16;
12457  return 0;
12458}
12459
12460_ACEOF
12461if ac_fn_c_try_run "$LINENO"; then :
12462  gl_cv_func_getopt_posix=yes
12463else
12464  gl_cv_func_getopt_posix=no
12465fi
12466rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12467  conftest.$ac_objext conftest.beam conftest.$ac_ext
12468fi
12469
12470          fi
12471        else
12472          case "$host_os" in
12473            darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
12474            *)                       gl_cv_func_getopt_posix="guessing yes";;
12475          esac
12476        fi
12477
12478fi
12479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
12480$as_echo "$gl_cv_func_getopt_posix" >&6; }
12481    case "$gl_cv_func_getopt_posix" in
12482      *no) gl_replace_getopt=yes ;;
12483    esac
12484  fi
12485
12486  if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
12487    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
12488$as_echo_n "checking for working GNU getopt function... " >&6; }
12489if ${gl_cv_func_getopt_gnu+:} false; then :
12490  $as_echo_n "(cached) " >&6
12491else
12492  # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
12493       # optstring is necessary for programs like m4 that have POSIX-mandated
12494       # semantics for supporting options interspersed with files.
12495       # Also, since getopt_long is a GNU extension, we require optind=0.
12496       # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
12497       # so take care to revert to the correct (non-)export state.
12498       gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
12499       case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
12500         xx) gl_had_POSIXLY_CORRECT=exported ;;
12501         x)  gl_had_POSIXLY_CORRECT=yes      ;;
12502         *)  gl_had_POSIXLY_CORRECT=         ;;
12503       esac
12504       POSIXLY_CORRECT=1
12505       export POSIXLY_CORRECT
12506       if test "$cross_compiling" = yes; then :
12507                             gl_cv_func_getopt_gnu="$gl_cross_guess_normal"
12508
12509else
12510  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12511/* end confdefs.h.  */
12512#include <getopt.h>
12513                           #include <stddef.h>
12514                           #include <string.h>
12515
12516#include <stdlib.h>
12517#if defined __MACH__ && defined __APPLE__
12518/* Avoid a crash on Mac OS X.  */
12519#include <mach/mach.h>
12520#include <mach/mach_error.h>
12521#include <mach/thread_status.h>
12522#include <mach/exception.h>
12523#include <mach/task.h>
12524#include <pthread.h>
12525/* The exception port on which our thread listens.  */
12526static mach_port_t our_exception_port;
12527/* The main function of the thread listening for exceptions of type
12528   EXC_BAD_ACCESS.  */
12529static void *
12530mach_exception_thread (void *arg)
12531{
12532  /* Buffer for a message to be received.  */
12533  struct {
12534    mach_msg_header_t head;
12535    mach_msg_body_t msgh_body;
12536    char data[1024];
12537  } msg;
12538  mach_msg_return_t retval;
12539  /* Wait for a message on the exception port.  */
12540  retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
12541                     our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
12542  if (retval != MACH_MSG_SUCCESS)
12543    abort ();
12544  exit (1);
12545}
12546static void
12547nocrash_init (void)
12548{
12549  mach_port_t self = mach_task_self ();
12550  /* Allocate a port on which the thread shall listen for exceptions.  */
12551  if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
12552      == KERN_SUCCESS) {
12553    /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
12554    if (mach_port_insert_right (self, our_exception_port, our_exception_port,
12555                                MACH_MSG_TYPE_MAKE_SEND)
12556        == KERN_SUCCESS) {
12557      /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
12558         for us.  */
12559      exception_mask_t mask = EXC_MASK_BAD_ACCESS;
12560      /* Create the thread listening on the exception port.  */
12561      pthread_attr_t attr;
12562      pthread_t thread;
12563      if (pthread_attr_init (&attr) == 0
12564          && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
12565          && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
12566        pthread_attr_destroy (&attr);
12567        /* Replace the exception port info for these exceptions with our own.
12568           Note that we replace the exception port for the entire task, not only
12569           for a particular thread.  This has the effect that when our exception
12570           port gets the message, the thread specific exception port has already
12571           been asked, and we don't need to bother about it.
12572           See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
12573        task_set_exception_ports (self, mask, our_exception_port,
12574                                  EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
12575      }
12576    }
12577  }
12578}
12579#elif defined _WIN32 && ! defined __CYGWIN__
12580/* Avoid a crash on native Windows.  */
12581#define WIN32_LEAN_AND_MEAN
12582#include <windows.h>
12583#include <winerror.h>
12584static LONG WINAPI
12585exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
12586{
12587  switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
12588    {
12589    case EXCEPTION_ACCESS_VIOLATION:
12590    case EXCEPTION_IN_PAGE_ERROR:
12591    case EXCEPTION_STACK_OVERFLOW:
12592    case EXCEPTION_GUARD_PAGE:
12593    case EXCEPTION_PRIV_INSTRUCTION:
12594    case EXCEPTION_ILLEGAL_INSTRUCTION:
12595    case EXCEPTION_DATATYPE_MISALIGNMENT:
12596    case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
12597    case EXCEPTION_NONCONTINUABLE_EXCEPTION:
12598      exit (1);
12599    }
12600  return EXCEPTION_CONTINUE_SEARCH;
12601}
12602static void
12603nocrash_init (void)
12604{
12605  SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
12606}
12607#else
12608/* Avoid a crash on POSIX systems.  */
12609#include <signal.h>
12610#include <unistd.h>
12611/* A POSIX signal handler.  */
12612static void
12613exception_handler (int sig)
12614{
12615  _exit (1);
12616}
12617static void
12618nocrash_init (void)
12619{
12620#ifdef SIGSEGV
12621  signal (SIGSEGV, exception_handler);
12622#endif
12623#ifdef SIGBUS
12624  signal (SIGBUS, exception_handler);
12625#endif
12626}
12627#endif
12628
12629
12630int
12631main ()
12632{
12633
12634             int result = 0;
12635
12636             nocrash_init();
12637
12638             /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
12639                and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
12640                OSF/1 5.1, Solaris 10.  */
12641             {
12642               static char conftest[] = "conftest";
12643               static char plus[] = "-+";
12644               char *argv[3] = { conftest, plus, NULL };
12645               opterr = 0;
12646               if (getopt (2, argv, "+a") != '?')
12647                 result |= 1;
12648             }
12649             /* This code succeeds on glibc 2.8, mingw,
12650                and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
12651                IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x.  */
12652             {
12653               static char program[] = "program";
12654               static char p[] = "-p";
12655               static char foo[] = "foo";
12656               static char bar[] = "bar";
12657               char *argv[] = { program, p, foo, bar, NULL };
12658
12659               optind = 1;
12660               if (getopt (4, argv, "p::") != 'p')
12661                 result |= 2;
12662               else if (optarg != NULL)
12663                 result |= 4;
12664               else if (getopt (4, argv, "p::") != -1)
12665                 result |= 6;
12666               else if (optind != 2)
12667                 result |= 8;
12668             }
12669             /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0.  */
12670             {
12671               static char program[] = "program";
12672               static char foo[] = "foo";
12673               static char p[] = "-p";
12674               char *argv[] = { program, foo, p, NULL };
12675               optind = 0;
12676               if (getopt (3, argv, "-p") != 1)
12677                 result |= 16;
12678               else if (getopt (3, argv, "-p") != 'p')
12679                 result |= 16;
12680             }
12681             /* This code fails on glibc 2.11.  */
12682             {
12683               static char program[] = "program";
12684               static char b[] = "-b";
12685               static char a[] = "-a";
12686               char *argv[] = { program, b, a, NULL };
12687               optind = opterr = 0;
12688               if (getopt (3, argv, "+:a:b") != 'b')
12689                 result |= 32;
12690               else if (getopt (3, argv, "+:a:b") != ':')
12691                 result |= 32;
12692             }
12693             /* This code dumps core on glibc 2.14.  */
12694             {
12695               static char program[] = "program";
12696               static char w[] = "-W";
12697               static char dummy[] = "dummy";
12698               char *argv[] = { program, w, dummy, NULL };
12699               optind = opterr = 1;
12700               if (getopt (3, argv, "W;") != 'W')
12701                 result |= 64;
12702             }
12703             return result;
12704
12705  ;
12706  return 0;
12707}
12708_ACEOF
12709if ac_fn_c_try_run "$LINENO"; then :
12710  gl_cv_func_getopt_gnu=yes
12711else
12712  gl_cv_func_getopt_gnu=no
12713fi
12714rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12715  conftest.$ac_objext conftest.beam conftest.$ac_ext
12716fi
12717
12718       case $gl_had_POSIXLY_CORRECT in
12719         exported) ;;
12720         yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
12721         *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
12722       esac
12723
12724fi
12725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
12726$as_echo "$gl_cv_func_getopt_gnu" >&6; }
12727    if test "$gl_cv_func_getopt_gnu" != yes; then
12728      gl_replace_getopt=yes
12729    else
12730      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
12731$as_echo_n "checking for working GNU getopt_long function... " >&6; }
12732if ${gl_cv_func_getopt_long_gnu+:} false; then :
12733  $as_echo_n "(cached) " >&6
12734else
12735  if test "$cross_compiling" = yes; then :
12736              case "$host_os" in
12737              openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
12738              *)        gl_cv_func_getopt_long_gnu="guessing yes";;
12739            esac
12740
12741else
12742  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12743/* end confdefs.h.  */
12744#include <getopt.h>
12745                #include <stddef.h>
12746                #include <string.h>
12747
12748int
12749main ()
12750{
12751static const struct option long_options[] =
12752                  {
12753                    { "xtremely-",no_argument,       NULL, 1003 },
12754                    { "xtra",     no_argument,       NULL, 1001 },
12755                    { "xtreme",   no_argument,       NULL, 1002 },
12756                    { "xtremely", no_argument,       NULL, 1003 },
12757                    { NULL,       0,                 NULL, 0 }
12758                  };
12759                /* This code fails on OpenBSD 5.0.  */
12760                {
12761                  static char program[] = "program";
12762                  static char xtremel[] = "--xtremel";
12763                  char *argv[] = { program, xtremel, NULL };
12764                  int option_index;
12765                  optind = 1; opterr = 0;
12766                  if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
12767                    return 1;
12768                }
12769                return 0;
12770
12771  ;
12772  return 0;
12773}
12774_ACEOF
12775if ac_fn_c_try_run "$LINENO"; then :
12776  gl_cv_func_getopt_long_gnu=yes
12777else
12778  gl_cv_func_getopt_long_gnu=no
12779fi
12780rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12781  conftest.$ac_objext conftest.beam conftest.$ac_ext
12782fi
12783
12784
12785fi
12786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
12787$as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
12788      case "$gl_cv_func_getopt_long_gnu" in
12789        *yes) ;;
12790        *) gl_replace_getopt=yes ;;
12791      esac
12792    fi
12793  fi
12794
12795
12796
12797
12798
12799
12800
12801
12802  GNULIB_GETRANDOM=0;
12803    HAVE_GETRANDOM=1;
12804  REPLACE_GETRANDOM=0;
12805
12806
12807
12808:
12809
12810
12811
12812  GNULIB_GETTIMEOFDAY=0;
12813    HAVE_GETTIMEOFDAY=1;
12814  HAVE_STRUCT_TIMEVAL=1;
12815  HAVE_SYS_TIME_H=1;
12816  REPLACE_GETTIMEOFDAY=0;
12817  REPLACE_STRUCT_TIMEVAL=0;
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832     if test $gl_cv_have_include_next = yes; then
12833       gl_cv_next_sys_time_h='<'sys/time.h'>'
12834     else
12835       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
12836$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
12837if ${gl_cv_next_sys_time_h+:} false; then :
12838  $as_echo_n "(cached) " >&6
12839else
12840
12841             if test $ac_cv_header_sys_time_h = yes; then
12842
12843
12844
12845
12846  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12847/* end confdefs.h.  */
12848#include <sys/time.h>
12849_ACEOF
12850                case "$host_os" in
12851    aix*) gl_absname_cpp="$ac_cpp -C" ;;
12852    *)    gl_absname_cpp="$ac_cpp" ;;
12853  esac
12854
12855  case "$host_os" in
12856    mingw*)
12857                                          gl_dirsep_regex='[/\\]'
12858      ;;
12859    *)
12860      gl_dirsep_regex='\/'
12861      ;;
12862  esac
12863      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12864  gl_header_literal_regex=`echo 'sys/time.h' \
12865                           | sed -e "$gl_make_literal_regex_sed"`
12866  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12867      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12868      s|^/[^/]|//&|
12869      p
12870      q
12871    }'
12872
12873        gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12874  sed -n "$gl_absolute_header_sed"`
12875
12876           gl_header=$gl_cv_absolute_sys_time_h
12877           gl_cv_next_sys_time_h='"'$gl_header'"'
12878          else
12879               gl_cv_next_sys_time_h='<'sys/time.h'>'
12880             fi
12881
12882
12883fi
12884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
12885$as_echo "$gl_cv_next_sys_time_h" >&6; }
12886     fi
12887     NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
12888
12889     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12890       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12891       gl_next_as_first_directive='<'sys/time.h'>'
12892     else
12893       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12894       gl_next_as_first_directive=$gl_cv_next_sys_time_h
12895     fi
12896     NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
12897
12898
12899
12900
12901
12902  if test $ac_cv_header_sys_time_h != yes; then
12903    HAVE_SYS_TIME_H=0
12904  fi
12905
12906
12907
12908
12909
12910  if test $ac_cv_header_sys_socket_h != yes; then
12911                    for ac_header in winsock2.h
12912do :
12913  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
12914if test "x$ac_cv_header_winsock2_h" = xyes; then :
12915  cat >>confdefs.h <<_ACEOF
12916#define HAVE_WINSOCK2_H 1
12917_ACEOF
12918
12919fi
12920
12921done
12922
12923  fi
12924  if test "$ac_cv_header_winsock2_h" = yes; then
12925    HAVE_WINSOCK2_H=1
12926    UNISTD_H_HAVE_WINSOCK2_H=1
12927    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
12928  else
12929    HAVE_WINSOCK2_H=0
12930  fi
12931
12932
12933  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
12934$as_echo_n "checking for struct timeval... " >&6; }
12935if ${gl_cv_sys_struct_timeval+:} false; then :
12936  $as_echo_n "(cached) " >&6
12937else
12938  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12939/* end confdefs.h.  */
12940#if HAVE_SYS_TIME_H
12941             #include <sys/time.h>
12942            #endif
12943            #include <time.h>
12944            #if HAVE_WINSOCK2_H
12945            # include <winsock2.h>
12946            #endif
12947
12948int
12949main ()
12950{
12951static struct timeval x; x.tv_sec = x.tv_usec;
12952  ;
12953  return 0;
12954}
12955_ACEOF
12956if ac_fn_c_try_compile "$LINENO"; then :
12957  gl_cv_sys_struct_timeval=yes
12958else
12959  gl_cv_sys_struct_timeval=no
12960fi
12961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12962
12963fi
12964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
12965$as_echo "$gl_cv_sys_struct_timeval" >&6; }
12966  if test $gl_cv_sys_struct_timeval != yes; then
12967    HAVE_STRUCT_TIMEVAL=0
12968  else
12969                            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
12970$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
12971if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
12972  $as_echo_n "(cached) " >&6
12973else
12974  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12975/* end confdefs.h.  */
12976#if HAVE_SYS_TIME_H
12977               #include <sys/time.h>
12978              #endif
12979              #include <time.h>
12980              #if HAVE_WINSOCK2_H
12981              # include <winsock2.h>
12982              #endif
12983
12984int
12985main ()
12986{
12987static struct timeval x;
12988              typedef int verify_tv_sec_type[
12989                sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
12990              ];
12991
12992  ;
12993  return 0;
12994}
12995_ACEOF
12996if ac_fn_c_try_compile "$LINENO"; then :
12997  gl_cv_sys_struct_timeval_tv_sec=yes
12998else
12999  gl_cv_sys_struct_timeval_tv_sec=no
13000fi
13001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13002
13003fi
13004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
13005$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
13006    if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
13007      REPLACE_STRUCT_TIMEVAL=1
13008    fi
13009  fi
13010
13011
13012
13013
13014
13015
13016
13017
13018
13019
13020  if test -z "$gl_anythreadlib_early_done"; then
13021    case "$host_os" in
13022      osf*)
13023        # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
13024        # groks <pthread.h>. cc also understands the flag -pthread, but
13025        # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
13026        # 2. putting a flag into CPPFLAGS that has an effect on the linker
13027        # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
13028        # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
13029        CPPFLAGS="$CPPFLAGS -D_REENTRANT"
13030        ;;
13031    esac
13032    # Some systems optimize for single-threaded programs by default, and
13033    # need special flags to disable these optimizations. For example, the
13034    # definition of 'errno' in <errno.h>.
13035    case "$host_os" in
13036      aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
13037      solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
13038    esac
13039    gl_anythreadlib_early_done=done
13040  fi
13041
13042
13043
13044
13045
13046  if test -z "$gl_pthreadlib_body_done"; then
13047    gl_pthread_api=no
13048    LIBPTHREAD=
13049    LIBPMULTITHREAD=
13050    # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
13051    # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
13052    ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
13053if test "x$ac_cv_header_pthread_h" = xyes; then :
13054  gl_have_pthread_h=yes
13055else
13056  gl_have_pthread_h=no
13057fi
13058
13059
13060    if test "$gl_have_pthread_h" = yes; then
13061      # Other possible tests:
13062      #   -lpthreads (FSU threads, PCthreads)
13063      #   -lgthreads
13064      # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
13065      # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
13066      # the second one only in libpthread, and lock.c needs it.
13067      #
13068      # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
13069      # needs -pthread for some reason.  See:
13070      # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
13071      save_LIBS=$LIBS
13072      for gl_pthread in '' '-pthread'; do
13073        LIBS="$LIBS $gl_pthread"
13074        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13075/* end confdefs.h.  */
13076#include <pthread.h>
13077               pthread_mutex_t m;
13078               pthread_mutexattr_t ma;
13079
13080int
13081main ()
13082{
13083pthread_mutex_lock (&m);
13084               pthread_mutexattr_init (&ma);
13085  ;
13086  return 0;
13087}
13088_ACEOF
13089if ac_fn_c_try_link "$LINENO"; then :
13090  gl_pthread_api=yes
13091           LIBPTHREAD=$gl_pthread
13092           LIBPMULTITHREAD=$gl_pthread
13093fi
13094rm -f core conftest.err conftest.$ac_objext \
13095    conftest$ac_exeext conftest.$ac_ext
13096        LIBS=$save_LIBS
13097        test $gl_pthread_api = yes && break
13098      done
13099
13100      # Test for libpthread by looking for pthread_kill. (Not pthread_self,
13101      # since it is defined as a macro on OSF/1.)
13102      if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
13103        # The program links fine without libpthread. But it may actually
13104        # need to link with libpthread in order to create multiple threads.
13105        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
13106$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
13107if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
13108  $as_echo_n "(cached) " >&6
13109else
13110  ac_check_lib_save_LIBS=$LIBS
13111LIBS="-lpthread  $LIBS"
13112cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13113/* end confdefs.h.  */
13114
13115/* Override any GCC internal prototype to avoid an error.
13116   Use char because int might match the return type of a GCC
13117   builtin and then its argument prototype would still apply.  */
13118#ifdef __cplusplus
13119extern "C"
13120#endif
13121char pthread_kill ();
13122int
13123main ()
13124{
13125return pthread_kill ();
13126  ;
13127  return 0;
13128}
13129_ACEOF
13130if ac_fn_c_try_link "$LINENO"; then :
13131  ac_cv_lib_pthread_pthread_kill=yes
13132else
13133  ac_cv_lib_pthread_pthread_kill=no
13134fi
13135rm -f core conftest.err conftest.$ac_objext \
13136    conftest$ac_exeext conftest.$ac_ext
13137LIBS=$ac_check_lib_save_LIBS
13138fi
13139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
13140$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
13141if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
13142  LIBPMULTITHREAD=-lpthread
13143           # On Solaris and HP-UX, most pthread functions exist also in libc.
13144           # Therefore pthread_in_use() needs to actually try to create a
13145           # thread: pthread_create from libc will fail, whereas
13146           # pthread_create will actually create a thread.
13147           # On Solaris 10 or newer, this test is no longer needed, because
13148           # libc contains the fully functional pthread functions.
13149           case "$host_os" in
13150             solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
13151
13152$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
13153
13154           esac
13155
13156fi
13157
13158      elif test $gl_pthread_api != yes; then
13159        # Some library is needed. Try libpthread and libc_r.
13160        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
13161$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
13162if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
13163  $as_echo_n "(cached) " >&6
13164else
13165  ac_check_lib_save_LIBS=$LIBS
13166LIBS="-lpthread  $LIBS"
13167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13168/* end confdefs.h.  */
13169
13170/* Override any GCC internal prototype to avoid an error.
13171   Use char because int might match the return type of a GCC
13172   builtin and then its argument prototype would still apply.  */
13173#ifdef __cplusplus
13174extern "C"
13175#endif
13176char pthread_kill ();
13177int
13178main ()
13179{
13180return pthread_kill ();
13181  ;
13182  return 0;
13183}
13184_ACEOF
13185if ac_fn_c_try_link "$LINENO"; then :
13186  ac_cv_lib_pthread_pthread_kill=yes
13187else
13188  ac_cv_lib_pthread_pthread_kill=no
13189fi
13190rm -f core conftest.err conftest.$ac_objext \
13191    conftest$ac_exeext conftest.$ac_ext
13192LIBS=$ac_check_lib_save_LIBS
13193fi
13194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
13195$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
13196if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
13197  gl_pthread_api=yes
13198           LIBPTHREAD=-lpthread
13199           LIBPMULTITHREAD=-lpthread
13200fi
13201
13202        if test $gl_pthread_api != yes; then
13203          # For FreeBSD 4.
13204          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
13205$as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
13206if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
13207  $as_echo_n "(cached) " >&6
13208else
13209  ac_check_lib_save_LIBS=$LIBS
13210LIBS="-lc_r  $LIBS"
13211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13212/* end confdefs.h.  */
13213
13214/* Override any GCC internal prototype to avoid an error.
13215   Use char because int might match the return type of a GCC
13216   builtin and then its argument prototype would still apply.  */
13217#ifdef __cplusplus
13218extern "C"
13219#endif
13220char pthread_kill ();
13221int
13222main ()
13223{
13224return pthread_kill ();
13225  ;
13226  return 0;
13227}
13228_ACEOF
13229if ac_fn_c_try_link "$LINENO"; then :
13230  ac_cv_lib_c_r_pthread_kill=yes
13231else
13232  ac_cv_lib_c_r_pthread_kill=no
13233fi
13234rm -f core conftest.err conftest.$ac_objext \
13235    conftest$ac_exeext conftest.$ac_ext
13236LIBS=$ac_check_lib_save_LIBS
13237fi
13238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
13239$as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
13240if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
13241  gl_pthread_api=yes
13242             LIBPTHREAD=-lc_r
13243             LIBPMULTITHREAD=-lc_r
13244fi
13245
13246        fi
13247      fi
13248    fi
13249    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
13250$as_echo_n "checking whether POSIX threads API is available... " >&6; }
13251    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
13252$as_echo "$gl_pthread_api" >&6; }
13253
13254
13255    if test $gl_pthread_api = yes; then
13256
13257$as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
13258
13259    fi
13260
13261        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13262/* end confdefs.h.  */
13263#include <sched.h>
13264int
13265main ()
13266{
13267sched_yield ();
13268  ;
13269  return 0;
13270}
13271_ACEOF
13272if ac_fn_c_try_link "$LINENO"; then :
13273  LIB_SCHED_YIELD=
13274
13275else
13276         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
13277$as_echo_n "checking for sched_yield in -lrt... " >&6; }
13278if ${ac_cv_lib_rt_sched_yield+:} false; then :
13279  $as_echo_n "(cached) " >&6
13280else
13281  ac_check_lib_save_LIBS=$LIBS
13282LIBS="-lrt  $LIBS"
13283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13284/* end confdefs.h.  */
13285
13286/* Override any GCC internal prototype to avoid an error.
13287   Use char because int might match the return type of a GCC
13288   builtin and then its argument prototype would still apply.  */
13289#ifdef __cplusplus
13290extern "C"
13291#endif
13292char sched_yield ();
13293int
13294main ()
13295{
13296return sched_yield ();
13297  ;
13298  return 0;
13299}
13300_ACEOF
13301if ac_fn_c_try_link "$LINENO"; then :
13302  ac_cv_lib_rt_sched_yield=yes
13303else
13304  ac_cv_lib_rt_sched_yield=no
13305fi
13306rm -f core conftest.err conftest.$ac_objext \
13307    conftest$ac_exeext conftest.$ac_ext
13308LIBS=$ac_check_lib_save_LIBS
13309fi
13310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
13311$as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
13312if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
13313  LIB_SCHED_YIELD=-lrt
13314else
13315            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
13316$as_echo_n "checking for sched_yield in -lposix4... " >&6; }
13317if ${ac_cv_lib_posix4_sched_yield+:} false; then :
13318  $as_echo_n "(cached) " >&6
13319else
13320  ac_check_lib_save_LIBS=$LIBS
13321LIBS="-lposix4  $LIBS"
13322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13323/* end confdefs.h.  */
13324
13325/* Override any GCC internal prototype to avoid an error.
13326   Use char because int might match the return type of a GCC
13327   builtin and then its argument prototype would still apply.  */
13328#ifdef __cplusplus
13329extern "C"
13330#endif
13331char sched_yield ();
13332int
13333main ()
13334{
13335return sched_yield ();
13336  ;
13337  return 0;
13338}
13339_ACEOF
13340if ac_fn_c_try_link "$LINENO"; then :
13341  ac_cv_lib_posix4_sched_yield=yes
13342else
13343  ac_cv_lib_posix4_sched_yield=no
13344fi
13345rm -f core conftest.err conftest.$ac_objext \
13346    conftest$ac_exeext conftest.$ac_ext
13347LIBS=$ac_check_lib_save_LIBS
13348fi
13349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
13350$as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
13351if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
13352  LIB_SCHED_YIELD=-lposix4
13353fi
13354
13355fi
13356
13357
13358fi
13359rm -f core conftest.err conftest.$ac_objext \
13360    conftest$ac_exeext conftest.$ac_ext
13361
13362
13363    gl_pthreadlib_body_done=done
13364  fi
13365
13366
13367
13368
13369
13370
13371
13372
13373
13374  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
13375$as_echo_n "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
13376if ${gl_cv_func_setlocale_null_all_mtsafe+:} false; then :
13377  $as_echo_n "(cached) " >&6
13378else
13379  case "$host_os" in
13380       # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
13381       *-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
13382         gl_cv_func_setlocale_null_all_mtsafe=no ;;
13383       # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
13384       *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
13385         gl_cv_func_setlocale_null_all_mtsafe=yes ;;
13386       # If we don't know, obey --enable-cross-guesses.
13387       *)
13388         gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
13389     esac
13390
13391fi
13392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
13393$as_echo "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
13394    case "$host_os" in
13395    mingw*) ;;
13396    *)
13397      if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
13398        gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
13399      fi
13400      ;;
13401  esac
13402  case "$gl_cv_func_setlocale_null_all_mtsafe" in
13403    *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
13404    *)    SETLOCALE_NULL_ALL_MTSAFE=0 ;;
13405  esac
13406
13407cat >>confdefs.h <<_ACEOF
13408#define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE
13409_ACEOF
13410
13411
13412    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
13413$as_echo_n "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
13414if ${gl_cv_func_setlocale_null_one_mtsafe+:} false; then :
13415  $as_echo_n "(cached) " >&6
13416else
13417  case "$host_os" in
13418       # Guess no on OpenBSD, AIX.
13419       openbsd* | aix*)
13420         gl_cv_func_setlocale_null_one_mtsafe=no ;;
13421       # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
13422       *-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
13423         gl_cv_func_setlocale_null_one_mtsafe=yes ;;
13424       # If we don't know, obey --enable-cross-guesses.
13425       *)
13426         gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
13427     esac
13428
13429fi
13430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
13431$as_echo "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
13432    case "$host_os" in
13433    mingw*) ;;
13434    *)
13435      if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
13436        gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
13437      fi
13438      ;;
13439  esac
13440  case "$gl_cv_func_setlocale_null_one_mtsafe" in
13441    *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
13442    *)    SETLOCALE_NULL_ONE_MTSAFE=0 ;;
13443  esac
13444
13445cat >>confdefs.h <<_ACEOF
13446#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE
13447_ACEOF
13448
13449
13450    if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
13451    case "$host_os" in
13452      mingw*) LIB_SETLOCALE_NULL= ;;
13453      *)
13454
13455
13456  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
13457$as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
13458if ${gl_cv_have_weak+:} false; then :
13459  $as_echo_n "(cached) " >&6
13460else
13461  gl_cv_have_weak=no
13462          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13463/* end confdefs.h.  */
13464extern void xyzzy ();
13465#pragma weak xyzzy
13466int
13467main ()
13468{
13469xyzzy();
13470  ;
13471  return 0;
13472}
13473_ACEOF
13474if ac_fn_c_try_link "$LINENO"; then :
13475  gl_cv_have_weak=maybe
13476fi
13477rm -f core conftest.err conftest.$ac_objext \
13478    conftest$ac_exeext conftest.$ac_ext
13479     if test $gl_cv_have_weak = maybe; then
13480                     if test "$cross_compiling" = yes; then :
13481                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13482/* end confdefs.h.  */
13483#ifdef __ELF__
13484             Extensible Linking Format
13485             #endif
13486
13487_ACEOF
13488if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13489  $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
13490  gl_cv_have_weak="guessing yes"
13491else
13492  gl_cv_have_weak="guessing no"
13493fi
13494rm -f conftest*
13495
13496
13497else
13498  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13499/* end confdefs.h.  */
13500
13501#include <stdio.h>
13502#pragma weak fputs
13503int main ()
13504{
13505  return (fputs == NULL);
13506}
13507_ACEOF
13508if ac_fn_c_try_run "$LINENO"; then :
13509  gl_cv_have_weak=yes
13510else
13511  gl_cv_have_weak=no
13512fi
13513rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13514  conftest.$ac_objext conftest.beam conftest.$ac_ext
13515fi
13516
13517     fi
13518          case " $LDFLAGS " in
13519       *" -static "*) gl_cv_have_weak=no ;;
13520     esac
13521                    case "$gl_cv_have_weak" in
13522       *yes)
13523         case "$host_os" in
13524           freebsd* | dragonfly*)
13525             : > conftest1.c
13526             $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
13527             cat <<EOF > conftest2.c
13528#include <pthread.h>
13529#pragma weak pthread_mutexattr_gettype
13530int main ()
13531{
13532  return (pthread_mutexattr_gettype != NULL);
13533}
13534EOF
13535             $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
13536               || gl_cv_have_weak=no
13537             rm -f conftest1.c libempty.so conftest2.c conftest
13538             ;;
13539         esac
13540         ;;
13541     esac
13542
13543fi
13544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
13545$as_echo "$gl_cv_have_weak" >&6; }
13546  case "$gl_cv_have_weak" in
13547    *yes)
13548
13549$as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
13550
13551      ;;
13552  esac
13553
13554        case "$gl_cv_have_weak" in
13555          *yes) LIB_SETLOCALE_NULL= ;;
13556          *)    LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
13557        esac
13558        ;;
13559    esac
13560  else
13561    LIB_SETLOCALE_NULL=
13562  fi
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576
13577     if test $gl_cv_have_include_next = yes; then
13578       gl_cv_next_limits_h='<'limits.h'>'
13579     else
13580       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
13581$as_echo_n "checking absolute name of <limits.h>... " >&6; }
13582if ${gl_cv_next_limits_h+:} false; then :
13583  $as_echo_n "(cached) " >&6
13584else
13585
13586             if test $ac_cv_header_limits_h = yes; then
13587
13588
13589
13590
13591  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13592/* end confdefs.h.  */
13593#include <limits.h>
13594_ACEOF
13595                case "$host_os" in
13596    aix*) gl_absname_cpp="$ac_cpp -C" ;;
13597    *)    gl_absname_cpp="$ac_cpp" ;;
13598  esac
13599
13600  case "$host_os" in
13601    mingw*)
13602                                          gl_dirsep_regex='[/\\]'
13603      ;;
13604    *)
13605      gl_dirsep_regex='\/'
13606      ;;
13607  esac
13608      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13609  gl_header_literal_regex=`echo 'limits.h' \
13610                           | sed -e "$gl_make_literal_regex_sed"`
13611  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13612      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13613      s|^/[^/]|//&|
13614      p
13615      q
13616    }'
13617
13618        gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13619  sed -n "$gl_absolute_header_sed"`
13620
13621           gl_header=$gl_cv_absolute_limits_h
13622           gl_cv_next_limits_h='"'$gl_header'"'
13623          else
13624               gl_cv_next_limits_h='<'limits.h'>'
13625             fi
13626
13627
13628fi
13629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
13630$as_echo "$gl_cv_next_limits_h" >&6; }
13631     fi
13632     NEXT_LIMITS_H=$gl_cv_next_limits_h
13633
13634     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13635       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13636       gl_next_as_first_directive='<'limits.h'>'
13637     else
13638       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13639       gl_next_as_first_directive=$gl_cv_next_limits_h
13640     fi
13641     NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
13642
13643
13644
13645
13646
13647  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc." >&5
13648$as_echo_n "checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc.... " >&6; }
13649if ${gl_cv_header_limits_width+:} false; then :
13650  $as_echo_n "(cached) " >&6
13651else
13652  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13653/* end confdefs.h.  */
13654#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
13655             #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
13656            #endif
13657            #include <limits.h>
13658            long long llm = LLONG_MAX;
13659            int wb = WORD_BIT;
13660            int ullw = ULLONG_WIDTH;
13661
13662int
13663main ()
13664{
13665
13666  ;
13667  return 0;
13668}
13669_ACEOF
13670if ac_fn_c_try_compile "$LINENO"; then :
13671  gl_cv_header_limits_width=yes
13672else
13673  gl_cv_header_limits_width=no
13674fi
13675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13676fi
13677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
13678$as_echo "$gl_cv_header_limits_width" >&6; }
13679  if test "$gl_cv_header_limits_width" = yes; then
13680    LIMITS_H=
13681  else
13682    LIMITS_H=limits.h
13683  fi
13684
13685   if test -n "$LIMITS_H"; then
13686  GL_GENERATE_LIMITS_H_TRUE=
13687  GL_GENERATE_LIMITS_H_FALSE='#'
13688else
13689  GL_GENERATE_LIMITS_H_TRUE='#'
13690  GL_GENERATE_LIMITS_H_FALSE=
13691fi
13692
13693
13694
13695  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
13696$as_echo_n "checking for wint_t... " >&6; }
13697if ${gt_cv_c_wint_t+:} false; then :
13698  $as_echo_n "(cached) " >&6
13699else
13700  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13701/* end confdefs.h.  */
13702#include <wchar.h>
13703            wint_t foo = (wchar_t)'\0';
13704int
13705main ()
13706{
13707
13708  ;
13709  return 0;
13710}
13711_ACEOF
13712if ac_fn_c_try_compile "$LINENO"; then :
13713  gt_cv_c_wint_t=yes
13714else
13715  gt_cv_c_wint_t=no
13716fi
13717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13718fi
13719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
13720$as_echo "$gt_cv_c_wint_t" >&6; }
13721  if test $gt_cv_c_wint_t = yes; then
13722
13723$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
13724
13725
13726            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wint_t is large enough" >&5
13727$as_echo_n "checking whether wint_t is large enough... " >&6; }
13728if ${gl_cv_type_wint_t_large_enough+:} false; then :
13729  $as_echo_n "(cached) " >&6
13730else
13731  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13732/* end confdefs.h.  */
13733#include <wchar.h>
13734              int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
13735
13736int
13737main ()
13738{
13739
13740  ;
13741  return 0;
13742}
13743_ACEOF
13744if ac_fn_c_try_compile "$LINENO"; then :
13745  gl_cv_type_wint_t_large_enough=yes
13746else
13747  gl_cv_type_wint_t_large_enough=no
13748fi
13749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13750fi
13751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_large_enough" >&5
13752$as_echo "$gl_cv_type_wint_t_large_enough" >&6; }
13753    if test $gl_cv_type_wint_t_large_enough = no; then
13754      GNULIB_OVERRIDES_WINT_T=1
13755    else
13756      GNULIB_OVERRIDES_WINT_T=0
13757    fi
13758  else
13759    GNULIB_OVERRIDES_WINT_T=0
13760  fi
13761
13762
13763
13764
13765
13766
13767
13768    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler produces multi-arch binaries" >&5
13769$as_echo_n "checking whether the compiler produces multi-arch binaries... " >&6; }
13770if ${gl_cv_c_multiarch+:} false; then :
13771  $as_echo_n "(cached) " >&6
13772else
13773  gl_cv_c_multiarch=no
13774     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13775/* end confdefs.h.  */
13776#ifndef __APPLE_CC__
13777            not a universal capable compiler
13778           #endif
13779           typedef int dummy;
13780
13781_ACEOF
13782if ac_fn_c_try_compile "$LINENO"; then :
13783
13784                        arch=
13785        prev=
13786        for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
13787          if test -n "$prev"; then
13788            case $word in
13789              i?86 | x86_64 | ppc | ppc64 | arm | arm64)
13790                if test -z "$arch" || test "$arch" = "$word"; then
13791                  arch="$word"
13792                else
13793                  gl_cv_c_multiarch=yes
13794                fi
13795                ;;
13796            esac
13797            prev=
13798          else
13799            if test "x$word" = "x-arch"; then
13800              prev=arch
13801            fi
13802          fi
13803        done
13804
13805fi
13806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13807
13808fi
13809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_multiarch" >&5
13810$as_echo "$gl_cv_c_multiarch" >&6; }
13811  if test $gl_cv_c_multiarch = yes; then
13812    APPLE_UNIVERSAL_BUILD=1
13813  else
13814    APPLE_UNIVERSAL_BUILD=0
13815  fi
13816
13817
13818
13819
13820
13821
13822
13823
13824$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
13825
13826
13827$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
13828
13829
13830
13831  if test $ac_cv_header_wchar_h = yes; then
13832    HAVE_WCHAR_H=1
13833  else
13834    HAVE_WCHAR_H=0
13835  fi
13836
13837
13838
13839  if test $ac_cv_header_inttypes_h = yes; then
13840    HAVE_INTTYPES_H=1
13841  else
13842    HAVE_INTTYPES_H=0
13843  fi
13844
13845
13846
13847  if test $ac_cv_header_sys_types_h = yes; then
13848    HAVE_SYS_TYPES_H=1
13849  else
13850    HAVE_SYS_TYPES_H=0
13851  fi
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863     if test $gl_cv_have_include_next = yes; then
13864       gl_cv_next_stdint_h='<'stdint.h'>'
13865     else
13866       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
13867$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
13868if ${gl_cv_next_stdint_h+:} false; then :
13869  $as_echo_n "(cached) " >&6
13870else
13871
13872             if test $ac_cv_header_stdint_h = yes; then
13873
13874
13875
13876
13877  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13878/* end confdefs.h.  */
13879#include <stdint.h>
13880_ACEOF
13881                case "$host_os" in
13882    aix*) gl_absname_cpp="$ac_cpp -C" ;;
13883    *)    gl_absname_cpp="$ac_cpp" ;;
13884  esac
13885
13886  case "$host_os" in
13887    mingw*)
13888                                          gl_dirsep_regex='[/\\]'
13889      ;;
13890    *)
13891      gl_dirsep_regex='\/'
13892      ;;
13893  esac
13894      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13895  gl_header_literal_regex=`echo 'stdint.h' \
13896                           | sed -e "$gl_make_literal_regex_sed"`
13897  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13898      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13899      s|^/[^/]|//&|
13900      p
13901      q
13902    }'
13903
13904        gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13905  sed -n "$gl_absolute_header_sed"`
13906
13907           gl_header=$gl_cv_absolute_stdint_h
13908           gl_cv_next_stdint_h='"'$gl_header'"'
13909          else
13910               gl_cv_next_stdint_h='<'stdint.h'>'
13911             fi
13912
13913
13914fi
13915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
13916$as_echo "$gl_cv_next_stdint_h" >&6; }
13917     fi
13918     NEXT_STDINT_H=$gl_cv_next_stdint_h
13919
13920     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13921       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13922       gl_next_as_first_directive='<'stdint.h'>'
13923     else
13924       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13925       gl_next_as_first_directive=$gl_cv_next_stdint_h
13926     fi
13927     NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
13928
13929
13930
13931
13932  if test $ac_cv_header_stdint_h = yes; then
13933    HAVE_STDINT_H=1
13934  else
13935    HAVE_STDINT_H=0
13936  fi
13937
13938
13939    if test $ac_cv_header_stdint_h = yes; then
13940    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
13941$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
13942if ${gl_cv_header_working_stdint_h+:} false; then :
13943  $as_echo_n "(cached) " >&6
13944else
13945  gl_cv_header_working_stdint_h=no
13946       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13947/* end confdefs.h.  */
13948
13949
13950#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
13951#define __STDC_CONSTANT_MACROS 1
13952#define __STDC_LIMIT_MACROS 1
13953#include <stdint.h>
13954/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
13955#if !(defined WCHAR_MIN && defined WCHAR_MAX)
13956#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
13957#endif
13958
13959
13960  #include <stddef.h>
13961  #include <signal.h>
13962  #if HAVE_WCHAR_H
13963  # include <wchar.h>
13964  #endif
13965
13966
13967#ifdef INT8_MAX
13968int8_t a1 = INT8_MAX;
13969int8_t a1min = INT8_MIN;
13970#endif
13971#ifdef INT16_MAX
13972int16_t a2 = INT16_MAX;
13973int16_t a2min = INT16_MIN;
13974#endif
13975#ifdef INT32_MAX
13976int32_t a3 = INT32_MAX;
13977int32_t a3min = INT32_MIN;
13978#endif
13979#ifdef INT64_MAX
13980int64_t a4 = INT64_MAX;
13981int64_t a4min = INT64_MIN;
13982#endif
13983#ifdef UINT8_MAX
13984uint8_t b1 = UINT8_MAX;
13985#else
13986typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
13987#endif
13988#ifdef UINT16_MAX
13989uint16_t b2 = UINT16_MAX;
13990#endif
13991#ifdef UINT32_MAX
13992uint32_t b3 = UINT32_MAX;
13993#endif
13994#ifdef UINT64_MAX
13995uint64_t b4 = UINT64_MAX;
13996#endif
13997int_least8_t c1 = INT8_C (0x7f);
13998int_least8_t c1max = INT_LEAST8_MAX;
13999int_least8_t c1min = INT_LEAST8_MIN;
14000int_least16_t c2 = INT16_C (0x7fff);
14001int_least16_t c2max = INT_LEAST16_MAX;
14002int_least16_t c2min = INT_LEAST16_MIN;
14003int_least32_t c3 = INT32_C (0x7fffffff);
14004int_least32_t c3max = INT_LEAST32_MAX;
14005int_least32_t c3min = INT_LEAST32_MIN;
14006int_least64_t c4 = INT64_C (0x7fffffffffffffff);
14007int_least64_t c4max = INT_LEAST64_MAX;
14008int_least64_t c4min = INT_LEAST64_MIN;
14009uint_least8_t d1 = UINT8_C (0xff);
14010uint_least8_t d1max = UINT_LEAST8_MAX;
14011uint_least16_t d2 = UINT16_C (0xffff);
14012uint_least16_t d2max = UINT_LEAST16_MAX;
14013uint_least32_t d3 = UINT32_C (0xffffffff);
14014uint_least32_t d3max = UINT_LEAST32_MAX;
14015uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
14016uint_least64_t d4max = UINT_LEAST64_MAX;
14017int_fast8_t e1 = INT_FAST8_MAX;
14018int_fast8_t e1min = INT_FAST8_MIN;
14019int_fast16_t e2 = INT_FAST16_MAX;
14020int_fast16_t e2min = INT_FAST16_MIN;
14021int_fast32_t e3 = INT_FAST32_MAX;
14022int_fast32_t e3min = INT_FAST32_MIN;
14023int_fast64_t e4 = INT_FAST64_MAX;
14024int_fast64_t e4min = INT_FAST64_MIN;
14025uint_fast8_t f1 = UINT_FAST8_MAX;
14026uint_fast16_t f2 = UINT_FAST16_MAX;
14027uint_fast32_t f3 = UINT_FAST32_MAX;
14028uint_fast64_t f4 = UINT_FAST64_MAX;
14029#ifdef INTPTR_MAX
14030intptr_t g = INTPTR_MAX;
14031intptr_t gmin = INTPTR_MIN;
14032#endif
14033#ifdef UINTPTR_MAX
14034uintptr_t h = UINTPTR_MAX;
14035#endif
14036intmax_t i = INTMAX_MAX;
14037uintmax_t j = UINTMAX_MAX;
14038
14039/* Check that SIZE_MAX has the correct type, if possible.  */
14040#if 201112 <= __STDC_VERSION__
14041int k = _Generic (SIZE_MAX, size_t: 0);
14042#elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \
14043       || (0x5110 <= __SUNPRO_C && !__STDC__))
14044extern size_t k;
14045extern __typeof__ (SIZE_MAX) k;
14046#endif
14047
14048#include <limits.h> /* for CHAR_BIT */
14049#define TYPE_MINIMUM(t) \
14050  ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
14051#define TYPE_MAXIMUM(t) \
14052  ((t) ((t) 0 < (t) -1 \
14053        ? (t) -1 \
14054        : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
14055struct s {
14056  int check_PTRDIFF:
14057      PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
14058      && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
14059      ? 1 : -1;
14060  /* Detect bug in FreeBSD 6.0 / ia64.  */
14061  int check_SIG_ATOMIC:
14062      SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
14063      && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
14064      ? 1 : -1;
14065  int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
14066  int check_WCHAR:
14067      WCHAR_MIN == TYPE_MINIMUM (wchar_t)
14068      && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
14069      ? 1 : -1;
14070  /* Detect bug in mingw.  */
14071  int check_WINT:
14072      WINT_MIN == TYPE_MINIMUM (wint_t)
14073      && WINT_MAX == TYPE_MAXIMUM (wint_t)
14074      ? 1 : -1;
14075
14076  /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
14077  int check_UINT8_C:
14078        (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
14079  int check_UINT16_C:
14080        (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
14081
14082  /* Detect bugs in OpenBSD 3.9 stdint.h.  */
14083#ifdef UINT8_MAX
14084  int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
14085#endif
14086#ifdef UINT16_MAX
14087  int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
14088#endif
14089#ifdef UINT32_MAX
14090  int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
14091#endif
14092#ifdef UINT64_MAX
14093  int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
14094#endif
14095  int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
14096  int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
14097  int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
14098  int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
14099  int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
14100  int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
14101  int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
14102  int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
14103  int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
14104  int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
14105  int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
14106};
14107
14108int
14109main ()
14110{
14111
14112  ;
14113  return 0;
14114}
14115_ACEOF
14116if ac_fn_c_try_compile "$LINENO"; then :
14117                                                    if test "$cross_compiling" = yes; then :
14118  case "$host_os" in
14119                         # Guess yes on native Windows.
14120                 mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
14121                         # In general, assume it works.
14122                 *)      gl_cv_header_working_stdint_h="guessing yes" ;;
14123               esac
14124
14125else
14126  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14127/* end confdefs.h.  */
14128
14129
14130#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
14131#define __STDC_CONSTANT_MACROS 1
14132#define __STDC_LIMIT_MACROS 1
14133#include <stdint.h>
14134
14135
14136  #include <stddef.h>
14137  #include <signal.h>
14138  #if HAVE_WCHAR_H
14139  # include <wchar.h>
14140  #endif
14141
14142
14143#include <stdio.h>
14144#include <string.h>
14145#define MVAL(macro) MVAL1(macro)
14146#define MVAL1(expression) #expression
14147static const char *macro_values[] =
14148  {
14149#ifdef INT8_MAX
14150    MVAL (INT8_MAX),
14151#endif
14152#ifdef INT16_MAX
14153    MVAL (INT16_MAX),
14154#endif
14155#ifdef INT32_MAX
14156    MVAL (INT32_MAX),
14157#endif
14158#ifdef INT64_MAX
14159    MVAL (INT64_MAX),
14160#endif
14161#ifdef UINT8_MAX
14162    MVAL (UINT8_MAX),
14163#endif
14164#ifdef UINT16_MAX
14165    MVAL (UINT16_MAX),
14166#endif
14167#ifdef UINT32_MAX
14168    MVAL (UINT32_MAX),
14169#endif
14170#ifdef UINT64_MAX
14171    MVAL (UINT64_MAX),
14172#endif
14173    NULL
14174  };
14175
14176int
14177main ()
14178{
14179
14180  const char **mv;
14181  for (mv = macro_values; *mv != NULL; mv++)
14182    {
14183      const char *value = *mv;
14184      /* Test whether it looks like a cast expression.  */
14185      if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
14186          || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
14187          || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
14188          || strncmp (value, "((int)"/*)*/, 6) == 0
14189          || strncmp (value, "((signed short)"/*)*/, 15) == 0
14190          || strncmp (value, "((signed char)"/*)*/, 14) == 0)
14191        return mv - macro_values + 1;
14192    }
14193  return 0;
14194
14195  ;
14196  return 0;
14197}
14198_ACEOF
14199if ac_fn_c_try_run "$LINENO"; then :
14200  gl_cv_header_working_stdint_h=yes
14201fi
14202rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14203  conftest.$ac_objext conftest.beam conftest.$ac_ext
14204fi
14205
14206
14207fi
14208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14209
14210fi
14211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
14212$as_echo "$gl_cv_header_working_stdint_h" >&6; }
14213  fi
14214
14215  HAVE_C99_STDINT_H=0
14216  HAVE_SYS_BITYPES_H=0
14217  HAVE_SYS_INTTYPES_H=0
14218  STDINT_H=stdint.h
14219  case "$gl_cv_header_working_stdint_h" in
14220    *yes)
14221      HAVE_C99_STDINT_H=1
14222                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h works without ISO C predefines" >&5
14223$as_echo_n "checking whether stdint.h works without ISO C predefines... " >&6; }
14224if ${gl_cv_header_stdint_without_STDC_macros+:} false; then :
14225  $as_echo_n "(cached) " >&6
14226else
14227  gl_cv_header_stdint_without_STDC_macros=no
14228         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14229/* end confdefs.h.  */
14230
14231
14232#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
14233#include <stdint.h>
14234
14235
14236  #include <stddef.h>
14237  #include <signal.h>
14238  #if HAVE_WCHAR_H
14239  # include <wchar.h>
14240  #endif
14241
14242
14243intmax_t im = INTMAX_MAX;
14244int32_t i32 = INT32_C (0x7fffffff);
14245
14246int
14247main ()
14248{
14249
14250  ;
14251  return 0;
14252}
14253_ACEOF
14254if ac_fn_c_try_compile "$LINENO"; then :
14255  gl_cv_header_stdint_without_STDC_macros=yes
14256fi
14257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14258
14259fi
14260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_without_STDC_macros" >&5
14261$as_echo "$gl_cv_header_stdint_without_STDC_macros" >&6; }
14262
14263      if test $gl_cv_header_stdint_without_STDC_macros = no; then
14264
14265$as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
14266
14267
14268$as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
14269
14270      fi
14271      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
14272$as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
14273if ${gl_cv_header_stdint_width+:} false; then :
14274  $as_echo_n "(cached) " >&6
14275else
14276  gl_cv_header_stdint_width=no
14277         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14278/* end confdefs.h.  */
14279
14280              /* Work if build is not clean.  */
14281              #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
14282              #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
14283               #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
14284              #endif
14285              #include <stdint.h>
14286
14287  #include <stddef.h>
14288  #include <signal.h>
14289  #if HAVE_WCHAR_H
14290  # include <wchar.h>
14291  #endif
14292
14293              int iw = UINTMAX_WIDTH;
14294
14295int
14296main ()
14297{
14298
14299  ;
14300  return 0;
14301}
14302_ACEOF
14303if ac_fn_c_try_compile "$LINENO"; then :
14304  gl_cv_header_stdint_width=yes
14305fi
14306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14307fi
14308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
14309$as_echo "$gl_cv_header_stdint_width" >&6; }
14310      if test "$gl_cv_header_stdint_width" = yes; then
14311        STDINT_H=
14312      fi
14313      ;;
14314    *)
14315                  for ac_header in sys/inttypes.h sys/bitypes.h
14316do :
14317  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14318ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14319if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14320  cat >>confdefs.h <<_ACEOF
14321#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14322_ACEOF
14323
14324fi
14325
14326done
14327
14328      if test $ac_cv_header_sys_inttypes_h = yes; then
14329        HAVE_SYS_INTTYPES_H=1
14330      fi
14331      if test $ac_cv_header_sys_bitypes_h = yes; then
14332        HAVE_SYS_BITYPES_H=1
14333      fi
14334
14335
14336  if test $APPLE_UNIVERSAL_BUILD = 0; then
14337
14338
14339  for gltype in ptrdiff_t size_t ; do
14340    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
14341$as_echo_n "checking for bit size of $gltype... " >&6; }
14342if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
14343  $as_echo_n "(cached) " >&6
14344else
14345  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
14346  #include <stddef.h>
14347  #include <signal.h>
14348  #if HAVE_WCHAR_H
14349  # include <wchar.h>
14350  #endif
14351
14352#include <limits.h>"; then :
14353
14354else
14355  result=unknown
14356fi
14357
14358       eval gl_cv_bitsizeof_${gltype}=\$result
14359
14360fi
14361eval ac_res=\$gl_cv_bitsizeof_${gltype}
14362	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14363$as_echo "$ac_res" >&6; }
14364    eval result=\$gl_cv_bitsizeof_${gltype}
14365    if test $result = unknown; then
14366                                                result=0
14367    fi
14368    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
14369    cat >>confdefs.h <<_ACEOF
14370#define BITSIZEOF_${GLTYPE} $result
14371_ACEOF
14372
14373    eval BITSIZEOF_${GLTYPE}=\$result
14374  done
14375
14376
14377  fi
14378
14379
14380  for gltype in sig_atomic_t wchar_t wint_t ; do
14381    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
14382$as_echo_n "checking for bit size of $gltype... " >&6; }
14383if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
14384  $as_echo_n "(cached) " >&6
14385else
14386  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
14387  #include <stddef.h>
14388  #include <signal.h>
14389  #if HAVE_WCHAR_H
14390  # include <wchar.h>
14391  #endif
14392
14393#include <limits.h>"; then :
14394
14395else
14396  result=unknown
14397fi
14398
14399       eval gl_cv_bitsizeof_${gltype}=\$result
14400
14401fi
14402eval ac_res=\$gl_cv_bitsizeof_${gltype}
14403	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14404$as_echo "$ac_res" >&6; }
14405    eval result=\$gl_cv_bitsizeof_${gltype}
14406    if test $result = unknown; then
14407                                                result=0
14408    fi
14409    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
14410    cat >>confdefs.h <<_ACEOF
14411#define BITSIZEOF_${GLTYPE} $result
14412_ACEOF
14413
14414    eval BITSIZEOF_${GLTYPE}=\$result
14415  done
14416
14417
14418
14419
14420  for gltype in sig_atomic_t wchar_t wint_t ; do
14421    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
14422$as_echo_n "checking whether $gltype is signed... " >&6; }
14423if eval \${gl_cv_type_${gltype}_signed+:} false; then :
14424  $as_echo_n "(cached) " >&6
14425else
14426  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14427/* end confdefs.h.  */
14428
14429  #include <stddef.h>
14430  #include <signal.h>
14431  #if HAVE_WCHAR_H
14432  # include <wchar.h>
14433  #endif
14434
14435            int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
14436int
14437main ()
14438{
14439
14440  ;
14441  return 0;
14442}
14443_ACEOF
14444if ac_fn_c_try_compile "$LINENO"; then :
14445  result=yes
14446else
14447  result=no
14448fi
14449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14450       eval gl_cv_type_${gltype}_signed=\$result
14451
14452fi
14453eval ac_res=\$gl_cv_type_${gltype}_signed
14454	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14455$as_echo "$ac_res" >&6; }
14456    eval result=\$gl_cv_type_${gltype}_signed
14457    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
14458    if test "$result" = yes; then
14459      cat >>confdefs.h <<_ACEOF
14460#define HAVE_SIGNED_${GLTYPE} 1
14461_ACEOF
14462
14463      eval HAVE_SIGNED_${GLTYPE}=1
14464    else
14465      eval HAVE_SIGNED_${GLTYPE}=0
14466    fi
14467  done
14468
14469
14470  gl_cv_type_ptrdiff_t_signed=yes
14471  gl_cv_type_size_t_signed=no
14472  if test $APPLE_UNIVERSAL_BUILD = 0; then
14473
14474
14475  for gltype in ptrdiff_t size_t ; do
14476    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
14477$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
14478if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
14479  $as_echo_n "(cached) " >&6
14480else
14481  eval gl_cv_type_${gltype}_suffix=no
14482       eval result=\$gl_cv_type_${gltype}_signed
14483       if test "$result" = yes; then
14484         glsufu=
14485       else
14486         glsufu=u
14487       fi
14488       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
14489         case $glsuf in
14490           '')  gltype1='int';;
14491           l)   gltype1='long int';;
14492           ll)  gltype1='long long int';;
14493           i64) gltype1='__int64';;
14494           u)   gltype1='unsigned int';;
14495           ul)  gltype1='unsigned long int';;
14496           ull) gltype1='unsigned long long int';;
14497           ui64)gltype1='unsigned __int64';;
14498         esac
14499         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14500/* end confdefs.h.  */
14501
14502  #include <stddef.h>
14503  #include <signal.h>
14504  #if HAVE_WCHAR_H
14505  # include <wchar.h>
14506  #endif
14507
14508              extern $gltype foo;
14509              extern $gltype1 foo;
14510int
14511main ()
14512{
14513
14514  ;
14515  return 0;
14516}
14517_ACEOF
14518if ac_fn_c_try_compile "$LINENO"; then :
14519  eval gl_cv_type_${gltype}_suffix=\$glsuf
14520fi
14521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14522         eval result=\$gl_cv_type_${gltype}_suffix
14523         test "$result" != no && break
14524       done
14525fi
14526eval ac_res=\$gl_cv_type_${gltype}_suffix
14527	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14528$as_echo "$ac_res" >&6; }
14529    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
14530    eval result=\$gl_cv_type_${gltype}_suffix
14531    test "$result" = no && result=
14532    eval ${GLTYPE}_SUFFIX=\$result
14533    cat >>confdefs.h <<_ACEOF
14534#define ${GLTYPE}_SUFFIX $result
14535_ACEOF
14536
14537  done
14538
14539
14540  fi
14541
14542
14543  for gltype in sig_atomic_t wchar_t wint_t ; do
14544    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
14545$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
14546if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
14547  $as_echo_n "(cached) " >&6
14548else
14549  eval gl_cv_type_${gltype}_suffix=no
14550       eval result=\$gl_cv_type_${gltype}_signed
14551       if test "$result" = yes; then
14552         glsufu=
14553       else
14554         glsufu=u
14555       fi
14556       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
14557         case $glsuf in
14558           '')  gltype1='int';;
14559           l)   gltype1='long int';;
14560           ll)  gltype1='long long int';;
14561           i64) gltype1='__int64';;
14562           u)   gltype1='unsigned int';;
14563           ul)  gltype1='unsigned long int';;
14564           ull) gltype1='unsigned long long int';;
14565           ui64)gltype1='unsigned __int64';;
14566         esac
14567         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14568/* end confdefs.h.  */
14569
14570  #include <stddef.h>
14571  #include <signal.h>
14572  #if HAVE_WCHAR_H
14573  # include <wchar.h>
14574  #endif
14575
14576              extern $gltype foo;
14577              extern $gltype1 foo;
14578int
14579main ()
14580{
14581
14582  ;
14583  return 0;
14584}
14585_ACEOF
14586if ac_fn_c_try_compile "$LINENO"; then :
14587  eval gl_cv_type_${gltype}_suffix=\$glsuf
14588fi
14589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14590         eval result=\$gl_cv_type_${gltype}_suffix
14591         test "$result" != no && break
14592       done
14593fi
14594eval ac_res=\$gl_cv_type_${gltype}_suffix
14595	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14596$as_echo "$ac_res" >&6; }
14597    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
14598    eval result=\$gl_cv_type_${gltype}_suffix
14599    test "$result" = no && result=
14600    eval ${GLTYPE}_SUFFIX=\$result
14601    cat >>confdefs.h <<_ACEOF
14602#define ${GLTYPE}_SUFFIX $result
14603_ACEOF
14604
14605  done
14606
14607
14608
14609          if test $GNULIB_OVERRIDES_WINT_T = 1; then
14610    BITSIZEOF_WINT_T=32
14611  fi
14612
14613      ;;
14614  esac
14615
14616
14617
14618  LIMITS_H='limits.h'
14619   if test -n "$LIMITS_H"; then
14620  GL_GENERATE_LIMITS_H_TRUE=
14621  GL_GENERATE_LIMITS_H_FALSE='#'
14622else
14623  GL_GENERATE_LIMITS_H_TRUE='#'
14624  GL_GENERATE_LIMITS_H_FALSE=
14625fi
14626
14627
14628
14629
14630
14631
14632
14633   if test -n "$STDINT_H"; then
14634  GL_GENERATE_STDINT_H_TRUE=
14635  GL_GENERATE_STDINT_H_FALSE='#'
14636else
14637  GL_GENERATE_STDINT_H_TRUE='#'
14638  GL_GENERATE_STDINT_H_FALSE=
14639fi
14640
14641
14642
14643  GNULIB_IMAXABS=0;
14644  GNULIB_IMAXDIV=0;
14645  GNULIB_STRTOIMAX=0;
14646  GNULIB_STRTOUMAX=0;
14647    HAVE_DECL_IMAXABS=1;
14648  HAVE_DECL_IMAXDIV=1;
14649  HAVE_DECL_STRTOIMAX=1;
14650  HAVE_DECL_STRTOUMAX=1;
14651  HAVE_IMAXDIV_T=1;
14652  REPLACE_STRTOIMAX=0;
14653  REPLACE_STRTOUMAX=0;
14654  INT32_MAX_LT_INTMAX_MAX=1;
14655  INT64_MAX_EQ_LONG_MAX='defined _LP64';
14656  PRIPTR_PREFIX=__PRIPTR_PREFIX;
14657  UINT32_MAX_LT_UINTMAX_MAX=1;
14658  UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
14659
14660
14661
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671
14672
14673
14674     if test $gl_cv_have_include_next = yes; then
14675       gl_cv_next_inttypes_h='<'inttypes.h'>'
14676     else
14677       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
14678$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
14679if ${gl_cv_next_inttypes_h+:} false; then :
14680  $as_echo_n "(cached) " >&6
14681else
14682
14683             if test $ac_cv_header_inttypes_h = yes; then
14684
14685
14686
14687
14688  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14689/* end confdefs.h.  */
14690#include <inttypes.h>
14691_ACEOF
14692                case "$host_os" in
14693    aix*) gl_absname_cpp="$ac_cpp -C" ;;
14694    *)    gl_absname_cpp="$ac_cpp" ;;
14695  esac
14696
14697  case "$host_os" in
14698    mingw*)
14699                                          gl_dirsep_regex='[/\\]'
14700      ;;
14701    *)
14702      gl_dirsep_regex='\/'
14703      ;;
14704  esac
14705      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14706  gl_header_literal_regex=`echo 'inttypes.h' \
14707                           | sed -e "$gl_make_literal_regex_sed"`
14708  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14709      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14710      s|^/[^/]|//&|
14711      p
14712      q
14713    }'
14714
14715        gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14716  sed -n "$gl_absolute_header_sed"`
14717
14718           gl_header=$gl_cv_absolute_inttypes_h
14719           gl_cv_next_inttypes_h='"'$gl_header'"'
14720          else
14721               gl_cv_next_inttypes_h='<'inttypes.h'>'
14722             fi
14723
14724
14725fi
14726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
14727$as_echo "$gl_cv_next_inttypes_h" >&6; }
14728     fi
14729     NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
14730
14731     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14732       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14733       gl_next_as_first_directive='<'inttypes.h'>'
14734     else
14735       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14736       gl_next_as_first_directive=$gl_cv_next_inttypes_h
14737     fi
14738     NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
14739
14740
14741
14742
14743
14744
14745
14746
14747
14748
14749
14750
14751
14752
14753
14754
14755  GNULIB_ISWBLANK=0;
14756  GNULIB_ISWDIGIT=0;
14757  GNULIB_ISWXDIGIT=0;
14758  GNULIB_WCTYPE=0;
14759  GNULIB_ISWCTYPE=0;
14760  GNULIB_WCTRANS=0;
14761  GNULIB_TOWCTRANS=0;
14762    HAVE_ISWBLANK=1;
14763  HAVE_WCTYPE_T=1;
14764  HAVE_WCTRANS_T=1;
14765  REPLACE_ISWBLANK=0;
14766  REPLACE_ISWDIGIT=0;
14767  REPLACE_ISWXDIGIT=0;
14768
14769
14770
14771
14772
14773
14774
14775  if test $ac_cv_header_crtdefs_h = yes; then
14776    HAVE_CRTDEFS_H=1
14777  else
14778    HAVE_CRTDEFS_H=0
14779  fi
14780
14781
14782
14783
14784
14785
14786
14787
14788
14789  if test $ac_cv_func_iswcntrl = yes; then
14790    HAVE_ISWCNTRL=1
14791  else
14792    HAVE_ISWCNTRL=0
14793  fi
14794
14795
14796
14797  if test $gt_cv_c_wint_t = yes; then
14798    HAVE_WINT_T=1
14799  else
14800    HAVE_WINT_T=0
14801  fi
14802
14803
14804
14805
14806
14807
14808
14809
14810
14811
14812
14813
14814
14815     if test $gl_cv_have_include_next = yes; then
14816       gl_cv_next_wctype_h='<'wctype.h'>'
14817     else
14818       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
14819$as_echo_n "checking absolute name of <wctype.h>... " >&6; }
14820if ${gl_cv_next_wctype_h+:} false; then :
14821  $as_echo_n "(cached) " >&6
14822else
14823
14824             if test $ac_cv_header_wctype_h = yes; then
14825
14826
14827
14828
14829  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14830/* end confdefs.h.  */
14831#include <wctype.h>
14832_ACEOF
14833                case "$host_os" in
14834    aix*) gl_absname_cpp="$ac_cpp -C" ;;
14835    *)    gl_absname_cpp="$ac_cpp" ;;
14836  esac
14837
14838  case "$host_os" in
14839    mingw*)
14840                                          gl_dirsep_regex='[/\\]'
14841      ;;
14842    *)
14843      gl_dirsep_regex='\/'
14844      ;;
14845  esac
14846      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14847  gl_header_literal_regex=`echo 'wctype.h' \
14848                           | sed -e "$gl_make_literal_regex_sed"`
14849  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14850      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14851      s|^/[^/]|//&|
14852      p
14853      q
14854    }'
14855
14856        gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14857  sed -n "$gl_absolute_header_sed"`
14858
14859           gl_header=$gl_cv_absolute_wctype_h
14860           gl_cv_next_wctype_h='"'$gl_header'"'
14861          else
14862               gl_cv_next_wctype_h='<'wctype.h'>'
14863             fi
14864
14865
14866fi
14867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
14868$as_echo "$gl_cv_next_wctype_h" >&6; }
14869     fi
14870     NEXT_WCTYPE_H=$gl_cv_next_wctype_h
14871
14872     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14873       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14874       gl_next_as_first_directive='<'wctype.h'>'
14875     else
14876       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14877       gl_next_as_first_directive=$gl_cv_next_wctype_h
14878     fi
14879     NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
14880
14881
14882
14883
14884  if test $ac_cv_header_wctype_h = yes; then
14885    if test $ac_cv_func_iswcntrl = yes; then
14886                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
14887$as_echo_n "checking whether iswcntrl works... " >&6; }
14888if ${gl_cv_func_iswcntrl_works+:} false; then :
14889  $as_echo_n "(cached) " >&6
14890else
14891
14892          if test "$cross_compiling" = yes; then :
14893               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14894/* end confdefs.h.  */
14895#include <stdlib.h>
14896                          #if __GNU_LIBRARY__ == 1
14897                          Linux libc5 i18n is broken.
14898                          #endif
14899int
14900main ()
14901{
14902
14903  ;
14904  return 0;
14905}
14906_ACEOF
14907if ac_fn_c_try_compile "$LINENO"; then :
14908  gl_cv_func_iswcntrl_works="guessing yes"
14909else
14910  gl_cv_func_iswcntrl_works="guessing no"
14911fi
14912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14913
14914else
14915  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14916/* end confdefs.h.  */
14917
14918               #include <wchar.h>
14919               #include <wctype.h>
14920               int main () { return iswprint ('x') == 0; }
14921
14922_ACEOF
14923if ac_fn_c_try_run "$LINENO"; then :
14924  gl_cv_func_iswcntrl_works=yes
14925else
14926  gl_cv_func_iswcntrl_works=no
14927fi
14928rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14929  conftest.$ac_objext conftest.beam conftest.$ac_ext
14930fi
14931
14932
14933fi
14934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
14935$as_echo "$gl_cv_func_iswcntrl_works" >&6; }
14936    fi
14937    HAVE_WCTYPE_H=1
14938  else
14939    HAVE_WCTYPE_H=0
14940  fi
14941
14942
14943  if test $GNULIB_OVERRIDES_WINT_T = 1; then
14944    REPLACE_ISWCNTRL=1
14945  else
14946    case "$gl_cv_func_iswcntrl_works" in
14947      *yes) REPLACE_ISWCNTRL=0 ;;
14948      *)    REPLACE_ISWCNTRL=1 ;;
14949    esac
14950  fi
14951
14952
14953  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
14954        :
14955  fi
14956
14957  if test $REPLACE_ISWCNTRL = 1; then
14958    REPLACE_TOWLOWER=1
14959  else
14960    for ac_func in towlower
14961do :
14962  ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
14963if test "x$ac_cv_func_towlower" = xyes; then :
14964  cat >>confdefs.h <<_ACEOF
14965#define HAVE_TOWLOWER 1
14966_ACEOF
14967
14968fi
14969done
14970
14971    if test $ac_cv_func_towlower = yes; then
14972      REPLACE_TOWLOWER=0
14973    else
14974      ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "#include <wchar.h>
14975          #if HAVE_WCTYPE_H
14976          # include <wctype.h>
14977          #endif
14978
14979"
14980if test "x$ac_cv_have_decl_towlower" = xyes; then :
14981  ac_have_decl=1
14982else
14983  ac_have_decl=0
14984fi
14985
14986cat >>confdefs.h <<_ACEOF
14987#define HAVE_DECL_TOWLOWER $ac_have_decl
14988_ACEOF
14989
14990      if test $ac_cv_have_decl_towlower = yes; then
14991                                REPLACE_TOWLOWER=1
14992      else
14993        REPLACE_TOWLOWER=0
14994      fi
14995    fi
14996  fi
14997
14998
14999  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
15000        :
15001  fi
15002
15003          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
15004$as_echo_n "checking for wctype_t... " >&6; }
15005if ${gl_cv_type_wctype_t+:} false; then :
15006  $as_echo_n "(cached) " >&6
15007else
15008  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15009/* end confdefs.h.  */
15010#include <wchar.h>
15011            #if HAVE_WCTYPE_H
15012            # include <wctype.h>
15013            #endif
15014            wctype_t a;
15015
15016int
15017main ()
15018{
15019
15020  ;
15021  return 0;
15022}
15023_ACEOF
15024if ac_fn_c_try_compile "$LINENO"; then :
15025  gl_cv_type_wctype_t=yes
15026else
15027  gl_cv_type_wctype_t=no
15028fi
15029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15030
15031fi
15032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
15033$as_echo "$gl_cv_type_wctype_t" >&6; }
15034  if test $gl_cv_type_wctype_t = no; then
15035    HAVE_WCTYPE_T=0
15036  fi
15037
15038      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
15039$as_echo_n "checking for wctrans_t... " >&6; }
15040if ${gl_cv_type_wctrans_t+:} false; then :
15041  $as_echo_n "(cached) " >&6
15042else
15043  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15044/* end confdefs.h.  */
15045#include <wchar.h>
15046            #include <wctype.h>
15047            wctrans_t a;
15048
15049int
15050main ()
15051{
15052
15053  ;
15054  return 0;
15055}
15056_ACEOF
15057if ac_fn_c_try_compile "$LINENO"; then :
15058  gl_cv_type_wctrans_t=yes
15059else
15060  gl_cv_type_wctrans_t=no
15061fi
15062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15063
15064fi
15065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
15066$as_echo "$gl_cv_type_wctrans_t" >&6; }
15067  if test $gl_cv_type_wctrans_t = no; then
15068    HAVE_WCTRANS_T=0
15069  fi
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079
15080  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
15081$as_echo_n "checking for a traditional japanese locale... " >&6; }
15082if ${gt_cv_locale_ja+:} false; then :
15083  $as_echo_n "(cached) " >&6
15084else
15085
15086    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15087/* end confdefs.h.  */
15088
15089#include <locale.h>
15090#include <time.h>
15091#if HAVE_LANGINFO_CODESET
15092# include <langinfo.h>
15093#endif
15094#include <stdlib.h>
15095#include <string.h>
15096struct tm t;
15097char buf[16];
15098int main ()
15099{
15100  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
15101     imitates locale dependent behaviour by looking at the environment
15102     variables, and all locales use the UTF-8 encoding.  */
15103#if defined __BEOS__ || defined __HAIKU__
15104  return 1;
15105#else
15106  /* Check whether the given locale name is recognized by the system.  */
15107# if defined _WIN32 && !defined __CYGWIN__
15108  /* On native Windows, setlocale(category, "") looks at the system settings,
15109     not at the environment variables.  Also, when an encoding suffix such
15110     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15111     category of the locale to "C".  */
15112  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15113      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15114    return 1;
15115# else
15116  if (setlocale (LC_ALL, "") == NULL) return 1;
15117# endif
15118  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15119     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15120     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15121     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15122     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15123     some unit tests fail.
15124     On MirBSD 10, when an unsupported locale is specified, setlocale()
15125     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
15126# if HAVE_LANGINFO_CODESET
15127  {
15128    const char *cs = nl_langinfo (CODESET);
15129    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
15130        || strcmp (cs, "UTF-8") == 0)
15131      return 1;
15132  }
15133# endif
15134# ifdef __CYGWIN__
15135  /* On Cygwin, avoid locale names without encoding suffix, because the
15136     locale_charset() function relies on the encoding suffix.  Note that
15137     LC_ALL is set on the command line.  */
15138  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15139# endif
15140  /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
15141     on Cygwin 1.5.x.  */
15142  if (MB_CUR_MAX == 1)
15143    return 1;
15144  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
15145     This excludes the UTF-8 encoding (except on MirBSD).  */
15146  {
15147    const char *p;
15148    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15149    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
15150    for (p = buf; *p != '\0'; p++)
15151      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
15152        return 1;
15153  }
15154  return 0;
15155#endif
15156}
15157
15158_ACEOF
15159    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15160  (eval $ac_link) 2>&5
15161  ac_status=$?
15162  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15163  test $ac_status = 0; } && test -s conftest$ac_exeext; then
15164      case "$host_os" in
15165        # Handle native Windows specially, because there setlocale() interprets
15166        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15167        # "fr" or "fra" as "French" or "French_France.1252",
15168        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15169        # "ja" as "Japanese" or "Japanese_Japan.932",
15170        # and similar.
15171        mingw*)
15172          # Note that on native Windows, the Japanese locale is
15173          # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
15174          # cannot use it here.
15175          gt_cv_locale_ja=none
15176          ;;
15177        *)
15178          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15179          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15180          # configure script would override the LC_ALL setting. Likewise for
15181          # LC_CTYPE, which is also set at the beginning of the configure script.
15182          # Test for the AIX locale name.
15183          if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15184            gt_cv_locale_ja=ja_JP
15185          else
15186            # Test for the locale name with explicit encoding suffix.
15187            if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15188              gt_cv_locale_ja=ja_JP.EUC-JP
15189            else
15190              # Test for the HP-UX, OSF/1, NetBSD locale name.
15191              if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15192                gt_cv_locale_ja=ja_JP.eucJP
15193              else
15194                # Test for the IRIX, FreeBSD locale name.
15195                if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15196                  gt_cv_locale_ja=ja_JP.EUC
15197                else
15198                  # Test for the Solaris 7 locale name.
15199                  if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15200                    gt_cv_locale_ja=ja
15201                  else
15202                    # Special test for NetBSD 1.6.
15203                    if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
15204                      gt_cv_locale_ja=ja_JP.eucJP
15205                    else
15206                      # None found.
15207                      gt_cv_locale_ja=none
15208                    fi
15209                  fi
15210                fi
15211              fi
15212            fi
15213          fi
15214          ;;
15215      esac
15216    fi
15217    rm -fr conftest*
15218
15219fi
15220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
15221$as_echo "$gt_cv_locale_ja" >&6; }
15222  LOCALE_JA=$gt_cv_locale_ja
15223
15224
15225
15226
15227  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
15228$as_echo_n "checking for a french Unicode locale... " >&6; }
15229if ${gt_cv_locale_fr_utf8+:} false; then :
15230  $as_echo_n "(cached) " >&6
15231else
15232
15233    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15234/* end confdefs.h.  */
15235
15236#include <locale.h>
15237#include <time.h>
15238#if HAVE_LANGINFO_CODESET
15239# include <langinfo.h>
15240#endif
15241#include <stdlib.h>
15242#include <string.h>
15243struct tm t;
15244char buf[16];
15245int main () {
15246  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
15247     imitates locale dependent behaviour by looking at the environment
15248     variables, and all locales use the UTF-8 encoding.  */
15249#if !(defined __BEOS__ || defined __HAIKU__)
15250  /* Check whether the given locale name is recognized by the system.  */
15251# if defined _WIN32 && !defined __CYGWIN__
15252  /* On native Windows, setlocale(category, "") looks at the system settings,
15253     not at the environment variables.  Also, when an encoding suffix such
15254     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15255     category of the locale to "C".  */
15256  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15257      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15258    return 1;
15259# else
15260  if (setlocale (LC_ALL, "") == NULL) return 1;
15261# endif
15262  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15263     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15264     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15265     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15266     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15267     some unit tests fail.  */
15268# if HAVE_LANGINFO_CODESET
15269  {
15270    const char *cs = nl_langinfo (CODESET);
15271    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
15272      return 1;
15273  }
15274# endif
15275# ifdef __CYGWIN__
15276  /* On Cygwin, avoid locale names without encoding suffix, because the
15277     locale_charset() function relies on the encoding suffix.  Note that
15278     LC_ALL is set on the command line.  */
15279  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15280# endif
15281  /* Check whether in the abbreviation of the second month, the second
15282     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
15283     two bytes long, with UTF-8 encoding.  */
15284  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15285  if (strftime (buf, sizeof (buf), "%b", &t) < 4
15286      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
15287    return 1;
15288#endif
15289#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
15290  /* Check whether the decimal separator is a comma.
15291     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
15292     are nl_langinfo(RADIXCHAR) are both ".".  */
15293  if (localeconv () ->decimal_point[0] != ',') return 1;
15294#endif
15295  return 0;
15296}
15297
15298_ACEOF
15299    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15300  (eval $ac_link) 2>&5
15301  ac_status=$?
15302  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15303  test $ac_status = 0; } && test -s conftest$ac_exeext; then
15304      case "$host_os" in
15305        # Handle native Windows specially, because there setlocale() interprets
15306        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15307        # "fr" or "fra" as "French" or "French_France.1252",
15308        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15309        # "ja" as "Japanese" or "Japanese_Japan.932",
15310        # and similar.
15311        mingw*)
15312          # Test for the hypothetical native Windows locale name.
15313          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15314            gt_cv_locale_fr_utf8=French_France.65001
15315          else
15316            # None found.
15317            gt_cv_locale_fr_utf8=none
15318          fi
15319          ;;
15320        *)
15321          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15322          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15323          # configure script would override the LC_ALL setting. Likewise for
15324          # LC_CTYPE, which is also set at the beginning of the configure script.
15325          # Test for the usual locale name.
15326          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15327            gt_cv_locale_fr_utf8=fr_FR
15328          else
15329            # Test for the locale name with explicit encoding suffix.
15330            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15331              gt_cv_locale_fr_utf8=fr_FR.UTF-8
15332            else
15333              # Test for the Solaris 7 locale name.
15334              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15335                gt_cv_locale_fr_utf8=fr.UTF-8
15336              else
15337                # None found.
15338                gt_cv_locale_fr_utf8=none
15339              fi
15340            fi
15341          fi
15342          ;;
15343      esac
15344    fi
15345    rm -fr conftest*
15346
15347fi
15348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
15349$as_echo "$gt_cv_locale_fr_utf8" >&6; }
15350  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
15351
15352
15353
15354
15355
15356  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
15357$as_echo_n "checking for a transitional chinese locale... " >&6; }
15358if ${gt_cv_locale_zh_CN+:} false; then :
15359  $as_echo_n "(cached) " >&6
15360else
15361
15362    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15363/* end confdefs.h.  */
15364
15365#include <locale.h>
15366#include <stdlib.h>
15367#include <time.h>
15368#if HAVE_LANGINFO_CODESET
15369# include <langinfo.h>
15370#endif
15371#include <stdlib.h>
15372#include <string.h>
15373struct tm t;
15374char buf[16];
15375int main ()
15376{
15377  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
15378     imitates locale dependent behaviour by looking at the environment
15379     variables, and all locales use the UTF-8 encoding.  */
15380#if defined __BEOS__ || defined __HAIKU__
15381  return 1;
15382#else
15383  /* Check whether the given locale name is recognized by the system.  */
15384# if defined _WIN32 && !defined __CYGWIN__
15385  /* On native Windows, setlocale(category, "") looks at the system settings,
15386     not at the environment variables.  Also, when an encoding suffix such
15387     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15388     category of the locale to "C".  */
15389  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15390      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15391    return 1;
15392# else
15393  if (setlocale (LC_ALL, "") == NULL) return 1;
15394# endif
15395  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15396     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15397     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15398     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15399     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15400     some unit tests fail.
15401     On MirBSD 10, when an unsupported locale is specified, setlocale()
15402     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
15403# if HAVE_LANGINFO_CODESET
15404  {
15405    const char *cs = nl_langinfo (CODESET);
15406    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
15407        || strcmp (cs, "UTF-8") == 0)
15408      return 1;
15409  }
15410# endif
15411# ifdef __CYGWIN__
15412  /* On Cygwin, avoid locale names without encoding suffix, because the
15413     locale_charset() function relies on the encoding suffix.  Note that
15414     LC_ALL is set on the command line.  */
15415  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15416# endif
15417  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
15418     This excludes the UTF-8 encoding (except on MirBSD).  */
15419  {
15420    const char *p;
15421    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15422    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
15423    for (p = buf; *p != '\0'; p++)
15424      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
15425        return 1;
15426  }
15427  /* Check whether a typical GB18030 multibyte sequence is recognized as a
15428     single wide character.  This excludes the GB2312 and GBK encodings.  */
15429  if (mblen ("\203\062\332\066", 5) != 4)
15430    return 1;
15431  return 0;
15432#endif
15433}
15434
15435_ACEOF
15436    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15437  (eval $ac_link) 2>&5
15438  ac_status=$?
15439  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15440  test $ac_status = 0; } && test -s conftest$ac_exeext; then
15441      case "$host_os" in
15442        # Handle native Windows specially, because there setlocale() interprets
15443        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15444        # "fr" or "fra" as "French" or "French_France.1252",
15445        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15446        # "ja" as "Japanese" or "Japanese_Japan.932",
15447        # and similar.
15448        mingw*)
15449          # Test for the hypothetical native Windows locale name.
15450          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15451            gt_cv_locale_zh_CN=Chinese_China.54936
15452          else
15453            # None found.
15454            gt_cv_locale_zh_CN=none
15455          fi
15456          ;;
15457        solaris2.8)
15458          # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
15459          # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
15460          # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
15461          gt_cv_locale_zh_CN=none
15462          ;;
15463        *)
15464          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15465          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15466          # configure script would override the LC_ALL setting. Likewise for
15467          # LC_CTYPE, which is also set at the beginning of the configure script.
15468          # Test for the locale name without encoding suffix.
15469          if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15470            gt_cv_locale_zh_CN=zh_CN
15471          else
15472            # Test for the locale name with explicit encoding suffix.
15473            if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15474              gt_cv_locale_zh_CN=zh_CN.GB18030
15475            else
15476              # None found.
15477              gt_cv_locale_zh_CN=none
15478            fi
15479          fi
15480          ;;
15481      esac
15482    else
15483      # If there was a link error, due to mblen(), the system is so old that
15484      # it certainly doesn't have a chinese locale.
15485      gt_cv_locale_zh_CN=none
15486    fi
15487    rm -fr conftest*
15488
15489fi
15490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
15491$as_echo "$gt_cv_locale_zh_CN" >&6; }
15492  LOCALE_ZH_CN=$gt_cv_locale_zh_CN
15493
15494
15495
15496  GNULIB_NL_LANGINFO=0;
15497    HAVE_NL_LANGINFO=1;
15498  REPLACE_NL_LANGINFO=0;
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
15512$as_echo_n "checking for O_CLOEXEC... " >&6; }
15513if ${gl_cv_macro_O_CLOEXEC+:} false; then :
15514  $as_echo_n "(cached) " >&6
15515else
15516  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15517/* end confdefs.h.  */
15518#include <fcntl.h>
15519                          #ifndef O_CLOEXEC
15520                            choke me;
15521                          #endif
15522
15523int
15524main ()
15525{
15526return O_CLOEXEC;
15527  ;
15528  return 0;
15529}
15530_ACEOF
15531if ac_fn_c_try_compile "$LINENO"; then :
15532  gl_cv_macro_O_CLOEXEC=yes
15533else
15534  gl_cv_macro_O_CLOEXEC=no
15535fi
15536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15537fi
15538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
15539$as_echo "$gl_cv_macro_O_CLOEXEC" >&6; }
15540
15541
15542
15543
15544
15545
15546
15547  case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink+$gl_cv_macro_O_CLOEXEC in
15548  yes+*yes+yes)
15549    ;;
15550  yes+*)
15551    # Solaris 10 lacks O_CLOEXEC.
15552    # Solaris 9 has *at functions, but uniformly mishandles trailing
15553    # slash in all of them.
15554    REPLACE_OPENAT=1
15555    ;;
15556  *)
15557    HAVE_OPENAT=0
15558    ;;
15559  esac
15560
15561
15562
15563
15564  GNULIB_LOCALECONV=0;
15565  GNULIB_SETLOCALE=0;
15566  GNULIB_SETLOCALE_NULL=0;
15567  GNULIB_DUPLOCALE=0;
15568  GNULIB_LOCALENAME=0;
15569    HAVE_NEWLOCALE=1;
15570  HAVE_DUPLOCALE=1;
15571  HAVE_FREELOCALE=1;
15572  REPLACE_LOCALECONV=0;
15573  REPLACE_SETLOCALE=0;
15574  REPLACE_NEWLOCALE=0;
15575  REPLACE_DUPLOCALE=0;
15576  REPLACE_FREELOCALE=0;
15577  REPLACE_STRUCT_LCONV=0;
15578
15579
15580    REPLACE_NULL=0;
15581  HAVE_MAX_ALIGN_T=1;
15582  HAVE_WCHAR_T=1;
15583
15584
15585  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
15586$as_echo_n "checking for wchar_t... " >&6; }
15587if ${gt_cv_c_wchar_t+:} false; then :
15588  $as_echo_n "(cached) " >&6
15589else
15590  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15591/* end confdefs.h.  */
15592#include <stddef.h>
15593            wchar_t foo = (wchar_t)'\0';
15594int
15595main ()
15596{
15597
15598  ;
15599  return 0;
15600}
15601_ACEOF
15602if ac_fn_c_try_compile "$LINENO"; then :
15603  gt_cv_c_wchar_t=yes
15604else
15605  gt_cv_c_wchar_t=no
15606fi
15607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15608fi
15609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
15610$as_echo "$gt_cv_c_wchar_t" >&6; }
15611  if test $gt_cv_c_wchar_t = yes; then
15612
15613$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
15614
15615  fi
15616
15617
15618
15619
15620
15621
15622
15623  STDDEF_H=
15624
15625      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
15626$as_echo_n "checking for good max_align_t... " >&6; }
15627if ${gl_cv_type_max_align_t+:} false; then :
15628  $as_echo_n "(cached) " >&6
15629else
15630  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15631/* end confdefs.h.  */
15632#include <stddef.h>
15633            unsigned int s = sizeof (max_align_t);
15634            #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
15635            int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
15636            int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
15637            #endif
15638            typedef struct { char a; max_align_t b; } max_helper;
15639            typedef struct { char a; long b; } long_helper;
15640            typedef struct { char a; double b; } double_helper;
15641            typedef struct { char a; long double b; } long_double_helper;
15642            int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
15643            int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
15644            int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
15645
15646int
15647main ()
15648{
15649
15650  ;
15651  return 0;
15652}
15653_ACEOF
15654if ac_fn_c_try_compile "$LINENO"; then :
15655  gl_cv_type_max_align_t=yes
15656else
15657  gl_cv_type_max_align_t=no
15658fi
15659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15660
15661fi
15662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
15663$as_echo "$gl_cv_type_max_align_t" >&6; }
15664  if test $gl_cv_type_max_align_t = no; then
15665    HAVE_MAX_ALIGN_T=0
15666    STDDEF_H=stddef.h
15667  fi
15668
15669  if test $gt_cv_c_wchar_t = no; then
15670    HAVE_WCHAR_T=0
15671    STDDEF_H=stddef.h
15672  fi
15673
15674  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
15675$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
15676if ${gl_cv_decl_null_works+:} false; then :
15677  $as_echo_n "(cached) " >&6
15678else
15679  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15680/* end confdefs.h.  */
15681#include <stddef.h>
15682      int test[2 * (sizeof NULL == sizeof (void *)) -1];
15683
15684int
15685main ()
15686{
15687
15688  ;
15689  return 0;
15690}
15691_ACEOF
15692if ac_fn_c_try_compile "$LINENO"; then :
15693  gl_cv_decl_null_works=yes
15694else
15695  gl_cv_decl_null_works=no
15696fi
15697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15698fi
15699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
15700$as_echo "$gl_cv_decl_null_works" >&6; }
15701  if test $gl_cv_decl_null_works = no; then
15702    REPLACE_NULL=1
15703    STDDEF_H=stddef.h
15704  fi
15705
15706
15707   if test -n "$STDDEF_H"; then
15708  GL_GENERATE_STDDEF_H_TRUE=
15709  GL_GENERATE_STDDEF_H_FALSE='#'
15710else
15711  GL_GENERATE_STDDEF_H_TRUE='#'
15712  GL_GENERATE_STDDEF_H_FALSE=
15713fi
15714
15715  if test -n "$STDDEF_H"; then
15716
15717
15718
15719
15720
15721
15722
15723
15724     if test $gl_cv_have_include_next = yes; then
15725       gl_cv_next_stddef_h='<'stddef.h'>'
15726     else
15727       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
15728$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
15729if ${gl_cv_next_stddef_h+:} false; then :
15730  $as_echo_n "(cached) " >&6
15731else
15732
15733
15734
15735  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15736/* end confdefs.h.  */
15737#include <stddef.h>
15738_ACEOF
15739                case "$host_os" in
15740    aix*) gl_absname_cpp="$ac_cpp -C" ;;
15741    *)    gl_absname_cpp="$ac_cpp" ;;
15742  esac
15743
15744  case "$host_os" in
15745    mingw*)
15746                                          gl_dirsep_regex='[/\\]'
15747      ;;
15748    *)
15749      gl_dirsep_regex='\/'
15750      ;;
15751  esac
15752      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15753  gl_header_literal_regex=`echo 'stddef.h' \
15754                           | sed -e "$gl_make_literal_regex_sed"`
15755  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15756      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15757      s|^/[^/]|//&|
15758      p
15759      q
15760    }'
15761
15762        gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15763  sed -n "$gl_absolute_header_sed"`
15764
15765           gl_header=$gl_cv_absolute_stddef_h
15766           gl_cv_next_stddef_h='"'$gl_header'"'
15767
15768
15769fi
15770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
15771$as_echo "$gl_cv_next_stddef_h" >&6; }
15772     fi
15773     NEXT_STDDEF_H=$gl_cv_next_stddef_h
15774
15775     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15776       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15777       gl_next_as_first_directive='<'stddef.h'>'
15778     else
15779       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15780       gl_next_as_first_directive=$gl_cv_next_stddef_h
15781     fi
15782     NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
15783
15784
15785
15786
15787  fi
15788
15789
15790
15791
15792
15793
15794        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
15795$as_echo_n "checking whether locale.h defines locale_t... " >&6; }
15796if ${gl_cv_header_locale_has_locale_t+:} false; then :
15797  $as_echo_n "(cached) " >&6
15798else
15799  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15800/* end confdefs.h.  */
15801#include <locale.h>
15802            locale_t x;
15803int
15804main ()
15805{
15806
15807  ;
15808  return 0;
15809}
15810_ACEOF
15811if ac_fn_c_try_compile "$LINENO"; then :
15812  gl_cv_header_locale_has_locale_t=yes
15813else
15814  gl_cv_header_locale_has_locale_t=no
15815fi
15816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15817
15818fi
15819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
15820$as_echo "$gl_cv_header_locale_has_locale_t" >&6; }
15821
15822
15823  if test $ac_cv_header_xlocale_h = yes; then
15824    HAVE_XLOCALE_H=1
15825    if test $gl_cv_header_locale_has_locale_t = yes; then
15826      gl_cv_header_locale_h_needs_xlocale_h=no
15827    else
15828      gl_cv_header_locale_h_needs_xlocale_h=yes
15829    fi
15830    HAVE_LOCALE_T=1
15831  else
15832    HAVE_XLOCALE_H=0
15833    gl_cv_header_locale_h_needs_xlocale_h=no
15834    if test $gl_cv_header_locale_has_locale_t = yes; then
15835      HAVE_LOCALE_T=1
15836    else
15837      HAVE_LOCALE_T=0
15838    fi
15839  fi
15840
15841
15842
15843  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
15844$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
15845if ${gl_cv_func_malloc_posix+:} false; then :
15846  $as_echo_n "(cached) " >&6
15847else
15848
15849                        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15850/* end confdefs.h.  */
15851
15852int
15853main ()
15854{
15855#if defined _WIN32 && ! defined __CYGWIN__
15856             choke me
15857             #endif
15858
15859  ;
15860  return 0;
15861}
15862_ACEOF
15863if ac_fn_c_try_compile "$LINENO"; then :
15864  gl_cv_func_malloc_posix=yes
15865else
15866  gl_cv_func_malloc_posix=no
15867fi
15868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15869
15870fi
15871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
15872$as_echo "$gl_cv_func_malloc_posix" >&6; }
15873
15874
15875
15876    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
15877$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
15878if ${ac_cv_func_malloc_0_nonnull+:} false; then :
15879  $as_echo_n "(cached) " >&6
15880else
15881  if test "$cross_compiling" = yes; then :
15882  case "$host_os" in
15883          # Guess yes on platforms where we know the result.
15884          *-gnu* | gnu* | *-musl* | freebsd* | netbsd* | openbsd* \
15885          | hpux* | solaris* | cygwin* | mingw*)
15886            ac_cv_func_malloc_0_nonnull="guessing yes" ;;
15887          # If we don't know, obey --enable-cross-guesses.
15888          *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
15889        esac
15890
15891else
15892  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15893/* end confdefs.h.  */
15894#include <stdlib.h>
15895
15896int
15897main ()
15898{
15899char *p = malloc (0);
15900            int result = !p;
15901            free (p);
15902            return result;
15903  ;
15904  return 0;
15905}
15906
15907_ACEOF
15908if ac_fn_c_try_run "$LINENO"; then :
15909  ac_cv_func_malloc_0_nonnull=yes
15910else
15911  ac_cv_func_malloc_0_nonnull=no
15912fi
15913rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15914  conftest.$ac_objext conftest.beam conftest.$ac_ext
15915fi
15916
15917
15918fi
15919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
15920$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
15921  case "$ac_cv_func_malloc_0_nonnull" in
15922    *yes)
15923      gl_cv_func_malloc_0_nonnull=1
15924      ;;
15925    *)
15926      gl_cv_func_malloc_0_nonnull=0
15927      ;;
15928  esac
15929
15930
15931cat >>confdefs.h <<_ACEOF
15932#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
15933_ACEOF
15934
15935
15936
15937
15938
15939
15940
15941  GNULIB_EXPLICIT_BZERO=0;
15942  GNULIB_FFSL=0;
15943  GNULIB_FFSLL=0;
15944  GNULIB_MEMCHR=0;
15945  GNULIB_MEMMEM=0;
15946  GNULIB_MEMPCPY=0;
15947  GNULIB_MEMRCHR=0;
15948  GNULIB_RAWMEMCHR=0;
15949  GNULIB_STPCPY=0;
15950  GNULIB_STPNCPY=0;
15951  GNULIB_STRCHRNUL=0;
15952  GNULIB_STRDUP=0;
15953  GNULIB_STRNCAT=0;
15954  GNULIB_STRNDUP=0;
15955  GNULIB_STRNLEN=0;
15956  GNULIB_STRPBRK=0;
15957  GNULIB_STRSEP=0;
15958  GNULIB_STRSTR=0;
15959  GNULIB_STRCASESTR=0;
15960  GNULIB_STRTOK_R=0;
15961  GNULIB_MBSLEN=0;
15962  GNULIB_MBSNLEN=0;
15963  GNULIB_MBSCHR=0;
15964  GNULIB_MBSRCHR=0;
15965  GNULIB_MBSSTR=0;
15966  GNULIB_MBSCASECMP=0;
15967  GNULIB_MBSNCASECMP=0;
15968  GNULIB_MBSPCASECMP=0;
15969  GNULIB_MBSCASESTR=0;
15970  GNULIB_MBSCSPN=0;
15971  GNULIB_MBSPBRK=0;
15972  GNULIB_MBSSPN=0;
15973  GNULIB_MBSSEP=0;
15974  GNULIB_MBSTOK_R=0;
15975  GNULIB_STRERROR=0;
15976  GNULIB_STRERROR_R=0;
15977  GNULIB_STRERRORNAME_NP=0;
15978  GNULIB_SIGABBREV_NP=0;
15979  GNULIB_SIGDESCR_NP=0;
15980  GNULIB_STRSIGNAL=0;
15981  GNULIB_STRVERSCMP=0;
15982  HAVE_MBSLEN=0;
15983    GNULIB_MDA_MEMCCPY=1;
15984  GNULIB_MDA_STRDUP=1;
15985    HAVE_EXPLICIT_BZERO=1;
15986  HAVE_FFSL=1;
15987  HAVE_FFSLL=1;
15988  HAVE_DECL_MEMMEM=1;
15989  HAVE_MEMPCPY=1;
15990  HAVE_DECL_MEMRCHR=1;
15991  HAVE_RAWMEMCHR=1;
15992  HAVE_STPCPY=1;
15993  HAVE_STPNCPY=1;
15994  HAVE_STRCHRNUL=1;
15995  HAVE_DECL_STRDUP=1;
15996  HAVE_DECL_STRNDUP=1;
15997  HAVE_DECL_STRNLEN=1;
15998  HAVE_STRPBRK=1;
15999  HAVE_STRSEP=1;
16000  HAVE_STRCASESTR=1;
16001  HAVE_DECL_STRTOK_R=1;
16002  HAVE_DECL_STRERROR_R=1;
16003  HAVE_STRERRORNAME_NP=1;
16004  HAVE_SIGABBREV_NP=1;
16005  HAVE_SIGDESCR_NP=1;
16006  HAVE_DECL_STRSIGNAL=1;
16007  HAVE_STRVERSCMP=1;
16008  REPLACE_FFSLL=0;
16009  REPLACE_MEMCHR=0;
16010  REPLACE_MEMMEM=0;
16011  REPLACE_STPNCPY=0;
16012  REPLACE_STRCHRNUL=0;
16013  REPLACE_STRDUP=0;
16014  REPLACE_STRNCAT=0;
16015  REPLACE_STRNDUP=0;
16016  REPLACE_STRNLEN=0;
16017  REPLACE_STRSTR=0;
16018  REPLACE_STRCASESTR=0;
16019  REPLACE_STRTOK_R=0;
16020  REPLACE_STRERROR=0;
16021  REPLACE_STRERROR_R=0;
16022  REPLACE_STRERRORNAME_NP=0;
16023  REPLACE_STRSIGNAL=0;
16024  UNDEFINE_STRTOK_R=0;
16025
16026
16027
16028
16029
16030
16031
16032
16033
16034
16035  # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
16036  # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
16037  # irrelevant for anonymous mappings.
16038  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
16039if test "x$ac_cv_func_mmap" = xyes; then :
16040  gl_have_mmap=yes
16041else
16042  gl_have_mmap=no
16043fi
16044
16045
16046  # Try to allow MAP_ANONYMOUS.
16047  gl_have_mmap_anonymous=no
16048  if test $gl_have_mmap = yes; then
16049    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
16050$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
16051    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16052/* end confdefs.h.  */
16053
16054#include <sys/mman.h>
16055#ifdef MAP_ANONYMOUS
16056    I cannot identify this map
16057#endif
16058
16059_ACEOF
16060if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16061  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
16062  gl_have_mmap_anonymous=yes
16063fi
16064rm -f conftest*
16065
16066    if test $gl_have_mmap_anonymous != yes; then
16067      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16068/* end confdefs.h.  */
16069
16070#include <sys/mman.h>
16071#ifdef MAP_ANON
16072    I cannot identify this map
16073#endif
16074
16075_ACEOF
16076if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16077  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
16078
16079$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
16080
16081         gl_have_mmap_anonymous=yes
16082fi
16083rm -f conftest*
16084
16085    fi
16086    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
16087$as_echo "$gl_have_mmap_anonymous" >&6; }
16088    if test $gl_have_mmap_anonymous = yes; then
16089
16090$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
16091
16092    fi
16093  fi
16094
16095
16096
16097
16098
16099  # Detect platform-specific bugs in some versions of glibc:
16100  # memchr should not dereference anything with length 0
16101  #   https://bugzilla.redhat.com/show_bug.cgi?id=499689
16102  # memchr should not dereference overestimated length after a match
16103  #   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
16104  #   https://sourceware.org/bugzilla/show_bug.cgi?id=10162
16105  # memchr should cast the second argument to 'unsigned char'.
16106  #   This bug exists in Android 4.3.
16107  # Assume that memchr works on platforms that lack mprotect.
16108  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
16109$as_echo_n "checking whether memchr works... " >&6; }
16110if ${gl_cv_func_memchr_works+:} false; then :
16111  $as_echo_n "(cached) " >&6
16112else
16113  if test "$cross_compiling" = yes; then :
16114  case "$host_os" in
16115                           # Guess no on Android.
16116          linux*-android*) gl_cv_func_memchr_works="guessing no" ;;
16117                           # Guess yes on native Windows.
16118          mingw*)          gl_cv_func_memchr_works="guessing yes" ;;
16119                           # If we don't know, obey --enable-cross-guesses.
16120          *)               gl_cv_func_memchr_works="$gl_cross_guess_normal" ;;
16121        esac
16122
16123else
16124  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16125/* end confdefs.h.  */
16126
16127#include <string.h>
16128#if HAVE_SYS_MMAN_H
16129# include <fcntl.h>
16130# include <unistd.h>
16131# include <sys/types.h>
16132# include <sys/mman.h>
16133# ifndef MAP_FILE
16134#  define MAP_FILE 0
16135# endif
16136#endif
16137
16138int
16139main ()
16140{
16141
16142  int result = 0;
16143  char *fence = NULL;
16144#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
16145# if HAVE_MAP_ANONYMOUS
16146  const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
16147  const int fd = -1;
16148# else /* !HAVE_MAP_ANONYMOUS */
16149  const int flags = MAP_FILE | MAP_PRIVATE;
16150  int fd = open ("/dev/zero", O_RDONLY, 0666);
16151  if (fd >= 0)
16152# endif
16153    {
16154      int pagesize = getpagesize ();
16155      char *two_pages =
16156        (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
16157                       flags, fd, 0);
16158      if (two_pages != (char *)(-1)
16159          && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
16160        fence = two_pages + pagesize;
16161    }
16162#endif
16163  if (fence)
16164    {
16165      /* Test against bugs on glibc systems.  */
16166      if (memchr (fence, 0, 0))
16167        result |= 1;
16168      strcpy (fence - 9, "12345678");
16169      if (memchr (fence - 9, 0, 79) != fence - 1)
16170        result |= 2;
16171      if (memchr (fence - 1, 0, 3) != fence - 1)
16172        result |= 4;
16173      /* Test against bug on AIX 7.2.  */
16174      if (memchr (fence - 4, '6', 16) != fence - 4)
16175        result |= 8;
16176    }
16177  /* Test against bug on Android 4.3.  */
16178  {
16179    char input[3];
16180    input[0] = 'a';
16181    input[1] = 'b';
16182    input[2] = 'c';
16183    if (memchr (input, 0x789abc00 | 'b', 3) != input + 1)
16184      result |= 16;
16185  }
16186  return result;
16187
16188  ;
16189  return 0;
16190}
16191_ACEOF
16192if ac_fn_c_try_run "$LINENO"; then :
16193  gl_cv_func_memchr_works=yes
16194else
16195  gl_cv_func_memchr_works=no
16196fi
16197rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16198  conftest.$ac_objext conftest.beam conftest.$ac_ext
16199fi
16200
16201
16202fi
16203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
16204$as_echo "$gl_cv_func_memchr_works" >&6; }
16205  case "$gl_cv_func_memchr_works" in
16206    *yes) ;;
16207    *) REPLACE_MEMCHR=1 ;;
16208  esac
16209
16210ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
16211if test "x$ac_cv_have_decl_memrchr" = xyes; then :
16212  ac_have_decl=1
16213else
16214  ac_have_decl=0
16215fi
16216
16217cat >>confdefs.h <<_ACEOF
16218#define HAVE_DECL_MEMRCHR $ac_have_decl
16219_ACEOF
16220
16221
16222
16223
16224
16225  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5
16226$as_echo_n "checking whether <limits.h> defines MIN and MAX... " >&6; }
16227if ${gl_cv_minmax_in_limits_h+:} false; then :
16228  $as_echo_n "(cached) " >&6
16229else
16230  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16231/* end confdefs.h.  */
16232#include <limits.h>
16233            int x = MIN (42, 17);
16234int
16235main ()
16236{
16237
16238  ;
16239  return 0;
16240}
16241_ACEOF
16242if ac_fn_c_try_compile "$LINENO"; then :
16243  gl_cv_minmax_in_limits_h=yes
16244else
16245  gl_cv_minmax_in_limits_h=no
16246fi
16247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16248fi
16249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5
16250$as_echo "$gl_cv_minmax_in_limits_h" >&6; }
16251  if test $gl_cv_minmax_in_limits_h = yes; then
16252
16253$as_echo "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h
16254
16255  fi
16256
16257
16258
16259
16260
16261
16262  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5
16263$as_echo_n "checking whether <sys/param.h> defines MIN and MAX... " >&6; }
16264if ${gl_cv_minmax_in_sys_param_h+:} false; then :
16265  $as_echo_n "(cached) " >&6
16266else
16267  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16268/* end confdefs.h.  */
16269#include <sys/param.h>
16270            int x = MIN (42, 17);
16271int
16272main ()
16273{
16274
16275  ;
16276  return 0;
16277}
16278_ACEOF
16279if ac_fn_c_try_compile "$LINENO"; then :
16280  gl_cv_minmax_in_sys_param_h=yes
16281else
16282  gl_cv_minmax_in_sys_param_h=no
16283fi
16284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16285fi
16286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5
16287$as_echo "$gl_cv_minmax_in_sys_param_h" >&6; }
16288  if test $gl_cv_minmax_in_sys_param_h = yes; then
16289
16290$as_echo "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
16291
16292  fi
16293
16294
16295
16296
16297
16298
16299
16300
16301
16302
16303
16304
16305
16306  GNULIB_CTIME=0;
16307  GNULIB_MKTIME=0;
16308  GNULIB_LOCALTIME=0;
16309  GNULIB_NANOSLEEP=0;
16310  GNULIB_STRFTIME=0;
16311  GNULIB_STRPTIME=0;
16312  GNULIB_TIMEGM=0;
16313  GNULIB_TIMESPEC_GET=0;
16314  GNULIB_TIME_R=0;
16315  GNULIB_TIME_RZ=0;
16316  GNULIB_TZSET=0;
16317    GNULIB_MDA_TZSET=1;
16318    HAVE_DECL_LOCALTIME_R=1;
16319  HAVE_NANOSLEEP=1;
16320  HAVE_STRPTIME=1;
16321  HAVE_TIMEGM=1;
16322  HAVE_TIMESPEC_GET=1;
16323    HAVE_TIMEZONE_T=0;
16324        REPLACE_CTIME=GNULIB_PORTCHECK;
16325  REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
16326  REPLACE_MKTIME=GNULIB_PORTCHECK;
16327  REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
16328  REPLACE_STRFTIME=GNULIB_PORTCHECK;
16329  REPLACE_TIMEGM=GNULIB_PORTCHECK;
16330  REPLACE_TZSET=GNULIB_PORTCHECK;
16331
16332      : ${GNULIB_GETTIMEOFDAY=0};
16333        REPLACE_GMTIME=0;
16334  REPLACE_LOCALTIME=0;
16335
16336
16337  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time_t is signed" >&5
16338$as_echo_n "checking whether time_t is signed... " >&6; }
16339if ${gl_cv_time_t_is_signed+:} false; then :
16340  $as_echo_n "(cached) " >&6
16341else
16342  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16343/* end confdefs.h.  */
16344#include <time.h>
16345                          char time_t_signed[(time_t) -1 < 0 ? 1 : -1];
16346int
16347main ()
16348{
16349
16350  ;
16351  return 0;
16352}
16353_ACEOF
16354if ac_fn_c_try_compile "$LINENO"; then :
16355  gl_cv_time_t_is_signed=yes
16356else
16357  gl_cv_time_t_is_signed=no
16358fi
16359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16360fi
16361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_t_is_signed" >&5
16362$as_echo "$gl_cv_time_t_is_signed" >&6; }
16363  if test $gl_cv_time_t_is_signed = yes; then
16364
16365$as_echo "#define TIME_T_IS_SIGNED 1" >>confdefs.h
16366
16367  fi
16368
16369ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
16370if test "x$ac_cv_have_decl_alarm" = xyes; then :
16371  ac_have_decl=1
16372else
16373  ac_have_decl=0
16374fi
16375
16376cat >>confdefs.h <<_ACEOF
16377#define HAVE_DECL_ALARM $ac_have_decl
16378_ACEOF
16379
16380
16381
16382
16383
16384
16385
16386  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
16387$as_echo_n "checking for working mktime... " >&6; }
16388if ${gl_cv_func_working_mktime+:} false; then :
16389  $as_echo_n "(cached) " >&6
16390else
16391  if test $APPLE_UNIVERSAL_BUILD = 1; then
16392       # A universal build on Apple Mac OS X platforms.
16393       # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
16394       # But we need a configuration result that is valid in both modes.
16395       gl_cv_func_working_mktime="guessing no"
16396     else
16397       if test "$cross_compiling" = yes; then :
16398  case "$host_os" in
16399                    # Guess no on native Windows.
16400            mingw*) gl_cv_func_working_mktime="guessing no" ;;
16401            *)      gl_cv_func_working_mktime="$gl_cross_guess_normal" ;;
16402          esac
16403
16404else
16405  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16406/* end confdefs.h.  */
16407/* Test program from Paul Eggert and Tony Leneis.  */
16408#include <limits.h>
16409#include <stdlib.h>
16410#include <time.h>
16411
16412#ifdef HAVE_UNISTD_H
16413# include <unistd.h>
16414#endif
16415
16416#if HAVE_DECL_ALARM
16417# include <signal.h>
16418#endif
16419
16420
16421
16422$gl_mda_defines
16423
16424
16425#ifndef TIME_T_IS_SIGNED
16426# define TIME_T_IS_SIGNED 0
16427#endif
16428
16429static time_t time_t_max;
16430static time_t time_t_min;
16431
16432/* Values we'll use to set the TZ environment variable.  */
16433static char *tz_strings[] = {
16434  (char *) 0, "TZ=GMT0", "TZ=JST-9",
16435  "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
16436};
16437#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
16438
16439/* Return 0 if mktime fails to convert a date in the spring-forward gap.
16440   Based on a problem report from Andreas Jaeger.  */
16441static int
16442spring_forward_gap ()
16443{
16444  /* glibc (up to about 1998-10-07) failed this test. */
16445  struct tm tm;
16446
16447  /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16448     instead of "TZ=America/Vancouver" in order to detect the bug even
16449     on systems that don't support the Olson extension, or don't have the
16450     full zoneinfo tables installed.  */
16451  putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16452
16453  tm.tm_year = 98;
16454  tm.tm_mon = 3;
16455  tm.tm_mday = 5;
16456  tm.tm_hour = 2;
16457  tm.tm_min = 0;
16458  tm.tm_sec = 0;
16459  tm.tm_isdst = -1;
16460  return mktime (&tm) != (time_t) -1;
16461}
16462
16463static int
16464mktime_test1 (time_t now)
16465{
16466  struct tm *lt;
16467  return ! (lt = localtime (&now)) || mktime (lt) == now;
16468}
16469
16470static int
16471mktime_test (time_t now)
16472{
16473  return (mktime_test1 (now)
16474          && mktime_test1 ((time_t) (time_t_max - now))
16475          && mktime_test1 ((time_t) (time_t_min + now)));
16476}
16477
16478static int
16479irix_6_4_bug ()
16480{
16481  /* Based on code from Ariel Faigon.  */
16482  struct tm tm;
16483  tm.tm_year = 96;
16484  tm.tm_mon = 3;
16485  tm.tm_mday = 0;
16486  tm.tm_hour = 0;
16487  tm.tm_min = 0;
16488  tm.tm_sec = 0;
16489  tm.tm_isdst = -1;
16490  mktime (&tm);
16491  return tm.tm_mon == 2 && tm.tm_mday == 31;
16492}
16493
16494static int
16495bigtime_test (int j)
16496{
16497  struct tm tm;
16498  time_t now;
16499  tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
16500  now = mktime (&tm);
16501  if (now != (time_t) -1)
16502    {
16503      struct tm *lt = localtime (&now);
16504      if (! (lt
16505             && lt->tm_year == tm.tm_year
16506             && lt->tm_mon == tm.tm_mon
16507             && lt->tm_mday == tm.tm_mday
16508             && lt->tm_hour == tm.tm_hour
16509             && lt->tm_min == tm.tm_min
16510             && lt->tm_sec == tm.tm_sec
16511             && lt->tm_yday == tm.tm_yday
16512             && lt->tm_wday == tm.tm_wday
16513             && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
16514                  == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
16515        return 0;
16516    }
16517  return 1;
16518}
16519
16520static int
16521year_2050_test ()
16522{
16523  /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
16524     ignoring leap seconds.  */
16525  unsigned long int answer = 2527315200UL;
16526
16527  struct tm tm;
16528  time_t t;
16529  tm.tm_year = 2050 - 1900;
16530  tm.tm_mon = 2 - 1;
16531  tm.tm_mday = 1;
16532  tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
16533  tm.tm_isdst = -1;
16534
16535  /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16536     instead of "TZ=America/Vancouver" in order to detect the bug even
16537     on systems that don't support the Olson extension, or don't have the
16538     full zoneinfo tables installed.  */
16539  putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16540
16541  t = mktime (&tm);
16542
16543  /* Check that the result is either a failure, or close enough
16544     to the correct answer that we can assume the discrepancy is
16545     due to leap seconds.  */
16546  return (t == (time_t) -1
16547          || (0 < t && answer - 120 <= t && t <= answer + 120));
16548}
16549
16550int
16551main ()
16552{
16553  int result = 0;
16554  time_t t, delta;
16555  int i, j;
16556  int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
16557
16558#if HAVE_DECL_ALARM
16559  /* This test makes some buggy mktime implementations loop.
16560     Give up after 60 seconds; a mktime slower than that
16561     isn't worth using anyway.  */
16562  signal (SIGALRM, SIG_DFL);
16563  alarm (60);
16564#endif
16565
16566  time_t_max = (! TIME_T_IS_SIGNED
16567                ? (time_t) -1
16568                : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
16569                   * 2 + 1));
16570  time_t_min = (! TIME_T_IS_SIGNED
16571                ? (time_t) 0
16572                : time_t_signed_magnitude
16573                ? ~ (time_t) 0
16574                : ~ time_t_max);
16575
16576  delta = time_t_max / 997; /* a suitable prime number */
16577  for (i = 0; i < N_STRINGS; i++)
16578    {
16579      if (tz_strings[i])
16580        putenv (tz_strings[i]);
16581
16582      for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
16583        if (! mktime_test (t))
16584          result |= 1;
16585      if ((result & 2) == 0
16586          && ! (mktime_test ((time_t) 1)
16587                && mktime_test ((time_t) (60 * 60))
16588                && mktime_test ((time_t) (60 * 60 * 24))))
16589        result |= 2;
16590
16591      for (j = 1; (result & 4) == 0; j <<= 1)
16592        {
16593          if (! bigtime_test (j))
16594            result |= 4;
16595          if (INT_MAX / 2 < j)
16596            break;
16597        }
16598      if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
16599        result |= 8;
16600    }
16601  if (! irix_6_4_bug ())
16602    result |= 16;
16603  if (! spring_forward_gap ())
16604    result |= 32;
16605  if (! year_2050_test ())
16606    result |= 64;
16607  return result;
16608}
16609_ACEOF
16610if ac_fn_c_try_run "$LINENO"; then :
16611  gl_cv_func_working_mktime=yes
16612else
16613  gl_cv_func_working_mktime=no
16614fi
16615rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16616  conftest.$ac_objext conftest.beam conftest.$ac_ext
16617fi
16618
16619     fi
16620
16621fi
16622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
16623$as_echo "$gl_cv_func_working_mktime" >&6; }
16624
16625
16626
16627
16628
16629
16630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
16631$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
16632if ${ac_cv_struct_tm+:} false; then :
16633  $as_echo_n "(cached) " >&6
16634else
16635  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16636/* end confdefs.h.  */
16637#include <sys/types.h>
16638#include <time.h>
16639
16640int
16641main ()
16642{
16643struct tm tm;
16644				     int *p = &tm.tm_sec;
16645				     return !p;
16646  ;
16647  return 0;
16648}
16649_ACEOF
16650if ac_fn_c_try_compile "$LINENO"; then :
16651  ac_cv_struct_tm=time.h
16652else
16653  ac_cv_struct_tm=sys/time.h
16654fi
16655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16656fi
16657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
16658$as_echo "$ac_cv_struct_tm" >&6; }
16659if test $ac_cv_struct_tm = sys/time.h; then
16660
16661$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
16662
16663fi
16664
16665ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
16666#include <$ac_cv_struct_tm>
16667
16668"
16669if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
16670
16671cat >>confdefs.h <<_ACEOF
16672#define HAVE_STRUCT_TM_TM_ZONE 1
16673_ACEOF
16674
16675
16676fi
16677
16678if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
16679
16680$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
16681
16682else
16683  ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
16684"
16685if test "x$ac_cv_have_decl_tzname" = xyes; then :
16686  ac_have_decl=1
16687else
16688  ac_have_decl=0
16689fi
16690
16691cat >>confdefs.h <<_ACEOF
16692#define HAVE_DECL_TZNAME $ac_have_decl
16693_ACEOF
16694
16695  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
16696$as_echo_n "checking for tzname... " >&6; }
16697if ${ac_cv_var_tzname+:} false; then :
16698  $as_echo_n "(cached) " >&6
16699else
16700  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16701/* end confdefs.h.  */
16702#include <time.h>
16703#if !HAVE_DECL_TZNAME
16704extern char *tzname[];
16705#endif
16706
16707int
16708main ()
16709{
16710return tzname[0][0];
16711  ;
16712  return 0;
16713}
16714_ACEOF
16715if ac_fn_c_try_link "$LINENO"; then :
16716  ac_cv_var_tzname=yes
16717else
16718  ac_cv_var_tzname=no
16719fi
16720rm -f core conftest.err conftest.$ac_objext \
16721    conftest$ac_exeext conftest.$ac_ext
16722fi
16723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
16724$as_echo "$ac_cv_var_tzname" >&6; }
16725  if test $ac_cv_var_tzname = yes; then
16726
16727$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
16728
16729  fi
16730fi
16731
16732
16733 ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
16734"
16735if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes; then :
16736
16737$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
16738
16739fi
16740
16741
16742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
16743$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
16744if ${ac_cv_header_stdbool_h+:} false; then :
16745  $as_echo_n "(cached) " >&6
16746else
16747  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16748/* end confdefs.h.  */
16749
16750             #include <stdbool.h>
16751
16752             #ifdef __cplusplus
16753              typedef bool Bool;
16754             #else
16755              typedef _Bool Bool;
16756              #ifndef bool
16757               "error: bool is not defined"
16758              #endif
16759              #ifndef false
16760               "error: false is not defined"
16761              #endif
16762              #if false
16763               "error: false is not 0"
16764              #endif
16765              #ifndef true
16766               "error: true is not defined"
16767              #endif
16768              #if true != 1
16769               "error: true is not 1"
16770              #endif
16771             #endif
16772
16773             #ifndef __bool_true_false_are_defined
16774              "error: __bool_true_false_are_defined is not defined"
16775             #endif
16776
16777             struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
16778
16779             char a[true == 1 ? 1 : -1];
16780             char b[false == 0 ? 1 : -1];
16781             char c[__bool_true_false_are_defined == 1 ? 1 : -1];
16782             char d[(bool) 0.5 == true ? 1 : -1];
16783             /* See body of main program for 'e'.  */
16784             char f[(Bool) 0.0 == false ? 1 : -1];
16785             char g[true];
16786             char h[sizeof (Bool)];
16787             char i[sizeof s.t];
16788             enum { j = false, k = true, l = false * true, m = true * 256 };
16789             /* The following fails for
16790                HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
16791             Bool n[m];
16792             char o[sizeof n == m * sizeof n[0] ? 1 : -1];
16793             char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
16794             /* Catch a bug in an HP-UX C compiler.  See
16795                https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
16796                https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
16797              */
16798             Bool q = true;
16799             Bool *pq = &q;
16800             bool *qq = &q;
16801
16802int
16803main ()
16804{
16805
16806             bool e = &s;
16807             *pq |= q; *pq |= ! q;
16808             *qq |= q; *qq |= ! q;
16809             /* Refer to every declared value, to avoid compiler optimizations.  */
16810             return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
16811                     + !m + !n + !o + !p + !q + !pq + !qq);
16812
16813  ;
16814  return 0;
16815}
16816_ACEOF
16817if ac_fn_c_try_compile "$LINENO"; then :
16818  ac_cv_header_stdbool_h=yes
16819else
16820  ac_cv_header_stdbool_h=no
16821fi
16822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16823fi
16824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
16825$as_echo "$ac_cv_header_stdbool_h" >&6; }
16826   ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
16827if test "x$ac_cv_type__Bool" = xyes; then :
16828
16829cat >>confdefs.h <<_ACEOF
16830#define HAVE__BOOL 1
16831_ACEOF
16832
16833
16834fi
16835
16836
16837
16838
16839
16840
16841          if test "$ac_cv_header_stdbool_h" = yes; then
16842    case "$host_os" in
16843      solaris*)
16844        if test -z "$GCC"; then
16845          STDBOOL_H='stdbool.h'
16846        else
16847          STDBOOL_H=''
16848        fi
16849        ;;
16850      *)
16851        STDBOOL_H=''
16852        ;;
16853    esac
16854  else
16855    STDBOOL_H='stdbool.h'
16856  fi
16857
16858   if test -n "$STDBOOL_H"; then
16859  GL_GENERATE_STDBOOL_H_TRUE=
16860  GL_GENERATE_STDBOOL_H_FALSE='#'
16861else
16862  GL_GENERATE_STDBOOL_H_TRUE='#'
16863  GL_GENERATE_STDBOOL_H_FALSE=
16864fi
16865
16866
16867  if test "$ac_cv_type__Bool" = yes; then
16868    HAVE__BOOL=1
16869  else
16870    HAVE__BOOL=0
16871  fi
16872
16873
16874
16875  : ${YACC='bison -o y.tab.c'}
16876
16877
16878  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compound literals" >&5
16879$as_echo_n "checking for compound literals... " >&6; }
16880if ${gl_cv_compound_literals+:} false; then :
16881  $as_echo_n "(cached) " >&6
16882else
16883  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16884/* end confdefs.h.  */
16885struct s { int i, j; };
16886int
16887main ()
16888{
16889struct s t = (struct s) { 3, 4 };
16890            if (t.i != 0) return 0;
16891  ;
16892  return 0;
16893}
16894
16895_ACEOF
16896if ac_fn_c_try_compile "$LINENO"; then :
16897  gl_cv_compound_literals=yes
16898else
16899  gl_cv_compound_literals=no
16900fi
16901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16902
16903fi
16904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compound_literals" >&5
16905$as_echo "$gl_cv_compound_literals" >&6; }
16906  if test $gl_cv_compound_literals = yes; then
16907
16908$as_echo "#define HAVE_COMPOUND_LITERALS 1" >>confdefs.h
16909
16910  fi
16911
16912
16913
16914
16915
16916
16917  GNULIB_PTHREAD_SIGMASK=0;
16918  GNULIB_RAISE=0;
16919  GNULIB_SIGNAL_H_SIGPIPE=0;
16920  GNULIB_SIGPROCMASK=0;
16921  GNULIB_SIGACTION=0;
16922    HAVE_POSIX_SIGNALBLOCKING=1;
16923  HAVE_PTHREAD_SIGMASK=1;
16924  HAVE_RAISE=1;
16925  HAVE_SIGSET_T=1;
16926  HAVE_SIGINFO_T=1;
16927  HAVE_SIGACTION=1;
16928  HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
16929
16930  HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
16931
16932  HAVE_SIGHANDLER_T=1;
16933  REPLACE_PTHREAD_SIGMASK=0;
16934  REPLACE_RAISE=0;
16935
16936
16937
16938
16939
16940
16941
16942
16943
16944
16945
16946
16947
16948
16949# Check whether --with-selinux was given.
16950if test "${with_selinux+set}" = set; then :
16951  withval=$with_selinux;
16952else
16953  with_selinux=maybe
16954fi
16955
16956
16957  LIB_SELINUX=
16958  if test "$with_selinux" != no; then
16959    gl_save_LIBS=$LIBS
16960    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setfilecon" >&5
16961$as_echo_n "checking for library containing setfilecon... " >&6; }
16962if ${ac_cv_search_setfilecon+:} false; then :
16963  $as_echo_n "(cached) " >&6
16964else
16965  ac_func_search_save_LIBS=$LIBS
16966cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16967/* end confdefs.h.  */
16968
16969/* Override any GCC internal prototype to avoid an error.
16970   Use char because int might match the return type of a GCC
16971   builtin and then its argument prototype would still apply.  */
16972#ifdef __cplusplus
16973extern "C"
16974#endif
16975char setfilecon ();
16976int
16977main ()
16978{
16979return setfilecon ();
16980  ;
16981  return 0;
16982}
16983_ACEOF
16984for ac_lib in '' selinux; do
16985  if test -z "$ac_lib"; then
16986    ac_res="none required"
16987  else
16988    ac_res=-l$ac_lib
16989    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16990  fi
16991  if ac_fn_c_try_link "$LINENO"; then :
16992  ac_cv_search_setfilecon=$ac_res
16993fi
16994rm -f core conftest.err conftest.$ac_objext \
16995    conftest$ac_exeext
16996  if ${ac_cv_search_setfilecon+:} false; then :
16997  break
16998fi
16999done
17000if ${ac_cv_search_setfilecon+:} false; then :
17001
17002else
17003  ac_cv_search_setfilecon=no
17004fi
17005rm conftest.$ac_ext
17006LIBS=$ac_func_search_save_LIBS
17007fi
17008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setfilecon" >&5
17009$as_echo "$ac_cv_search_setfilecon" >&6; }
17010ac_res=$ac_cv_search_setfilecon
17011if test "$ac_res" != no; then :
17012  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17013  test "$ac_cv_search_setfilecon" = "none required" ||
17014                    LIB_SELINUX=$ac_cv_search_setfilecon
17015fi
17016
17017    LIBS=$gl_save_LIBS
17018  fi
17019
17020
17021  # Warn if SELinux is found but libselinux is absent;
17022  if test "$ac_cv_search_setfilecon" = no; then
17023    if test "$host" = "$build" && test -d /selinux; then
17024      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This system supports SELinux but libselinux is missing." >&5
17025$as_echo "$as_me: WARNING: This system supports SELinux but libselinux is missing." >&2;}
17026      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU tar will be compiled without SELinux support." >&5
17027$as_echo "$as_me: WARNING: GNU tar will be compiled without SELinux support." >&2;}
17028    fi
17029    with_selinux=no
17030  fi
17031
17032
17033
17034ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
17035if test "x$ac_cv_have_decl_setenv" = xyes; then :
17036  ac_have_decl=1
17037else
17038  ac_have_decl=0
17039fi
17040
17041cat >>confdefs.h <<_ACEOF
17042#define HAVE_DECL_SETENV $ac_have_decl
17043_ACEOF
17044
17045
17046
17047
17048
17049
17050  if test $ac_cv_have_decl_setenv = no; then
17051    HAVE_DECL_SETENV=0
17052  fi
17053
17054
17055
17056
17057
17058  for ac_header in search.h
17059do :
17060  ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
17061if test "x$ac_cv_header_search_h" = xyes; then :
17062  cat >>confdefs.h <<_ACEOF
17063#define HAVE_SEARCH_H 1
17064_ACEOF
17065
17066fi
17067
17068done
17069
17070  for ac_func in tsearch
17071do :
17072  ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
17073if test "x$ac_cv_func_tsearch" = xyes; then :
17074  cat >>confdefs.h <<_ACEOF
17075#define HAVE_TSEARCH 1
17076_ACEOF
17077
17078fi
17079done
17080
17081
17082
17083
17084  ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
17085      #include <signal.h>
17086      /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
17087      #include <sys/types.h>
17088
17089"
17090if test "x$ac_cv_type_sigset_t" = xyes; then :
17091
17092cat >>confdefs.h <<_ACEOF
17093#define HAVE_SIGSET_T 1
17094_ACEOF
17095
17096gl_cv_type_sigset_t=yes
17097else
17098  gl_cv_type_sigset_t=no
17099fi
17100
17101  if test $gl_cv_type_sigset_t != yes; then
17102    HAVE_SIGSET_T=0
17103  fi
17104
17105
17106
17107
17108
17109
17110
17111
17112
17113
17114
17115  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
17116$as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; }
17117if ${gl_cv_func_snprintf_retval_c99+:} false; then :
17118  $as_echo_n "(cached) " >&6
17119else
17120
17121      if test "$cross_compiling" = yes; then :
17122  case "$host_os" in
17123                                 # Guess yes on glibc systems.
17124           *-gnu* | gnu*)        gl_cv_func_snprintf_retval_c99="guessing yes";;
17125                                 # Guess yes on musl systems.
17126           *-musl*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
17127                                 # Guess yes on FreeBSD >= 5.
17128           freebsd[1-4].*)       gl_cv_func_snprintf_retval_c99="guessing no";;
17129           freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
17130                                 # Guess yes on Mac OS X >= 10.3.
17131           darwin[1-6].*)        gl_cv_func_snprintf_retval_c99="guessing no";;
17132           darwin*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
17133                                 # Guess yes on OpenBSD >= 3.9.
17134           openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
17135                                 gl_cv_func_snprintf_retval_c99="guessing no";;
17136           openbsd*)             gl_cv_func_snprintf_retval_c99="guessing yes";;
17137                                 # Guess yes on Solaris >= 2.10.
17138           solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
17139           solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
17140                                 # Guess yes on AIX >= 4.
17141           aix[1-3]*)            gl_cv_func_snprintf_retval_c99="guessing no";;
17142           aix*)                 gl_cv_func_snprintf_retval_c99="guessing yes";;
17143                                 # Guess yes on NetBSD >= 3.
17144           netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
17145                                 gl_cv_func_snprintf_retval_c99="guessing no";;
17146           netbsd*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
17147                                 # Guess yes on BeOS.
17148           beos*)                gl_cv_func_snprintf_retval_c99="guessing yes";;
17149                                 # Guess yes on Android.
17150           linux*-android*)      gl_cv_func_snprintf_retval_c99="guessing yes";;
17151                                 # Guess yes on MSVC, no on mingw.
17152           mingw*)               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17153/* end confdefs.h.  */
17154
17155#ifdef _MSC_VER
17156 Known
17157#endif
17158
17159_ACEOF
17160if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17161  $EGREP "Known" >/dev/null 2>&1; then :
17162  gl_cv_func_snprintf_retval_c99="guessing yes"
17163else
17164  gl_cv_func_snprintf_retval_c99="guessing no"
17165fi
17166rm -f conftest*
17167
17168                                 ;;
17169                                 # If we don't know, obey --enable-cross-guesses.
17170           *)                    gl_cv_func_snprintf_retval_c99="$gl_cross_guess_normal";;
17171         esac
17172
17173else
17174  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17175/* end confdefs.h.  */
17176
17177#include <stdio.h>
17178#include <string.h>
17179#if HAVE_SNPRINTF
17180# define my_snprintf snprintf
17181#else
17182# include <stdarg.h>
17183static int my_snprintf (char *buf, int size, const char *format, ...)
17184{
17185  va_list args;
17186  int ret;
17187  va_start (args, format);
17188  ret = vsnprintf (buf, size, format, args);
17189  va_end (args);
17190  return ret;
17191}
17192#endif
17193static char buf[100];
17194int main ()
17195{
17196  strcpy (buf, "ABCDEF");
17197  if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
17198    return 1;
17199  if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
17200    return 2;
17201  if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
17202    return 3;
17203  return 0;
17204}
17205_ACEOF
17206if ac_fn_c_try_run "$LINENO"; then :
17207  gl_cv_func_snprintf_retval_c99=yes
17208else
17209  gl_cv_func_snprintf_retval_c99=no
17210fi
17211rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17212  conftest.$ac_objext conftest.beam conftest.$ac_ext
17213fi
17214
17215
17216fi
17217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
17218$as_echo "$gl_cv_func_snprintf_retval_c99" >&6; }
17219
17220ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
17221if test "x$ac_cv_have_decl_snprintf" = xyes; then :
17222  ac_have_decl=1
17223else
17224  ac_have_decl=0
17225fi
17226
17227cat >>confdefs.h <<_ACEOF
17228#define HAVE_DECL_SNPRINTF $ac_have_decl
17229_ACEOF
17230
17231ac_fn_c_check_decl "$LINENO" "fcloseall" "ac_cv_have_decl_fcloseall" "$ac_includes_default"
17232if test "x$ac_cv_have_decl_fcloseall" = xyes; then :
17233  ac_have_decl=1
17234else
17235  ac_have_decl=0
17236fi
17237
17238cat >>confdefs.h <<_ACEOF
17239#define HAVE_DECL_FCLOSEALL $ac_have_decl
17240_ACEOF
17241
17242ac_fn_c_check_decl "$LINENO" "ecvt" "ac_cv_have_decl_ecvt" "$ac_includes_default"
17243if test "x$ac_cv_have_decl_ecvt" = xyes; then :
17244  ac_have_decl=1
17245else
17246  ac_have_decl=0
17247fi
17248
17249cat >>confdefs.h <<_ACEOF
17250#define HAVE_DECL_ECVT $ac_have_decl
17251_ACEOF
17252
17253ac_fn_c_check_decl "$LINENO" "fcvt" "ac_cv_have_decl_fcvt" "$ac_includes_default"
17254if test "x$ac_cv_have_decl_fcvt" = xyes; then :
17255  ac_have_decl=1
17256else
17257  ac_have_decl=0
17258fi
17259
17260cat >>confdefs.h <<_ACEOF
17261#define HAVE_DECL_FCVT $ac_have_decl
17262_ACEOF
17263
17264ac_fn_c_check_decl "$LINENO" "gcvt" "ac_cv_have_decl_gcvt" "$ac_includes_default"
17265if test "x$ac_cv_have_decl_gcvt" = xyes; then :
17266  ac_have_decl=1
17267else
17268  ac_have_decl=0
17269fi
17270
17271cat >>confdefs.h <<_ACEOF
17272#define HAVE_DECL_GCVT $ac_have_decl
17273_ACEOF
17274
17275
17276  GNULIB_FFS=0;
17277    HAVE_FFS=1;
17278  HAVE_STRCASECMP=1;
17279  HAVE_DECL_STRNCASECMP=1;
17280
17281ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
17282if test "x$ac_cv_have_decl_strdup" = xyes; then :
17283  ac_have_decl=1
17284else
17285  ac_have_decl=0
17286fi
17287
17288cat >>confdefs.h <<_ACEOF
17289#define HAVE_DECL_STRDUP $ac_have_decl
17290_ACEOF
17291
17292
17293     REPLACE_STRERROR_0=0
17294  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
17295$as_echo_n "checking whether strerror(0) succeeds... " >&6; }
17296if ${gl_cv_func_strerror_0_works+:} false; then :
17297  $as_echo_n "(cached) " >&6
17298else
17299  if test "$cross_compiling" = yes; then :
17300  case "$host_os" in
17301                        # Guess yes on glibc systems.
17302         *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
17303                        # Guess yes on musl systems.
17304         *-musl*)       gl_cv_func_strerror_0_works="guessing yes" ;;
17305                        # Guess yes on native Windows.
17306         mingw*)        gl_cv_func_strerror_0_works="guessing yes" ;;
17307                        # If we don't know, obey --enable-cross-guesses.
17308         *)             gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;;
17309       esac
17310
17311else
17312  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17313/* end confdefs.h.  */
17314#include <string.h>
17315           #include <errno.h>
17316
17317int
17318main ()
17319{
17320int result = 0;
17321           char *str;
17322           errno = 0;
17323           str = strerror (0);
17324           if (!*str) result |= 1;
17325           if (errno) result |= 2;
17326           if (strstr (str, "nknown") || strstr (str, "ndefined"))
17327             result |= 4;
17328           return result;
17329  ;
17330  return 0;
17331}
17332_ACEOF
17333if ac_fn_c_try_run "$LINENO"; then :
17334  gl_cv_func_strerror_0_works=yes
17335else
17336  gl_cv_func_strerror_0_works=no
17337fi
17338rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17339  conftest.$ac_objext conftest.beam conftest.$ac_ext
17340fi
17341
17342
17343fi
17344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
17345$as_echo "$gl_cv_func_strerror_0_works" >&6; }
17346  case "$gl_cv_func_strerror_0_works" in
17347    *yes) ;;
17348    *)
17349      REPLACE_STRERROR_0=1
17350
17351$as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
17352
17353      ;;
17354  esac
17355
17356
17357
17358
17359
17360
17361
17362
17363
17364
17365
17366     if test $gl_cv_have_include_next = yes; then
17367       gl_cv_next_string_h='<'string.h'>'
17368     else
17369       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
17370$as_echo_n "checking absolute name of <string.h>... " >&6; }
17371if ${gl_cv_next_string_h+:} false; then :
17372  $as_echo_n "(cached) " >&6
17373else
17374
17375
17376
17377  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17378/* end confdefs.h.  */
17379#include <string.h>
17380_ACEOF
17381                case "$host_os" in
17382    aix*) gl_absname_cpp="$ac_cpp -C" ;;
17383    *)    gl_absname_cpp="$ac_cpp" ;;
17384  esac
17385
17386  case "$host_os" in
17387    mingw*)
17388                                          gl_dirsep_regex='[/\\]'
17389      ;;
17390    *)
17391      gl_dirsep_regex='\/'
17392      ;;
17393  esac
17394      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17395  gl_header_literal_regex=`echo 'string.h' \
17396                           | sed -e "$gl_make_literal_regex_sed"`
17397  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17398      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17399      s|^/[^/]|//&|
17400      p
17401      q
17402    }'
17403
17404        gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17405  sed -n "$gl_absolute_header_sed"`
17406
17407           gl_header=$gl_cv_absolute_string_h
17408           gl_cv_next_string_h='"'$gl_header'"'
17409
17410
17411fi
17412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
17413$as_echo "$gl_cv_next_string_h" >&6; }
17414     fi
17415     NEXT_STRING_H=$gl_cv_next_string_h
17416
17417     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17418       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17419       gl_next_as_first_directive='<'string.h'>'
17420     else
17421       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17422       gl_next_as_first_directive=$gl_cv_next_string_h
17423     fi
17424     NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
17425
17426
17427
17428
17429
17430
17431
17432
17433
17434
17435
17436
17437
17438
17439
17440
17441
17442
17443
17444
17445
17446
17447
17448
17449
17450     if test $gl_cv_have_include_next = yes; then
17451       gl_cv_next_strings_h='<'strings.h'>'
17452     else
17453       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
17454$as_echo_n "checking absolute name of <strings.h>... " >&6; }
17455if ${gl_cv_next_strings_h+:} false; then :
17456  $as_echo_n "(cached) " >&6
17457else
17458
17459             if test $ac_cv_header_strings_h = yes; then
17460
17461
17462
17463
17464  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17465/* end confdefs.h.  */
17466#include <strings.h>
17467_ACEOF
17468                case "$host_os" in
17469    aix*) gl_absname_cpp="$ac_cpp -C" ;;
17470    *)    gl_absname_cpp="$ac_cpp" ;;
17471  esac
17472
17473  case "$host_os" in
17474    mingw*)
17475                                          gl_dirsep_regex='[/\\]'
17476      ;;
17477    *)
17478      gl_dirsep_regex='\/'
17479      ;;
17480  esac
17481      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17482  gl_header_literal_regex=`echo 'strings.h' \
17483                           | sed -e "$gl_make_literal_regex_sed"`
17484  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17485      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17486      s|^/[^/]|//&|
17487      p
17488      q
17489    }'
17490
17491        gl_cv_absolute_strings_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17492  sed -n "$gl_absolute_header_sed"`
17493
17494           gl_header=$gl_cv_absolute_strings_h
17495           gl_cv_next_strings_h='"'$gl_header'"'
17496          else
17497               gl_cv_next_strings_h='<'strings.h'>'
17498             fi
17499
17500
17501fi
17502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
17503$as_echo "$gl_cv_next_strings_h" >&6; }
17504     fi
17505     NEXT_STRINGS_H=$gl_cv_next_strings_h
17506
17507     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17508       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17509       gl_next_as_first_directive='<'strings.h'>'
17510     else
17511       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17512       gl_next_as_first_directive=$gl_cv_next_strings_h
17513     fi
17514     NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
17515
17516
17517
17518
17519  if test $ac_cv_header_strings_h = yes; then
17520    HAVE_STRINGS_H=1
17521  else
17522    HAVE_STRINGS_H=0
17523  fi
17524
17525
17526
17527
17528
17529
17530ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default"
17531if test "x$ac_cv_have_decl_strndup" = xyes; then :
17532  ac_have_decl=1
17533else
17534  ac_have_decl=0
17535fi
17536
17537cat >>confdefs.h <<_ACEOF
17538#define HAVE_DECL_STRNDUP $ac_have_decl
17539_ACEOF
17540
17541
17542
17543ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
17544if test "x$ac_cv_have_decl_strnlen" = xyes; then :
17545  ac_have_decl=1
17546else
17547  ac_have_decl=0
17548fi
17549
17550cat >>confdefs.h <<_ACEOF
17551#define HAVE_DECL_STRNLEN $ac_have_decl
17552_ACEOF
17553
17554
17555
17556ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default"
17557if test "x$ac_cv_have_decl_strtoimax" = xyes; then :
17558  ac_have_decl=1
17559else
17560  ac_have_decl=0
17561fi
17562
17563cat >>confdefs.h <<_ACEOF
17564#define HAVE_DECL_STRTOIMAX $ac_have_decl
17565_ACEOF
17566
17567
17568
17569ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
17570if test "x$ac_cv_have_decl_strtoumax" = xyes; then :
17571  ac_have_decl=1
17572else
17573  ac_have_decl=0
17574fi
17575
17576cat >>confdefs.h <<_ACEOF
17577#define HAVE_DECL_STRTOUMAX $ac_have_decl
17578_ACEOF
17579
17580
17581
17582
17583
17584
17585
17586
17587
17588  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
17589$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
17590if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
17591  $as_echo_n "(cached) " >&6
17592else
17593  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17594/* end confdefs.h.  */
17595#include <time.h>
17596
17597int
17598main ()
17599{
17600static struct timespec x; x.tv_sec = x.tv_nsec;
17601  ;
17602  return 0;
17603}
17604_ACEOF
17605if ac_fn_c_try_compile "$LINENO"; then :
17606  gl_cv_sys_struct_timespec_in_time_h=yes
17607else
17608  gl_cv_sys_struct_timespec_in_time_h=no
17609fi
17610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17611fi
17612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
17613$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
17614
17615  TIME_H_DEFINES_STRUCT_TIMESPEC=0
17616  SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
17617  PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
17618  UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
17619  if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
17620    TIME_H_DEFINES_STRUCT_TIMESPEC=1
17621  else
17622    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
17623$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
17624if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
17625  $as_echo_n "(cached) " >&6
17626else
17627  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17628/* end confdefs.h.  */
17629#include <sys/time.h>
17630
17631int
17632main ()
17633{
17634static struct timespec x; x.tv_sec = x.tv_nsec;
17635  ;
17636  return 0;
17637}
17638_ACEOF
17639if ac_fn_c_try_compile "$LINENO"; then :
17640  gl_cv_sys_struct_timespec_in_sys_time_h=yes
17641else
17642  gl_cv_sys_struct_timespec_in_sys_time_h=no
17643fi
17644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17645fi
17646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
17647$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
17648    if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
17649      SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
17650    else
17651      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
17652$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
17653if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
17654  $as_echo_n "(cached) " >&6
17655else
17656  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17657/* end confdefs.h.  */
17658#include <pthread.h>
17659
17660int
17661main ()
17662{
17663static struct timespec x; x.tv_sec = x.tv_nsec;
17664  ;
17665  return 0;
17666}
17667_ACEOF
17668if ac_fn_c_try_compile "$LINENO"; then :
17669  gl_cv_sys_struct_timespec_in_pthread_h=yes
17670else
17671  gl_cv_sys_struct_timespec_in_pthread_h=no
17672fi
17673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17674fi
17675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
17676$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
17677      if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
17678        PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
17679      else
17680        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
17681$as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
17682if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then :
17683  $as_echo_n "(cached) " >&6
17684else
17685  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17686/* end confdefs.h.  */
17687#include <unistd.h>
17688
17689int
17690main ()
17691{
17692static struct timespec x; x.tv_sec = x.tv_nsec;
17693  ;
17694  return 0;
17695}
17696_ACEOF
17697if ac_fn_c_try_compile "$LINENO"; then :
17698  gl_cv_sys_struct_timespec_in_unistd_h=yes
17699else
17700  gl_cv_sys_struct_timespec_in_unistd_h=no
17701fi
17702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17703fi
17704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
17705$as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
17706        if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
17707          UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
17708        fi
17709      fi
17710    fi
17711  fi
17712
17713
17714
17715
17716
17717
17718
17719
17720
17721
17722
17723
17724
17725
17726
17727
17728     if test $gl_cv_have_include_next = yes; then
17729       gl_cv_next_time_h='<'time.h'>'
17730     else
17731       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
17732$as_echo_n "checking absolute name of <time.h>... " >&6; }
17733if ${gl_cv_next_time_h+:} false; then :
17734  $as_echo_n "(cached) " >&6
17735else
17736
17737
17738
17739  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17740/* end confdefs.h.  */
17741#include <time.h>
17742_ACEOF
17743                case "$host_os" in
17744    aix*) gl_absname_cpp="$ac_cpp -C" ;;
17745    *)    gl_absname_cpp="$ac_cpp" ;;
17746  esac
17747
17748  case "$host_os" in
17749    mingw*)
17750                                          gl_dirsep_regex='[/\\]'
17751      ;;
17752    *)
17753      gl_dirsep_regex='\/'
17754      ;;
17755  esac
17756      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17757  gl_header_literal_regex=`echo 'time.h' \
17758                           | sed -e "$gl_make_literal_regex_sed"`
17759  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17760      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17761      s|^/[^/]|//&|
17762      p
17763      q
17764    }'
17765
17766        gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17767  sed -n "$gl_absolute_header_sed"`
17768
17769           gl_header=$gl_cv_absolute_time_h
17770           gl_cv_next_time_h='"'$gl_header'"'
17771
17772
17773fi
17774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
17775$as_echo "$gl_cv_next_time_h" >&6; }
17776     fi
17777     NEXT_TIME_H=$gl_cv_next_time_h
17778
17779     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17780       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17781       gl_next_as_first_directive='<'time.h'>'
17782     else
17783       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17784       gl_next_as_first_directive=$gl_cv_next_time_h
17785     fi
17786     NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
17787
17788
17789
17790
17791
17792
17793
17794
17795  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME_UTC in <time.h>" >&5
17796$as_echo_n "checking for TIME_UTC in <time.h>... " >&6; }
17797if ${gl_cv_time_h_has_TIME_UTC+:} false; then :
17798  $as_echo_n "(cached) " >&6
17799else
17800  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17801/* end confdefs.h.  */
17802#include <time.h>
17803
17804int
17805main ()
17806{
17807static int x = TIME_UTC; x++;
17808  ;
17809  return 0;
17810}
17811_ACEOF
17812if ac_fn_c_try_compile "$LINENO"; then :
17813  gl_cv_time_h_has_TIME_UTC=yes
17814else
17815  gl_cv_time_h_has_TIME_UTC=no
17816fi
17817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17818fi
17819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_h_has_TIME_UTC" >&5
17820$as_echo "$gl_cv_time_h_has_TIME_UTC" >&6; }
17821  if test $gl_cv_time_h_has_TIME_UTC = yes; then
17822    TIME_H_DEFINES_TIME_UTC=1
17823  else
17824    TIME_H_DEFINES_TIME_UTC=0
17825  fi
17826
17827
17828
17829
17830
17831
17832ac_fn_c_check_decl "$LINENO" "execvpe" "ac_cv_have_decl_execvpe" "$ac_includes_default"
17833if test "x$ac_cv_have_decl_execvpe" = xyes; then :
17834  ac_have_decl=1
17835else
17836  ac_have_decl=0
17837fi
17838
17839cat >>confdefs.h <<_ACEOF
17840#define HAVE_DECL_EXECVPE $ac_have_decl
17841_ACEOF
17842
17843
17844
17845
17846
17847
17848
17849gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;}
17850i\
178510
17852q
17853'
17854gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;}
17855i\
178560
17857q
17858'
17859gl_libunistring_sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;}
17860i\
178610
17862q
17863'
17864
17865
17866  if test "$HAVE_LIBUNISTRING" = yes; then
17867    LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"`
17868    LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"`
17869    LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"`
17870  fi
17871
17872
17873
17874ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
17875if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
17876  ac_have_decl=1
17877else
17878  ac_have_decl=0
17879fi
17880
17881cat >>confdefs.h <<_ACEOF
17882#define HAVE_DECL_UNSETENV $ac_have_decl
17883_ACEOF
17884
17885
17886  GNULIB_UTIME=0;
17887    GNULIB_MDA_UTIME=1;
17888    HAVE_UTIME=1;
17889  REPLACE_UTIME=0;
17890
17891
17892
17893
17894     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
17895$as_echo_n "checking whether the utimes function works... " >&6; }
17896if ${gl_cv_func_working_utimes+:} false; then :
17897  $as_echo_n "(cached) " >&6
17898else
17899  if test "$cross_compiling" = yes; then :
17900  case "$host_os" in
17901                   # Guess yes on musl systems.
17902          *-musl*) gl_cv_func_working_utimes="guessing yes" ;;
17903                   # Guess no on native Windows.
17904          mingw*)  gl_cv_func_working_utimes="guessing no" ;;
17905          *)       gl_cv_func_working_utimes="$gl_cross_guess_normal" ;;
17906        esac
17907
17908else
17909  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17910/* end confdefs.h.  */
17911
17912#include <sys/types.h>
17913#include <sys/stat.h>
17914#include <fcntl.h>
17915#include <sys/time.h>
17916#include <time.h>
17917#include <unistd.h>
17918#include <stdlib.h>
17919#include <stdio.h>
17920#include <utime.h>
17921#include <errno.h>
17922
17923
17924$gl_mda_defines
17925
17926
17927static int
17928inorder (time_t a, time_t b, time_t c)
17929{
17930  return a <= b && b <= c;
17931}
17932
17933int
17934main ()
17935{
17936  int result = 0;
17937  char const *file = "conftest.utimes";
17938  /* On OS/2, file timestamps must be on or after 1980 in local time,
17939     with an even number of seconds.  */
17940  static struct timeval timeval[2] = {{315620000 + 10, 10},
17941                                      {315620000 + 1000000, 999998}};
17942
17943  /* Test whether utimes() essentially works.  */
17944  {
17945    struct stat sbuf;
17946    FILE *f = fopen (file, "w");
17947    if (f == NULL)
17948      result |= 1;
17949    else if (fclose (f) != 0)
17950      result |= 1;
17951    else if (utimes (file, timeval) != 0)
17952      result |= 2;
17953    else if (lstat (file, &sbuf) != 0)
17954      result |= 1;
17955    else if (!(sbuf.st_atime == timeval[0].tv_sec
17956               && sbuf.st_mtime == timeval[1].tv_sec))
17957      result |= 4;
17958    if (unlink (file) != 0)
17959      result |= 1;
17960  }
17961
17962  /* Test whether utimes() with a NULL argument sets the file's timestamp
17963     to the current time.  Use 'fstat' as well as 'time' to
17964     determine the "current" time, to accommodate NFS file systems
17965     if there is a time skew between the host and the NFS server.  */
17966  {
17967    int fd = open (file, O_WRONLY|O_CREAT, 0644);
17968    if (fd < 0)
17969      result |= 1;
17970    else
17971      {
17972        time_t t0, t2;
17973        struct stat st0, st1, st2;
17974        if (time (&t0) == (time_t) -1)
17975          result |= 1;
17976        else if (fstat (fd, &st0) != 0)
17977          result |= 1;
17978        else if (utimes (file, timeval) != 0
17979                 && (errno != EACCES
17980                     /* OS/2 kLIBC utimes fails on opened files.  */
17981                     || close (fd) != 0
17982                     || utimes (file, timeval) != 0
17983                     || (fd = open (file, O_WRONLY)) < 0))
17984          result |= 2;
17985        else if (utimes (file, NULL) != 0
17986                 && (errno != EACCES
17987                     /* OS/2 kLIBC utimes fails on opened files.  */
17988                     || close (fd) != 0
17989                     || utimes (file, NULL) != 0
17990                     || (fd = open (file, O_WRONLY)) < 0))
17991          result |= 8;
17992        else if (fstat (fd, &st1) != 0)
17993          result |= 1;
17994        else if (write (fd, "\n", 1) != 1)
17995          result |= 1;
17996        else if (fstat (fd, &st2) != 0)
17997          result |= 1;
17998        else if (time (&t2) == (time_t) -1)
17999          result |= 1;
18000        else
18001          {
18002            int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
18003            int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
18004            if (! (st1.st_atime == st1.st_mtime))
18005              result |= 16;
18006            if (! (m_ok_POSIX || m_ok_NFS))
18007              result |= 32;
18008          }
18009        if (close (fd) != 0)
18010          result |= 1;
18011      }
18012    if (unlink (file) != 0)
18013      result |= 1;
18014  }
18015
18016  /* Test whether utimes() with a NULL argument works on read-only files.  */
18017  {
18018    int fd = open (file, O_WRONLY|O_CREAT, 0444);
18019    if (fd < 0)
18020      result |= 1;
18021    else if (close (fd) != 0)
18022      result |= 1;
18023    else if (utimes (file, NULL) != 0)
18024      result |= 64;
18025    if (unlink (file) != 0)
18026      result |= 1;
18027  }
18028
18029  return result;
18030}
18031
18032_ACEOF
18033if ac_fn_c_try_run "$LINENO"; then :
18034  gl_cv_func_working_utimes=yes
18035else
18036  gl_cv_func_working_utimes=no
18037fi
18038rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18039  conftest.$ac_objext conftest.beam conftest.$ac_ext
18040fi
18041
18042
18043fi
18044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
18045$as_echo "$gl_cv_func_working_utimes" >&6; }
18046
18047  case "$gl_cv_func_working_utimes" in
18048    *yes)
18049
18050$as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
18051
18052      ;;
18053  esac
18054
18055
18056
18057
18058
18059
18060
18061
18062
18063
18064
18065
18066
18067  if test $ac_cv_header_features_h = yes; then
18068    HAVE_FEATURES_H=1
18069  else
18070    HAVE_FEATURES_H=0
18071  fi
18072
18073
18074
18075  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
18076$as_echo_n "checking for inttypes.h... " >&6; }
18077if ${gl_cv_header_inttypes_h+:} false; then :
18078  $as_echo_n "(cached) " >&6
18079else
18080  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18081/* end confdefs.h.  */
18082
18083#include <sys/types.h>
18084#include <inttypes.h>
18085
18086int
18087main ()
18088{
18089uintmax_t i = (uintmax_t) -1; return !i;
18090  ;
18091  return 0;
18092}
18093_ACEOF
18094if ac_fn_c_try_compile "$LINENO"; then :
18095  gl_cv_header_inttypes_h=yes
18096else
18097  gl_cv_header_inttypes_h=no
18098fi
18099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18100fi
18101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
18102$as_echo "$gl_cv_header_inttypes_h" >&6; }
18103  if test $gl_cv_header_inttypes_h = yes; then
18104
18105cat >>confdefs.h <<_ACEOF
18106#define HAVE_INTTYPES_H_WITH_UINTMAX 1
18107_ACEOF
18108
18109  fi
18110
18111
18112  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
18113$as_echo_n "checking for stdint.h... " >&6; }
18114if ${gl_cv_header_stdint_h+:} false; then :
18115  $as_echo_n "(cached) " >&6
18116else
18117  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18118/* end confdefs.h.  */
18119#include <sys/types.h>
18120            #include <stdint.h>
18121int
18122main ()
18123{
18124uintmax_t i = (uintmax_t) -1; return !i;
18125  ;
18126  return 0;
18127}
18128_ACEOF
18129if ac_fn_c_try_compile "$LINENO"; then :
18130  gl_cv_header_stdint_h=yes
18131else
18132  gl_cv_header_stdint_h=no
18133fi
18134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18135fi
18136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
18137$as_echo "$gl_cv_header_stdint_h" >&6; }
18138  if test $gl_cv_header_stdint_h = yes; then
18139
18140cat >>confdefs.h <<_ACEOF
18141#define HAVE_STDINT_H_WITH_UINTMAX 1
18142_ACEOF
18143
18144  fi
18145
18146
18147
18148
18149  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
18150$as_echo_n "checking for intmax_t... " >&6; }
18151if ${gt_cv_c_intmax_t+:} false; then :
18152  $as_echo_n "(cached) " >&6
18153else
18154  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18155/* end confdefs.h.  */
18156
18157#include <stddef.h>
18158#include <stdlib.h>
18159#if HAVE_STDINT_H_WITH_UINTMAX
18160#include <stdint.h>
18161#endif
18162#if HAVE_INTTYPES_H_WITH_UINTMAX
18163#include <inttypes.h>
18164#endif
18165
18166int
18167main ()
18168{
18169intmax_t x = -1; return !x;
18170  ;
18171  return 0;
18172}
18173_ACEOF
18174if ac_fn_c_try_compile "$LINENO"; then :
18175  gt_cv_c_intmax_t=yes
18176else
18177  gt_cv_c_intmax_t=no
18178fi
18179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18180fi
18181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
18182$as_echo "$gt_cv_c_intmax_t" >&6; }
18183  if test $gt_cv_c_intmax_t = yes; then
18184
18185$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
18186
18187  else
18188
18189cat >>confdefs.h <<_ACEOF
18190#define intmax_t long long
18191_ACEOF
18192
18193  fi
18194
18195
18196  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
18197$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
18198if ${gl_cv_cc_double_expbit0+:} false; then :
18199  $as_echo_n "(cached) " >&6
18200else
18201
18202      if test "$cross_compiling" = yes; then :
18203
18204                                                                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18205/* end confdefs.h.  */
18206
18207#if defined arm || defined __arm || defined __arm__
18208  mixed_endianness
18209#endif
18210
18211_ACEOF
18212if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18213  $EGREP "mixed_endianness" >/dev/null 2>&1; then :
18214  gl_cv_cc_double_expbit0="unknown"
18215else
18216
18217                                                         :
18218if ${ac_cv_c_bigendian+:} false; then :
18219  $as_echo_n "(cached) " >&6
18220else
18221  ac_cv_c_bigendian=unknown
18222    # See if we're dealing with a universal compiler.
18223    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18224/* end confdefs.h.  */
18225#ifndef __APPLE_CC__
18226	       not a universal capable compiler
18227	     #endif
18228	     typedef int dummy;
18229
18230_ACEOF
18231if ac_fn_c_try_compile "$LINENO"; then :
18232
18233	# Check for potential -arch flags.  It is not universal unless
18234	# there are at least two -arch flags with different values.
18235	ac_arch=
18236	ac_prev=
18237	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
18238	 if test -n "$ac_prev"; then
18239	   case $ac_word in
18240	     i?86 | x86_64 | ppc | ppc64)
18241	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
18242		 ac_arch=$ac_word
18243	       else
18244		 ac_cv_c_bigendian=universal
18245		 break
18246	       fi
18247	       ;;
18248	   esac
18249	   ac_prev=
18250	 elif test "x$ac_word" = "x-arch"; then
18251	   ac_prev=arch
18252	 fi
18253       done
18254fi
18255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18256    if test $ac_cv_c_bigendian = unknown; then
18257      # See if sys/param.h defines the BYTE_ORDER macro.
18258      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18259/* end confdefs.h.  */
18260#include <sys/types.h>
18261	     #include <sys/param.h>
18262
18263int
18264main ()
18265{
18266#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
18267		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
18268		     && LITTLE_ENDIAN)
18269	      bogus endian macros
18270	     #endif
18271
18272  ;
18273  return 0;
18274}
18275_ACEOF
18276if ac_fn_c_try_compile "$LINENO"; then :
18277  # It does; now see whether it defined to BIG_ENDIAN or not.
18278	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18279/* end confdefs.h.  */
18280#include <sys/types.h>
18281		#include <sys/param.h>
18282
18283int
18284main ()
18285{
18286#if BYTE_ORDER != BIG_ENDIAN
18287		 not big endian
18288		#endif
18289
18290  ;
18291  return 0;
18292}
18293_ACEOF
18294if ac_fn_c_try_compile "$LINENO"; then :
18295  ac_cv_c_bigendian=yes
18296else
18297  ac_cv_c_bigendian=no
18298fi
18299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18300fi
18301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18302    fi
18303    if test $ac_cv_c_bigendian = unknown; then
18304      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
18305      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18306/* end confdefs.h.  */
18307#include <limits.h>
18308
18309int
18310main ()
18311{
18312#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
18313	      bogus endian macros
18314	     #endif
18315
18316  ;
18317  return 0;
18318}
18319_ACEOF
18320if ac_fn_c_try_compile "$LINENO"; then :
18321  # It does; now see whether it defined to _BIG_ENDIAN or not.
18322	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18323/* end confdefs.h.  */
18324#include <limits.h>
18325
18326int
18327main ()
18328{
18329#ifndef _BIG_ENDIAN
18330		 not big endian
18331		#endif
18332
18333  ;
18334  return 0;
18335}
18336_ACEOF
18337if ac_fn_c_try_compile "$LINENO"; then :
18338  ac_cv_c_bigendian=yes
18339else
18340  ac_cv_c_bigendian=no
18341fi
18342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18343fi
18344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18345    fi
18346    if test $ac_cv_c_bigendian = unknown; then
18347      # Compile a test program.
18348      if test "$cross_compiling" = yes; then :
18349  # Try to guess by grepping values from an object file.
18350	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18351/* end confdefs.h.  */
18352short int ascii_mm[] =
18353		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
18354		short int ascii_ii[] =
18355		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
18356		int use_ascii (int i) {
18357		  return ascii_mm[i] + ascii_ii[i];
18358		}
18359		short int ebcdic_ii[] =
18360		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
18361		short int ebcdic_mm[] =
18362		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
18363		int use_ebcdic (int i) {
18364		  return ebcdic_mm[i] + ebcdic_ii[i];
18365		}
18366		extern int foo;
18367
18368int
18369main ()
18370{
18371return use_ascii (foo) == use_ebcdic (foo);
18372  ;
18373  return 0;
18374}
18375_ACEOF
18376if ac_fn_c_try_compile "$LINENO"; then :
18377  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
18378	      ac_cv_c_bigendian=yes
18379	    fi
18380	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
18381	      if test "$ac_cv_c_bigendian" = unknown; then
18382		ac_cv_c_bigendian=no
18383	      else
18384		# finding both strings is unlikely to happen, but who knows?
18385		ac_cv_c_bigendian=unknown
18386	      fi
18387	    fi
18388fi
18389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18390else
18391  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18392/* end confdefs.h.  */
18393$ac_includes_default
18394int
18395main ()
18396{
18397
18398	     /* Are we little or big endian?  From Harbison&Steele.  */
18399	     union
18400	     {
18401	       long int l;
18402	       char c[sizeof (long int)];
18403	     } u;
18404	     u.l = 1;
18405	     return u.c[sizeof (long int) - 1] == 1;
18406
18407  ;
18408  return 0;
18409}
18410_ACEOF
18411if ac_fn_c_try_run "$LINENO"; then :
18412  ac_cv_c_bigendian=no
18413else
18414  ac_cv_c_bigendian=yes
18415fi
18416rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18417  conftest.$ac_objext conftest.beam conftest.$ac_ext
18418fi
18419
18420    fi
18421fi
18422:
18423 case $ac_cv_c_bigendian in #(
18424   yes)
18425     gl_cv_cc_double_expbit0="word 0 bit 20";; #(
18426   no)
18427     gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
18428   universal)
18429
18430$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
18431
18432     ;; #(
18433   *)
18434     gl_cv_cc_double_expbit0="unknown" ;;
18435 esac
18436
18437
18438fi
18439rm -f conftest*
18440
18441
18442else
18443  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18444/* end confdefs.h.  */
18445
18446#include <float.h>
18447#include <stddef.h>
18448#include <stdio.h>
18449#include <string.h>
18450#define NWORDS \
18451  ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
18452typedef union { double value; unsigned int word[NWORDS]; } memory_double;
18453static unsigned int ored_words[NWORDS];
18454static unsigned int anded_words[NWORDS];
18455static void add_to_ored_words (double x)
18456{
18457  memory_double m;
18458  size_t i;
18459  /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
18460  memset (&m, 0, sizeof (memory_double));
18461  m.value = x;
18462  for (i = 0; i < NWORDS; i++)
18463    {
18464      ored_words[i] |= m.word[i];
18465      anded_words[i] &= m.word[i];
18466    }
18467}
18468int main ()
18469{
18470  size_t j;
18471  FILE *fp = fopen ("conftest.out", "w");
18472  if (fp == NULL)
18473    return 1;
18474  for (j = 0; j < NWORDS; j++)
18475    anded_words[j] = ~ (unsigned int) 0;
18476  add_to_ored_words (0.25);
18477  add_to_ored_words (0.5);
18478  add_to_ored_words (1.0);
18479  add_to_ored_words (2.0);
18480  add_to_ored_words (4.0);
18481  /* Remove bits that are common (e.g. if representation of the first mantissa
18482     bit is explicit).  */
18483  for (j = 0; j < NWORDS; j++)
18484    ored_words[j] &= ~anded_words[j];
18485  /* Now find the nonzero word.  */
18486  for (j = 0; j < NWORDS; j++)
18487    if (ored_words[j] != 0)
18488      break;
18489  if (j < NWORDS)
18490    {
18491      size_t i;
18492      for (i = j + 1; i < NWORDS; i++)
18493        if (ored_words[i] != 0)
18494          {
18495            fprintf (fp, "unknown");
18496            return (fclose (fp) != 0);
18497          }
18498      for (i = 0; ; i++)
18499        if ((ored_words[j] >> i) & 1)
18500          {
18501            fprintf (fp, "word %d bit %d", (int) j, (int) i);
18502            return (fclose (fp) != 0);
18503          }
18504    }
18505  fprintf (fp, "unknown");
18506  return (fclose (fp) != 0);
18507}
18508
18509_ACEOF
18510if ac_fn_c_try_run "$LINENO"; then :
18511  gl_cv_cc_double_expbit0=`cat conftest.out`
18512else
18513  gl_cv_cc_double_expbit0="unknown"
18514fi
18515rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18516  conftest.$ac_objext conftest.beam conftest.$ac_ext
18517fi
18518
18519      rm -f conftest.out
18520
18521fi
18522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
18523$as_echo "$gl_cv_cc_double_expbit0" >&6; }
18524  case "$gl_cv_cc_double_expbit0" in
18525    word*bit*)
18526      word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
18527      bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
18528
18529cat >>confdefs.h <<_ACEOF
18530#define DBL_EXPBIT0_WORD $word
18531_ACEOF
18532
18533
18534cat >>confdefs.h <<_ACEOF
18535#define DBL_EXPBIT0_BIT $bit
18536_ACEOF
18537
18538      ;;
18539  esac
18540
18541
18542
18543
18544  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf truncates the result as in C99" >&5
18545$as_echo_n "checking whether snprintf truncates the result as in C99... " >&6; }
18546if ${gl_cv_func_snprintf_truncation_c99+:} false; then :
18547  $as_echo_n "(cached) " >&6
18548else
18549
18550      if test "$cross_compiling" = yes; then :
18551
18552         case "$host_os" in
18553                                 # Guess yes on glibc systems.
18554           *-gnu* | gnu*)        gl_cv_func_snprintf_truncation_c99="guessing yes";;
18555                                 # Guess yes on musl systems.
18556           *-musl*)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
18557                                 # Guess yes on FreeBSD >= 5.
18558           freebsd[1-4].*)       gl_cv_func_snprintf_truncation_c99="guessing no";;
18559           freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
18560                                 # Guess yes on Mac OS X >= 10.3.
18561           darwin[1-6].*)        gl_cv_func_snprintf_truncation_c99="guessing no";;
18562           darwin*)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
18563                                 # Guess yes on OpenBSD >= 3.9.
18564           openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
18565                                 gl_cv_func_snprintf_truncation_c99="guessing no";;
18566           openbsd*)             gl_cv_func_snprintf_truncation_c99="guessing yes";;
18567                                 # Guess yes on Solaris >= 2.6.
18568           solaris2.[0-5] | solaris2.[0-5].*)
18569                                 gl_cv_func_snprintf_truncation_c99="guessing no";;
18570           solaris*)             gl_cv_func_snprintf_truncation_c99="guessing yes";;
18571                                 # Guess yes on AIX >= 4.
18572           aix[1-3]*)            gl_cv_func_snprintf_truncation_c99="guessing no";;
18573           aix*)                 gl_cv_func_snprintf_truncation_c99="guessing yes";;
18574                                 # Guess yes on HP-UX >= 11.
18575           hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";;
18576           hpux*)                gl_cv_func_snprintf_truncation_c99="guessing yes";;
18577                                 # Guess yes on IRIX >= 6.5.
18578           irix6.5)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
18579                                 # Guess yes on OSF/1 >= 5.
18580           osf[3-4]*)            gl_cv_func_snprintf_truncation_c99="guessing no";;
18581           osf*)                 gl_cv_func_snprintf_truncation_c99="guessing yes";;
18582                                 # Guess yes on NetBSD >= 3.
18583           netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
18584                                 gl_cv_func_snprintf_truncation_c99="guessing no";;
18585           netbsd*)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
18586                                 # Guess yes on BeOS.
18587           beos*)                gl_cv_func_snprintf_truncation_c99="guessing yes";;
18588                                 # Guess yes on Android.
18589           linux*-android*)      gl_cv_func_snprintf_truncation_c99="guessing yes";;
18590                                 # Guess no on native Windows.
18591           mingw*)               gl_cv_func_snprintf_truncation_c99="guessing no";;
18592                                 # If we don't know, obey --enable-cross-guesses.
18593           *)                    gl_cv_func_snprintf_truncation_c99="$gl_cross_guess_normal";;
18594         esac
18595
18596else
18597  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18598/* end confdefs.h.  */
18599
18600#include <stdio.h>
18601#include <string.h>
18602#if HAVE_SNPRINTF
18603# define my_snprintf snprintf
18604#else
18605# include <stdarg.h>
18606static int my_snprintf (char *buf, int size, const char *format, ...)
18607{
18608  va_list args;
18609  int ret;
18610  va_start (args, format);
18611  ret = vsnprintf (buf, size, format, args);
18612  va_end (args);
18613  return ret;
18614}
18615#endif
18616static char buf[100];
18617int main ()
18618{
18619  strcpy (buf, "ABCDEF");
18620  my_snprintf (buf, 3, "%d %d", 4567, 89);
18621  if (memcmp (buf, "45\0DEF", 6) != 0)
18622    return 1;
18623  return 0;
18624}
18625_ACEOF
18626if ac_fn_c_try_run "$LINENO"; then :
18627  gl_cv_func_snprintf_truncation_c99=yes
18628else
18629  gl_cv_func_snprintf_truncation_c99=no
18630fi
18631rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18632  conftest.$ac_objext conftest.beam conftest.$ac_ext
18633fi
18634
18635
18636fi
18637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_truncation_c99" >&5
18638$as_echo "$gl_cv_func_snprintf_truncation_c99" >&6; }
18639
18640
18641
18642
18643
18644  for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
18645do :
18646  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18647ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18648if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
18649  cat >>confdefs.h <<_ACEOF
18650#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18651_ACEOF
18652
18653fi
18654done
18655
18656      ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
18657"
18658if test "x$ac_cv_have_decl__snprintf" = xyes; then :
18659  ac_have_decl=1
18660else
18661  ac_have_decl=0
18662fi
18663
18664cat >>confdefs.h <<_ACEOF
18665#define HAVE_DECL__SNPRINTF $ac_have_decl
18666_ACEOF
18667
18668
18669
18670  case "$gl_cv_func_snprintf_retval_c99" in
18671    *yes)
18672
18673$as_echo "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
18674
18675      ;;
18676  esac
18677
18678  case "$gl_cv_func_snprintf_truncation_c99" in
18679    *yes)
18680
18681$as_echo "#define HAVE_SNPRINTF_TRUNCATION_C99 1" >>confdefs.h
18682
18683      ;;
18684  esac
18685
18686ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
18687if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
18688  ac_have_decl=1
18689else
18690  ac_have_decl=0
18691fi
18692
18693cat >>confdefs.h <<_ACEOF
18694#define HAVE_DECL_VSNPRINTF $ac_have_decl
18695_ACEOF
18696
18697
18698
18699
18700
18701
18702
18703
18704   if false; then
18705  GL_COND_LIBTOOL_TRUE=
18706  GL_COND_LIBTOOL_FALSE='#'
18707else
18708  GL_COND_LIBTOOL_TRUE='#'
18709  GL_COND_LIBTOOL_FALSE=
18710fi
18711
18712  gl_cond_libtool=false
18713  gl_libdeps=
18714  gl_ltlibdeps=
18715  gl_m4_base='m4'
18716
18717
18718
18719
18720
18721
18722
18723
18724
18725
18726  gl_source_base='gnu'
18727
18728
18729
18730  LIB_ACL=
18731  use_acl=0
18732  if test "$enable_acl" != no; then
18733        for ac_header in sys/acl.h
18734do :
18735  ac_fn_c_check_header_mongrel "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
18736if test "x$ac_cv_header_sys_acl_h" = xyes; then :
18737  cat >>confdefs.h <<_ACEOF
18738#define HAVE_SYS_ACL_H 1
18739_ACEOF
18740
18741fi
18742
18743done
18744
18745    if test $ac_cv_header_sys_acl_h = yes; then
18746      ac_save_LIBS=$LIBS
18747
18748                        if test $use_acl = 0; then
18749        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_get_file" >&5
18750$as_echo_n "checking for library containing acl_get_file... " >&6; }
18751if ${ac_cv_search_acl_get_file+:} false; then :
18752  $as_echo_n "(cached) " >&6
18753else
18754  ac_func_search_save_LIBS=$LIBS
18755cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18756/* end confdefs.h.  */
18757
18758/* Override any GCC internal prototype to avoid an error.
18759   Use char because int might match the return type of a GCC
18760   builtin and then its argument prototype would still apply.  */
18761#ifdef __cplusplus
18762extern "C"
18763#endif
18764char acl_get_file ();
18765int
18766main ()
18767{
18768return acl_get_file ();
18769  ;
18770  return 0;
18771}
18772_ACEOF
18773for ac_lib in '' acl pacl; do
18774  if test -z "$ac_lib"; then
18775    ac_res="none required"
18776  else
18777    ac_res=-l$ac_lib
18778    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18779  fi
18780  if ac_fn_c_try_link "$LINENO"; then :
18781  ac_cv_search_acl_get_file=$ac_res
18782fi
18783rm -f core conftest.err conftest.$ac_objext \
18784    conftest$ac_exeext
18785  if ${ac_cv_search_acl_get_file+:} false; then :
18786  break
18787fi
18788done
18789if ${ac_cv_search_acl_get_file+:} false; then :
18790
18791else
18792  ac_cv_search_acl_get_file=no
18793fi
18794rm conftest.$ac_ext
18795LIBS=$ac_func_search_save_LIBS
18796fi
18797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_get_file" >&5
18798$as_echo "$ac_cv_search_acl_get_file" >&6; }
18799ac_res=$ac_cv_search_acl_get_file
18800if test "$ac_res" != no; then :
18801  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18802  if test "$ac_cv_search_acl_get_file" != "none required"; then
18803             LIB_ACL=$ac_cv_search_acl_get_file
18804           fi
18805           for ac_func in acl_get_file acl_get_fd acl_set_file acl_set_fd \
18806              acl_free acl_from_mode acl_from_text \
18807              acl_delete_def_file acl_extended_file \
18808              acl_delete_fd_np acl_delete_file_np \
18809              acl_copy_ext_native acl_create_entry_np \
18810              acl_to_short_text acl_free_text
18811do :
18812  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18813ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18814if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
18815  cat >>confdefs.h <<_ACEOF
18816#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18817_ACEOF
18818
18819fi
18820done
18821
18822           # If the acl_get_file bug is detected, don't enable the ACL support.
18823
18824  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working acl_get_file" >&5
18825$as_echo_n "checking for working acl_get_file... " >&6; }
18826if ${gl_cv_func_working_acl_get_file+:} false; then :
18827  $as_echo_n "(cached) " >&6
18828else
18829  gl_cv_func_working_acl_get_file=no
18830     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18831/* end confdefs.h.  */
18832#include <sys/types.h>
18833           #include <sys/acl.h>
18834           #include <errno.h>
18835
18836int
18837main ()
18838{
18839acl_t acl = acl_get_file (".", ACL_TYPE_ACCESS);
18840            return acl ? acl_free (acl) != 0 : errno == ENOENT;
18841
18842  ;
18843  return 0;
18844}
18845_ACEOF
18846if ac_fn_c_try_link "$LINENO"; then :
18847  if test $cross_compiling = yes; then
18848          gl_cv_func_working_acl_get_file="guessing yes"
18849        elif ./conftest$ac_exeext; then
18850          gl_cv_func_working_acl_get_file=yes
18851        fi
18852fi
18853rm -f core conftest.err conftest.$ac_objext \
18854    conftest$ac_exeext conftest.$ac_ext
18855fi
18856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_acl_get_file" >&5
18857$as_echo "$gl_cv_func_working_acl_get_file" >&6; }
18858  if test "$gl_cv_func_working_acl_get_file" != no; then :
18859  use_acl=1
18860fi
18861
18862           if test $use_acl = 1; then
18863                          for ac_header in acl/libacl.h
18864do :
18865  ac_fn_c_check_header_mongrel "$LINENO" "acl/libacl.h" "ac_cv_header_acl_libacl_h" "$ac_includes_default"
18866if test "x$ac_cv_header_acl_libacl_h" = xyes; then :
18867  cat >>confdefs.h <<_ACEOF
18868#define HAVE_ACL_LIBACL_H 1
18869_ACEOF
18870
18871fi
18872
18873done
18874
18875
18876
18877
18878
18879
18880
18881
18882
18883  for ac_func in acl_entries
18884do :
18885  ac_fn_c_check_func "$LINENO" "acl_entries" "ac_cv_func_acl_entries"
18886if test "x$ac_cv_func_acl_entries" = xyes; then :
18887  cat >>confdefs.h <<_ACEOF
18888#define HAVE_ACL_ENTRIES 1
18889_ACEOF
18890
18891else
18892
18893    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
18894
18895fi
18896done
18897
18898
18899             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_FIRST_ENTRY" >&5
18900$as_echo_n "checking for ACL_FIRST_ENTRY... " >&6; }
18901if ${gl_cv_acl_ACL_FIRST_ENTRY+:} false; then :
18902  $as_echo_n "(cached) " >&6
18903else
18904  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18905/* end confdefs.h.  */
18906#include <sys/types.h>
18907#include <sys/acl.h>
18908int type = ACL_FIRST_ENTRY;
18909int
18910main ()
18911{
18912
18913  ;
18914  return 0;
18915}
18916_ACEOF
18917if ac_fn_c_try_compile "$LINENO"; then :
18918  gl_cv_acl_ACL_FIRST_ENTRY=yes
18919else
18920  gl_cv_acl_ACL_FIRST_ENTRY=no
18921fi
18922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18923fi
18924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_FIRST_ENTRY" >&5
18925$as_echo "$gl_cv_acl_ACL_FIRST_ENTRY" >&6; }
18926             if test $gl_cv_acl_ACL_FIRST_ENTRY = yes; then
18927
18928$as_echo "#define HAVE_ACL_FIRST_ENTRY 1" >>confdefs.h
18929
18930             fi
18931                          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_TYPE_EXTENDED" >&5
18932$as_echo_n "checking for ACL_TYPE_EXTENDED... " >&6; }
18933if ${gl_cv_acl_ACL_TYPE_EXTENDED+:} false; then :
18934  $as_echo_n "(cached) " >&6
18935else
18936  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18937/* end confdefs.h.  */
18938#include <sys/types.h>
18939#include <sys/acl.h>
18940int type = ACL_TYPE_EXTENDED;
18941int
18942main ()
18943{
18944
18945  ;
18946  return 0;
18947}
18948_ACEOF
18949if ac_fn_c_try_compile "$LINENO"; then :
18950  gl_cv_acl_ACL_TYPE_EXTENDED=yes
18951else
18952  gl_cv_acl_ACL_TYPE_EXTENDED=no
18953fi
18954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18955fi
18956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_TYPE_EXTENDED" >&5
18957$as_echo "$gl_cv_acl_ACL_TYPE_EXTENDED" >&6; }
18958             if test $gl_cv_acl_ACL_TYPE_EXTENDED = yes; then
18959
18960$as_echo "#define HAVE_ACL_TYPE_EXTENDED 1" >>confdefs.h
18961
18962             fi
18963           else
18964             LIB_ACL=
18965           fi
18966
18967fi
18968
18969      fi
18970
18971            if test $use_acl = 0; then
18972        for ac_func in facl
18973do :
18974  ac_fn_c_check_func "$LINENO" "facl" "ac_cv_func_facl"
18975if test "x$ac_cv_func_facl" = xyes; then :
18976  cat >>confdefs.h <<_ACEOF
18977#define HAVE_FACL 1
18978_ACEOF
18979
18980fi
18981done
18982
18983        if test $ac_cv_func_facl = yes; then
18984          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_trivial" >&5
18985$as_echo_n "checking for library containing acl_trivial... " >&6; }
18986if ${ac_cv_search_acl_trivial+:} false; then :
18987  $as_echo_n "(cached) " >&6
18988else
18989  ac_func_search_save_LIBS=$LIBS
18990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18991/* end confdefs.h.  */
18992
18993/* Override any GCC internal prototype to avoid an error.
18994   Use char because int might match the return type of a GCC
18995   builtin and then its argument prototype would still apply.  */
18996#ifdef __cplusplus
18997extern "C"
18998#endif
18999char acl_trivial ();
19000int
19001main ()
19002{
19003return acl_trivial ();
19004  ;
19005  return 0;
19006}
19007_ACEOF
19008for ac_lib in '' sec; do
19009  if test -z "$ac_lib"; then
19010    ac_res="none required"
19011  else
19012    ac_res=-l$ac_lib
19013    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19014  fi
19015  if ac_fn_c_try_link "$LINENO"; then :
19016  ac_cv_search_acl_trivial=$ac_res
19017fi
19018rm -f core conftest.err conftest.$ac_objext \
19019    conftest$ac_exeext
19020  if ${ac_cv_search_acl_trivial+:} false; then :
19021  break
19022fi
19023done
19024if ${ac_cv_search_acl_trivial+:} false; then :
19025
19026else
19027  ac_cv_search_acl_trivial=no
19028fi
19029rm conftest.$ac_ext
19030LIBS=$ac_func_search_save_LIBS
19031fi
19032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_trivial" >&5
19033$as_echo "$ac_cv_search_acl_trivial" >&6; }
19034ac_res=$ac_cv_search_acl_trivial
19035if test "$ac_res" != no; then :
19036  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19037  if test "$ac_cv_search_acl_trivial" != "none required"; then
19038               LIB_ACL=$ac_cv_search_acl_trivial
19039             fi
19040
19041fi
19042
19043          for ac_func in acl_trivial
19044do :
19045  ac_fn_c_check_func "$LINENO" "acl_trivial" "ac_cv_func_acl_trivial"
19046if test "x$ac_cv_func_acl_trivial" = xyes; then :
19047  cat >>confdefs.h <<_ACEOF
19048#define HAVE_ACL_TRIVIAL 1
19049_ACEOF
19050
19051fi
19052done
19053
19054          use_acl=1
19055        fi
19056      fi
19057
19058            if test $use_acl = 0; then
19059        for ac_func in getacl
19060do :
19061  ac_fn_c_check_func "$LINENO" "getacl" "ac_cv_func_getacl"
19062if test "x$ac_cv_func_getacl" = xyes; then :
19063  cat >>confdefs.h <<_ACEOF
19064#define HAVE_GETACL 1
19065_ACEOF
19066
19067fi
19068done
19069
19070        if test $ac_cv_func_getacl = yes; then
19071          use_acl=1
19072        fi
19073                for ac_header in aclv.h
19074do :
19075  ac_fn_c_check_header_compile "$LINENO" "aclv.h" "ac_cv_header_aclv_h" "#include <sys/types.h>
19076"
19077if test "x$ac_cv_header_aclv_h" = xyes; then :
19078  cat >>confdefs.h <<_ACEOF
19079#define HAVE_ACLV_H 1
19080_ACEOF
19081
19082fi
19083
19084done
19085
19086      fi
19087
19088            if test $use_acl = 0; then
19089        for ac_func in aclx_get
19090do :
19091  ac_fn_c_check_func "$LINENO" "aclx_get" "ac_cv_func_aclx_get"
19092if test "x$ac_cv_func_aclx_get" = xyes; then :
19093  cat >>confdefs.h <<_ACEOF
19094#define HAVE_ACLX_GET 1
19095_ACEOF
19096
19097fi
19098done
19099
19100        if test $ac_cv_func_aclx_get = yes; then
19101          use_acl=1
19102        fi
19103      fi
19104
19105            if test $use_acl = 0 || test "$ac_cv_func_aclx_get" = yes; then
19106        for ac_func in statacl
19107do :
19108  ac_fn_c_check_func "$LINENO" "statacl" "ac_cv_func_statacl"
19109if test "x$ac_cv_func_statacl" = xyes; then :
19110  cat >>confdefs.h <<_ACEOF
19111#define HAVE_STATACL 1
19112_ACEOF
19113
19114fi
19115done
19116
19117        if test $ac_cv_func_statacl = yes; then
19118          use_acl=1
19119        fi
19120      fi
19121
19122            if test $use_acl = 0; then
19123        for ac_func in aclsort
19124do :
19125  ac_fn_c_check_func "$LINENO" "aclsort" "ac_cv_func_aclsort"
19126if test "x$ac_cv_func_aclsort" = xyes; then :
19127  cat >>confdefs.h <<_ACEOF
19128#define HAVE_ACLSORT 1
19129_ACEOF
19130
19131fi
19132done
19133
19134        if test $ac_cv_func_aclsort = yes; then
19135          use_acl=1
19136        fi
19137      fi
19138
19139      LIBS=$ac_save_LIBS
19140    fi
19141
19142    if test "$enable_acl$use_acl" = yes0; then
19143      as_fn_error $? "ACLs enabled but support not detected" "$LINENO" 5
19144    elif test "$enable_acl$use_acl" = auto0; then
19145      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libacl development library was not found or not usable." >&5
19146$as_echo "$as_me: WARNING: libacl development library was not found or not usable." >&2;}
19147      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU tar will be built without ACL support." >&5
19148$as_echo "$as_me: WARNING: GNU tar will be built without ACL support." >&2;}
19149    fi
19150  fi
19151  test -n "$gl_need_lib_has_acl" && LIB_HAS_ACL=$LIB_ACL
19152
19153
19154cat >>confdefs.h <<_ACEOF
19155#define USE_ACL $use_acl
19156_ACEOF
19157
19158  USE_ACL=$use_acl
19159
19160
19161
19162
19163  if test $ac_cv_func_alloca_works = no; then
19164    :
19165  fi
19166
19167  # Define an additional variable used in the Makefile substitution.
19168  if test $ac_cv_working_alloca_h = yes; then
19169    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
19170$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
19171if ${gl_cv_rpl_alloca+:} false; then :
19172  $as_echo_n "(cached) " >&6
19173else
19174
19175      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19176/* end confdefs.h.  */
19177
19178#if defined __GNUC__ || defined _AIX || defined _MSC_VER
19179        Need own alloca
19180#endif
19181
19182_ACEOF
19183if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19184  $EGREP "Need own alloca" >/dev/null 2>&1; then :
19185  gl_cv_rpl_alloca=yes
19186else
19187  gl_cv_rpl_alloca=no
19188fi
19189rm -f conftest*
19190
19191
19192fi
19193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
19194$as_echo "$gl_cv_rpl_alloca" >&6; }
19195    if test $gl_cv_rpl_alloca = yes; then
19196
19197$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
19198
19199      ALLOCA_H=alloca.h
19200    else
19201                  ALLOCA_H=
19202    fi
19203  else
19204    ALLOCA_H=alloca.h
19205  fi
19206
19207   if test -n "$ALLOCA_H"; then
19208  GL_GENERATE_ALLOCA_H_TRUE=
19209  GL_GENERATE_ALLOCA_H_FALSE='#'
19210else
19211  GL_GENERATE_ALLOCA_H_TRUE='#'
19212  GL_GENERATE_ALLOCA_H_FALSE=
19213fi
19214
19215
19216  if test $ac_cv_working_alloca_h = yes; then
19217    HAVE_ALLOCA_H=1
19218  else
19219    HAVE_ALLOCA_H=0
19220  fi
19221
19222
19223
19224
19225cat >>confdefs.h <<_ACEOF
19226#define GNULIB_AREADLINKAT 1
19227_ACEOF
19228
19229
19230
19231
19232cat >>confdefs.h <<_ACEOF
19233#define GNULIB_AREADLINKAT_WITH_SIZE 1
19234_ACEOF
19235
19236
19237
19238
19239
19240
19241
19242  ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
19243"
19244if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
19245  ac_have_decl=1
19246else
19247  ac_have_decl=0
19248fi
19249
19250cat >>confdefs.h <<_ACEOF
19251#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
19252_ACEOF
19253if test $ac_have_decl = 1; then :
19254
19255else
19256
19257$as_echo "#define GNULIB_PROGRAM_INVOCATION_NAME 1" >>confdefs.h
19258
19259fi
19260
19261  ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
19262"
19263if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
19264  ac_have_decl=1
19265else
19266  ac_have_decl=0
19267fi
19268
19269cat >>confdefs.h <<_ACEOF
19270#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
19271_ACEOF
19272if test $ac_have_decl = 1; then :
19273
19274else
19275
19276$as_echo "#define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1" >>confdefs.h
19277
19278fi
19279
19280
19281  # Check if program_invocation_name and program_invocation_short_name
19282  # are defined elsewhere. It is improbable that only one of them will
19283  # be defined and other not, I prefer to stay on the safe side and to
19284  # test each one separately.
19285  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether program_invocation_name is defined" >&5
19286$as_echo_n "checking whether program_invocation_name is defined... " >&6; }
19287  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19288/* end confdefs.h.  */
19289extern char *program_invocation_name;
19290int
19291main ()
19292{
19293program_invocation_name = "test";
19294  ;
19295  return 0;
19296}
19297_ACEOF
19298if ac_fn_c_try_link "$LINENO"; then :
19299
19300$as_echo "#define HAVE_PROGRAM_INVOCATION_NAME 1" >>confdefs.h
19301
19302     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19303$as_echo "yes" >&6; }
19304
19305else
19306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19307$as_echo "no" >&6; }
19308fi
19309rm -f core conftest.err conftest.$ac_objext \
19310    conftest$ac_exeext conftest.$ac_ext
19311
19312  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether program_invocation_short_name is defined" >&5
19313$as_echo_n "checking whether program_invocation_short_name is defined... " >&6; }
19314  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19315/* end confdefs.h.  */
19316extern char *program_invocation_short_name;
19317int
19318main ()
19319{
19320program_invocation_short_name = "test";
19321  ;
19322  return 0;
19323}
19324_ACEOF
19325if ac_fn_c_try_link "$LINENO"; then :
19326
19327$as_echo "#define HAVE_PROGRAM_INVOCATION_SHORT_NAME 1" >>confdefs.h
19328
19329     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19330$as_echo "yes" >&6; }
19331
19332else
19333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19334$as_echo "no" >&6; }
19335fi
19336rm -f core conftest.err conftest.$ac_objext \
19337    conftest$ac_exeext conftest.$ac_ext
19338
19339
19340
19341
19342
19343
19344
19345
19346
19347
19348
19349
19350
19351
19352
19353
19354
19355
19356
19357
19358  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=argp_error:2:c-format"
19359
19360
19361
19362  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=argp_failure:4:c-format"
19363
19364
19365
19366
19367
19368
19369
19370  # See the comments in bison.m4.
19371
19372
19373
19374
19375
19376
19377  if test $ac_cv_func_btowc = no; then
19378    HAVE_BTOWC=0
19379  else
19380
19381
19382
19383
19384        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
19385$as_echo_n "checking whether btowc(0) is correct... " >&6; }
19386if ${gl_cv_func_btowc_nul+:} false; then :
19387  $as_echo_n "(cached) " >&6
19388else
19389
19390        if test "$cross_compiling" = yes; then :
19391
19392           case "$host_os" in
19393                      # Guess no on Cygwin.
19394             cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
19395                      # Guess yes on native Windows.
19396             mingw*)  gl_cv_func_btowc_nul="guessing yes" ;;
19397                      # Guess yes otherwise.
19398             *)       gl_cv_func_btowc_nul="guessing yes" ;;
19399           esac
19400
19401else
19402  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19403/* end confdefs.h.  */
19404
19405#include <wchar.h>
19406int main ()
19407{
19408  if (btowc ('\0') != 0)
19409    return 1;
19410  return 0;
19411}
19412_ACEOF
19413if ac_fn_c_try_run "$LINENO"; then :
19414  gl_cv_func_btowc_nul=yes
19415else
19416  gl_cv_func_btowc_nul=no
19417fi
19418rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19419  conftest.$ac_objext conftest.beam conftest.$ac_ext
19420fi
19421
19422
19423fi
19424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
19425$as_echo "$gl_cv_func_btowc_nul" >&6; }
19426
19427        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
19428$as_echo_n "checking whether btowc(EOF) is correct... " >&6; }
19429if ${gl_cv_func_btowc_eof+:} false; then :
19430  $as_echo_n "(cached) " >&6
19431else
19432
19433                        case "$host_os" in
19434                  # Guess no on IRIX.
19435          irix*)  gl_cv_func_btowc_eof="guessing no" ;;
19436                  # Guess yes on native Windows.
19437          mingw*) gl_cv_func_btowc_eof="guessing yes" ;;
19438                  # Guess yes otherwise.
19439          *)      gl_cv_func_btowc_eof="guessing yes" ;;
19440        esac
19441        if test $LOCALE_FR != none; then
19442          if test "$cross_compiling" = yes; then :
19443  :
19444else
19445  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19446/* end confdefs.h.  */
19447
19448#include <locale.h>
19449#include <stdio.h>
19450#include <wchar.h>
19451int main ()
19452{
19453  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
19454    {
19455      if (btowc (EOF) != WEOF)
19456        return 1;
19457    }
19458  return 0;
19459}
19460_ACEOF
19461if ac_fn_c_try_run "$LINENO"; then :
19462  gl_cv_func_btowc_eof=yes
19463else
19464  gl_cv_func_btowc_eof=no
19465fi
19466rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19467  conftest.$ac_objext conftest.beam conftest.$ac_ext
19468fi
19469
19470        fi
19471
19472fi
19473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
19474$as_echo "$gl_cv_func_btowc_eof" >&6; }
19475
19476    case "$gl_cv_func_btowc_nul" in
19477      *yes) ;;
19478      *) REPLACE_BTOWC=1 ;;
19479    esac
19480    case "$gl_cv_func_btowc_eof" in
19481      *yes) ;;
19482      *) REPLACE_BTOWC=1 ;;
19483    esac
19484  fi
19485
19486  if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
19487
19488
19489
19490
19491
19492
19493
19494
19495  gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
19496
19497
19498  :
19499
19500  fi
19501
19502
19503
19504
19505
19506          GNULIB_BTOWC=1
19507
19508
19509
19510
19511
19512$as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
19513
19514
19515
19516
19517  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
19518$as_echo_n "checking for __builtin_expect... " >&6; }
19519if ${gl_cv___builtin_expect+:} false; then :
19520  $as_echo_n "(cached) " >&6
19521else
19522  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19523/* end confdefs.h.  */
19524
19525         int
19526         main (int argc, char **argv)
19527         {
19528           argc = __builtin_expect (argc, 100);
19529           return argv[argc != 100][0];
19530         }
19531_ACEOF
19532if ac_fn_c_try_link "$LINENO"; then :
19533  gl_cv___builtin_expect=yes
19534else
19535  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19536/* end confdefs.h.  */
19537
19538             #include <builtins.h>
19539             int
19540             main (int argc, char **argv)
19541             {
19542               argc = __builtin_expect (argc, 100);
19543               return argv[argc != 100][0];
19544             }
19545_ACEOF
19546if ac_fn_c_try_link "$LINENO"; then :
19547  gl_cv___builtin_expect="in <builtins.h>"
19548else
19549  gl_cv___builtin_expect=no
19550fi
19551rm -f core conftest.err conftest.$ac_objext \
19552    conftest$ac_exeext conftest.$ac_ext
19553fi
19554rm -f core conftest.err conftest.$ac_objext \
19555    conftest$ac_exeext conftest.$ac_ext
19556fi
19557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5
19558$as_echo "$gl_cv___builtin_expect" >&6; }
19559  if test "$gl_cv___builtin_expect" = yes; then
19560    $as_echo "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h
19561
19562  elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
19563    $as_echo "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
19564
19565  fi
19566
19567
19568
19569
19570
19571  if test $ac_cv_func_canonicalize_file_name = no; then
19572    HAVE_CANONICALIZE_FILE_NAME=0
19573    if test $ac_cv_func_realpath = no; then
19574      HAVE_REALPATH=0
19575    else
19576      case "$gl_cv_func_realpath_works" in
19577        *yes) ;;
19578        *)    REPLACE_REALPATH=1 ;;
19579      esac
19580    fi
19581  else
19582    case "$gl_cv_func_realpath_works" in
19583      *yes)
19584        ;;
19585      *)
19586        REPLACE_CANONICALIZE_FILE_NAME=1
19587        REPLACE_REALPATH=1
19588        ;;
19589    esac
19590  fi
19591
19592  if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
19593
19594
19595
19596
19597
19598
19599
19600
19601  gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
19602
19603  fi
19604
19605
19606cat >>confdefs.h <<_ACEOF
19607#define GNULIB_CANONICALIZE_LGPL 1
19608_ACEOF
19609
19610
19611
19612
19613
19614
19615
19616          GNULIB_CANONICALIZE_FILE_NAME=1
19617
19618
19619
19620
19621
19622$as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
19623
19624
19625
19626
19627
19628
19629
19630
19631          GNULIB_REALPATH=1
19632
19633
19634
19635
19636
19637$as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
19638
19639
19640
19641
19642
19643
19644
19645
19646
19647
19648          GNULIB_CHDIR=1
19649
19650
19651
19652
19653
19654$as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
19655
19656
19657
19658
19659
19660  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system supports file names of any length" >&5
19661$as_echo_n "checking whether this system supports file names of any length... " >&6; }
19662if ${gl_cv_have_unlimited_file_name_length+:} false; then :
19663  $as_echo_n "(cached) " >&6
19664else
19665  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19666/* end confdefs.h.  */
19667
19668/* Arrange to define PATH_MAX, like "pathmax.h" does. */
19669#if HAVE_UNISTD_H
19670# include <unistd.h>
19671#endif
19672#include <limits.h>
19673#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
19674# include <sys/param.h>
19675#endif
19676#if !defined PATH_MAX && defined MAXPATHLEN
19677# define PATH_MAX MAXPATHLEN
19678#endif
19679#ifdef __hpux
19680# undef PATH_MAX
19681# define PATH_MAX 1024
19682#endif
19683#if defined _WIN32 && ! defined __CYGWIN__
19684# undef PATH_MAX
19685# define PATH_MAX 260
19686#endif
19687
19688#ifdef PATH_MAX
19689have_arbitrary_file_name_length_limit
19690#endif
19691_ACEOF
19692if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19693  $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
19694  gl_cv_have_unlimited_file_name_length=no
19695else
19696  gl_cv_have_unlimited_file_name_length=yes
19697fi
19698rm -f conftest*
19699
19700fi
19701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_unlimited_file_name_length" >&5
19702$as_echo "$gl_cv_have_unlimited_file_name_length" >&6; }
19703
19704  if test $gl_cv_have_unlimited_file_name_length = no; then
19705
19706
19707
19708
19709
19710
19711
19712
19713  gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
19714
19715    :
19716  fi
19717
19718  if test $HAVE_CHOWN = 0 || test $REPLACE_CHOWN = 1; then
19719
19720
19721
19722
19723
19724
19725
19726
19727  gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext"
19728
19729  fi
19730  if test $REPLACE_CHOWN = 1 && test $ac_cv_func_fchown = no; then
19731
19732
19733
19734
19735
19736
19737
19738
19739  gl_LIBOBJS="$gl_LIBOBJS fchown-stub.$ac_objext"
19740
19741  fi
19742
19743
19744
19745
19746
19747          GNULIB_CHOWN=1
19748
19749
19750
19751
19752
19753$as_echo "#define GNULIB_TEST_CHOWN 1" >>confdefs.h
19754
19755
19756
19757
19758
19759
19760  # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
19761  # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
19762
19763  # Save and restore LIBS so e.g., -lrt, isn't added to it.  Otherwise, *all*
19764  # programs in the package would end up linked with that potentially-shared
19765  # library, inducing unnecessary run-time overhead.
19766  LIB_CLOCK_GETTIME=
19767
19768  gl_saved_libs=$LIBS
19769    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
19770$as_echo_n "checking for library containing clock_gettime... " >&6; }
19771if ${ac_cv_search_clock_gettime+:} false; then :
19772  $as_echo_n "(cached) " >&6
19773else
19774  ac_func_search_save_LIBS=$LIBS
19775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19776/* end confdefs.h.  */
19777
19778/* Override any GCC internal prototype to avoid an error.
19779   Use char because int might match the return type of a GCC
19780   builtin and then its argument prototype would still apply.  */
19781#ifdef __cplusplus
19782extern "C"
19783#endif
19784char clock_gettime ();
19785int
19786main ()
19787{
19788return clock_gettime ();
19789  ;
19790  return 0;
19791}
19792_ACEOF
19793for ac_lib in '' rt posix4; do
19794  if test -z "$ac_lib"; then
19795    ac_res="none required"
19796  else
19797    ac_res=-l$ac_lib
19798    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19799  fi
19800  if ac_fn_c_try_link "$LINENO"; then :
19801  ac_cv_search_clock_gettime=$ac_res
19802fi
19803rm -f core conftest.err conftest.$ac_objext \
19804    conftest$ac_exeext
19805  if ${ac_cv_search_clock_gettime+:} false; then :
19806  break
19807fi
19808done
19809if ${ac_cv_search_clock_gettime+:} false; then :
19810
19811else
19812  ac_cv_search_clock_gettime=no
19813fi
19814rm conftest.$ac_ext
19815LIBS=$ac_func_search_save_LIBS
19816fi
19817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
19818$as_echo "$ac_cv_search_clock_gettime" >&6; }
19819ac_res=$ac_cv_search_clock_gettime
19820if test "$ac_res" != no; then :
19821  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19822  test "$ac_cv_search_clock_gettime" = "none required" ||
19823                    LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
19824fi
19825
19826    for ac_func in clock_gettime clock_settime
19827do :
19828  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19829ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19830if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
19831  cat >>confdefs.h <<_ACEOF
19832#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19833_ACEOF
19834
19835fi
19836done
19837
19838  LIBS=$gl_saved_libs
19839
19840
19841
19842$as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
19843
19844
19845
19846
19847
19848
19849    if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
19850      REPLACE_CLOSE=1
19851    fi
19852
19853
19854
19855
19856
19857
19858  if test $ac_cv_header_sys_socket_h != yes; then
19859                    for ac_header in winsock2.h
19860do :
19861  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
19862if test "x$ac_cv_header_winsock2_h" = xyes; then :
19863  cat >>confdefs.h <<_ACEOF
19864#define HAVE_WINSOCK2_H 1
19865_ACEOF
19866
19867fi
19868
19869done
19870
19871  fi
19872  if test "$ac_cv_header_winsock2_h" = yes; then
19873    HAVE_WINSOCK2_H=1
19874    UNISTD_H_HAVE_WINSOCK2_H=1
19875    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
19876  else
19877    HAVE_WINSOCK2_H=0
19878  fi
19879
19880
19881    if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
19882                        REPLACE_CLOSE=1
19883    fi
19884
19885
19886    if test $REPLACE_CLOSE = 0; then
19887
19888
19889
19890  if test $ac_cv_func_fchdir = no; then
19891    HAVE_FCHDIR=0
19892  fi
19893
19894      if test $HAVE_FCHDIR = 0; then
19895        REPLACE_CLOSE=1
19896      fi
19897    fi
19898
19899
19900  if test $REPLACE_CLOSE = 1; then
19901
19902
19903
19904
19905
19906
19907
19908
19909  gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
19910
19911  fi
19912
19913
19914
19915
19916
19917          GNULIB_CLOSE=1
19918
19919
19920
19921
19922
19923$as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
19924
19925
19926
19927
19928
19929cat >>confdefs.h <<_ACEOF
19930#define GNULIB_CLOSE_STREAM 1
19931_ACEOF
19932
19933
19934
19935
19936
19937  for ac_func in closedir
19938do :
19939  ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
19940if test "x$ac_cv_func_closedir" = xyes; then :
19941  cat >>confdefs.h <<_ACEOF
19942#define HAVE_CLOSEDIR 1
19943_ACEOF
19944
19945fi
19946done
19947
19948  if test $ac_cv_func_closedir = no; then
19949    HAVE_CLOSEDIR=0
19950  fi
19951
19952
19953
19954
19955  if test $ac_cv_func_fchdir = no; then
19956    HAVE_FCHDIR=0
19957  fi
19958
19959    if test $HAVE_FCHDIR = 0; then
19960      if test $HAVE_CLOSEDIR = 1; then
19961        REPLACE_CLOSEDIR=1
19962      fi
19963    fi
19964
19965    case $host_os,$HAVE_CLOSEDIR in
19966    os2*,1)
19967      REPLACE_CLOSEDIR=1;;
19968  esac
19969
19970  if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
19971
19972
19973
19974
19975
19976
19977
19978
19979  gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
19980
19981  fi
19982
19983
19984
19985
19986
19987          GNULIB_CLOSEDIR=1
19988
19989
19990
19991
19992
19993$as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
19994
19995
19996
19997
19998  if test "x$lispdir" = x; then
19999    lispdir='${datarootdir}/emacs/site-lisp'
20000
20001  fi
20002    if test "x$runstatedir" = x; then
20003    runstatedir='${localstatedir}/run'
20004
20005  fi
20006
20007      pkglibexecdir='${libexecdir}/${PACKAGE}'
20008
20009
20010
20011
20012
20013
20014
20015
20016
20017
20018
20019
20020
20021     if test $gl_cv_have_include_next = yes; then
20022       gl_cv_next_ctype_h='<'ctype.h'>'
20023     else
20024       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5
20025$as_echo_n "checking absolute name of <ctype.h>... " >&6; }
20026if ${gl_cv_next_ctype_h+:} false; then :
20027  $as_echo_n "(cached) " >&6
20028else
20029
20030
20031
20032  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20033/* end confdefs.h.  */
20034#include <ctype.h>
20035_ACEOF
20036                case "$host_os" in
20037    aix*) gl_absname_cpp="$ac_cpp -C" ;;
20038    *)    gl_absname_cpp="$ac_cpp" ;;
20039  esac
20040
20041  case "$host_os" in
20042    mingw*)
20043                                          gl_dirsep_regex='[/\\]'
20044      ;;
20045    *)
20046      gl_dirsep_regex='\/'
20047      ;;
20048  esac
20049      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20050  gl_header_literal_regex=`echo 'ctype.h' \
20051                           | sed -e "$gl_make_literal_regex_sed"`
20052  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20053      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20054      s|^/[^/]|//&|
20055      p
20056      q
20057    }'
20058
20059        gl_cv_absolute_ctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20060  sed -n "$gl_absolute_header_sed"`
20061
20062           gl_header=$gl_cv_absolute_ctype_h
20063           gl_cv_next_ctype_h='"'$gl_header'"'
20064
20065
20066fi
20067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5
20068$as_echo "$gl_cv_next_ctype_h" >&6; }
20069     fi
20070     NEXT_CTYPE_H=$gl_cv_next_ctype_h
20071
20072     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20073       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20074       gl_next_as_first_directive='<'ctype.h'>'
20075     else
20076       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20077       gl_next_as_first_directive=$gl_cv_next_ctype_h
20078     fi
20079     NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive
20080
20081
20082
20083
20084
20085
20086
20087
20088
20089      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
20090$as_echo_n "checking for d_ino member in directory struct... " >&6; }
20091if ${gl_cv_struct_dirent_d_ino+:} false; then :
20092  $as_echo_n "(cached) " >&6
20093else
20094  if test "$cross_compiling" = yes; then :
20095  case "$host_os" in
20096                            # Guess yes on glibc systems with Linux kernel.
20097              linux*-gnu*)  gl_cv_struct_dirent_d_ino="guessing yes" ;;
20098                            # Guess yes on musl systems with Linux kernel.
20099              linux*-musl*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
20100                            # Guess no on native Windows.
20101              mingw*)       gl_cv_struct_dirent_d_ino="guessing no" ;;
20102                            # If we don't know, obey --enable-cross-guesses.
20103              *)            gl_cv_struct_dirent_d_ino="$gl_cross_guess_normal" ;;
20104            esac
20105
20106else
20107  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20108/* end confdefs.h.  */
20109#include <sys/types.h>
20110             #include <sys/stat.h>
20111             #include <dirent.h>
20112
20113int
20114main ()
20115{
20116DIR *dp = opendir (".");
20117             struct dirent *e;
20118             struct stat st;
20119             if (! dp)
20120               return 1;
20121             e = readdir (dp);
20122             if (! e)
20123               { closedir (dp); return 2; }
20124             if (lstat (e->d_name, &st) != 0)
20125               { closedir (dp); return 3; }
20126             if (e->d_ino != st.st_ino)
20127               { closedir (dp); return 4; }
20128             closedir (dp);
20129             return 0;
20130
20131  ;
20132  return 0;
20133}
20134_ACEOF
20135if ac_fn_c_try_run "$LINENO"; then :
20136  gl_cv_struct_dirent_d_ino=yes
20137else
20138  gl_cv_struct_dirent_d_ino=no
20139fi
20140rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20141  conftest.$ac_objext conftest.beam conftest.$ac_ext
20142fi
20143
20144fi
20145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
20146$as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
20147   case "$gl_cv_struct_dirent_d_ino" in
20148     *yes)
20149
20150$as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
20151
20152       ;;
20153   esac
20154
20155
20156
20157
20158
20159
20160
20161
20162
20163
20164
20165
20166
20167
20168     if test $gl_cv_have_include_next = yes; then
20169       gl_cv_next_dirent_h='<'dirent.h'>'
20170     else
20171       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
20172$as_echo_n "checking absolute name of <dirent.h>... " >&6; }
20173if ${gl_cv_next_dirent_h+:} false; then :
20174  $as_echo_n "(cached) " >&6
20175else
20176
20177             if test $ac_cv_header_dirent_h = yes; then
20178
20179
20180
20181
20182  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20183/* end confdefs.h.  */
20184#include <dirent.h>
20185_ACEOF
20186                case "$host_os" in
20187    aix*) gl_absname_cpp="$ac_cpp -C" ;;
20188    *)    gl_absname_cpp="$ac_cpp" ;;
20189  esac
20190
20191  case "$host_os" in
20192    mingw*)
20193                                          gl_dirsep_regex='[/\\]'
20194      ;;
20195    *)
20196      gl_dirsep_regex='\/'
20197      ;;
20198  esac
20199      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20200  gl_header_literal_regex=`echo 'dirent.h' \
20201                           | sed -e "$gl_make_literal_regex_sed"`
20202  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20203      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20204      s|^/[^/]|//&|
20205      p
20206      q
20207    }'
20208
20209        gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20210  sed -n "$gl_absolute_header_sed"`
20211
20212           gl_header=$gl_cv_absolute_dirent_h
20213           gl_cv_next_dirent_h='"'$gl_header'"'
20214          else
20215               gl_cv_next_dirent_h='<'dirent.h'>'
20216             fi
20217
20218
20219fi
20220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
20221$as_echo "$gl_cv_next_dirent_h" >&6; }
20222     fi
20223     NEXT_DIRENT_H=$gl_cv_next_dirent_h
20224
20225     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20226       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20227       gl_next_as_first_directive='<'dirent.h'>'
20228     else
20229       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20230       gl_next_as_first_directive=$gl_cv_next_dirent_h
20231     fi
20232     NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
20233
20234
20235
20236
20237  if test $ac_cv_header_dirent_h = yes; then
20238    HAVE_DIRENT_H=1
20239  else
20240    HAVE_DIRENT_H=0
20241  fi
20242
20243
20244
20245
20246
20247
20248
20249
20250
20251
20252
20253cat >>confdefs.h <<_ACEOF
20254#define GNULIB_DIRENT_SAFER 1
20255_ACEOF
20256
20257
20258
20259
20260
20261
20262
20263  for ac_func in dirfd
20264do :
20265  ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
20266if test "x$ac_cv_func_dirfd" = xyes; then :
20267  cat >>confdefs.h <<_ACEOF
20268#define HAVE_DIRFD 1
20269_ACEOF
20270
20271fi
20272done
20273
20274  ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
20275      #include <dirent.h>
20276"
20277if test "x$ac_cv_have_decl_dirfd" = xyes; then :
20278  ac_have_decl=1
20279else
20280  ac_have_decl=0
20281fi
20282
20283cat >>confdefs.h <<_ACEOF
20284#define HAVE_DECL_DIRFD $ac_have_decl
20285_ACEOF
20286
20287  if test $ac_cv_have_decl_dirfd = no; then
20288    HAVE_DECL_DIRFD=0
20289  fi
20290
20291  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
20292$as_echo_n "checking whether dirfd is a macro... " >&6; }
20293if ${gl_cv_func_dirfd_macro+:} false; then :
20294  $as_echo_n "(cached) " >&6
20295else
20296  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20297/* end confdefs.h.  */
20298
20299#include <sys/types.h>
20300#include <dirent.h>
20301#ifdef dirfd
20302 dirent_header_defines_dirfd
20303#endif
20304_ACEOF
20305if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20306  $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
20307  gl_cv_func_dirfd_macro=yes
20308else
20309  gl_cv_func_dirfd_macro=no
20310fi
20311rm -f conftest*
20312
20313fi
20314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
20315$as_echo "$gl_cv_func_dirfd_macro" >&6; }
20316
20317  # Use the replacement if we have no function or macro with that name,
20318  # or if OS/2 kLIBC whose dirfd() does not work.
20319  # Replace only if the system declares dirfd already.
20320  case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
20321    no,no,*,yes | *,*,os2*,yes)
20322      REPLACE_DIRFD=1
20323
20324$as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
20325;;
20326  esac
20327
20328  if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
20329     || test $REPLACE_DIRFD = 1; then
20330
20331
20332
20333
20334
20335
20336
20337
20338  gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
20339
20340
20341  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
20342$as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
20343if ${gl_cv_sys_dir_fd_member_name+:} false; then :
20344  $as_echo_n "(cached) " >&6
20345else
20346
20347      dirfd_save_CFLAGS=$CFLAGS
20348      for ac_expr in d_fd dd_fd; do
20349
20350        CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
20351        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20352/* end confdefs.h.  */
20353
20354           #include <sys/types.h>
20355           #include <dirent.h>
20356int
20357main ()
20358{
20359DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
20360  ;
20361  return 0;
20362}
20363_ACEOF
20364if ac_fn_c_try_compile "$LINENO"; then :
20365  dir_fd_found=yes
20366
20367fi
20368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20369        CFLAGS=$dirfd_save_CFLAGS
20370        test "$dir_fd_found" = yes && break
20371      done
20372      test "$dir_fd_found" = yes || ac_expr=no_such_member
20373
20374      gl_cv_sys_dir_fd_member_name=$ac_expr
20375
20376
20377fi
20378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
20379$as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
20380  if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
20381
20382cat >>confdefs.h <<_ACEOF
20383#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
20384_ACEOF
20385
20386  fi
20387
20388
20389  fi
20390
20391
20392
20393
20394
20395          GNULIB_DIRFD=1
20396
20397
20398
20399
20400
20401$as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
20402
20403
20404
20405
20406
20407cat >>confdefs.h <<_ACEOF
20408#define GNULIB_DIRNAME 1
20409_ACEOF
20410
20411
20412
20413
20414  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
20415$as_echo_n "checking whether // is distinct from /... " >&6; }
20416if ${gl_cv_double_slash_root+:} false; then :
20417  $as_echo_n "(cached) " >&6
20418else
20419   if test x"$cross_compiling" = xyes ; then
20420        # When cross-compiling, there is no way to tell whether // is special
20421        # short of a list of hosts.  However, the only known hosts to date
20422        # that have a distinct // are Apollo DomainOS (too old to port to),
20423        # Cygwin, and z/OS.  If anyone knows of another system for which // has
20424        # special semantics and is distinct from /, please report it to
20425        # <bug-gnulib@gnu.org>.
20426        case $host in
20427          *-cygwin | i370-ibm-openedition)
20428            gl_cv_double_slash_root=yes ;;
20429          *)
20430            # Be optimistic and assume that / and // are the same when we
20431            # don't know.
20432            gl_cv_double_slash_root='unknown, assuming no' ;;
20433        esac
20434      else
20435        set x `ls -di / // 2>/dev/null`
20436        if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
20437          gl_cv_double_slash_root=no
20438        else
20439          gl_cv_double_slash_root=yes
20440        fi
20441      fi
20442fi
20443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
20444$as_echo "$gl_cv_double_slash_root" >&6; }
20445  if test "$gl_cv_double_slash_root" = yes; then
20446
20447$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
20448
20449  fi
20450
20451
20452
20453
20454
20455    if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
20456      REPLACE_DUP=1
20457    fi
20458
20459
20460
20461
20462
20463  if test $ac_cv_func_fchdir = no; then
20464    HAVE_FCHDIR=0
20465  fi
20466
20467    if test $HAVE_FCHDIR = 0; then
20468      REPLACE_DUP=1
20469    fi
20470
20471  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
20472$as_echo_n "checking whether dup works... " >&6; }
20473if ${gl_cv_func_dup_works+:} false; then :
20474  $as_echo_n "(cached) " >&6
20475else
20476  if test "$cross_compiling" = yes; then :
20477  case "$host_os" in
20478                 # Guess no on native Windows.
20479         mingw*) gl_cv_func_dup_works="guessing no" ;;
20480         *)      gl_cv_func_dup_works="guessing yes" ;;
20481       esac
20482
20483else
20484  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20485/* end confdefs.h.  */
20486#include <unistd.h>
20487                         #include <fcntl.h>
20488                         #include <errno.h>
20489
20490
20491$gl_mda_defines
20492
20493int
20494main ()
20495{
20496/* On OS/2 kLIBC, dup does not work on a directory fd.  */
20497           int fd = open (".", O_RDONLY);
20498           return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
20499
20500  ;
20501  return 0;
20502}
20503
20504_ACEOF
20505if ac_fn_c_try_run "$LINENO"; then :
20506  gl_cv_func_dup_works=yes
20507else
20508  gl_cv_func_dup_works=no
20509fi
20510rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20511  conftest.$ac_objext conftest.beam conftest.$ac_ext
20512fi
20513
20514
20515fi
20516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
20517$as_echo "$gl_cv_func_dup_works" >&6; }
20518  case "$gl_cv_func_dup_works" in
20519    *yes) ;;
20520    *)
20521      REPLACE_DUP=1
20522      ;;
20523  esac
20524
20525  if test $REPLACE_DUP = 1; then
20526
20527
20528
20529
20530
20531
20532
20533
20534  gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
20535
20536    :
20537  fi
20538
20539
20540
20541
20542
20543          GNULIB_DUP=1
20544
20545
20546
20547
20548
20549$as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
20550
20551
20552
20553
20554
20555
20556  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
20557$as_echo_n "checking whether dup2 works... " >&6; }
20558if ${gl_cv_func_dup2_works+:} false; then :
20559  $as_echo_n "(cached) " >&6
20560else
20561  if test "$cross_compiling" = yes; then :
20562  case "$host_os" in
20563         mingw*) # on this platform, dup2 always returns 0 for success
20564           gl_cv_func_dup2_works="guessing no" ;;
20565         cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
20566           gl_cv_func_dup2_works="guessing no" ;;
20567         aix* | freebsd*)
20568                 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
20569                 # not EBADF.
20570           gl_cv_func_dup2_works="guessing no" ;;
20571         haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
20572           gl_cv_func_dup2_works="guessing no" ;;
20573         *-android*) # implemented using dup3(), which fails if oldfd == newfd
20574           gl_cv_func_dup2_works="guessing no" ;;
20575         os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
20576           gl_cv_func_dup2_works="guessing no" ;;
20577         *) gl_cv_func_dup2_works="guessing yes" ;;
20578       esac
20579else
20580  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20581/* end confdefs.h.  */
20582
20583       #include <errno.h>
20584           #include <fcntl.h>
20585           #include <limits.h>
20586           #include <sys/resource.h>
20587           #include <unistd.h>
20588
20589
20590$gl_mda_defines
20591
20592           #ifndef RLIM_SAVED_CUR
20593           # define RLIM_SAVED_CUR RLIM_INFINITY
20594           #endif
20595           #ifndef RLIM_SAVED_MAX
20596           # define RLIM_SAVED_MAX RLIM_INFINITY
20597           #endif
20598
20599int
20600main ()
20601{
20602int result = 0;
20603           int bad_fd = INT_MAX;
20604           struct rlimit rlim;
20605           if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
20606               && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
20607               && rlim.rlim_cur != RLIM_INFINITY
20608               && rlim.rlim_cur != RLIM_SAVED_MAX
20609               && rlim.rlim_cur != RLIM_SAVED_CUR)
20610             bad_fd = rlim.rlim_cur;
20611           #ifdef FD_CLOEXEC
20612             if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
20613               result |= 1;
20614           #endif
20615           if (dup2 (1, 1) != 1)
20616             result |= 2;
20617           #ifdef FD_CLOEXEC
20618             if (fcntl (1, F_GETFD) != FD_CLOEXEC)
20619               result |= 4;
20620           #endif
20621           close (0);
20622           if (dup2 (0, 0) != -1)
20623             result |= 8;
20624           /* Many gnulib modules require POSIX conformance of EBADF.  */
20625           if (dup2 (2, bad_fd) == -1 && errno != EBADF)
20626             result |= 16;
20627           /* Flush out some cygwin core dumps.  */
20628           if (dup2 (2, -1) != -1 || errno != EBADF)
20629             result |= 32;
20630           dup2 (2, 255);
20631           dup2 (2, 256);
20632           /* On OS/2 kLIBC, dup2() does not work on a directory fd.  */
20633           {
20634             int fd = open (".", O_RDONLY);
20635             if (fd == -1)
20636               result |= 64;
20637             else if (dup2 (fd, fd + 1) == -1)
20638               result |= 128;
20639             close (fd);
20640           }
20641           return result;
20642  ;
20643  return 0;
20644}
20645
20646_ACEOF
20647if ac_fn_c_try_run "$LINENO"; then :
20648  gl_cv_func_dup2_works=yes
20649else
20650  gl_cv_func_dup2_works=no
20651fi
20652rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20653  conftest.$ac_objext conftest.beam conftest.$ac_ext
20654fi
20655
20656
20657fi
20658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
20659$as_echo "$gl_cv_func_dup2_works" >&6; }
20660  case "$gl_cv_func_dup2_works" in
20661    *yes) ;;
20662    *)
20663      REPLACE_DUP2=1
20664      for ac_func in setdtablesize
20665do :
20666  ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
20667if test "x$ac_cv_func_setdtablesize" = xyes; then :
20668  cat >>confdefs.h <<_ACEOF
20669#define HAVE_SETDTABLESIZE 1
20670_ACEOF
20671
20672fi
20673done
20674
20675      ;;
20676  esac
20677
20678
20679
20680
20681  if test $ac_cv_func_fchdir = no; then
20682    HAVE_FCHDIR=0
20683  fi
20684
20685    if test $HAVE_FCHDIR = 0; then
20686      REPLACE_DUP2=1
20687    fi
20688
20689
20690  if test $REPLACE_DUP2 = 1; then
20691
20692
20693
20694
20695
20696
20697
20698
20699  gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
20700
20701
20702  fi
20703
20704
20705
20706
20707
20708          GNULIB_DUP2=1
20709
20710
20711
20712
20713
20714$as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
20715
20716
20717
20718
20719
20720
20721
20722
20723
20724          GNULIB_ENVIRON=1
20725
20726
20727
20728
20729
20730$as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
20731
20732
20733
20734
20735
20736      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
20737$as_echo_n "checking for error_at_line... " >&6; }
20738if ${ac_cv_lib_error_at_line+:} false; then :
20739  $as_echo_n "(cached) " >&6
20740else
20741  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20742/* end confdefs.h.  */
20743#include <error.h>
20744int
20745main ()
20746{
20747error_at_line (0, 0, "", 0, "an error occurred");
20748  ;
20749  return 0;
20750}
20751_ACEOF
20752if ac_fn_c_try_link "$LINENO"; then :
20753  ac_cv_lib_error_at_line=yes
20754else
20755  ac_cv_lib_error_at_line=no
20756fi
20757rm -f core conftest.err conftest.$ac_objext \
20758    conftest$ac_exeext conftest.$ac_ext
20759fi
20760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
20761$as_echo "$ac_cv_lib_error_at_line" >&6; }
20762
20763  if test $ac_cv_lib_error_at_line = no; then
20764
20765
20766
20767
20768
20769
20770
20771
20772  gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
20773
20774
20775
20776  :
20777
20778  fi
20779
20780
20781  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
20782
20783
20784
20785  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
20786
20787
20788
20789
20790
20791
20792  for ac_func in euidaccess
20793do :
20794  ac_fn_c_check_func "$LINENO" "euidaccess" "ac_cv_func_euidaccess"
20795if test "x$ac_cv_func_euidaccess" = xyes; then :
20796  cat >>confdefs.h <<_ACEOF
20797#define HAVE_EUIDACCESS 1
20798_ACEOF
20799
20800fi
20801done
20802
20803  if test $ac_cv_func_euidaccess = no; then
20804    HAVE_EUIDACCESS=0
20805  fi
20806
20807  if test $HAVE_EUIDACCESS = 0; then
20808
20809
20810
20811
20812
20813
20814
20815
20816  gl_LIBOBJS="$gl_LIBOBJS euidaccess.$ac_objext"
20817
20818
20819
20820    for ac_header in libgen.h
20821do :
20822  ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
20823if test "x$ac_cv_header_libgen_h" = xyes; then :
20824  cat >>confdefs.h <<_ACEOF
20825#define HAVE_LIBGEN_H 1
20826_ACEOF
20827
20828fi
20829
20830done
20831
20832
20833        ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
20834if test "x$ac_cv_func_getgroups" = xyes; then :
20835
20836fi
20837
20838
20839  # If we don't yet have getgroups, see if it's in -lbsd.
20840  # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
20841  ac_save_LIBS=$LIBS
20842  if test $ac_cv_func_getgroups = no; then
20843    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
20844$as_echo_n "checking for getgroups in -lbsd... " >&6; }
20845if ${ac_cv_lib_bsd_getgroups+:} false; then :
20846  $as_echo_n "(cached) " >&6
20847else
20848  ac_check_lib_save_LIBS=$LIBS
20849LIBS="-lbsd  $LIBS"
20850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20851/* end confdefs.h.  */
20852
20853/* Override any GCC internal prototype to avoid an error.
20854   Use char because int might match the return type of a GCC
20855   builtin and then its argument prototype would still apply.  */
20856#ifdef __cplusplus
20857extern "C"
20858#endif
20859char getgroups ();
20860int
20861main ()
20862{
20863return getgroups ();
20864  ;
20865  return 0;
20866}
20867_ACEOF
20868if ac_fn_c_try_link "$LINENO"; then :
20869  ac_cv_lib_bsd_getgroups=yes
20870else
20871  ac_cv_lib_bsd_getgroups=no
20872fi
20873rm -f core conftest.err conftest.$ac_objext \
20874    conftest$ac_exeext conftest.$ac_ext
20875LIBS=$ac_check_lib_save_LIBS
20876fi
20877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
20878$as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
20879if test "x$ac_cv_lib_bsd_getgroups" = xyes; then :
20880  GETGROUPS_LIB=-lbsd
20881fi
20882
20883  fi
20884
20885  # Run the program to test the functionality of the system-supplied
20886  # getgroups function only if there is such a function.
20887  if test $ac_cv_func_getgroups = yes; then
20888    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
20889$as_echo_n "checking for working getgroups... " >&6; }
20890if ${ac_cv_func_getgroups_works+:} false; then :
20891  $as_echo_n "(cached) " >&6
20892else
20893  if test "$cross_compiling" = yes; then :
20894  case "$host_os" in # ((
20895                           # Guess yes on glibc systems.
20896            *-gnu* | gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
20897                           # Guess yes on musl systems.
20898            *-musl*)       ac_cv_func_getgroups_works="guessing yes" ;;
20899                           # If we don't know, obey --enable-cross-guesses.
20900            *)             ac_cv_func_getgroups_works="$gl_cross_guess_normal" ;;
20901          esac
20902
20903else
20904  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20905/* end confdefs.h.  */
20906$ac_includes_default
20907int
20908main ()
20909{
20910/* On NeXTstep 3.2, getgroups (0, 0) always fails.  */
20911              return getgroups (0, 0) == -1;
20912  ;
20913  return 0;
20914}
20915
20916_ACEOF
20917if ac_fn_c_try_run "$LINENO"; then :
20918  ac_cv_func_getgroups_works=yes
20919else
20920  ac_cv_func_getgroups_works=no
20921fi
20922rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20923  conftest.$ac_objext conftest.beam conftest.$ac_ext
20924fi
20925
20926
20927fi
20928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
20929$as_echo "$ac_cv_func_getgroups_works" >&6; }
20930  else
20931    ac_cv_func_getgroups_works=no
20932  fi
20933  case "$ac_cv_func_getgroups_works" in
20934    *yes)
20935
20936$as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
20937
20938      ;;
20939  esac
20940  LIBS=$ac_save_LIBS
20941
20942
20943  # Solaris 9 and 10 need -lgen to get the eaccess function.
20944  # Save and restore LIBS so -lgen isn't added to it.  Otherwise, *all*
20945  # programs in the package would end up linked with that potentially-shared
20946  # library, inducing unnecessary run-time overhead.
20947  LIB_EACCESS=
20948
20949  gl_saved_libs=$LIBS
20950    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing eaccess" >&5
20951$as_echo_n "checking for library containing eaccess... " >&6; }
20952if ${ac_cv_search_eaccess+:} false; then :
20953  $as_echo_n "(cached) " >&6
20954else
20955  ac_func_search_save_LIBS=$LIBS
20956cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20957/* end confdefs.h.  */
20958
20959/* Override any GCC internal prototype to avoid an error.
20960   Use char because int might match the return type of a GCC
20961   builtin and then its argument prototype would still apply.  */
20962#ifdef __cplusplus
20963extern "C"
20964#endif
20965char eaccess ();
20966int
20967main ()
20968{
20969return eaccess ();
20970  ;
20971  return 0;
20972}
20973_ACEOF
20974for ac_lib in '' gen; do
20975  if test -z "$ac_lib"; then
20976    ac_res="none required"
20977  else
20978    ac_res=-l$ac_lib
20979    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20980  fi
20981  if ac_fn_c_try_link "$LINENO"; then :
20982  ac_cv_search_eaccess=$ac_res
20983fi
20984rm -f core conftest.err conftest.$ac_objext \
20985    conftest$ac_exeext
20986  if ${ac_cv_search_eaccess+:} false; then :
20987  break
20988fi
20989done
20990if ${ac_cv_search_eaccess+:} false; then :
20991
20992else
20993  ac_cv_search_eaccess=no
20994fi
20995rm conftest.$ac_ext
20996LIBS=$ac_func_search_save_LIBS
20997fi
20998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_eaccess" >&5
20999$as_echo "$ac_cv_search_eaccess" >&6; }
21000ac_res=$ac_cv_search_eaccess
21001if test "$ac_res" != no; then :
21002  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21003  test "$ac_cv_search_eaccess" = "none required" ||
21004                    LIB_EACCESS=$ac_cv_search_eaccess
21005fi
21006
21007    for ac_func in eaccess
21008do :
21009  ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess"
21010if test "x$ac_cv_func_eaccess" = xyes; then :
21011  cat >>confdefs.h <<_ACEOF
21012#define HAVE_EACCESS 1
21013_ACEOF
21014
21015fi
21016done
21017
21018  LIBS=$gl_saved_libs
21019
21020  fi
21021
21022
21023
21024
21025
21026          GNULIB_EUIDACCESS=1
21027
21028
21029
21030
21031
21032$as_echo "#define GNULIB_TEST_EUIDACCESS 1" >>confdefs.h
21033
21034
21035
21036
21037
21038
21039
21040
21041
21042
21043
21044  if test $ac_cv_func_faccessat = no; then
21045    HAVE_FACCESSAT=0
21046  else
21047    case $gl_cv_func_lstat_dereferences_slashed_symlink in
21048      *yes) ;;
21049      *)    REPLACE_FACCESSAT=1 ;;
21050    esac
21051  fi
21052
21053  if test $HAVE_FACCESSAT = 0 || test $REPLACE_FACCESSAT = 1; then
21054
21055
21056
21057
21058
21059
21060
21061
21062  gl_LIBOBJS="$gl_LIBOBJS faccessat.$ac_objext"
21063
21064
21065  for ac_func in access
21066do :
21067  ac_fn_c_check_func "$LINENO" "access" "ac_cv_func_access"
21068if test "x$ac_cv_func_access" = xyes; then :
21069  cat >>confdefs.h <<_ACEOF
21070#define HAVE_ACCESS 1
21071_ACEOF
21072
21073fi
21074done
21075
21076
21077  fi
21078
21079
21080cat >>confdefs.h <<_ACEOF
21081#define GNULIB_FACCESSAT 1
21082_ACEOF
21083
21084
21085
21086
21087
21088
21089
21090          GNULIB_FACCESSAT=1
21091
21092
21093
21094
21095
21096$as_echo "#define GNULIB_TEST_FACCESSAT 1" >>confdefs.h
21097
21098
21099
21100
21101
21102
21103
21104
21105  if test $ac_cv_have_decl_fchdir = no; then
21106    HAVE_DECL_FCHDIR=0
21107  fi
21108
21109
21110  if test $HAVE_FCHDIR = 0; then
21111
21112
21113
21114
21115
21116
21117
21118
21119  gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
21120
21121    :
21122
21123$as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
21124
21125                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
21126$as_echo_n "checking whether open can visit directories... " >&6; }
21127if ${gl_cv_func_open_directory_works+:} false; then :
21128  $as_echo_n "(cached) " >&6
21129else
21130  if test "$cross_compiling" = yes; then :
21131  case "$host_os" in
21132                             # Guess yes on Linux systems.
21133            linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;;
21134                             # Guess yes on glibc systems.
21135            *-gnu* | gnu*)   gl_cv_func_open_directory_works="guessing yes" ;;
21136                             # Guess no on native Windows.
21137            mingw*)          gl_cv_func_open_directory_works="guessing no" ;;
21138                             # If we don't know, obey --enable-cross-guesses.
21139            *)               gl_cv_func_open_directory_works="$gl_cross_guess_normal" ;;
21140          esac
21141
21142else
21143  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21144/* end confdefs.h.  */
21145#include <fcntl.h>
21146
21147
21148$gl_mda_defines
21149
21150int
21151main ()
21152{
21153return open(".", O_RDONLY) < 0;
21154  ;
21155  return 0;
21156}
21157_ACEOF
21158if ac_fn_c_try_run "$LINENO"; then :
21159  gl_cv_func_open_directory_works=yes
21160else
21161  gl_cv_func_open_directory_works=no
21162fi
21163rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21164  conftest.$ac_objext conftest.beam conftest.$ac_ext
21165fi
21166
21167fi
21168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
21169$as_echo "$gl_cv_func_open_directory_works" >&6; }
21170    case "$gl_cv_func_open_directory_works" in
21171      *yes) ;;
21172      *)
21173
21174$as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
21175
21176        ;;
21177    esac
21178  fi
21179
21180
21181
21182
21183
21184
21185          GNULIB_FCHDIR=1
21186
21187
21188
21189
21190
21191$as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
21192
21193
21194
21195
21196
21197
21198
21199  if test $ac_cv_func_fchmodat != yes; then
21200    HAVE_FCHMODAT=0
21201  else
21202    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchmodat+AT_SYMLINK_NOFOLLOW works on non-symlinks" >&5
21203$as_echo_n "checking whether fchmodat+AT_SYMLINK_NOFOLLOW works on non-symlinks... " >&6; }
21204if ${gl_cv_func_fchmodat_works+:} false; then :
21205  $as_echo_n "(cached) " >&6
21206else
21207                if test "$cross_compiling" = yes; then :
21208  case "$host_os" in
21209                        linux-gnu* | cygwin*) gl_cv_func_fchmodat_works="guessing no" ;;
21210            *)                    gl_cv_func_fchmodat_works="$gl_cross_guess_normal" ;;
21211          esac
21212
21213else
21214  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21215/* end confdefs.h.  */
21216
21217              $ac_includes_default
21218              #include <fcntl.h>
21219              #ifndef S_IRUSR
21220               #define S_IRUSR 0400
21221              #endif
21222              #ifndef S_IWUSR
21223               #define S_IWUSR 0200
21224              #endif
21225              #ifndef S_IRWXU
21226               #define S_IRWXU 0700
21227              #endif
21228              #ifndef S_IRWXG
21229               #define S_IRWXG 0070
21230              #endif
21231              #ifndef S_IRWXO
21232               #define S_IRWXO 0007
21233              #endif
21234
21235
21236$gl_mda_defines
21237
21238int
21239main ()
21240{
21241
21242              int permissive = S_IRWXU | S_IRWXG | S_IRWXO;
21243              int desired = S_IRUSR | S_IWUSR;
21244              static char const f[] = "conftest.fchmodat";
21245              struct stat st;
21246              if (creat (f, permissive) < 0)
21247                return 1;
21248              if (fchmodat (AT_FDCWD, f, desired, AT_SYMLINK_NOFOLLOW) != 0)
21249                return 1;
21250              if (stat (f, &st) != 0)
21251                return 1;
21252              return ! ((st.st_mode & permissive) == desired);
21253
21254  ;
21255  return 0;
21256}
21257_ACEOF
21258if ac_fn_c_try_run "$LINENO"; then :
21259  gl_cv_func_fchmodat_works=yes
21260else
21261  gl_cv_func_fchmodat_works=no
21262fi
21263rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21264  conftest.$ac_objext conftest.beam conftest.$ac_ext
21265fi
21266
21267       rm -f conftest.fchmodat
21268fi
21269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchmodat_works" >&5
21270$as_echo "$gl_cv_func_fchmodat_works" >&6; }
21271    case $gl_cv_func_fchmodat_works in
21272      *yes) ;;
21273      *)
21274
21275$as_echo "#define NEED_FCHMODAT_NONSYMLINK_FIX 1" >>confdefs.h
21276
21277        REPLACE_FCHMODAT=1
21278        ;;
21279    esac
21280  fi
21281
21282  if test $HAVE_FCHMODAT = 0 || test $REPLACE_FCHMODAT = 1; then
21283
21284
21285
21286
21287
21288
21289
21290
21291  gl_LIBOBJS="$gl_LIBOBJS fchmodat.$ac_objext"
21292
21293
21294
21295  :
21296
21297  fi
21298
21299
21300
21301
21302
21303          GNULIB_FCHMODAT=1
21304
21305
21306
21307
21308
21309$as_echo "#define GNULIB_TEST_FCHMODAT 1" >>confdefs.h
21310
21311
21312
21313
21314
21315
21316
21317  ac_fn_c_check_func "$LINENO" "fchownat" "ac_cv_func_fchownat"
21318if test "x$ac_cv_func_fchownat" = xyes; then :
21319
21320
21321
21322  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with AT_SYMLINK_NOFOLLOW" >&5
21323$as_echo_n "checking whether fchownat works with AT_SYMLINK_NOFOLLOW... " >&6; }
21324if ${gl_cv_func_fchownat_nofollow_works+:} false; then :
21325  $as_echo_n "(cached) " >&6
21326else
21327
21328     gl_dangle=conftest.dangle
21329     # Remove any remnants of a previous test.
21330     rm -f $gl_dangle
21331     # Arrange for deletion of the temporary file this test creates.
21332     ac_clean_files="$ac_clean_files $gl_dangle"
21333     ln -s conftest.no-such $gl_dangle
21334     if test "$cross_compiling" = yes; then :
21335  gl_cv_func_fchownat_nofollow_works="$gl_cross_guess_normal"
21336else
21337  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21338/* end confdefs.h.  */
21339
21340#include <fcntl.h>
21341#include <unistd.h>
21342/* Android 4.3 declares fchownat() in <sys/stat.h> instead.  */
21343#include <sys/stat.h>
21344#include <stdlib.h>
21345#include <errno.h>
21346#include <sys/types.h>
21347int
21348main ()
21349{
21350  return (fchownat (AT_FDCWD, "$gl_dangle", (uid_t)(-1), getgid (),
21351                    AT_SYMLINK_NOFOLLOW) != 0
21352          && errno == ENOENT);
21353}
21354
21355_ACEOF
21356if ac_fn_c_try_run "$LINENO"; then :
21357  gl_cv_func_fchownat_nofollow_works=yes
21358else
21359  gl_cv_func_fchownat_nofollow_works=no
21360fi
21361rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21362  conftest.$ac_objext conftest.beam conftest.$ac_ext
21363fi
21364
21365
21366fi
21367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_nofollow_works" >&5
21368$as_echo "$gl_cv_func_fchownat_nofollow_works" >&6; }
21369  if test "$gl_cv_func_fchownat_nofollow_works" != yes; then :
21370  REPLACE_FCHOWNAT=1
21371
21372$as_echo "#define FCHOWNAT_NOFOLLOW_BUG 1" >>confdefs.h
21373
21374
21375fi
21376
21377
21378
21379
21380  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with an empty file name" >&5
21381$as_echo_n "checking whether fchownat works with an empty file name... " >&6; }
21382if ${gl_cv_func_fchownat_empty_filename_works+:} false; then :
21383  $as_echo_n "(cached) " >&6
21384else
21385  if test "$cross_compiling" = yes; then :
21386  gl_cv_func_fchownat_empty_filename_works="$gl_cross_guess_normal"
21387else
21388  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21389/* end confdefs.h.  */
21390#include <unistd.h>
21391            #include <fcntl.h>
21392            /* Android 4.3 declares fchownat() in <sys/stat.h> instead.  */
21393            #include <sys/stat.h>
21394
21395
21396$gl_mda_defines
21397
21398int
21399main ()
21400{
21401int fd;
21402            int ret;
21403            if (mkdir ("conftestdir", 0700) < 0)
21404              return 2;
21405            fd = open ("conftestdir", O_RDONLY);
21406            if (fd < 0)
21407              return 3;
21408            ret = fchownat (fd, "", (uid_t)(-1), (gid_t)(-1), 0);
21409            close (fd);
21410            rmdir ("conftestdir");
21411            return ret == 0;
21412
21413  ;
21414  return 0;
21415}
21416_ACEOF
21417if ac_fn_c_try_run "$LINENO"; then :
21418  gl_cv_func_fchownat_empty_filename_works=yes
21419else
21420  gl_cv_func_fchownat_empty_filename_works=no
21421fi
21422rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21423  conftest.$ac_objext conftest.beam conftest.$ac_ext
21424fi
21425
21426
21427fi
21428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_empty_filename_works" >&5
21429$as_echo "$gl_cv_func_fchownat_empty_filename_works" >&6; }
21430  if test "$gl_cv_func_fchownat_empty_filename_works" != yes; then :
21431  REPLACE_FCHOWNAT=1
21432
21433$as_echo "#define FCHOWNAT_EMPTY_FILENAME_BUG 1" >>confdefs.h
21434
21435
21436fi
21437
21438     if test $REPLACE_CHOWN = 1; then
21439       REPLACE_FCHOWNAT=1
21440     fi
21441else
21442  HAVE_FCHOWNAT=0
21443fi
21444
21445
21446  if test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1; then
21447
21448
21449
21450
21451
21452
21453
21454
21455  gl_LIBOBJS="$gl_LIBOBJS fchownat.$ac_objext"
21456
21457  fi
21458
21459
21460
21461
21462
21463          GNULIB_FCHOWNAT=1
21464
21465
21466
21467
21468
21469$as_echo "#define GNULIB_TEST_FCHOWNAT 1" >>confdefs.h
21470
21471
21472
21473
21474
21475
21476
21477
21478  if test $ac_cv_func_fcntl = no; then
21479
21480
21481
21482  if test $ac_cv_func_fcntl = no; then
21483    HAVE_FCNTL=0
21484  else
21485    REPLACE_FCNTL=1
21486  fi
21487
21488  else
21489            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
21490$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
21491if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
21492  $as_echo_n "(cached) " >&6
21493else
21494  if test "$cross_compiling" = yes; then :
21495  case $host_os in
21496            aix* | cygwin* | haiku*)
21497               gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
21498            *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
21499          esac
21500else
21501  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21502/* end confdefs.h.  */
21503#include <errno.h>
21504              #include <fcntl.h>
21505              #include <limits.h>
21506              #include <sys/resource.h>
21507              #include <unistd.h>
21508
21509
21510$gl_mda_defines
21511
21512              #ifndef RLIM_SAVED_CUR
21513              # define RLIM_SAVED_CUR RLIM_INFINITY
21514              #endif
21515              #ifndef RLIM_SAVED_MAX
21516              # define RLIM_SAVED_MAX RLIM_INFINITY
21517              #endif
21518
21519int
21520main ()
21521{
21522int result = 0;
21523              int bad_fd = INT_MAX;
21524              struct rlimit rlim;
21525              if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
21526                  && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
21527                  && rlim.rlim_cur != RLIM_INFINITY
21528                  && rlim.rlim_cur != RLIM_SAVED_MAX
21529                  && rlim.rlim_cur != RLIM_SAVED_CUR)
21530                bad_fd = rlim.rlim_cur;
21531              if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
21532              if (errno != EINVAL) result |= 2;
21533              if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
21534              if (errno != EINVAL) result |= 8;
21535              /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
21536              {
21537                int fd;
21538                fd = open (".", O_RDONLY);
21539                if (fd == -1)
21540                  result |= 16;
21541                else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
21542                  result |= 32;
21543
21544                close (fd);
21545              }
21546              return result;
21547  ;
21548  return 0;
21549}
21550_ACEOF
21551if ac_fn_c_try_run "$LINENO"; then :
21552  gl_cv_func_fcntl_f_dupfd_works=yes
21553else
21554  gl_cv_func_fcntl_f_dupfd_works=no
21555fi
21556rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21557  conftest.$ac_objext conftest.beam conftest.$ac_ext
21558fi
21559
21560fi
21561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
21562$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
21563    case $gl_cv_func_fcntl_f_dupfd_works in
21564      *yes) ;;
21565      *)
21566
21567
21568  if test $ac_cv_func_fcntl = no; then
21569    HAVE_FCNTL=0
21570  else
21571    REPLACE_FCNTL=1
21572  fi
21573
21574
21575$as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
21576 ;;
21577    esac
21578
21579            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
21580$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
21581if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
21582  $as_echo_n "(cached) " >&6
21583else
21584  if test "$cross_compiling" = yes; then :
21585  case "$host_os" in
21586                     # Guess no on NetBSD.
21587            netbsd*) gl_cv_func_fcntl_f_dupfd_cloexec="guessing no" ;;
21588            *)       gl_cv_func_fcntl_f_dupfd_cloexec="$gl_cross_guess_normal" ;;
21589          esac
21590
21591else
21592  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21593/* end confdefs.h.  */
21594#include <fcntl.h>
21595              #include <unistd.h>
21596              int main (int argc, char *argv[])
21597              {
21598                if (argc == 1)
21599                  /* parent process */
21600                  {
21601                    if (fcntl (1, F_DUPFD_CLOEXEC, 10) < 0)
21602                      return 1;
21603                    return execl ("./conftest", "./conftest", "child", NULL);
21604                  }
21605                else
21606                  /* child process */
21607                  return (fcntl (10, F_GETFL) < 0 ? 0 : 42);
21608              }
21609
21610
21611_ACEOF
21612if ac_fn_c_try_run "$LINENO"; then :
21613  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21614/* end confdefs.h.  */
21615
21616#ifdef __linux__
21617/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
21618   it to support the semantics on older kernels that failed with EINVAL.  */
21619choke me
21620#endif
21621
21622int
21623main ()
21624{
21625
21626  ;
21627  return 0;
21628}
21629_ACEOF
21630if ac_fn_c_try_compile "$LINENO"; then :
21631  gl_cv_func_fcntl_f_dupfd_cloexec=yes
21632else
21633  gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
21634fi
21635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21636
21637else
21638  gl_cv_func_fcntl_f_dupfd_cloexec=no
21639fi
21640rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21641  conftest.$ac_objext conftest.beam conftest.$ac_ext
21642fi
21643
21644
21645fi
21646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
21647$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
21648    case "$gl_cv_func_fcntl_f_dupfd_cloexec" in
21649      *yes) ;;
21650      *)
21651
21652
21653  if test $ac_cv_func_fcntl = no; then
21654    HAVE_FCNTL=0
21655  else
21656    REPLACE_FCNTL=1
21657  fi
21658
21659                        ;;
21660    esac
21661  fi
21662
21663
21664
21665
21666  if test $ac_cv_func_fchdir = no; then
21667    HAVE_FCHDIR=0
21668  fi
21669
21670    if test $HAVE_FCHDIR = 0; then
21671
21672
21673
21674  if test $ac_cv_func_fcntl = no; then
21675    HAVE_FCNTL=0
21676  else
21677    REPLACE_FCNTL=1
21678  fi
21679
21680    fi
21681
21682
21683  if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
21684
21685
21686
21687
21688
21689
21690
21691
21692  gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
21693
21694  fi
21695
21696
21697
21698
21699
21700          GNULIB_FCNTL=1
21701
21702
21703
21704
21705
21706$as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
21707
21708
21709
21710
21711
21712
21713
21714
21715
21716
21717
21718
21719
21720
21721     if test $gl_cv_have_include_next = yes; then
21722       gl_cv_next_fcntl_h='<'fcntl.h'>'
21723     else
21724       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
21725$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
21726if ${gl_cv_next_fcntl_h+:} false; then :
21727  $as_echo_n "(cached) " >&6
21728else
21729
21730
21731
21732  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21733/* end confdefs.h.  */
21734#include <fcntl.h>
21735_ACEOF
21736                case "$host_os" in
21737    aix*) gl_absname_cpp="$ac_cpp -C" ;;
21738    *)    gl_absname_cpp="$ac_cpp" ;;
21739  esac
21740
21741  case "$host_os" in
21742    mingw*)
21743                                          gl_dirsep_regex='[/\\]'
21744      ;;
21745    *)
21746      gl_dirsep_regex='\/'
21747      ;;
21748  esac
21749      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21750  gl_header_literal_regex=`echo 'fcntl.h' \
21751                           | sed -e "$gl_make_literal_regex_sed"`
21752  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21753      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21754      s|^/[^/]|//&|
21755      p
21756      q
21757    }'
21758
21759        gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21760  sed -n "$gl_absolute_header_sed"`
21761
21762           gl_header=$gl_cv_absolute_fcntl_h
21763           gl_cv_next_fcntl_h='"'$gl_header'"'
21764
21765
21766fi
21767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
21768$as_echo "$gl_cv_next_fcntl_h" >&6; }
21769     fi
21770     NEXT_FCNTL_H=$gl_cv_next_fcntl_h
21771
21772     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21773       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21774       gl_next_as_first_directive='<'fcntl.h'>'
21775     else
21776       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21777       gl_next_as_first_directive=$gl_cv_next_fcntl_h
21778     fi
21779     NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
21780
21781
21782
21783
21784
21785
21786
21787
21788
21789
21790
21791
21792
21793
21794
21795
21796
21797
21798cat >>confdefs.h <<_ACEOF
21799#define GNULIB_FCNTL_SAFER 1
21800_ACEOF
21801
21802
21803
21804
21805cat >>confdefs.h <<_ACEOF
21806#define GNULIB_FD_SAFER_FLAG 1
21807_ACEOF
21808
21809
21810
21811
21812
21813
21814
21815    ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
21816#include <dirent.h>
21817
21818"
21819if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
21820  ac_have_decl=1
21821else
21822  ac_have_decl=0
21823fi
21824
21825cat >>confdefs.h <<_ACEOF
21826#define HAVE_DECL_FDOPENDIR $ac_have_decl
21827_ACEOF
21828if test $ac_have_decl = 1; then :
21829
21830else
21831  HAVE_DECL_FDOPENDIR=0
21832fi
21833
21834
21835  if test $ac_cv_func_fdopendir = no; then
21836    HAVE_FDOPENDIR=0
21837  else
21838    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
21839$as_echo_n "checking whether fdopendir works... " >&6; }
21840if ${gl_cv_func_fdopendir_works+:} false; then :
21841  $as_echo_n "(cached) " >&6
21842else
21843  if test "$cross_compiling" = yes; then :
21844  case "$host_os" in
21845                     # Guess yes on glibc systems.
21846            *-gnu*)  gl_cv_func_fdopendir_works="guessing yes" ;;
21847                     # Guess yes on musl systems.
21848            *-musl*) gl_cv_func_fdopendir_works="guessing yes" ;;
21849                     # If we don't know, obey --enable-cross-guesses.
21850            *)       gl_cv_func_fdopendir_works="$gl_cross_guess_normal" ;;
21851          esac
21852
21853else
21854  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21855/* end confdefs.h.  */
21856
21857#include <dirent.h>
21858#include <fcntl.h>
21859#include <unistd.h>
21860
21861
21862$gl_mda_defines
21863
21864#if !HAVE_DECL_FDOPENDIR
21865extern
21866# ifdef __cplusplus
21867"C"
21868# endif
21869DIR *fdopendir (int);
21870#endif
21871
21872int
21873main ()
21874{
21875int result = 0;
21876              int fd = open ("conftest.c", O_RDONLY);
21877              if (fd < 0) result |= 1;
21878              if (fdopendir (fd)) result |= 2;
21879              if (close (fd)) result |= 4;
21880              return result;
21881
21882  ;
21883  return 0;
21884}
21885_ACEOF
21886if ac_fn_c_try_run "$LINENO"; then :
21887  gl_cv_func_fdopendir_works=yes
21888else
21889  gl_cv_func_fdopendir_works=no
21890fi
21891rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21892  conftest.$ac_objext conftest.beam conftest.$ac_ext
21893fi
21894
21895fi
21896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
21897$as_echo "$gl_cv_func_fdopendir_works" >&6; }
21898    case "$gl_cv_func_fdopendir_works" in
21899      *yes) ;;
21900      *)
21901        REPLACE_FDOPENDIR=1
21902        ;;
21903    esac
21904  fi
21905
21906  if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
21907
21908
21909
21910
21911
21912
21913
21914
21915  gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
21916
21917  fi
21918
21919
21920
21921
21922
21923          GNULIB_FDOPENDIR=1
21924
21925
21926
21927
21928
21929$as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
21930
21931
21932
21933
21934
21935cat >>confdefs.h <<_ACEOF
21936#define GNULIB_FDOPENDIR 1
21937_ACEOF
21938
21939
21940
21941
21942cat >>confdefs.h <<_ACEOF
21943#define GNULIB_FDUTIMENSAT 1
21944_ACEOF
21945
21946
21947
21948
21949  if test "$enable_acl" != no; then
21950    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getxattr with XATTR_NAME_POSIX_ACL macros" >&5
21951$as_echo_n "checking for getxattr with XATTR_NAME_POSIX_ACL macros... " >&6; }
21952if ${gl_cv_getxattr_with_posix_acls+:} false; then :
21953  $as_echo_n "(cached) " >&6
21954else
21955  gl_cv_getxattr_with_posix_acls=no
21956       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21957/* end confdefs.h.  */
21958#include <sys/types.h>
21959              #include <sys/xattr.h>
21960              #include <linux/xattr.h>
21961
21962int
21963main ()
21964{
21965ssize_t a = getxattr (".", XATTR_NAME_POSIX_ACL_ACCESS, 0, 0);
21966              ssize_t b = getxattr (".", XATTR_NAME_POSIX_ACL_DEFAULT, 0, 0);
21967              return a < 0 || b < 0;
21968
21969  ;
21970  return 0;
21971}
21972_ACEOF
21973if ac_fn_c_try_link "$LINENO"; then :
21974  gl_cv_getxattr_with_posix_acls=yes
21975fi
21976rm -f core conftest.err conftest.$ac_objext \
21977    conftest$ac_exeext conftest.$ac_ext
21978fi
21979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_getxattr_with_posix_acls" >&5
21980$as_echo "$gl_cv_getxattr_with_posix_acls" >&6; }
21981  fi
21982  if test "$gl_cv_getxattr_with_posix_acls" = yes; then
21983    LIB_HAS_ACL=
21984
21985$as_echo "#define GETXATTR_WITH_POSIX_ACLS 1" >>confdefs.h
21986
21987  else
21988            gl_need_lib_has_acl=1
21989    LIB_HAS_ACL=$LIB_ACL
21990  fi
21991
21992
21993
21994
21995    ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
21996if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
21997
21998cat >>confdefs.h <<_ACEOF
21999#define HAVE_STRUCT_STAT_ST_BLOCKS 1
22000_ACEOF
22001
22002
22003$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
22004
22005else
22006  :
22007fi
22008
22009
22010
22011
22012  if test $ac_cv_member_struct_stat_st_blocks = no; then
22013
22014
22015
22016
22017
22018
22019
22020
22021  gl_LIBOBJS="$gl_LIBOBJS fileblocks.$ac_objext"
22022
22023
22024
22025  :
22026
22027  fi
22028
22029
22030
22031
22032  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
22033$as_echo_n "checking for flexible array member... " >&6; }
22034if ${ac_cv_c_flexmember+:} false; then :
22035  $as_echo_n "(cached) " >&6
22036else
22037  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22038/* end confdefs.h.  */
22039#include <stdlib.h>
22040            #include <stdio.h>
22041            #include <stddef.h>
22042            struct m { struct m *next, **list; char name[]; };
22043            struct s { struct s *p; struct m *m; int n; double d[]; };
22044int
22045main ()
22046{
22047int m = getchar ();
22048            size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
22049            nbytes += sizeof (struct s) - 1;
22050            nbytes -= nbytes % sizeof (struct s);
22051            struct s *p = malloc (nbytes);
22052            p->p = p;
22053            p->m = NULL;
22054            p->d[0] = 0.0;
22055            return p->d != (double *) NULL;
22056  ;
22057  return 0;
22058}
22059_ACEOF
22060if ac_fn_c_try_compile "$LINENO"; then :
22061  ac_cv_c_flexmember=yes
22062else
22063  ac_cv_c_flexmember=no
22064fi
22065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22066fi
22067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
22068$as_echo "$ac_cv_c_flexmember" >&6; }
22069  if test $ac_cv_c_flexmember = yes; then
22070
22071$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
22072
22073  else
22074    $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
22075
22076  fi
22077
22078
22079
22080
22081  FLOAT_H=
22082  REPLACE_FLOAT_LDBL=0
22083  case "$host_os" in
22084    aix* | beos* | openbsd* | mirbsd* | irix*)
22085      FLOAT_H=float.h
22086      ;;
22087    freebsd* | dragonfly*)
22088      case "$host_cpu" in
22089        i[34567]86 )
22090          FLOAT_H=float.h
22091          ;;
22092        x86_64 )
22093          # On x86_64 systems, the C compiler may still be generating
22094          # 32-bit code.
22095          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22096/* end confdefs.h.  */
22097#if defined __LP64__ || defined __x86_64__ || defined __amd64__
22098                  int ok;
22099                 #else
22100                  error fail
22101                 #endif
22102
22103_ACEOF
22104if ac_fn_c_try_compile "$LINENO"; then :
22105
22106else
22107  FLOAT_H=float.h
22108fi
22109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22110          ;;
22111      esac
22112      ;;
22113    linux*)
22114      case "$host_cpu" in
22115        powerpc*)
22116          FLOAT_H=float.h
22117          ;;
22118      esac
22119      ;;
22120  esac
22121  case "$host_os" in
22122    aix* | freebsd* | dragonfly* | linux*)
22123      if test -n "$FLOAT_H"; then
22124        REPLACE_FLOAT_LDBL=1
22125      fi
22126      ;;
22127  esac
22128
22129    REPLACE_ITOLD=0
22130  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
22131$as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
22132if ${gl_cv_func_itold_works+:} false; then :
22133  $as_echo_n "(cached) " >&6
22134else
22135
22136      if test "$cross_compiling" = yes; then :
22137  case "$host" in
22138           sparc*-*-linux*)
22139             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22140/* end confdefs.h.  */
22141#if defined __LP64__ || defined __arch64__
22142                    int ok;
22143                   #else
22144                    error fail
22145                   #endif
22146
22147_ACEOF
22148if ac_fn_c_try_compile "$LINENO"; then :
22149  gl_cv_func_itold_works="guessing no"
22150else
22151  gl_cv_func_itold_works="guessing yes"
22152fi
22153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22154             ;;
22155                   # Guess yes on native Windows.
22156           mingw*) gl_cv_func_itold_works="guessing yes" ;;
22157           *)      gl_cv_func_itold_works="guessing yes" ;;
22158         esac
22159
22160else
22161  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22162/* end confdefs.h.  */
22163
22164int i = -1;
22165volatile long double ld;
22166int main ()
22167{
22168  ld += i * 1.0L;
22169  if (ld > 0)
22170    return 1;
22171  return 0;
22172}
22173_ACEOF
22174if ac_fn_c_try_run "$LINENO"; then :
22175  gl_cv_func_itold_works=yes
22176else
22177  gl_cv_func_itold_works=no
22178fi
22179rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22180  conftest.$ac_objext conftest.beam conftest.$ac_ext
22181fi
22182
22183
22184fi
22185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
22186$as_echo "$gl_cv_func_itold_works" >&6; }
22187  case "$gl_cv_func_itold_works" in
22188    *no)
22189      REPLACE_ITOLD=1
22190                  FLOAT_H=float.h
22191      ;;
22192  esac
22193
22194  if test -n "$FLOAT_H"; then
22195
22196
22197
22198
22199
22200
22201
22202
22203     if test $gl_cv_have_include_next = yes; then
22204       gl_cv_next_float_h='<'float.h'>'
22205     else
22206       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
22207$as_echo_n "checking absolute name of <float.h>... " >&6; }
22208if ${gl_cv_next_float_h+:} false; then :
22209  $as_echo_n "(cached) " >&6
22210else
22211
22212
22213
22214  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22215/* end confdefs.h.  */
22216#include <float.h>
22217_ACEOF
22218                case "$host_os" in
22219    aix*) gl_absname_cpp="$ac_cpp -C" ;;
22220    *)    gl_absname_cpp="$ac_cpp" ;;
22221  esac
22222
22223  case "$host_os" in
22224    mingw*)
22225                                          gl_dirsep_regex='[/\\]'
22226      ;;
22227    *)
22228      gl_dirsep_regex='\/'
22229      ;;
22230  esac
22231      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22232  gl_header_literal_regex=`echo 'float.h' \
22233                           | sed -e "$gl_make_literal_regex_sed"`
22234  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22235      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22236      s|^/[^/]|//&|
22237      p
22238      q
22239    }'
22240
22241        gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22242  sed -n "$gl_absolute_header_sed"`
22243
22244           gl_header=$gl_cv_absolute_float_h
22245           gl_cv_next_float_h='"'$gl_header'"'
22246
22247
22248fi
22249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
22250$as_echo "$gl_cv_next_float_h" >&6; }
22251     fi
22252     NEXT_FLOAT_H=$gl_cv_next_float_h
22253
22254     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22255       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22256       gl_next_as_first_directive='<'float.h'>'
22257     else
22258       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22259       gl_next_as_first_directive=$gl_cv_next_float_h
22260     fi
22261     NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
22262
22263
22264
22265
22266  fi
22267
22268   if test -n "$FLOAT_H"; then
22269  GL_GENERATE_FLOAT_H_TRUE=
22270  GL_GENERATE_FLOAT_H_FALSE='#'
22271else
22272  GL_GENERATE_FLOAT_H_TRUE='#'
22273  GL_GENERATE_FLOAT_H_FALSE=
22274fi
22275
22276
22277
22278  if test $REPLACE_FLOAT_LDBL = 1; then
22279
22280
22281
22282
22283
22284
22285
22286
22287  gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
22288
22289  fi
22290  if test $REPLACE_ITOLD = 1; then
22291
22292
22293
22294
22295
22296
22297
22298
22299  gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
22300
22301  fi
22302
22303
22304
22305
22306     gl_fnmatch_required_lowercase=`
22307    echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
22308  `
22309
22310  if test $ac_cv_func_fnmatch = no; then
22311    HAVE_FNMATCH=0
22312  else
22313    gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
22314    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
22315$as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
22316if eval \${$gl_fnmatch_cache_var+:} false; then :
22317  $as_echo_n "(cached) " >&6
22318else
22319                                     if test $gl_fnmatch_required = GNU; then
22320         gl_fnmatch_gnu_start=
22321         gl_fnmatch_gnu_end=
22322       else
22323         gl_fnmatch_gnu_start='#if 0'
22324         gl_fnmatch_gnu_end='#endif'
22325       fi
22326       if test "$cross_compiling" = yes; then :
22327  case "$host_os" in
22328                     # Guess yes on musl systems.
22329            *-musl*) eval "$gl_fnmatch_cache_var=\"guessing yes\"" ;;
22330                     # Guess no otherwise, even on glibc systems.
22331            *)       eval "$gl_fnmatch_cache_var=\"guessing no\"" ;;
22332          esac
22333
22334else
22335  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22336/* end confdefs.h.  */
22337#include <fnmatch.h>
22338              static int
22339              y (char const *pattern, char const *string, int flags)
22340              {
22341                return fnmatch (pattern, string, flags) == 0;
22342              }
22343              static int
22344              n (char const *pattern, char const *string, int flags)
22345              {
22346                return fnmatch (pattern, string, flags) == FNM_NOMATCH;
22347              }
22348
22349int
22350main ()
22351{
22352char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
22353              char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
22354              static char const A_1[] = { 'A' - 1, 0 };
22355              static char const A01[] = { 'A' + 1, 0 };
22356              static char const a_1[] = { 'a' - 1, 0 };
22357              static char const a01[] = { 'a' + 1, 0 };
22358              static char const bs_1[] = { '\\\\' - 1, 0 };
22359              static char const bs01[] = { '\\\\' + 1, 0 };
22360              int result = 0;
22361              if (!n ("a*", "", 0))
22362                return 1;
22363              if (!y ("a*", "abc", 0))
22364                return 1;
22365              if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
22366                return 1;
22367              if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
22368                return 2;
22369              if (!y ("a\\\\bc", "abc", 0))
22370                return 3;
22371              if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
22372                return 3;
22373              if (!y ("*x", ".x", 0))
22374                return 4;
22375              if (!n ("*x", ".x", FNM_PERIOD))
22376                return 4;
22377              if (!y (Apat, "\\\\", 0))
22378                return 5;
22379              if (!y (Apat, "A", 0))
22380                return 5;
22381              if (!y (apat, "\\\\", 0))
22382                return 5;
22383              if (!y (apat, "a", 0))
22384                return 5;
22385              if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
22386                return 5;
22387              if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
22388                return 5;
22389              if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
22390                return 5;
22391              if (!(y (apat, a01, 0) == ('a' < '\\\\')))
22392                return 5;
22393              if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
22394                return 5;
22395              if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
22396                return 5;
22397              if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
22398                return 5;
22399              if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
22400                return 5;
22401              $gl_fnmatch_gnu_start
22402              if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
22403                result |= 8;
22404              if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
22405                result |= 16;
22406              if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
22407                result |= 32;
22408              if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
22409                result |= 64;
22410              if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
22411                result |= 64;
22412              if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
22413                result |= 64;
22414              $gl_fnmatch_gnu_end
22415              return result;
22416
22417  ;
22418  return 0;
22419}
22420_ACEOF
22421if ac_fn_c_try_run "$LINENO"; then :
22422  eval "$gl_fnmatch_cache_var=yes"
22423else
22424  eval "$gl_fnmatch_cache_var=no"
22425fi
22426rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22427  conftest.$ac_objext conftest.beam conftest.$ac_ext
22428fi
22429
22430
22431fi
22432eval ac_res=\$$gl_fnmatch_cache_var
22433	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22434$as_echo "$ac_res" >&6; }
22435    eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
22436    case "$gl_fnmatch_result" in
22437      *yes) ;;
22438      *) REPLACE_FNMATCH=1 ;;
22439    esac
22440  fi
22441  if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
22442
22443
22444  FNMATCH_H='fnmatch.h'
22445   if test -n "$FNMATCH_H"; then
22446  GL_GENERATE_FNMATCH_H_TRUE=
22447  GL_GENERATE_FNMATCH_H_FALSE='#'
22448else
22449  GL_GENERATE_FNMATCH_H_TRUE='#'
22450  GL_GENERATE_FNMATCH_H_FALSE=
22451fi
22452
22453
22454  fi
22455
22456  if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
22457
22458
22459
22460
22461
22462
22463
22464
22465  gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
22466
22467
22468
22469
22470
22471  fi
22472
22473
22474
22475
22476
22477          GNULIB_FNMATCH=1
22478
22479
22480
22481
22482
22483$as_echo "#define GNULIB_TEST_FNMATCH 1" >>confdefs.h
22484
22485
22486
22487
22488
22489
22490
22491
22492  if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
22493
22494
22495
22496
22497
22498
22499
22500
22501  gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
22502
22503
22504
22505
22506
22507  fi
22508
22509
22510cat >>confdefs.h <<_ACEOF
22511#define GNULIB_FNMATCH_GNU 1
22512_ACEOF
22513
22514
22515
22516
22517
22518
22519  case "$host_os" in
22520    mingw* | pw*)
22521            REPLACE_FOPEN=1
22522            gl_cv_func_fopen_slash="guessing no"
22523      ;;
22524    *)
22525                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen recognizes a trailing slash" >&5
22526$as_echo_n "checking whether fopen recognizes a trailing slash... " >&6; }
22527if ${gl_cv_func_fopen_slash+:} false; then :
22528  $as_echo_n "(cached) " >&6
22529else
22530
22531          if test "$cross_compiling" = yes; then :
22532
22533             case "$host_os" in
22534               aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
22535                 gl_cv_func_fopen_slash="guessing no" ;;
22536               *)
22537                 gl_cv_func_fopen_slash="guessing yes" ;;
22538             esac
22539
22540else
22541  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22542/* end confdefs.h.  */
22543
22544#include <stddef.h>
22545#include <stdio.h>
22546int main ()
22547{
22548  FILE *fp = fopen ("conftest.sl/", "w");
22549  int result = (fp != NULL);
22550  if (fp != NULL)
22551    fclose (fp);
22552  return result;
22553}
22554_ACEOF
22555if ac_fn_c_try_run "$LINENO"; then :
22556  gl_cv_func_fopen_slash=yes
22557else
22558  gl_cv_func_fopen_slash=no
22559fi
22560rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22561  conftest.$ac_objext conftest.beam conftest.$ac_ext
22562fi
22563
22564          rm -f conftest.sl
22565
22566fi
22567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_slash" >&5
22568$as_echo "$gl_cv_func_fopen_slash" >&6; }
22569      ;;
22570  esac
22571  case "$gl_cv_func_fopen_slash" in
22572    *no)
22573
22574$as_echo "#define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
22575
22576      REPLACE_FOPEN=1
22577      ;;
22578  esac
22579
22580  if test $REPLACE_FOPEN = 1; then
22581
22582
22583
22584
22585
22586
22587
22588
22589  gl_LIBOBJS="$gl_LIBOBJS fopen.$ac_objext"
22590
22591    :
22592  fi
22593
22594
22595
22596
22597
22598          GNULIB_FOPEN=1
22599
22600
22601
22602
22603
22604$as_echo "#define GNULIB_TEST_FOPEN 1" >>confdefs.h
22605
22606
22607
22608
22609
22610  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen supports the mode character 'x'" >&5
22611$as_echo_n "checking whether fopen supports the mode character 'x'... " >&6; }
22612if ${gl_cv_func_fopen_mode_x+:} false; then :
22613  $as_echo_n "(cached) " >&6
22614else
22615  rm -f conftest.x
22616     if test "$cross_compiling" = yes; then :
22617  case "$host_os" in
22618          # Guess yes on glibc and musl systems.
22619          linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl*)
22620            gl_cv_func_fopen_mode_x="guessing yes" ;;
22621          # If we don't know, obey --enable-cross-guesses.
22622          *)
22623            gl_cv_func_fopen_mode_x="$gl_cross_guess_normal" ;;
22624        esac
22625
22626else
22627  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22628/* end confdefs.h.  */
22629
22630#include <stdio.h>
22631#include <errno.h>
22632int main ()
22633{
22634  FILE *fp;
22635  fp = fopen ("conftest.x", "w");
22636  fclose (fp);
22637  fp = fopen ("conftest.x", "wx");
22638  if (fp != NULL)
22639    /* 'x' ignored */
22640    return 1;
22641  else if (errno == EEXIST)
22642    return 0;
22643  else
22644    /* 'x' rejected */
22645    return 2;
22646}
22647_ACEOF
22648if ac_fn_c_try_run "$LINENO"; then :
22649  gl_cv_func_fopen_mode_x=yes
22650else
22651  gl_cv_func_fopen_mode_x=no
22652fi
22653rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22654  conftest.$ac_objext conftest.beam conftest.$ac_ext
22655fi
22656
22657     rm -f conftest.x
22658
22659fi
22660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_mode_x" >&5
22661$as_echo "$gl_cv_func_fopen_mode_x" >&6; }
22662  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen supports the mode character 'e'" >&5
22663$as_echo_n "checking whether fopen supports the mode character 'e'... " >&6; }
22664if ${gl_cv_func_fopen_mode_e+:} false; then :
22665  $as_echo_n "(cached) " >&6
22666else
22667  echo foo > conftest.x
22668     if test "$cross_compiling" = yes; then :
22669  case "$host_os" in
22670          # Guess yes on glibc and musl systems.
22671          linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl*)
22672            gl_cv_func_fopen_mode_e="guessing yes" ;;
22673          # Guess no on native Windows.
22674          mingw*)
22675            gl_cv_func_fopen_mode_e="guessing no" ;;
22676          # If we don't know, obey --enable-cross-guesses.
22677          *)
22678            gl_cv_func_fopen_mode_e="$gl_cross_guess_normal" ;;
22679        esac
22680
22681else
22682  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22683/* end confdefs.h.  */
22684
22685#include <stdio.h>
22686#include <errno.h>
22687#include <fcntl.h>
22688
22689
22690$gl_mda_defines
22691
22692int main ()
22693{
22694  FILE *fp = fopen ("conftest.x", "re");
22695  if (fp != NULL)
22696    {
22697      if (fcntl (fileno (fp), F_GETFD) & FD_CLOEXEC)
22698        return 0;
22699      else
22700        /* 'e' ignored */
22701        return 1;
22702    }
22703  else
22704    /* 'e' rejected */
22705    return 2;
22706}
22707_ACEOF
22708if ac_fn_c_try_run "$LINENO"; then :
22709  gl_cv_func_fopen_mode_e=yes
22710else
22711  gl_cv_func_fopen_mode_e=no
22712fi
22713rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22714  conftest.$ac_objext conftest.beam conftest.$ac_ext
22715fi
22716
22717     rm -f conftest.x
22718
22719fi
22720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_mode_e" >&5
22721$as_echo "$gl_cv_func_fopen_mode_e" >&6; }
22722  case "$gl_cv_func_fopen_mode_x" in
22723    *no) REPLACE_FOPEN=1 ;;
22724  esac
22725  case "$gl_cv_func_fopen_mode_e" in
22726    *no) REPLACE_FOPEN=1 ;;
22727  esac
22728
22729  if test $REPLACE_FOPEN = 1; then
22730
22731
22732
22733
22734
22735
22736
22737
22738  gl_LIBOBJS="$gl_LIBOBJS fopen.$ac_objext"
22739
22740    :
22741  fi
22742
22743
22744cat >>confdefs.h <<_ACEOF
22745#define GNULIB_FOPEN_GNU 1
22746_ACEOF
22747
22748
22749
22750
22751  fp_headers='
22752    #include <stdio.h>
22753    #if HAVE_STDIO_EXT_H
22754    # include <stdio_ext.h>
22755    #endif
22756  '
22757  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpending" >&5
22758$as_echo_n "checking for __fpending... " >&6; }
22759if ${gl_cv_func___fpending+:} false; then :
22760  $as_echo_n "(cached) " >&6
22761else
22762
22763      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22764/* end confdefs.h.  */
22765$fp_headers
22766int
22767main ()
22768{
22769return ! __fpending (stdin);
22770  ;
22771  return 0;
22772}
22773_ACEOF
22774if ac_fn_c_try_link "$LINENO"; then :
22775  gl_cv_func___fpending=yes
22776else
22777  gl_cv_func___fpending=no
22778fi
22779rm -f core conftest.err conftest.$ac_objext \
22780    conftest$ac_exeext conftest.$ac_ext
22781
22782fi
22783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func___fpending" >&5
22784$as_echo "$gl_cv_func___fpending" >&6; }
22785  if test $gl_cv_func___fpending = yes; then
22786    ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
22787"
22788if test "x$ac_cv_have_decl___fpending" = xyes; then :
22789  ac_have_decl=1
22790else
22791  ac_have_decl=0
22792fi
22793
22794cat >>confdefs.h <<_ACEOF
22795#define HAVE_DECL___FPENDING $ac_have_decl
22796_ACEOF
22797
22798  fi
22799
22800  if test $gl_cv_func___fpending = no; then
22801
22802
22803
22804
22805
22806
22807
22808
22809  gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
22810
22811  fi
22812
22813
22814
22815                          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether free is known to preserve errno" >&5
22816$as_echo_n "checking whether free is known to preserve errno... " >&6; }
22817if ${gl_cv_func_free_preserves_errno+:} false; then :
22818  $as_echo_n "(cached) " >&6
22819else
22820  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22821/* end confdefs.h.  */
22822#include <stdlib.h>
22823
22824int
22825main ()
22826{
22827#if 2 < __GLIBC__ + (33 <= __GLIBC_MINOR__)
22828            #elif defined __OpenBSD__
22829            #elif defined __sun
22830            #else
22831              #error "'free' is not known to preserve errno"
22832            #endif
22833
22834  ;
22835  return 0;
22836}
22837_ACEOF
22838if ac_fn_c_try_compile "$LINENO"; then :
22839  gl_cv_func_free_preserves_errno=yes
22840else
22841  gl_cv_func_free_preserves_errno=no
22842fi
22843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22844
22845fi
22846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_free_preserves_errno" >&5
22847$as_echo "$gl_cv_func_free_preserves_errno" >&6; }
22848
22849  case $gl_cv_func_free_preserves_errno in
22850   *yes) ;;
22851   *) REPLACE_FREE=1 ;;
22852  esac
22853
22854  if test $REPLACE_FREE = 1; then
22855
22856
22857
22858
22859
22860
22861
22862
22863  gl_LIBOBJS="$gl_LIBOBJS free.$ac_objext"
22864
22865    :
22866  fi
22867
22868
22869
22870
22871
22872          GNULIB_FREE_POSIX=1
22873
22874
22875
22876
22877
22878$as_echo "#define GNULIB_TEST_FREE_POSIX 1" >>confdefs.h
22879
22880
22881
22882
22883
22884
22885    if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
22886    REPLACE_FSEEK=1
22887  fi
22888
22889  if test $REPLACE_FSEEK = 1; then
22890
22891
22892
22893
22894
22895
22896
22897
22898  gl_LIBOBJS="$gl_LIBOBJS fseek.$ac_objext"
22899
22900  fi
22901
22902
22903
22904
22905
22906          GNULIB_FSEEK=1
22907
22908
22909
22910
22911
22912$as_echo "#define GNULIB_TEST_FSEEK 1" >>confdefs.h
22913
22914
22915
22916
22917
22918
22919
22920
22921
22922
22923
22924  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
22925$as_echo_n "checking for fseeko... " >&6; }
22926if ${gl_cv_func_fseeko+:} false; then :
22927  $as_echo_n "(cached) " >&6
22928else
22929
22930      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22931/* end confdefs.h.  */
22932#include <stdio.h>
22933
22934int
22935main ()
22936{
22937fseeko (stdin, 0, 0);
22938  ;
22939  return 0;
22940}
22941_ACEOF
22942if ac_fn_c_try_link "$LINENO"; then :
22943  gl_cv_func_fseeko=yes
22944else
22945  gl_cv_func_fseeko=no
22946fi
22947rm -f core conftest.err conftest.$ac_objext \
22948    conftest$ac_exeext conftest.$ac_ext
22949
22950fi
22951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
22952$as_echo "$gl_cv_func_fseeko" >&6; }
22953
22954
22955  if test $ac_cv_have_decl_fseeko = no; then
22956    HAVE_DECL_FSEEKO=0
22957  fi
22958
22959  if test $gl_cv_func_fseeko = no; then
22960    HAVE_FSEEKO=0
22961  else
22962    if test $WINDOWS_64_BIT_OFF_T = 1; then
22963      REPLACE_FSEEKO=1
22964    fi
22965    if test $gl_cv_var_stdin_large_offset = no; then
22966      REPLACE_FSEEKO=1
22967    fi
22968
22969  fi
22970
22971  if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
22972
22973
22974
22975
22976
22977
22978
22979
22980  gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext"
22981
22982
22983      for ac_func in _fseeki64
22984do :
22985  ac_fn_c_check_func "$LINENO" "_fseeki64" "ac_cv_func__fseeki64"
22986if test "x$ac_cv_func__fseeki64" = xyes; then :
22987  cat >>confdefs.h <<_ACEOF
22988#define HAVE__FSEEKI64 1
22989_ACEOF
22990
22991fi
22992done
22993
22994  if test $ac_cv_func__fseeki64 = yes; then
22995    ac_fn_c_check_decl "$LINENO" "_fseeki64" "ac_cv_have_decl__fseeki64" "$ac_includes_default"
22996if test "x$ac_cv_have_decl__fseeki64" = xyes; then :
22997  ac_have_decl=1
22998else
22999  ac_have_decl=0
23000fi
23001
23002cat >>confdefs.h <<_ACEOF
23003#define HAVE_DECL__FSEEKI64 $ac_have_decl
23004_ACEOF
23005
23006  fi
23007
23008  fi
23009
23010
23011
23012
23013
23014          GNULIB_FSEEKO=1
23015
23016
23017
23018
23019
23020$as_echo "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h
23021
23022
23023
23024
23025
23026
23027
23028  case "$host_os" in
23029    mingw* | solaris*)
23030                        REPLACE_FSTAT=1
23031      ;;
23032  esac
23033
23034
23035
23036
23037
23038  if test $ac_cv_func_fchdir = no; then
23039    HAVE_FCHDIR=0
23040  fi
23041
23042    if test $HAVE_FCHDIR = 0; then
23043      case "$gl_cv_func_open_directory_works" in
23044        *yes) ;;
23045        *)
23046          REPLACE_FSTAT=1
23047          ;;
23048      esac
23049    fi
23050
23051
23052  if test $REPLACE_FSTAT = 1; then
23053
23054
23055
23056
23057
23058
23059
23060
23061  gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
23062
23063    case "$host_os" in
23064      mingw*)
23065
23066
23067
23068
23069
23070
23071
23072
23073  gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
23074
23075        ;;
23076    esac
23077
23078
23079
23080  :
23081
23082  fi
23083
23084
23085
23086
23087
23088          GNULIB_FSTAT=1
23089
23090
23091
23092
23093
23094$as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
23095
23096
23097
23098
23099
23100
23101
23102
23103
23104
23105  if test $ac_cv_func_fstatat = no; then
23106    HAVE_FSTATAT=0
23107  else
23108            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
23109$as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
23110if ${gl_cv_func_fstatat_zero_flag+:} false; then :
23111  $as_echo_n "(cached) " >&6
23112else
23113  if test "$cross_compiling" = yes; then :
23114  case "$host_os" in
23115            aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
23116            *)    gl_cv_func_fstatat_zero_flag="guessing yes";;
23117          esac
23118
23119else
23120  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23121/* end confdefs.h.  */
23122
23123              #include <fcntl.h>
23124              #include <sys/stat.h>
23125              int
23126              main (void)
23127              {
23128                struct stat a;
23129                return fstatat (AT_FDCWD, ".", &a, 0) != 0;
23130              }
23131
23132_ACEOF
23133if ac_fn_c_try_run "$LINENO"; then :
23134  gl_cv_func_fstatat_zero_flag=yes
23135else
23136  gl_cv_func_fstatat_zero_flag=no
23137fi
23138rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23139  conftest.$ac_objext conftest.beam conftest.$ac_ext
23140fi
23141
23142
23143fi
23144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
23145$as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
23146
23147    case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
23148    *yes+*yes) ;;
23149    *) REPLACE_FSTATAT=1 ;;
23150    esac
23151
23152    case $host_os in
23153      solaris*)
23154        REPLACE_FSTATAT=1 ;;
23155    esac
23156
23157    case $REPLACE_FSTATAT,$gl_cv_func_fstatat_zero_flag in
23158      1,*yes)
23159
23160$as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
23161
23162         ;;
23163    esac
23164  fi
23165
23166  if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
23167
23168
23169
23170
23171
23172
23173
23174
23175  gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
23176
23177  fi
23178
23179
23180
23181
23182
23183          GNULIB_FSTATAT=1
23184
23185
23186
23187
23188
23189$as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
23190
23191
23192
23193
23194
23195
23196
23197  if test $ac_cv_func_futimens = no; then
23198    HAVE_FUTIMENS=0
23199  else
23200    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimens works" >&5
23201$as_echo_n "checking whether futimens works... " >&6; }
23202if ${gl_cv_func_futimens_works+:} false; then :
23203  $as_echo_n "(cached) " >&6
23204else
23205  if test "$cross_compiling" = yes; then :
23206  case "$host_os" in
23207                           # Guess no on glibc systems.
23208            *-gnu* | gnu*) gl_cv_func_futimens_works="guessing no" ;;
23209                           # Guess no on musl systems.
23210            *-musl*)       gl_cv_func_futimens_works="guessing no" ;;
23211                           # Guess yes otherwise.
23212            *)             gl_cv_func_futimens_works="guessing yes" ;;
23213          esac
23214
23215else
23216  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23217/* end confdefs.h.  */
23218
23219#include <fcntl.h>
23220#include <sys/stat.h>
23221#include <unistd.h>
23222#include <errno.h>
23223
23224
23225$gl_mda_defines
23226
23227int
23228main ()
23229{
23230struct timespec ts[2];
23231      int fd = creat ("conftest.file", 0600);
23232      struct stat st;
23233      if (fd < 0) return 1;
23234      ts[0].tv_sec = 1;
23235      ts[0].tv_nsec = UTIME_OMIT;
23236      ts[1].tv_sec = 1;
23237      ts[1].tv_nsec = UTIME_NOW;
23238      errno = 0;
23239      if (futimens (AT_FDCWD, NULL) == 0) return 2;
23240      if (errno != EBADF) return 3;
23241      if (futimens (fd, ts)) return 4;
23242      sleep (1);
23243      ts[0].tv_nsec = UTIME_NOW;
23244      ts[1].tv_nsec = UTIME_OMIT;
23245      if (futimens (fd, ts)) return 5;
23246      if (fstat (fd, &st)) return 6;
23247      if (st.st_ctime < st.st_atime) return 7;
23248
23249  ;
23250  return 0;
23251}
23252_ACEOF
23253if ac_fn_c_try_run "$LINENO"; then :
23254  gl_cv_func_futimens_works=yes
23255else
23256  gl_cv_func_futimens_works=no
23257fi
23258rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23259  conftest.$ac_objext conftest.beam conftest.$ac_ext
23260fi
23261
23262      rm -f conftest.file
23263fi
23264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimens_works" >&5
23265$as_echo "$gl_cv_func_futimens_works" >&6; }
23266    case "$gl_cv_func_futimens_works" in
23267      *yes) ;;
23268      *)
23269        REPLACE_FUTIMENS=1
23270        ;;
23271    esac
23272  fi
23273
23274  if test $HAVE_FUTIMENS = 0 || test $REPLACE_FUTIMENS = 1; then
23275
23276
23277
23278
23279
23280
23281
23282
23283  gl_LIBOBJS="$gl_LIBOBJS futimens.$ac_objext"
23284
23285  fi
23286
23287
23288
23289
23290
23291          GNULIB_FUTIMENS=1
23292
23293
23294
23295
23296
23297$as_echo "#define GNULIB_TEST_FUTIMENS 1" >>confdefs.h
23298
23299
23300
23301
23302
23303
23304
23305
23306  gl_abort_bug=no
23307  case "$host_os" in
23308    mingw*)
23309      gl_cv_func_getcwd_path_max=yes
23310      ;;
23311    *)
23312
23313
23314
23315
23316
23317  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
23318$as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
23319if ${gl_cv_func_getcwd_path_max+:} false; then :
23320  $as_echo_n "(cached) " >&6
23321else
23322  # Arrange for deletion of the temporary directory this test creates.
23323     ac_clean_files="$ac_clean_files confdir3"
23324          if test "$cross_compiling" = yes; then :
23325  # Cross-compilation guesses:
23326        case "$host_os" in
23327          aix*) # On AIX, it has the AIX bug.
23328            gl_cv_func_getcwd_path_max='guessing no, it has the AIX bug' ;;
23329          gnu*) # On Hurd, it is 'yes'.
23330            gl_cv_func_getcwd_path_max='guessing yes' ;;
23331          linux* | kfreebsd*)
23332            # On older Linux+glibc it's 'no, but it is partly working',
23333            # on newer Linux+glibc it's 'yes'.
23334            # On Linux+musl libc, it's 'no, but it is partly working'.
23335            # On kFreeBSD+glibc, it's 'no, but it is partly working'.
23336            gl_cv_func_getcwd_path_max='guessing no, but it is partly working' ;;
23337          *) # If we don't know, obey --enable-cross-guesses.
23338            gl_cv_func_getcwd_path_max="$gl_cross_guess_normal" ;;
23339        esac
23340
23341else
23342  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23343/* end confdefs.h.  */
23344
23345#include <errno.h>
23346#include <stdlib.h>
23347#if HAVE_UNISTD_H
23348# include <unistd.h>
23349#else
23350# include <direct.h>
23351#endif
23352#include <string.h>
23353#include <limits.h>
23354#include <sys/stat.h>
23355#include <sys/types.h>
23356#include <fcntl.h>
23357
23358
23359/* Arrange to define PATH_MAX, like "pathmax.h" does. */
23360#if HAVE_UNISTD_H
23361# include <unistd.h>
23362#endif
23363#include <limits.h>
23364#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
23365# include <sys/param.h>
23366#endif
23367#if !defined PATH_MAX && defined MAXPATHLEN
23368# define PATH_MAX MAXPATHLEN
23369#endif
23370#ifdef __hpux
23371# undef PATH_MAX
23372# define PATH_MAX 1024
23373#endif
23374#if defined _WIN32 && ! defined __CYGWIN__
23375# undef PATH_MAX
23376# define PATH_MAX 260
23377#endif
23378
23379
23380#ifndef AT_FDCWD
23381# define AT_FDCWD 0
23382#endif
23383#ifdef ENAMETOOLONG
23384# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
23385#else
23386# define is_ENAMETOOLONG(x) 0
23387#endif
23388
23389/* Use the getcwd function, not any macro.  */
23390#undef getcwd
23391
23392
23393
23394$gl_mda_defines
23395
23396
23397#ifndef S_IRWXU
23398# define S_IRWXU 0700
23399#endif
23400
23401/* The length of this name must be 8.  */
23402#define DIR_NAME "confdir3"
23403#define DIR_NAME_LEN 8
23404#define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
23405
23406/* The length of "../".  */
23407#define DOTDOTSLASH_LEN 3
23408
23409/* Leftover bytes in the buffer, to work around library or OS bugs.  */
23410#define BUF_SLOP 20
23411
23412int
23413main ()
23414{
23415#ifndef PATH_MAX
23416  /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
23417     at least not on a local file system.  And if we were to start worrying
23418     about remote file systems, we'd have to enable the wrapper function
23419     all of the time, just to be safe.  That's not worth the cost.  */
23420  exit (0);
23421#elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
23422        - DIR_NAME_SIZE - BUF_SLOP) \
23423       <= PATH_MAX)
23424  /* FIXME: Assuming there's a system for which this is true,
23425     this should be done in a compile test.  */
23426  exit (0);
23427#else
23428  char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
23429           + DIR_NAME_SIZE + BUF_SLOP];
23430  char *cwd = getcwd (buf, PATH_MAX);
23431  size_t initial_cwd_len;
23432  size_t cwd_len;
23433  int fail = 0;
23434  size_t n_chdirs = 0;
23435
23436  if (cwd == NULL)
23437    exit (10);
23438
23439  cwd_len = initial_cwd_len = strlen (cwd);
23440
23441  while (1)
23442    {
23443      size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
23444      char *c = NULL;
23445
23446      cwd_len += DIR_NAME_SIZE;
23447      /* If mkdir or chdir fails, it could be that this system cannot create
23448         any file with an absolute name longer than PATH_MAX, such as cygwin.
23449         If so, leave fail as 0, because the current working directory can't
23450         be too long for getcwd if it can't even be created.  On Linux with
23451         the 9p file system, mkdir fails with error EINVAL when cwd_len gets
23452         too long; ignore this failure because the getcwd() system call
23453         produces good results whereas the gnulib substitute calls getdents64
23454         which fails with error EPROTO.
23455         For other errors, be pessimistic and consider that as a failure,
23456         too.  */
23457      if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
23458        {
23459          if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
23460            #ifdef __linux__
23461            if (! (errno == EINVAL))
23462            #endif
23463              fail = 20;
23464          break;
23465        }
23466
23467      if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
23468        {
23469          struct stat sb;
23470
23471          c = getcwd (buf, PATH_MAX);
23472          if (!c && errno == ENOENT)
23473            {
23474              fail = 11;
23475              break;
23476            }
23477          if (c)
23478            {
23479              fail = 31;
23480              break;
23481            }
23482          if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
23483            {
23484              fail = 21;
23485              break;
23486            }
23487
23488          /* Our replacement needs to be able to stat() long ../../paths,
23489             so generate a path larger than PATH_MAX to check,
23490             avoiding the replacement if we can't stat().  */
23491          c = getcwd (buf, cwd_len + 1);
23492          if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno))
23493            {
23494              fail = 32;
23495              break;
23496            }
23497        }
23498
23499      if (dotdot_max <= cwd_len - initial_cwd_len)
23500        {
23501          if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
23502            break;
23503          c = getcwd (buf, cwd_len + 1);
23504          if (!c)
23505            {
23506              if (! (errno == ERANGE || errno == ENOENT
23507                     || is_ENAMETOOLONG (errno)))
23508                {
23509                  fail = 22;
23510                  break;
23511                }
23512              if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
23513                {
23514                  fail = 12;
23515                  break;
23516                }
23517            }
23518        }
23519
23520      if (c && strlen (c) != cwd_len)
23521        {
23522          fail = 23;
23523          break;
23524        }
23525      ++n_chdirs;
23526    }
23527
23528  /* Leaving behind such a deep directory is not polite.
23529     So clean up here, right away, even though the driving
23530     shell script would also clean up.  */
23531  {
23532    size_t i;
23533
23534    /* Try rmdir first, in case the chdir failed.  */
23535    rmdir (DIR_NAME);
23536    for (i = 0; i <= n_chdirs; i++)
23537      {
23538        if (chdir ("..") < 0)
23539          break;
23540        if (rmdir (DIR_NAME) != 0)
23541          break;
23542      }
23543  }
23544
23545  exit (fail);
23546#endif
23547}
23548
23549_ACEOF
23550if ac_fn_c_try_run "$LINENO"; then :
23551  gl_cv_func_getcwd_path_max=yes
23552else
23553  case $? in
23554        10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
23555        31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
23556        32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';;
23557        *) gl_cv_func_getcwd_path_max=no;;
23558        esac
23559fi
23560rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23561  conftest.$ac_objext conftest.beam conftest.$ac_ext
23562fi
23563
23564
23565fi
23566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
23567$as_echo "$gl_cv_func_getcwd_path_max" >&6; }
23568
23569      case "$gl_cv_func_getcwd_null" in
23570        *yes)
23571
23572
23573
23574
23575
23576
23577      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
23578$as_echo_n "checking for getpagesize... " >&6; }
23579if ${gl_cv_func_getpagesize+:} false; then :
23580  $as_echo_n "(cached) " >&6
23581else
23582  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23583/* end confdefs.h.  */
23584#include <unistd.h>
23585int
23586main ()
23587{
23588return getpagesize();
23589  ;
23590  return 0;
23591}
23592
23593_ACEOF
23594if ac_fn_c_try_link "$LINENO"; then :
23595  gl_cv_func_getpagesize=yes
23596else
23597  gl_cv_func_getpagesize=no
23598fi
23599rm -f core conftest.err conftest.$ac_objext \
23600    conftest$ac_exeext conftest.$ac_ext
23601
23602fi
23603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getpagesize" >&5
23604$as_echo "$gl_cv_func_getpagesize" >&6; }
23605
23606  if test $gl_cv_func_getpagesize = yes; then
23607
23608cat >>confdefs.h <<_ACEOF
23609#define HAVE_GETPAGESIZE 1
23610_ACEOF
23611
23612  fi
23613
23614  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd succeeds when 4k < cwd_length < 16k" >&5
23615$as_echo_n "checking whether getcwd succeeds when 4k < cwd_length < 16k... " >&6; }
23616if ${gl_cv_func_getcwd_succeeds_beyond_4k+:} false; then :
23617  $as_echo_n "(cached) " >&6
23618else
23619  # Remove any remnants of a previous test.
23620     rm -rf confdir-14B---
23621     # Arrange for deletion of the temporary directory this test creates.
23622     ac_clean_files="$ac_clean_files confdir-14B---"
23623          if test "$cross_compiling" = yes; then :
23624  case "$host_os" in
23625                   # Guess yes on musl systems.
23626          *-musl*) gl_cv_func_getcwd_succeeds_beyond_4k="guessing yes" ;;
23627                   # Guess no otherwise, even on glibc systems.
23628          *)       gl_cv_func_getcwd_succeeds_beyond_4k="guessing no"
23629        esac
23630
23631else
23632  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23633/* end confdefs.h.  */
23634
23635#include <errno.h>
23636#include <stdlib.h>
23637#if HAVE_UNISTD_H
23638# include <unistd.h>
23639#else /* on Windows with MSVC */
23640# include <direct.h>
23641#endif
23642#include <string.h>
23643#include <sys/stat.h>
23644
23645
23646/* Arrange to define PATH_MAX, like "pathmax.h" does. */
23647#if HAVE_UNISTD_H
23648# include <unistd.h>
23649#endif
23650#include <limits.h>
23651#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
23652# include <sys/param.h>
23653#endif
23654#if !defined PATH_MAX && defined MAXPATHLEN
23655# define PATH_MAX MAXPATHLEN
23656#endif
23657#ifdef __hpux
23658# undef PATH_MAX
23659# define PATH_MAX 1024
23660#endif
23661#if defined _WIN32 && ! defined __CYGWIN__
23662# undef PATH_MAX
23663# define PATH_MAX 260
23664#endif
23665
23666
23667
23668$gl_mda_defines
23669
23670
23671#ifndef S_IRWXU
23672# define S_IRWXU 0700
23673#endif
23674
23675/* FIXME: skip the run-test altogether on systems without getpagesize.  */
23676#if ! HAVE_GETPAGESIZE
23677# define getpagesize() 0
23678#endif
23679
23680/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
23681   the 16kB pagesize on ia64 linux.  Those conditions make the code below
23682   trigger a bug in glibc's getcwd implementation before 2.4.90-10.  */
23683#define TARGET_LEN (5 * 1024)
23684
23685int
23686main ()
23687{
23688  char *cwd;
23689  size_t initial_cwd_len;
23690  int fail = 0;
23691
23692  /* The bug is triggered when PATH_MAX < getpagesize (), so skip
23693     this relatively expensive and invasive test if that's not true.  */
23694#ifdef PATH_MAX
23695  int bug_possible = PATH_MAX < getpagesize ();
23696#else
23697  int bug_possible = 0;
23698#endif
23699  if (! bug_possible)
23700    return 0;
23701
23702  cwd = getcwd (NULL, 0);
23703  if (cwd == NULL)
23704    return 2;
23705
23706  initial_cwd_len = strlen (cwd);
23707  free (cwd);
23708
23709  if (1)
23710    {
23711      static char const dir_name[] = "confdir-14B---";
23712      size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
23713                              / sizeof dir_name);
23714      size_t d;
23715      for (d = 0; d < desired_depth; d++)
23716        {
23717          if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
23718            {
23719              if (! (errno == ERANGE || errno == ENAMETOOLONG
23720                     || errno == ENOENT))
23721                fail = 3; /* Unable to construct deep hierarchy.  */
23722              break;
23723            }
23724        }
23725
23726      /* If libc has the bug in question, this invocation of getcwd
23727         results in a failed assertion.  */
23728      cwd = getcwd (NULL, 0);
23729      if (cwd == NULL)
23730        fail = 4; /* getcwd didn't assert, but it failed for a long name
23731                     where the answer could have been learned.  */
23732      free (cwd);
23733
23734      /* Call rmdir first, in case the above chdir failed.  */
23735      rmdir (dir_name);
23736      while (0 < d--)
23737        {
23738          if (chdir ("..") < 0)
23739            {
23740              fail = 5;
23741              break;
23742            }
23743          rmdir (dir_name);
23744        }
23745    }
23746
23747  return fail;
23748}
23749
23750_ACEOF
23751if ac_fn_c_try_run "$LINENO"; then :
23752  gl_cv_func_getcwd_succeeds_beyond_4k=yes
23753else
23754                                                  ret=$?
23755        if test $ret -ge 128 || test $ret = 4; then
23756          gl_cv_func_getcwd_succeeds_beyond_4k=no
23757        else
23758          gl_cv_func_getcwd_succeeds_beyond_4k=yes
23759        fi
23760
23761fi
23762rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23763  conftest.$ac_objext conftest.beam conftest.$ac_ext
23764fi
23765
23766
23767fi
23768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_succeeds_beyond_4k" >&5
23769$as_echo "$gl_cv_func_getcwd_succeeds_beyond_4k" >&6; }
23770  case "$gl_cv_func_getcwd_succeeds_beyond_4k" in
23771    *no)
23772      gl_abort_bug=yes
23773      ;;
23774    *)
23775
23776      ;;
23777  esac
23778
23779          ;;
23780      esac
23781      ;;
23782  esac
23783      case "$gl_cv_func_getcwd_path_max" in
23784    *"no" | *"no, it has the AIX bug") ;;
23785    *)
23786
23787$as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
23788
23789      ;;
23790  esac
23791  case "$gl_cv_func_getcwd_path_max" in
23792    *"no, but it is partly working")
23793
23794$as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
23795
23796      ;;
23797    *"yes, but with shorter paths")
23798
23799$as_echo "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h
23800
23801      ;;
23802  esac
23803
23804  if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
23805     || test $gl_cv_func_getcwd_posix_signature != yes \
23806     || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \
23807     || test $gl_abort_bug = yes; then
23808    REPLACE_GETCWD=1
23809  fi
23810
23811  if test $REPLACE_GETCWD = 1; then
23812
23813
23814
23815
23816
23817
23818
23819
23820  gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
23821
23822
23823
23824
23825  :
23826
23827  fi
23828
23829
23830cat >>confdefs.h <<_ACEOF
23831#define GNULIB_GETCWD 1
23832_ACEOF
23833
23834
23835
23836
23837
23838
23839
23840          GNULIB_GETCWD=1
23841
23842
23843
23844
23845
23846$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
23847
23848
23849
23850
23851
23852
23853
23854
23855  case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
23856  *yes,yes) ;;
23857  *)
23858        REPLACE_GETCWD=1
23859    ;;
23860  esac
23861
23862  if test $REPLACE_GETCWD = 1; then
23863
23864
23865
23866
23867
23868
23869
23870
23871  gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
23872
23873  fi
23874
23875
23876
23877
23878
23879          GNULIB_GETCWD=1
23880
23881
23882
23883
23884
23885$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
23886
23887
23888
23889
23890
23891
23892
23893
23894
23895
23896
23897  if test $ac_cv_func_getdelim = yes; then
23898    HAVE_GETDELIM=1
23899        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5
23900$as_echo_n "checking for working getdelim function... " >&6; }
23901if ${gl_cv_func_working_getdelim+:} false; then :
23902  $as_echo_n "(cached) " >&6
23903else
23904  echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
23905       if test "$cross_compiling" = yes; then :
23906                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23907/* end confdefs.h.  */
23908
23909#include <features.h>
23910#ifdef __GNU_LIBRARY__
23911 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
23912  Lucky GNU user
23913 #endif
23914#endif
23915
23916_ACEOF
23917if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23918  $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
23919  gl_cv_func_working_getdelim="guessing yes"
23920else
23921  case "$host_os" in
23922               *-musl*) gl_cv_func_working_getdelim="guessing yes" ;;
23923               *)       gl_cv_func_working_getdelim="$gl_cross_guess_normal" ;;
23924             esac
23925
23926fi
23927rm -f conftest*
23928
23929
23930else
23931  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23932/* end confdefs.h.  */
23933
23934#    include <stdio.h>
23935#    include <stdlib.h>
23936#    include <string.h>
23937    int main ()
23938    {
23939      FILE *in = fopen ("./conftest.data", "r");
23940      if (!in)
23941        return 1;
23942      {
23943        /* Test result for a NULL buffer and a zero size.
23944           Based on a test program from Karl Heuer.  */
23945        char *line = NULL;
23946        size_t siz = 0;
23947        int len = getdelim (&line, &siz, '\n', in);
23948        if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
23949          { free (line); fclose (in); return 2; }
23950        free (line);
23951      }
23952      {
23953        /* Test result for a NULL buffer and a non-zero size.
23954           This crashes on FreeBSD 8.0.  */
23955        char *line = NULL;
23956        size_t siz = (size_t)(~0) / 4;
23957        if (getdelim (&line, &siz, '\n', in) == -1)
23958          { fclose (in); return 3; }
23959        free (line);
23960      }
23961      fclose (in);
23962      return 0;
23963    }
23964
23965_ACEOF
23966if ac_fn_c_try_run "$LINENO"; then :
23967  gl_cv_func_working_getdelim=yes
23968else
23969  gl_cv_func_working_getdelim=no
23970fi
23971rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23972  conftest.$ac_objext conftest.beam conftest.$ac_ext
23973fi
23974
23975
23976fi
23977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5
23978$as_echo "$gl_cv_func_working_getdelim" >&6; }
23979    case "$gl_cv_func_working_getdelim" in
23980      *yes) ;;
23981      *) REPLACE_GETDELIM=1 ;;
23982    esac
23983  else
23984    HAVE_GETDELIM=0
23985  fi
23986
23987  if test $ac_cv_have_decl_getdelim = no; then
23988    HAVE_DECL_GETDELIM=0
23989  fi
23990
23991  if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
23992
23993
23994
23995
23996
23997
23998
23999
24000  gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext"
24001
24002
24003  for ac_func in flockfile funlockfile
24004do :
24005  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
24006ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
24007if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
24008  cat >>confdefs.h <<_ACEOF
24009#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
24010_ACEOF
24011
24012fi
24013done
24014
24015  ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
24016if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
24017  ac_have_decl=1
24018else
24019  ac_have_decl=0
24020fi
24021
24022cat >>confdefs.h <<_ACEOF
24023#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
24024_ACEOF
24025
24026
24027  fi
24028
24029
24030
24031
24032
24033          GNULIB_GETDELIM=1
24034
24035
24036
24037
24038
24039$as_echo "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h
24040
24041
24042
24043
24044
24045
24046
24047
24048  if test $ac_cv_func_getdtablesize = yes &&
24049     test $ac_cv_have_decl_getdtablesize = yes; then
24050    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
24051$as_echo_n "checking whether getdtablesize works... " >&6; }
24052if ${gl_cv_func_getdtablesize_works+:} false; then :
24053  $as_echo_n "(cached) " >&6
24054else
24055                                                   case "$host_os" in
24056         vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
24057         *)
24058                                                       if test "$cross_compiling" = yes; then :
24059  case "$host_os" in
24060                cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
24061                  gl_cv_func_getdtablesize_works="guessing no" ;;
24062                *) gl_cv_func_getdtablesize_works="guessing yes" ;;
24063              esac
24064
24065else
24066  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24067/* end confdefs.h.  */
24068
24069             #include <unistd.h>
24070
24071
24072$gl_mda_defines
24073
24074
24075int
24076main ()
24077{
24078int size = getdtablesize();
24079                 if (dup2 (0, getdtablesize()) != -1)
24080                   return 1;
24081                 if (size != getdtablesize())
24082                   return 2;
24083
24084  ;
24085  return 0;
24086}
24087_ACEOF
24088if ac_fn_c_try_run "$LINENO"; then :
24089  gl_cv_func_getdtablesize_works=yes
24090else
24091  gl_cv_func_getdtablesize_works=no
24092fi
24093rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24094  conftest.$ac_objext conftest.beam conftest.$ac_ext
24095fi
24096
24097           ;;
24098       esac
24099
24100fi
24101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
24102$as_echo "$gl_cv_func_getdtablesize_works" >&6; }
24103    case "$gl_cv_func_getdtablesize_works" in
24104      *yes | "no (limitation)") ;;
24105      *) REPLACE_GETDTABLESIZE=1 ;;
24106    esac
24107  else
24108    HAVE_GETDTABLESIZE=0
24109  fi
24110
24111  if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
24112
24113
24114
24115
24116
24117
24118
24119
24120  gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
24121
24122    :
24123  fi
24124
24125
24126
24127
24128
24129          GNULIB_GETDTABLESIZE=1
24130
24131
24132
24133
24134
24135$as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
24136
24137
24138
24139
24140
24141
24142
24143
24144        ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
24145if test "x$ac_cv_func_getgroups" = xyes; then :
24146
24147fi
24148
24149
24150  # If we don't yet have getgroups, see if it's in -lbsd.
24151  # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
24152  ac_save_LIBS=$LIBS
24153  if test $ac_cv_func_getgroups = no; then
24154    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
24155$as_echo_n "checking for getgroups in -lbsd... " >&6; }
24156if ${ac_cv_lib_bsd_getgroups+:} false; then :
24157  $as_echo_n "(cached) " >&6
24158else
24159  ac_check_lib_save_LIBS=$LIBS
24160LIBS="-lbsd  $LIBS"
24161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24162/* end confdefs.h.  */
24163
24164/* Override any GCC internal prototype to avoid an error.
24165   Use char because int might match the return type of a GCC
24166   builtin and then its argument prototype would still apply.  */
24167#ifdef __cplusplus
24168extern "C"
24169#endif
24170char getgroups ();
24171int
24172main ()
24173{
24174return getgroups ();
24175  ;
24176  return 0;
24177}
24178_ACEOF
24179if ac_fn_c_try_link "$LINENO"; then :
24180  ac_cv_lib_bsd_getgroups=yes
24181else
24182  ac_cv_lib_bsd_getgroups=no
24183fi
24184rm -f core conftest.err conftest.$ac_objext \
24185    conftest$ac_exeext conftest.$ac_ext
24186LIBS=$ac_check_lib_save_LIBS
24187fi
24188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
24189$as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
24190if test "x$ac_cv_lib_bsd_getgroups" = xyes; then :
24191  GETGROUPS_LIB=-lbsd
24192fi
24193
24194  fi
24195
24196  # Run the program to test the functionality of the system-supplied
24197  # getgroups function only if there is such a function.
24198  if test $ac_cv_func_getgroups = yes; then
24199    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
24200$as_echo_n "checking for working getgroups... " >&6; }
24201if ${ac_cv_func_getgroups_works+:} false; then :
24202  $as_echo_n "(cached) " >&6
24203else
24204  if test "$cross_compiling" = yes; then :
24205  case "$host_os" in # ((
24206                           # Guess yes on glibc systems.
24207            *-gnu* | gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
24208                           # Guess yes on musl systems.
24209            *-musl*)       ac_cv_func_getgroups_works="guessing yes" ;;
24210                           # If we don't know, obey --enable-cross-guesses.
24211            *)             ac_cv_func_getgroups_works="$gl_cross_guess_normal" ;;
24212          esac
24213
24214else
24215  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24216/* end confdefs.h.  */
24217$ac_includes_default
24218int
24219main ()
24220{
24221/* On NeXTstep 3.2, getgroups (0, 0) always fails.  */
24222              return getgroups (0, 0) == -1;
24223  ;
24224  return 0;
24225}
24226
24227_ACEOF
24228if ac_fn_c_try_run "$LINENO"; then :
24229  ac_cv_func_getgroups_works=yes
24230else
24231  ac_cv_func_getgroups_works=no
24232fi
24233rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24234  conftest.$ac_objext conftest.beam conftest.$ac_ext
24235fi
24236
24237
24238fi
24239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
24240$as_echo "$ac_cv_func_getgroups_works" >&6; }
24241  else
24242    ac_cv_func_getgroups_works=no
24243  fi
24244  case "$ac_cv_func_getgroups_works" in
24245    *yes)
24246
24247$as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
24248
24249      ;;
24250  esac
24251  LIBS=$ac_save_LIBS
24252
24253  if test $ac_cv_func_getgroups != yes; then
24254    HAVE_GETGROUPS=0
24255  else
24256    if test "$ac_cv_type_getgroups" != gid_t \
24257       || { case "$ac_cv_func_getgroups_works" in
24258              *yes) false;;
24259              *) true;;
24260            esac
24261          }; then
24262      REPLACE_GETGROUPS=1
24263
24264$as_echo "#define GETGROUPS_ZERO_BUG 1" >>confdefs.h
24265
24266    else
24267                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getgroups handles negative values" >&5
24268$as_echo_n "checking whether getgroups handles negative values... " >&6; }
24269if ${gl_cv_func_getgroups_works+:} false; then :
24270  $as_echo_n "(cached) " >&6
24271else
24272  if test "$cross_compiling" = yes; then :
24273  case "$host_os" in
24274                            # Guess yes on glibc systems.
24275             *-gnu* | gnu*) gl_cv_func_getgroups_works="guessing yes" ;;
24276                            # Guess yes on musl systems.
24277             *-musl*)       gl_cv_func_getgroups_works="guessing yes" ;;
24278                            # If we don't know, obey --enable-cross-guesses.
24279             *)             gl_cv_func_getgroups_works="$gl_cross_guess_normal" ;;
24280           esac
24281
24282else
24283  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24284/* end confdefs.h.  */
24285$ac_includes_default
24286int
24287main ()
24288{
24289int size = getgroups (0, 0);
24290            gid_t *list = malloc (size * sizeof *list);
24291            int result = getgroups (-1, list) != -1;
24292            free (list);
24293            return result;
24294  ;
24295  return 0;
24296}
24297_ACEOF
24298if ac_fn_c_try_run "$LINENO"; then :
24299  gl_cv_func_getgroups_works=yes
24300else
24301  gl_cv_func_getgroups_works=no
24302fi
24303rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24304  conftest.$ac_objext conftest.beam conftest.$ac_ext
24305fi
24306
24307fi
24308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getgroups_works" >&5
24309$as_echo "$gl_cv_func_getgroups_works" >&6; }
24310      case "$gl_cv_func_getgroups_works" in
24311        *yes) ;;
24312        *) REPLACE_GETGROUPS=1 ;;
24313      esac
24314    fi
24315  fi
24316  test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS"
24317
24318  if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then
24319
24320
24321
24322
24323
24324
24325
24326
24327  gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext"
24328
24329  fi
24330
24331
24332
24333
24334
24335          GNULIB_GETGROUPS=1
24336
24337
24338
24339
24340
24341$as_echo "#define GNULIB_TEST_GETGROUPS 1" >>confdefs.h
24342
24343
24344
24345
24346
24347
24348
24349
24350
24351
24352  gl_getline_needs_run_time_check=no
24353  ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline"
24354if test "x$ac_cv_func_getline" = xyes; then :
24355                   gl_getline_needs_run_time_check=yes
24356else
24357  am_cv_func_working_getline=no
24358fi
24359
24360  if test $gl_getline_needs_run_time_check = yes; then
24361    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getline function" >&5
24362$as_echo_n "checking for working getline function... " >&6; }
24363if ${am_cv_func_working_getline+:} false; then :
24364  $as_echo_n "(cached) " >&6
24365else
24366  echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
24367       if test "$cross_compiling" = yes; then :
24368                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24369/* end confdefs.h.  */
24370
24371#include <features.h>
24372#ifdef __GNU_LIBRARY__
24373 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
24374  Lucky GNU user
24375 #endif
24376#endif
24377
24378_ACEOF
24379if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24380  $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
24381  am_cv_func_working_getline="guessing yes"
24382else
24383  case "$host_os" in
24384               *-musl*) am_cv_func_working_getline="guessing yes" ;;
24385               *)       am_cv_func_working_getline="$gl_cross_guess_normal" ;;
24386             esac
24387
24388fi
24389rm -f conftest*
24390
24391
24392else
24393  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24394/* end confdefs.h.  */
24395
24396#    include <stdio.h>
24397#    include <stdlib.h>
24398#    include <string.h>
24399    int main ()
24400    {
24401      FILE *in = fopen ("./conftest.data", "r");
24402      if (!in)
24403        return 1;
24404      {
24405        /* Test result for a NULL buffer and a zero size.
24406           Based on a test program from Karl Heuer.  */
24407        char *line = NULL;
24408        size_t siz = 0;
24409        int len = getline (&line, &siz, in);
24410        if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
24411          { free (line); fclose (in); return 2; }
24412        free (line);
24413      }
24414      {
24415        /* Test result for a NULL buffer and a non-zero size.
24416           This crashes on FreeBSD 8.0.  */
24417        char *line = NULL;
24418        size_t siz = (size_t)(~0) / 4;
24419        if (getline (&line, &siz, in) == -1)
24420          { fclose (in); return 3; }
24421        free (line);
24422      }
24423      fclose (in);
24424      return 0;
24425    }
24426
24427_ACEOF
24428if ac_fn_c_try_run "$LINENO"; then :
24429  am_cv_func_working_getline=yes
24430else
24431  am_cv_func_working_getline=no
24432fi
24433rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24434  conftest.$ac_objext conftest.beam conftest.$ac_ext
24435fi
24436
24437
24438fi
24439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_working_getline" >&5
24440$as_echo "$am_cv_func_working_getline" >&6; }
24441  fi
24442
24443  if test $ac_cv_have_decl_getline = no; then
24444    HAVE_DECL_GETLINE=0
24445  fi
24446
24447  case "$am_cv_func_working_getline" in
24448    *yes) ;;
24449    *)
24450                        REPLACE_GETLINE=1
24451      ;;
24452  esac
24453
24454  if test $REPLACE_GETLINE = 1; then
24455
24456
24457
24458
24459
24460
24461
24462
24463  gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext"
24464
24465
24466  :
24467
24468  fi
24469
24470
24471
24472
24473
24474          GNULIB_GETLINE=1
24475
24476
24477
24478
24479
24480$as_echo "#define GNULIB_TEST_GETLINE 1" >>confdefs.h
24481
24482
24483
24484
24485
24486
24487
24488
24489
24490
24491
24492
24493    REPLACE_GETOPT=1
24494
24495  if test $REPLACE_GETOPT = 1; then
24496
24497
24498  if test $ac_cv_header_sys_cdefs_h = yes; then
24499    HAVE_SYS_CDEFS_H=1
24500  else
24501    HAVE_SYS_CDEFS_H=0
24502  fi
24503
24504
24505
24506$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
24507
24508  GETOPT_H=getopt.h
24509  GETOPT_CDEFS_H=getopt-cdefs.h
24510
24511
24512
24513  fi
24514
24515  if test $REPLACE_GETOPT = 1; then
24516
24517
24518
24519
24520
24521
24522
24523
24524  gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
24525
24526
24527
24528
24529
24530
24531
24532
24533
24534  gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
24535
24536        GNULIB_GL_UNISTD_H_GETOPT=1
24537  fi
24538
24539
24540
24541
24542
24543
24544          GNULIB_GETOPT_POSIX=1
24545
24546
24547
24548
24549
24550$as_echo "#define GNULIB_TEST_GETOPT_POSIX 1" >>confdefs.h
24551
24552
24553
24554
24555
24556
24557
24558      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
24559$as_echo_n "checking for getpagesize... " >&6; }
24560if ${gl_cv_func_getpagesize+:} false; then :
24561  $as_echo_n "(cached) " >&6
24562else
24563  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24564/* end confdefs.h.  */
24565#include <unistd.h>
24566int
24567main ()
24568{
24569return getpagesize();
24570  ;
24571  return 0;
24572}
24573
24574_ACEOF
24575if ac_fn_c_try_link "$LINENO"; then :
24576  gl_cv_func_getpagesize=yes
24577else
24578  gl_cv_func_getpagesize=no
24579fi
24580rm -f core conftest.err conftest.$ac_objext \
24581    conftest$ac_exeext conftest.$ac_ext
24582
24583fi
24584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getpagesize" >&5
24585$as_echo "$gl_cv_func_getpagesize" >&6; }
24586
24587  if test $gl_cv_func_getpagesize = no; then
24588    HAVE_GETPAGESIZE=0
24589    for ac_header in OS.h
24590do :
24591  ac_fn_c_check_header_mongrel "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default"
24592if test "x$ac_cv_header_OS_h" = xyes; then :
24593  cat >>confdefs.h <<_ACEOF
24594#define HAVE_OS_H 1
24595_ACEOF
24596
24597fi
24598
24599done
24600
24601    if test $ac_cv_header_OS_h = yes; then
24602      HAVE_OS_H=1
24603    fi
24604    for ac_header in sys/param.h
24605do :
24606  ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
24607if test "x$ac_cv_header_sys_param_h" = xyes; then :
24608  cat >>confdefs.h <<_ACEOF
24609#define HAVE_SYS_PARAM_H 1
24610_ACEOF
24611
24612fi
24613
24614done
24615
24616    if test $ac_cv_header_sys_param_h = yes; then
24617      HAVE_SYS_PARAM_H=1
24618    fi
24619  fi
24620  case "$host_os" in
24621    mingw*)
24622      REPLACE_GETPAGESIZE=1
24623      ;;
24624  esac
24625      ac_fn_c_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default"
24626if test "x$ac_cv_have_decl_getpagesize" = xyes; then :
24627
24628else
24629  HAVE_DECL_GETPAGESIZE=0
24630fi
24631
24632
24633  if test $REPLACE_GETPAGESIZE = 1; then
24634
24635
24636
24637
24638
24639
24640
24641
24642  gl_LIBOBJS="$gl_LIBOBJS getpagesize.$ac_objext"
24643
24644  fi
24645
24646
24647
24648
24649
24650          GNULIB_GETPAGESIZE=1
24651
24652
24653
24654
24655
24656$as_echo "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h
24657
24658
24659
24660
24661
24662
24663  ac_found=0
24664  ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
24665"
24666if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
24667  ac_have_decl=1
24668else
24669  ac_have_decl=0
24670fi
24671
24672cat >>confdefs.h <<_ACEOF
24673#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
24674_ACEOF
24675if test $ac_have_decl = 1; then :
24676  ac_found=1
24677fi
24678
24679  ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
24680"
24681if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
24682  ac_have_decl=1
24683else
24684  ac_have_decl=0
24685fi
24686
24687cat >>confdefs.h <<_ACEOF
24688#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
24689_ACEOF
24690if test $ac_have_decl = 1; then :
24691  ac_found=1
24692fi
24693
24694  ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
24695"
24696if test "x$ac_cv_have_decl___argv" = xyes; then :
24697  ac_have_decl=1
24698else
24699  ac_have_decl=0
24700fi
24701
24702cat >>confdefs.h <<_ACEOF
24703#define HAVE_DECL___ARGV $ac_have_decl
24704_ACEOF
24705if test $ac_have_decl = 1; then :
24706  ac_found=1
24707fi
24708
24709
24710  # Incur the cost of this test only if none of the above worked.
24711  if test $ac_found = 0; then
24712    # On OpenBSD 5.1, using the global __progname variable appears to be
24713    # the only way to implement getprogname.
24714    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
24715$as_echo_n "checking whether __progname is defined in default libraries... " >&6; }
24716if ${gl_cv_var___progname+:} false; then :
24717  $as_echo_n "(cached) " >&6
24718else
24719
24720        gl_cv_var___progname=
24721        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24722/* end confdefs.h.  */
24723extern char *__progname;
24724int
24725main ()
24726{
24727return *__progname;
24728
24729  ;
24730  return 0;
24731}
24732_ACEOF
24733if ac_fn_c_try_link "$LINENO"; then :
24734  gl_cv_var___progname=yes
24735
24736fi
24737rm -f core conftest.err conftest.$ac_objext \
24738    conftest$ac_exeext conftest.$ac_ext
24739
24740
24741fi
24742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
24743$as_echo "$gl_cv_var___progname" >&6; }
24744    if test "$gl_cv_var___progname" = yes; then
24745
24746$as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
24747
24748    fi
24749  fi
24750
24751
24752
24753
24754
24755  if test "$ac_cv_func_getrandom" != yes; then
24756    HAVE_GETRANDOM=0
24757  else
24758        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getrandom is compatible with its GNU+BSD signature" >&5
24759$as_echo_n "checking whether getrandom is compatible with its GNU+BSD signature... " >&6; }
24760if ${gl_cv_func_getrandom_ok+:} false; then :
24761  $as_echo_n "(cached) " >&6
24762else
24763  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24764/* end confdefs.h.  */
24765/* Additional includes are needed before <sys/random.h> on uClibc
24766                 and Mac OS X.  */
24767              #include <sys/types.h>
24768              #include <stdlib.h>
24769              #include <sys/random.h>
24770              ssize_t getrandom (void *, size_t, unsigned int);
24771
24772int
24773main ()
24774{
24775
24776  ;
24777  return 0;
24778}
24779
24780_ACEOF
24781if ac_fn_c_try_compile "$LINENO"; then :
24782  gl_cv_func_getrandom_ok=yes
24783else
24784  gl_cv_func_getrandom_ok=no
24785fi
24786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24787
24788fi
24789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getrandom_ok" >&5
24790$as_echo "$gl_cv_func_getrandom_ok" >&6; }
24791    if test $gl_cv_func_getrandom_ok = no; then
24792      REPLACE_GETRANDOM=1
24793    fi
24794  fi
24795
24796  case "$host_os" in
24797    mingw*)
24798      for ac_header in bcrypt.h
24799do :
24800  ac_fn_c_check_header_compile "$LINENO" "bcrypt.h" "ac_cv_header_bcrypt_h" "#include <windows.h>
24801
24802"
24803if test "x$ac_cv_header_bcrypt_h" = xyes; then :
24804  cat >>confdefs.h <<_ACEOF
24805#define HAVE_BCRYPT_H 1
24806_ACEOF
24807
24808fi
24809
24810done
24811
24812      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the bcrypt library is guaranteed to be present" >&5
24813$as_echo_n "checking whether the bcrypt library is guaranteed to be present... " >&6; }
24814if ${gl_cv_lib_assume_bcrypt+:} false; then :
24815  $as_echo_n "(cached) " >&6
24816else
24817  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24818/* end confdefs.h.  */
24819#include <windows.h>
24820int
24821main ()
24822{
24823#if !(_WIN32_WINNT >= _WIN32_WINNT_WIN7)
24824                  cannot assume it
24825                #endif
24826
24827  ;
24828  return 0;
24829}
24830
24831_ACEOF
24832if ac_fn_c_try_compile "$LINENO"; then :
24833  gl_cv_lib_assume_bcrypt=yes
24834else
24835  gl_cv_lib_assume_bcrypt=no
24836fi
24837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24838
24839fi
24840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_assume_bcrypt" >&5
24841$as_echo "$gl_cv_lib_assume_bcrypt" >&6; }
24842      if test $gl_cv_lib_assume_bcrypt = yes; then
24843
24844$as_echo "#define HAVE_LIB_BCRYPT 1" >>confdefs.h
24845
24846        LIB_GETRANDOM='-lbcrypt'
24847      else
24848        LIB_GETRANDOM='-ladvapi32'
24849      fi
24850      ;;
24851    *)
24852      LIB_GETRANDOM= ;;
24853  esac
24854
24855
24856  if test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1; then
24857
24858
24859
24860
24861
24862
24863
24864
24865  gl_LIBOBJS="$gl_LIBOBJS getrandom.$ac_objext"
24866
24867  fi
24868
24869
24870
24871
24872
24873          GNULIB_GETRANDOM=1
24874
24875
24876
24877
24878
24879$as_echo "#define GNULIB_TEST_GETRANDOM 1" >>confdefs.h
24880
24881
24882
24883
24884
24885
24886
24887
24888
24889
24890
24891
24892
24893
24894
24895
24896
24897
24898  gl_gettimeofday_timezone=void
24899  if test $ac_cv_func_gettimeofday != yes; then
24900    HAVE_GETTIMEOFDAY=0
24901  else
24902    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
24903$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
24904if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
24905  $as_echo_n "(cached) " >&6
24906else
24907  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24908/* end confdefs.h.  */
24909#include <sys/time.h>
24910              struct timeval c;
24911              int gettimeofday (struct timeval *restrict, void *restrict);
24912
24913int
24914main ()
24915{
24916/* glibc uses struct timezone * rather than the POSIX void *
24917                 if _GNU_SOURCE is defined.  However, since the only portable
24918                 use of gettimeofday uses NULL as the second parameter, and
24919                 since the glibc definition is actually more typesafe, it is
24920                 not worth wrapping this to get a compliant signature.  */
24921              int (*f) (struct timeval *restrict, void *restrict)
24922                = gettimeofday;
24923              int x = f (&c, 0);
24924              return !(x | c.tv_sec | c.tv_usec);
24925
24926  ;
24927  return 0;
24928}
24929_ACEOF
24930if ac_fn_c_try_compile "$LINENO"; then :
24931  gl_cv_func_gettimeofday_posix_signature=yes
24932else
24933  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24934/* end confdefs.h.  */
24935#include <sys/time.h>
24936int gettimeofday (struct timeval *restrict, struct timezone *restrict);
24937
24938int
24939main ()
24940{
24941
24942  ;
24943  return 0;
24944}
24945_ACEOF
24946if ac_fn_c_try_compile "$LINENO"; then :
24947  gl_cv_func_gettimeofday_posix_signature=almost
24948else
24949  gl_cv_func_gettimeofday_posix_signature=no
24950fi
24951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24952fi
24953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24954fi
24955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
24956$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
24957    if test $gl_cv_func_gettimeofday_posix_signature = almost; then
24958      gl_gettimeofday_timezone='struct timezone'
24959    elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
24960      REPLACE_GETTIMEOFDAY=1
24961    fi
24962        if test $REPLACE_STRUCT_TIMEVAL = 1; then
24963      REPLACE_GETTIMEOFDAY=1
24964    fi
24965            case "$host_os" in
24966      mingw*) REPLACE_GETTIMEOFDAY=1 ;;
24967    esac
24968  fi
24969
24970cat >>confdefs.h <<_ACEOF
24971#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
24972_ACEOF
24973
24974
24975  if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
24976
24977
24978
24979
24980
24981
24982
24983
24984  gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
24985
24986    :
24987  fi
24988
24989
24990
24991
24992
24993          GNULIB_GETTIMEOFDAY=1
24994
24995
24996
24997
24998
24999$as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
25000
25001
25002
25003
25004
25005
25006
25007
25008      ac_fn_c_check_func "$LINENO" "group_member" "ac_cv_func_group_member"
25009if test "x$ac_cv_func_group_member" = xyes; then :
25010
25011else
25012
25013    HAVE_GROUP_MEMBER=0
25014
25015fi
25016
25017
25018  if test $HAVE_GROUP_MEMBER = 0; then
25019
25020
25021
25022
25023
25024
25025
25026
25027  gl_LIBOBJS="$gl_LIBOBJS group-member.$ac_objext"
25028
25029
25030
25031
25032  fi
25033
25034
25035
25036
25037
25038          GNULIB_GROUP_MEMBER=1
25039
25040
25041
25042
25043
25044$as_echo "#define GNULIB_TEST_GROUP_MEMBER 1" >>confdefs.h
25045
25046
25047
25048
25049  LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL"
25050
25051
25052
25053  :
25054
25055
25056
25057
25058  :
25059
25060  :
25061  :
25062  :
25063  :
25064
25065
25066
25067
25068  PRIPTR_PREFIX=
25069  if test -n "$STDINT_H"; then
25070            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25071/* end confdefs.h.  */
25072
25073         #ifdef _WIN64
25074         LLP64
25075         #endif
25076
25077int
25078main ()
25079{
25080
25081  ;
25082  return 0;
25083}
25084
25085_ACEOF
25086if ac_fn_c_try_compile "$LINENO"; then :
25087  PRIPTR_PREFIX='"l"'
25088else
25089  PRIPTR_PREFIX='"ll"'
25090fi
25091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25092  else
25093        for glpfx in '' l ll I64; do
25094      case $glpfx in
25095        '')  gltype1='int';;
25096        l)   gltype1='long int';;
25097        ll)  gltype1='long long int';;
25098        I64) gltype1='__int64';;
25099      esac
25100      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25101/* end confdefs.h.  */
25102#include <stdint.h>
25103           extern intptr_t foo;
25104           extern $gltype1 foo;
25105int
25106main ()
25107{
25108
25109  ;
25110  return 0;
25111}
25112_ACEOF
25113if ac_fn_c_try_compile "$LINENO"; then :
25114  PRIPTR_PREFIX='"'$glpfx'"'
25115fi
25116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25117      test -n "$PRIPTR_PREFIX" && break
25118    done
25119  fi
25120
25121
25122
25123  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
25124$as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
25125if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
25126  $as_echo_n "(cached) " >&6
25127else
25128  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25129/* end confdefs.h.  */
25130/* Work also in C++ mode.  */
25131            #define __STDC_LIMIT_MACROS 1
25132
25133            /* Work if build is not clean.  */
25134            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
25135
25136            #include <limits.h>
25137            #if HAVE_STDINT_H
25138             #include <stdint.h>
25139            #endif
25140
25141            #if defined INT32_MAX && defined INTMAX_MAX
25142             #define CONDITION (INT32_MAX < INTMAX_MAX)
25143            #else
25144             #define CONDITION (sizeof (int) < sizeof (long long int))
25145            #endif
25146            int test[CONDITION ? 1 : -1];
25147int
25148main ()
25149{
25150
25151  ;
25152  return 0;
25153}
25154_ACEOF
25155if ac_fn_c_try_compile "$LINENO"; then :
25156  gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
25157else
25158  gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
25159fi
25160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25161fi
25162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
25163$as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
25164  if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
25165    INT32_MAX_LT_INTMAX_MAX=1;
25166  else
25167    INT32_MAX_LT_INTMAX_MAX=0;
25168  fi
25169
25170
25171  if test $APPLE_UNIVERSAL_BUILD = 0; then
25172
25173  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
25174$as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
25175if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
25176  $as_echo_n "(cached) " >&6
25177else
25178  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25179/* end confdefs.h.  */
25180/* Work also in C++ mode.  */
25181            #define __STDC_LIMIT_MACROS 1
25182
25183            /* Work if build is not clean.  */
25184            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
25185
25186            #include <limits.h>
25187            #if HAVE_STDINT_H
25188             #include <stdint.h>
25189            #endif
25190
25191            #if defined INT64_MAX
25192             #define CONDITION (INT64_MAX == LONG_MAX)
25193            #else
25194             #define CONDITION (sizeof (long long int) == sizeof (long int))
25195            #endif
25196            int test[CONDITION ? 1 : -1];
25197int
25198main ()
25199{
25200
25201  ;
25202  return 0;
25203}
25204_ACEOF
25205if ac_fn_c_try_compile "$LINENO"; then :
25206  gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
25207else
25208  gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
25209fi
25210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25211fi
25212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
25213$as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
25214  if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
25215    INT64_MAX_EQ_LONG_MAX=1;
25216  else
25217    INT64_MAX_EQ_LONG_MAX=0;
25218  fi
25219
25220
25221  else
25222    INT64_MAX_EQ_LONG_MAX=-1
25223  fi
25224
25225  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
25226$as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
25227if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
25228  $as_echo_n "(cached) " >&6
25229else
25230  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25231/* end confdefs.h.  */
25232/* Work also in C++ mode.  */
25233            #define __STDC_LIMIT_MACROS 1
25234
25235            /* Work if build is not clean.  */
25236            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
25237
25238            #include <limits.h>
25239            #if HAVE_STDINT_H
25240             #include <stdint.h>
25241            #endif
25242
25243            #if defined UINT32_MAX && defined UINTMAX_MAX
25244             #define CONDITION (UINT32_MAX < UINTMAX_MAX)
25245            #else
25246             #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
25247            #endif
25248            int test[CONDITION ? 1 : -1];
25249int
25250main ()
25251{
25252
25253  ;
25254  return 0;
25255}
25256_ACEOF
25257if ac_fn_c_try_compile "$LINENO"; then :
25258  gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
25259else
25260  gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
25261fi
25262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25263fi
25264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
25265$as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
25266  if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
25267    UINT32_MAX_LT_UINTMAX_MAX=1;
25268  else
25269    UINT32_MAX_LT_UINTMAX_MAX=0;
25270  fi
25271
25272
25273  if test $APPLE_UNIVERSAL_BUILD = 0; then
25274
25275  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
25276$as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
25277if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
25278  $as_echo_n "(cached) " >&6
25279else
25280  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25281/* end confdefs.h.  */
25282/* Work also in C++ mode.  */
25283            #define __STDC_LIMIT_MACROS 1
25284
25285            /* Work if build is not clean.  */
25286            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
25287
25288            #include <limits.h>
25289            #if HAVE_STDINT_H
25290             #include <stdint.h>
25291            #endif
25292
25293            #if defined UINT64_MAX
25294             #define CONDITION (UINT64_MAX == ULONG_MAX)
25295            #else
25296             #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
25297            #endif
25298            int test[CONDITION ? 1 : -1];
25299int
25300main ()
25301{
25302
25303  ;
25304  return 0;
25305}
25306_ACEOF
25307if ac_fn_c_try_compile "$LINENO"; then :
25308  gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
25309else
25310  gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
25311fi
25312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25313fi
25314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
25315$as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
25316  if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
25317    UINT64_MAX_EQ_ULONG_MAX=1;
25318  else
25319    UINT64_MAX_EQ_ULONG_MAX=0;
25320  fi
25321
25322
25323  else
25324    UINT64_MAX_EQ_ULONG_MAX=-1
25325  fi
25326
25327
25328
25329
25330
25331
25332
25333
25334  if test $ac_cv_func_isblank = no; then
25335    HAVE_ISBLANK=0
25336  fi
25337
25338  if test $HAVE_ISBLANK = 0; then
25339
25340
25341
25342
25343
25344
25345
25346
25347  gl_LIBOBJS="$gl_LIBOBJS isblank.$ac_objext"
25348
25349  fi
25350
25351
25352cat >>confdefs.h <<_ACEOF
25353#define GNULIB_ISBLANK 1
25354_ACEOF
25355
25356
25357
25358
25359
25360
25361
25362          GNULIB_ISBLANK=1
25363
25364
25365
25366
25367
25368
25369
25370
25371
25372  ac_fn_c_check_decl "$LINENO" "iswblank" "ac_cv_have_decl_iswblank" "
25373    #include <wchar.h>
25374    #include <wctype.h>
25375
25376"
25377if test "x$ac_cv_have_decl_iswblank" = xyes; then :
25378  ac_have_decl=1
25379else
25380  ac_have_decl=0
25381fi
25382
25383cat >>confdefs.h <<_ACEOF
25384#define HAVE_DECL_ISWBLANK $ac_have_decl
25385_ACEOF
25386
25387  if test $ac_cv_func_iswblank = no; then
25388    HAVE_ISWBLANK=0
25389    if test $ac_cv_have_decl_iswblank = yes; then
25390      REPLACE_ISWBLANK=1
25391    fi
25392  fi
25393  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
25394        :
25395  else
25396    if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
25397            :
25398    fi
25399  fi
25400
25401
25402  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
25403    :
25404  else
25405    if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
25406
25407
25408
25409
25410
25411
25412
25413
25414  gl_LIBOBJS="$gl_LIBOBJS iswblank.$ac_objext"
25415
25416    fi
25417  fi
25418
25419
25420
25421
25422
25423          GNULIB_ISWBLANK=1
25424
25425
25426
25427
25428
25429$as_echo "#define GNULIB_TEST_ISWBLANK 1" >>confdefs.h
25430
25431
25432
25433
25434
25435
25436
25437
25438
25439
25440
25441  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
25442        REPLACE_ISWDIGIT="$REPLACE_ISWCNTRL"
25443  else
25444    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswdigit is ISO C compliant" >&5
25445$as_echo_n "checking whether iswdigit is ISO C compliant... " >&6; }
25446if ${gl_cv_func_iswdigit_works+:} false; then :
25447  $as_echo_n "(cached) " >&6
25448else
25449
25450                     case "$host_os" in
25451         # Guess no on FreeBSD, NetBSD, Solaris, native Windows.
25452         freebsd* | dragonfly* | netbsd* | solaris* | mingw*)
25453           gl_cv_func_iswdigit_works="guessing no" ;;
25454         # Guess yes otherwise.
25455         *) gl_cv_func_iswdigit_works="guessing yes" ;;
25456       esac
25457       if test $LOCALE_FR != none || test $LOCALE_JA != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_ZH_CN != none; then
25458         if test "$cross_compiling" = yes; then :
25459  :
25460else
25461  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25462/* end confdefs.h.  */
25463
25464#include <locale.h>
25465#include <stdlib.h>
25466#include <string.h>
25467#include <wchar.h>
25468#include <wctype.h>
25469
25470/* Returns the value of iswdigit for the multibyte character s[0..n-1].  */
25471static int
25472for_character (const char *s, size_t n)
25473{
25474  mbstate_t state;
25475  wchar_t wc;
25476  size_t ret;
25477
25478  memset (&state, '\0', sizeof (mbstate_t));
25479  wc = (wchar_t) 0xBADFACE;
25480  ret = mbrtowc (&wc, s, n, &state);
25481  if (ret != n)
25482    abort ();
25483
25484  return iswdigit (wc);
25485}
25486
25487int
25488main (int argc, char *argv[])
25489{
25490  int is;
25491  int result = 0;
25492
25493  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
25494    {
25495      /* This fails on mingw, MSVC 14.  */
25496      /* U+00B2 SUPERSCRIPT TWO */
25497      is = for_character ("\262", 1);
25498      if (!(is == 0))
25499        result |= 1;
25500    }
25501  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
25502    {
25503      /* This fails on NetBSD 8.0.  */
25504      /* U+FF11 FULLWIDTH DIGIT ONE */
25505      is = for_character ("\243\261", 2);
25506      if (!(is == 0))
25507        result |= 2;
25508    }
25509  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
25510    {
25511      /* This fails on FreeBSD 12, NetBSD 8.0, MSVC 14.  */
25512      /* U+0663 ARABIC-INDIC DIGIT THREE */
25513      is = for_character ("\331\243", 2);
25514      if (!(is == 0))
25515        result |= 4;
25516      /* This fails on FreeBSD 12, NetBSD 8.0, MSVC 14.  */
25517      /* U+FF11 FULLWIDTH DIGIT ONE */
25518      is = for_character ("\357\274\221", 3);
25519      if (!(is == 0))
25520        result |= 8;
25521    }
25522  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
25523    {
25524      /* This fails on NetBSD 8.0, Solaris 10, Solaris 11.4.  */
25525      /* U+FF11 FULLWIDTH DIGIT ONE */
25526      is = for_character ("\243\261", 2);
25527      if (!(is == 0))
25528        result |= 16;
25529    }
25530  return result;
25531}
25532_ACEOF
25533if ac_fn_c_try_run "$LINENO"; then :
25534  gl_cv_func_iswdigit_works=yes
25535else
25536  gl_cv_func_iswdigit_works=no
25537fi
25538rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25539  conftest.$ac_objext conftest.beam conftest.$ac_ext
25540fi
25541
25542       fi
25543
25544fi
25545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswdigit_works" >&5
25546$as_echo "$gl_cv_func_iswdigit_works" >&6; }
25547    case "$gl_cv_func_iswdigit_works" in
25548      *yes) ;;
25549      *) REPLACE_ISWDIGIT=1 ;;
25550    esac
25551  fi
25552
25553  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
25554    :
25555  else
25556    if test $REPLACE_ISWDIGIT = 1; then
25557
25558
25559
25560
25561
25562
25563
25564
25565  gl_LIBOBJS="$gl_LIBOBJS iswdigit.$ac_objext"
25566
25567    fi
25568  fi
25569
25570
25571
25572
25573
25574          GNULIB_ISWDIGIT=1
25575
25576
25577
25578
25579
25580$as_echo "#define GNULIB_TEST_ISWDIGIT 1" >>confdefs.h
25581
25582
25583
25584
25585
25586
25587
25588
25589
25590
25591  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
25592        REPLACE_ISWXDIGIT="$REPLACE_ISWCNTRL"
25593  else
25594    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswxdigit is ISO C compliant" >&5
25595$as_echo_n "checking whether iswxdigit is ISO C compliant... " >&6; }
25596if ${gl_cv_func_iswxdigit_works+:} false; then :
25597  $as_echo_n "(cached) " >&6
25598else
25599
25600                     case "$host_os" in
25601         # Guess no on FreeBSD, NetBSD, Solaris, native Windows.
25602         freebsd* | dragonfly* | netbsd* | solaris* | mingw*)
25603           gl_cv_func_iswxdigit_works="guessing no" ;;
25604         # Guess yes otherwise.
25605         *) gl_cv_func_iswxdigit_works="guessing yes" ;;
25606       esac
25607       if test $LOCALE_JA != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_ZH_CN != none; then
25608         if test "$cross_compiling" = yes; then :
25609  :
25610else
25611  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25612/* end confdefs.h.  */
25613
25614#include <locale.h>
25615#include <stdlib.h>
25616#include <string.h>
25617#include <wchar.h>
25618#include <wctype.h>
25619
25620/* Returns the value of iswxdigit for the multibyte character s[0..n-1].  */
25621static int
25622for_character (const char *s, size_t n)
25623{
25624  mbstate_t state;
25625  wchar_t wc;
25626  size_t ret;
25627
25628  memset (&state, '\0', sizeof (mbstate_t));
25629  wc = (wchar_t) 0xBADFACE;
25630  ret = mbrtowc (&wc, s, n, &state);
25631  if (ret != n)
25632    abort ();
25633
25634  return iswxdigit (wc);
25635}
25636
25637int
25638main (int argc, char *argv[])
25639{
25640  int is;
25641  int result = 0;
25642
25643  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
25644    {
25645      /* This fails on NetBSD 8.0.  */
25646      /* U+FF21 FULLWIDTH LATIN CAPITAL LETTER A */
25647      is = for_character ("\243\301", 2);
25648      if (!(is == 0))
25649        result |= 1;
25650    }
25651  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
25652    {
25653      /* This fails on FreeBSD 12.  */
25654      /* U+0663 ARABIC-INDIC DIGIT THREE */
25655      is = for_character ("\331\243", 2);
25656      if (!(is == 0))
25657        result |= 2;
25658      /* This fails on MSVC 14.  */
25659      /* U+FF21 FULLWIDTH LATIN CAPITAL LETTER A */
25660      is = for_character ("\357\274\241", 3);
25661      if (!(is == 0))
25662        result |= 4;
25663    }
25664  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
25665    {
25666      /* This fails on Solaris 10, Solaris 11.4.  */
25667      /* U+FF11 FULLWIDTH DIGIT ONE */
25668      is = for_character ("\243\261", 2);
25669      if (!(is == 0))
25670        result |= 8;
25671    }
25672  return result;
25673}
25674_ACEOF
25675if ac_fn_c_try_run "$LINENO"; then :
25676  gl_cv_func_iswxdigit_works=yes
25677else
25678  gl_cv_func_iswxdigit_works=no
25679fi
25680rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25681  conftest.$ac_objext conftest.beam conftest.$ac_ext
25682fi
25683
25684       fi
25685
25686fi
25687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswxdigit_works" >&5
25688$as_echo "$gl_cv_func_iswxdigit_works" >&6; }
25689    case "$gl_cv_func_iswxdigit_works" in
25690      *yes) ;;
25691      *) REPLACE_ISWXDIGIT=1 ;;
25692    esac
25693  fi
25694
25695  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
25696    :
25697  else
25698    if test $REPLACE_ISWXDIGIT = 1; then
25699
25700
25701
25702
25703
25704
25705
25706
25707  gl_LIBOBJS="$gl_LIBOBJS iswxdigit.$ac_objext"
25708
25709    fi
25710  fi
25711
25712
25713
25714
25715
25716          GNULIB_ISWXDIGIT=1
25717
25718
25719
25720
25721
25722$as_echo "#define GNULIB_TEST_ISWXDIGIT 1" >>confdefs.h
25723
25724
25725
25726
25727
25728
25729
25730
25731
25732
25733
25734
25735
25736
25737
25738
25739
25740     if test $gl_cv_have_include_next = yes; then
25741       gl_cv_next_langinfo_h='<'langinfo.h'>'
25742     else
25743       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
25744$as_echo_n "checking absolute name of <langinfo.h>... " >&6; }
25745if ${gl_cv_next_langinfo_h+:} false; then :
25746  $as_echo_n "(cached) " >&6
25747else
25748
25749             if test $ac_cv_header_langinfo_h = yes; then
25750
25751
25752
25753
25754  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25755/* end confdefs.h.  */
25756#include <langinfo.h>
25757_ACEOF
25758                case "$host_os" in
25759    aix*) gl_absname_cpp="$ac_cpp -C" ;;
25760    *)    gl_absname_cpp="$ac_cpp" ;;
25761  esac
25762
25763  case "$host_os" in
25764    mingw*)
25765                                          gl_dirsep_regex='[/\\]'
25766      ;;
25767    *)
25768      gl_dirsep_regex='\/'
25769      ;;
25770  esac
25771      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25772  gl_header_literal_regex=`echo 'langinfo.h' \
25773                           | sed -e "$gl_make_literal_regex_sed"`
25774  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25775      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25776      s|^/[^/]|//&|
25777      p
25778      q
25779    }'
25780
25781        gl_cv_absolute_langinfo_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25782  sed -n "$gl_absolute_header_sed"`
25783
25784           gl_header=$gl_cv_absolute_langinfo_h
25785           gl_cv_next_langinfo_h='"'$gl_header'"'
25786          else
25787               gl_cv_next_langinfo_h='<'langinfo.h'>'
25788             fi
25789
25790
25791fi
25792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
25793$as_echo "$gl_cv_next_langinfo_h" >&6; }
25794     fi
25795     NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
25796
25797     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25798       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25799       gl_next_as_first_directive='<'langinfo.h'>'
25800     else
25801       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25802       gl_next_as_first_directive=$gl_cv_next_langinfo_h
25803     fi
25804     NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
25805
25806
25807
25808
25809
25810    HAVE_LANGINFO_CODESET=0
25811  HAVE_LANGINFO_T_FMT_AMPM=0
25812  HAVE_LANGINFO_ALTMON=0
25813  HAVE_LANGINFO_ERA=0
25814  HAVE_LANGINFO_YESEXPR=0
25815
25816  if test $ac_cv_header_langinfo_h = yes; then
25817    HAVE_LANGINFO_H=1
25818                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
25819$as_echo_n "checking whether langinfo.h defines CODESET... " >&6; }
25820if ${gl_cv_header_langinfo_codeset+:} false; then :
25821  $as_echo_n "(cached) " >&6
25822else
25823  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25824/* end confdefs.h.  */
25825#include <langinfo.h>
25826int a = CODESET;
25827
25828int
25829main ()
25830{
25831
25832  ;
25833  return 0;
25834}
25835_ACEOF
25836if ac_fn_c_try_compile "$LINENO"; then :
25837  gl_cv_header_langinfo_codeset=yes
25838else
25839  gl_cv_header_langinfo_codeset=no
25840fi
25841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25842
25843fi
25844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
25845$as_echo "$gl_cv_header_langinfo_codeset" >&6; }
25846    if test $gl_cv_header_langinfo_codeset = yes; then
25847      HAVE_LANGINFO_CODESET=1
25848    fi
25849    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
25850$as_echo_n "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
25851if ${gl_cv_header_langinfo_t_fmt_ampm+:} false; then :
25852  $as_echo_n "(cached) " >&6
25853else
25854  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25855/* end confdefs.h.  */
25856#include <langinfo.h>
25857int a = T_FMT_AMPM;
25858
25859int
25860main ()
25861{
25862
25863  ;
25864  return 0;
25865}
25866_ACEOF
25867if ac_fn_c_try_compile "$LINENO"; then :
25868  gl_cv_header_langinfo_t_fmt_ampm=yes
25869else
25870  gl_cv_header_langinfo_t_fmt_ampm=no
25871fi
25872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25873
25874fi
25875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
25876$as_echo "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
25877    if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
25878      HAVE_LANGINFO_T_FMT_AMPM=1
25879    fi
25880    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ALTMON_1" >&5
25881$as_echo_n "checking whether langinfo.h defines ALTMON_1... " >&6; }
25882if ${gl_cv_header_langinfo_altmon+:} false; then :
25883  $as_echo_n "(cached) " >&6
25884else
25885  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25886/* end confdefs.h.  */
25887#include <langinfo.h>
25888int a = ALTMON_1;
25889
25890int
25891main ()
25892{
25893
25894  ;
25895  return 0;
25896}
25897_ACEOF
25898if ac_fn_c_try_compile "$LINENO"; then :
25899  gl_cv_header_langinfo_altmon=yes
25900else
25901  gl_cv_header_langinfo_altmon=no
25902fi
25903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25904
25905fi
25906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_altmon" >&5
25907$as_echo "$gl_cv_header_langinfo_altmon" >&6; }
25908    if test $gl_cv_header_langinfo_altmon = yes; then
25909      HAVE_LANGINFO_ALTMON=1
25910    fi
25911    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
25912$as_echo_n "checking whether langinfo.h defines ERA... " >&6; }
25913if ${gl_cv_header_langinfo_era+:} false; then :
25914  $as_echo_n "(cached) " >&6
25915else
25916  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25917/* end confdefs.h.  */
25918#include <langinfo.h>
25919int a = ERA;
25920
25921int
25922main ()
25923{
25924
25925  ;
25926  return 0;
25927}
25928_ACEOF
25929if ac_fn_c_try_compile "$LINENO"; then :
25930  gl_cv_header_langinfo_era=yes
25931else
25932  gl_cv_header_langinfo_era=no
25933fi
25934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25935
25936fi
25937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
25938$as_echo "$gl_cv_header_langinfo_era" >&6; }
25939    if test $gl_cv_header_langinfo_era = yes; then
25940      HAVE_LANGINFO_ERA=1
25941    fi
25942    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
25943$as_echo_n "checking whether langinfo.h defines YESEXPR... " >&6; }
25944if ${gl_cv_header_langinfo_yesexpr+:} false; then :
25945  $as_echo_n "(cached) " >&6
25946else
25947  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25948/* end confdefs.h.  */
25949#include <langinfo.h>
25950int a = YESEXPR;
25951
25952int
25953main ()
25954{
25955
25956  ;
25957  return 0;
25958}
25959_ACEOF
25960if ac_fn_c_try_compile "$LINENO"; then :
25961  gl_cv_header_langinfo_yesexpr=yes
25962else
25963  gl_cv_header_langinfo_yesexpr=no
25964fi
25965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25966
25967fi
25968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
25969$as_echo "$gl_cv_header_langinfo_yesexpr" >&6; }
25970    if test $gl_cv_header_langinfo_yesexpr = yes; then
25971      HAVE_LANGINFO_YESEXPR=1
25972    fi
25973  else
25974    HAVE_LANGINFO_H=0
25975  fi
25976
25977
25978
25979
25980
25981
25982
25983
25984
25985
25986
25987
25988
25989
25990
25991
25992
25993
25994
25995  if test "$ac_cv_func_lchmod" = no; then
25996    HAVE_LCHMOD=0
25997  fi
25998
25999  if test $HAVE_LCHMOD = 0; then
26000
26001
26002
26003
26004
26005
26006
26007
26008  gl_LIBOBJS="$gl_LIBOBJS lchmod.$ac_objext"
26009
26010
26011  :
26012
26013  fi
26014
26015
26016
26017
26018
26019          GNULIB_LCHMOD=1
26020
26021
26022
26023
26024
26025$as_echo "#define GNULIB_TEST_LCHMOD 1" >>confdefs.h
26026
26027
26028
26029
26030
26031
26032
26033  for ac_func in lchown
26034do :
26035  ac_fn_c_check_func "$LINENO" "lchown" "ac_cv_func_lchown"
26036if test "x$ac_cv_func_lchown" = xyes; then :
26037  cat >>confdefs.h <<_ACEOF
26038#define HAVE_LCHOWN 1
26039_ACEOF
26040
26041fi
26042done
26043
26044  if test $ac_cv_func_lchown = no; then
26045    HAVE_LCHOWN=0
26046  else
26047        case "$gl_cv_func_chown_slash_works" in
26048      *yes) ;;
26049      *)
26050        REPLACE_LCHOWN=1
26051        ;;
26052    esac
26053    case "$gl_cv_func_chown_ctime_works" in
26054      *yes) ;;
26055      *)
26056        REPLACE_LCHOWN=1
26057        ;;
26058    esac
26059  fi
26060
26061  if test $HAVE_LCHOWN = 0 || test $REPLACE_LCHOWN = 1; then
26062
26063
26064
26065
26066
26067
26068
26069
26070  gl_LIBOBJS="$gl_LIBOBJS lchown.$ac_objext"
26071
26072  fi
26073
26074
26075
26076
26077
26078          GNULIB_LCHOWN=1
26079
26080
26081
26082
26083
26084$as_echo "#define GNULIB_TEST_LCHOWN 1" >>confdefs.h
26085
26086
26087
26088
26089  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5
26090$as_echo_n "checking whether the compiler supports the __inline keyword... " >&6; }
26091if ${gl_cv_c___inline+:} false; then :
26092  $as_echo_n "(cached) " >&6
26093else
26094  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26095/* end confdefs.h.  */
26096typedef int foo_t;
26097           static __inline foo_t foo (void) { return 0; }
26098int
26099main ()
26100{
26101return foo ();
26102  ;
26103  return 0;
26104}
26105_ACEOF
26106if ac_fn_c_try_compile "$LINENO"; then :
26107  gl_cv_c___inline=yes
26108else
26109  gl_cv_c___inline=no
26110fi
26111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26112fi
26113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5
26114$as_echo "$gl_cv_c___inline" >&6; }
26115  if test $gl_cv_c___inline = yes; then
26116
26117$as_echo "#define HAVE___INLINE 1" >>confdefs.h
26118
26119  fi
26120
26121
26122
26123
26124
26125  if test $ac_cv_func_link = no; then
26126    HAVE_LINK=0
26127  else
26128    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link obeys POSIX" >&5
26129$as_echo_n "checking whether link obeys POSIX... " >&6; }
26130if ${gl_cv_func_link_works+:} false; then :
26131  $as_echo_n "(cached) " >&6
26132else
26133  touch conftest.a
26134       # Assume that if we have lstat, we can also check symlinks.
26135       if test $ac_cv_func_lstat = yes; then
26136         ln -s conftest.a conftest.lnk
26137       fi
26138       if test "$cross_compiling" = yes; then :
26139  case "$host_os" in
26140                             # Guess yes on Linux systems.
26141            linux-* | linux) gl_cv_func_link_works="guessing yes" ;;
26142                             # Guess yes on glibc systems.
26143            *-gnu* | gnu*)   gl_cv_func_link_works="guessing yes" ;;
26144                             # If we don't know, obey --enable-cross-guesses.
26145            *)               gl_cv_func_link_works="$gl_cross_guess_normal" ;;
26146          esac
26147
26148else
26149  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26150/* end confdefs.h.  */
26151#include <unistd.h>
26152             #include <stdio.h>
26153
26154int
26155main ()
26156{
26157int result = 0;
26158             if (!link ("conftest.a", "conftest.b/"))
26159               result |= 1;
26160#if HAVE_LSTAT
26161             if (!link ("conftest.lnk/", "conftest.b"))
26162               result |= 2;
26163             if (rename ("conftest.a", "conftest.b"))
26164               result |= 4;
26165             if (!link ("conftest.b", "conftest.lnk"))
26166               result |= 8;
26167#endif
26168             return result;
26169
26170  ;
26171  return 0;
26172}
26173_ACEOF
26174if ac_fn_c_try_run "$LINENO"; then :
26175  gl_cv_func_link_works=yes
26176else
26177  gl_cv_func_link_works=no
26178fi
26179rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26180  conftest.$ac_objext conftest.beam conftest.$ac_ext
26181fi
26182
26183       rm -f conftest.a conftest.b conftest.lnk
26184fi
26185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_link_works" >&5
26186$as_echo "$gl_cv_func_link_works" >&6; }
26187    case "$gl_cv_func_link_works" in
26188      *yes) ;;
26189      *)
26190        REPLACE_LINK=1
26191        ;;
26192    esac
26193  fi
26194
26195  if test $HAVE_LINK = 0 || test $REPLACE_LINK = 1; then
26196
26197
26198
26199
26200
26201
26202
26203
26204  gl_LIBOBJS="$gl_LIBOBJS link.$ac_objext"
26205
26206  fi
26207
26208
26209
26210
26211
26212          GNULIB_LINK=1
26213
26214
26215
26216
26217
26218$as_echo "#define GNULIB_TEST_LINK 1" >>confdefs.h
26219
26220
26221
26222
26223          gl_link_follows_symlinks=0 # assume GNU behavior
26224  if test $ac_cv_func_readlink = yes; then
26225                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __xpg4" >&5
26226$as_echo_n "checking for __xpg4... " >&6; }
26227if ${gl_cv_have___xpg4+:} false; then :
26228  $as_echo_n "(cached) " >&6
26229else
26230  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26231/* end confdefs.h.  */
26232extern int __xpg4;
26233int
26234main ()
26235{
26236return __xpg4;
26237  ;
26238  return 0;
26239}
26240_ACEOF
26241if ac_fn_c_try_link "$LINENO"; then :
26242  gl_cv_have___xpg4=yes
26243else
26244  gl_cv_have___xpg4=no
26245fi
26246rm -f core conftest.err conftest.$ac_objext \
26247    conftest$ac_exeext conftest.$ac_ext
26248
26249fi
26250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have___xpg4" >&5
26251$as_echo "$gl_cv_have___xpg4" >&6; }
26252    if test $gl_cv_have___xpg4 = yes; then
26253      gl_link_follows_symlinks=-1
26254    else
26255      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link(2) dereferences a symlink" >&5
26256$as_echo_n "checking whether link(2) dereferences a symlink... " >&6; }
26257if ${gl_cv_func_link_follows_symlink+:} false; then :
26258  $as_echo_n "(cached) " >&6
26259else
26260
26261         # Create a regular file.
26262         echo > conftest.file
26263         if test "$cross_compiling" = yes; then :
26264                                                 case "$host_os" in
26265                                  # On glibc/Linux we know the result.
26266              linux*-gnu* | gnu*) gl_cv_func_link_follows_symlink="guessing no" ;;
26267                                  # On musl/Linux we know the result.
26268              linux*-musl*)       gl_cv_func_link_follows_symlink="guessing no" ;;
26269                                  # Otherwise, we don't know.
26270              *)                  gl_cv_func_link_follows_symlink=unknown ;;
26271            esac
26272
26273else
26274  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26275/* end confdefs.h.  */
26276
26277#       include <sys/types.h>
26278#       include <sys/stat.h>
26279#       include <unistd.h>
26280#       include <stdlib.h>
26281
26282#       define SAME_INODE(Stat_buf_1, Stat_buf_2) \
26283          ((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \
26284           && (Stat_buf_1).st_dev == (Stat_buf_2).st_dev)
26285
26286        int
26287        main ()
26288        {
26289          const char *file = "conftest.file";
26290          const char *sym = "conftest.sym";
26291          const char *hard = "conftest.hard";
26292          struct stat sb_file, sb_hard;
26293
26294          /* Create a symlink to the regular file. */
26295          if (symlink (file, sym))
26296            return 2;
26297
26298          /* Create a hard link to that symlink.  */
26299          if (link (sym, hard))
26300            return 3;
26301
26302          if (lstat (hard, &sb_hard))
26303            return 4;
26304          if (lstat (file, &sb_file))
26305            return 5;
26306
26307          /* If the dev/inode of hard and file are the same, then
26308             the link call followed the symlink.  */
26309          return SAME_INODE (sb_hard, sb_file) ? 1 : 0;
26310        }
26311
26312_ACEOF
26313if ac_fn_c_try_run "$LINENO"; then :
26314  gl_cv_func_link_follows_symlink=no
26315else
26316             gl_cv_func_link_follows_symlink=yes
26317fi
26318rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26319  conftest.$ac_objext conftest.beam conftest.$ac_ext
26320fi
26321
26322         rm -f conftest.file conftest.sym conftest.hard
26323
26324fi
26325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_link_follows_symlink" >&5
26326$as_echo "$gl_cv_func_link_follows_symlink" >&6; }
26327      case "$gl_cv_func_link_follows_symlink" in
26328        *yes) gl_link_follows_symlinks=1 ;;
26329        *no) ;; # already defaulted to 0
26330        *) gl_link_follows_symlinks=-2 ;;
26331      esac
26332    fi
26333  fi
26334
26335cat >>confdefs.h <<_ACEOF
26336#define LINK_FOLLOWS_SYMLINKS $gl_link_follows_symlinks
26337_ACEOF
26338
26339
26340
26341
26342
26343
26344
26345
26346  if test $ac_cv_func_linkat = no; then
26347    HAVE_LINKAT=0
26348  else
26349                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether linkat() can link symlinks" >&5
26350$as_echo_n "checking whether linkat() can link symlinks... " >&6; }
26351if ${gl_cv_func_linkat_nofollow+:} false; then :
26352  $as_echo_n "(cached) " >&6
26353else
26354  rm -rf conftest.l1 conftest.l2
26355       ln -s target conftest.l1
26356       if test "$cross_compiling" = yes; then :
26357  case "$host_os" in
26358           darwin*) gl_cv_func_linkat_nofollow="guessing no" ;;
26359           *)       gl_cv_func_linkat_nofollow="guessing yes" ;;
26360          esac
26361else
26362  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26363/* end confdefs.h.  */
26364#include <fcntl.h>
26365                          #include <unistd.h>
26366
26367int
26368main ()
26369{
26370return linkat (AT_FDCWD, "conftest.l1", AT_FDCWD,
26371                                         "conftest.l2", 0);
26372
26373  ;
26374  return 0;
26375}
26376_ACEOF
26377if ac_fn_c_try_run "$LINENO"; then :
26378  gl_cv_func_linkat_nofollow=yes
26379else
26380  gl_cv_func_linkat_nofollow=no
26381fi
26382rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26383  conftest.$ac_objext conftest.beam conftest.$ac_ext
26384fi
26385
26386
26387       rm -rf conftest.l1 conftest.l2
26388fi
26389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_linkat_nofollow" >&5
26390$as_echo "$gl_cv_func_linkat_nofollow" >&6; }
26391
26392    case $gl_cv_func_linkat_nofollow in
26393      *no) LINKAT_SYMLINK_NOTSUP=1 ;;
26394      *yes) LINKAT_SYMLINK_NOTSUP=0 ;;
26395    esac
26396
26397    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether linkat handles trailing slash correctly" >&5
26398$as_echo_n "checking whether linkat handles trailing slash correctly... " >&6; }
26399if ${gl_cv_func_linkat_slash+:} false; then :
26400  $as_echo_n "(cached) " >&6
26401else
26402  rm -rf conftest.a conftest.b conftest.c conftest.d conftest.e conftest.s
26403       if test "$cross_compiling" = yes; then :
26404
26405          case "$host_os" in
26406                             # Guess yes on Linux systems.
26407            linux-* | linux) gl_cv_func_linkat_slash="guessing yes";;
26408                             # Guess yes on glibc systems.
26409            *-gnu* | gnu*)   gl_cv_func_linkat_slash="guessing yes";;
26410                             # If we don't know, obey --enable-cross-guesses.
26411            *)               gl_cv_func_linkat_slash="$gl_cross_guess_normal";;
26412          esac
26413
26414else
26415  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26416/* end confdefs.h.  */
26417#include <unistd.h>
26418              #include <fcntl.h>
26419              #include <errno.h>
26420              #include <stdio.h>
26421
26422
26423$gl_mda_defines
26424
26425int
26426main ()
26427{
26428int result;
26429              int fd;
26430              /* Create a regular file.  */
26431              fd = open ("conftest.a", O_CREAT | O_EXCL | O_WRONLY, 0600);
26432              if (fd < 0)
26433                return 1;
26434              if (write (fd, "hello", 5) < 5)
26435                return 2;
26436              if (close (fd) < 0)
26437                return 3;
26438              /* Test whether hard links are supported on the current
26439                 device.  */
26440              if (linkat (AT_FDCWD, "conftest.a", AT_FDCWD, "conftest.b",
26441                          AT_SYMLINK_FOLLOW) < 0)
26442                return 0;
26443              result = 0;
26444              /* Test whether a trailing "/" is treated like "/.".  */
26445              if (linkat (AT_FDCWD, "conftest.a/", AT_FDCWD, "conftest.c",
26446                          AT_SYMLINK_FOLLOW) == 0)
26447                result |= 4;
26448              if (linkat (AT_FDCWD, "conftest.a", AT_FDCWD, "conftest.d/",
26449                          AT_SYMLINK_FOLLOW) == 0)
26450                result |= 8;
26451
26452              /* On Mac OS X 10.13 a trailing "/" will cause the second path to be
26453                 dereferenced, and thus will succeed on a dangling symlink.  */
26454              if (symlink ("conftest.e", "conftest.s") == 0)
26455                {
26456                  if (linkat (AT_FDCWD, "conftest.a", AT_FDCWD, "conftest.s/",
26457                      AT_SYMLINK_FOLLOW) == 0)
26458                    result |= 16;
26459                }
26460
26461              return result;
26462
26463  ;
26464  return 0;
26465}
26466_ACEOF
26467if ac_fn_c_try_run "$LINENO"; then :
26468  gl_cv_func_linkat_slash=yes
26469else
26470  gl_cv_func_linkat_slash=no
26471fi
26472rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26473  conftest.$ac_objext conftest.beam conftest.$ac_ext
26474fi
26475
26476       rm -rf conftest.a conftest.b conftest.c conftest.d conftest.e conftest.s
26477fi
26478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_linkat_slash" >&5
26479$as_echo "$gl_cv_func_linkat_slash" >&6; }
26480    case "$gl_cv_func_linkat_slash" in
26481      *yes) gl_linkat_slash_bug=0 ;;
26482      *)    gl_linkat_slash_bug=1 ;;
26483    esac
26484
26485    case "$gl_cv_func_linkat_nofollow" in
26486      *yes) linkat_nofollow=yes ;;
26487      *) linkat_nofollow=no ;;
26488    esac
26489
26490    if test "$linkat_nofollow" != yes \
26491       || test $gl_linkat_slash_bug = 1; then
26492      REPLACE_LINKAT=1
26493
26494cat >>confdefs.h <<_ACEOF
26495#define LINKAT_TRAILING_SLASH_BUG $gl_linkat_slash_bug
26496_ACEOF
26497
26498
26499cat >>confdefs.h <<_ACEOF
26500#define LINKAT_SYMLINK_NOTSUP $LINKAT_SYMLINK_NOTSUP
26501_ACEOF
26502
26503    fi
26504  fi
26505
26506  if test $HAVE_LINKAT = 0 || test $REPLACE_LINKAT = 1; then
26507
26508
26509
26510
26511
26512
26513
26514
26515  gl_LIBOBJS="$gl_LIBOBJS linkat.$ac_objext"
26516
26517
26518
26519
26520
26521
26522
26523
26524
26525  gl_LIBOBJS="$gl_LIBOBJS at-func2.$ac_objext"
26526
26527  fi
26528
26529
26530
26531
26532
26533          GNULIB_LINKAT=1
26534
26535
26536
26537
26538
26539$as_echo "#define GNULIB_TEST_LINKAT 1" >>confdefs.h
26540
26541
26542
26543
26544
26545
26546    LOCALCHARSET_TESTS_ENVIRONMENT=
26547
26548
26549
26550
26551
26552
26553
26554
26555
26556
26557
26558  case "$host_os" in
26559    solaris*)
26560
26561$as_echo "#define _LCONV_C99 1" >>confdefs.h
26562
26563      ;;
26564  esac
26565
26566  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
26567$as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
26568if ${gl_cv_header_locale_h_posix2001+:} false; then :
26569  $as_echo_n "(cached) " >&6
26570else
26571  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26572/* end confdefs.h.  */
26573#include <locale.h>
26574            int x = LC_MESSAGES;
26575            int y = sizeof (((struct lconv *) 0)->decimal_point);
26576int
26577main ()
26578{
26579
26580  ;
26581  return 0;
26582}
26583_ACEOF
26584if ac_fn_c_try_compile "$LINENO"; then :
26585  gl_cv_header_locale_h_posix2001=yes
26586else
26587  gl_cv_header_locale_h_posix2001=no
26588fi
26589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26590fi
26591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
26592$as_echo "$gl_cv_header_locale_h_posix2001" >&6; }
26593
26594          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
26595$as_echo_n "checking whether struct lconv is properly defined... " >&6; }
26596if ${gl_cv_sys_struct_lconv_ok+:} false; then :
26597  $as_echo_n "(cached) " >&6
26598else
26599  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26600/* end confdefs.h.  */
26601#include <locale.h>
26602            struct lconv l;
26603            int x = sizeof (l.decimal_point);
26604            int y = sizeof (l.int_p_cs_precedes);
26605int
26606main ()
26607{
26608
26609  ;
26610  return 0;
26611}
26612_ACEOF
26613if ac_fn_c_try_compile "$LINENO"; then :
26614  gl_cv_sys_struct_lconv_ok=yes
26615else
26616  gl_cv_sys_struct_lconv_ok=no
26617fi
26618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26619
26620fi
26621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
26622$as_echo "$gl_cv_sys_struct_lconv_ok" >&6; }
26623  if test $gl_cv_sys_struct_lconv_ok = no; then
26624            case "$host_os" in
26625      mingw*)
26626        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26627/* end confdefs.h.  */
26628
26629#ifdef _MSC_VER
26630 Special
26631#endif
26632
26633_ACEOF
26634if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26635  $EGREP "Special" >/dev/null 2>&1; then :
26636
26637else
26638  REPLACE_STRUCT_LCONV=1
26639fi
26640rm -f conftest*
26641
26642        ;;
26643      *) REPLACE_STRUCT_LCONV=1 ;;
26644    esac
26645  fi
26646
26647
26648
26649
26650
26651
26652
26653
26654
26655     if test $gl_cv_have_include_next = yes; then
26656       gl_cv_next_locale_h='<'locale.h'>'
26657     else
26658       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
26659$as_echo_n "checking absolute name of <locale.h>... " >&6; }
26660if ${gl_cv_next_locale_h+:} false; then :
26661  $as_echo_n "(cached) " >&6
26662else
26663
26664
26665
26666  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26667/* end confdefs.h.  */
26668#include <locale.h>
26669_ACEOF
26670                case "$host_os" in
26671    aix*) gl_absname_cpp="$ac_cpp -C" ;;
26672    *)    gl_absname_cpp="$ac_cpp" ;;
26673  esac
26674
26675  case "$host_os" in
26676    mingw*)
26677                                          gl_dirsep_regex='[/\\]'
26678      ;;
26679    *)
26680      gl_dirsep_regex='\/'
26681      ;;
26682  esac
26683      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26684  gl_header_literal_regex=`echo 'locale.h' \
26685                           | sed -e "$gl_make_literal_regex_sed"`
26686  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26687      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26688      s|^/[^/]|//&|
26689      p
26690      q
26691    }'
26692
26693        gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26694  sed -n "$gl_absolute_header_sed"`
26695
26696           gl_header=$gl_cv_absolute_locale_h
26697           gl_cv_next_locale_h='"'$gl_header'"'
26698
26699
26700fi
26701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
26702$as_echo "$gl_cv_next_locale_h" >&6; }
26703     fi
26704     NEXT_LOCALE_H=$gl_cv_next_locale_h
26705
26706     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26707       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26708       gl_next_as_first_directive='<'locale.h'>'
26709     else
26710       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26711       gl_next_as_first_directive=$gl_cv_next_locale_h
26712     fi
26713     NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
26714
26715
26716
26717
26718
26719
26720
26721
26722
26723
26724
26725
26726
26727  if test $REPLACE_STRUCT_LCONV = 1; then
26728    REPLACE_LOCALECONV=1
26729  fi
26730
26731  if test $REPLACE_LOCALECONV = 1; then
26732
26733
26734
26735
26736
26737
26738
26739
26740  gl_LIBOBJS="$gl_LIBOBJS localeconv.$ac_objext"
26741
26742
26743  ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
26744"
26745if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then :
26746
26747cat >>confdefs.h <<_ACEOF
26748#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1
26749_ACEOF
26750
26751
26752fi
26753
26754
26755  fi
26756
26757
26758
26759
26760
26761          GNULIB_LOCALECONV=1
26762
26763
26764
26765
26766
26767$as_echo "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
26768
26769
26770
26771
26772
26773
26774
26775
26776
26777  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
26778$as_echo_n "checking whether lseek detects pipes... " >&6; }
26779if ${gl_cv_func_lseek_pipe+:} false; then :
26780  $as_echo_n "(cached) " >&6
26781else
26782  case "$host_os" in
26783       mingw*)
26784                                                               gl_cv_func_lseek_pipe=no
26785         ;;
26786       *)
26787         if test $cross_compiling = no; then
26788           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26789/* end confdefs.h.  */
26790
26791#include <sys/types.h> /* for off_t */
26792#include <stdio.h> /* for SEEK_CUR */
26793#if HAVE_UNISTD_H
26794# include <unistd.h>
26795#else /* on Windows with MSVC */
26796# include <io.h>
26797#endif
26798
26799
26800$gl_mda_defines
26801
26802int
26803main ()
26804{
26805
26806  /* Exit with success only if stdin is seekable.  */
26807  return lseek (0, (off_t)0, SEEK_CUR) < 0;
26808
26809  ;
26810  return 0;
26811}
26812_ACEOF
26813if ac_fn_c_try_link "$LINENO"; then :
26814  if test -s conftest$ac_exeext \
26815                 && ./conftest$ac_exeext < conftest.$ac_ext \
26816                 && test 1 = "`echo hi \
26817                   | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
26818                gl_cv_func_lseek_pipe=yes
26819              else
26820                gl_cv_func_lseek_pipe=no
26821              fi
26822
26823else
26824  gl_cv_func_lseek_pipe=no
26825fi
26826rm -f core conftest.err conftest.$ac_objext \
26827    conftest$ac_exeext conftest.$ac_ext
26828         else
26829           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26830/* end confdefs.h.  */
26831
26832#if defined __BEOS__
26833/* BeOS mistakenly return 0 when trying to seek on pipes.  */
26834  Choke me.
26835#endif
26836_ACEOF
26837if ac_fn_c_try_compile "$LINENO"; then :
26838  gl_cv_func_lseek_pipe=yes
26839else
26840  gl_cv_func_lseek_pipe=no
26841fi
26842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26843         fi
26844         ;;
26845     esac
26846
26847fi
26848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
26849$as_echo "$gl_cv_func_lseek_pipe" >&6; }
26850  if test $gl_cv_func_lseek_pipe = no; then
26851    REPLACE_LSEEK=1
26852
26853$as_echo "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
26854
26855  fi
26856
26857
26858  if test $WINDOWS_64_BIT_OFF_T = 1; then
26859    REPLACE_LSEEK=1
26860  fi
26861
26862  if test $REPLACE_LSEEK = 1; then
26863
26864
26865
26866
26867
26868
26869
26870
26871  gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext"
26872
26873  fi
26874
26875
26876
26877
26878
26879          GNULIB_LSEEK=1
26880
26881
26882
26883
26884
26885$as_echo "#define GNULIB_TEST_LSEEK 1" >>confdefs.h
26886
26887
26888
26889
26890
26891
26892
26893  if test $ac_cv_func_lstat = yes; then
26894
26895    case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
26896      solaris* | *no)
26897        REPLACE_LSTAT=1
26898        ;;
26899    esac
26900  else
26901    HAVE_LSTAT=0
26902  fi
26903
26904  if test $REPLACE_LSTAT = 1; then
26905
26906
26907
26908
26909
26910
26911
26912
26913  gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
26914
26915    :
26916  fi
26917
26918
26919
26920
26921
26922          GNULIB_LSTAT=1
26923
26924
26925
26926
26927
26928$as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
26929
26930
26931
26932
26933
26934
26935    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
26936$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
26937if ${ac_cv_func_malloc_0_nonnull+:} false; then :
26938  $as_echo_n "(cached) " >&6
26939else
26940  if test "$cross_compiling" = yes; then :
26941  case "$host_os" in
26942          # Guess yes on platforms where we know the result.
26943          *-gnu* | gnu* | *-musl* | freebsd* | netbsd* | openbsd* \
26944          | hpux* | solaris* | cygwin* | mingw*)
26945            ac_cv_func_malloc_0_nonnull="guessing yes" ;;
26946          # If we don't know, obey --enable-cross-guesses.
26947          *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
26948        esac
26949
26950else
26951  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26952/* end confdefs.h.  */
26953#include <stdlib.h>
26954
26955int
26956main ()
26957{
26958char *p = malloc (0);
26959            int result = !p;
26960            free (p);
26961            return result;
26962  ;
26963  return 0;
26964}
26965
26966_ACEOF
26967if ac_fn_c_try_run "$LINENO"; then :
26968  ac_cv_func_malloc_0_nonnull=yes
26969else
26970  ac_cv_func_malloc_0_nonnull=no
26971fi
26972rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26973  conftest.$ac_objext conftest.beam conftest.$ac_ext
26974fi
26975
26976
26977fi
26978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
26979$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
26980  case "$ac_cv_func_malloc_0_nonnull" in
26981    *yes)
26982
26983$as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h
26984
26985      ;;
26986    *)
26987      $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h
26988
26989     REPLACE_MALLOC=1
26990
26991      ;;
26992  esac
26993
26994
26995  if test $REPLACE_MALLOC = 1; then
26996
26997
26998
26999
27000
27001
27002
27003
27004  gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
27005
27006  fi
27007
27008
27009cat >>confdefs.h <<_ACEOF
27010#define GNULIB_MALLOC_GNU 1
27011_ACEOF
27012
27013
27014
27015
27016
27017  if test $gl_cv_func_malloc_posix = yes; then
27018
27019$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
27020
27021  else
27022    REPLACE_MALLOC=1
27023  fi
27024
27025  if test $REPLACE_MALLOC = 1; then
27026
27027
27028
27029
27030
27031
27032
27033
27034  gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
27035
27036  fi
27037
27038
27039
27040
27041
27042          GNULIB_MALLOC_POSIX=1
27043
27044
27045
27046
27047
27048$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
27049
27050
27051
27052
27053
27054
27055
27056
27057
27058
27059
27060
27061
27062
27063
27064
27065
27066
27067
27068
27069
27070
27071        if case "$host_os" in
27072       mingw*) true ;;
27073       *) test $ac_cv_func_mbsinit = yes ;;
27074     esac \
27075    && test $ac_cv_func_mbrtowc = yes; then
27076
27077
27078
27079
27080     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
27081$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
27082if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
27083  $as_echo_n "(cached) " >&6
27084else
27085
27086                  case "$host_os" in
27087                     # Guess no on AIX and OSF/1.
27088        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
27089                     # Guess yes otherwise.
27090        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
27091      esac
27092      if test $LOCALE_JA != none; then
27093        if test "$cross_compiling" = yes; then :
27094  :
27095else
27096  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27097/* end confdefs.h.  */
27098
27099#include <locale.h>
27100#include <string.h>
27101#include <wchar.h>
27102int main ()
27103{
27104  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
27105    {
27106      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
27107      mbstate_t state;
27108      wchar_t wc;
27109
27110      memset (&state, '\0', sizeof (mbstate_t));
27111      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
27112        if (mbsinit (&state))
27113          return 2;
27114    }
27115  return 0;
27116}
27117_ACEOF
27118if ac_fn_c_try_run "$LINENO"; then :
27119  gl_cv_func_mbrtowc_incomplete_state=yes
27120else
27121  gl_cv_func_mbrtowc_incomplete_state=no
27122fi
27123rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27124  conftest.$ac_objext conftest.beam conftest.$ac_ext
27125fi
27126
27127      else
27128        if test $LOCALE_FR_UTF8 != none; then
27129          if test "$cross_compiling" = yes; then :
27130  :
27131else
27132  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27133/* end confdefs.h.  */
27134
27135#include <locale.h>
27136#include <string.h>
27137#include <wchar.h>
27138int main ()
27139{
27140  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
27141    {
27142      const char input[] = "B\303\274\303\237er"; /* "Büßer" */
27143      mbstate_t state;
27144      wchar_t wc;
27145
27146      memset (&state, '\0', sizeof (mbstate_t));
27147      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
27148        if (mbsinit (&state))
27149          return 2;
27150    }
27151  return 0;
27152}
27153_ACEOF
27154if ac_fn_c_try_run "$LINENO"; then :
27155  gl_cv_func_mbrtowc_incomplete_state=yes
27156else
27157  gl_cv_func_mbrtowc_incomplete_state=no
27158fi
27159rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27160  conftest.$ac_objext conftest.beam conftest.$ac_ext
27161fi
27162
27163        fi
27164      fi
27165
27166fi
27167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
27168$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
27169
27170
27171
27172
27173     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
27174$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
27175if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
27176  $as_echo_n "(cached) " >&6
27177else
27178
27179                  case "$host_os" in
27180                    # Guess no on Solaris 8.
27181        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
27182                    # Guess yes otherwise.
27183        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
27184      esac
27185      if test $LOCALE_ZH_CN != none; then
27186        if test "$cross_compiling" = yes; then :
27187  :
27188else
27189  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27190/* end confdefs.h.  */
27191
27192#include <locale.h>
27193#include <stdlib.h>
27194#include <string.h>
27195#include <wchar.h>
27196int main ()
27197{
27198  /* This fails on Solaris 8:
27199     mbrtowc returns 2, and sets wc to 0x00F0.
27200     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
27201  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
27202    {
27203      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
27204      mbstate_t state;
27205      wchar_t wc;
27206
27207      memset (&state, '\0', sizeof (mbstate_t));
27208      if (mbrtowc (&wc, input + 3, 6, &state) != 4
27209          && mbtowc (&wc, input + 3, 6) == 4)
27210        return 2;
27211    }
27212  return 0;
27213}
27214_ACEOF
27215if ac_fn_c_try_run "$LINENO"; then :
27216  gl_cv_func_mbrtowc_sanitycheck=yes
27217else
27218  gl_cv_func_mbrtowc_sanitycheck=no
27219fi
27220rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27221  conftest.$ac_objext conftest.beam conftest.$ac_ext
27222fi
27223
27224      fi
27225
27226fi
27227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
27228$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
27229
27230    REPLACE_MBSTATE_T=0
27231    case "$gl_cv_func_mbrtowc_incomplete_state" in
27232      *yes) ;;
27233      *) REPLACE_MBSTATE_T=1 ;;
27234    esac
27235    case "$gl_cv_func_mbrtowc_sanitycheck" in
27236      *yes) ;;
27237      *) REPLACE_MBSTATE_T=1 ;;
27238    esac
27239  else
27240    REPLACE_MBSTATE_T=1
27241  fi
27242
27243
27244
27245  if test $ac_cv_func_mbrtowc = no; then
27246    HAVE_MBRTOWC=0
27247    ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
27248      #include <wchar.h>
27249
27250"
27251if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
27252  ac_have_decl=1
27253else
27254  ac_have_decl=0
27255fi
27256
27257cat >>confdefs.h <<_ACEOF
27258#define HAVE_DECL_MBRTOWC $ac_have_decl
27259_ACEOF
27260
27261    if test $ac_cv_have_decl_mbrtowc = yes; then
27262                        REPLACE_MBRTOWC=1
27263    fi
27264  else
27265    if test $REPLACE_MBSTATE_T = 1; then
27266      REPLACE_MBRTOWC=1
27267    else
27268
27269
27270
27271     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
27272$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
27273if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
27274  $as_echo_n "(cached) " >&6
27275else
27276
27277                  case "$host_os" in
27278                  # Guess no on Solaris.
27279        solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
27280                  # Guess yes otherwise.
27281        *)        gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
27282      esac
27283      if test $LOCALE_FR_UTF8 != none; then
27284        if test "$cross_compiling" = yes; then :
27285  :
27286else
27287  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27288/* end confdefs.h.  */
27289
27290#include <locale.h>
27291#include <stdlib.h>
27292#include <string.h>
27293#include <wchar.h>
27294int main ()
27295{
27296  int result = 0;
27297
27298  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
27299    {
27300      char input[] = "\303\237er";
27301      mbstate_t state;
27302      wchar_t wc;
27303      size_t ret;
27304
27305      memset (&state, '\0', sizeof (mbstate_t));
27306      wc = (wchar_t) 0xBADFACE;
27307      ret = mbrtowc (&wc, input, 5, &state);
27308      if (ret != 2)
27309        result |= 1;
27310      if (!mbsinit (&state))
27311        result |= 2;
27312
27313      memset (&state, '\0', sizeof (mbstate_t));
27314      ret = mbrtowc (NULL, input, 5, &state);
27315      if (ret != 2) /* Solaris 7 fails here: ret is -1.  */
27316        result |= 4;
27317      if (!mbsinit (&state))
27318        result |= 8;
27319    }
27320  return result;
27321}
27322_ACEOF
27323if ac_fn_c_try_run "$LINENO"; then :
27324  gl_cv_func_mbrtowc_null_arg1=yes
27325else
27326  gl_cv_func_mbrtowc_null_arg1=no
27327fi
27328rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27329  conftest.$ac_objext conftest.beam conftest.$ac_ext
27330fi
27331
27332      fi
27333
27334fi
27335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
27336$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
27337
27338
27339
27340
27341     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
27342$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
27343if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
27344  $as_echo_n "(cached) " >&6
27345else
27346
27347                  case "$host_os" in
27348              # Guess no on OSF/1.
27349        osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
27350              # Guess yes otherwise.
27351        *)    gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
27352      esac
27353      if test $LOCALE_FR_UTF8 != none; then
27354        if test "$cross_compiling" = yes; then :
27355  :
27356else
27357  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27358/* end confdefs.h.  */
27359
27360#include <locale.h>
27361#include <string.h>
27362#include <wchar.h>
27363int main ()
27364{
27365  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
27366    {
27367      mbstate_t state;
27368      wchar_t wc;
27369      int ret;
27370
27371      memset (&state, '\0', sizeof (mbstate_t));
27372      wc = (wchar_t) 0xBADFACE;
27373      mbrtowc (&wc, NULL, 5, &state);
27374      /* Check that wc was not modified.  */
27375      if (wc != (wchar_t) 0xBADFACE)
27376        return 2;
27377    }
27378  return 0;
27379}
27380_ACEOF
27381if ac_fn_c_try_run "$LINENO"; then :
27382  gl_cv_func_mbrtowc_null_arg2=yes
27383else
27384  gl_cv_func_mbrtowc_null_arg2=no
27385fi
27386rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27387  conftest.$ac_objext conftest.beam conftest.$ac_ext
27388fi
27389
27390      fi
27391
27392fi
27393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
27394$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
27395
27396
27397
27398
27399
27400
27401  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
27402$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
27403if ${gl_cv_func_mbrtowc_retval+:} false; then :
27404  $as_echo_n "(cached) " >&6
27405else
27406
27407                  case "$host_os" in
27408                                   # Guess no on HP-UX, Solaris, native Windows.
27409        hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
27410                                   # Guess yes otherwise.
27411        *)                         gl_cv_func_mbrtowc_retval="guessing yes" ;;
27412      esac
27413      if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
27414         || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
27415        if test "$cross_compiling" = yes; then :
27416  :
27417else
27418  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27419/* end confdefs.h.  */
27420
27421#include <locale.h>
27422#include <string.h>
27423#include <wchar.h>
27424int main ()
27425{
27426  int result = 0;
27427  int found_some_locale = 0;
27428  /* This fails on Solaris.  */
27429  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
27430    {
27431      char input[] = "B\303\274\303\237er"; /* "Büßer" */
27432      mbstate_t state;
27433      wchar_t wc;
27434
27435      memset (&state, '\0', sizeof (mbstate_t));
27436      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
27437        {
27438          input[1] = '\0';
27439          if (mbrtowc (&wc, input + 2, 5, &state) != 1)
27440            result |= 1;
27441        }
27442      found_some_locale = 1;
27443    }
27444  /* This fails on HP-UX 11.11.  */
27445  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
27446    {
27447      char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
27448      mbstate_t state;
27449      wchar_t wc;
27450
27451      memset (&state, '\0', sizeof (mbstate_t));
27452      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
27453        {
27454          input[1] = '\0';
27455          if (mbrtowc (&wc, input + 2, 5, &state) != 2)
27456            result |= 2;
27457        }
27458      found_some_locale = 1;
27459    }
27460  /* This fails on native Windows.  */
27461  if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
27462    {
27463      char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
27464      mbstate_t state;
27465      wchar_t wc;
27466
27467      memset (&state, '\0', sizeof (mbstate_t));
27468      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
27469        {
27470          input[3] = '\0';
27471          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
27472            result |= 4;
27473        }
27474      found_some_locale = 1;
27475    }
27476  if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
27477    {
27478      char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
27479      mbstate_t state;
27480      wchar_t wc;
27481
27482      memset (&state, '\0', sizeof (mbstate_t));
27483      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
27484        {
27485          input[3] = '\0';
27486          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
27487            result |= 8;
27488        }
27489      found_some_locale = 1;
27490    }
27491  if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
27492    {
27493      char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
27494      mbstate_t state;
27495      wchar_t wc;
27496
27497      memset (&state, '\0', sizeof (mbstate_t));
27498      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
27499        {
27500          input[3] = '\0';
27501          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
27502            result |= 16;
27503        }
27504      found_some_locale = 1;
27505    }
27506  return (found_some_locale ? result : 77);
27507}
27508_ACEOF
27509if ac_fn_c_try_run "$LINENO"; then :
27510  gl_cv_func_mbrtowc_retval=yes
27511else
27512  if test $? != 77; then
27513             gl_cv_func_mbrtowc_retval=no
27514           fi
27515
27516fi
27517rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27518  conftest.$ac_objext conftest.beam conftest.$ac_ext
27519fi
27520
27521      fi
27522
27523fi
27524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
27525$as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
27526
27527
27528
27529
27530     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
27531$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
27532if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
27533  $as_echo_n "(cached) " >&6
27534else
27535
27536                  case "$host_os" in
27537                       # Guess no on Solaris 8 and 9.
27538        solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
27539                       # Guess yes otherwise.
27540        *)             gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
27541      esac
27542      if test $LOCALE_ZH_CN != none; then
27543        if test "$cross_compiling" = yes; then :
27544  :
27545else
27546  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27547/* end confdefs.h.  */
27548
27549#include <locale.h>
27550#include <string.h>
27551#include <wchar.h>
27552int main ()
27553{
27554  /* This fails on Solaris 8 and 9.  */
27555  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
27556    {
27557      mbstate_t state;
27558      wchar_t wc;
27559
27560      memset (&state, '\0', sizeof (mbstate_t));
27561      if (mbrtowc (&wc, "", 1, &state) != 0)
27562        return 2;
27563    }
27564  return 0;
27565}
27566_ACEOF
27567if ac_fn_c_try_run "$LINENO"; then :
27568  gl_cv_func_mbrtowc_nul_retval=yes
27569else
27570  gl_cv_func_mbrtowc_nul_retval=no
27571fi
27572rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27573  conftest.$ac_objext conftest.beam conftest.$ac_ext
27574fi
27575
27576      fi
27577
27578fi
27579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
27580$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
27581
27582
27583
27584     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc stores incomplete characters" >&5
27585$as_echo_n "checking whether mbrtowc stores incomplete characters... " >&6; }
27586if ${gl_cv_func_mbrtowc_stores_incomplete+:} false; then :
27587  $as_echo_n "(cached) " >&6
27588else
27589
27590               case "$host_os" in
27591               # Guess yes on native Windows.
27592       mingw*) gl_cv_func_mbrtowc_stores_incomplete="guessing yes" ;;
27593       *)      gl_cv_func_mbrtowc_stores_incomplete="guessing no" ;;
27594     esac
27595     case "$host_os" in
27596       mingw*)
27597         if test "$cross_compiling" = yes; then :
27598  :
27599else
27600  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27601/* end confdefs.h.  */
27602
27603#include <locale.h>
27604#include <string.h>
27605#include <wchar.h>
27606int main ()
27607{
27608  int result = 0;
27609  if (setlocale (LC_ALL, "French_France.65001") != NULL)
27610    {
27611      wchar_t wc = (wchar_t) 0xBADFACE;
27612      mbstate_t state;
27613
27614      memset (&state, '\0', sizeof (mbstate_t));
27615      if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
27616          && wc != (wchar_t) 0xBADFACE)
27617        result |= 1;
27618    }
27619  if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
27620    {
27621      wchar_t wc = (wchar_t) 0xBADFACE;
27622      mbstate_t state;
27623
27624      memset (&state, '\0', sizeof (mbstate_t));
27625      if (mbrtowc (&wc, "\226", 1, &state) == (size_t)(-2)
27626          && wc != (wchar_t) 0xBADFACE)
27627        result |= 2;
27628    }
27629  if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
27630    {
27631      wchar_t wc = (wchar_t) 0xBADFACE;
27632      mbstate_t state;
27633
27634      memset (&state, '\0', sizeof (mbstate_t));
27635      if (mbrtowc (&wc, "\245", 1, &state) == (size_t)(-2)
27636          && wc != (wchar_t) 0xBADFACE)
27637        result |= 4;
27638    }
27639  if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
27640    {
27641      wchar_t wc = (wchar_t) 0xBADFACE;
27642      mbstate_t state;
27643
27644      memset (&state, '\0', sizeof (mbstate_t));
27645      if (mbrtowc (&wc, "\261", 1, &state) == (size_t)(-2)
27646          && wc != (wchar_t) 0xBADFACE)
27647        result |= 8;
27648    }
27649  return result;
27650}
27651_ACEOF
27652if ac_fn_c_try_run "$LINENO"; then :
27653  gl_cv_func_mbrtowc_stores_incomplete=no
27654else
27655  gl_cv_func_mbrtowc_stores_incomplete=yes
27656fi
27657rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27658  conftest.$ac_objext conftest.beam conftest.$ac_ext
27659fi
27660
27661         ;;
27662       *)
27663
27664         if test $LOCALE_FR_UTF8 != none; then
27665           if test "$cross_compiling" = yes; then :
27666  :
27667else
27668  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27669/* end confdefs.h.  */
27670
27671#include <locale.h>
27672#include <string.h>
27673#include <wchar.h>
27674int main ()
27675{
27676  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
27677    {
27678      wchar_t wc = (wchar_t) 0xBADFACE;
27679      mbstate_t state;
27680
27681      memset (&state, '\0', sizeof (mbstate_t));
27682      if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
27683          && wc != (wchar_t) 0xBADFACE)
27684        return 1;
27685    }
27686  return 0;
27687}
27688_ACEOF
27689if ac_fn_c_try_run "$LINENO"; then :
27690  gl_cv_func_mbrtowc_stores_incomplete=no
27691else
27692  gl_cv_func_mbrtowc_stores_incomplete=yes
27693fi
27694rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27695  conftest.$ac_objext conftest.beam conftest.$ac_ext
27696fi
27697
27698         fi
27699         ;;
27700     esac
27701
27702fi
27703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_stores_incomplete" >&5
27704$as_echo "$gl_cv_func_mbrtowc_stores_incomplete" >&6; }
27705
27706
27707
27708     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
27709$as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
27710if ${gl_cv_func_mbrtowc_empty_input+:} false; then :
27711  $as_echo_n "(cached) " >&6
27712else
27713
27714                  case "$host_os" in
27715                              # Guess no on AIX and glibc systems.
27716        aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
27717                              # Guess yes on native Windows.
27718        mingw*)               gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
27719        *)                    gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
27720      esac
27721      if test "$cross_compiling" = yes; then :
27722  :
27723else
27724  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27725/* end confdefs.h.  */
27726
27727           #include <wchar.h>
27728           static wchar_t wc;
27729           static mbstate_t mbs;
27730           int
27731           main (void)
27732           {
27733             return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
27734           }
27735_ACEOF
27736if ac_fn_c_try_run "$LINENO"; then :
27737  gl_cv_func_mbrtowc_empty_input=yes
27738else
27739  gl_cv_func_mbrtowc_empty_input=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
27746fi
27747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
27748$as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
27749
27750
27751     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
27752$as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
27753if ${gl_cv_func_mbrtowc_C_locale_sans_EILSEQ+:} false; then :
27754  $as_echo_n "(cached) " >&6
27755else
27756
27757               gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
27758
27759     if test "$cross_compiling" = yes; then :
27760  case "$host_os" in
27761                 # Guess yes on native Windows.
27762         mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
27763       esac
27764
27765else
27766  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27767/* end confdefs.h.  */
27768#include <limits.h>
27769            #include <locale.h>
27770            #include <wchar.h>
27771
27772int
27773main ()
27774{
27775
27776            int i;
27777            char *locale = setlocale (LC_ALL, "C");
27778            if (! locale)
27779              return 2;
27780            for (i = CHAR_MIN; i <= CHAR_MAX; i++)
27781              {
27782                char c = i;
27783                wchar_t wc;
27784                mbstate_t mbs = { 0, };
27785                size_t ss = mbrtowc (&wc, &c, 1, &mbs);
27786                if (1 < ss)
27787                  return 3;
27788              }
27789            return 0;
27790
27791  ;
27792  return 0;
27793}
27794_ACEOF
27795if ac_fn_c_try_run "$LINENO"; then :
27796  gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes
27797else
27798  gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no
27799fi
27800rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27801  conftest.$ac_objext conftest.beam conftest.$ac_ext
27802fi
27803
27804
27805fi
27806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&5
27807$as_echo "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&6; }
27808
27809      case "$gl_cv_func_mbrtowc_null_arg1" in
27810        *yes) ;;
27811        *)
27812$as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
27813
27814           REPLACE_MBRTOWC=1
27815           ;;
27816      esac
27817      case "$gl_cv_func_mbrtowc_null_arg2" in
27818        *yes) ;;
27819        *)
27820$as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
27821
27822           REPLACE_MBRTOWC=1
27823           ;;
27824      esac
27825      case "$gl_cv_func_mbrtowc_retval" in
27826        *yes) ;;
27827        *)
27828$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
27829
27830           REPLACE_MBRTOWC=1
27831           ;;
27832      esac
27833      case "$gl_cv_func_mbrtowc_nul_retval" in
27834        *yes) ;;
27835        *)
27836$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
27837
27838           REPLACE_MBRTOWC=1
27839           ;;
27840      esac
27841      case "$gl_cv_func_mbrtowc_stores_incomplete" in
27842        *no) ;;
27843        *)
27844$as_echo "#define MBRTOWC_STORES_INCOMPLETE_BUG 1" >>confdefs.h
27845
27846           REPLACE_MBRTOWC=1
27847           ;;
27848      esac
27849      case "$gl_cv_func_mbrtowc_empty_input" in
27850        *yes) ;;
27851        *)
27852$as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
27853
27854           REPLACE_MBRTOWC=1
27855           ;;
27856      esac
27857      case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
27858        *yes) ;;
27859        *)
27860$as_echo "#define MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
27861
27862           REPLACE_MBRTOWC=1
27863           ;;
27864      esac
27865    fi
27866  fi
27867  if test $REPLACE_MBSTATE_T = 1; then
27868    case "$host_os" in
27869      mingw*) LIB_MBRTOWC= ;;
27870      *)
27871
27872
27873  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
27874$as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
27875if ${gl_cv_have_weak+:} false; then :
27876  $as_echo_n "(cached) " >&6
27877else
27878  gl_cv_have_weak=no
27879          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27880/* end confdefs.h.  */
27881extern void xyzzy ();
27882#pragma weak xyzzy
27883int
27884main ()
27885{
27886xyzzy();
27887  ;
27888  return 0;
27889}
27890_ACEOF
27891if ac_fn_c_try_link "$LINENO"; then :
27892  gl_cv_have_weak=maybe
27893fi
27894rm -f core conftest.err conftest.$ac_objext \
27895    conftest$ac_exeext conftest.$ac_ext
27896     if test $gl_cv_have_weak = maybe; then
27897                     if test "$cross_compiling" = yes; then :
27898                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27899/* end confdefs.h.  */
27900#ifdef __ELF__
27901             Extensible Linking Format
27902             #endif
27903
27904_ACEOF
27905if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27906  $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
27907  gl_cv_have_weak="guessing yes"
27908else
27909  gl_cv_have_weak="guessing no"
27910fi
27911rm -f conftest*
27912
27913
27914else
27915  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27916/* end confdefs.h.  */
27917
27918#include <stdio.h>
27919#pragma weak fputs
27920int main ()
27921{
27922  return (fputs == NULL);
27923}
27924_ACEOF
27925if ac_fn_c_try_run "$LINENO"; then :
27926  gl_cv_have_weak=yes
27927else
27928  gl_cv_have_weak=no
27929fi
27930rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27931  conftest.$ac_objext conftest.beam conftest.$ac_ext
27932fi
27933
27934     fi
27935          case " $LDFLAGS " in
27936       *" -static "*) gl_cv_have_weak=no ;;
27937     esac
27938                    case "$gl_cv_have_weak" in
27939       *yes)
27940         case "$host_os" in
27941           freebsd* | dragonfly*)
27942             : > conftest1.c
27943             $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
27944             cat <<EOF > conftest2.c
27945#include <pthread.h>
27946#pragma weak pthread_mutexattr_gettype
27947int main ()
27948{
27949  return (pthread_mutexattr_gettype != NULL);
27950}
27951EOF
27952             $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
27953               || gl_cv_have_weak=no
27954             rm -f conftest1.c libempty.so conftest2.c conftest
27955             ;;
27956         esac
27957         ;;
27958     esac
27959
27960fi
27961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
27962$as_echo "$gl_cv_have_weak" >&6; }
27963  case "$gl_cv_have_weak" in
27964    *yes)
27965
27966$as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
27967
27968      ;;
27969  esac
27970
27971        case "$gl_cv_have_weak" in
27972          *yes) LIB_MBRTOWC= ;;
27973          *)    LIB_MBRTOWC="$LIBPTHREAD" ;;
27974        esac
27975        ;;
27976    esac
27977  else
27978    LIB_MBRTOWC=
27979  fi
27980
27981
27982  if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
27983
27984
27985
27986
27987
27988
27989
27990
27991  gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
27992
27993    if test $REPLACE_MBSTATE_T = 1; then
27994
27995
27996
27997
27998
27999
28000
28001
28002  gl_LIBOBJS="$gl_LIBOBJS lc-charset-dispatch.$ac_objext"
28003
28004
28005
28006
28007
28008
28009
28010
28011
28012  gl_LIBOBJS="$gl_LIBOBJS mbtowc-lock.$ac_objext"
28013
28014
28015
28016
28017  CFLAG_VISIBILITY=
28018  HAVE_VISIBILITY=0
28019  if test -n "$GCC"; then
28020                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
28021$as_echo_n "checking whether the -Werror option is usable... " >&6; }
28022if ${gl_cv_cc_vis_werror+:} false; then :
28023  $as_echo_n "(cached) " >&6
28024else
28025  gl_save_CFLAGS="$CFLAGS"
28026       CFLAGS="$CFLAGS -Werror"
28027       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28028/* end confdefs.h.  */
28029
28030int
28031main ()
28032{
28033
28034  ;
28035  return 0;
28036}
28037_ACEOF
28038if ac_fn_c_try_compile "$LINENO"; then :
28039  gl_cv_cc_vis_werror=yes
28040else
28041  gl_cv_cc_vis_werror=no
28042fi
28043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28044       CFLAGS="$gl_save_CFLAGS"
28045
28046fi
28047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
28048$as_echo "$gl_cv_cc_vis_werror" >&6; }
28049        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
28050$as_echo_n "checking for simple visibility declarations... " >&6; }
28051if ${gl_cv_cc_visibility+:} false; then :
28052  $as_echo_n "(cached) " >&6
28053else
28054  gl_save_CFLAGS="$CFLAGS"
28055       CFLAGS="$CFLAGS -fvisibility=hidden"
28056                                          if test $gl_cv_cc_vis_werror = yes; then
28057         CFLAGS="$CFLAGS -Werror"
28058       fi
28059       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28060/* end confdefs.h.  */
28061extern __attribute__((__visibility__("hidden"))) int hiddenvar;
28062              extern __attribute__((__visibility__("default"))) int exportedvar;
28063              extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
28064              extern __attribute__((__visibility__("default"))) int exportedfunc (void);
28065              void dummyfunc (void) {}
28066
28067int
28068main ()
28069{
28070
28071  ;
28072  return 0;
28073}
28074_ACEOF
28075if ac_fn_c_try_compile "$LINENO"; then :
28076  gl_cv_cc_visibility=yes
28077else
28078  gl_cv_cc_visibility=no
28079fi
28080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28081       CFLAGS="$gl_save_CFLAGS"
28082
28083fi
28084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
28085$as_echo "$gl_cv_cc_visibility" >&6; }
28086    if test $gl_cv_cc_visibility = yes; then
28087      CFLAG_VISIBILITY="-fvisibility=hidden"
28088      HAVE_VISIBILITY=1
28089    fi
28090  fi
28091
28092
28093
28094cat >>confdefs.h <<_ACEOF
28095#define HAVE_VISIBILITY $HAVE_VISIBILITY
28096_ACEOF
28097
28098
28099
28100    fi
28101
28102
28103  :
28104
28105  fi
28106
28107
28108
28109
28110
28111          GNULIB_MBRTOWC=1
28112
28113
28114
28115
28116
28117$as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
28118
28119
28120
28121
28122
28123
28124
28125
28126          GNULIB_MBSCASECMP=1
28127
28128
28129
28130
28131
28132$as_echo "#define GNULIB_TEST_MBSCASECMP 1" >>confdefs.h
28133
28134
28135
28136
28137
28138
28139
28140
28141
28142
28143
28144
28145
28146
28147
28148        if case "$host_os" in
28149       mingw*) true ;;
28150       *) test $ac_cv_func_mbsinit = yes ;;
28151     esac \
28152    && test $ac_cv_func_mbrtowc = yes; then
28153
28154
28155
28156
28157     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
28158$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
28159if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
28160  $as_echo_n "(cached) " >&6
28161else
28162
28163                  case "$host_os" in
28164                     # Guess no on AIX and OSF/1.
28165        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
28166                     # Guess yes otherwise.
28167        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
28168      esac
28169      if test $LOCALE_JA != none; then
28170        if test "$cross_compiling" = yes; then :
28171  :
28172else
28173  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28174/* end confdefs.h.  */
28175
28176#include <locale.h>
28177#include <string.h>
28178#include <wchar.h>
28179int main ()
28180{
28181  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
28182    {
28183      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
28184      mbstate_t state;
28185      wchar_t wc;
28186
28187      memset (&state, '\0', sizeof (mbstate_t));
28188      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
28189        if (mbsinit (&state))
28190          return 2;
28191    }
28192  return 0;
28193}
28194_ACEOF
28195if ac_fn_c_try_run "$LINENO"; then :
28196  gl_cv_func_mbrtowc_incomplete_state=yes
28197else
28198  gl_cv_func_mbrtowc_incomplete_state=no
28199fi
28200rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28201  conftest.$ac_objext conftest.beam conftest.$ac_ext
28202fi
28203
28204      else
28205        if test $LOCALE_FR_UTF8 != none; then
28206          if test "$cross_compiling" = yes; then :
28207  :
28208else
28209  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28210/* end confdefs.h.  */
28211
28212#include <locale.h>
28213#include <string.h>
28214#include <wchar.h>
28215int main ()
28216{
28217  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
28218    {
28219      const char input[] = "B\303\274\303\237er"; /* "Büßer" */
28220      mbstate_t state;
28221      wchar_t wc;
28222
28223      memset (&state, '\0', sizeof (mbstate_t));
28224      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
28225        if (mbsinit (&state))
28226          return 2;
28227    }
28228  return 0;
28229}
28230_ACEOF
28231if ac_fn_c_try_run "$LINENO"; then :
28232  gl_cv_func_mbrtowc_incomplete_state=yes
28233else
28234  gl_cv_func_mbrtowc_incomplete_state=no
28235fi
28236rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28237  conftest.$ac_objext conftest.beam conftest.$ac_ext
28238fi
28239
28240        fi
28241      fi
28242
28243fi
28244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
28245$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
28246
28247
28248
28249
28250     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
28251$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
28252if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
28253  $as_echo_n "(cached) " >&6
28254else
28255
28256                  case "$host_os" in
28257                    # Guess no on Solaris 8.
28258        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
28259                    # Guess yes otherwise.
28260        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
28261      esac
28262      if test $LOCALE_ZH_CN != none; then
28263        if test "$cross_compiling" = yes; then :
28264  :
28265else
28266  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28267/* end confdefs.h.  */
28268
28269#include <locale.h>
28270#include <stdlib.h>
28271#include <string.h>
28272#include <wchar.h>
28273int main ()
28274{
28275  /* This fails on Solaris 8:
28276     mbrtowc returns 2, and sets wc to 0x00F0.
28277     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
28278  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
28279    {
28280      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
28281      mbstate_t state;
28282      wchar_t wc;
28283
28284      memset (&state, '\0', sizeof (mbstate_t));
28285      if (mbrtowc (&wc, input + 3, 6, &state) != 4
28286          && mbtowc (&wc, input + 3, 6) == 4)
28287        return 2;
28288    }
28289  return 0;
28290}
28291_ACEOF
28292if ac_fn_c_try_run "$LINENO"; then :
28293  gl_cv_func_mbrtowc_sanitycheck=yes
28294else
28295  gl_cv_func_mbrtowc_sanitycheck=no
28296fi
28297rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28298  conftest.$ac_objext conftest.beam conftest.$ac_ext
28299fi
28300
28301      fi
28302
28303fi
28304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
28305$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
28306
28307    REPLACE_MBSTATE_T=0
28308    case "$gl_cv_func_mbrtowc_incomplete_state" in
28309      *yes) ;;
28310      *) REPLACE_MBSTATE_T=1 ;;
28311    esac
28312    case "$gl_cv_func_mbrtowc_sanitycheck" in
28313      *yes) ;;
28314      *) REPLACE_MBSTATE_T=1 ;;
28315    esac
28316  else
28317    REPLACE_MBSTATE_T=1
28318  fi
28319
28320
28321
28322  if test $ac_cv_func_mbsinit = no; then
28323    HAVE_MBSINIT=0
28324    ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
28325      #include <wchar.h>
28326
28327"
28328if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
28329  ac_have_decl=1
28330else
28331  ac_have_decl=0
28332fi
28333
28334cat >>confdefs.h <<_ACEOF
28335#define HAVE_DECL_MBSINIT $ac_have_decl
28336_ACEOF
28337
28338    if test $ac_cv_have_decl_mbsinit = yes; then
28339                        REPLACE_MBSINIT=1
28340    fi
28341  else
28342    if test $REPLACE_MBSTATE_T = 1; then
28343      REPLACE_MBSINIT=1
28344    else
28345                        case "$host_os" in
28346        mingw*) REPLACE_MBSINIT=1 ;;
28347      esac
28348    fi
28349  fi
28350
28351  if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
28352
28353
28354
28355
28356
28357
28358
28359
28360  gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
28361
28362
28363  :
28364
28365  fi
28366
28367
28368
28369
28370
28371          GNULIB_MBSINIT=1
28372
28373
28374
28375
28376
28377$as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
28378
28379
28380
28381
28382
28383
28384
28385
28386
28387
28388
28389
28390
28391
28392        if case "$host_os" in
28393       mingw*) true ;;
28394       *) test $ac_cv_func_mbsinit = yes ;;
28395     esac \
28396    && test $ac_cv_func_mbrtowc = yes; then
28397
28398
28399
28400
28401     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
28402$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
28403if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
28404  $as_echo_n "(cached) " >&6
28405else
28406
28407                  case "$host_os" in
28408                     # Guess no on AIX and OSF/1.
28409        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
28410                     # Guess yes otherwise.
28411        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
28412      esac
28413      if test $LOCALE_JA != none; then
28414        if test "$cross_compiling" = yes; then :
28415  :
28416else
28417  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28418/* end confdefs.h.  */
28419
28420#include <locale.h>
28421#include <string.h>
28422#include <wchar.h>
28423int main ()
28424{
28425  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
28426    {
28427      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
28428      mbstate_t state;
28429      wchar_t wc;
28430
28431      memset (&state, '\0', sizeof (mbstate_t));
28432      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
28433        if (mbsinit (&state))
28434          return 2;
28435    }
28436  return 0;
28437}
28438_ACEOF
28439if ac_fn_c_try_run "$LINENO"; then :
28440  gl_cv_func_mbrtowc_incomplete_state=yes
28441else
28442  gl_cv_func_mbrtowc_incomplete_state=no
28443fi
28444rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28445  conftest.$ac_objext conftest.beam conftest.$ac_ext
28446fi
28447
28448      else
28449        if test $LOCALE_FR_UTF8 != none; then
28450          if test "$cross_compiling" = yes; then :
28451  :
28452else
28453  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28454/* end confdefs.h.  */
28455
28456#include <locale.h>
28457#include <string.h>
28458#include <wchar.h>
28459int main ()
28460{
28461  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
28462    {
28463      const char input[] = "B\303\274\303\237er"; /* "Büßer" */
28464      mbstate_t state;
28465      wchar_t wc;
28466
28467      memset (&state, '\0', sizeof (mbstate_t));
28468      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
28469        if (mbsinit (&state))
28470          return 2;
28471    }
28472  return 0;
28473}
28474_ACEOF
28475if ac_fn_c_try_run "$LINENO"; then :
28476  gl_cv_func_mbrtowc_incomplete_state=yes
28477else
28478  gl_cv_func_mbrtowc_incomplete_state=no
28479fi
28480rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28481  conftest.$ac_objext conftest.beam conftest.$ac_ext
28482fi
28483
28484        fi
28485      fi
28486
28487fi
28488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
28489$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
28490
28491
28492
28493
28494     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
28495$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
28496if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
28497  $as_echo_n "(cached) " >&6
28498else
28499
28500                  case "$host_os" in
28501                    # Guess no on Solaris 8.
28502        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
28503                    # Guess yes otherwise.
28504        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
28505      esac
28506      if test $LOCALE_ZH_CN != none; then
28507        if test "$cross_compiling" = yes; then :
28508  :
28509else
28510  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28511/* end confdefs.h.  */
28512
28513#include <locale.h>
28514#include <stdlib.h>
28515#include <string.h>
28516#include <wchar.h>
28517int main ()
28518{
28519  /* This fails on Solaris 8:
28520     mbrtowc returns 2, and sets wc to 0x00F0.
28521     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
28522  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
28523    {
28524      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
28525      mbstate_t state;
28526      wchar_t wc;
28527
28528      memset (&state, '\0', sizeof (mbstate_t));
28529      if (mbrtowc (&wc, input + 3, 6, &state) != 4
28530          && mbtowc (&wc, input + 3, 6) == 4)
28531        return 2;
28532    }
28533  return 0;
28534}
28535_ACEOF
28536if ac_fn_c_try_run "$LINENO"; then :
28537  gl_cv_func_mbrtowc_sanitycheck=yes
28538else
28539  gl_cv_func_mbrtowc_sanitycheck=no
28540fi
28541rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28542  conftest.$ac_objext conftest.beam conftest.$ac_ext
28543fi
28544
28545      fi
28546
28547fi
28548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
28549$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
28550
28551    REPLACE_MBSTATE_T=0
28552    case "$gl_cv_func_mbrtowc_incomplete_state" in
28553      *yes) ;;
28554      *) REPLACE_MBSTATE_T=1 ;;
28555    esac
28556    case "$gl_cv_func_mbrtowc_sanitycheck" in
28557      *yes) ;;
28558      *) REPLACE_MBSTATE_T=1 ;;
28559    esac
28560  else
28561    REPLACE_MBSTATE_T=1
28562  fi
28563
28564
28565
28566  if test $ac_cv_func_mbsrtowcs = no; then
28567    HAVE_MBSRTOWCS=0
28568    ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
28569      #include <wchar.h>
28570
28571"
28572if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
28573  ac_have_decl=1
28574else
28575  ac_have_decl=0
28576fi
28577
28578cat >>confdefs.h <<_ACEOF
28579#define HAVE_DECL_MBSRTOWCS $ac_have_decl
28580_ACEOF
28581
28582    if test $ac_cv_have_decl_mbsrtowcs = yes; then
28583                        REPLACE_MBSRTOWCS=1
28584    fi
28585  else
28586    if test $REPLACE_MBSTATE_T = 1; then
28587      REPLACE_MBSRTOWCS=1
28588    else
28589
28590
28591
28592
28593
28594
28595     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
28596$as_echo_n "checking whether mbsrtowcs works... " >&6; }
28597if ${gl_cv_func_mbsrtowcs_works+:} false; then :
28598  $as_echo_n "(cached) " >&6
28599else
28600
28601                  case "$host_os" in
28602                                   # Guess no on HP-UX, Solaris, mingw.
28603        hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
28604                                   # Guess yes otherwise.
28605        *)                         gl_cv_func_mbsrtowcs_works="guessing yes" ;;
28606      esac
28607      if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
28608        if test "$cross_compiling" = yes; then :
28609  :
28610else
28611  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28612/* end confdefs.h.  */
28613
28614#include <locale.h>
28615#include <string.h>
28616#include <wchar.h>
28617int main ()
28618{
28619  int result = 0;
28620  /* Test whether the function supports a NULL destination argument.
28621     This fails on native Windows.  */
28622  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
28623    {
28624      const char input[] = "\337er";
28625      const char *src = input;
28626      mbstate_t state;
28627
28628      memset (&state, '\0', sizeof (mbstate_t));
28629      if (mbsrtowcs (NULL, &src, 1, &state) != 3
28630          || src != input)
28631        result |= 1;
28632    }
28633  /* Test whether the function works when started with a conversion state
28634     in non-initial state.  This fails on HP-UX 11.11 and Solaris 10.  */
28635  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
28636    {
28637      const char input[] = "B\303\274\303\237er";
28638      mbstate_t state;
28639
28640      memset (&state, '\0', sizeof (mbstate_t));
28641      if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
28642        if (!mbsinit (&state))
28643          {
28644            const char *src = input + 2;
28645            if (mbsrtowcs (NULL, &src, 10, &state) != 4)
28646              result |= 2;
28647          }
28648    }
28649  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
28650    {
28651      const char input[] = "<\306\374\313\334\270\354>";
28652      mbstate_t state;
28653
28654      memset (&state, '\0', sizeof (mbstate_t));
28655      if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
28656        if (!mbsinit (&state))
28657          {
28658            const char *src = input + 4;
28659            if (mbsrtowcs (NULL, &src, 10, &state) != 3)
28660              result |= 4;
28661          }
28662    }
28663  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
28664    {
28665      const char input[] = "B\250\271\201\060\211\070er";
28666      mbstate_t state;
28667
28668      memset (&state, '\0', sizeof (mbstate_t));
28669      if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
28670        if (!mbsinit (&state))
28671          {
28672            const char *src = input + 2;
28673            if (mbsrtowcs (NULL, &src, 10, &state) != 4)
28674              result |= 8;
28675          }
28676    }
28677  return result;
28678}
28679_ACEOF
28680if ac_fn_c_try_run "$LINENO"; then :
28681  gl_cv_func_mbsrtowcs_works=yes
28682else
28683  gl_cv_func_mbsrtowcs_works=no
28684fi
28685rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28686  conftest.$ac_objext conftest.beam conftest.$ac_ext
28687fi
28688
28689      fi
28690
28691fi
28692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
28693$as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
28694
28695      case "$gl_cv_func_mbsrtowcs_works" in
28696        *yes) ;;
28697        *) REPLACE_MBSRTOWCS=1 ;;
28698      esac
28699    fi
28700  fi
28701
28702  if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
28703
28704
28705
28706
28707
28708
28709
28710
28711  gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
28712
28713
28714
28715
28716
28717
28718
28719
28720
28721  gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
28722
28723
28724  :
28725
28726  fi
28727
28728
28729
28730
28731
28732          GNULIB_MBSRTOWCS=1
28733
28734
28735
28736
28737
28738$as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
28739
28740
28741
28742
28743
28744
28745  for ac_func in mbtowc
28746do :
28747  ac_fn_c_check_func "$LINENO" "mbtowc" "ac_cv_func_mbtowc"
28748if test "x$ac_cv_func_mbtowc" = xyes; then :
28749  cat >>confdefs.h <<_ACEOF
28750#define HAVE_MBTOWC 1
28751_ACEOF
28752
28753fi
28754done
28755
28756  if test $ac_cv_func_mbtowc = no; then
28757    HAVE_MBTOWC=0
28758  else
28759    if false; then
28760      REPLACE_MBTOWC=1
28761    fi
28762  fi
28763
28764  if test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1; then
28765
28766
28767
28768
28769
28770
28771
28772
28773  gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext"
28774
28775
28776  :
28777
28778  fi
28779
28780
28781
28782
28783
28784          GNULIB_MBTOWC=1
28785
28786
28787
28788
28789
28790$as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
28791
28792
28793
28794
28795
28796  :
28797
28798
28799  if test $REPLACE_MEMCHR = 1; then
28800
28801
28802
28803
28804
28805
28806
28807
28808  gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
28809
28810
28811  for ac_header in bp-sym.h
28812do :
28813  ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
28814if test "x$ac_cv_header_bp_sym_h" = xyes; then :
28815  cat >>confdefs.h <<_ACEOF
28816#define HAVE_BP_SYM_H 1
28817_ACEOF
28818
28819fi
28820
28821done
28822
28823
28824  fi
28825
28826
28827
28828
28829
28830          GNULIB_MEMCHR=1
28831
28832
28833
28834
28835
28836$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
28837
28838
28839
28840
28841
28842
28843
28844
28845
28846  for ac_func in mempcpy
28847do :
28848  ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
28849if test "x$ac_cv_func_mempcpy" = xyes; then :
28850  cat >>confdefs.h <<_ACEOF
28851#define HAVE_MEMPCPY 1
28852_ACEOF
28853
28854fi
28855done
28856
28857  if test $ac_cv_func_mempcpy = no; then
28858    HAVE_MEMPCPY=0
28859  fi
28860
28861  if test $HAVE_MEMPCPY = 0; then
28862
28863
28864
28865
28866
28867
28868
28869
28870  gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
28871
28872
28873  :
28874
28875  fi
28876
28877
28878
28879
28880
28881          GNULIB_MEMPCPY=1
28882
28883
28884
28885
28886
28887$as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
28888
28889
28890
28891
28892
28893
28894
28895
28896  if test $ac_cv_have_decl_memrchr = no; then
28897    HAVE_DECL_MEMRCHR=0
28898  fi
28899
28900  for ac_func in memrchr
28901do :
28902  ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
28903if test "x$ac_cv_func_memrchr" = xyes; then :
28904  cat >>confdefs.h <<_ACEOF
28905#define HAVE_MEMRCHR 1
28906_ACEOF
28907
28908fi
28909done
28910
28911
28912  if test $ac_cv_func_memrchr = no; then
28913
28914
28915
28916
28917
28918
28919
28920
28921  gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
28922
28923    :
28924  fi
28925
28926
28927
28928
28929
28930          GNULIB_MEMRCHR=1
28931
28932
28933
28934
28935
28936$as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
28937
28938
28939
28940
28941
28942
28943
28944
28945  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
28946$as_echo_n "checking whether mkdir handles trailing slash... " >&6; }
28947if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then :
28948  $as_echo_n "(cached) " >&6
28949else
28950  rm -rf conftest.dir
28951     if test "$cross_compiling" = yes; then :
28952  case "$host_os" in
28953                           # Guess yes on Linux systems.
28954          linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
28955                           # Guess yes on glibc systems.
28956          *-gnu* | gnu*)   gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
28957                           # Guess yes on MSVC, no on mingw.
28958          mingw*)          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28959/* end confdefs.h.  */
28960
28961#ifdef _MSC_VER
28962 Known
28963#endif
28964
28965_ACEOF
28966if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28967  $EGREP "Known" >/dev/null 2>&1; then :
28968  gl_cv_func_mkdir_trailing_slash_works="guessing yes"
28969else
28970  gl_cv_func_mkdir_trailing_slash_works="guessing no"
28971fi
28972rm -f conftest*
28973
28974                           ;;
28975                           # If we don't know, obey --enable-cross-guesses.
28976          *)               gl_cv_func_mkdir_trailing_slash_works="$gl_cross_guess_normal" ;;
28977        esac
28978
28979else
28980  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28981/* end confdefs.h.  */
28982
28983          #include <sys/types.h>
28984          #include <sys/stat.h>
28985
28986
28987$gl_mda_defines
28988
28989int
28990main ()
28991{
28992return mkdir ("conftest.dir/", 0700);
28993  ;
28994  return 0;
28995}
28996_ACEOF
28997if ac_fn_c_try_run "$LINENO"; then :
28998  gl_cv_func_mkdir_trailing_slash_works=yes
28999else
29000  gl_cv_func_mkdir_trailing_slash_works=no
29001fi
29002rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29003  conftest.$ac_objext conftest.beam conftest.$ac_ext
29004fi
29005
29006     rm -rf conftest.dir
29007
29008fi
29009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
29010$as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
29011  case "$gl_cv_func_mkdir_trailing_slash_works" in
29012    *yes) ;;
29013    *)
29014      REPLACE_MKDIR=1
29015      ;;
29016  esac
29017
29018  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
29019$as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
29020if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then :
29021  $as_echo_n "(cached) " >&6
29022else
29023  rm -rf conftest.dir
29024     if test "$cross_compiling" = yes; then :
29025  case "$host_os" in
29026                         # Guess yes on glibc systems.
29027          *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
29028                         # Guess yes on musl systems.
29029          *-musl*)       gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
29030                         # Guess no on native Windows.
29031          mingw*)        gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
29032                         # If we don't know, obey --enable-cross-guesses.
29033          *)             gl_cv_func_mkdir_trailing_dot_works="$gl_cross_guess_normal" ;;
29034        esac
29035
29036else
29037  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29038/* end confdefs.h.  */
29039
29040          #include <sys/types.h>
29041          #include <sys/stat.h>
29042
29043
29044$gl_mda_defines
29045
29046int
29047main ()
29048{
29049return !mkdir ("conftest.dir/./", 0700);
29050  ;
29051  return 0;
29052}
29053_ACEOF
29054if ac_fn_c_try_run "$LINENO"; then :
29055  gl_cv_func_mkdir_trailing_dot_works=yes
29056else
29057  gl_cv_func_mkdir_trailing_dot_works=no
29058fi
29059rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29060  conftest.$ac_objext conftest.beam conftest.$ac_ext
29061fi
29062
29063     rm -rf conftest.dir
29064
29065
29066fi
29067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
29068$as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
29069  case "$gl_cv_func_mkdir_trailing_dot_works" in
29070    *yes) ;;
29071    *)
29072      REPLACE_MKDIR=1
29073
29074$as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
29075
29076      ;;
29077  esac
29078
29079  if test $REPLACE_MKDIR = 1; then
29080
29081
29082
29083
29084
29085
29086
29087
29088  gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
29089
29090  fi
29091
29092
29093
29094
29095
29096          GNULIB_MKDIR=1
29097
29098
29099
29100
29101
29102$as_echo "#define GNULIB_TEST_MKDIR 1" >>confdefs.h
29103
29104
29105
29106
29107
29108
29109
29110  if test $ac_cv_func_mkdirat != yes; then
29111    HAVE_MKDIRAT=0
29112  fi
29113
29114  if test $HAVE_MKDIRAT = 0; then
29115
29116
29117
29118
29119
29120
29121
29122
29123  gl_LIBOBJS="$gl_LIBOBJS mkdirat.$ac_objext"
29124
29125
29126
29127
29128  fi
29129
29130
29131
29132
29133
29134          GNULIB_MKDIRAT=1
29135
29136
29137
29138
29139
29140$as_echo "#define GNULIB_TEST_MKDIRAT 1" >>confdefs.h
29141
29142
29143
29144
29145
29146  for ac_func in mkdtemp
29147do :
29148  ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
29149if test "x$ac_cv_func_mkdtemp" = xyes; then :
29150  cat >>confdefs.h <<_ACEOF
29151#define HAVE_MKDTEMP 1
29152_ACEOF
29153
29154fi
29155done
29156
29157  if test $ac_cv_func_mkdtemp = no; then
29158    HAVE_MKDTEMP=0
29159  fi
29160
29161  if test $HAVE_MKDTEMP = 0; then
29162
29163
29164
29165
29166
29167
29168
29169
29170  gl_LIBOBJS="$gl_LIBOBJS mkdtemp.$ac_objext"
29171
29172    :
29173
29174  fi
29175
29176
29177
29178
29179
29180          GNULIB_MKDTEMP=1
29181
29182
29183
29184
29185
29186$as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
29187
29188
29189
29190
29191
29192
29193      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mkfifo" >&5
29194$as_echo_n "checking for mkfifo... " >&6; }
29195if ${gl_cv_func_mkfifo+:} false; then :
29196  $as_echo_n "(cached) " >&6
29197else
29198  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29199/* end confdefs.h.  */
29200#include <sys/stat.h>
29201int
29202main ()
29203{
29204return mkfifo("/",0);
29205  ;
29206  return 0;
29207}
29208
29209_ACEOF
29210if ac_fn_c_try_link "$LINENO"; then :
29211  gl_cv_func_mkfifo=yes
29212else
29213  gl_cv_func_mkfifo=no
29214fi
29215rm -f core conftest.err conftest.$ac_objext \
29216    conftest$ac_exeext conftest.$ac_ext
29217
29218fi
29219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkfifo" >&5
29220$as_echo "$gl_cv_func_mkfifo" >&6; }
29221  if test $gl_cv_func_mkfifo = no; then
29222    HAVE_MKFIFO=0
29223  else
29224
29225$as_echo "#define HAVE_MKFIFO 1" >>confdefs.h
29226
29227
29228    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkfifo rejects trailing slashes" >&5
29229$as_echo_n "checking whether mkfifo rejects trailing slashes... " >&6; }
29230if ${gl_cv_func_mkfifo_works+:} false; then :
29231  $as_echo_n "(cached) " >&6
29232else
29233  # Assume that if we have lstat, we can also check symlinks.
29234       if test $ac_cv_func_lstat = yes; then
29235         ln -s conftest.tmp conftest.lnk
29236       fi
29237       if test "$cross_compiling" = yes; then :
29238  case "$host_os" in
29239                             # Guess yes on Linux systems.
29240            linux-* | linux) gl_cv_func_mkfifo_works="guessing yes" ;;
29241                             # Guess yes on glibc systems.
29242            *-gnu* | gnu*)   gl_cv_func_mkfifo_works="guessing yes" ;;
29243                             # If we don't know, obey --enable-cross-guesses.
29244            *)               gl_cv_func_mkfifo_works="$gl_cross_guess_normal" ;;
29245          esac
29246
29247else
29248  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29249/* end confdefs.h.  */
29250#include <sys/stat.h>
29251
29252int
29253main ()
29254{
29255int result = 0;
29256             if (!mkfifo ("conftest.tmp/", 0600))
29257               result |= 1;
29258#if HAVE_LSTAT
29259             if (!mkfifo ("conftest.lnk/", 0600))
29260               result |= 2;
29261#endif
29262             return result;
29263
29264  ;
29265  return 0;
29266}
29267_ACEOF
29268if ac_fn_c_try_run "$LINENO"; then :
29269  gl_cv_func_mkfifo_works=yes
29270else
29271  gl_cv_func_mkfifo_works=no
29272fi
29273rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29274  conftest.$ac_objext conftest.beam conftest.$ac_ext
29275fi
29276
29277       rm -f conftest.tmp conftest.lnk
29278fi
29279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkfifo_works" >&5
29280$as_echo "$gl_cv_func_mkfifo_works" >&6; }
29281    case "$gl_cv_func_mkfifo_works" in
29282      *yes) ;;
29283      *)
29284
29285$as_echo "#define MKFIFO_TRAILING_SLASH_BUG 1" >>confdefs.h
29286
29287        REPLACE_MKFIFO=1
29288        ;;
29289    esac
29290  fi
29291
29292  if test $HAVE_MKFIFO = 0 || test $REPLACE_MKFIFO = 1; then
29293
29294
29295
29296
29297
29298
29299
29300
29301  gl_LIBOBJS="$gl_LIBOBJS mkfifo.$ac_objext"
29302
29303  fi
29304
29305
29306
29307
29308
29309          GNULIB_MKFIFO=1
29310
29311
29312
29313
29314
29315$as_echo "#define GNULIB_TEST_MKFIFO 1" >>confdefs.h
29316
29317
29318
29319
29320
29321
29322
29323
29324
29325
29326
29327  if test $ac_cv_func_mkfifoat = yes; then
29328        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkfifoat rejects trailing slashes" >&5
29329$as_echo_n "checking whether mkfifoat rejects trailing slashes... " >&6; }
29330if ${gl_cv_func_mkfifoat_works+:} false; then :
29331  $as_echo_n "(cached) " >&6
29332else
29333  rm -f conftest.tmp
29334       if test "$cross_compiling" = yes; then :
29335  case "$host_os" in
29336                             # Guess yes on Linux systems.
29337            linux-* | linux) gl_cv_func_mkfifoat_works="guessing yes" ;;
29338                             # Guess yes on glibc systems.
29339            *-gnu* | gnu*)   gl_cv_func_mkfifoat_works="guessing yes" ;;
29340                             # Guess no on AIX systems.
29341            aix*)            gl_cv_func_mkfifoat_works="guessing no" ;;
29342                             # If we don't know, obey --enable-cross-guesses.
29343            *)               gl_cv_func_mkfifoat_works="$gl_cross_guess_normal" ;;
29344          esac
29345
29346else
29347  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29348/* end confdefs.h.  */
29349#include <fcntl.h>
29350              #include <sys/stat.h>
29351
29352int
29353main ()
29354{
29355int result = 0;
29356              if (!mkfifoat (AT_FDCWD, "conftest.tmp/", 0600))
29357                result |= 1;
29358              return result;
29359
29360  ;
29361  return 0;
29362}
29363
29364_ACEOF
29365if ac_fn_c_try_run "$LINENO"; then :
29366  gl_cv_func_mkfifoat_works=yes
29367else
29368  gl_cv_func_mkfifoat_works=no
29369fi
29370rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29371  conftest.$ac_objext conftest.beam conftest.$ac_ext
29372fi
29373
29374       rm -f conftest.tmp
29375
29376fi
29377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkfifoat_works" >&5
29378$as_echo "$gl_cv_func_mkfifoat_works" >&6; }
29379    case "$gl_cv_func_mkfifoat_works" in
29380      *yes) ;;
29381      *)
29382        REPLACE_MKFIFOAT=1
29383                REPLACE_MKNODAT=1
29384        ;;
29385    esac
29386  else
29387    # No known system has mkfifoat but not mknodat
29388    HAVE_MKFIFOAT=0
29389    HAVE_MKNODAT=0
29390  fi
29391
29392  if test $HAVE_MKFIFOAT = 0 || test $REPLACE_MKFIFOAT = 1; then
29393
29394
29395
29396
29397
29398
29399
29400
29401  gl_LIBOBJS="$gl_LIBOBJS mkfifoat.$ac_objext"
29402
29403  fi
29404  if test $HAVE_MKNODAT = 0 || test $REPLACE_MKNODAT = 1; then
29405
29406
29407
29408
29409
29410
29411
29412
29413  gl_LIBOBJS="$gl_LIBOBJS mknodat.$ac_objext"
29414
29415  fi
29416
29417
29418
29419
29420
29421          GNULIB_MKFIFOAT=1
29422
29423
29424
29425
29426
29427$as_echo "#define GNULIB_TEST_MKFIFOAT 1" >>confdefs.h
29428
29429
29430
29431
29432
29433
29434
29435
29436          GNULIB_MKNODAT=1
29437
29438
29439
29440
29441
29442$as_echo "#define GNULIB_TEST_MKNODAT 1" >>confdefs.h
29443
29444
29445
29446
29447
29448
29449
29450
29451  if test $ac_cv_func_mknod = no; then
29452    HAVE_MKNOD=0
29453  else
29454        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mknod can create fifo without root privileges" >&5
29455$as_echo_n "checking whether mknod can create fifo without root privileges... " >&6; }
29456if ${gl_cv_func_mknod_works+:} false; then :
29457  $as_echo_n "(cached) " >&6
29458else
29459  if test "$cross_compiling" = yes; then :
29460  case "$host_os" in
29461                             # Guess yes on Linux systems.
29462            linux-* | linux) gl_cv_func_mknod_works="guessing yes" ;;
29463                             # Guess yes on glibc systems.
29464            *-gnu* | gnu*)   gl_cv_func_mknod_works="guessing yes" ;;
29465                             # If we don't know, obey --enable-cross-guesses.
29466            *)               gl_cv_func_mknod_works="$gl_cross_guess_normal" ;;
29467          esac
29468
29469else
29470  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29471/* end confdefs.h.  */
29472#include <sys/stat.h>
29473             #include <unistd.h>
29474
29475             /* Copied from root-uid.h.  FIXME: Just use root-uid.h.  */
29476             #ifdef __TANDEM
29477             # define ROOT_UID 65535
29478             #else
29479             # define ROOT_UID 0
29480             #endif
29481
29482int
29483main ()
29484{
29485/* Indeterminate for super-user, assume no.  Why are you running
29486         configure as root, anyway?  */
29487      if (geteuid () == ROOT_UID) return 99;
29488      if (mknod ("conftest.fifo", S_IFIFO | 0600, 0)) return 2;
29489  ;
29490  return 0;
29491}
29492_ACEOF
29493if ac_fn_c_try_run "$LINENO"; then :
29494  gl_cv_func_mknod_works=yes
29495else
29496  if test $? = 99 && test x"$FORCE_UNSAFE_CONFIGURE" = x; then
29497            { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29498$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29499as_fn_error $? "you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check)
29500See \`config.log' for more details" "$LINENO" 5; }
29501          fi
29502          gl_cv_func_mknod_works=no
29503fi
29504rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29505  conftest.$ac_objext conftest.beam conftest.$ac_ext
29506fi
29507
29508       rm -f conftest.fifo
29509fi
29510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mknod_works" >&5
29511$as_echo "$gl_cv_func_mknod_works" >&6; }
29512    case "$gl_cv_func_mknod_works" in
29513      *yes) ;;
29514      *)
29515        REPLACE_MKNOD=1
29516
29517$as_echo "#define MKNOD_FIFO_BUG 1" >>confdefs.h
29518
29519        ;;
29520    esac
29521        if test $REPLACE_MKFIFO = 1; then
29522      REPLACE_MKNOD=1
29523    fi
29524  fi
29525
29526  if test $HAVE_MKNOD = 0 || test $REPLACE_MKNOD = 1; then
29527
29528
29529
29530
29531
29532
29533
29534
29535  gl_LIBOBJS="$gl_LIBOBJS mknod.$ac_objext"
29536
29537  fi
29538
29539
29540
29541
29542
29543          GNULIB_MKNOD=1
29544
29545
29546
29547
29548
29549$as_echo "#define GNULIB_TEST_MKNOD 1" >>confdefs.h
29550
29551
29552
29553
29554
29555
29556
29557
29558  REPLACE_MKTIME=0
29559  if test "$gl_cv_func_working_mktime" != yes; then
29560    REPLACE_MKTIME=1
29561
29562$as_echo "#define NEED_MKTIME_WORKING 1" >>confdefs.h
29563
29564  fi
29565  case "$host_os" in
29566    mingw*)
29567      REPLACE_MKTIME=1
29568
29569$as_echo "#define NEED_MKTIME_WINDOWS 1" >>confdefs.h
29570
29571      ;;
29572  esac
29573
29574  if test $REPLACE_MKTIME = 1; then
29575
29576
29577
29578
29579
29580
29581
29582
29583  gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
29584
29585    :
29586  fi
29587
29588
29589
29590
29591
29592          GNULIB_MKTIME=1
29593
29594
29595
29596
29597
29598$as_echo "#define GNULIB_TEST_MKTIME 1" >>confdefs.h
29599
29600
29601
29602
29603
29604
29605  WANT_MKTIME_INTERNAL=0
29606    ac_fn_c_check_func "$LINENO" "__mktime_internal" "ac_cv_func___mktime_internal"
29607if test "x$ac_cv_func___mktime_internal" = xyes; then :
29608
29609$as_echo "#define mktime_internal __mktime_internal" >>confdefs.h
29610
29611
29612else
29613            WANT_MKTIME_INTERNAL=1
29614
29615$as_echo "#define NEED_MKTIME_INTERNAL 1" >>confdefs.h
29616
29617
29618fi
29619
29620
29621  if test $WANT_MKTIME_INTERNAL = 1; then
29622
29623
29624
29625
29626
29627
29628
29629
29630  gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
29631
29632    :
29633  fi
29634
29635  :
29636
29637
29638  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
29639
29640
29641
29642
29643
29644
29645
29646
29647  gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
29648
29649  fi
29650
29651  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
29652
29653
29654
29655
29656
29657
29658
29659
29660  gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
29661
29662  fi
29663
29664
29665cat >>confdefs.h <<_ACEOF
29666#define GNULIB_MSVC_NOTHROW 1
29667_ACEOF
29668
29669
29670
29671
29672
29673
29674
29675
29676
29677
29678
29679  if test $ac_cv_func_nl_langinfo = yes; then
29680    # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
29681    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
29682$as_echo_n "checking whether YESEXPR works... " >&6; }
29683if ${gl_cv_func_nl_langinfo_yesexpr_works+:} false; then :
29684  $as_echo_n "(cached) " >&6
29685else
29686  if test "$cross_compiling" = yes; then :
29687
29688         case "$host_os" in
29689                   # Guess no on irix systems.
29690           irix*)  gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
29691                   # Guess yes elsewhere.
29692           *)      gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
29693         esac
29694
29695else
29696  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29697/* end confdefs.h.  */
29698#include <langinfo.h>
29699
29700int
29701main ()
29702{
29703return !*nl_langinfo(YESEXPR);
29704
29705  ;
29706  return 0;
29707}
29708_ACEOF
29709if ac_fn_c_try_run "$LINENO"; then :
29710  gl_cv_func_nl_langinfo_yesexpr_works=yes
29711else
29712  gl_cv_func_nl_langinfo_yesexpr_works=no
29713fi
29714rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29715  conftest.$ac_objext conftest.beam conftest.$ac_ext
29716fi
29717
29718
29719fi
29720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
29721$as_echo "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
29722    case $gl_cv_func_nl_langinfo_yesexpr_works in
29723      *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
29724      *)    FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
29725    esac
29726
29727cat >>confdefs.h <<_ACEOF
29728#define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS
29729_ACEOF
29730
29731    # On Solaris 10 and Solaris 11.3, nl_langinfo is not multithread-safe.
29732    case "$host_os" in
29733      solaris*) NL_LANGINFO_MTSAFE=0 ;;
29734      *)        NL_LANGINFO_MTSAFE=1 ;;
29735    esac
29736
29737cat >>confdefs.h <<_ACEOF
29738#define NL_LANGINFO_MTSAFE $NL_LANGINFO_MTSAFE
29739_ACEOF
29740
29741    if test $HAVE_LANGINFO_CODESET = 1 \
29742       && test $HAVE_LANGINFO_T_FMT_AMPM = 1 \
29743       && test $HAVE_LANGINFO_ALTMON = 1 \
29744       && test $HAVE_LANGINFO_ERA = 1 \
29745       && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1 \
29746       && test $NL_LANGINFO_MTSAFE = 1; then
29747      :
29748    else
29749      REPLACE_NL_LANGINFO=1
29750
29751$as_echo "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
29752
29753    fi
29754  else
29755    HAVE_NL_LANGINFO=0
29756  fi
29757  if test $HAVE_NL_LANGINFO = 0 || test $HAVE_LANGINFO_CODESET = 0; then
29758    LIB_NL_LANGINFO="$LIB_SETLOCALE_NULL"
29759  else
29760    LIB_NL_LANGINFO=
29761  fi
29762
29763
29764  if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
29765
29766
29767
29768
29769
29770
29771
29772
29773  gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext"
29774
29775  fi
29776  if test $REPLACE_NL_LANGINFO = 1 && test $NL_LANGINFO_MTSAFE = 0; then
29777
29778
29779
29780
29781
29782
29783
29784
29785  gl_LIBOBJS="$gl_LIBOBJS nl_langinfo-lock.$ac_objext"
29786
29787
29788
29789
29790  CFLAG_VISIBILITY=
29791  HAVE_VISIBILITY=0
29792  if test -n "$GCC"; then
29793                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
29794$as_echo_n "checking whether the -Werror option is usable... " >&6; }
29795if ${gl_cv_cc_vis_werror+:} false; then :
29796  $as_echo_n "(cached) " >&6
29797else
29798  gl_save_CFLAGS="$CFLAGS"
29799       CFLAGS="$CFLAGS -Werror"
29800       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29801/* end confdefs.h.  */
29802
29803int
29804main ()
29805{
29806
29807  ;
29808  return 0;
29809}
29810_ACEOF
29811if ac_fn_c_try_compile "$LINENO"; then :
29812  gl_cv_cc_vis_werror=yes
29813else
29814  gl_cv_cc_vis_werror=no
29815fi
29816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29817       CFLAGS="$gl_save_CFLAGS"
29818
29819fi
29820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
29821$as_echo "$gl_cv_cc_vis_werror" >&6; }
29822        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
29823$as_echo_n "checking for simple visibility declarations... " >&6; }
29824if ${gl_cv_cc_visibility+:} false; then :
29825  $as_echo_n "(cached) " >&6
29826else
29827  gl_save_CFLAGS="$CFLAGS"
29828       CFLAGS="$CFLAGS -fvisibility=hidden"
29829                                          if test $gl_cv_cc_vis_werror = yes; then
29830         CFLAGS="$CFLAGS -Werror"
29831       fi
29832       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29833/* end confdefs.h.  */
29834extern __attribute__((__visibility__("hidden"))) int hiddenvar;
29835              extern __attribute__((__visibility__("default"))) int exportedvar;
29836              extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
29837              extern __attribute__((__visibility__("default"))) int exportedfunc (void);
29838              void dummyfunc (void) {}
29839
29840int
29841main ()
29842{
29843
29844  ;
29845  return 0;
29846}
29847_ACEOF
29848if ac_fn_c_try_compile "$LINENO"; then :
29849  gl_cv_cc_visibility=yes
29850else
29851  gl_cv_cc_visibility=no
29852fi
29853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29854       CFLAGS="$gl_save_CFLAGS"
29855
29856fi
29857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
29858$as_echo "$gl_cv_cc_visibility" >&6; }
29859    if test $gl_cv_cc_visibility = yes; then
29860      CFLAG_VISIBILITY="-fvisibility=hidden"
29861      HAVE_VISIBILITY=1
29862    fi
29863  fi
29864
29865
29866
29867cat >>confdefs.h <<_ACEOF
29868#define HAVE_VISIBILITY $HAVE_VISIBILITY
29869_ACEOF
29870
29871
29872
29873  fi
29874
29875
29876
29877
29878
29879          GNULIB_NL_LANGINFO=1
29880
29881
29882
29883
29884
29885$as_echo "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
29886
29887
29888
29889
29890
29891
29892 # This defines (or not) HAVE_TZNAME and HAVE_STRUCT_TM_TM_ZONE.
29893
29894
29895
29896
29897
29898$as_echo "#define my_strftime nstrftime" >>confdefs.h
29899
29900
29901
29902
29903
29904
29905
29906
29907
29908
29909
29910
29911
29912
29913   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for obstacks that work with any size object" >&5
29914$as_echo_n "checking for obstacks that work with any size object... " >&6; }
29915if ${ac_cv_func_obstack+:} false; then :
29916  $as_echo_n "(cached) " >&6
29917else
29918  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29919/* end confdefs.h.  */
29920#include "obstack.h"
29921             void *obstack_chunk_alloc (size_t n) { return 0; }
29922             void obstack_chunk_free (void *p) { }
29923             /* Check that an internal function returns size_t, not int.  */
29924             size_t _obstack_memory_used (struct obstack *);
29925
29926int
29927main ()
29928{
29929struct obstack mem;
29930             obstack_init (&mem);
29931             obstack_free (&mem, 0);
29932
29933  ;
29934  return 0;
29935}
29936_ACEOF
29937if ac_fn_c_try_link "$LINENO"; then :
29938  ac_cv_func_obstack=yes
29939else
29940  ac_cv_func_obstack=no
29941fi
29942rm -f core conftest.err conftest.$ac_objext \
29943    conftest$ac_exeext conftest.$ac_ext
29944fi
29945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_obstack" >&5
29946$as_echo "$ac_cv_func_obstack" >&6; }
29947   if test "$ac_cv_func_obstack" = yes; then
29948
29949$as_echo "#define HAVE_OBSTACK 1" >>confdefs.h
29950
29951   else
29952
29953
29954
29955
29956
29957
29958
29959
29960  gl_LIBOBJS="$gl_LIBOBJS obstack.$ac_objext"
29961
29962   fi
29963
29964
29965
29966
29967  case "$host_os" in
29968    mingw* | pw*)
29969      REPLACE_OPEN=1
29970      ;;
29971    *)
29972
29973      if test "$gl_cv_macro_O_CLOEXEC" != yes; then
29974        REPLACE_OPEN=1
29975      fi
29976
29977
29978  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
29979$as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
29980if ${gl_cv_func_open_slash+:} false; then :
29981  $as_echo_n "(cached) " >&6
29982else
29983  # Assume that if we have lstat, we can also check symlinks.
29984     if test $ac_cv_func_lstat = yes; then
29985       touch conftest.tmp
29986       ln -s conftest.tmp conftest.lnk
29987     fi
29988     if test "$cross_compiling" = yes; then :
29989
29990        case "$host_os" in
29991          freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
29992            gl_cv_func_open_slash="guessing no" ;;
29993          *)
29994            gl_cv_func_open_slash="guessing yes" ;;
29995        esac
29996
29997else
29998  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29999/* end confdefs.h.  */
30000
30001#include <fcntl.h>
30002#if HAVE_UNISTD_H
30003# include <unistd.h>
30004#endif
30005
30006
30007$gl_mda_defines
30008
30009int main ()
30010{
30011  int result = 0;
30012#if HAVE_LSTAT
30013  if (open ("conftest.lnk/", O_RDONLY) != -1)
30014    result |= 1;
30015#endif
30016  if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
30017    result |= 2;
30018  return result;
30019}
30020_ACEOF
30021if ac_fn_c_try_run "$LINENO"; then :
30022  gl_cv_func_open_slash=yes
30023else
30024  gl_cv_func_open_slash=no
30025fi
30026rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30027  conftest.$ac_objext conftest.beam conftest.$ac_ext
30028fi
30029
30030     rm -f conftest.sl conftest.tmp conftest.lnk
30031
30032fi
30033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
30034$as_echo "$gl_cv_func_open_slash" >&6; }
30035  case "$gl_cv_func_open_slash" in
30036    *no)
30037
30038$as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
30039
30040      ;;
30041  esac
30042
30043      case "$gl_cv_func_open_slash" in
30044        *no)
30045          REPLACE_OPEN=1
30046          ;;
30047      esac
30048      ;;
30049  esac
30050
30051    if test $REPLACE_OPEN = 0; then
30052
30053
30054
30055  if test $ac_cv_func_fchdir = no; then
30056    HAVE_FCHDIR=0
30057  fi
30058
30059      if test $HAVE_FCHDIR = 0; then
30060        REPLACE_OPEN=1
30061      fi
30062    fi
30063
30064
30065
30066  if test $REPLACE_OPEN = 1; then
30067
30068
30069
30070
30071
30072
30073
30074
30075  gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
30076
30077
30078
30079  :
30080
30081  fi
30082
30083
30084
30085
30086
30087          GNULIB_OPEN=1
30088
30089
30090
30091
30092
30093$as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
30094
30095
30096
30097
30098
30099
30100
30101
30102
30103  case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink+$gl_cv_macro_O_CLOEXEC in
30104  yes+*yes+yes)
30105    ;;
30106  yes+*)
30107    # Solaris 10 lacks O_CLOEXEC.
30108    # Solaris 9 has *at functions, but uniformly mishandles trailing
30109    # slash in all of them.
30110    REPLACE_OPENAT=1
30111    ;;
30112  *)
30113    HAVE_OPENAT=0
30114    ;;
30115  esac
30116
30117  if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
30118
30119
30120
30121
30122
30123
30124
30125
30126  gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
30127
30128
30129
30130  :
30131
30132  fi
30133
30134
30135cat >>confdefs.h <<_ACEOF
30136#define GNULIB_OPENAT 1
30137_ACEOF
30138
30139
30140
30141
30142
30143
30144          GNULIB_OPENAT=1
30145
30146
30147
30148
30149
30150$as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
30151
30152
30153
30154
30155
30156
30157
30158
30159cat >>confdefs.h <<_ACEOF
30160#define GNULIB_OPENAT_SAFER 1
30161_ACEOF
30162
30163
30164
30165
30166
30167  for ac_func in opendir
30168do :
30169  ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
30170if test "x$ac_cv_func_opendir" = xyes; then :
30171  cat >>confdefs.h <<_ACEOF
30172#define HAVE_OPENDIR 1
30173_ACEOF
30174
30175fi
30176done
30177
30178  if test $ac_cv_func_opendir = no; then
30179    HAVE_OPENDIR=0
30180  fi
30181
30182
30183
30184
30185  if test $ac_cv_func_fchdir = no; then
30186    HAVE_FCHDIR=0
30187  fi
30188
30189    if test $HAVE_FCHDIR = 0; then
30190      if test $HAVE_OPENDIR = 1; then
30191        REPLACE_OPENDIR=1
30192      fi
30193    fi
30194
30195      case $host_os,$HAVE_OPENDIR in
30196    os2*,1)
30197      REPLACE_OPENDIR=1;;
30198  esac
30199
30200  if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
30201
30202
30203
30204
30205
30206
30207
30208
30209  gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
30210
30211  fi
30212
30213
30214
30215
30216
30217          GNULIB_OPENDIR=1
30218
30219
30220
30221
30222
30223$as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
30224
30225
30226
30227
30228
30229  for ac_prog in bison
30230do
30231  # Extract the first word of "$ac_prog", so it can be a program name with args.
30232set dummy $ac_prog; ac_word=$2
30233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30234$as_echo_n "checking for $ac_word... " >&6; }
30235if ${ac_cv_prog_PARSE_DATETIME_BISON+:} false; then :
30236  $as_echo_n "(cached) " >&6
30237else
30238  if test -n "$PARSE_DATETIME_BISON"; then
30239  ac_cv_prog_PARSE_DATETIME_BISON="$PARSE_DATETIME_BISON" # Let the user override the test.
30240else
30241as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30242for as_dir in $PATH
30243do
30244  IFS=$as_save_IFS
30245  test -z "$as_dir" && as_dir=.
30246    for ac_exec_ext in '' $ac_executable_extensions; do
30247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30248    ac_cv_prog_PARSE_DATETIME_BISON="$ac_prog"
30249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30250    break 2
30251  fi
30252done
30253  done
30254IFS=$as_save_IFS
30255
30256fi
30257fi
30258PARSE_DATETIME_BISON=$ac_cv_prog_PARSE_DATETIME_BISON
30259if test -n "$PARSE_DATETIME_BISON"; then
30260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PARSE_DATETIME_BISON" >&5
30261$as_echo "$PARSE_DATETIME_BISON" >&6; }
30262else
30263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30264$as_echo "no" >&6; }
30265fi
30266
30267
30268  test -n "$PARSE_DATETIME_BISON" && break
30269done
30270
30271  if test -z "$PARSE_DATETIME_BISON"; then
30272    ac_verc_fail=yes
30273  else
30274    cat >conftest.y <<_ACEOF
30275%require "2.4"
30276%%
30277exp:
30278_ACEOF
30279    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bison 2.4 or newer" >&5
30280$as_echo_n "checking for bison 2.4 or newer... " >&6; }
30281    ac_prog_version=`$PARSE_DATETIME_BISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
30282    : ${ac_prog_version:='v. ?.??'}
30283    if $PARSE_DATETIME_BISON conftest.y -o conftest.c 2>/dev/null; then
30284      ac_prog_version="$ac_prog_version, ok"
30285      ac_verc_fail=no
30286    else
30287      ac_prog_version="$ac_prog_version, bad"
30288      ac_verc_fail=yes
30289    fi
30290    rm -f conftest.y conftest.c
30291    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5
30292$as_echo "$ac_prog_version" >&6; }
30293  fi
30294  if test $ac_verc_fail = yes; then
30295    PARSE_DATETIME_BISON=:
30296  fi
30297
30298
30299
30300
30301
30302
30303
30304
30305
30306  ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
30307#include <$ac_cv_struct_tm>
30308
30309"
30310if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
30311
30312cat >>confdefs.h <<_ACEOF
30313#define HAVE_STRUCT_TM_TM_ZONE 1
30314_ACEOF
30315
30316
30317fi
30318
30319if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
30320
30321$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
30322
30323else
30324  ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
30325"
30326if test "x$ac_cv_have_decl_tzname" = xyes; then :
30327  ac_have_decl=1
30328else
30329  ac_have_decl=0
30330fi
30331
30332cat >>confdefs.h <<_ACEOF
30333#define HAVE_DECL_TZNAME $ac_have_decl
30334_ACEOF
30335
30336  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
30337$as_echo_n "checking for tzname... " >&6; }
30338if ${ac_cv_var_tzname+:} false; then :
30339  $as_echo_n "(cached) " >&6
30340else
30341  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30342/* end confdefs.h.  */
30343#include <time.h>
30344#if !HAVE_DECL_TZNAME
30345extern char *tzname[];
30346#endif
30347
30348int
30349main ()
30350{
30351return tzname[0][0];
30352  ;
30353  return 0;
30354}
30355_ACEOF
30356if ac_fn_c_try_link "$LINENO"; then :
30357  ac_cv_var_tzname=yes
30358else
30359  ac_cv_var_tzname=no
30360fi
30361rm -f core conftest.err conftest.$ac_objext \
30362    conftest$ac_exeext conftest.$ac_ext
30363fi
30364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
30365$as_echo "$ac_cv_var_tzname" >&6; }
30366  if test $ac_cv_var_tzname = yes; then
30367
30368$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
30369
30370  fi
30371fi
30372
30373
30374
30375
30376
30377
30378
30379
30380
30381
30382
30383  if test $ac_cv_func_pipe != yes; then
30384    HAVE_PIPE=0
30385  fi
30386
30387  if test $HAVE_PIPE = 0; then
30388
30389
30390
30391
30392
30393
30394
30395
30396  gl_LIBOBJS="$gl_LIBOBJS pipe.$ac_objext"
30397
30398  fi
30399
30400
30401
30402
30403
30404          GNULIB_PIPE=1
30405
30406
30407
30408
30409
30410$as_echo "#define GNULIB_TEST_PIPE 1" >>confdefs.h
30411
30412
30413
30414
30415  for ac_func in getppriv
30416do :
30417  ac_fn_c_check_func "$LINENO" "getppriv" "ac_cv_func_getppriv"
30418if test "x$ac_cv_func_getppriv" = xyes; then :
30419  cat >>confdefs.h <<_ACEOF
30420#define HAVE_GETPPRIV 1
30421_ACEOF
30422
30423fi
30424done
30425
30426
30427
30428  ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
30429"
30430if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
30431  ac_have_decl=1
30432else
30433  ac_have_decl=0
30434fi
30435
30436cat >>confdefs.h <<_ACEOF
30437#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
30438_ACEOF
30439
30440  ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
30441"
30442if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
30443  ac_have_decl=1
30444else
30445  ac_have_decl=0
30446fi
30447
30448cat >>confdefs.h <<_ACEOF
30449#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
30450_ACEOF
30451
30452
30453      :
30454
30455
30456
30457  :
30458
30459
30460
30461
30462  for ac_func in raise
30463do :
30464  ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
30465if test "x$ac_cv_func_raise" = xyes; then :
30466  cat >>confdefs.h <<_ACEOF
30467#define HAVE_RAISE 1
30468_ACEOF
30469
30470fi
30471done
30472
30473  if test $ac_cv_func_raise = no; then
30474    HAVE_RAISE=0
30475  else
30476
30477
30478      if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
30479        REPLACE_RAISE=1
30480      fi
30481
30482
30483  fi
30484
30485  if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
30486
30487
30488
30489
30490
30491
30492
30493
30494  gl_LIBOBJS="$gl_LIBOBJS raise.$ac_objext"
30495
30496    :
30497  fi
30498
30499
30500
30501
30502
30503          GNULIB_RAISE=1
30504
30505
30506
30507
30508
30509$as_echo "#define GNULIB_TEST_RAISE 1" >>confdefs.h
30510
30511
30512
30513
30514
30515
30516
30517  for ac_func in rawmemchr
30518do :
30519  ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
30520if test "x$ac_cv_func_rawmemchr" = xyes; then :
30521  cat >>confdefs.h <<_ACEOF
30522#define HAVE_RAWMEMCHR 1
30523_ACEOF
30524
30525fi
30526done
30527
30528  if test $ac_cv_func_rawmemchr = no; then
30529    HAVE_RAWMEMCHR=0
30530  fi
30531
30532  if test $HAVE_RAWMEMCHR = 0; then
30533
30534
30535
30536
30537
30538
30539
30540
30541  gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
30542
30543    :
30544  fi
30545
30546
30547
30548
30549
30550          GNULIB_RAWMEMCHR=1
30551
30552
30553
30554
30555
30556$as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
30557
30558
30559
30560
30561
30562
30563
30564    if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
30565      REPLACE_READ=1
30566    fi
30567
30568
30569
30570  if test $REPLACE_READ = 1; then
30571
30572
30573
30574
30575
30576
30577
30578
30579  gl_LIBOBJS="$gl_LIBOBJS read.$ac_objext"
30580
30581    :
30582  fi
30583
30584
30585
30586
30587
30588          GNULIB_READ=1
30589
30590
30591
30592
30593
30594$as_echo "#define GNULIB_TEST_READ 1" >>confdefs.h
30595
30596
30597
30598
30599
30600
30601  for ac_func in readdir
30602do :
30603  ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
30604if test "x$ac_cv_func_readdir" = xyes; then :
30605  cat >>confdefs.h <<_ACEOF
30606#define HAVE_READDIR 1
30607_ACEOF
30608
30609fi
30610done
30611
30612  if test $ac_cv_func_readdir = no; then
30613    HAVE_READDIR=0
30614  fi
30615
30616  if test $HAVE_READDIR = 0; then
30617
30618
30619
30620
30621
30622
30623
30624
30625  gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
30626
30627  fi
30628
30629
30630
30631
30632
30633          GNULIB_READDIR=1
30634
30635
30636
30637
30638
30639$as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
30640
30641
30642
30643
30644
30645
30646  if test $ac_cv_func_readlink = no; then
30647    HAVE_READLINK=0
30648  else
30649    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
30650$as_echo_n "checking whether readlink signature is correct... " >&6; }
30651if ${gl_cv_decl_readlink_works+:} false; then :
30652  $as_echo_n "(cached) " >&6
30653else
30654  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30655/* end confdefs.h.  */
30656#include <unistd.h>
30657      /* Cause compilation failure if original declaration has wrong type.  */
30658      ssize_t readlink (const char *, char *, size_t);
30659int
30660main ()
30661{
30662
30663  ;
30664  return 0;
30665}
30666_ACEOF
30667if ac_fn_c_try_compile "$LINENO"; then :
30668  gl_cv_decl_readlink_works=yes
30669else
30670  gl_cv_decl_readlink_works=no
30671fi
30672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30673fi
30674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
30675$as_echo "$gl_cv_decl_readlink_works" >&6; }
30676            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
30677$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
30678if ${gl_cv_func_readlink_trailing_slash+:} false; then :
30679  $as_echo_n "(cached) " >&6
30680else
30681  # We have readlink, so assume ln -s works.
30682       ln -s conftest.no-such conftest.link
30683       ln -s conftest.link conftest.lnk2
30684       if test "$cross_compiling" = yes; then :
30685  case "$host_os" in
30686            # Guess yes on Linux or glibc systems.
30687            linux-* | linux | *-gnu* | gnu*)
30688              gl_cv_func_readlink_trailing_slash="guessing yes" ;;
30689            # Guess no on AIX or HP-UX.
30690            aix* | hpux*)
30691              gl_cv_func_readlink_trailing_slash="guessing no" ;;
30692            # If we don't know, obey --enable-cross-guesses.
30693            *)
30694              gl_cv_func_readlink_trailing_slash="$gl_cross_guess_normal" ;;
30695          esac
30696
30697else
30698  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30699/* end confdefs.h.  */
30700#include <unistd.h>
30701
30702int
30703main ()
30704{
30705char buf[20];
30706      return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
30707  ;
30708  return 0;
30709}
30710_ACEOF
30711if ac_fn_c_try_run "$LINENO"; then :
30712  gl_cv_func_readlink_trailing_slash=yes
30713else
30714  gl_cv_func_readlink_trailing_slash=no
30715fi
30716rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30717  conftest.$ac_objext conftest.beam conftest.$ac_ext
30718fi
30719
30720      rm -f conftest.link conftest.lnk2
30721fi
30722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_trailing_slash" >&5
30723$as_echo "$gl_cv_func_readlink_trailing_slash" >&6; }
30724    case "$gl_cv_func_readlink_trailing_slash" in
30725      *yes)
30726        if test "$gl_cv_decl_readlink_works" != yes; then
30727          REPLACE_READLINK=1
30728        fi
30729        ;;
30730      *)
30731
30732$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
30733
30734        REPLACE_READLINK=1
30735        ;;
30736    esac
30737
30738    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink truncates results correctly" >&5
30739$as_echo_n "checking whether readlink truncates results correctly... " >&6; }
30740if ${gl_cv_func_readlink_truncate+:} false; then :
30741  $as_echo_n "(cached) " >&6
30742else
30743  # We have readlink, so assume ln -s works.
30744       ln -s ab conftest.link
30745       if test "$cross_compiling" = yes; then :
30746  case "$host_os" in
30747            # Guess yes on Linux or glibc systems.
30748            linux-* | linux | *-gnu* | gnu*)
30749              gl_cv_func_readlink_truncate="guessing yes" ;;
30750            # Guess no on AIX or HP-UX.
30751            aix* | hpux*)
30752              gl_cv_func_readlink_truncate="guessing no" ;;
30753            # If we don't know, obey --enable-cross-guesses.
30754            *)
30755              gl_cv_func_readlink_truncate="$gl_cross_guess_normal" ;;
30756          esac
30757
30758else
30759  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30760/* end confdefs.h.  */
30761#include <unistd.h>
30762
30763int
30764main ()
30765{
30766char c;
30767      return readlink ("conftest.link", &c, 1) != 1;
30768  ;
30769  return 0;
30770}
30771_ACEOF
30772if ac_fn_c_try_run "$LINENO"; then :
30773  gl_cv_func_readlink_truncate=yes
30774else
30775  gl_cv_func_readlink_truncate=no
30776fi
30777rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30778  conftest.$ac_objext conftest.beam conftest.$ac_ext
30779fi
30780
30781      rm -f conftest.link conftest.lnk2
30782fi
30783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_truncate" >&5
30784$as_echo "$gl_cv_func_readlink_truncate" >&6; }
30785    case $gl_cv_func_readlink_truncate in
30786      *yes)
30787        if test "$gl_cv_decl_readlink_works" != yes; then
30788          REPLACE_READLINK=1
30789        fi
30790        ;;
30791      *)
30792
30793$as_echo "#define READLINK_TRUNCATE_BUG 1" >>confdefs.h
30794
30795        REPLACE_READLINK=1
30796        ;;
30797    esac
30798  fi
30799
30800  if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
30801
30802
30803
30804
30805
30806
30807
30808
30809  gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
30810
30811
30812  :
30813
30814  fi
30815
30816
30817
30818
30819
30820          GNULIB_READLINK=1
30821
30822
30823
30824
30825
30826$as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
30827
30828
30829
30830
30831
30832
30833
30834
30835  if test $ac_cv_func_readlinkat = no; then
30836    HAVE_READLINKAT=0
30837  else
30838    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlinkat signature is correct" >&5
30839$as_echo_n "checking whether readlinkat signature is correct... " >&6; }
30840if ${gl_cv_decl_readlinkat_works+:} false; then :
30841  $as_echo_n "(cached) " >&6
30842else
30843  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30844/* end confdefs.h.  */
30845#include <unistd.h>
30846             /* Check whether original declaration has correct type.  */
30847             ssize_t readlinkat (int, char const *, char *, size_t);
30848int
30849main ()
30850{
30851
30852  ;
30853  return 0;
30854}
30855_ACEOF
30856if ac_fn_c_try_compile "$LINENO"; then :
30857  gl_cv_decl_readlinkat_works=yes
30858else
30859  gl_cv_decl_readlinkat_works=no
30860fi
30861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30862fi
30863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlinkat_works" >&5
30864$as_echo "$gl_cv_decl_readlinkat_works" >&6; }
30865    # Assume readlinkat has the same bugs as readlink,
30866    # as is the case on OS X 10.10 with trailing slashes.
30867    case $gl_cv_decl_readlinkat_works,$gl_cv_func_readlink_trailing_slash,$gl_cv_func_readlink_truncate in
30868      *yes,*yes,*yes)
30869        ;;
30870      *)
30871        REPLACE_READLINKAT=1
30872        ;;
30873    esac
30874  fi
30875
30876  if test $HAVE_READLINKAT = 0 || test $REPLACE_READLINKAT = 1; then
30877
30878
30879
30880
30881
30882
30883
30884
30885  gl_LIBOBJS="$gl_LIBOBJS readlinkat.$ac_objext"
30886
30887  fi
30888
30889
30890
30891
30892
30893          GNULIB_READLINKAT=1
30894
30895
30896
30897
30898
30899$as_echo "#define GNULIB_TEST_READLINKAT 1" >>confdefs.h
30900
30901
30902
30903
30904
30905
30906  if test $gl_cv_func_malloc_posix = yes; then
30907
30908$as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
30909
30910  else
30911    REPLACE_REALLOC=1
30912  fi
30913
30914  if test $REPLACE_REALLOC = 1; then
30915
30916
30917
30918
30919
30920
30921
30922
30923  gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
30924
30925  fi
30926
30927
30928
30929
30930
30931          GNULIB_REALLOC_POSIX=1
30932
30933
30934
30935
30936
30937$as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
30938
30939
30940
30941
30942
30943# Check whether --with-included-regex was given.
30944if test "${with_included_regex+set}" = set; then :
30945  withval=$with_included_regex;
30946fi
30947
30948
30949  case $with_included_regex in #(
30950  yes|no) ac_use_included_regex=$with_included_regex
30951        ;;
30952  '')
30953    # If the system regex support is good enough that it passes the
30954    # following run test, then default to *not* using the included regex.c.
30955    # If cross compiling, assume the test would fail and use the included
30956    # regex.c.
30957
30958
30959    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
30960$as_echo_n "checking for working re_compile_pattern... " >&6; }
30961if ${gl_cv_func_re_compile_pattern_working+:} false; then :
30962  $as_echo_n "(cached) " >&6
30963else
30964  if test "$cross_compiling" = yes; then :
30965  case "$host_os" in
30966                   # Guess no on native Windows.
30967           mingw*) gl_cv_func_re_compile_pattern_working="guessing no" ;;
30968                   # Otherwise obey --enable-cross-guesses.
30969           *)      gl_cv_func_re_compile_pattern_working="$gl_cross_guess_normal" ;;
30970         esac
30971
30972else
30973  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30974/* end confdefs.h.  */
30975#include <regex.h>
30976
30977            #include <locale.h>
30978            #include <limits.h>
30979            #include <string.h>
30980
30981            #if defined M_CHECK_ACTION || HAVE_DECL_ALARM
30982            # include <signal.h>
30983            # include <unistd.h>
30984            #endif
30985
30986            #if HAVE_MALLOC_H
30987            # include <malloc.h>
30988            #endif
30989
30990            #ifdef M_CHECK_ACTION
30991            /* Exit with distinguishable exit code.  */
30992            static void sigabrt_no_core (int sig) { raise (SIGTERM); }
30993            #endif
30994
30995int
30996main ()
30997{
30998int result = 0;
30999            static struct re_pattern_buffer regex;
31000            unsigned char folded_chars[UCHAR_MAX + 1];
31001            int i;
31002            const char *s;
31003            struct re_registers regs;
31004
31005            /* Some builds of glibc go into an infinite loop on this
31006               test.  Use alarm to force death, and mallopt to avoid
31007               malloc recursion in diagnosing the corrupted heap. */
31008#if HAVE_DECL_ALARM
31009            signal (SIGALRM, SIG_DFL);
31010            alarm (2);
31011#endif
31012#ifdef M_CHECK_ACTION
31013            signal (SIGABRT, sigabrt_no_core);
31014            mallopt (M_CHECK_ACTION, 2);
31015#endif
31016
31017            if (setlocale (LC_ALL, "en_US.UTF-8"))
31018              {
31019                {
31020                  /* https://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
31021                     This test needs valgrind to catch the bug on Debian
31022                     GNU/Linux 3.1 x86, but it might catch the bug better
31023                     on other platforms and it shouldn't hurt to try the
31024                     test here.  */
31025                  static char const pat[] = "insert into";
31026                  static char const data[] =
31027                    "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
31028                  re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
31029                                 | RE_ICASE);
31030                  memset (&regex, 0, sizeof regex);
31031                  s = re_compile_pattern (pat, sizeof pat - 1, &regex);
31032                  if (s)
31033                    result |= 1;
31034                  else
31035                    {
31036                      if (re_search (&regex, data, sizeof data - 1,
31037                                     0, sizeof data - 1, &regs)
31038                          != -1)
31039                        result |= 1;
31040                      regfree (&regex);
31041                    }
31042                }
31043
31044                {
31045                  /* This test is from glibc bug 15078.
31046                     The test case is from Andreas Schwab in
31047                     <https://sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
31048                     */
31049                  static char const pat[] = "[^x]x";
31050                  static char const data[] =
31051                    /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
31052                    "\xe1\x80\x80"
31053                    "\xe1\x80\xbb"
31054                    "\xe1\x80\xbd"
31055                    "\xe1\x80\x94"
31056                    "\xe1\x80\xba"
31057                    "\xe1\x80\xaf"
31058                    "\xe1\x80\x95"
31059                    "\xe1\x80\xba"
31060                    "x";
31061                  re_set_syntax (0);
31062                  memset (&regex, 0, sizeof regex);
31063                  s = re_compile_pattern (pat, sizeof pat - 1, &regex);
31064                  if (s)
31065                    result |= 1;
31066                  else
31067                    {
31068                      i = re_search (&regex, data, sizeof data - 1,
31069                                     0, sizeof data - 1, 0);
31070                      if (i != 0 && i != 21)
31071                        result |= 1;
31072                      regfree (&regex);
31073                    }
31074                }
31075
31076                if (! setlocale (LC_ALL, "C"))
31077                  return 1;
31078              }
31079
31080            /* This test is from glibc bug 3957, reported by Andrew Mackey.  */
31081            re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
31082            memset (&regex, 0, sizeof regex);
31083            s = re_compile_pattern ("a[^x]b", 6, &regex);
31084            if (s)
31085              result |= 2;
31086            else
31087              {
31088                /* This should fail, but succeeds for glibc-2.5.  */
31089                if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
31090                  result |= 2;
31091                regfree (&regex);
31092              }
31093
31094            /* This regular expression is from Spencer ere test number 75
31095               in grep-2.3.  */
31096            re_set_syntax (RE_SYNTAX_POSIX_EGREP);
31097            memset (&regex, 0, sizeof regex);
31098            for (i = 0; i <= UCHAR_MAX; i++)
31099              folded_chars[i] = i;
31100            regex.translate = folded_chars;
31101            s = re_compile_pattern ("a[[:]:]]b\n", 11, &regex);
31102            /* This should fail with _Invalid character class name_ error.  */
31103            if (!s)
31104              {
31105                result |= 4;
31106                regfree (&regex);
31107              }
31108
31109            /* Ensure that [b-a] is diagnosed as invalid, when
31110               using RE_NO_EMPTY_RANGES. */
31111            re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
31112            memset (&regex, 0, sizeof regex);
31113            s = re_compile_pattern ("a[b-a]", 6, &regex);
31114            if (s == 0)
31115              {
31116                result |= 8;
31117                regfree (&regex);
31118              }
31119
31120            /* This should succeed, but does not for glibc-2.1.3.  */
31121            memset (&regex, 0, sizeof regex);
31122            s = re_compile_pattern ("{1", 2, &regex);
31123            if (s)
31124              result |= 8;
31125            else
31126              regfree (&regex);
31127
31128            /* The following example is derived from a problem report
31129               against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>.  */
31130            memset (&regex, 0, sizeof regex);
31131            s = re_compile_pattern ("[an\371]*n", 7, &regex);
31132            if (s)
31133              result |= 8;
31134            else
31135              {
31136                /* This should match, but does not for glibc-2.2.1.  */
31137                if (re_match (&regex, "an", 2, 0, &regs) != 2)
31138                  result |= 8;
31139                else
31140                  {
31141                    free (regs.start);
31142                    free (regs.end);
31143                  }
31144                regfree (&regex);
31145              }
31146
31147            memset (&regex, 0, sizeof regex);
31148            s = re_compile_pattern ("x", 1, &regex);
31149            if (s)
31150              result |= 8;
31151            else
31152              {
31153                /* glibc-2.2.93 does not work with a negative RANGE argument.  */
31154                if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
31155                  result |= 8;
31156                else
31157                  {
31158                    free (regs.start);
31159                    free (regs.end);
31160                  }
31161                regfree (&regex);
31162              }
31163
31164            /* The version of regex.c in older versions of gnulib
31165               ignored RE_ICASE.  Detect that problem too.  */
31166            re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
31167            memset (&regex, 0, sizeof regex);
31168            s = re_compile_pattern ("x", 1, &regex);
31169            if (s)
31170              result |= 16;
31171            else
31172              {
31173                if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
31174                  result |= 16;
31175                else
31176                  {
31177                    free (regs.start);
31178                    free (regs.end);
31179                  }
31180                regfree (&regex);
31181              }
31182
31183            /* Catch a bug reported by Vin Shelton in
31184               https://lists.gnu.org/r/bug-coreutils/2007-06/msg00089.html
31185               */
31186            re_set_syntax (RE_SYNTAX_POSIX_BASIC
31187                           & ~RE_CONTEXT_INVALID_DUP
31188                           & ~RE_NO_EMPTY_RANGES);
31189            memset (&regex, 0, sizeof regex);
31190            s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
31191            if (s)
31192              result |= 32;
31193            else
31194              regfree (&regex);
31195
31196            /* REG_STARTEND was added to glibc on 2004-01-15.
31197               Reject older versions.  */
31198            if (! REG_STARTEND)
31199              result |= 64;
31200
31201            /* Matching with the compiled form of this regexp would provoke
31202               an assertion failure prior to glibc-2.28:
31203                 regexec.c:1375: pop_fail_stack: Assertion 'num >= 0' failed
31204               With glibc-2.28, compilation fails and reports the invalid
31205               back reference.  */
31206            re_set_syntax (RE_SYNTAX_POSIX_EGREP);
31207            memset (&regex, 0, sizeof regex);
31208            s = re_compile_pattern ("0|()0|\\1|0", 10, &regex);
31209            if (!s)
31210              result |= 64;
31211            else
31212              {
31213                if (strcmp (s, "Invalid back reference"))
31214                  result |= 64;
31215                regfree (&regex);
31216              }
31217
31218#if 0
31219            /* It would be nice to reject hosts whose regoff_t values are too
31220               narrow (including glibc on hosts with 64-bit ptrdiff_t and
31221               32-bit int), but we should wait until glibc implements this
31222               feature.  Otherwise, support for equivalence classes and
31223               multibyte collation symbols would always be broken except
31224               when compiling --without-included-regex.   */
31225            if (sizeof (regoff_t) < sizeof (ptrdiff_t)
31226                || sizeof (regoff_t) < sizeof (ssize_t))
31227              result |= 64;
31228#endif
31229
31230            return result;
31231
31232  ;
31233  return 0;
31234}
31235_ACEOF
31236if ac_fn_c_try_run "$LINENO"; then :
31237  gl_cv_func_re_compile_pattern_working=yes
31238else
31239  gl_cv_func_re_compile_pattern_working=no
31240fi
31241rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31242  conftest.$ac_objext conftest.beam conftest.$ac_ext
31243fi
31244
31245
31246fi
31247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
31248$as_echo "$gl_cv_func_re_compile_pattern_working" >&6; }
31249    case "$gl_cv_func_re_compile_pattern_working" in #(
31250      *yes) ac_use_included_regex=no;; #(
31251      *no) ac_use_included_regex=yes;;
31252    esac
31253    ;;
31254  *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
31255    ;;
31256  esac
31257
31258  if test $ac_use_included_regex = yes; then
31259
31260$as_echo "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
31261
31262
31263$as_echo "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
31264
31265
31266$as_echo "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
31267
31268
31269$as_echo "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
31270
31271
31272$as_echo "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
31273
31274
31275$as_echo "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
31276
31277
31278$as_echo "#define re_search rpl_re_search" >>confdefs.h
31279
31280
31281$as_echo "#define re_search_2 rpl_re_search_2" >>confdefs.h
31282
31283
31284$as_echo "#define re_match rpl_re_match" >>confdefs.h
31285
31286
31287$as_echo "#define re_match_2 rpl_re_match_2" >>confdefs.h
31288
31289
31290$as_echo "#define re_set_registers rpl_re_set_registers" >>confdefs.h
31291
31292
31293$as_echo "#define re_comp rpl_re_comp" >>confdefs.h
31294
31295
31296$as_echo "#define re_exec rpl_re_exec" >>confdefs.h
31297
31298
31299$as_echo "#define regcomp rpl_regcomp" >>confdefs.h
31300
31301
31302$as_echo "#define regexec rpl_regexec" >>confdefs.h
31303
31304
31305$as_echo "#define regerror rpl_regerror" >>confdefs.h
31306
31307
31308$as_echo "#define regfree rpl_regfree" >>confdefs.h
31309
31310  fi
31311
31312  if test $ac_use_included_regex = yes; then
31313
31314
31315
31316
31317
31318
31319
31320
31321  gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext"
31322
31323
31324
31325
31326
31327
31328
31329  for ac_header in libintl.h
31330do :
31331  ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
31332if test "x$ac_cv_header_libintl_h" = xyes; then :
31333  cat >>confdefs.h <<_ACEOF
31334#define HAVE_LIBINTL_H 1
31335_ACEOF
31336
31337fi
31338
31339done
31340
31341
31342  ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
31343"
31344if test "x$ac_cv_have_decl_isblank" = xyes; then :
31345  ac_have_decl=1
31346else
31347  ac_have_decl=0
31348fi
31349
31350cat >>confdefs.h <<_ACEOF
31351#define HAVE_DECL_ISBLANK $ac_have_decl
31352_ACEOF
31353
31354
31355  fi
31356
31357
31358
31359
31360
31361                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
31362$as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
31363if ${gl_cv_func_rename_slash_dst_works+:} false; then :
31364  $as_echo_n "(cached) " >&6
31365else
31366  rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
31367    touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
31368      as_fn_error $? "cannot create temporary files" "$LINENO" 5
31369    # Assume that if we have lstat, we can also check symlinks.
31370    if test $ac_cv_func_lstat = yes; then
31371      ln -s conftest.f conftest.lnk
31372    fi
31373    if test "$cross_compiling" = yes; then :
31374        case "$host_os" in
31375                          # Guess yes on Linux systems.
31376         linux-* | linux) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
31377                          # Guess yes on glibc systems.
31378         *-gnu*)          gl_cv_func_rename_slash_dst_works="guessing yes" ;;
31379                          # Guess no on native Windows.
31380         mingw*)          gl_cv_func_rename_slash_dst_works="guessing no" ;;
31381                          # If we don't know, obey --enable-cross-guesses.
31382         *)               gl_cv_func_rename_slash_dst_works="$gl_cross_guess_normal" ;;
31383       esac
31384
31385else
31386  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31387/* end confdefs.h.  */
31388
31389#        include <stdio.h>
31390#        include <stdlib.h>
31391
31392int
31393main ()
31394{
31395int result = 0;
31396           if (rename ("conftest.f1", "conftest.f2/") == 0)
31397             result |= 1;
31398           if (rename ("conftest.d1", "conftest.d2/") != 0)
31399             result |= 2;
31400#if HAVE_LSTAT
31401           if (rename ("conftest.f", "conftest.lnk/") == 0)
31402             result |= 4;
31403#endif
31404           return result;
31405
31406  ;
31407  return 0;
31408}
31409_ACEOF
31410if ac_fn_c_try_run "$LINENO"; then :
31411  gl_cv_func_rename_slash_dst_works=yes
31412else
31413  gl_cv_func_rename_slash_dst_works=no
31414fi
31415rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31416  conftest.$ac_objext conftest.beam conftest.$ac_ext
31417fi
31418
31419    rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
31420
31421fi
31422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
31423$as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
31424  case "$gl_cv_func_rename_slash_dst_works" in
31425    *yes) ;;
31426    *)
31427      REPLACE_RENAME=1
31428
31429$as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
31430
31431      ;;
31432  esac
31433
31434            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
31435$as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
31436if ${gl_cv_func_rename_slash_src_works+:} false; then :
31437  $as_echo_n "(cached) " >&6
31438else
31439  rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
31440    touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
31441      as_fn_error $? "cannot create temporary files" "$LINENO" 5
31442    # Assume that if we have lstat, we can also check symlinks.
31443    if test $ac_cv_func_lstat = yes; then
31444      ln -s conftest.f conftest.lnk
31445    fi
31446    if test "$cross_compiling" = yes; then :
31447        case "$host_os" in
31448                          # Guess yes on Linux systems.
31449         linux-* | linux) gl_cv_func_rename_slash_src_works="guessing yes" ;;
31450                          # Guess yes on glibc systems.
31451         *-gnu*)          gl_cv_func_rename_slash_src_works="guessing yes" ;;
31452                          # Guess yes on native Windows.
31453         mingw*)          gl_cv_func_rename_slash_src_works="guessing yes" ;;
31454                          # If we don't know, obey --enable-cross-guesses.
31455         *)               gl_cv_func_rename_slash_src_works="$gl_cross_guess_normal" ;;
31456       esac
31457
31458else
31459  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31460/* end confdefs.h.  */
31461
31462#        include <stdio.h>
31463#        include <stdlib.h>
31464
31465int
31466main ()
31467{
31468int result = 0;
31469           if (rename ("conftest.f1/", "conftest.d3") == 0)
31470             result |= 1;
31471           if (rename ("conftest.d1/", "conftest.d2") != 0)
31472             result |= 2;
31473#if HAVE_LSTAT
31474           if (rename ("conftest.lnk/", "conftest.f") == 0)
31475             result |= 4;
31476#endif
31477           return result;
31478
31479  ;
31480  return 0;
31481}
31482_ACEOF
31483if ac_fn_c_try_run "$LINENO"; then :
31484  gl_cv_func_rename_slash_src_works=yes
31485else
31486  gl_cv_func_rename_slash_src_works=no
31487fi
31488rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31489  conftest.$ac_objext conftest.beam conftest.$ac_ext
31490fi
31491
31492    rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
31493
31494fi
31495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
31496$as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
31497  case "$gl_cv_func_rename_slash_src_works" in
31498    *yes) ;;
31499    *)
31500      REPLACE_RENAME=1
31501
31502$as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
31503
31504      ;;
31505  esac
31506
31507
31508  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
31509$as_echo_n "checking whether rename manages hard links correctly... " >&6; }
31510if ${gl_cv_func_rename_link_works+:} false; then :
31511  $as_echo_n "(cached) " >&6
31512else
31513  if test $ac_cv_func_link = yes; then
31514       if test $cross_compiling != yes; then
31515         rm -rf conftest.f conftest.f1 conftest.f2
31516         if touch conftest.f conftest.f2 && ln conftest.f conftest.f1 &&
31517             set x `ls -i conftest.f conftest.f1` && test "" = ""; then
31518           if test "$cross_compiling" = yes; then :
31519                :
31520
31521else
31522  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31523/* end confdefs.h.  */
31524
31525#               include <errno.h>
31526#               include <stdio.h>
31527#               include <stdlib.h>
31528#               include <unistd.h>
31529
31530
31531$gl_mda_defines
31532
31533int
31534main ()
31535{
31536int result = 0;
31537                  if (rename ("conftest.f", "conftest.f1"))
31538                    result |= 1;
31539                  if (unlink ("conftest.f1"))
31540                    result |= 2;
31541
31542                  /* Allow either the POSIX-required behavior, where the
31543                     previous rename kept conftest.f, or the (better) NetBSD
31544                     behavior, where it removed conftest.f.  */
31545                  if (rename ("conftest.f", "conftest.f") != 0
31546                      && errno != ENOENT)
31547                    result |= 4;
31548
31549                  if (rename ("conftest.f1", "conftest.f1") == 0)
31550                    result |= 8;
31551                  if (rename ("conftest.f2", "conftest.f2") != 0)
31552                    result |= 16;
31553                  return result;
31554
31555  ;
31556  return 0;
31557}
31558_ACEOF
31559if ac_fn_c_try_run "$LINENO"; then :
31560  gl_cv_func_rename_link_works=yes
31561else
31562  gl_cv_func_rename_link_works=no
31563fi
31564rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31565  conftest.$ac_objext conftest.beam conftest.$ac_ext
31566fi
31567
31568         else
31569           gl_cv_func_rename_link_works="guessing no"
31570         fi
31571         rm -rf conftest.f conftest.f1 conftest.f2
31572       else
31573                  case "$host_os" in
31574                            # Guess yes on Linux systems.
31575           linux-* | linux) gl_cv_func_rename_link_works="guessing yes" ;;
31576                            # Guess yes on glibc systems.
31577           *-gnu*)          gl_cv_func_rename_link_works="guessing yes" ;;
31578                            # Guess yes on native Windows.
31579           mingw*)          gl_cv_func_rename_link_works="guessing yes" ;;
31580                            # If we don't know, obey --enable-cross-guesses.
31581           *)               gl_cv_func_rename_link_works="$gl_cross_guess_normal" ;;
31582         esac
31583       fi
31584     else
31585       gl_cv_func_rename_link_works=yes
31586     fi
31587
31588fi
31589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
31590$as_echo "$gl_cv_func_rename_link_works" >&6; }
31591  case "$gl_cv_func_rename_link_works" in
31592    *yes) ;;
31593    *)
31594      REPLACE_RENAME=1
31595
31596$as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
31597
31598      ;;
31599  esac
31600
31601          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
31602$as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
31603if ${gl_cv_func_rename_dest_works+:} false; then :
31604  $as_echo_n "(cached) " >&6
31605else
31606  rm -rf conftest.f conftest.d1 conftest.d2
31607    touch conftest.f && mkdir conftest.d1 conftest.d2 ||
31608      as_fn_error $? "cannot create temporary files" "$LINENO" 5
31609    if test "$cross_compiling" = yes; then :
31610        case "$host_os" in
31611                          # Guess yes on Linux systems.
31612         linux-* | linux) gl_cv_func_rename_dest_works="guessing yes" ;;
31613                          # Guess yes on glibc systems.
31614         *-gnu*)          gl_cv_func_rename_dest_works="guessing yes" ;;
31615                          # Guess no on native Windows.
31616         mingw*)          gl_cv_func_rename_dest_works="guessing no" ;;
31617                          # If we don't know, obey --enable-cross-guesses.
31618         *)               gl_cv_func_rename_dest_works="$gl_cross_guess_normal" ;;
31619       esac
31620
31621else
31622  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31623/* end confdefs.h.  */
31624
31625#        include <stdio.h>
31626#        include <stdlib.h>
31627
31628int
31629main ()
31630{
31631int result = 0;
31632           if (rename ("conftest.d1", "conftest.d2") != 0)
31633             result |= 1;
31634           if (rename ("conftest.d2", "conftest.f") == 0)
31635             result |= 2;
31636           return result;
31637
31638  ;
31639  return 0;
31640}
31641_ACEOF
31642if ac_fn_c_try_run "$LINENO"; then :
31643  gl_cv_func_rename_dest_works=yes
31644else
31645  gl_cv_func_rename_dest_works=no
31646fi
31647rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31648  conftest.$ac_objext conftest.beam conftest.$ac_ext
31649fi
31650
31651    rm -rf conftest.f conftest.d1 conftest.d2
31652
31653fi
31654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
31655$as_echo "$gl_cv_func_rename_dest_works" >&6; }
31656  case "$gl_cv_func_rename_dest_works" in
31657    *yes) ;;
31658    *)
31659      REPLACE_RENAME=1
31660
31661$as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
31662
31663      ;;
31664  esac
31665
31666  if test $REPLACE_RENAME = 1; then
31667
31668
31669
31670
31671
31672
31673
31674
31675  gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
31676
31677  fi
31678
31679
31680
31681
31682
31683          GNULIB_RENAME=1
31684
31685
31686
31687
31688
31689$as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
31690
31691
31692
31693
31694
31695
31696
31697
31698  for ac_header in linux/fs.h
31699do :
31700  ac_fn_c_check_header_mongrel "$LINENO" "linux/fs.h" "ac_cv_header_linux_fs_h" "$ac_includes_default"
31701if test "x$ac_cv_header_linux_fs_h" = xyes; then :
31702  cat >>confdefs.h <<_ACEOF
31703#define HAVE_LINUX_FS_H 1
31704_ACEOF
31705
31706fi
31707
31708done
31709
31710
31711  if test $ac_cv_func_renameat = no; then
31712    HAVE_RENAMEAT=0
31713  elif test $REPLACE_RENAME = 1; then
31714        REPLACE_RENAMEAT=1
31715  fi
31716
31717  if test $HAVE_RENAMEAT = 0 || test $REPLACE_RENAMEAT = 1; then
31718
31719
31720
31721
31722
31723
31724
31725
31726  gl_LIBOBJS="$gl_LIBOBJS renameat.$ac_objext"
31727
31728  fi
31729  if test $HAVE_RENAMEAT = 0; then
31730
31731
31732
31733
31734
31735
31736
31737
31738  gl_LIBOBJS="$gl_LIBOBJS at-func2.$ac_objext"
31739
31740  fi
31741
31742
31743
31744
31745
31746          GNULIB_RENAMEAT=1
31747
31748
31749
31750
31751
31752$as_echo "#define GNULIB_TEST_RENAMEAT 1" >>confdefs.h
31753
31754
31755
31756
31757
31758
31759
31760
31761  for ac_header in linux/fs.h
31762do :
31763  ac_fn_c_check_header_mongrel "$LINENO" "linux/fs.h" "ac_cv_header_linux_fs_h" "$ac_includes_default"
31764if test "x$ac_cv_header_linux_fs_h" = xyes; then :
31765  cat >>confdefs.h <<_ACEOF
31766#define HAVE_LINUX_FS_H 1
31767_ACEOF
31768
31769fi
31770
31771done
31772
31773
31774  if test $ac_cv_func_renameat = no; then
31775    HAVE_RENAMEAT=0
31776  elif test $REPLACE_RENAME = 1; then
31777        REPLACE_RENAMEAT=1
31778  fi
31779
31780  if test $HAVE_RENAMEAT = 0; then
31781
31782
31783
31784
31785
31786
31787
31788
31789  gl_LIBOBJS="$gl_LIBOBJS at-func2.$ac_objext"
31790
31791  fi
31792
31793
31794
31795  for ac_func in rewinddir
31796do :
31797  ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
31798if test "x$ac_cv_func_rewinddir" = xyes; then :
31799  cat >>confdefs.h <<_ACEOF
31800#define HAVE_REWINDDIR 1
31801_ACEOF
31802
31803fi
31804done
31805
31806  if test $ac_cv_func_rewinddir = no; then
31807    HAVE_REWINDDIR=0
31808  fi
31809
31810  if test $HAVE_REWINDDIR = 0; then
31811
31812
31813
31814
31815
31816
31817
31818
31819  gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
31820
31821  fi
31822
31823
31824
31825
31826
31827          GNULIB_REWINDDIR=1
31828
31829
31830
31831
31832
31833$as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
31834
31835
31836
31837
31838
31839
31840  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
31841$as_echo_n "checking whether rmdir works... " >&6; }
31842if ${gl_cv_func_rmdir_works+:} false; then :
31843  $as_echo_n "(cached) " >&6
31844else
31845  mkdir conftest.dir
31846     touch conftest.file
31847     if test "$cross_compiling" = yes; then :
31848  case "$host_os" in
31849                           # Guess yes on Linux systems.
31850          linux-* | linux) gl_cv_func_rmdir_works="guessing yes" ;;
31851                           # Guess yes on glibc systems.
31852          *-gnu* | gnu*)   gl_cv_func_rmdir_works="guessing yes" ;;
31853                           # Guess no on native Windows.
31854          mingw*)          gl_cv_func_rmdir_works="guessing no" ;;
31855                           # If we don't know, obey --enable-cross-guesses.
31856          *)               gl_cv_func_rmdir_works="$gl_cross_guess_normal" ;;
31857        esac
31858
31859else
31860  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31861/* end confdefs.h.  */
31862#include <stdio.h>
31863           #include <errno.h>
31864           #if HAVE_UNISTD_H
31865           # include <unistd.h>
31866           #else /* on Windows with MSVC */
31867           # include <direct.h>
31868           #endif
31869
31870
31871$gl_mda_defines
31872
31873int
31874main ()
31875{
31876int result = 0;
31877           if (!rmdir ("conftest.file/"))
31878             result |= 1;
31879           else if (errno != ENOTDIR)
31880             result |= 2;
31881           if (!rmdir ("conftest.dir/./"))
31882             result |= 4;
31883           return result;
31884
31885  ;
31886  return 0;
31887}
31888_ACEOF
31889if ac_fn_c_try_run "$LINENO"; then :
31890  gl_cv_func_rmdir_works=yes
31891else
31892  gl_cv_func_rmdir_works=no
31893fi
31894rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31895  conftest.$ac_objext conftest.beam conftest.$ac_ext
31896fi
31897
31898     rm -rf conftest.dir conftest.file
31899fi
31900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
31901$as_echo "$gl_cv_func_rmdir_works" >&6; }
31902  case "$gl_cv_func_rmdir_works" in
31903    *yes) ;;
31904    *)
31905      REPLACE_RMDIR=1
31906      ;;
31907  esac
31908
31909  if test $REPLACE_RMDIR = 1; then
31910
31911
31912
31913
31914
31915
31916
31917
31918  gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
31919
31920  fi
31921
31922
31923
31924
31925
31926          GNULIB_RMDIR=1
31927
31928
31929
31930
31931
31932$as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
31933
31934
31935
31936
31937
31938
31939
31940  for ac_func in rpmatch
31941do :
31942  ac_fn_c_check_func "$LINENO" "rpmatch" "ac_cv_func_rpmatch"
31943if test "x$ac_cv_func_rpmatch" = xyes; then :
31944  cat >>confdefs.h <<_ACEOF
31945#define HAVE_RPMATCH 1
31946_ACEOF
31947
31948fi
31949done
31950
31951  if test $ac_cv_func_rpmatch = no; then
31952    HAVE_RPMATCH=0
31953  fi
31954
31955  if test $HAVE_RPMATCH = 0; then
31956
31957
31958
31959
31960
31961
31962
31963
31964  gl_LIBOBJS="$gl_LIBOBJS rpmatch.$ac_objext"
31965
31966
31967  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and YESEXPR" >&5
31968$as_echo_n "checking for nl_langinfo and YESEXPR... " >&6; }
31969if ${gl_cv_langinfo_yesexpr+:} false; then :
31970  $as_echo_n "(cached) " >&6
31971else
31972  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31973/* end confdefs.h.  */
31974#include <langinfo.h>
31975int
31976main ()
31977{
31978char* cs = nl_langinfo(YESEXPR); return !cs;
31979  ;
31980  return 0;
31981}
31982_ACEOF
31983if ac_fn_c_try_link "$LINENO"; then :
31984  gl_cv_langinfo_yesexpr=yes
31985else
31986  gl_cv_langinfo_yesexpr=no
31987fi
31988rm -f core conftest.err conftest.$ac_objext \
31989    conftest$ac_exeext conftest.$ac_ext
31990
31991fi
31992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_langinfo_yesexpr" >&5
31993$as_echo "$gl_cv_langinfo_yesexpr" >&6; }
31994  if test $gl_cv_langinfo_yesexpr = yes; then
31995
31996$as_echo "#define HAVE_LANGINFO_YESEXPR 1" >>confdefs.h
31997
31998  fi
31999
32000  fi
32001
32002
32003
32004
32005
32006          GNULIB_RPMATCH=1
32007
32008
32009
32010
32011
32012$as_echo "#define GNULIB_TEST_RPMATCH 1" >>confdefs.h
32013
32014
32015
32016
32017
32018
32019
32020
32021
32022
32023
32024
32025
32026
32027
32028  :
32029
32030  for ac_header in selinux/flask.h
32031do :
32032  ac_fn_c_check_header_mongrel "$LINENO" "selinux/flask.h" "ac_cv_header_selinux_flask_h" "$ac_includes_default"
32033if test "x$ac_cv_header_selinux_flask_h" = xyes; then :
32034  cat >>confdefs.h <<_ACEOF
32035#define HAVE_SELINUX_FLASK_H 1
32036_ACEOF
32037
32038fi
32039
32040done
32041
32042
32043
32044  if test "$with_selinux" != no; then
32045    for ac_header in selinux/selinux.h
32046do :
32047  ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
32048if test "x$ac_cv_header_selinux_selinux_h" = xyes; then :
32049  cat >>confdefs.h <<_ACEOF
32050#define HAVE_SELINUX_SELINUX_H 1
32051_ACEOF
32052
32053fi
32054
32055done
32056
32057
32058    if test "$ac_cv_header_selinux_selinux_h" = yes; then
32059      # We do have <selinux/selinux.h>, so do compile getfilecon.c
32060      # and arrange to use its wrappers.
32061
32062
32063
32064
32065
32066
32067
32068
32069
32070     if test $gl_cv_have_include_next = yes; then
32071       gl_cv_next_selinux_selinux_h='<'selinux/selinux.h'>'
32072     else
32073       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <selinux/selinux.h>" >&5
32074$as_echo_n "checking absolute name of <selinux/selinux.h>... " >&6; }
32075if ${gl_cv_next_selinux_selinux_h+:} false; then :
32076  $as_echo_n "(cached) " >&6
32077else
32078
32079             if test $ac_cv_header_selinux_selinux_h = yes; then
32080
32081
32082
32083
32084  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32085/* end confdefs.h.  */
32086#include <selinux/selinux.h>
32087_ACEOF
32088                case "$host_os" in
32089    aix*) gl_absname_cpp="$ac_cpp -C" ;;
32090    *)    gl_absname_cpp="$ac_cpp" ;;
32091  esac
32092
32093  case "$host_os" in
32094    mingw*)
32095                                          gl_dirsep_regex='[/\\]'
32096      ;;
32097    *)
32098      gl_dirsep_regex='\/'
32099      ;;
32100  esac
32101      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
32102  gl_header_literal_regex=`echo 'selinux/selinux.h' \
32103                           | sed -e "$gl_make_literal_regex_sed"`
32104  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
32105      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
32106      s|^/[^/]|//&|
32107      p
32108      q
32109    }'
32110
32111        gl_cv_absolute_selinux_selinux_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
32112  sed -n "$gl_absolute_header_sed"`
32113
32114           gl_header=$gl_cv_absolute_selinux_selinux_h
32115           gl_cv_next_selinux_selinux_h='"'$gl_header'"'
32116          else
32117               gl_cv_next_selinux_selinux_h='<'selinux/selinux.h'>'
32118             fi
32119
32120
32121fi
32122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_selinux_selinux_h" >&5
32123$as_echo "$gl_cv_next_selinux_selinux_h" >&6; }
32124     fi
32125     NEXT_SELINUX_SELINUX_H=$gl_cv_next_selinux_selinux_h
32126
32127     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
32128       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
32129       gl_next_as_first_directive='<'selinux/selinux.h'>'
32130     else
32131       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
32132       gl_next_as_first_directive=$gl_cv_next_selinux_selinux_h
32133     fi
32134     NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H=$gl_next_as_first_directive
32135
32136
32137
32138
32139
32140$as_echo "#define getfilecon rpl_getfilecon" >>confdefs.h
32141
32142
32143$as_echo "#define lgetfilecon rpl_lgetfilecon" >>confdefs.h
32144
32145
32146$as_echo "#define fgetfilecon rpl_fgetfilecon" >>confdefs.h
32147
32148    fi
32149
32150    case "$ac_cv_search_setfilecon:$ac_cv_header_selinux_selinux_h" in
32151      no:*) # already warned
32152        ;;
32153      *:no)
32154        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libselinux was found but selinux/selinux.h is missing." >&5
32155$as_echo "$as_me: WARNING: libselinux was found but selinux/selinux.h is missing." >&2;}
32156        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU tar will be compiled without SELinux support." >&5
32157$as_echo "$as_me: WARNING: GNU tar will be compiled without SELinux support." >&2;}
32158    esac
32159  else
32160    # Do as if <selinux/selinux.h> does not exist, even if
32161    # AC_CHECK_HEADERS_ONCE has already determined that it exists.
32162    $as_echo "#define HAVE_SELINUX_SELINUX_H 0" >>confdefs.h
32163
32164  fi
32165
32166
32167
32168  if test "$with_selinux" != no; then
32169    for ac_header in selinux/context.h
32170do :
32171  ac_fn_c_check_header_mongrel "$LINENO" "selinux/context.h" "ac_cv_header_selinux_context_h" "$ac_includes_default"
32172if test "x$ac_cv_header_selinux_context_h" = xyes; then :
32173  cat >>confdefs.h <<_ACEOF
32174#define HAVE_SELINUX_CONTEXT_H 1
32175_ACEOF
32176 SELINUX_CONTEXT_H=
32177else
32178  SELINUX_CONTEXT_H=selinux/context.h
32179fi
32180
32181done
32182
32183  else
32184    SELINUX_CONTEXT_H=selinux/context.h
32185  fi
32186
32187   if test -n "$SELINUX_CONTEXT_H"; then
32188  GL_GENERATE_SELINUX_CONTEXT_H_TRUE=
32189  GL_GENERATE_SELINUX_CONTEXT_H_FALSE='#'
32190else
32191  GL_GENERATE_SELINUX_CONTEXT_H_TRUE='#'
32192  GL_GENERATE_SELINUX_CONTEXT_H_FALSE=
32193fi
32194
32195
32196
32197
32198  SELINUX_LABEL_H=selinux/label.h
32199  if test "$with_selinux" != no; then
32200    for ac_header in selinux/label.h
32201do :
32202  ac_fn_c_check_header_mongrel "$LINENO" "selinux/label.h" "ac_cv_header_selinux_label_h" "$ac_includes_default"
32203if test "x$ac_cv_header_selinux_label_h" = xyes; then :
32204  cat >>confdefs.h <<_ACEOF
32205#define HAVE_SELINUX_LABEL_H 1
32206_ACEOF
32207 SELINUX_LABEL_H=
32208fi
32209
32210done
32211
32212  fi
32213
32214   if test -n "$SELINUX_LABEL_H"; then
32215  GL_GENERATE_SELINUX_LABEL_H_TRUE=
32216  GL_GENERATE_SELINUX_LABEL_H_FALSE='#'
32217else
32218  GL_GENERATE_SELINUX_LABEL_H_TRUE='#'
32219  GL_GENERATE_SELINUX_LABEL_H_FALSE=
32220fi
32221
32222
32223  if test "$with_selinux" != no && test "$ac_cv_header_selinux_selinux_h" = yes; then
32224
32225
32226
32227
32228
32229
32230
32231
32232  gl_LIBOBJS="$gl_LIBOBJS getfilecon.$ac_objext"
32233
32234  fi
32235
32236
32237     if test $ac_cv_func_setenv = no; then
32238    HAVE_SETENV=0
32239  else
32240    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
32241$as_echo_n "checking whether setenv validates arguments... " >&6; }
32242if ${gl_cv_func_setenv_works+:} false; then :
32243  $as_echo_n "(cached) " >&6
32244else
32245  if test "$cross_compiling" = yes; then :
32246  case "$host_os" in
32247                        # Guess yes on glibc systems.
32248         *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;;
32249                        # Guess yes on musl systems.
32250         *-musl*)       gl_cv_func_setenv_works="guessing yes" ;;
32251                        # If we don't know, obey --enable-cross-guesses.
32252         *)             gl_cv_func_setenv_works="$gl_cross_guess_normal" ;;
32253       esac
32254
32255else
32256  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32257/* end confdefs.h.  */
32258
32259       #include <stdlib.h>
32260       #include <errno.h>
32261       #include <string.h>
32262
32263int
32264main ()
32265{
32266
32267       int result = 0;
32268       {
32269         if (setenv ("", "", 0) != -1)
32270           result |= 1;
32271         else if (errno != EINVAL)
32272           result |= 2;
32273       }
32274       {
32275         if (setenv ("a", "=", 1) != 0)
32276           result |= 4;
32277         else if (strcmp (getenv ("a"), "=") != 0)
32278           result |= 8;
32279       }
32280       return result;
32281
32282  ;
32283  return 0;
32284}
32285_ACEOF
32286if ac_fn_c_try_run "$LINENO"; then :
32287  gl_cv_func_setenv_works=yes
32288else
32289  gl_cv_func_setenv_works=no
32290fi
32291rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32292  conftest.$ac_objext conftest.beam conftest.$ac_ext
32293fi
32294
32295fi
32296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
32297$as_echo "$gl_cv_func_setenv_works" >&6; }
32298    case "$gl_cv_func_setenv_works" in
32299      *yes) ;;
32300      *)
32301        REPLACE_SETENV=1
32302        ;;
32303    esac
32304  fi
32305
32306  if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
32307
32308
32309
32310
32311
32312
32313
32314
32315  gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
32316
32317  fi
32318
32319
32320
32321
32322
32323          GNULIB_SETENV=1
32324
32325
32326
32327
32328
32329$as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
32330
32331
32332
32333
32334
32335
32336
32337
32338  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
32339$as_echo_n "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
32340if ${gl_cv_func_setlocale_null_all_mtsafe+:} false; then :
32341  $as_echo_n "(cached) " >&6
32342else
32343  case "$host_os" in
32344       # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
32345       *-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
32346         gl_cv_func_setlocale_null_all_mtsafe=no ;;
32347       # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
32348       *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
32349         gl_cv_func_setlocale_null_all_mtsafe=yes ;;
32350       # If we don't know, obey --enable-cross-guesses.
32351       *)
32352         gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
32353     esac
32354
32355fi
32356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
32357$as_echo "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
32358    case "$host_os" in
32359    mingw*) ;;
32360    *)
32361      if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
32362        gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
32363      fi
32364      ;;
32365  esac
32366  case "$gl_cv_func_setlocale_null_all_mtsafe" in
32367    *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
32368    *)    SETLOCALE_NULL_ALL_MTSAFE=0 ;;
32369  esac
32370
32371cat >>confdefs.h <<_ACEOF
32372#define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE
32373_ACEOF
32374
32375
32376    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
32377$as_echo_n "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
32378if ${gl_cv_func_setlocale_null_one_mtsafe+:} false; then :
32379  $as_echo_n "(cached) " >&6
32380else
32381  case "$host_os" in
32382       # Guess no on OpenBSD, AIX.
32383       openbsd* | aix*)
32384         gl_cv_func_setlocale_null_one_mtsafe=no ;;
32385       # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
32386       *-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
32387         gl_cv_func_setlocale_null_one_mtsafe=yes ;;
32388       # If we don't know, obey --enable-cross-guesses.
32389       *)
32390         gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
32391     esac
32392
32393fi
32394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
32395$as_echo "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
32396    case "$host_os" in
32397    mingw*) ;;
32398    *)
32399      if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
32400        gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
32401      fi
32402      ;;
32403  esac
32404  case "$gl_cv_func_setlocale_null_one_mtsafe" in
32405    *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
32406    *)    SETLOCALE_NULL_ONE_MTSAFE=0 ;;
32407  esac
32408
32409cat >>confdefs.h <<_ACEOF
32410#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE
32411_ACEOF
32412
32413
32414    if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
32415    case "$host_os" in
32416      mingw*) LIB_SETLOCALE_NULL= ;;
32417      *)
32418
32419
32420  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
32421$as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
32422if ${gl_cv_have_weak+:} false; then :
32423  $as_echo_n "(cached) " >&6
32424else
32425  gl_cv_have_weak=no
32426          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32427/* end confdefs.h.  */
32428extern void xyzzy ();
32429#pragma weak xyzzy
32430int
32431main ()
32432{
32433xyzzy();
32434  ;
32435  return 0;
32436}
32437_ACEOF
32438if ac_fn_c_try_link "$LINENO"; then :
32439  gl_cv_have_weak=maybe
32440fi
32441rm -f core conftest.err conftest.$ac_objext \
32442    conftest$ac_exeext conftest.$ac_ext
32443     if test $gl_cv_have_weak = maybe; then
32444                     if test "$cross_compiling" = yes; then :
32445                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32446/* end confdefs.h.  */
32447#ifdef __ELF__
32448             Extensible Linking Format
32449             #endif
32450
32451_ACEOF
32452if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32453  $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
32454  gl_cv_have_weak="guessing yes"
32455else
32456  gl_cv_have_weak="guessing no"
32457fi
32458rm -f conftest*
32459
32460
32461else
32462  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32463/* end confdefs.h.  */
32464
32465#include <stdio.h>
32466#pragma weak fputs
32467int main ()
32468{
32469  return (fputs == NULL);
32470}
32471_ACEOF
32472if ac_fn_c_try_run "$LINENO"; then :
32473  gl_cv_have_weak=yes
32474else
32475  gl_cv_have_weak=no
32476fi
32477rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32478  conftest.$ac_objext conftest.beam conftest.$ac_ext
32479fi
32480
32481     fi
32482          case " $LDFLAGS " in
32483       *" -static "*) gl_cv_have_weak=no ;;
32484     esac
32485                    case "$gl_cv_have_weak" in
32486       *yes)
32487         case "$host_os" in
32488           freebsd* | dragonfly*)
32489             : > conftest1.c
32490             $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
32491             cat <<EOF > conftest2.c
32492#include <pthread.h>
32493#pragma weak pthread_mutexattr_gettype
32494int main ()
32495{
32496  return (pthread_mutexattr_gettype != NULL);
32497}
32498EOF
32499             $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
32500               || gl_cv_have_weak=no
32501             rm -f conftest1.c libempty.so conftest2.c conftest
32502             ;;
32503         esac
32504         ;;
32505     esac
32506
32507fi
32508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
32509$as_echo "$gl_cv_have_weak" >&6; }
32510  case "$gl_cv_have_weak" in
32511    *yes)
32512
32513$as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
32514
32515      ;;
32516  esac
32517
32518        case "$gl_cv_have_weak" in
32519          *yes) LIB_SETLOCALE_NULL= ;;
32520          *)    LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
32521        esac
32522        ;;
32523    esac
32524  else
32525    LIB_SETLOCALE_NULL=
32526  fi
32527
32528
32529  if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
32530
32531
32532
32533
32534
32535
32536
32537
32538  gl_LIBOBJS="$gl_LIBOBJS setlocale-lock.$ac_objext"
32539
32540
32541
32542
32543  CFLAG_VISIBILITY=
32544  HAVE_VISIBILITY=0
32545  if test -n "$GCC"; then
32546                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
32547$as_echo_n "checking whether the -Werror option is usable... " >&6; }
32548if ${gl_cv_cc_vis_werror+:} false; then :
32549  $as_echo_n "(cached) " >&6
32550else
32551  gl_save_CFLAGS="$CFLAGS"
32552       CFLAGS="$CFLAGS -Werror"
32553       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32554/* end confdefs.h.  */
32555
32556int
32557main ()
32558{
32559
32560  ;
32561  return 0;
32562}
32563_ACEOF
32564if ac_fn_c_try_compile "$LINENO"; then :
32565  gl_cv_cc_vis_werror=yes
32566else
32567  gl_cv_cc_vis_werror=no
32568fi
32569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32570       CFLAGS="$gl_save_CFLAGS"
32571
32572fi
32573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
32574$as_echo "$gl_cv_cc_vis_werror" >&6; }
32575        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
32576$as_echo_n "checking for simple visibility declarations... " >&6; }
32577if ${gl_cv_cc_visibility+:} false; then :
32578  $as_echo_n "(cached) " >&6
32579else
32580  gl_save_CFLAGS="$CFLAGS"
32581       CFLAGS="$CFLAGS -fvisibility=hidden"
32582                                          if test $gl_cv_cc_vis_werror = yes; then
32583         CFLAGS="$CFLAGS -Werror"
32584       fi
32585       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32586/* end confdefs.h.  */
32587extern __attribute__((__visibility__("hidden"))) int hiddenvar;
32588              extern __attribute__((__visibility__("default"))) int exportedvar;
32589              extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
32590              extern __attribute__((__visibility__("default"))) int exportedfunc (void);
32591              void dummyfunc (void) {}
32592
32593int
32594main ()
32595{
32596
32597  ;
32598  return 0;
32599}
32600_ACEOF
32601if ac_fn_c_try_compile "$LINENO"; then :
32602  gl_cv_cc_visibility=yes
32603else
32604  gl_cv_cc_visibility=no
32605fi
32606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32607       CFLAGS="$gl_save_CFLAGS"
32608
32609fi
32610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
32611$as_echo "$gl_cv_cc_visibility" >&6; }
32612    if test $gl_cv_cc_visibility = yes; then
32613      CFLAG_VISIBILITY="-fvisibility=hidden"
32614      HAVE_VISIBILITY=1
32615    fi
32616  fi
32617
32618
32619
32620cat >>confdefs.h <<_ACEOF
32621#define HAVE_VISIBILITY $HAVE_VISIBILITY
32622_ACEOF
32623
32624
32625
32626  fi
32627
32628
32629
32630
32631
32632          GNULIB_SETLOCALE_NULL=1
32633
32634
32635
32636
32637
32638$as_echo "#define GNULIB_TEST_SETLOCALE_NULL 1" >>confdefs.h
32639
32640
32641
32642
32643
32644
32645
32646
32647
32648
32649
32650
32651
32652
32653     if test $gl_cv_have_include_next = yes; then
32654       gl_cv_next_signal_h='<'signal.h'>'
32655     else
32656       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
32657$as_echo_n "checking absolute name of <signal.h>... " >&6; }
32658if ${gl_cv_next_signal_h+:} false; then :
32659  $as_echo_n "(cached) " >&6
32660else
32661
32662
32663
32664  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32665/* end confdefs.h.  */
32666#include <signal.h>
32667_ACEOF
32668                case "$host_os" in
32669    aix*) gl_absname_cpp="$ac_cpp -C" ;;
32670    *)    gl_absname_cpp="$ac_cpp" ;;
32671  esac
32672
32673  case "$host_os" in
32674    mingw*)
32675                                          gl_dirsep_regex='[/\\]'
32676      ;;
32677    *)
32678      gl_dirsep_regex='\/'
32679      ;;
32680  esac
32681      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
32682  gl_header_literal_regex=`echo 'signal.h' \
32683                           | sed -e "$gl_make_literal_regex_sed"`
32684  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
32685      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
32686      s|^/[^/]|//&|
32687      p
32688      q
32689    }'
32690
32691        gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
32692  sed -n "$gl_absolute_header_sed"`
32693
32694           gl_header=$gl_cv_absolute_signal_h
32695           gl_cv_next_signal_h='"'$gl_header'"'
32696
32697
32698fi
32699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
32700$as_echo "$gl_cv_next_signal_h" >&6; }
32701     fi
32702     NEXT_SIGNAL_H=$gl_cv_next_signal_h
32703
32704     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
32705       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
32706       gl_next_as_first_directive='<'signal.h'>'
32707     else
32708       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
32709       gl_next_as_first_directive=$gl_cv_next_signal_h
32710     fi
32711     NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
32712
32713
32714
32715
32716
32717# AIX declares sig_atomic_t to already include volatile, and C89 compilers
32718# then choke on 'volatile sig_atomic_t'.  C99 requires that it compile.
32719  ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
32720#include <signal.h>
32721
32722"
32723if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
32724
32725else
32726  HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
32727fi
32728
32729
32730
32731
32732
32733
32734
32735  ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
32736#include <signal.h>
32737
32738"
32739if test "x$ac_cv_type_sighandler_t" = xyes; then :
32740
32741else
32742  HAVE_SIGHANDLER_T=0
32743fi
32744
32745
32746
32747
32748
32749
32750
32751
32752
32753  for ac_header in stdint.h
32754do :
32755  ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
32756if test "x$ac_cv_header_stdint_h" = xyes; then :
32757  cat >>confdefs.h <<_ACEOF
32758#define HAVE_STDINT_H 1
32759_ACEOF
32760
32761fi
32762
32763done
32764
32765    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
32766$as_echo_n "checking for SIZE_MAX... " >&6; }
32767if ${gl_cv_size_max+:} false; then :
32768  $as_echo_n "(cached) " >&6
32769else
32770
32771    gl_cv_size_max=no
32772    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32773/* end confdefs.h.  */
32774
32775#include <limits.h>
32776#if HAVE_STDINT_H
32777#include <stdint.h>
32778#endif
32779#ifdef SIZE_MAX
32780Found it
32781#endif
32782
32783_ACEOF
32784if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32785  $EGREP "Found it" >/dev/null 2>&1; then :
32786  gl_cv_size_max=yes
32787fi
32788rm -f conftest*
32789
32790    if test $gl_cv_size_max != yes; then
32791                        if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1"        "#include <stddef.h>
32792#include <limits.h>"; then :
32793
32794else
32795  size_t_bits_minus_1=
32796fi
32797
32798      if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint"        "#include <stddef.h>"; then :
32799
32800else
32801  fits_in_uint=
32802fi
32803
32804      if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
32805        if test $fits_in_uint = 1; then
32806                              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32807/* end confdefs.h.  */
32808#include <stddef.h>
32809                 extern size_t foo;
32810                 extern unsigned long foo;
32811
32812int
32813main ()
32814{
32815
32816  ;
32817  return 0;
32818}
32819_ACEOF
32820if ac_fn_c_try_compile "$LINENO"; then :
32821  fits_in_uint=0
32822fi
32823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32824        fi
32825                                if test $fits_in_uint = 1; then
32826          gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
32827        else
32828          gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
32829        fi
32830      else
32831                gl_cv_size_max='((size_t)~(size_t)0)'
32832      fi
32833    fi
32834
32835fi
32836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
32837$as_echo "$gl_cv_size_max" >&6; }
32838  if test "$gl_cv_size_max" != yes; then
32839
32840cat >>confdefs.h <<_ACEOF
32841#define SIZE_MAX $gl_cv_size_max
32842_ACEOF
32843
32844  fi
32845
32846
32847
32848
32849               ac_fn_c_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include <unistd.h>
32850"
32851if test "x$ac_cv_have_decl_sleep" = xyes; then :
32852  ac_have_decl=1
32853else
32854  ac_have_decl=0
32855fi
32856
32857cat >>confdefs.h <<_ACEOF
32858#define HAVE_DECL_SLEEP $ac_have_decl
32859_ACEOF
32860
32861
32862  if test $ac_cv_have_decl_sleep != yes; then
32863    HAVE_SLEEP=0
32864  else
32865        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working sleep" >&5
32866$as_echo_n "checking for working sleep... " >&6; }
32867if ${gl_cv_func_sleep_works+:} false; then :
32868  $as_echo_n "(cached) " >&6
32869else
32870  if test "$cross_compiling" = yes; then :
32871  case "$host_os" in
32872                        # Guess yes on glibc systems.
32873         *-gnu* | gnu*) gl_cv_func_sleep_works="guessing yes" ;;
32874                        # Guess yes on musl systems.
32875         *-musl*)       gl_cv_func_sleep_works="guessing yes" ;;
32876                        # Guess no on native Windows.
32877         mingw*)        gl_cv_func_sleep_works="guessing no" ;;
32878                        # If we don't know, obey --enable-cross-guesses.
32879         *)             gl_cv_func_sleep_works="$gl_cross_guess_normal" ;;
32880       esac
32881
32882else
32883  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32884/* end confdefs.h.  */
32885
32886#include <errno.h>
32887#include <unistd.h>
32888#include <signal.h>
32889static void
32890handle_alarm (int sig)
32891{
32892  if (sig != SIGALRM)
32893    _exit (2);
32894}
32895
32896int
32897main ()
32898{
32899
32900    /* Failure to compile this test due to missing alarm is okay,
32901       since all such platforms (mingw) also lack sleep.  */
32902    unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days.  */
32903    unsigned int remaining;
32904    signal (SIGALRM, handle_alarm);
32905    alarm (1);
32906    remaining = sleep (pentecost);
32907    if (remaining > pentecost)
32908      return 3;
32909    if (remaining <= pentecost - 10)
32910      return 4;
32911    return 0;
32912
32913  ;
32914  return 0;
32915}
32916_ACEOF
32917if ac_fn_c_try_run "$LINENO"; then :
32918  gl_cv_func_sleep_works=yes
32919else
32920  gl_cv_func_sleep_works=no
32921fi
32922rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32923  conftest.$ac_objext conftest.beam conftest.$ac_ext
32924fi
32925
32926fi
32927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sleep_works" >&5
32928$as_echo "$gl_cv_func_sleep_works" >&6; }
32929    case "$gl_cv_func_sleep_works" in
32930      *yes) ;;
32931      *)
32932        REPLACE_SLEEP=1
32933        ;;
32934    esac
32935  fi
32936
32937  if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
32938
32939
32940
32941
32942
32943
32944
32945
32946  gl_LIBOBJS="$gl_LIBOBJS sleep.$ac_objext"
32947
32948  fi
32949
32950
32951
32952
32953
32954          GNULIB_SLEEP=1
32955
32956
32957
32958
32959
32960$as_echo "#define GNULIB_TEST_SLEEP 1" >>confdefs.h
32961
32962
32963
32964
32965
32966  gl_cv_func_snprintf_usable=no
32967  for ac_func in snprintf
32968do :
32969  ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
32970if test "x$ac_cv_func_snprintf" = xyes; then :
32971  cat >>confdefs.h <<_ACEOF
32972#define HAVE_SNPRINTF 1
32973_ACEOF
32974
32975fi
32976done
32977
32978  if test $ac_cv_func_snprintf = yes; then
32979
32980
32981
32982  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
32983$as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
32984if ${gl_cv_func_snprintf_size1+:} false; then :
32985  $as_echo_n "(cached) " >&6
32986else
32987
32988      if test "$cross_compiling" = yes; then :
32989  case "$host_os" in
32990                            # Guess yes on Android.
32991           linux*-android*) gl_cv_func_snprintf_size1="guessing yes" ;;
32992                            # Guess yes on native Windows.
32993           mingw*)          gl_cv_func_snprintf_size1="guessing yes" ;;
32994           *)               gl_cv_func_snprintf_size1="guessing yes" ;;
32995         esac
32996
32997else
32998  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32999/* end confdefs.h.  */
33000
33001#include <stdio.h>
33002#if HAVE_SNPRINTF
33003# define my_snprintf snprintf
33004#else
33005# include <stdarg.h>
33006static int my_snprintf (char *buf, int size, const char *format, ...)
33007{
33008  va_list args;
33009  int ret;
33010  va_start (args, format);
33011  ret = vsnprintf (buf, size, format, args);
33012  va_end (args);
33013  return ret;
33014}
33015#endif
33016int main()
33017{
33018  static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
33019  my_snprintf (buf, 1, "%d", 12345);
33020  return buf[1] != 'E';
33021}
33022_ACEOF
33023if ac_fn_c_try_run "$LINENO"; then :
33024  gl_cv_func_snprintf_size1=yes
33025else
33026  gl_cv_func_snprintf_size1=no
33027fi
33028rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33029  conftest.$ac_objext conftest.beam conftest.$ac_ext
33030fi
33031
33032
33033fi
33034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
33035$as_echo "$gl_cv_func_snprintf_size1" >&6; }
33036
33037    case "$gl_cv_func_snprintf_size1" in
33038      *yes)
33039
33040        case "$gl_cv_func_snprintf_retval_c99" in
33041          *yes)
33042
33043
33044     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
33045$as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
33046if ${gl_cv_func_printf_positions+:} false; then :
33047  $as_echo_n "(cached) " >&6
33048else
33049
33050      if test "$cross_compiling" = yes; then :
33051
33052         case "$host_os" in
33053           netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
33054                            gl_cv_func_printf_positions="guessing no";;
33055           beos*)           gl_cv_func_printf_positions="guessing no";;
33056                            # Guess yes on Android.
33057           linux*-android*) gl_cv_func_printf_positions="guessing yes";;
33058                            # Guess no on native Windows.
33059           mingw* | pw*)    gl_cv_func_printf_positions="guessing no";;
33060           *)               gl_cv_func_printf_positions="guessing yes";;
33061         esac
33062
33063else
33064  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33065/* end confdefs.h.  */
33066
33067#include <stdio.h>
33068#include <string.h>
33069/* The string "%2$d %1$d", with dollar characters protected from the shell's
33070   dollar expansion (possibly an autoconf bug).  */
33071static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
33072static char buf[100];
33073int main ()
33074{
33075  sprintf (buf, format, 33, 55);
33076  return (strcmp (buf, "55 33") != 0);
33077}
33078_ACEOF
33079if ac_fn_c_try_run "$LINENO"; then :
33080  gl_cv_func_printf_positions=yes
33081else
33082  gl_cv_func_printf_positions=no
33083fi
33084rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33085  conftest.$ac_objext conftest.beam conftest.$ac_ext
33086fi
33087
33088
33089fi
33090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
33091$as_echo "$gl_cv_func_printf_positions" >&6; }
33092
33093            case "$gl_cv_func_printf_positions" in
33094              *yes)
33095                gl_cv_func_snprintf_usable=yes
33096                ;;
33097            esac
33098            ;;
33099        esac
33100        ;;
33101    esac
33102  fi
33103  if test $gl_cv_func_snprintf_usable = no; then
33104
33105
33106
33107
33108
33109
33110
33111
33112
33113
33114  gl_LIBOBJS="$gl_LIBOBJS snprintf.$ac_objext"
33115
33116  if test $ac_cv_func_snprintf = yes; then
33117    REPLACE_SNPRINTF=1
33118  else
33119
33120    if test $ac_cv_have_decl_snprintf = yes; then
33121                        REPLACE_SNPRINTF=1
33122    fi
33123  fi
33124  :
33125
33126  fi
33127
33128  if test $ac_cv_have_decl_snprintf = no; then
33129    HAVE_DECL_SNPRINTF=0
33130  fi
33131
33132
33133
33134
33135
33136
33137          GNULIB_SNPRINTF=1
33138
33139
33140
33141
33142
33143$as_echo "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h
33144
33145
33146
33147
33148
33149cat >>confdefs.h <<_ACEOF
33150#define GNULIB_SNPRINTF 1
33151_ACEOF
33152
33153
33154
33155  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
33156$as_echo_n "checking for ssize_t... " >&6; }
33157if ${gt_cv_ssize_t+:} false; then :
33158  $as_echo_n "(cached) " >&6
33159else
33160  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33161/* end confdefs.h.  */
33162#include <sys/types.h>
33163int
33164main ()
33165{
33166int x = sizeof (ssize_t *) + sizeof (ssize_t);
33167            return !x;
33168  ;
33169  return 0;
33170}
33171_ACEOF
33172if ac_fn_c_try_compile "$LINENO"; then :
33173  gt_cv_ssize_t=yes
33174else
33175  gt_cv_ssize_t=no
33176fi
33177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33178fi
33179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
33180$as_echo "$gt_cv_ssize_t" >&6; }
33181  if test $gt_cv_ssize_t = no; then
33182
33183$as_echo "#define ssize_t int" >>confdefs.h
33184
33185  fi
33186
33187
33188
33189
33190
33191  case "$host_os" in
33192    mingw*)
33193                  REPLACE_STAT=1
33194      ;;
33195    *)
33196                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
33197$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
33198if ${gl_cv_func_stat_file_slash+:} false; then :
33199  $as_echo_n "(cached) " >&6
33200else
33201  touch conftest.tmp
33202         # Assume that if we have lstat, we can also check symlinks.
33203         if test $ac_cv_func_lstat = yes; then
33204           ln -s conftest.tmp conftest.lnk
33205         fi
33206         if test "$cross_compiling" = yes; then :
33207  case "$host_os" in
33208                               # Guess yes on Linux systems.
33209              linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;;
33210                               # Guess yes on glibc systems.
33211              *-gnu* | gnu*)   gl_cv_func_stat_file_slash="guessing yes" ;;
33212                               # If we don't know, obey --enable-cross-guesses.
33213              *)               gl_cv_func_stat_file_slash="$gl_cross_guess_normal" ;;
33214            esac
33215
33216else
33217  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33218/* end confdefs.h.  */
33219#include <sys/stat.h>
33220
33221int
33222main ()
33223{
33224int result = 0;
33225               struct stat st;
33226               if (!stat ("conftest.tmp/", &st))
33227                 result |= 1;
33228#if HAVE_LSTAT
33229               if (!stat ("conftest.lnk/", &st))
33230                 result |= 2;
33231#endif
33232               return result;
33233
33234  ;
33235  return 0;
33236}
33237_ACEOF
33238if ac_fn_c_try_run "$LINENO"; then :
33239  gl_cv_func_stat_file_slash=yes
33240else
33241  gl_cv_func_stat_file_slash=no
33242fi
33243rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33244  conftest.$ac_objext conftest.beam conftest.$ac_ext
33245fi
33246
33247         rm -f conftest.tmp conftest.lnk
33248fi
33249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
33250$as_echo "$gl_cv_func_stat_file_slash" >&6; }
33251      case $gl_cv_func_stat_file_slash in
33252        *no)
33253          REPLACE_STAT=1
33254
33255$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
33256;;
33257      esac
33258      case $host_os in
33259                solaris*)
33260          REPLACE_FSTAT=1 ;;
33261      esac
33262      ;;
33263  esac
33264
33265  if test $REPLACE_STAT = 1; then
33266
33267
33268
33269
33270
33271
33272
33273
33274  gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
33275
33276    case "$host_os" in
33277      mingw*)
33278
33279
33280
33281
33282
33283
33284
33285
33286  gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
33287
33288        ;;
33289    esac
33290
33291
33292
33293  :
33294
33295  fi
33296
33297
33298
33299
33300
33301          GNULIB_STAT=1
33302
33303
33304
33305
33306
33307$as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
33308
33309
33310
33311
33312
33313
33314
33315  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>
33316     #include <sys/stat.h>
33317"
33318if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
33319
33320cat >>confdefs.h <<_ACEOF
33321#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
33322_ACEOF
33323
33324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
33325$as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
33326if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
33327  $as_echo_n "(cached) " >&6
33328else
33329  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33330/* end confdefs.h.  */
33331
33332            #include <sys/types.h>
33333            #include <sys/stat.h>
33334            #if HAVE_SYS_TIME_H
33335            # include <sys/time.h>
33336            #endif
33337            #include <time.h>
33338            struct timespec ts;
33339            struct stat st;
33340
33341int
33342main ()
33343{
33344
33345            st.st_atim = ts;
33346
33347  ;
33348  return 0;
33349}
33350_ACEOF
33351if ac_fn_c_try_compile "$LINENO"; then :
33352  ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
33353else
33354  ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
33355fi
33356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33357fi
33358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
33359$as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
33360     if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
33361
33362$as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
33363
33364     fi
33365else
33366  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>
33367        #include <sys/stat.h>
33368"
33369if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
33370
33371cat >>confdefs.h <<_ACEOF
33372#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
33373_ACEOF
33374
33375
33376else
33377  ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
33378           #include <sys/stat.h>
33379"
33380if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
33381
33382cat >>confdefs.h <<_ACEOF
33383#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
33384_ACEOF
33385
33386
33387else
33388  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>
33389              #include <sys/stat.h>
33390"
33391if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
33392
33393cat >>confdefs.h <<_ACEOF
33394#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
33395_ACEOF
33396
33397
33398fi
33399
33400fi
33401
33402fi
33403
33404fi
33405
33406
33407
33408
33409
33410  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>
33411     #include <sys/stat.h>
33412"
33413if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then :
33414
33415cat >>confdefs.h <<_ACEOF
33416#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
33417_ACEOF
33418
33419
33420else
33421  ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
33422        #include <sys/stat.h>
33423"
33424if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then :
33425
33426cat >>confdefs.h <<_ACEOF
33427#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
33428_ACEOF
33429
33430
33431else
33432  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>
33433          #include <sys/stat.h>
33434"
33435if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then :
33436
33437cat >>confdefs.h <<_ACEOF
33438#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
33439_ACEOF
33440
33441
33442fi
33443
33444fi
33445
33446fi
33447
33448
33449
33450
33451cat >>confdefs.h <<_ACEOF
33452#define GNULIB_STATAT 1
33453_ACEOF
33454
33455
33456  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
33457$as_echo_n "checking for working stdalign.h... " >&6; }
33458if ${gl_cv_header_working_stdalign_h+:} false; then :
33459  $as_echo_n "(cached) " >&6
33460else
33461  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33462/* end confdefs.h.  */
33463#include <stdalign.h>
33464            #include <stddef.h>
33465
33466            /* Test that alignof yields a result consistent with offsetof.
33467               This catches GCC bug 52023
33468               <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.  */
33469            #ifdef __cplusplus
33470               template <class t> struct alignof_helper { char a; t b; };
33471            # define ao(type) offsetof (alignof_helper<type>, b)
33472            #else
33473            # define ao(type) offsetof (struct { char a; type b; }, b)
33474            #endif
33475            char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
33476            char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
33477            char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
33478
33479            /* Test _Alignas only on platforms where gnulib can help.  */
33480            #if \
33481                ((defined __cplusplus && 201103 <= __cplusplus) \
33482                 || (defined __APPLE__ && defined __MACH__ \
33483                     ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
33484                     : __GNUC__) \
33485                 || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
33486                 || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \
33487                 || 1300 <= _MSC_VER)
33488              struct alignas_test { char c; char alignas (8) alignas_8; };
33489              char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
33490                                ? 1 : -1];
33491            #endif
33492
33493int
33494main ()
33495{
33496
33497  ;
33498  return 0;
33499}
33500_ACEOF
33501if ac_fn_c_try_compile "$LINENO"; then :
33502  gl_cv_header_working_stdalign_h=yes
33503else
33504  gl_cv_header_working_stdalign_h=no
33505fi
33506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33507fi
33508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
33509$as_echo "$gl_cv_header_working_stdalign_h" >&6; }
33510
33511  if test $gl_cv_header_working_stdalign_h = yes; then
33512    STDALIGN_H=''
33513  else
33514    STDALIGN_H='stdalign.h'
33515  fi
33516
33517
33518   if test -n "$STDALIGN_H"; then
33519  GL_GENERATE_STDALIGN_H_TRUE=
33520  GL_GENERATE_STDALIGN_H_FALSE='#'
33521else
33522  GL_GENERATE_STDALIGN_H_TRUE='#'
33523  GL_GENERATE_STDALIGN_H_FALSE=
33524fi
33525
33526
33527
33528  STDARG_H=''
33529  NEXT_STDARG_H='<stdarg.h>'
33530  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
33531$as_echo_n "checking for va_copy... " >&6; }
33532if ${gl_cv_func_va_copy+:} false; then :
33533  $as_echo_n "(cached) " >&6
33534else
33535  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33536/* end confdefs.h.  */
33537#include <stdarg.h>
33538int
33539main ()
33540{
33541
33542#ifndef va_copy
33543void (*func) (va_list, va_list) = va_copy;
33544#endif
33545
33546  ;
33547  return 0;
33548}
33549_ACEOF
33550if ac_fn_c_try_compile "$LINENO"; then :
33551  gl_cv_func_va_copy=yes
33552else
33553  gl_cv_func_va_copy=no
33554fi
33555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33556
33557fi
33558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
33559$as_echo "$gl_cv_func_va_copy" >&6; }
33560  if test $gl_cv_func_va_copy = no; then
33561                                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33562/* end confdefs.h.  */
33563#if defined _AIX && !defined __GNUC__
33564        AIX vaccine
33565       #endif
33566
33567_ACEOF
33568if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
33569  $EGREP "vaccine" >/dev/null 2>&1; then :
33570  gl_aixcc=yes
33571else
33572  gl_aixcc=no
33573fi
33574rm -f conftest*
33575
33576    if test $gl_aixcc = yes; then
33577            STDARG_H=stdarg.h
33578
33579
33580
33581
33582
33583
33584
33585
33586     if test $gl_cv_have_include_next = yes; then
33587       gl_cv_next_stdarg_h='<'stdarg.h'>'
33588     else
33589       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
33590$as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
33591if ${gl_cv_next_stdarg_h+:} false; then :
33592  $as_echo_n "(cached) " >&6
33593else
33594
33595
33596
33597  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33598/* end confdefs.h.  */
33599#include <stdarg.h>
33600_ACEOF
33601                case "$host_os" in
33602    aix*) gl_absname_cpp="$ac_cpp -C" ;;
33603    *)    gl_absname_cpp="$ac_cpp" ;;
33604  esac
33605
33606  case "$host_os" in
33607    mingw*)
33608                                          gl_dirsep_regex='[/\\]'
33609      ;;
33610    *)
33611      gl_dirsep_regex='\/'
33612      ;;
33613  esac
33614      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
33615  gl_header_literal_regex=`echo 'stdarg.h' \
33616                           | sed -e "$gl_make_literal_regex_sed"`
33617  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
33618      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
33619      s|^/[^/]|//&|
33620      p
33621      q
33622    }'
33623
33624        gl_cv_absolute_stdarg_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
33625  sed -n "$gl_absolute_header_sed"`
33626
33627           gl_header=$gl_cv_absolute_stdarg_h
33628           gl_cv_next_stdarg_h='"'$gl_header'"'
33629
33630
33631fi
33632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
33633$as_echo "$gl_cv_next_stdarg_h" >&6; }
33634     fi
33635     NEXT_STDARG_H=$gl_cv_next_stdarg_h
33636
33637     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
33638       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
33639       gl_next_as_first_directive='<'stdarg.h'>'
33640     else
33641       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
33642       gl_next_as_first_directive=$gl_cv_next_stdarg_h
33643     fi
33644     NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
33645
33646
33647
33648
33649            if test "$gl_cv_next_stdarg_h" = '""'; then
33650        gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
33651        NEXT_STDARG_H="$gl_cv_next_stdarg_h"
33652      fi
33653    else
33654
33655
33656  exec 9>&6 6>/dev/null
33657
33658    if ${gl_cv_func___va_copy+:} false; then :
33659  $as_echo_n "(cached) " >&6
33660else
33661
33662        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33663/* end confdefs.h.  */
33664#include <stdarg.h>
33665int
33666main ()
33667{
33668
33669#ifndef __va_copy
33670error, bail out
33671#endif
33672
33673  ;
33674  return 0;
33675}
33676_ACEOF
33677if ac_fn_c_try_compile "$LINENO"; then :
33678  gl_cv_func___va_copy=yes
33679else
33680  gl_cv_func___va_copy=no
33681fi
33682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33683fi
33684
33685
33686  exec 6>&9 9>&-
33687
33688
33689      if test $gl_cv_func___va_copy = yes; then
33690
33691$as_echo "#define va_copy __va_copy" >>confdefs.h
33692
33693      else
33694
33695
33696$as_echo "#define va_copy gl_va_copy" >>confdefs.h
33697
33698      fi
33699    fi
33700  fi
33701
33702   if test -n "$STDARG_H"; then
33703  GL_GENERATE_STDARG_H_TRUE=
33704  GL_GENERATE_STDARG_H_FALSE='#'
33705else
33706  GL_GENERATE_STDARG_H_TRUE='#'
33707  GL_GENERATE_STDARG_H_FALSE=
33708fi
33709
33710
33711
33712
33713
33714
33715
33716          if test "$ac_cv_header_stdbool_h" = yes; then
33717    case "$host_os" in
33718      solaris*)
33719        if test -z "$GCC"; then
33720          STDBOOL_H='stdbool.h'
33721        else
33722          STDBOOL_H=''
33723        fi
33724        ;;
33725      *)
33726        STDBOOL_H=''
33727        ;;
33728    esac
33729  else
33730    STDBOOL_H='stdbool.h'
33731  fi
33732
33733   if test -n "$STDBOOL_H"; then
33734  GL_GENERATE_STDBOOL_H_TRUE=
33735  GL_GENERATE_STDBOOL_H_FALSE='#'
33736else
33737  GL_GENERATE_STDBOOL_H_TRUE='#'
33738  GL_GENERATE_STDBOOL_H_FALSE=
33739fi
33740
33741
33742  if test "$ac_cv_type__Bool" = yes; then
33743    HAVE__BOOL=1
33744  else
33745    HAVE__BOOL=0
33746  fi
33747
33748
33749
33750
33751
33752
33753
33754
33755  STDDEF_H=
33756
33757      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
33758$as_echo_n "checking for good max_align_t... " >&6; }
33759if ${gl_cv_type_max_align_t+:} false; then :
33760  $as_echo_n "(cached) " >&6
33761else
33762  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33763/* end confdefs.h.  */
33764#include <stddef.h>
33765            unsigned int s = sizeof (max_align_t);
33766            #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
33767            int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
33768            int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
33769            #endif
33770            typedef struct { char a; max_align_t b; } max_helper;
33771            typedef struct { char a; long b; } long_helper;
33772            typedef struct { char a; double b; } double_helper;
33773            typedef struct { char a; long double b; } long_double_helper;
33774            int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
33775            int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
33776            int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
33777
33778int
33779main ()
33780{
33781
33782  ;
33783  return 0;
33784}
33785_ACEOF
33786if ac_fn_c_try_compile "$LINENO"; then :
33787  gl_cv_type_max_align_t=yes
33788else
33789  gl_cv_type_max_align_t=no
33790fi
33791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33792
33793fi
33794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
33795$as_echo "$gl_cv_type_max_align_t" >&6; }
33796  if test $gl_cv_type_max_align_t = no; then
33797    HAVE_MAX_ALIGN_T=0
33798    STDDEF_H=stddef.h
33799  fi
33800
33801  if test $gt_cv_c_wchar_t = no; then
33802    HAVE_WCHAR_T=0
33803    STDDEF_H=stddef.h
33804  fi
33805
33806  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
33807$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
33808if ${gl_cv_decl_null_works+:} false; then :
33809  $as_echo_n "(cached) " >&6
33810else
33811  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33812/* end confdefs.h.  */
33813#include <stddef.h>
33814      int test[2 * (sizeof NULL == sizeof (void *)) -1];
33815
33816int
33817main ()
33818{
33819
33820  ;
33821  return 0;
33822}
33823_ACEOF
33824if ac_fn_c_try_compile "$LINENO"; then :
33825  gl_cv_decl_null_works=yes
33826else
33827  gl_cv_decl_null_works=no
33828fi
33829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33830fi
33831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
33832$as_echo "$gl_cv_decl_null_works" >&6; }
33833  if test $gl_cv_decl_null_works = no; then
33834    REPLACE_NULL=1
33835    STDDEF_H=stddef.h
33836  fi
33837
33838
33839   if test -n "$STDDEF_H"; then
33840  GL_GENERATE_STDDEF_H_TRUE=
33841  GL_GENERATE_STDDEF_H_FALSE='#'
33842else
33843  GL_GENERATE_STDDEF_H_TRUE='#'
33844  GL_GENERATE_STDDEF_H_FALSE=
33845fi
33846
33847  if test -n "$STDDEF_H"; then
33848
33849
33850
33851
33852
33853
33854
33855
33856     if test $gl_cv_have_include_next = yes; then
33857       gl_cv_next_stddef_h='<'stddef.h'>'
33858     else
33859       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
33860$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
33861if ${gl_cv_next_stddef_h+:} false; then :
33862  $as_echo_n "(cached) " >&6
33863else
33864
33865
33866
33867  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33868/* end confdefs.h.  */
33869#include <stddef.h>
33870_ACEOF
33871                case "$host_os" in
33872    aix*) gl_absname_cpp="$ac_cpp -C" ;;
33873    *)    gl_absname_cpp="$ac_cpp" ;;
33874  esac
33875
33876  case "$host_os" in
33877    mingw*)
33878                                          gl_dirsep_regex='[/\\]'
33879      ;;
33880    *)
33881      gl_dirsep_regex='\/'
33882      ;;
33883  esac
33884      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
33885  gl_header_literal_regex=`echo 'stddef.h' \
33886                           | sed -e "$gl_make_literal_regex_sed"`
33887  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
33888      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
33889      s|^/[^/]|//&|
33890      p
33891      q
33892    }'
33893
33894        gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
33895  sed -n "$gl_absolute_header_sed"`
33896
33897           gl_header=$gl_cv_absolute_stddef_h
33898           gl_cv_next_stddef_h='"'$gl_header'"'
33899
33900
33901fi
33902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
33903$as_echo "$gl_cv_next_stddef_h" >&6; }
33904     fi
33905     NEXT_STDDEF_H=$gl_cv_next_stddef_h
33906
33907     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
33908       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
33909       gl_next_as_first_directive='<'stddef.h'>'
33910     else
33911       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
33912       gl_next_as_first_directive=$gl_cv_next_stddef_h
33913     fi
33914     NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
33915
33916
33917
33918
33919  fi
33920
33921
33922
33923
33924  $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
33925
33926
33927
33928
33929
33930
33931
33932
33933
33934
33935     if test $gl_cv_have_include_next = yes; then
33936       gl_cv_next_stdio_h='<'stdio.h'>'
33937     else
33938       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
33939$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
33940if ${gl_cv_next_stdio_h+:} false; then :
33941  $as_echo_n "(cached) " >&6
33942else
33943
33944
33945
33946  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33947/* end confdefs.h.  */
33948#include <stdio.h>
33949_ACEOF
33950                case "$host_os" in
33951    aix*) gl_absname_cpp="$ac_cpp -C" ;;
33952    *)    gl_absname_cpp="$ac_cpp" ;;
33953  esac
33954
33955  case "$host_os" in
33956    mingw*)
33957                                          gl_dirsep_regex='[/\\]'
33958      ;;
33959    *)
33960      gl_dirsep_regex='\/'
33961      ;;
33962  esac
33963      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
33964  gl_header_literal_regex=`echo 'stdio.h' \
33965                           | sed -e "$gl_make_literal_regex_sed"`
33966  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
33967      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
33968      s|^/[^/]|//&|
33969      p
33970      q
33971    }'
33972
33973        gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
33974  sed -n "$gl_absolute_header_sed"`
33975
33976           gl_header=$gl_cv_absolute_stdio_h
33977           gl_cv_next_stdio_h='"'$gl_header'"'
33978
33979
33980fi
33981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
33982$as_echo "$gl_cv_next_stdio_h" >&6; }
33983     fi
33984     NEXT_STDIO_H=$gl_cv_next_stdio_h
33985
33986     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
33987       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
33988       gl_next_as_first_directive='<'stdio.h'>'
33989     else
33990       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
33991       gl_next_as_first_directive=$gl_cv_next_stdio_h
33992     fi
33993     NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
33994
33995
33996
33997
33998
33999        { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
34000$as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
34001if ${gl_cv_func_printf_attribute_flavor+:} false; then :
34002  $as_echo_n "(cached) " >&6
34003else
34004  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34005/* end confdefs.h.  */
34006
34007       #define __STDC_FORMAT_MACROS 1
34008       #include <stdio.h>
34009       #include <inttypes.h>
34010       /* For non-mingw systems, compilation will trivially succeed.
34011          For mingw, compilation will succeed for older mingw (system
34012          printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
34013       #if (defined _WIN32 && ! defined __CYGWIN__) && \
34014         (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
34015       extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
34016       #endif
34017
34018int
34019main ()
34020{
34021
34022  ;
34023  return 0;
34024}
34025_ACEOF
34026if ac_fn_c_try_compile "$LINENO"; then :
34027  gl_cv_func_printf_attribute_flavor=system
34028else
34029  gl_cv_func_printf_attribute_flavor=gnu
34030fi
34031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34032fi
34033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
34034$as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
34035  if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
34036
34037$as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
34038
34039  fi
34040
34041      GNULIB_FSCANF=1
34042
34043
34044cat >>confdefs.h <<_ACEOF
34045#define GNULIB_FSCANF 1
34046_ACEOF
34047
34048
34049  GNULIB_SCANF=1
34050
34051
34052cat >>confdefs.h <<_ACEOF
34053#define GNULIB_SCANF 1
34054_ACEOF
34055
34056
34057  GNULIB_FGETC=1
34058  GNULIB_GETC=1
34059  GNULIB_GETCHAR=1
34060  GNULIB_FGETS=1
34061  GNULIB_FREAD=1
34062
34063
34064      GNULIB_FPRINTF=1
34065  GNULIB_PRINTF=1
34066  GNULIB_VFPRINTF=1
34067  GNULIB_VPRINTF=1
34068  GNULIB_FPUTC=1
34069  GNULIB_PUTC=1
34070  GNULIB_PUTCHAR=1
34071  GNULIB_FPUTS=1
34072  GNULIB_PUTS=1
34073  GNULIB_FWRITE=1
34074
34075
34076
34077
34078
34079
34080
34081
34082
34083
34084  if test $ac_cv_have_decl_fcloseall = no; then
34085    HAVE_DECL_FCLOSEALL=0
34086  fi
34087
34088
34089
34090
34091
34092
34093
34094
34095
34096
34097
34098     if test $gl_cv_have_include_next = yes; then
34099       gl_cv_next_stdlib_h='<'stdlib.h'>'
34100     else
34101       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
34102$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
34103if ${gl_cv_next_stdlib_h+:} false; then :
34104  $as_echo_n "(cached) " >&6
34105else
34106
34107
34108
34109  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34110/* end confdefs.h.  */
34111#include <stdlib.h>
34112_ACEOF
34113                case "$host_os" in
34114    aix*) gl_absname_cpp="$ac_cpp -C" ;;
34115    *)    gl_absname_cpp="$ac_cpp" ;;
34116  esac
34117
34118  case "$host_os" in
34119    mingw*)
34120                                          gl_dirsep_regex='[/\\]'
34121      ;;
34122    *)
34123      gl_dirsep_regex='\/'
34124      ;;
34125  esac
34126      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
34127  gl_header_literal_regex=`echo 'stdlib.h' \
34128                           | sed -e "$gl_make_literal_regex_sed"`
34129  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
34130      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
34131      s|^/[^/]|//&|
34132      p
34133      q
34134    }'
34135
34136        gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
34137  sed -n "$gl_absolute_header_sed"`
34138
34139           gl_header=$gl_cv_absolute_stdlib_h
34140           gl_cv_next_stdlib_h='"'$gl_header'"'
34141
34142
34143fi
34144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
34145$as_echo "$gl_cv_next_stdlib_h" >&6; }
34146     fi
34147     NEXT_STDLIB_H=$gl_cv_next_stdlib_h
34148
34149     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
34150       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
34151       gl_next_as_first_directive='<'stdlib.h'>'
34152     else
34153       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
34154       gl_next_as_first_directive=$gl_cv_next_stdlib_h
34155     fi
34156     NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
34157
34158
34159
34160
34161
34162
34163
34164
34165
34166
34167
34168
34169  if test $ac_cv_have_decl_ecvt = no; then
34170    HAVE_DECL_ECVT=0
34171  fi
34172
34173  if test $ac_cv_have_decl_fcvt = no; then
34174    HAVE_DECL_FCVT=0
34175  fi
34176
34177  if test $ac_cv_have_decl_gcvt = no; then
34178    HAVE_DECL_GCVT=0
34179  fi
34180
34181
34182
34183
34184
34185
34186
34187  for ac_func in stpcpy
34188do :
34189  ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
34190if test "x$ac_cv_func_stpcpy" = xyes; then :
34191  cat >>confdefs.h <<_ACEOF
34192#define HAVE_STPCPY 1
34193_ACEOF
34194
34195fi
34196done
34197
34198  if test $ac_cv_func_stpcpy = no; then
34199    HAVE_STPCPY=0
34200  fi
34201
34202  if test $HAVE_STPCPY = 0; then
34203
34204
34205
34206
34207
34208
34209
34210
34211  gl_LIBOBJS="$gl_LIBOBJS stpcpy.$ac_objext"
34212
34213
34214  :
34215
34216  fi
34217
34218
34219
34220
34221
34222          GNULIB_STPCPY=1
34223
34224
34225
34226
34227
34228$as_echo "#define GNULIB_TEST_STPCPY 1" >>confdefs.h
34229
34230
34231
34232
34233
34234
34235  for ac_func in strcasecmp
34236do :
34237  ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
34238if test "x$ac_cv_func_strcasecmp" = xyes; then :
34239  cat >>confdefs.h <<_ACEOF
34240#define HAVE_STRCASECMP 1
34241_ACEOF
34242
34243fi
34244done
34245
34246  if test $ac_cv_func_strcasecmp = no; then
34247    HAVE_STRCASECMP=0
34248  fi
34249
34250
34251
34252  for ac_func in strncasecmp
34253do :
34254  ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
34255if test "x$ac_cv_func_strncasecmp" = xyes; then :
34256  cat >>confdefs.h <<_ACEOF
34257#define HAVE_STRNCASECMP 1
34258_ACEOF
34259
34260fi
34261done
34262
34263  if test $ac_cv_func_strncasecmp = yes; then
34264    HAVE_STRNCASECMP=1
34265  else
34266    HAVE_STRNCASECMP=0
34267  fi
34268  ac_fn_c_check_decl "$LINENO" "strncasecmp" "ac_cv_have_decl_strncasecmp" "$ac_includes_default"
34269if test "x$ac_cv_have_decl_strncasecmp" = xyes; then :
34270  ac_have_decl=1
34271else
34272  ac_have_decl=0
34273fi
34274
34275cat >>confdefs.h <<_ACEOF
34276#define HAVE_DECL_STRNCASECMP $ac_have_decl
34277_ACEOF
34278
34279  if test $ac_cv_have_decl_strncasecmp = no; then
34280    HAVE_DECL_STRNCASECMP=0
34281  fi
34282
34283
34284  if test $HAVE_STRCASECMP = 0; then
34285
34286
34287
34288
34289
34290
34291
34292
34293  gl_LIBOBJS="$gl_LIBOBJS strcasecmp.$ac_objext"
34294
34295
34296  :
34297
34298  fi
34299  if test $HAVE_STRNCASECMP = 0; then
34300
34301
34302
34303
34304
34305
34306
34307
34308  gl_LIBOBJS="$gl_LIBOBJS strncasecmp.$ac_objext"
34309
34310
34311  :
34312
34313  fi
34314
34315
34316
34317
34318  for ac_func in strchrnul
34319do :
34320  ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
34321if test "x$ac_cv_func_strchrnul" = xyes; then :
34322  cat >>confdefs.h <<_ACEOF
34323#define HAVE_STRCHRNUL 1
34324_ACEOF
34325
34326fi
34327done
34328
34329  if test $ac_cv_func_strchrnul = no; then
34330    HAVE_STRCHRNUL=0
34331  else
34332    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
34333$as_echo_n "checking whether strchrnul works... " >&6; }
34334if ${gl_cv_func_strchrnul_works+:} false; then :
34335  $as_echo_n "(cached) " >&6
34336else
34337  if test "$cross_compiling" = yes; then :
34338           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34339/* end confdefs.h.  */
34340
34341#if defined __CYGWIN__
34342 #include <cygwin/version.h>
34343 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
34344  Lucky user
34345 #endif
34346#else
34347  Lucky user
34348#endif
34349
34350_ACEOF
34351if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34352  $EGREP "Lucky user" >/dev/null 2>&1; then :
34353  gl_cv_func_strchrnul_works="guessing yes"
34354else
34355  gl_cv_func_strchrnul_works="guessing no"
34356fi
34357rm -f conftest*
34358
34359
34360else
34361  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34362/* end confdefs.h.  */
34363
34364#include <string.h> /* for strchrnul */
34365
34366int
34367main ()
34368{
34369const char *buf = "a";
34370      return strchrnul (buf, 'b') != buf + 1;
34371
34372  ;
34373  return 0;
34374}
34375_ACEOF
34376if ac_fn_c_try_run "$LINENO"; then :
34377  gl_cv_func_strchrnul_works=yes
34378else
34379  gl_cv_func_strchrnul_works=no
34380fi
34381rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34382  conftest.$ac_objext conftest.beam conftest.$ac_ext
34383fi
34384
34385
34386fi
34387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
34388$as_echo "$gl_cv_func_strchrnul_works" >&6; }
34389    case "$gl_cv_func_strchrnul_works" in
34390      *yes) ;;
34391      *) REPLACE_STRCHRNUL=1 ;;
34392    esac
34393  fi
34394
34395  if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
34396
34397
34398
34399
34400
34401
34402
34403
34404  gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
34405
34406    :
34407  fi
34408
34409
34410
34411
34412
34413          GNULIB_STRCHRNUL=1
34414
34415
34416
34417
34418
34419$as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
34420
34421
34422
34423
34424
34425
34426  if test $gl_cv_func_malloc_posix != yes; then
34427    REPLACE_STRDUP=1
34428  fi
34429
34430  if test $ac_cv_have_decl_strdup = no; then
34431    HAVE_DECL_STRDUP=0
34432  fi
34433
34434  if test $REPLACE_STRDUP = 1; then
34435
34436
34437
34438
34439
34440
34441
34442
34443  gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
34444
34445    :
34446  fi
34447
34448
34449
34450
34451
34452          GNULIB_STRDUP=1
34453
34454
34455
34456
34457
34458$as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
34459
34460
34461
34462
34463
34464
34465
34466
34467  if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
34468    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
34469$as_echo_n "checking for working strerror function... " >&6; }
34470if ${gl_cv_func_working_strerror+:} false; then :
34471  $as_echo_n "(cached) " >&6
34472else
34473  if test "$cross_compiling" = yes; then :
34474  case "$host_os" in
34475                          # Guess yes on glibc systems.
34476           *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
34477                          # Guess yes on musl systems.
34478           *-musl*)       gl_cv_func_working_strerror="guessing yes" ;;
34479                          # If we don't know, obey --enable-cross-guesses.
34480           *)             gl_cv_func_working_strerror="$gl_cross_guess_normal" ;;
34481         esac
34482
34483else
34484  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34485/* end confdefs.h.  */
34486#include <string.h>
34487
34488int
34489main ()
34490{
34491if (!*strerror (-2)) return 1;
34492  ;
34493  return 0;
34494}
34495_ACEOF
34496if ac_fn_c_try_run "$LINENO"; then :
34497  gl_cv_func_working_strerror=yes
34498else
34499  gl_cv_func_working_strerror=no
34500fi
34501rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34502  conftest.$ac_objext conftest.beam conftest.$ac_ext
34503fi
34504
34505
34506fi
34507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
34508$as_echo "$gl_cv_func_working_strerror" >&6; }
34509    case "$gl_cv_func_working_strerror" in
34510      *yes) ;;
34511      *)
34512                        REPLACE_STRERROR=1
34513        ;;
34514    esac
34515
34516  else
34517            REPLACE_STRERROR=1
34518  fi
34519
34520  if test $REPLACE_STRERROR = 1; then
34521
34522
34523
34524
34525
34526
34527
34528
34529  gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
34530
34531  fi
34532
34533
34534cat >>confdefs.h <<_ACEOF
34535#define GNULIB_STRERROR 1
34536_ACEOF
34537
34538
34539
34540
34541
34542
34543
34544          GNULIB_STRERROR=1
34545
34546
34547
34548
34549
34550$as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
34551
34552
34553
34554
34555
34556  if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
34557
34558
34559
34560
34561
34562
34563
34564
34565  gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
34566
34567
34568
34569
34570
34571  if test $ac_cv_header_sys_socket_h != yes; then
34572                    for ac_header in winsock2.h
34573do :
34574  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
34575if test "x$ac_cv_header_winsock2_h" = xyes; then :
34576  cat >>confdefs.h <<_ACEOF
34577#define HAVE_WINSOCK2_H 1
34578_ACEOF
34579
34580fi
34581
34582done
34583
34584  fi
34585  if test "$ac_cv_header_winsock2_h" = yes; then
34586    HAVE_WINSOCK2_H=1
34587    UNISTD_H_HAVE_WINSOCK2_H=1
34588    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
34589  else
34590    HAVE_WINSOCK2_H=0
34591  fi
34592
34593
34594  fi
34595
34596
34597
34598
34599
34600
34601
34602
34603
34604
34605
34606
34607  if test $ac_cv_have_decl_strndup = no; then
34608    HAVE_DECL_STRNDUP=0
34609  fi
34610
34611  if test $ac_cv_func_strndup = yes; then
34612    HAVE_STRNDUP=1
34613    # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
34614    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5
34615$as_echo_n "checking for working strndup... " >&6; }
34616if ${gl_cv_func_strndup_works+:} false; then :
34617  $as_echo_n "(cached) " >&6
34618else
34619  if test "$cross_compiling" = yes; then :
34620
34621          case $host_os in
34622            aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";;
34623            *)               gl_cv_func_strndup_works="guessing yes";;
34624          esac
34625
34626else
34627  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34628/* end confdefs.h.  */
34629
34630         #include <string.h>
34631                           #include <stdlib.h>
34632int
34633main ()
34634{
34635
34636#if !HAVE_DECL_STRNDUP
34637  extern
34638  #ifdef __cplusplus
34639  "C"
34640  #endif
34641  char *strndup (const char *, size_t);
34642#endif
34643  int result;
34644  char *s;
34645  s = strndup ("some longer string", 15);
34646  free (s);
34647  s = strndup ("shorter string", 13);
34648  result = s[13] != '\0';
34649  free (s);
34650  return result;
34651  ;
34652  return 0;
34653}
34654_ACEOF
34655if ac_fn_c_try_run "$LINENO"; then :
34656  gl_cv_func_strndup_works=yes
34657else
34658  gl_cv_func_strndup_works=no
34659fi
34660rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34661  conftest.$ac_objext conftest.beam conftest.$ac_ext
34662fi
34663
34664fi
34665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5
34666$as_echo "$gl_cv_func_strndup_works" >&6; }
34667    case $gl_cv_func_strndup_works in
34668      *no) REPLACE_STRNDUP=1 ;;
34669    esac
34670  else
34671    HAVE_STRNDUP=0
34672  fi
34673
34674  if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
34675
34676
34677
34678
34679
34680
34681
34682
34683  gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext"
34684
34685  fi
34686
34687
34688
34689
34690
34691          GNULIB_STRNDUP=1
34692
34693
34694
34695
34696
34697$as_echo "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h
34698
34699
34700
34701
34702
34703
34704
34705
34706
34707  if test $ac_cv_have_decl_strnlen = no; then
34708    HAVE_DECL_STRNLEN=0
34709  else
34710
34711         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
34712$as_echo_n "checking for working strnlen... " >&6; }
34713if ${ac_cv_func_strnlen_working+:} false; then :
34714  $as_echo_n "(cached) " >&6
34715else
34716  if test "$cross_compiling" = yes; then :
34717  # Guess no on AIX systems, yes otherwise.
34718		case "$host_os" in
34719		  aix*) ac_cv_func_strnlen_working=no;;
34720		  *)    ac_cv_func_strnlen_working=yes;;
34721		esac
34722else
34723  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34724/* end confdefs.h.  */
34725$ac_includes_default
34726int
34727main ()
34728{
34729
34730#define S "foobar"
34731#define S_LEN (sizeof S - 1)
34732
34733  /* At least one implementation is buggy: that of AIX 4.3 would
34734     give strnlen (S, 1) == 3.  */
34735
34736  int i;
34737  for (i = 0; i < S_LEN + 1; ++i)
34738    {
34739      int expected = i <= S_LEN ? i : S_LEN;
34740      if (strnlen (S, i) != expected)
34741	return 1;
34742    }
34743  return 0;
34744
34745  ;
34746  return 0;
34747}
34748_ACEOF
34749if ac_fn_c_try_run "$LINENO"; then :
34750  ac_cv_func_strnlen_working=yes
34751else
34752  ac_cv_func_strnlen_working=no
34753fi
34754rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34755  conftest.$ac_objext conftest.beam conftest.$ac_ext
34756fi
34757
34758fi
34759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
34760$as_echo "$ac_cv_func_strnlen_working" >&6; }
34761test $ac_cv_func_strnlen_working = no && :
34762
34763
34764    if test $ac_cv_func_strnlen_working = no; then
34765      REPLACE_STRNLEN=1
34766    fi
34767  fi
34768
34769  if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
34770
34771
34772
34773
34774
34775
34776
34777
34778  gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
34779
34780    :
34781  fi
34782
34783
34784
34785
34786
34787          GNULIB_STRNLEN=1
34788
34789
34790
34791
34792
34793$as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
34794
34795
34796
34797
34798
34799
34800
34801
34802  if test "$ac_cv_have_decl_strtoimax" != yes; then
34803    HAVE_DECL_STRTOIMAX=0
34804  fi
34805
34806  if test "$ac_cv_func_strtoimax" = yes; then
34807    HAVE_STRTOIMAX=1
34808             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtoimax works" >&5
34809$as_echo_n "checking whether strtoimax works... " >&6; }
34810if ${gl_cv_func_strtoimax+:} false; then :
34811  $as_echo_n "(cached) " >&6
34812else
34813  if test "$cross_compiling" = yes; then :
34814  case "$host_os" in
34815                    # Guess no on AIX 5.
34816            aix5*)  gl_cv_func_strtoimax="guessing no" ;;
34817                    # Guess yes on native Windows.
34818            mingw*) gl_cv_func_strtoimax="guessing yes" ;;
34819                    # Guess yes otherwise.
34820            *)      gl_cv_func_strtoimax="guessing yes" ;;
34821          esac
34822
34823else
34824  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34825/* end confdefs.h.  */
34826
34827#include <errno.h>
34828#include <string.h>
34829#include <inttypes.h>
34830int main ()
34831{
34832  if (sizeof (intmax_t) > sizeof (int))
34833    {
34834      const char *s = "4294967295";
34835      char *p;
34836      intmax_t res;
34837      errno = 0;
34838      res = strtoimax (s, &p, 10);
34839      if (p != s + strlen (s))
34840        return 1;
34841      if (errno != 0)
34842        return 2;
34843      if (res != (intmax_t) 65535 * (intmax_t) 65537)
34844        return 3;
34845    }
34846  else
34847    {
34848      const char *s = "2147483647";
34849      char *p;
34850      intmax_t res;
34851      errno = 0;
34852      res = strtoimax (s, &p, 10);
34853      if (p != s + strlen (s))
34854        return 1;
34855      if (errno != 0)
34856        return 2;
34857      if (res != 2147483647)
34858        return 3;
34859    }
34860  return 0;
34861}
34862
34863_ACEOF
34864if ac_fn_c_try_run "$LINENO"; then :
34865  gl_cv_func_strtoimax=yes
34866else
34867  gl_cv_func_strtoimax=no
34868fi
34869rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34870  conftest.$ac_objext conftest.beam conftest.$ac_ext
34871fi
34872
34873
34874fi
34875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax" >&5
34876$as_echo "$gl_cv_func_strtoimax" >&6; }
34877    case "$gl_cv_func_strtoimax" in
34878      *no) REPLACE_STRTOIMAX=1 ;;
34879    esac
34880  else
34881    if test "$ac_cv_have_decl_strtoimax" = yes; then
34882      # HP-UX 11.11 has "#define strtoimax(...) ..." but no function.
34883      REPLACE_STRTOIMAX=1
34884    fi
34885    HAVE_STRTOIMAX=0
34886  fi
34887
34888  if test $HAVE_DECL_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
34889
34890
34891
34892
34893
34894
34895
34896
34897  gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext"
34898
34899
34900  ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
34901if test "x$ac_cv_have_decl_strtoll" = xyes; then :
34902  ac_have_decl=1
34903else
34904  ac_have_decl=0
34905fi
34906
34907cat >>confdefs.h <<_ACEOF
34908#define HAVE_DECL_STRTOLL $ac_have_decl
34909_ACEOF
34910
34911
34912  fi
34913
34914
34915
34916
34917
34918          GNULIB_STRTOIMAX=1
34919
34920
34921
34922
34923
34924  for ac_func in strtol
34925do :
34926  ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
34927if test "x$ac_cv_func_strtol" = xyes; then :
34928  cat >>confdefs.h <<_ACEOF
34929#define HAVE_STRTOL 1
34930_ACEOF
34931
34932fi
34933done
34934
34935
34936  if test $ac_cv_func_strtol = no; then
34937
34938
34939
34940
34941
34942
34943
34944
34945  gl_LIBOBJS="$gl_LIBOBJS strtol.$ac_objext"
34946
34947  fi
34948
34949
34950  for ac_func in strtoll
34951do :
34952  ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
34953if test "x$ac_cv_func_strtoll" = xyes; then :
34954  cat >>confdefs.h <<_ACEOF
34955#define HAVE_STRTOLL 1
34956_ACEOF
34957
34958fi
34959done
34960
34961  if test $ac_cv_func_strtoll = no; then
34962    HAVE_STRTOLL=0
34963  fi
34964
34965  if test $HAVE_STRTOLL = 0; then
34966
34967
34968
34969
34970
34971
34972
34973
34974  gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext"
34975
34976
34977  :
34978
34979  fi
34980
34981
34982
34983
34984
34985          GNULIB_STRTOLL=1
34986
34987
34988
34989
34990
34991$as_echo "#define GNULIB_TEST_STRTOLL 1" >>confdefs.h
34992
34993
34994
34995
34996  for ac_func in strtoul
34997do :
34998  ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul"
34999if test "x$ac_cv_func_strtoul" = xyes; then :
35000  cat >>confdefs.h <<_ACEOF
35001#define HAVE_STRTOUL 1
35002_ACEOF
35003
35004fi
35005done
35006
35007
35008  if test $ac_cv_func_strtoul = no; then
35009
35010
35011
35012
35013
35014
35015
35016
35017  gl_LIBOBJS="$gl_LIBOBJS strtoul.$ac_objext"
35018
35019  fi
35020
35021
35022  for ac_func in strtoull
35023do :
35024  ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
35025if test "x$ac_cv_func_strtoull" = xyes; then :
35026  cat >>confdefs.h <<_ACEOF
35027#define HAVE_STRTOULL 1
35028_ACEOF
35029
35030fi
35031done
35032
35033  if test $ac_cv_func_strtoull = no; then
35034    HAVE_STRTOULL=0
35035  fi
35036
35037  if test $HAVE_STRTOULL = 0; then
35038
35039
35040
35041
35042
35043
35044
35045
35046  gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
35047
35048
35049  :
35050
35051  fi
35052
35053
35054
35055
35056
35057          GNULIB_STRTOULL=1
35058
35059
35060
35061
35062
35063$as_echo "#define GNULIB_TEST_STRTOULL 1" >>confdefs.h
35064
35065
35066
35067
35068
35069
35070
35071
35072  if test "$ac_cv_have_decl_strtoumax" = yes; then
35073    if test "$ac_cv_func_strtoumax" != yes; then
35074      # HP-UX 11.11 has "#define strtoimax(...) ..." but no function.
35075      REPLACE_STRTOUMAX=1
35076    fi
35077  else
35078    HAVE_DECL_STRTOUMAX=0
35079  fi
35080
35081  if test $HAVE_DECL_STRTOUMAX = 0 || test $REPLACE_STRTOUMAX = 1; then
35082
35083
35084
35085
35086
35087
35088
35089
35090  gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext"
35091
35092
35093  ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
35094if test "x$ac_cv_have_decl_strtoull" = xyes; then :
35095  ac_have_decl=1
35096else
35097  ac_have_decl=0
35098fi
35099
35100cat >>confdefs.h <<_ACEOF
35101#define HAVE_DECL_STRTOULL $ac_have_decl
35102_ACEOF
35103
35104
35105  fi
35106
35107
35108
35109
35110
35111          GNULIB_STRTOUMAX=1
35112
35113
35114
35115
35116
35117
35118
35119        if test $ac_cv_func_symlink = no; then
35120    HAVE_SYMLINK=0
35121  else
35122    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
35123$as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
35124if ${gl_cv_func_symlink_works+:} false; then :
35125  $as_echo_n "(cached) " >&6
35126else
35127  if test "$cross_compiling" = yes; then :
35128  case "$host_os" in
35129                             # Guess yes on Linux systems.
35130            linux-* | linux) gl_cv_func_symlink_works="guessing yes" ;;
35131                             # Guess yes on glibc systems.
35132            *-gnu* | gnu*)   gl_cv_func_symlink_works="guessing yes" ;;
35133                             # If we don't know, obey --enable-cross-guesses.
35134            *)               gl_cv_func_symlink_works="$gl_cross_guess_normal" ;;
35135          esac
35136
35137else
35138  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35139/* end confdefs.h.  */
35140#include <unistd.h>
35141
35142int
35143main ()
35144{
35145int result = 0;
35146             if (!symlink ("a", "conftest.link/"))
35147               result |= 1;
35148             if (symlink ("conftest.f", "conftest.lnk2"))
35149               result |= 2;
35150             else if (!symlink ("a", "conftest.lnk2/"))
35151               result |= 4;
35152             return result;
35153
35154  ;
35155  return 0;
35156}
35157_ACEOF
35158if ac_fn_c_try_run "$LINENO"; then :
35159  gl_cv_func_symlink_works=yes
35160else
35161  gl_cv_func_symlink_works=no
35162fi
35163rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35164  conftest.$ac_objext conftest.beam conftest.$ac_ext
35165fi
35166
35167      rm -f conftest.f conftest.link conftest.lnk2
35168fi
35169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
35170$as_echo "$gl_cv_func_symlink_works" >&6; }
35171    case "$gl_cv_func_symlink_works" in
35172      *yes) ;;
35173      *)
35174        REPLACE_SYMLINK=1
35175        ;;
35176    esac
35177  fi
35178
35179  if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
35180
35181
35182
35183
35184
35185
35186
35187
35188  gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext"
35189
35190  fi
35191
35192
35193
35194
35195
35196          GNULIB_SYMLINK=1
35197
35198
35199
35200
35201
35202$as_echo "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
35203
35204
35205
35206
35207
35208
35209
35210
35211  if test $ac_cv_func_symlinkat = no; then
35212    HAVE_SYMLINKAT=0
35213  else
35214    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlinkat handles trailing slash correctly" >&5
35215$as_echo_n "checking whether symlinkat handles trailing slash correctly... " >&6; }
35216if ${gl_cv_func_symlinkat_works+:} false; then :
35217  $as_echo_n "(cached) " >&6
35218else
35219  if test "$cross_compiling" = yes; then :
35220  case "$host_os" in
35221                             # Guess yes on Linux systems.
35222            linux-* | linux) gl_cv_func_symlinkat_works="guessing yes" ;;
35223                             # Guess yes on glibc systems.
35224            *-gnu* | gnu*)   gl_cv_func_symlinkat_works="guessing yes" ;;
35225                             # If we don't know, obey --enable-cross-guesses.
35226            *)               gl_cv_func_symlinkat_works="$gl_cross_guess_normal" ;;
35227          esac
35228
35229else
35230  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35231/* end confdefs.h.  */
35232#include <fcntl.h>
35233             #include <unistd.h>
35234
35235int
35236main ()
35237{
35238int result = 0;
35239             if (!symlinkat ("a", AT_FDCWD, "conftest.link/"))
35240               result |= 1;
35241             if (symlinkat ("conftest.f", AT_FDCWD, "conftest.lnk2"))
35242               result |= 2;
35243             else if (!symlinkat ("a", AT_FDCWD, "conftest.lnk2/"))
35244               result |= 4;
35245             return result;
35246
35247  ;
35248  return 0;
35249}
35250_ACEOF
35251if ac_fn_c_try_run "$LINENO"; then :
35252  gl_cv_func_symlinkat_works=yes
35253else
35254  gl_cv_func_symlinkat_works=no
35255fi
35256rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35257  conftest.$ac_objext conftest.beam conftest.$ac_ext
35258fi
35259
35260      rm -f conftest.f conftest.link conftest.lnk2
35261fi
35262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlinkat_works" >&5
35263$as_echo "$gl_cv_func_symlinkat_works" >&6; }
35264    case "$gl_cv_func_symlinkat_works" in
35265      *yes) ;;
35266      *)
35267        REPLACE_SYMLINKAT=1
35268        ;;
35269    esac
35270  fi
35271
35272  if test $HAVE_SYMLINKAT = 0 || test $REPLACE_SYMLINKAT = 1; then
35273
35274
35275
35276
35277
35278
35279
35280
35281  gl_LIBOBJS="$gl_LIBOBJS symlinkat.$ac_objext"
35282
35283  fi
35284
35285
35286
35287
35288
35289          GNULIB_SYMLINKAT=1
35290
35291
35292
35293
35294
35295$as_echo "#define GNULIB_TEST_SYMLINKAT 1" >>confdefs.h
35296
35297
35298
35299
35300
35301
35302
35303
35304
35305
35306
35307
35308
35309
35310     if test $gl_cv_have_include_next = yes; then
35311       gl_cv_next_sys_random_h='<'sys/random.h'>'
35312     else
35313       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/random.h>" >&5
35314$as_echo_n "checking absolute name of <sys/random.h>... " >&6; }
35315if ${gl_cv_next_sys_random_h+:} false; then :
35316  $as_echo_n "(cached) " >&6
35317else
35318
35319             if test $ac_cv_header_sys_random_h = yes; then
35320
35321
35322
35323
35324  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35325/* end confdefs.h.  */
35326#include <sys/random.h>
35327_ACEOF
35328                case "$host_os" in
35329    aix*) gl_absname_cpp="$ac_cpp -C" ;;
35330    *)    gl_absname_cpp="$ac_cpp" ;;
35331  esac
35332
35333  case "$host_os" in
35334    mingw*)
35335                                          gl_dirsep_regex='[/\\]'
35336      ;;
35337    *)
35338      gl_dirsep_regex='\/'
35339      ;;
35340  esac
35341      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
35342  gl_header_literal_regex=`echo 'sys/random.h' \
35343                           | sed -e "$gl_make_literal_regex_sed"`
35344  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
35345      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
35346      s|^/[^/]|//&|
35347      p
35348      q
35349    }'
35350
35351        gl_cv_absolute_sys_random_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
35352  sed -n "$gl_absolute_header_sed"`
35353
35354           gl_header=$gl_cv_absolute_sys_random_h
35355           gl_cv_next_sys_random_h='"'$gl_header'"'
35356          else
35357               gl_cv_next_sys_random_h='<'sys/random.h'>'
35358             fi
35359
35360
35361fi
35362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_random_h" >&5
35363$as_echo "$gl_cv_next_sys_random_h" >&6; }
35364     fi
35365     NEXT_SYS_RANDOM_H=$gl_cv_next_sys_random_h
35366
35367     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
35368       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
35369       gl_next_as_first_directive='<'sys/random.h'>'
35370     else
35371       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
35372       gl_next_as_first_directive=$gl_cv_next_sys_random_h
35373     fi
35374     NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H=$gl_next_as_first_directive
35375
35376
35377
35378
35379  if test $ac_cv_header_sys_random_h = yes; then
35380    HAVE_SYS_RANDOM_H=1
35381  else
35382    HAVE_SYS_RANDOM_H=0
35383  fi
35384
35385
35386
35387  if test $ac_cv_header_sys_random_h = yes; then
35388    UNISTD_H_HAVE_SYS_RANDOM_H=1
35389  fi
35390
35391
35392
35393
35394
35395
35396
35397
35398
35399
35400
35401
35402
35403
35404
35405
35406
35407
35408
35409
35410     if test $gl_cv_have_include_next = yes; then
35411       gl_cv_next_sys_stat_h='<'sys/stat.h'>'
35412     else
35413       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
35414$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
35415if ${gl_cv_next_sys_stat_h+:} false; then :
35416  $as_echo_n "(cached) " >&6
35417else
35418
35419             if test $ac_cv_header_sys_stat_h = yes; then
35420
35421
35422
35423
35424  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35425/* end confdefs.h.  */
35426#include <sys/stat.h>
35427_ACEOF
35428                case "$host_os" in
35429    aix*) gl_absname_cpp="$ac_cpp -C" ;;
35430    *)    gl_absname_cpp="$ac_cpp" ;;
35431  esac
35432
35433  case "$host_os" in
35434    mingw*)
35435                                          gl_dirsep_regex='[/\\]'
35436      ;;
35437    *)
35438      gl_dirsep_regex='\/'
35439      ;;
35440  esac
35441      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
35442  gl_header_literal_regex=`echo 'sys/stat.h' \
35443                           | sed -e "$gl_make_literal_regex_sed"`
35444  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
35445      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
35446      s|^/[^/]|//&|
35447      p
35448      q
35449    }'
35450
35451        gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
35452  sed -n "$gl_absolute_header_sed"`
35453
35454           gl_header=$gl_cv_absolute_sys_stat_h
35455           gl_cv_next_sys_stat_h='"'$gl_header'"'
35456          else
35457               gl_cv_next_sys_stat_h='<'sys/stat.h'>'
35458             fi
35459
35460
35461fi
35462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
35463$as_echo "$gl_cv_next_sys_stat_h" >&6; }
35464     fi
35465     NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
35466
35467     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
35468       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
35469       gl_next_as_first_directive='<'sys/stat.h'>'
35470     else
35471       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
35472       gl_next_as_first_directive=$gl_cv_next_sys_stat_h
35473     fi
35474     NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
35475
35476
35477
35478
35479
35480
35481
35482
35483    WINDOWS_STAT_TIMESPEC=0
35484
35485
35486
35487
35488
35489
35490
35491
35492      ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
35493     #include <sys/stat.h>
35494"
35495if test "x$ac_cv_type_nlink_t" = xyes; then :
35496
35497else
35498
35499$as_echo "#define nlink_t int" >>confdefs.h
35500
35501fi
35502
35503
35504
35505
35506
35507
35508
35509
35510
35511
35512
35513
35514
35515
35516
35517
35518
35519  if test $ac_cv_header_sysexits_h = yes; then
35520    HAVE_SYSEXITS_H=1
35521
35522
35523
35524
35525
35526
35527
35528
35529
35530     if test $gl_cv_have_include_next = yes; then
35531       gl_cv_next_sysexits_h='<'sysexits.h'>'
35532     else
35533       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sysexits.h>" >&5
35534$as_echo_n "checking absolute name of <sysexits.h>... " >&6; }
35535if ${gl_cv_next_sysexits_h+:} false; then :
35536  $as_echo_n "(cached) " >&6
35537else
35538
35539             if test $ac_cv_header_sysexits_h = yes; then
35540
35541
35542
35543
35544  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35545/* end confdefs.h.  */
35546#include <sysexits.h>
35547_ACEOF
35548                case "$host_os" in
35549    aix*) gl_absname_cpp="$ac_cpp -C" ;;
35550    *)    gl_absname_cpp="$ac_cpp" ;;
35551  esac
35552
35553  case "$host_os" in
35554    mingw*)
35555                                          gl_dirsep_regex='[/\\]'
35556      ;;
35557    *)
35558      gl_dirsep_regex='\/'
35559      ;;
35560  esac
35561      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
35562  gl_header_literal_regex=`echo 'sysexits.h' \
35563                           | sed -e "$gl_make_literal_regex_sed"`
35564  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
35565      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
35566      s|^/[^/]|//&|
35567      p
35568      q
35569    }'
35570
35571        gl_cv_absolute_sysexits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
35572  sed -n "$gl_absolute_header_sed"`
35573
35574           gl_header=$gl_cv_absolute_sysexits_h
35575           gl_cv_next_sysexits_h='"'$gl_header'"'
35576          else
35577               gl_cv_next_sysexits_h='<'sysexits.h'>'
35578             fi
35579
35580
35581fi
35582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sysexits_h" >&5
35583$as_echo "$gl_cv_next_sysexits_h" >&6; }
35584     fi
35585     NEXT_SYSEXITS_H=$gl_cv_next_sysexits_h
35586
35587     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
35588       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
35589       gl_next_as_first_directive='<'sysexits.h'>'
35590     else
35591       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
35592       gl_next_as_first_directive=$gl_cv_next_sysexits_h
35593     fi
35594     NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H=$gl_next_as_first_directive
35595
35596
35597
35598
35599    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35600/* end confdefs.h.  */
35601#include <sysexits.h>
35602int
35603main ()
35604{
35605switch (0)
35606          {
35607          case EX_OK:
35608          case EX_USAGE:
35609          case EX_DATAERR:
35610          case EX_NOINPUT:
35611          case EX_NOUSER:
35612          case EX_NOHOST:
35613          case EX_UNAVAILABLE:
35614          case EX_SOFTWARE:
35615          case EX_OSERR:
35616          case EX_OSFILE:
35617          case EX_CANTCREAT:
35618          case EX_IOERR:
35619          case EX_TEMPFAIL:
35620          case EX_PROTOCOL:
35621          case EX_NOPERM:
35622          case EX_CONFIG:
35623            break;
35624          }
35625
35626  ;
35627  return 0;
35628}
35629_ACEOF
35630if ac_fn_c_try_compile "$LINENO"; then :
35631  SYSEXITS_H=
35632else
35633  SYSEXITS_H=sysexits.h
35634fi
35635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35636  else
35637    HAVE_SYSEXITS_H=0
35638    SYSEXITS_H=sysexits.h
35639  fi
35640
35641
35642   if test -n "$SYSEXITS_H"; then
35643  GL_GENERATE_SYSEXITS_H_TRUE=
35644  GL_GENERATE_SYSEXITS_H_FALSE='#'
35645else
35646  GL_GENERATE_SYSEXITS_H_TRUE='#'
35647  GL_GENERATE_SYSEXITS_H_FALSE=
35648fi
35649
35650
35651
35652
35653  :
35654
35655
35656
35657
35658cat >>confdefs.h <<_ACEOF
35659#define GNULIB_TEMPNAME 1
35660_ACEOF
35661
35662
35663
35664
35665
35666
35667
35668
35669
35670
35671
35672      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,
35673         gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
35674         been included before.  */
35675      #if defined __MINGW32__
35676      # include <unistd.h>
35677      #endif
35678      #include <time.h>
35679
35680"
35681if test "x$ac_cv_have_decl_localtime_r" = xyes; then :
35682  ac_have_decl=1
35683else
35684  ac_have_decl=0
35685fi
35686
35687cat >>confdefs.h <<_ACEOF
35688#define HAVE_DECL_LOCALTIME_R $ac_have_decl
35689_ACEOF
35690
35691  if test $ac_cv_have_decl_localtime_r = no; then
35692    HAVE_DECL_LOCALTIME_R=0
35693  fi
35694
35695
35696  if test $ac_cv_func_localtime_r = yes; then
35697    HAVE_LOCALTIME_R=1
35698    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
35699$as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
35700if ${gl_cv_time_r_posix+:} false; then :
35701  $as_echo_n "(cached) " >&6
35702else
35703  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35704/* end confdefs.h.  */
35705/* mingw's <time.h> provides the functions asctime_r, ctime_r,
35706                 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
35707                 been included before.  */
35708              #if defined __MINGW32__
35709              # include <unistd.h>
35710              #endif
35711              #include <time.h>
35712
35713int
35714main ()
35715{
35716/* We don't need to append 'restrict's to the argument types,
35717                 even though the POSIX signature has the 'restrict's,
35718                 since C99 says they can't affect type compatibility.  */
35719              struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
35720              if (ptr) return 0;
35721              /* Check the return type is a pointer.
35722                 On HP-UX 10 it is 'int'.  */
35723              *localtime_r (0, 0);
35724  ;
35725  return 0;
35726}
35727
35728_ACEOF
35729if ac_fn_c_try_compile "$LINENO"; then :
35730  gl_cv_time_r_posix=yes
35731else
35732  gl_cv_time_r_posix=no
35733fi
35734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35735
35736fi
35737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
35738$as_echo "$gl_cv_time_r_posix" >&6; }
35739    if test $gl_cv_time_r_posix = yes; then
35740      REPLACE_LOCALTIME_R=0
35741    else
35742      REPLACE_LOCALTIME_R=1
35743    fi
35744  else
35745    HAVE_LOCALTIME_R=0
35746                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r exists as an inline function" >&5
35747$as_echo_n "checking whether localtime_r exists as an inline function... " >&6; }
35748if ${gl_cv_func_localtime_r_inline+:} false; then :
35749  $as_echo_n "(cached) " >&6
35750else
35751  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35752/* end confdefs.h.  */
35753/* mingw's <time.h> provides the functions asctime_r, ctime_r,
35754                 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
35755                 been included before.  */
35756              #if defined __MINGW32__
35757              # include <unistd.h>
35758              #endif
35759              #include <time.h>
35760
35761int
35762main ()
35763{
35764time_t a;
35765              struct tm r;
35766              localtime_r (&a, &r);
35767
35768  ;
35769  return 0;
35770}
35771
35772_ACEOF
35773if ac_fn_c_try_link "$LINENO"; then :
35774  gl_cv_func_localtime_r_inline=yes
35775else
35776  gl_cv_func_localtime_r_inline=no
35777fi
35778rm -f core conftest.err conftest.$ac_objext \
35779    conftest$ac_exeext conftest.$ac_ext
35780
35781fi
35782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localtime_r_inline" >&5
35783$as_echo "$gl_cv_func_localtime_r_inline" >&6; }
35784    if test $gl_cv_func_localtime_r_inline = yes; then
35785      REPLACE_LOCALTIME_R=1
35786    fi
35787  fi
35788
35789  if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
35790
35791
35792
35793
35794
35795
35796
35797
35798  gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
35799
35800
35801  :
35802
35803  fi
35804
35805
35806
35807
35808
35809          GNULIB_TIME_R=1
35810
35811
35812
35813
35814
35815$as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
35816
35817
35818
35819
35820
35821
35822
35823
35824  # On Mac OS X 10.6, localtime loops forever with some time_t values.
35825  # See Bug#27706, Bug#27736, and
35826  # https://lists.gnu.org/r/bug-gnulib/2017-07/msg00142.html
35827  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime works even near extrema" >&5
35828$as_echo_n "checking whether localtime works even near extrema... " >&6; }
35829if ${gl_cv_func_localtime_works+:} false; then :
35830  $as_echo_n "(cached) " >&6
35831else
35832  gl_cv_func_localtime_works=yes
35833     if test "$cross_compiling" = yes; then :
35834  gl_cv_func_localtime_works="guessing yes"
35835else
35836  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35837/* end confdefs.h.  */
35838#include <stdlib.h>
35839            #include <string.h>
35840            #include <unistd.h>
35841            #include <time.h>
35842
35843int
35844main ()
35845{
35846
35847            time_t t = -67768038400666600;
35848            struct tm *tm;
35849            char *tz = getenv ("TZ");
35850            if (! (tz && strcmp (tz, "QQQ0") == 0))
35851              return 0;
35852            alarm (2);
35853            tm = localtime (&t);
35854            /* Use TM and *TM to suppress over-optimization.  */
35855            return tm && tm->tm_isdst;
35856
35857  ;
35858  return 0;
35859}
35860_ACEOF
35861if ac_fn_c_try_run "$LINENO"; then :
35862  (TZ=QQQ0 ./conftest$EXEEXT) >/dev/null 2>&1 ||
35863           gl_cv_func_localtime_works=no
35864fi
35865rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35866  conftest.$ac_objext conftest.beam conftest.$ac_ext
35867fi
35868
35869fi
35870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localtime_works" >&5
35871$as_echo "$gl_cv_func_localtime_works" >&6; }
35872  if test "$gl_cv_func_localtime_works" = no; then
35873
35874$as_echo "#define HAVE_LOCALTIME_INFLOOP_BUG 1" >>confdefs.h
35875
35876  fi
35877
35878  ac_fn_c_check_type "$LINENO" "timezone_t" "ac_cv_type_timezone_t" "#include <time.h>
35879"
35880if test "x$ac_cv_type_timezone_t" = xyes; then :
35881
35882cat >>confdefs.h <<_ACEOF
35883#define HAVE_TIMEZONE_T 1
35884_ACEOF
35885
35886
35887fi
35888
35889  if test "$ac_cv_type_timezone_t" = yes; then
35890    HAVE_TIMEZONE_T=1
35891  fi
35892
35893  if test $HAVE_TIMEZONE_T = 0; then
35894
35895
35896
35897
35898
35899
35900
35901
35902  gl_LIBOBJS="$gl_LIBOBJS time_rz.$ac_objext"
35903
35904  fi
35905
35906
35907
35908
35909
35910          GNULIB_TIME_RZ=1
35911
35912
35913
35914
35915
35916$as_echo "#define GNULIB_TEST_TIME_RZ 1" >>confdefs.h
35917
35918
35919
35920
35921
35922
35923  REPLACE_TIMEGM=0
35924
35925  if test $ac_cv_func_timegm = yes; then
35926    if test "$gl_cv_func_working_mktime" != yes; then
35927      # Assume that timegm is buggy if mktime is.
35928      REPLACE_TIMEGM=1
35929    fi
35930  else
35931    HAVE_TIMEGM=0
35932  fi
35933
35934  if test $HAVE_TIMEGM = 0 || test $REPLACE_TIMEGM = 1; then
35935
35936
35937
35938
35939
35940
35941
35942
35943  gl_LIBOBJS="$gl_LIBOBJS timegm.$ac_objext"
35944
35945
35946  :
35947
35948  fi
35949
35950
35951
35952
35953
35954          GNULIB_TIMEGM=1
35955
35956
35957
35958
35959
35960$as_echo "#define GNULIB_TEST_TIMEGM 1" >>confdefs.h
35961
35962
35963
35964  :
35965
35966
35967
35968  REPLACE_TZSET=0
35969  case "$host_os" in
35970    mingw*) REPLACE_TZSET=1 ;;
35971  esac
35972
35973  if test $REPLACE_TZSET = 1; then
35974
35975
35976
35977
35978
35979
35980
35981
35982  gl_LIBOBJS="$gl_LIBOBJS tzset.$ac_objext"
35983
35984  fi
35985
35986
35987
35988
35989
35990          GNULIB_TZSET=1
35991
35992
35993
35994
35995
35996$as_echo "#define GNULIB_TEST_TZSET 1" >>confdefs.h
35997
35998
35999
36000
36001
36002
36003
36004
36005
36006
36007
36008
36009
36010
36011
36012     if test $gl_cv_have_include_next = yes; then
36013       gl_cv_next_unistd_h='<'unistd.h'>'
36014     else
36015       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
36016$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
36017if ${gl_cv_next_unistd_h+:} false; then :
36018  $as_echo_n "(cached) " >&6
36019else
36020
36021             if test $ac_cv_header_unistd_h = yes; then
36022
36023
36024
36025
36026  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36027/* end confdefs.h.  */
36028#include <unistd.h>
36029_ACEOF
36030                case "$host_os" in
36031    aix*) gl_absname_cpp="$ac_cpp -C" ;;
36032    *)    gl_absname_cpp="$ac_cpp" ;;
36033  esac
36034
36035  case "$host_os" in
36036    mingw*)
36037                                          gl_dirsep_regex='[/\\]'
36038      ;;
36039    *)
36040      gl_dirsep_regex='\/'
36041      ;;
36042  esac
36043      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
36044  gl_header_literal_regex=`echo 'unistd.h' \
36045                           | sed -e "$gl_make_literal_regex_sed"`
36046  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
36047      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
36048      s|^/[^/]|//&|
36049      p
36050      q
36051    }'
36052
36053        gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
36054  sed -n "$gl_absolute_header_sed"`
36055
36056           gl_header=$gl_cv_absolute_unistd_h
36057           gl_cv_next_unistd_h='"'$gl_header'"'
36058          else
36059               gl_cv_next_unistd_h='<'unistd.h'>'
36060             fi
36061
36062
36063fi
36064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
36065$as_echo "$gl_cv_next_unistd_h" >&6; }
36066     fi
36067     NEXT_UNISTD_H=$gl_cv_next_unistd_h
36068
36069     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
36070       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
36071       gl_next_as_first_directive='<'unistd.h'>'
36072     else
36073       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
36074       gl_next_as_first_directive=$gl_cv_next_unistd_h
36075     fi
36076     NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
36077
36078
36079
36080
36081  if test $ac_cv_header_unistd_h = yes; then
36082    HAVE_UNISTD_H=1
36083  else
36084    HAVE_UNISTD_H=0
36085  fi
36086
36087
36088
36089
36090
36091
36092
36093
36094
36095
36096
36097
36098
36099  if test $ac_cv_have_decl_execvpe = no; then
36100    HAVE_DECL_EXECVPE=0
36101  fi
36102
36103
36104
36105
36106
36107
36108      if  { test "$HAVE_LIBUNISTRING" != yes \
36109    || {
36110
36111
36112
36113            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
36114            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
36115                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
36116                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
36117                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
36118                         }
36119                    }
36120               }
36121
36122
36123
36124
36125       }
36126  }; then
36127    LIBUNISTRING_UNITYPES_H='unitypes.h'
36128  else
36129    LIBUNISTRING_UNITYPES_H=
36130  fi
36131
36132
36133
36134
36135      if  { test "$HAVE_LIBUNISTRING" != yes \
36136    || {
36137
36138
36139
36140            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
36141            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
36142                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
36143                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
36144                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
36145                         }
36146                    }
36147               }
36148
36149
36150
36151
36152       }
36153  }; then
36154    LIBUNISTRING_UNIWIDTH_H='uniwidth.h'
36155  else
36156    LIBUNISTRING_UNIWIDTH_H=
36157  fi
36158
36159
36160
36161
36162       if  { test "$HAVE_LIBUNISTRING" != yes \
36163    || {
36164
36165
36166
36167            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
36168            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
36169                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
36170                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
36171                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 8
36172                         }
36173                    }
36174               }
36175
36176
36177
36178
36179       }
36180  }; then
36181  LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE=
36182  LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#'
36183else
36184  LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#'
36185  LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE=
36186fi
36187
36188
36189
36190
36191
36192
36193
36194    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5
36195$as_echo_n "checking whether unlink honors trailing slashes... " >&6; }
36196if ${gl_cv_func_unlink_honors_slashes+:} false; then :
36197  $as_echo_n "(cached) " >&6
36198else
36199  touch conftest.file
36200     # Assume that if we have lstat, we can also check symlinks.
36201     if test $ac_cv_func_lstat = yes; then
36202       ln -s conftest.file conftest.lnk
36203     fi
36204     if test "$cross_compiling" = yes; then :
36205  case "$host_os" in
36206                          # Guess yes on Linux systems.
36207         linux-* | linux) gl_cv_func_unlink_honors_slashes="guessing yes" ;;
36208                          # Guess yes on glibc systems.
36209         *-gnu*)          gl_cv_func_unlink_honors_slashes="guessing yes" ;;
36210                          # Guess no on native Windows.
36211         mingw*)          gl_cv_func_unlink_honors_slashes="guessing no" ;;
36212                          # If we don't know, obey --enable-cross-guesses.
36213         *)               gl_cv_func_unlink_honors_slashes="$gl_cross_guess_normal" ;;
36214       esac
36215
36216else
36217  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36218/* end confdefs.h.  */
36219#if HAVE_UNISTD_H
36220           # include <unistd.h>
36221           #else /* on Windows with MSVC */
36222           # include <io.h>
36223           #endif
36224           #include <errno.h>
36225
36226
36227$gl_mda_defines
36228
36229int
36230main ()
36231{
36232int result = 0;
36233           if (!unlink ("conftest.file/"))
36234             result |= 1;
36235           else if (errno != ENOTDIR)
36236             result |= 2;
36237#if HAVE_LSTAT
36238           if (!unlink ("conftest.lnk/"))
36239             result |= 4;
36240           else if (errno != ENOTDIR)
36241             result |= 8;
36242#endif
36243           return result;
36244
36245  ;
36246  return 0;
36247}
36248_ACEOF
36249if ac_fn_c_try_run "$LINENO"; then :
36250  gl_cv_func_unlink_honors_slashes=yes
36251else
36252  gl_cv_func_unlink_honors_slashes=no
36253fi
36254rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36255  conftest.$ac_objext conftest.beam conftest.$ac_ext
36256fi
36257
36258     rm -f conftest.file conftest.lnk
36259fi
36260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_honors_slashes" >&5
36261$as_echo "$gl_cv_func_unlink_honors_slashes" >&6; }
36262  case "$gl_cv_func_unlink_honors_slashes" in
36263    *no)
36264      REPLACE_UNLINK=1
36265      ;;
36266  esac
36267
36268      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink of a parent directory fails as it should" >&5
36269$as_echo_n "checking whether unlink of a parent directory fails as it should... " >&6; }
36270if ${gl_cv_func_unlink_parent_fails+:} false; then :
36271  $as_echo_n "(cached) " >&6
36272else
36273  case "$host_os" in
36274       darwin*)
36275                                                      if {
36276              # Use the mktemp program if available. If not available, hide the error
36277              # message.
36278              tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` &&
36279              test -n "$tmp" && test -d "$tmp"
36280            } ||
36281            {
36282              # Use a simple mkdir command. It is guaranteed to fail if the directory
36283              # already exists.  $RANDOM is bash specific and expands to empty in shells
36284              # other than bash, ksh and zsh.  Its use does not increase security;
36285              # rather, it minimizes the probability of failure in a very cluttered /tmp
36286              # directory.
36287              tmp=/tmp/gt$$-$RANDOM
36288              (umask 077 && mkdir "$tmp")
36289            }; then
36290           mkdir "$tmp/subdir"
36291           GL_SUBDIR_FOR_UNLINK="$tmp/subdir"
36292           export GL_SUBDIR_FOR_UNLINK
36293           if test "$cross_compiling" = yes; then :
36294  # If we don't know, obey --enable-cross-guesses.
36295              gl_cv_func_unlink_parent_fails="$gl_cross_guess_normal"
36296
36297else
36298  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36299/* end confdefs.h.  */
36300
36301                #include <stdlib.h>
36302                #if HAVE_UNISTD_H
36303                # include <unistd.h>
36304                #else /* on Windows with MSVC */
36305                # include <direct.h>
36306                # include <io.h>
36307                #endif
36308
36309
36310$gl_mda_defines
36311
36312                int main ()
36313                {
36314                  int result = 0;
36315                  if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0)
36316                    result |= 1;
36317                  else if (unlink ("..") == 0)
36318                    result |= 2;
36319                  return result;
36320                }
36321
36322_ACEOF
36323if ac_fn_c_try_run "$LINENO"; then :
36324  gl_cv_func_unlink_parent_fails=yes
36325else
36326  gl_cv_func_unlink_parent_fails=no
36327fi
36328rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36329  conftest.$ac_objext conftest.beam conftest.$ac_ext
36330fi
36331
36332           unset GL_SUBDIR_FOR_UNLINK
36333           rm -rf "$tmp"
36334         else
36335           gl_cv_func_unlink_parent_fails="guessing no"
36336         fi
36337         ;;
36338       *)
36339         gl_cv_func_unlink_parent_fails="guessing yes"
36340         ;;
36341     esac
36342
36343fi
36344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_parent_fails" >&5
36345$as_echo "$gl_cv_func_unlink_parent_fails" >&6; }
36346  case "$gl_cv_func_unlink_parent_fails" in
36347    *no)
36348      REPLACE_UNLINK=1
36349
36350$as_echo "#define UNLINK_PARENT_BUG 1" >>confdefs.h
36351
36352      ;;
36353  esac
36354
36355  if test $REPLACE_UNLINK = 1; then
36356
36357
36358
36359
36360
36361
36362
36363
36364  gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext"
36365
36366  fi
36367
36368
36369
36370
36371
36372          GNULIB_UNLINK=1
36373
36374
36375
36376
36377
36378$as_echo "#define GNULIB_TEST_UNLINK 1" >>confdefs.h
36379
36380
36381
36382
36383
36384
36385
36386
36387
36388  if test $ac_cv_func_unlinkat = no; then
36389    HAVE_UNLINKAT=0
36390  else
36391    case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
36392      *no)
36393        # Solaris 9 has *at functions, but uniformly mishandles trailing
36394        # slash in all of them.
36395        REPLACE_UNLINKAT=1
36396        ;;
36397      *)
36398        # GNU/Hurd has unlinkat, but it has the same bug as unlink.
36399        # Darwin has unlinkat, but it has the same UNLINK_PARENT_BUG.
36400        if test $REPLACE_UNLINK = 1; then
36401          REPLACE_UNLINKAT=1
36402        fi
36403        ;;
36404    esac
36405  fi
36406
36407  if test $HAVE_UNLINKAT = 0 || test $REPLACE_UNLINKAT = 1; then
36408
36409
36410
36411
36412
36413
36414
36415
36416  gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext"
36417
36418  fi
36419
36420
36421
36422
36423
36424          GNULIB_UNLINKAT=1
36425
36426
36427
36428
36429
36430$as_echo "#define GNULIB_TEST_UNLINKAT 1" >>confdefs.h
36431
36432
36433
36434
36435
36436
36437
36438  # The Hurd, the Linux kernel, the FreeBSD kernel version 2.2 and later,
36439  # Cygwin, and mingw never let anyone (even root) unlink directories.
36440  # If anyone knows of another system for which unlink can never
36441  # remove a directory, please report it to <bug-coreutils@gnu.org>.
36442  # Unfortunately this is difficult to test for, since it requires root access
36443  # and might create garbage in the file system,
36444  # so the code below simply relies on the kernel name and version number.
36445  case $host_os in
36446  gnu[0-9]* | \
36447  linux-* | linux | \
36448  freebsd2.2* | freebsd[3-9]* | freebsd[1-9][0-9]* | \
36449  cygwin | \
36450  mingw*)
36451
36452$as_echo "#define UNLINK_CANNOT_UNLINK_DIR 1" >>confdefs.h
36453;;
36454  esac
36455
36456
36457
36458$as_echo "#define USE_UNLOCKED_IO 1" >>confdefs.h
36459
36460
36461
36462
36463
36464
36465
36466
36467
36468
36469
36470
36471
36472
36473
36474
36475
36476
36477
36478
36479
36480  if test $ac_cv_have_decl_unsetenv = no; then
36481    HAVE_DECL_UNSETENV=0
36482  fi
36483  for ac_func in unsetenv
36484do :
36485  ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
36486if test "x$ac_cv_func_unsetenv" = xyes; then :
36487  cat >>confdefs.h <<_ACEOF
36488#define HAVE_UNSETENV 1
36489_ACEOF
36490
36491fi
36492done
36493
36494  if test $ac_cv_func_unsetenv = no; then
36495    HAVE_UNSETENV=0
36496  else
36497    HAVE_UNSETENV=1
36498        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
36499$as_echo_n "checking for unsetenv() return type... " >&6; }
36500if ${gt_cv_func_unsetenv_ret+:} false; then :
36501  $as_echo_n "(cached) " >&6
36502else
36503  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36504/* end confdefs.h.  */
36505
36506#undef _BSD
36507#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
36508#include <stdlib.h>
36509extern
36510#ifdef __cplusplus
36511"C"
36512#endif
36513int unsetenv (const char *name);
36514
36515int
36516main ()
36517{
36518
36519  ;
36520  return 0;
36521}
36522_ACEOF
36523if ac_fn_c_try_compile "$LINENO"; then :
36524  gt_cv_func_unsetenv_ret='int'
36525else
36526  gt_cv_func_unsetenv_ret='void'
36527fi
36528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36529fi
36530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
36531$as_echo "$gt_cv_func_unsetenv_ret" >&6; }
36532    if test $gt_cv_func_unsetenv_ret = 'void'; then
36533
36534$as_echo "#define VOID_UNSETENV 1" >>confdefs.h
36535
36536      REPLACE_UNSETENV=1
36537    fi
36538
36539                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
36540$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
36541if ${gl_cv_func_unsetenv_works+:} false; then :
36542  $as_echo_n "(cached) " >&6
36543else
36544  if test "$cross_compiling" = yes; then :
36545  case "$host_os" in
36546                    # Guess yes on glibc systems.
36547            *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
36548                    # If we don't know, obey --enable-cross-guesses.
36549            *)      gl_cv_func_unsetenv_works="$gl_cross_guess_normal" ;;
36550          esac
36551
36552else
36553  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36554/* end confdefs.h.  */
36555
36556            #include <stdlib.h>
36557            #include <errno.h>
36558            extern char **environ;
36559
36560
36561$gl_mda_defines
36562
36563int
36564main ()
36565{
36566
36567            char entry1[] = "a=1";
36568            char entry2[] = "b=2";
36569            char *env[] = { entry1, entry2, NULL };
36570            if (putenv ((char *) "a=1")) return 1;
36571            if (putenv (entry2)) return 2;
36572            entry2[0] = 'a';
36573            unsetenv ("a");
36574            if (getenv ("a")) return 3;
36575            if (!unsetenv ("") || errno != EINVAL) return 4;
36576            entry2[0] = 'b';
36577            environ = env;
36578            if (!getenv ("a")) return 5;
36579            entry2[0] = 'a';
36580            unsetenv ("a");
36581            if (getenv ("a")) return 6;
36582
36583  ;
36584  return 0;
36585}
36586_ACEOF
36587if ac_fn_c_try_run "$LINENO"; then :
36588  gl_cv_func_unsetenv_works=yes
36589else
36590  gl_cv_func_unsetenv_works=no
36591fi
36592rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36593  conftest.$ac_objext conftest.beam conftest.$ac_ext
36594fi
36595
36596
36597fi
36598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
36599$as_echo "$gl_cv_func_unsetenv_works" >&6; }
36600    case "$gl_cv_func_unsetenv_works" in
36601      *yes) ;;
36602      *)
36603        REPLACE_UNSETENV=1
36604        ;;
36605    esac
36606  fi
36607
36608  if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
36609
36610
36611
36612
36613
36614
36615
36616
36617  gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
36618
36619
36620
36621
36622
36623  fi
36624
36625
36626
36627
36628
36629          GNULIB_UNSETENV=1
36630
36631
36632
36633
36634
36635$as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
36636
36637
36638
36639
36640
36641
36642
36643  case "$host_os" in
36644    mingw*)
36645                                    REPLACE_UTIME=1
36646      ;;
36647    *)
36648      for ac_func in utime
36649do :
36650  ac_fn_c_check_func "$LINENO" "utime" "ac_cv_func_utime"
36651if test "x$ac_cv_func_utime" = xyes; then :
36652  cat >>confdefs.h <<_ACEOF
36653#define HAVE_UTIME 1
36654_ACEOF
36655
36656fi
36657done
36658
36659      if test $ac_cv_func_utime = no; then
36660        HAVE_UTIME=0
36661      else
36662                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether utime handles trailing slashes on files" >&5
36663$as_echo_n "checking whether utime handles trailing slashes on files... " >&6; }
36664if ${gl_cv_func_utime_file_slash+:} false; then :
36665  $as_echo_n "(cached) " >&6
36666else
36667  touch conftest.tmp
36668           # Assume that if we have lstat, we can also check symlinks.
36669           if test $ac_cv_func_lstat = yes; then
36670             ln -s conftest.tmp conftest.lnk
36671           fi
36672           if test "$cross_compiling" = yes; then :
36673  case "$host_os" in
36674                                 # Guess yes on Linux systems.
36675                linux-* | linux) gl_cv_func_utime_file_slash="guessing yes" ;;
36676                                 # Guess yes on glibc systems.
36677                *-gnu* | gnu*)   gl_cv_func_utime_file_slash="guessing yes" ;;
36678                                 # Guess no on macOS.
36679                darwin*)         gl_cv_func_utime_file_slash="guessing no" ;;
36680                                 # If we don't know, obey --enable-cross-guesses.
36681                *)               gl_cv_func_utime_file_slash="$gl_cross_guess_normal" ;;
36682              esac
36683
36684else
36685  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36686/* end confdefs.h.  */
36687#include <stddef.h>
36688                 #include <time.h>
36689
36690int
36691main ()
36692{
36693int result = 0;
36694                 if (!utime ("conftest.tmp/", NULL))
36695                   result |= 1;
36696                 #if HAVE_LSTAT
36697                 if (!utime ("conftest.lnk/", NULL))
36698                   result |= 2;
36699                 #endif
36700                 return result;
36701
36702  ;
36703  return 0;
36704}
36705_ACEOF
36706if ac_fn_c_try_run "$LINENO"; then :
36707  gl_cv_func_utime_file_slash=yes
36708else
36709  gl_cv_func_utime_file_slash=no
36710fi
36711rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36712  conftest.$ac_objext conftest.beam conftest.$ac_ext
36713fi
36714
36715           rm -f conftest.tmp conftest.lnk
36716
36717fi
36718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_utime_file_slash" >&5
36719$as_echo "$gl_cv_func_utime_file_slash" >&6; }
36720        case $gl_cv_func_stat_file_slash in
36721          *no)
36722            REPLACE_UTIME=1
36723
36724$as_echo "#define REPLACE_FUNC_UTIME_FILE 1" >>confdefs.h
36725
36726            ;;
36727        esac
36728      fi
36729      ;;
36730  esac
36731
36732  if test $HAVE_UTIME = 0 || test $REPLACE_UTIME = 1; then
36733
36734
36735
36736
36737
36738
36739
36740
36741  gl_LIBOBJS="$gl_LIBOBJS utime.$ac_objext"
36742
36743    :
36744  fi
36745
36746
36747
36748
36749
36750          GNULIB_UTIME=1
36751
36752
36753
36754
36755
36756$as_echo "#define GNULIB_TEST_UTIME 1" >>confdefs.h
36757
36758
36759
36760
36761
36762
36763
36764
36765
36766
36767
36768
36769
36770
36771
36772
36773
36774     if test $gl_cv_have_include_next = yes; then
36775       gl_cv_next_utime_h='<'utime.h'>'
36776     else
36777       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <utime.h>" >&5
36778$as_echo_n "checking absolute name of <utime.h>... " >&6; }
36779if ${gl_cv_next_utime_h+:} false; then :
36780  $as_echo_n "(cached) " >&6
36781else
36782
36783             if test $ac_cv_header_utime_h = yes; then
36784
36785
36786
36787
36788  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36789/* end confdefs.h.  */
36790#include <utime.h>
36791_ACEOF
36792                case "$host_os" in
36793    aix*) gl_absname_cpp="$ac_cpp -C" ;;
36794    *)    gl_absname_cpp="$ac_cpp" ;;
36795  esac
36796
36797  case "$host_os" in
36798    mingw*)
36799                                          gl_dirsep_regex='[/\\]'
36800      ;;
36801    *)
36802      gl_dirsep_regex='\/'
36803      ;;
36804  esac
36805      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
36806  gl_header_literal_regex=`echo 'utime.h' \
36807                           | sed -e "$gl_make_literal_regex_sed"`
36808  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
36809      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
36810      s|^/[^/]|//&|
36811      p
36812      q
36813    }'
36814
36815        gl_cv_absolute_utime_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
36816  sed -n "$gl_absolute_header_sed"`
36817
36818           gl_header=$gl_cv_absolute_utime_h
36819           gl_cv_next_utime_h='"'$gl_header'"'
36820          else
36821               gl_cv_next_utime_h='<'utime.h'>'
36822             fi
36823
36824
36825fi
36826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_utime_h" >&5
36827$as_echo "$gl_cv_next_utime_h" >&6; }
36828     fi
36829     NEXT_UTIME_H=$gl_cv_next_utime_h
36830
36831     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
36832       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
36833       gl_next_as_first_directive='<'utime.h'>'
36834     else
36835       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
36836       gl_next_as_first_directive=$gl_cv_next_utime_h
36837     fi
36838     NEXT_AS_FIRST_DIRECTIVE_UTIME_H=$gl_next_as_first_directive
36839
36840
36841
36842
36843
36844  if test $ac_cv_header_utime_h = yes; then
36845    HAVE_UTIME_H=1
36846  else
36847    HAVE_UTIME_H=0
36848  fi
36849
36850
36851
36852
36853
36854
36855
36856
36857
36858
36859
36860  if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
36861                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
36862$as_echo_n "checking whether futimesat handles NULL file... " >&6; }
36863if ${gl_cv_func_futimesat_works+:} false; then :
36864  $as_echo_n "(cached) " >&6
36865else
36866  touch conftest.file
36867       if test "$cross_compiling" = yes; then :
36868  case "$host_os" in
36869                            # Guess yes on Linux systems.
36870           linux-* | linux) gl_cv_func_futimesat_works="guessing yes" ;;
36871                            # Guess yes on glibc systems.
36872           *-gnu*)          gl_cv_func_futimesat_works="guessing yes" ;;
36873                            # If we don't know, obey --enable-cross-guesses.
36874           *)               gl_cv_func_futimesat_works="$gl_cross_guess_normal" ;;
36875         esac
36876
36877else
36878  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36879/* end confdefs.h.  */
36880
36881#include <stddef.h>
36882#include <sys/times.h>
36883#include <fcntl.h>
36884
36885
36886$gl_mda_defines
36887
36888int
36889main ()
36890{
36891int fd = open ("conftest.file", O_RDWR);
36892          if (fd < 0) return 1;
36893          if (futimesat (fd, NULL, NULL)) return 2;
36894
36895  ;
36896  return 0;
36897}
36898_ACEOF
36899if ac_fn_c_try_run "$LINENO"; then :
36900  gl_cv_func_futimesat_works=yes
36901else
36902  gl_cv_func_futimesat_works=no
36903fi
36904rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36905  conftest.$ac_objext conftest.beam conftest.$ac_ext
36906fi
36907
36908      rm -f conftest.file
36909fi
36910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
36911$as_echo "$gl_cv_func_futimesat_works" >&6; }
36912    case "$gl_cv_func_futimesat_works" in
36913      *yes) ;;
36914      *)
36915
36916$as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
36917
36918        ;;
36919    esac
36920  fi
36921
36922
36923
36924
36925
36926  if test $ac_cv_func_utimensat = no; then
36927    HAVE_UTIMENSAT=0
36928  else
36929    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether utimensat works" >&5
36930$as_echo_n "checking whether utimensat works... " >&6; }
36931if ${gl_cv_func_utimensat_works+:} false; then :
36932  $as_echo_n "(cached) " >&6
36933else
36934  if test "$cross_compiling" = yes; then :
36935  case "$host_os" in
36936            # Guess yes on Linux or glibc systems.
36937            linux-* | linux | *-gnu* | gnu*)
36938              gl_cv_func_utimensat_works="guessing yes" ;;
36939            # Guess 'nearly' on AIX.
36940            aix*)
36941              gl_cv_func_utimensat_works="guessing nearly" ;;
36942            # If we don't know, obey --enable-cross-guesses.
36943            *)
36944              gl_cv_func_utimensat_works="$gl_cross_guess_normal" ;;
36945          esac
36946
36947else
36948  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36949/* end confdefs.h.  */
36950
36951#include <fcntl.h>
36952#include <sys/stat.h>
36953#include <unistd.h>
36954
36955
36956$gl_mda_defines
36957
36958int
36959main ()
36960{
36961int result = 0;
36962              const char *f = "conftest.file";
36963              if (close (creat (f, 0600)))
36964                return 1;
36965              /* Test whether a trailing slash is handled correctly.
36966                 This fails on AIX 7.2.  */
36967              {
36968                struct timespec ts[2];
36969                ts[0].tv_sec = 345183300; ts[0].tv_nsec = 0;
36970                ts[1] = ts[0];
36971                if (utimensat (AT_FDCWD, "conftest.file/", ts, 0) == 0)
36972                  result |= 2;
36973              }
36974              /* Test whether the AT_SYMLINK_NOFOLLOW flag is supported.  */
36975              {
36976                if (utimensat (AT_FDCWD, f, NULL, AT_SYMLINK_NOFOLLOW))
36977                  result |= 4;
36978              }
36979              /* Test whether UTIME_NOW and UTIME_OMIT work.  */
36980              {
36981                struct timespec ts[2];
36982                ts[0].tv_sec = 1;
36983                ts[0].tv_nsec = UTIME_OMIT;
36984                ts[1].tv_sec = 1;
36985                ts[1].tv_nsec = UTIME_NOW;
36986                if (utimensat (AT_FDCWD, f, ts, 0))
36987                  result |= 8;
36988              }
36989              sleep (1);
36990              {
36991                struct stat st;
36992                struct timespec ts[2];
36993                ts[0].tv_sec = 1;
36994                ts[0].tv_nsec = UTIME_NOW;
36995                ts[1].tv_sec = 1;
36996                ts[1].tv_nsec = UTIME_OMIT;
36997                if (utimensat (AT_FDCWD, f, ts, 0))
36998                  result |= 16;
36999                if (stat (f, &st))
37000                  result |= 32;
37001                else if (st.st_ctime < st.st_atime)
37002                  result |= 64;
37003              }
37004              return result;
37005
37006  ;
37007  return 0;
37008}
37009_ACEOF
37010if ac_fn_c_try_run "$LINENO"; then :
37011  gl_cv_func_utimensat_works=yes
37012else
37013  case $? in
37014            2) gl_cv_func_utimensat_works='nearly' ;;
37015            *) gl_cv_func_utimensat_works=no ;;
37016          esac
37017
37018fi
37019rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37020  conftest.$ac_objext conftest.beam conftest.$ac_ext
37021fi
37022
37023
37024fi
37025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_utimensat_works" >&5
37026$as_echo "$gl_cv_func_utimensat_works" >&6; }
37027    case "$gl_cv_func_utimensat_works" in
37028      *yes)
37029        ;;
37030      *nearly)
37031
37032$as_echo "#define HAVE_NEARLY_WORKING_UTIMENSAT 1" >>confdefs.h
37033
37034        REPLACE_UTIMENSAT=1
37035        ;;
37036      *)
37037        REPLACE_UTIMENSAT=1
37038        ;;
37039    esac
37040  fi
37041
37042  if test $HAVE_UTIMENSAT = 0 || test $REPLACE_UTIMENSAT = 1; then
37043
37044
37045
37046
37047
37048
37049
37050
37051  gl_LIBOBJS="$gl_LIBOBJS utimensat.$ac_objext"
37052
37053  fi
37054
37055
37056
37057
37058
37059          GNULIB_UTIMENSAT=1
37060
37061
37062
37063
37064
37065$as_echo "#define GNULIB_TEST_UTIMENSAT 1" >>confdefs.h
37066
37067
37068
37069
37070
37071
37072  if test $ac_cv_func_vasnprintf = no; then
37073
37074
37075
37076
37077
37078
37079
37080
37081
37082
37083  gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
37084
37085
37086
37087
37088
37089
37090
37091
37092
37093  gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
37094
37095
37096
37097
37098
37099
37100
37101
37102
37103  gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
37104
37105
37106
37107
37108
37109
37110
37111
37112
37113  gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
37114
37115  if test $ac_cv_func_vasnprintf = yes; then
37116
37117$as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
37118
37119  fi
37120
37121
37122
37123
37124
37125
37126
37127
37128
37129  ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
37130if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
37131
37132else
37133
37134$as_echo "#define ptrdiff_t long" >>confdefs.h
37135
37136
37137fi
37138
37139
37140
37141
37142
37143
37144
37145  fi
37146
37147
37148  for ac_func in vasprintf
37149do :
37150  ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
37151if test "x$ac_cv_func_vasprintf" = xyes; then :
37152  cat >>confdefs.h <<_ACEOF
37153#define HAVE_VASPRINTF 1
37154_ACEOF
37155
37156fi
37157done
37158
37159  if test $ac_cv_func_vasprintf = no; then
37160
37161
37162
37163
37164
37165
37166
37167
37168
37169  gl_LIBOBJS="$gl_LIBOBJS vasprintf.$ac_objext"
37170
37171
37172
37173
37174
37175
37176
37177
37178
37179  gl_LIBOBJS="$gl_LIBOBJS asprintf.$ac_objext"
37180
37181
37182  if test $ac_cv_func_vasprintf = yes; then
37183    REPLACE_VASPRINTF=1
37184  else
37185    HAVE_VASPRINTF=0
37186  fi
37187
37188
37189
37190
37191
37192
37193
37194
37195  fi
37196
37197
37198
37199
37200
37201
37202          GNULIB_VASPRINTF=1
37203
37204
37205
37206
37207
37208$as_echo "#define GNULIB_TEST_VASPRINTF 1" >>confdefs.h
37209
37210
37211
37212
37213
37214  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=asprintf:2:c-format"
37215
37216
37217
37218  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=vasprintf:2:c-format"
37219
37220
37221# Check whether --with-packager was given.
37222if test "${with_packager+set}" = set; then :
37223  withval=$with_packager;       case $withval in
37224        yes|no) ;;
37225        *)
37226cat >>confdefs.h <<_ACEOF
37227#define PACKAGE_PACKAGER "$withval"
37228_ACEOF
37229 ;;
37230      esac
37231
37232fi
37233
37234
37235
37236# Check whether --with-packager-version was given.
37237if test "${with_packager_version+set}" = set; then :
37238  withval=$with_packager_version;       case $withval in
37239        yes|no) ;;
37240        *)
37241cat >>confdefs.h <<_ACEOF
37242#define PACKAGE_PACKAGER_VERSION "$withval"
37243_ACEOF
37244 ;;
37245      esac
37246
37247fi
37248
37249
37250
37251# Check whether --with-packager-bug-reports was given.
37252if test "${with_packager_bug_reports+set}" = set; then :
37253  withval=$with_packager_bug_reports;       case $withval in
37254        yes|no) ;;
37255        *)
37256cat >>confdefs.h <<_ACEOF
37257#define PACKAGE_PACKAGER_BUG_REPORTS "$withval"
37258_ACEOF
37259 ;;
37260      esac
37261
37262fi
37263
37264
37265  if test "X$with_packager" = "X" && \
37266     test "X$with_packager_version$with_packager_bug_reports" != "X"
37267  then
37268    as_fn_error $? "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5
37269  fi
37270
37271
37272
37273  gl_cv_func_vsnprintf_usable=no
37274  for ac_func in vsnprintf
37275do :
37276  ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
37277if test "x$ac_cv_func_vsnprintf" = xyes; then :
37278  cat >>confdefs.h <<_ACEOF
37279#define HAVE_VSNPRINTF 1
37280_ACEOF
37281
37282fi
37283done
37284
37285  if test $ac_cv_func_vsnprintf = yes; then
37286
37287
37288
37289  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
37290$as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
37291if ${gl_cv_func_snprintf_size1+:} false; then :
37292  $as_echo_n "(cached) " >&6
37293else
37294
37295      if test "$cross_compiling" = yes; then :
37296  case "$host_os" in
37297                            # Guess yes on Android.
37298           linux*-android*) gl_cv_func_snprintf_size1="guessing yes" ;;
37299                            # Guess yes on native Windows.
37300           mingw*)          gl_cv_func_snprintf_size1="guessing yes" ;;
37301           *)               gl_cv_func_snprintf_size1="guessing yes" ;;
37302         esac
37303
37304else
37305  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37306/* end confdefs.h.  */
37307
37308#include <stdio.h>
37309#if HAVE_SNPRINTF
37310# define my_snprintf snprintf
37311#else
37312# include <stdarg.h>
37313static int my_snprintf (char *buf, int size, const char *format, ...)
37314{
37315  va_list args;
37316  int ret;
37317  va_start (args, format);
37318  ret = vsnprintf (buf, size, format, args);
37319  va_end (args);
37320  return ret;
37321}
37322#endif
37323int main()
37324{
37325  static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
37326  my_snprintf (buf, 1, "%d", 12345);
37327  return buf[1] != 'E';
37328}
37329_ACEOF
37330if ac_fn_c_try_run "$LINENO"; then :
37331  gl_cv_func_snprintf_size1=yes
37332else
37333  gl_cv_func_snprintf_size1=no
37334fi
37335rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37336  conftest.$ac_objext conftest.beam conftest.$ac_ext
37337fi
37338
37339
37340fi
37341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
37342$as_echo "$gl_cv_func_snprintf_size1" >&6; }
37343
37344    case "$gl_cv_func_snprintf_size1" in
37345      *yes)
37346
37347        case "$gl_cv_func_snprintf_retval_c99" in
37348          *yes)
37349
37350
37351     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
37352$as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
37353if ${gl_cv_func_printf_positions+:} false; then :
37354  $as_echo_n "(cached) " >&6
37355else
37356
37357      if test "$cross_compiling" = yes; then :
37358
37359         case "$host_os" in
37360           netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
37361                            gl_cv_func_printf_positions="guessing no";;
37362           beos*)           gl_cv_func_printf_positions="guessing no";;
37363                            # Guess yes on Android.
37364           linux*-android*) gl_cv_func_printf_positions="guessing yes";;
37365                            # Guess no on native Windows.
37366           mingw* | pw*)    gl_cv_func_printf_positions="guessing no";;
37367           *)               gl_cv_func_printf_positions="guessing yes";;
37368         esac
37369
37370else
37371  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37372/* end confdefs.h.  */
37373
37374#include <stdio.h>
37375#include <string.h>
37376/* The string "%2$d %1$d", with dollar characters protected from the shell's
37377   dollar expansion (possibly an autoconf bug).  */
37378static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
37379static char buf[100];
37380int main ()
37381{
37382  sprintf (buf, format, 33, 55);
37383  return (strcmp (buf, "55 33") != 0);
37384}
37385_ACEOF
37386if ac_fn_c_try_run "$LINENO"; then :
37387  gl_cv_func_printf_positions=yes
37388else
37389  gl_cv_func_printf_positions=no
37390fi
37391rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37392  conftest.$ac_objext conftest.beam conftest.$ac_ext
37393fi
37394
37395
37396fi
37397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
37398$as_echo "$gl_cv_func_printf_positions" >&6; }
37399
37400            case "$gl_cv_func_printf_positions" in
37401              *yes)
37402                gl_cv_func_vsnprintf_usable=yes
37403                ;;
37404            esac
37405            ;;
37406        esac
37407        ;;
37408    esac
37409  fi
37410  if test $gl_cv_func_vsnprintf_usable = no; then
37411
37412
37413
37414
37415
37416
37417
37418
37419
37420
37421  gl_LIBOBJS="$gl_LIBOBJS vsnprintf.$ac_objext"
37422
37423  if test $ac_cv_func_vsnprintf = yes; then
37424    REPLACE_VSNPRINTF=1
37425  else
37426
37427    if test $ac_cv_have_decl_vsnprintf = yes; then
37428                        REPLACE_VSNPRINTF=1
37429    fi
37430  fi
37431  :
37432
37433  fi
37434
37435  if test $ac_cv_have_decl_vsnprintf = no; then
37436    HAVE_DECL_VSNPRINTF=0
37437  fi
37438
37439
37440
37441
37442
37443
37444          GNULIB_VSNPRINTF=1
37445
37446
37447
37448
37449
37450$as_echo "#define GNULIB_TEST_VSNPRINTF 1" >>confdefs.h
37451
37452
37453
37454
37455
37456
37457
37458
37459
37460
37461
37462
37463
37464
37465
37466     if test $gl_cv_have_include_next = yes; then
37467       gl_cv_next_wchar_h='<'wchar.h'>'
37468     else
37469       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
37470$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
37471if ${gl_cv_next_wchar_h+:} false; then :
37472  $as_echo_n "(cached) " >&6
37473else
37474
37475             if test $ac_cv_header_wchar_h = yes; then
37476
37477
37478
37479
37480  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37481/* end confdefs.h.  */
37482#include <wchar.h>
37483_ACEOF
37484                case "$host_os" in
37485    aix*) gl_absname_cpp="$ac_cpp -C" ;;
37486    *)    gl_absname_cpp="$ac_cpp" ;;
37487  esac
37488
37489  case "$host_os" in
37490    mingw*)
37491                                          gl_dirsep_regex='[/\\]'
37492      ;;
37493    *)
37494      gl_dirsep_regex='\/'
37495      ;;
37496  esac
37497      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
37498  gl_header_literal_regex=`echo 'wchar.h' \
37499                           | sed -e "$gl_make_literal_regex_sed"`
37500  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
37501      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
37502      s|^/[^/]|//&|
37503      p
37504      q
37505    }'
37506
37507        gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
37508  sed -n "$gl_absolute_header_sed"`
37509
37510           gl_header=$gl_cv_absolute_wchar_h
37511           gl_cv_next_wchar_h='"'$gl_header'"'
37512          else
37513               gl_cv_next_wchar_h='<'wchar.h'>'
37514             fi
37515
37516
37517fi
37518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
37519$as_echo "$gl_cv_next_wchar_h" >&6; }
37520     fi
37521     NEXT_WCHAR_H=$gl_cv_next_wchar_h
37522
37523     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
37524       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
37525       gl_next_as_first_directive='<'wchar.h'>'
37526     else
37527       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
37528       gl_next_as_first_directive=$gl_cv_next_wchar_h
37529     fi
37530     NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
37531
37532
37533
37534
37535  if test $ac_cv_header_wchar_h = yes; then
37536    HAVE_WCHAR_H=1
37537  else
37538    HAVE_WCHAR_H=0
37539  fi
37540
37541
37542
37543
37544
37545  if test $gt_cv_c_wint_t = yes; then
37546    HAVE_WINT_T=1
37547  else
37548    HAVE_WINT_T=0
37549  fi
37550
37551
37552
37553
37554
37555
37556
37557
37558
37559
37560  ac_fn_c_check_decl "$LINENO" "wcsdup" "ac_cv_have_decl_wcsdup" "
37561      #include <wchar.h>
37562
37563"
37564if test "x$ac_cv_have_decl_wcsdup" = xyes; then :
37565  ac_have_decl=1
37566else
37567  ac_have_decl=0
37568fi
37569
37570cat >>confdefs.h <<_ACEOF
37571#define HAVE_DECL_WCSDUP $ac_have_decl
37572_ACEOF
37573
37574  if test $ac_cv_have_decl_wcsdup = no; then
37575    HAVE_DECL_WCSDUP=0
37576  fi
37577
37578
37579
37580
37581
37582
37583
37584
37585
37586
37587
37588
37589        if case "$host_os" in
37590       mingw*) true ;;
37591       *) test $ac_cv_func_mbsinit = yes ;;
37592     esac \
37593    && test $ac_cv_func_mbrtowc = yes; then
37594
37595
37596
37597
37598     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
37599$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
37600if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
37601  $as_echo_n "(cached) " >&6
37602else
37603
37604                  case "$host_os" in
37605                     # Guess no on AIX and OSF/1.
37606        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
37607                     # Guess yes otherwise.
37608        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
37609      esac
37610      if test $LOCALE_JA != none; then
37611        if test "$cross_compiling" = yes; then :
37612  :
37613else
37614  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37615/* end confdefs.h.  */
37616
37617#include <locale.h>
37618#include <string.h>
37619#include <wchar.h>
37620int main ()
37621{
37622  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
37623    {
37624      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
37625      mbstate_t state;
37626      wchar_t wc;
37627
37628      memset (&state, '\0', sizeof (mbstate_t));
37629      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
37630        if (mbsinit (&state))
37631          return 2;
37632    }
37633  return 0;
37634}
37635_ACEOF
37636if ac_fn_c_try_run "$LINENO"; then :
37637  gl_cv_func_mbrtowc_incomplete_state=yes
37638else
37639  gl_cv_func_mbrtowc_incomplete_state=no
37640fi
37641rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37642  conftest.$ac_objext conftest.beam conftest.$ac_ext
37643fi
37644
37645      else
37646        if test $LOCALE_FR_UTF8 != none; then
37647          if test "$cross_compiling" = yes; then :
37648  :
37649else
37650  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37651/* end confdefs.h.  */
37652
37653#include <locale.h>
37654#include <string.h>
37655#include <wchar.h>
37656int main ()
37657{
37658  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
37659    {
37660      const char input[] = "B\303\274\303\237er"; /* "Büßer" */
37661      mbstate_t state;
37662      wchar_t wc;
37663
37664      memset (&state, '\0', sizeof (mbstate_t));
37665      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
37666        if (mbsinit (&state))
37667          return 2;
37668    }
37669  return 0;
37670}
37671_ACEOF
37672if ac_fn_c_try_run "$LINENO"; then :
37673  gl_cv_func_mbrtowc_incomplete_state=yes
37674else
37675  gl_cv_func_mbrtowc_incomplete_state=no
37676fi
37677rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37678  conftest.$ac_objext conftest.beam conftest.$ac_ext
37679fi
37680
37681        fi
37682      fi
37683
37684fi
37685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
37686$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
37687
37688
37689
37690
37691     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
37692$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
37693if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
37694  $as_echo_n "(cached) " >&6
37695else
37696
37697                  case "$host_os" in
37698                    # Guess no on Solaris 8.
37699        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
37700                    # Guess yes otherwise.
37701        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
37702      esac
37703      if test $LOCALE_ZH_CN != none; then
37704        if test "$cross_compiling" = yes; then :
37705  :
37706else
37707  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37708/* end confdefs.h.  */
37709
37710#include <locale.h>
37711#include <stdlib.h>
37712#include <string.h>
37713#include <wchar.h>
37714int main ()
37715{
37716  /* This fails on Solaris 8:
37717     mbrtowc returns 2, and sets wc to 0x00F0.
37718     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
37719  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
37720    {
37721      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
37722      mbstate_t state;
37723      wchar_t wc;
37724
37725      memset (&state, '\0', sizeof (mbstate_t));
37726      if (mbrtowc (&wc, input + 3, 6, &state) != 4
37727          && mbtowc (&wc, input + 3, 6) == 4)
37728        return 2;
37729    }
37730  return 0;
37731}
37732_ACEOF
37733if ac_fn_c_try_run "$LINENO"; then :
37734  gl_cv_func_mbrtowc_sanitycheck=yes
37735else
37736  gl_cv_func_mbrtowc_sanitycheck=no
37737fi
37738rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37739  conftest.$ac_objext conftest.beam conftest.$ac_ext
37740fi
37741
37742      fi
37743
37744fi
37745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
37746$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
37747
37748    REPLACE_MBSTATE_T=0
37749    case "$gl_cv_func_mbrtowc_incomplete_state" in
37750      *yes) ;;
37751      *) REPLACE_MBSTATE_T=1 ;;
37752    esac
37753    case "$gl_cv_func_mbrtowc_sanitycheck" in
37754      *yes) ;;
37755      *) REPLACE_MBSTATE_T=1 ;;
37756    esac
37757  else
37758    REPLACE_MBSTATE_T=1
37759  fi
37760
37761
37762
37763  if test $ac_cv_func_wcrtomb = no; then
37764    HAVE_WCRTOMB=0
37765    ac_fn_c_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" "
37766      #include <wchar.h>
37767
37768"
37769if test "x$ac_cv_have_decl_wcrtomb" = xyes; then :
37770  ac_have_decl=1
37771else
37772  ac_have_decl=0
37773fi
37774
37775cat >>confdefs.h <<_ACEOF
37776#define HAVE_DECL_WCRTOMB $ac_have_decl
37777_ACEOF
37778
37779    if test $ac_cv_have_decl_wcrtomb = yes; then
37780                        REPLACE_WCRTOMB=1
37781    fi
37782  else
37783                        if test $REPLACE_WCRTOMB = 0; then
37784
37785
37786
37787
37788
37789             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb works in the C locale" >&5
37790$as_echo_n "checking whether wcrtomb works in the C locale... " >&6; }
37791if ${gl_cv_func_wcrtomb_works+:} false; then :
37792  $as_echo_n "(cached) " >&6
37793else
37794  if test "$cross_compiling" = yes; then :
37795  case "$host_os" in
37796                               # Guess no on Android.
37797              linux*-android*) gl_cv_func_wcrtomb_works="guessing no";;
37798                               # Guess yes otherwise.
37799              *)               gl_cv_func_wcrtomb_works="guessing yes";;
37800            esac
37801
37802else
37803  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37804/* end confdefs.h.  */
37805
37806#include <string.h>
37807#include <stdlib.h>
37808#include <wchar.h>
37809int main ()
37810{
37811  mbstate_t state;
37812  char out[64];
37813  int count;
37814  memset (&state, 0, sizeof (state));
37815  out[0] = 'x';
37816  count = wcrtomb (out, L'a', &state);
37817  return !(count == 1 && out[0] == 'a');
37818}
37819_ACEOF
37820if ac_fn_c_try_run "$LINENO"; then :
37821  gl_cv_func_wcrtomb_works=yes
37822else
37823  gl_cv_func_wcrtomb_works=no
37824fi
37825rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37826  conftest.$ac_objext conftest.beam conftest.$ac_ext
37827fi
37828
37829
37830fi
37831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_works" >&5
37832$as_echo "$gl_cv_func_wcrtomb_works" >&6; }
37833      case "$gl_cv_func_wcrtomb_works" in
37834        *yes) ;;
37835        *)
37836$as_echo "#define WCRTOMB_C_LOCALE_BUG 1" >>confdefs.h
37837
37838           REPLACE_WCRTOMB=1 ;;
37839      esac
37840    fi
37841    if test $REPLACE_WCRTOMB = 0; then
37842      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
37843$as_echo_n "checking whether wcrtomb return value is correct... " >&6; }
37844if ${gl_cv_func_wcrtomb_retval+:} false; then :
37845  $as_echo_n "(cached) " >&6
37846else
37847
37848                              case "$host_os" in
37849            # Guess no on AIX 4, OSF/1, Solaris, native Windows.
37850            aix4* | osf* | solaris* | mingw*) gl_cv_func_wcrtomb_retval="guessing no" ;;
37851            # Guess yes otherwise.
37852            *)                                gl_cv_func_wcrtomb_retval="guessing yes" ;;
37853          esac
37854          if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
37855            if test "$cross_compiling" = yes; then :
37856  :
37857else
37858  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37859/* end confdefs.h.  */
37860
37861#include <locale.h>
37862#include <string.h>
37863#include <wchar.h>
37864#include <stdlib.h>
37865int main ()
37866{
37867  int result = 0;
37868  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
37869    {
37870      if (wcrtomb (NULL, 0, NULL) != 1)
37871        result |= 1;
37872    }
37873  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
37874    {
37875      if (wcrtomb (NULL, 0, NULL) != 1)
37876        result |= 2;
37877      {
37878        wchar_t wc = (wchar_t) 0xBADFACE;
37879        if (mbtowc (&wc, "\303\274", 2) == 2)
37880          if (wcrtomb (NULL, wc, NULL) != 1)
37881            result |= 2;
37882      }
37883    }
37884  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
37885    {
37886      if (wcrtomb (NULL, 0, NULL) != 1)
37887        result |= 4;
37888    }
37889  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
37890    {
37891      if (wcrtomb (NULL, 0, NULL) != 1)
37892        result |= 8;
37893    }
37894  return result;
37895}
37896_ACEOF
37897if ac_fn_c_try_run "$LINENO"; then :
37898  gl_cv_func_wcrtomb_retval=yes
37899else
37900  gl_cv_func_wcrtomb_retval=no
37901fi
37902rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37903  conftest.$ac_objext conftest.beam conftest.$ac_ext
37904fi
37905
37906          fi
37907
37908fi
37909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
37910$as_echo "$gl_cv_func_wcrtomb_retval" >&6; }
37911      case "$gl_cv_func_wcrtomb_retval" in
37912        *yes) ;;
37913        *)
37914$as_echo "#define WCRTOMB_RETVAL_BUG 1" >>confdefs.h
37915
37916           REPLACE_WCRTOMB=1 ;;
37917      esac
37918    fi
37919  fi
37920
37921  if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
37922
37923
37924
37925
37926
37927
37928
37929
37930  gl_LIBOBJS="$gl_LIBOBJS wcrtomb.$ac_objext"
37931
37932
37933  :
37934
37935  fi
37936
37937
37938
37939
37940
37941          GNULIB_WCRTOMB=1
37942
37943
37944
37945
37946
37947$as_echo "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
37948
37949
37950
37951
37952
37953
37954
37955
37956  if test $ac_cv_func_iswcntrl = yes; then
37957    HAVE_ISWCNTRL=1
37958  else
37959    HAVE_ISWCNTRL=0
37960  fi
37961
37962
37963
37964  if test $gt_cv_c_wint_t = yes; then
37965    HAVE_WINT_T=1
37966  else
37967    HAVE_WINT_T=0
37968  fi
37969
37970
37971
37972
37973
37974
37975
37976
37977
37978
37979
37980
37981
37982     if test $gl_cv_have_include_next = yes; then
37983       gl_cv_next_wctype_h='<'wctype.h'>'
37984     else
37985       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
37986$as_echo_n "checking absolute name of <wctype.h>... " >&6; }
37987if ${gl_cv_next_wctype_h+:} false; then :
37988  $as_echo_n "(cached) " >&6
37989else
37990
37991             if test $ac_cv_header_wctype_h = yes; then
37992
37993
37994
37995
37996  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37997/* end confdefs.h.  */
37998#include <wctype.h>
37999_ACEOF
38000                case "$host_os" in
38001    aix*) gl_absname_cpp="$ac_cpp -C" ;;
38002    *)    gl_absname_cpp="$ac_cpp" ;;
38003  esac
38004
38005  case "$host_os" in
38006    mingw*)
38007                                          gl_dirsep_regex='[/\\]'
38008      ;;
38009    *)
38010      gl_dirsep_regex='\/'
38011      ;;
38012  esac
38013      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
38014  gl_header_literal_regex=`echo 'wctype.h' \
38015                           | sed -e "$gl_make_literal_regex_sed"`
38016  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
38017      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
38018      s|^/[^/]|//&|
38019      p
38020      q
38021    }'
38022
38023        gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
38024  sed -n "$gl_absolute_header_sed"`
38025
38026           gl_header=$gl_cv_absolute_wctype_h
38027           gl_cv_next_wctype_h='"'$gl_header'"'
38028          else
38029               gl_cv_next_wctype_h='<'wctype.h'>'
38030             fi
38031
38032
38033fi
38034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
38035$as_echo "$gl_cv_next_wctype_h" >&6; }
38036     fi
38037     NEXT_WCTYPE_H=$gl_cv_next_wctype_h
38038
38039     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
38040       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
38041       gl_next_as_first_directive='<'wctype.h'>'
38042     else
38043       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
38044       gl_next_as_first_directive=$gl_cv_next_wctype_h
38045     fi
38046     NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
38047
38048
38049
38050
38051  if test $ac_cv_header_wctype_h = yes; then
38052    if test $ac_cv_func_iswcntrl = yes; then
38053                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
38054$as_echo_n "checking whether iswcntrl works... " >&6; }
38055if ${gl_cv_func_iswcntrl_works+:} false; then :
38056  $as_echo_n "(cached) " >&6
38057else
38058
38059          if test "$cross_compiling" = yes; then :
38060               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38061/* end confdefs.h.  */
38062#include <stdlib.h>
38063                          #if __GNU_LIBRARY__ == 1
38064                          Linux libc5 i18n is broken.
38065                          #endif
38066int
38067main ()
38068{
38069
38070  ;
38071  return 0;
38072}
38073_ACEOF
38074if ac_fn_c_try_compile "$LINENO"; then :
38075  gl_cv_func_iswcntrl_works="guessing yes"
38076else
38077  gl_cv_func_iswcntrl_works="guessing no"
38078fi
38079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
38080
38081else
38082  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38083/* end confdefs.h.  */
38084
38085               #include <wchar.h>
38086               #include <wctype.h>
38087               int main () { return iswprint ('x') == 0; }
38088
38089_ACEOF
38090if ac_fn_c_try_run "$LINENO"; then :
38091  gl_cv_func_iswcntrl_works=yes
38092else
38093  gl_cv_func_iswcntrl_works=no
38094fi
38095rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38096  conftest.$ac_objext conftest.beam conftest.$ac_ext
38097fi
38098
38099
38100fi
38101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
38102$as_echo "$gl_cv_func_iswcntrl_works" >&6; }
38103    fi
38104    HAVE_WCTYPE_H=1
38105  else
38106    HAVE_WCTYPE_H=0
38107  fi
38108
38109
38110  if test $GNULIB_OVERRIDES_WINT_T = 1; then
38111    REPLACE_ISWCNTRL=1
38112  else
38113    case "$gl_cv_func_iswcntrl_works" in
38114      *yes) REPLACE_ISWCNTRL=0 ;;
38115      *)    REPLACE_ISWCNTRL=1 ;;
38116    esac
38117  fi
38118
38119
38120  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
38121        :
38122  fi
38123
38124  if test $REPLACE_ISWCNTRL = 1; then
38125    REPLACE_TOWLOWER=1
38126  else
38127    for ac_func in towlower
38128do :
38129  ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
38130if test "x$ac_cv_func_towlower" = xyes; then :
38131  cat >>confdefs.h <<_ACEOF
38132#define HAVE_TOWLOWER 1
38133_ACEOF
38134
38135fi
38136done
38137
38138    if test $ac_cv_func_towlower = yes; then
38139      REPLACE_TOWLOWER=0
38140    else
38141      ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "#include <wchar.h>
38142          #if HAVE_WCTYPE_H
38143          # include <wctype.h>
38144          #endif
38145
38146"
38147if test "x$ac_cv_have_decl_towlower" = xyes; then :
38148  ac_have_decl=1
38149else
38150  ac_have_decl=0
38151fi
38152
38153cat >>confdefs.h <<_ACEOF
38154#define HAVE_DECL_TOWLOWER $ac_have_decl
38155_ACEOF
38156
38157      if test $ac_cv_have_decl_towlower = yes; then
38158                                REPLACE_TOWLOWER=1
38159      else
38160        REPLACE_TOWLOWER=0
38161      fi
38162    fi
38163  fi
38164
38165
38166  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
38167        :
38168  fi
38169
38170          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
38171$as_echo_n "checking for wctype_t... " >&6; }
38172if ${gl_cv_type_wctype_t+:} false; then :
38173  $as_echo_n "(cached) " >&6
38174else
38175  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38176/* end confdefs.h.  */
38177#include <wchar.h>
38178            #if HAVE_WCTYPE_H
38179            # include <wctype.h>
38180            #endif
38181            wctype_t a;
38182
38183int
38184main ()
38185{
38186
38187  ;
38188  return 0;
38189}
38190_ACEOF
38191if ac_fn_c_try_compile "$LINENO"; then :
38192  gl_cv_type_wctype_t=yes
38193else
38194  gl_cv_type_wctype_t=no
38195fi
38196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
38197
38198fi
38199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
38200$as_echo "$gl_cv_type_wctype_t" >&6; }
38201  if test $gl_cv_type_wctype_t = no; then
38202    HAVE_WCTYPE_T=0
38203  fi
38204
38205      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
38206$as_echo_n "checking for wctrans_t... " >&6; }
38207if ${gl_cv_type_wctrans_t+:} false; then :
38208  $as_echo_n "(cached) " >&6
38209else
38210  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38211/* end confdefs.h.  */
38212#include <wchar.h>
38213            #include <wctype.h>
38214            wctrans_t a;
38215
38216int
38217main ()
38218{
38219
38220  ;
38221  return 0;
38222}
38223_ACEOF
38224if ac_fn_c_try_compile "$LINENO"; then :
38225  gl_cv_type_wctrans_t=yes
38226else
38227  gl_cv_type_wctrans_t=no
38228fi
38229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
38230
38231fi
38232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
38233$as_echo "$gl_cv_type_wctrans_t" >&6; }
38234  if test $gl_cv_type_wctrans_t = no; then
38235    HAVE_WCTRANS_T=0
38236  fi
38237
38238
38239
38240
38241
38242
38243
38244
38245
38246
38247
38248
38249
38250
38251
38252
38253  ac_fn_c_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" "
38254    #include <wchar.h>
38255
38256"
38257if test "x$ac_cv_have_decl_wcwidth" = xyes; then :
38258  ac_have_decl=1
38259else
38260  ac_have_decl=0
38261fi
38262
38263cat >>confdefs.h <<_ACEOF
38264#define HAVE_DECL_WCWIDTH $ac_have_decl
38265_ACEOF
38266
38267  if test $ac_cv_have_decl_wcwidth != yes; then
38268    HAVE_DECL_WCWIDTH=0
38269  fi
38270
38271  if test $ac_cv_func_wcwidth != yes; then
38272    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcwidth is a macro" >&5
38273$as_echo_n "checking whether wcwidth is a macro... " >&6; }
38274if ${gl_cv_func_wcwidth_macro+:} false; then :
38275  $as_echo_n "(cached) " >&6
38276else
38277  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38278/* end confdefs.h.  */
38279
38280#include <wchar.h>
38281#ifdef wcwidth
38282 wchar_header_defines_wcwidth
38283#endif
38284_ACEOF
38285if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
38286  $EGREP "wchar_header_defines_wcwidth" >/dev/null 2>&1; then :
38287  gl_cv_func_wcwidth_macro=yes
38288else
38289  gl_cv_func_wcwidth_macro=no
38290fi
38291rm -f conftest*
38292
38293
38294fi
38295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_macro" >&5
38296$as_echo "$gl_cv_func_wcwidth_macro" >&6; }
38297  fi
38298
38299  if test $ac_cv_func_wcwidth = yes || test $gl_cv_func_wcwidth_macro = yes; then
38300    HAVE_WCWIDTH=1
38301                                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
38302$as_echo_n "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
38303if ${gl_cv_func_wcwidth_works+:} false; then :
38304  $as_echo_n "(cached) " >&6
38305else
38306
38307        if test "$cross_compiling" = yes; then :
38308
38309           case "$host_os" in
38310                            # Guess yes on glibc systems.
38311             *-gnu* | gnu*) gl_cv_func_wcwidth_works="guessing yes";;
38312                            # Guess yes on musl systems.
38313             *-musl*)       gl_cv_func_wcwidth_works="guessing yes";;
38314                            # Guess yes on AIX 7 systems.
38315             aix[7-9]*)     gl_cv_func_wcwidth_works="guessing yes";;
38316             *)             gl_cv_func_wcwidth_works="$gl_cross_guess_normal";;
38317           esac
38318
38319else
38320  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38321/* end confdefs.h.  */
38322
38323#include <locale.h>
38324#include <wchar.h>
38325#if !HAVE_DECL_WCWIDTH
38326extern
38327# ifdef __cplusplus
38328"C"
38329# endif
38330int wcwidth (int);
38331#endif
38332int main ()
38333{
38334  int result = 0;
38335  if (setlocale (LC_ALL, "en_US.UTF-8") != NULL)
38336    {
38337      if (wcwidth (0x0301) > 0)
38338        result |= 1;
38339      if (wcwidth (0x05B0) > 0)
38340        result |= 2;
38341      if (wcwidth (0x200B) > 0)
38342        result |= 4;
38343      if (wcwidth (0xFF1A) == 0)
38344        result |= 8;
38345      if (wcwidth (0x2202) > 1)
38346        result |= 16;
38347    }
38348  return result;
38349}
38350_ACEOF
38351if ac_fn_c_try_run "$LINENO"; then :
38352  gl_cv_func_wcwidth_works=yes
38353else
38354  gl_cv_func_wcwidth_works=no
38355fi
38356rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38357  conftest.$ac_objext conftest.beam conftest.$ac_ext
38358fi
38359
38360
38361fi
38362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5
38363$as_echo "$gl_cv_func_wcwidth_works" >&6; }
38364    case "$gl_cv_func_wcwidth_works" in
38365      *yes) ;;
38366      *no) REPLACE_WCWIDTH=1 ;;
38367    esac
38368  else
38369    HAVE_WCWIDTH=0
38370  fi
38371
38372  if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then
38373
38374
38375
38376
38377
38378
38379
38380
38381  gl_LIBOBJS="$gl_LIBOBJS wcwidth.$ac_objext"
38382
38383
38384
38385  :
38386
38387  fi
38388
38389
38390
38391
38392
38393          GNULIB_WCWIDTH=1
38394
38395
38396
38397
38398
38399$as_echo "#define GNULIB_TEST_WCWIDTH 1" >>confdefs.h
38400
38401
38402
38403
38404
38405      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wmemchr" >&5
38406$as_echo_n "checking for wmemchr... " >&6; }
38407if ${gl_cv_func_wmemchr+:} false; then :
38408  $as_echo_n "(cached) " >&6
38409else
38410  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38411/* end confdefs.h.  */
38412#include <wchar.h>
38413
38414int
38415main ()
38416{
38417return ! wmemchr ((const wchar_t *) 0, (wchar_t) ' ', 0);
38418  ;
38419  return 0;
38420}
38421
38422_ACEOF
38423if ac_fn_c_try_link "$LINENO"; then :
38424  gl_cv_func_wmemchr=yes
38425else
38426  gl_cv_func_wmemchr=no
38427fi
38428rm -f core conftest.err conftest.$ac_objext \
38429    conftest$ac_exeext conftest.$ac_ext
38430
38431fi
38432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wmemchr" >&5
38433$as_echo "$gl_cv_func_wmemchr" >&6; }
38434  if test $gl_cv_func_wmemchr = no; then
38435    HAVE_WMEMCHR=0
38436  fi
38437
38438  if test $HAVE_WMEMCHR = 0; then
38439
38440
38441
38442
38443
38444
38445
38446
38447  gl_LIBOBJS="$gl_LIBOBJS wmemchr.$ac_objext"
38448
38449  fi
38450
38451
38452
38453
38454
38455          GNULIB_WMEMCHR=1
38456
38457
38458
38459
38460
38461$as_echo "#define GNULIB_TEST_WMEMCHR 1" >>confdefs.h
38462
38463
38464
38465
38466
38467
38468
38469
38470
38471
38472
38473  if test $ac_cv_func_wmempcpy = no; then
38474    HAVE_WMEMPCPY=0
38475  fi
38476
38477  if test $HAVE_WMEMPCPY = 0; then
38478
38479
38480
38481
38482
38483
38484
38485
38486  gl_LIBOBJS="$gl_LIBOBJS wmempcpy.$ac_objext"
38487
38488  fi
38489
38490
38491
38492
38493
38494          GNULIB_WMEMPCPY=1
38495
38496
38497
38498
38499
38500$as_echo "#define GNULIB_TEST_WMEMPCPY 1" >>confdefs.h
38501
38502
38503
38504
38505
38506
38507
38508    if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
38509      REPLACE_WRITE=1
38510    fi
38511
38512
38513
38514
38515  if test $REPLACE_WRITE = 1; then
38516
38517
38518
38519
38520
38521
38522
38523
38524  gl_LIBOBJS="$gl_LIBOBJS write.$ac_objext"
38525
38526    :
38527  fi
38528
38529
38530
38531
38532
38533          GNULIB_WRITE=1
38534
38535
38536
38537
38538
38539$as_echo "#define GNULIB_TEST_WRITE 1" >>confdefs.h
38540
38541
38542
38543  :
38544
38545
38546cat >>confdefs.h <<_ACEOF
38547#define GNULIB_XALLOC 1
38548_ACEOF
38549
38550
38551
38552
38553cat >>confdefs.h <<_ACEOF
38554#define GNULIB_XALLOC_DIE 1
38555_ACEOF
38556
38557
38558
38559  :
38560
38561
38562
38563  for ac_header in stdint.h
38564do :
38565  ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
38566if test "x$ac_cv_header_stdint_h" = xyes; then :
38567  cat >>confdefs.h <<_ACEOF
38568#define HAVE_STDINT_H 1
38569_ACEOF
38570
38571fi
38572
38573done
38574
38575
38576
38577
38578  :
38579
38580
38581
38582  :
38583
38584  :
38585
38586
38587  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xasprintf:1:c-format"
38588
38589  # End of code from modules
38590
38591
38592
38593
38594
38595
38596
38597
38598
38599  gltests_libdeps=
38600  gltests_ltlibdeps=
38601
38602
38603
38604
38605
38606
38607
38608
38609
38610
38611  gl_source_base='tests'
38612  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
38613
38614  gl_module_indicator_condition=$gltests_WITNESS
38615
38616
38617
38618
38619
38620
38621
38622
38623
38624  LIBGNU_LIBDEPS="$gl_libdeps"
38625
38626  LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
38627
38628
38629
38630if test $ac_cv_lib_error_at_line = no; then
38631  # This means that the error() function is not present in libc, so
38632  # the one from gnulib will be used instead. This function precedes
38633  # error messages it prints with the program name as returned by getprogname()
38634  # call, instead of using the name set by set_program_name.
38635  # Install workaround.
38636
38637$as_echo "#define ENABLE_ERROR_PRINT_PROGNAME 1" >>confdefs.h
38638
38639fi
38640
38641# paxutils modules
38642
38643
38644
38645
38646
38647
38648
38649
38650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
38651$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
38652if ${ac_cv_header_time+:} false; then :
38653  $as_echo_n "(cached) " >&6
38654else
38655  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38656/* end confdefs.h.  */
38657#include <sys/types.h>
38658#include <sys/time.h>
38659#include <time.h>
38660
38661int
38662main ()
38663{
38664if ((struct tm *) 0)
38665return 0;
38666  ;
38667  return 0;
38668}
38669_ACEOF
38670if ac_fn_c_try_compile "$LINENO"; then :
38671  ac_cv_header_time=yes
38672else
38673  ac_cv_header_time=no
38674fi
38675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
38676fi
38677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
38678$as_echo "$ac_cv_header_time" >&6; }
38679if test $ac_cv_header_time = yes; then
38680
38681$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
38682
38683fi
38684
38685ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
38686if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
38687
38688cat >>confdefs.h <<_ACEOF
38689#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
38690_ACEOF
38691
38692
38693$as_echo "#define HAVE_ST_BLKSIZE 1" >>confdefs.h
38694
38695fi
38696
38697
38698
38699
38700
38701
38702
38703
38704  # Set LIB_SETSOCKOPT to -lnsl -lsocket if necessary.
38705  pu_save_LIBS=$LIBS
38706  LIB_SETSOCKOPT=
38707  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
38708$as_echo_n "checking for library containing setsockopt... " >&6; }
38709if ${ac_cv_search_setsockopt+:} false; then :
38710  $as_echo_n "(cached) " >&6
38711else
38712  ac_func_search_save_LIBS=$LIBS
38713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38714/* end confdefs.h.  */
38715
38716/* Override any GCC internal prototype to avoid an error.
38717   Use char because int might match the return type of a GCC
38718   builtin and then its argument prototype would still apply.  */
38719#ifdef __cplusplus
38720extern "C"
38721#endif
38722char setsockopt ();
38723int
38724main ()
38725{
38726return setsockopt ();
38727  ;
38728  return 0;
38729}
38730_ACEOF
38731for ac_lib in '' socket; do
38732  if test -z "$ac_lib"; then
38733    ac_res="none required"
38734  else
38735    ac_res=-l$ac_lib
38736    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
38737  fi
38738  if ac_fn_c_try_link "$LINENO"; then :
38739  ac_cv_search_setsockopt=$ac_res
38740fi
38741rm -f core conftest.err conftest.$ac_objext \
38742    conftest$ac_exeext
38743  if ${ac_cv_search_setsockopt+:} false; then :
38744  break
38745fi
38746done
38747if ${ac_cv_search_setsockopt+:} false; then :
38748
38749else
38750  ac_cv_search_setsockopt=no
38751fi
38752rm conftest.$ac_ext
38753LIBS=$ac_func_search_save_LIBS
38754fi
38755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
38756$as_echo "$ac_cv_search_setsockopt" >&6; }
38757ac_res=$ac_cv_search_setsockopt
38758if test "$ac_res" != no; then :
38759  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
38760
38761else
38762  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
38763$as_echo_n "checking for library containing setsockopt... " >&6; }
38764if ${ac_cv_search_setsockopt+:} false; then :
38765  $as_echo_n "(cached) " >&6
38766else
38767  ac_func_search_save_LIBS=$LIBS
38768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38769/* end confdefs.h.  */
38770
38771/* Override any GCC internal prototype to avoid an error.
38772   Use char because int might match the return type of a GCC
38773   builtin and then its argument prototype would still apply.  */
38774#ifdef __cplusplus
38775extern "C"
38776#endif
38777char setsockopt ();
38778int
38779main ()
38780{
38781return setsockopt ();
38782  ;
38783  return 0;
38784}
38785_ACEOF
38786for ac_lib in '' socket; do
38787  if test -z "$ac_lib"; then
38788    ac_res="none required"
38789  else
38790    ac_res=-l$ac_lib
38791    LIBS="-l$ac_lib -lnsl $ac_func_search_save_LIBS"
38792  fi
38793  if ac_fn_c_try_link "$LINENO"; then :
38794  ac_cv_search_setsockopt=$ac_res
38795fi
38796rm -f core conftest.err conftest.$ac_objext \
38797    conftest$ac_exeext
38798  if ${ac_cv_search_setsockopt+:} false; then :
38799  break
38800fi
38801done
38802if ${ac_cv_search_setsockopt+:} false; then :
38803
38804else
38805  ac_cv_search_setsockopt=no
38806fi
38807rm conftest.$ac_ext
38808LIBS=$ac_func_search_save_LIBS
38809fi
38810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
38811$as_echo "$ac_cv_search_setsockopt" >&6; }
38812ac_res=$ac_cv_search_setsockopt
38813if test "$ac_res" != no; then :
38814  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
38815
38816fi
38817
38818fi
38819
38820  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
38821$as_echo_n "checking for library containing setsockopt... " >&6; }
38822if ${ac_cv_search_setsockopt+:} false; then :
38823  $as_echo_n "(cached) " >&6
38824else
38825  ac_func_search_save_LIBS=$LIBS
38826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38827/* end confdefs.h.  */
38828
38829/* Override any GCC internal prototype to avoid an error.
38830   Use char because int might match the return type of a GCC
38831   builtin and then its argument prototype would still apply.  */
38832#ifdef __cplusplus
38833extern "C"
38834#endif
38835char setsockopt ();
38836int
38837main ()
38838{
38839return setsockopt ();
38840  ;
38841  return 0;
38842}
38843_ACEOF
38844for ac_lib in '' nsl; do
38845  if test -z "$ac_lib"; then
38846    ac_res="none required"
38847  else
38848    ac_res=-l$ac_lib
38849    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
38850  fi
38851  if ac_fn_c_try_link "$LINENO"; then :
38852  ac_cv_search_setsockopt=$ac_res
38853fi
38854rm -f core conftest.err conftest.$ac_objext \
38855    conftest$ac_exeext
38856  if ${ac_cv_search_setsockopt+:} false; then :
38857  break
38858fi
38859done
38860if ${ac_cv_search_setsockopt+:} false; then :
38861
38862else
38863  ac_cv_search_setsockopt=no
38864fi
38865rm conftest.$ac_ext
38866LIBS=$ac_func_search_save_LIBS
38867fi
38868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
38869$as_echo "$ac_cv_search_setsockopt" >&6; }
38870ac_res=$ac_cv_search_setsockopt
38871if test "$ac_res" != no; then :
38872  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
38873
38874fi
38875
38876
38877  case "$ac_cv_search_setsockopt" in
38878    -l*) LIB_SETSOCKOPT=$ac_cv_search_setsockopt
38879  esac
38880
38881  LIBS=$pu_save_LIBS
38882
38883  enable_rmt() {
38884    if test $ac_cv_header_sys_mtio_h = yes; then
38885      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remote tape header files" >&5
38886$as_echo_n "checking for remote tape header files... " >&6; }
38887if ${pu_cv_header_rmt+:} false; then :
38888  $as_echo_n "(cached) " >&6
38889else
38890  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38891/* end confdefs.h.  */
38892
38893#if HAVE_SGTTY_H
38894# include <sgtty.h>
38895#endif
38896#include <sys/socket.h>
38897_ACEOF
38898if ac_fn_c_try_cpp "$LINENO"; then :
38899  pu_cv_header_rmt=yes
38900else
38901  pu_cv_header_rmt=no
38902fi
38903rm -f conftest.err conftest.i conftest.$ac_ext
38904fi
38905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pu_cv_header_rmt" >&5
38906$as_echo "$pu_cv_header_rmt" >&6; }
38907      test $pu_cv_header_rmt = yes && PU_RMT_PROG='rmt$(EXEEXT)'
38908
38909    fi
38910  }
38911
38912  for ac_header in sys/mtio.h
38913do :
38914  ac_fn_c_check_header_mongrel "$LINENO" "sys/mtio.h" "ac_cv_header_sys_mtio_h" "$ac_includes_default"
38915if test "x$ac_cv_header_sys_mtio_h" = xyes; then :
38916  cat >>confdefs.h <<_ACEOF
38917#define HAVE_SYS_MTIO_H 1
38918_ACEOF
38919
38920fi
38921
38922done
38923
38924  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which ioctl field to test for reversed bytes" >&5
38925$as_echo_n "checking which ioctl field to test for reversed bytes... " >&6; }
38926if ${pu_cv_header_mtio_check_field+:} false; then :
38927  $as_echo_n "(cached) " >&6
38928else
38929  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38930/* end confdefs.h.  */
38931#include <sys/mtio.h>
38932
38933_ACEOF
38934if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
38935  $EGREP "mt_model" >/dev/null 2>&1; then :
38936  pu_cv_header_mtio_check_field=mt_model
38937else
38938  pu_cv_header_mtio_check_field=mt_type
38939fi
38940rm -f conftest*
38941
38942fi
38943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pu_cv_header_mtio_check_field" >&5
38944$as_echo "$pu_cv_header_mtio_check_field" >&6; }
38945
38946cat >>confdefs.h <<_ACEOF
38947#define MTIO_CHECK_FIELD $pu_cv_header_mtio_check_field
38948_ACEOF
38949
38950
38951
38952
38953  if test "x$DEFAULT_RMT_DIR" != x; then
38954	DEFAULT_RMT_COMMAND=$DEFAULT_RMT_DIR/rmt
38955  else
38956	DEFAULT_RMT_DIR='$(libexecdir)'
38957  fi
38958
38959  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build rmt" >&5
38960$as_echo_n "checking whether to build rmt... " >&6; }
38961
38962# Check whether --with-rmt was given.
38963if test "${with_rmt+set}" = set; then :
38964  withval=$with_rmt; case $withval in
38965	       yes|no) as_fn_error $? "Invalid argument to --with-rmt" "$LINENO" 5;;
38966	       /*)     DEFAULT_RMT_COMMAND=$withval
38967	               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, use $withval instead" >&5
38968$as_echo "no, use $withval instead" >&6; };;
38969	       *)      as_fn_error $? "Argument to --with-rmt must be an absolute file name" "$LINENO" 5;;
38970               esac
38971else
38972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38973$as_echo "yes" >&6; }
38974                enable_rmt
38975                if test "$PU_RMT_PROG" = ""; then
38976                  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: not building rmt, required header files are missing" >&5
38977$as_echo "$as_me: WARNING: not building rmt, required header files are missing" >&2;}
38978                fi
38979fi
38980
38981
38982
38983  if test "x$DEFAULT_RMT_COMMAND" != x; then
38984
38985cat >>confdefs.h <<_ACEOF
38986#define DEFAULT_RMT_COMMAND "$DEFAULT_RMT_COMMAND"
38987_ACEOF
38988
38989  fi
38990   if test "$pu_cv_header_rmt" = yes; then
38991  PU_RMT_COND_TRUE=
38992  PU_RMT_COND_FALSE='#'
38993else
38994  PU_RMT_COND_TRUE='#'
38995  PU_RMT_COND_FALSE=
38996fi
38997
38998
38999
39000
39001
39002
39003
39004
39005
39006
39007  for ac_header in sys/buf.h
39008do :
39009  ac_fn_c_check_header_compile "$LINENO" "sys/buf.h" "ac_cv_header_sys_buf_h" "#if HAVE_SYS_PARAM_H
39010#include <sys/param.h>
39011#endif
39012"
39013if test "x$ac_cv_header_sys_buf_h" = xyes; then :
39014  cat >>confdefs.h <<_ACEOF
39015#define HAVE_SYS_BUF_H 1
39016_ACEOF
39017
39018fi
39019
39020done
39021
39022
39023
39024
39025  ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
39026if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
39027
39028cat >>confdefs.h <<_ACEOF
39029#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
39030_ACEOF
39031
39032
39033fi
39034
39035
39036
39037
39038
39039
39040
39041  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
39042$as_echo_n "checking for library containing gethostbyname... " >&6; }
39043if ${ac_cv_search_gethostbyname+:} false; then :
39044  $as_echo_n "(cached) " >&6
39045else
39046  ac_func_search_save_LIBS=$LIBS
39047cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39048/* end confdefs.h.  */
39049
39050/* Override any GCC internal prototype to avoid an error.
39051   Use char because int might match the return type of a GCC
39052   builtin and then its argument prototype would still apply.  */
39053#ifdef __cplusplus
39054extern "C"
39055#endif
39056char gethostbyname ();
39057int
39058main ()
39059{
39060return gethostbyname ();
39061  ;
39062  return 0;
39063}
39064_ACEOF
39065for ac_lib in '' nsl; do
39066  if test -z "$ac_lib"; then
39067    ac_res="none required"
39068  else
39069    ac_res=-l$ac_lib
39070    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
39071  fi
39072  if ac_fn_c_try_link "$LINENO"; then :
39073  ac_cv_search_gethostbyname=$ac_res
39074fi
39075rm -f core conftest.err conftest.$ac_objext \
39076    conftest$ac_exeext
39077  if ${ac_cv_search_gethostbyname+:} false; then :
39078  break
39079fi
39080done
39081if ${ac_cv_search_gethostbyname+:} false; then :
39082
39083else
39084  ac_cv_search_gethostbyname=no
39085fi
39086rm conftest.$ac_ext
39087LIBS=$ac_func_search_save_LIBS
39088fi
39089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
39090$as_echo "$ac_cv_search_gethostbyname" >&6; }
39091ac_res=$ac_cv_search_gethostbyname
39092if test "$ac_res" != no; then :
39093  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
39094
39095fi
39096
39097
39098
39099
39100# gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
39101# ------------------------------------------------
39102# If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
39103# Otherwise, run RUN-IF-NOT-FOUND.
39104
39105
39106# Check whether --enable-gcc-warnings was given.
39107if test "${enable_gcc_warnings+set}" = set; then :
39108  enableval=$enable_gcc_warnings; case $enableval in
39109     yes|no) ;;
39110     *)      as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
39111   esac
39112   gl_gcc_warnings=$enableval
39113else
39114  gl_gcc_warnings=no
39115   if test -d "$srcdir"/.git; then
39116     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39117/* end confdefs.h.  */
39118
39119#if (4) < __GNUC__ || ((4) == __GNUC__ && (6) <= __GNUC_MINOR__)
39120/* ok */
39121#else
39122# error "your version of gcc is older than 4.6"
39123#endif
39124
39125int
39126main ()
39127{
39128
39129  ;
39130  return 0;
39131},
39132
39133_ACEOF
39134if ac_fn_c_try_cpp "$LINENO"; then :
39135  gl_gcc_warnings=yes
39136fi
39137rm -f conftest.err conftest.i conftest.$ac_ext
39138
39139
39140   fi
39141
39142fi
39143
39144
39145if test "$gl_gcc_warnings" = yes; then
39146
39147  ac_ext=c
39148ac_cpp='$CPP $CPPFLAGS'
39149ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
39150ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
39151ac_compiler_gnu=$ac_cv_c_compiler_gnu
39152
39153
39154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
39155$as_echo_n "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
39156if ${gl_cv_warn_c__Werror__Wunknown_warning_option+:} false; then :
39157  $as_echo_n "(cached) " >&6
39158else
39159
39160  gl_save_compiler_FLAGS="$CFLAGS"
39161  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
39162  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39163/* end confdefs.h.  */
39164
39165int
39166main ()
39167{
39168
39169  ;
39170  return 0;
39171}
39172_ACEOF
39173if ac_fn_c_try_link "$LINENO"; then :
39174  gl_cv_warn_c__Werror__Wunknown_warning_option=yes
39175else
39176  gl_cv_warn_c__Werror__Wunknown_warning_option=no
39177fi
39178rm -f core conftest.err conftest.$ac_objext \
39179    conftest$ac_exeext conftest.$ac_ext
39180  CFLAGS="$gl_save_compiler_FLAGS"
39181
39182fi
39183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
39184$as_echo "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
39185if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes; then :
39186  gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
39187else
39188  gl_unknown_warnings_are_errors=
39189fi
39190
39191  ac_ext=c
39192ac_cpp='$CPP $CPPFLAGS'
39193ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
39194ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
39195ac_compiler_gnu=$ac_cv_c_compiler_gnu
39196
39197
39198
39199
39200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
39201$as_echo_n "checking whether C compiler handles -Werror... " >&6; }
39202if ${gl_cv_warn_c__Werror+:} false; then :
39203  $as_echo_n "(cached) " >&6
39204else
39205
39206  gl_save_compiler_FLAGS="$CFLAGS"
39207  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
39208  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39209/* end confdefs.h.  */
39210
39211int
39212main ()
39213{
39214
39215  ;
39216  return 0;
39217}
39218_ACEOF
39219if ac_fn_c_try_link "$LINENO"; then :
39220  gl_cv_warn_c__Werror=yes
39221else
39222  gl_cv_warn_c__Werror=no
39223fi
39224rm -f core conftest.err conftest.$ac_objext \
39225    conftest$ac_exeext conftest.$ac_ext
39226  CFLAGS="$gl_save_compiler_FLAGS"
39227
39228fi
39229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
39230$as_echo "$gl_cv_warn_c__Werror" >&6; }
39231if test "x$gl_cv_warn_c__Werror" = xyes; then :
39232  as_fn_append WERROR_CFLAGS " -Werror"
39233fi
39234
39235
39236
39237
39238  nw=
39239  # This, $nw, is the list of warnings we disable.
39240  nw="$nw -Wformat-nonliteral"      # warnings in Fedora 17 stdio.h
39241  nw="$nw -Wvla"                    # warnings in gettext.h
39242  nw="$nw -Wswitch-default"         # Too many warnings for now
39243  nw="$nw -Wunsafe-loop-optimizations" # It's OK to omit unsafe optimizations.
39244  nw="$nw -Winline"                 # It's OK to not inline.
39245  nw="$nw -Wstrict-overflow"	    # It's OK to optimize strictly.
39246  nw="$nw -Wsuggest-attribute=pure" # Too many warnings for now.
39247  nw="$nw -Wstack-protector"
39248
39249
39250  ac_ext=c
39251ac_cpp='$CPP $CPPFLAGS'
39252ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
39253ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
39254ac_compiler_gnu=$ac_cv_c_compiler_gnu
39255
39256
39257
39258  if test -n "$GCC"; then
39259
39260            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
39261$as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
39262if ${gl_cv_cc_nomfi_supported+:} false; then :
39263  $as_echo_n "(cached) " >&6
39264else
39265  gl_save_CFLAGS="$CFLAGS"
39266       CFLAGS="$CFLAGS -Wextra -Werror -Wno-missing-field-initializers"
39267       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39268/* end confdefs.h.  */
39269
39270int
39271main ()
39272{
39273
39274  ;
39275  return 0;
39276}
39277_ACEOF
39278if ac_fn_c_try_compile "$LINENO"; then :
39279  gl_cv_cc_nomfi_supported=yes
39280else
39281  gl_cv_cc_nomfi_supported=no
39282fi
39283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39284       CFLAGS="$gl_save_CFLAGS"
39285
39286fi
39287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
39288$as_echo "$gl_cv_cc_nomfi_supported" >&6; }
39289
39290    if test "$gl_cv_cc_nomfi_supported" = yes; then
39291                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
39292$as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
39293if ${gl_cv_cc_nomfi_needed+:} false; then :
39294  $as_echo_n "(cached) " >&6
39295else
39296  gl_save_CFLAGS="$CFLAGS"
39297         CFLAGS="$CFLAGS -Wextra -Werror"
39298         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39299/* end confdefs.h.  */
39300int f (void)
39301                {
39302                  typedef struct { int a; int b; } s_t;
39303                  s_t s1 = { 0, };
39304                  return s1.b;
39305                }
39306
39307int
39308main ()
39309{
39310
39311  ;
39312  return 0;
39313}
39314_ACEOF
39315if ac_fn_c_try_compile "$LINENO"; then :
39316  gl_cv_cc_nomfi_needed=no
39317else
39318  gl_cv_cc_nomfi_needed=yes
39319fi
39320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39321         CFLAGS="$gl_save_CFLAGS"
39322
39323fi
39324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
39325$as_echo "$gl_cv_cc_nomfi_needed" >&6; }
39326    fi
39327
39328                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
39329$as_echo_n "checking whether -Wuninitialized is supported... " >&6; }
39330if ${gl_cv_cc_uninitialized_supported+:} false; then :
39331  $as_echo_n "(cached) " >&6
39332else
39333  gl_save_CFLAGS="$CFLAGS"
39334       CFLAGS="$CFLAGS -Werror -Wuninitialized"
39335       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39336/* end confdefs.h.  */
39337
39338int
39339main ()
39340{
39341
39342  ;
39343  return 0;
39344}
39345_ACEOF
39346if ac_fn_c_try_compile "$LINENO"; then :
39347  gl_cv_cc_uninitialized_supported=yes
39348else
39349  gl_cv_cc_uninitialized_supported=no
39350fi
39351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39352       CFLAGS="$gl_save_CFLAGS"
39353
39354fi
39355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
39356$as_echo "$gl_cv_cc_uninitialized_supported" >&6; }
39357
39358  fi
39359
39360  # List all gcc warning categories.
39361  # To compare this list to your installed GCC's, run this Bash command:
39362  #
39363  # comm -3 \
39364  #  <((sed -n 's/^  *\(-[^ 0-9][^ ]*\).*/\1/p' manywarnings.m4; \
39365  #     awk '/^[^#]/ {print ws}' ../build-aux/gcc-warning.spec) | sort) \
39366  #  <(LC_ALL=C gcc --help=warnings | sed -n 's/^  \(-[^ ]*\) .*/\1/p' | sort)
39367
39368  ws=
39369  for gl_manywarn_item in -fanalyzer -fno-common \
39370    -Wall \
39371    -Warith-conversion \
39372    -Wbad-function-cast \
39373    -Wcast-align=strict \
39374    -Wdate-time \
39375    -Wdisabled-optimization \
39376    -Wdouble-promotion \
39377    -Wduplicated-branches \
39378    -Wduplicated-cond \
39379    -Wextra \
39380    -Wformat-signedness \
39381    -Winit-self \
39382    -Winline \
39383    -Winvalid-pch \
39384    -Wlogical-op \
39385    -Wmissing-declarations \
39386    -Wmissing-include-dirs \
39387    -Wmissing-prototypes \
39388    -Wnested-externs \
39389    -Wnull-dereference \
39390    -Wold-style-definition \
39391    -Wopenmp-simd \
39392    -Woverlength-strings \
39393    -Wpacked \
39394    -Wpointer-arith \
39395    -Wshadow \
39396    -Wstack-protector \
39397    -Wstrict-overflow \
39398    -Wstrict-prototypes \
39399    -Wsuggest-attribute=cold \
39400    -Wsuggest-attribute=const \
39401    -Wsuggest-attribute=format \
39402    -Wsuggest-attribute=malloc \
39403    -Wsuggest-attribute=noreturn \
39404    -Wsuggest-attribute=pure \
39405    -Wsuggest-final-methods \
39406    -Wsuggest-final-types \
39407    -Wsync-nand \
39408    -Wsystem-headers \
39409    -Wtrampolines \
39410    -Wuninitialized \
39411    -Wunknown-pragmas \
39412    -Wunsafe-loop-optimizations \
39413    -Wunused-macros \
39414    -Wvariadic-macros \
39415    -Wvector-operation-performance \
39416    -Wvla \
39417    -Wwrite-strings \
39418    \
39419    ; do
39420    as_fn_append ws " $gl_manywarn_item"
39421  done
39422
39423  # gcc --help=warnings outputs an unusual form for these options; list
39424  # them here so that the above 'comm' command doesn't report a false match.
39425  as_fn_append ws ' -Warray-bounds=2'
39426  as_fn_append ws ' -Wattribute-alias=2'
39427  as_fn_append ws ' -Wformat-overflow=2'
39428  as_fn_append ws ' -Wformat=2'
39429  as_fn_append ws ' -Wformat-truncation=2'
39430  as_fn_append ws ' -Wimplicit-fallthrough=5'
39431  as_fn_append ws ' -Wshift-overflow=2'
39432  as_fn_append ws ' -Wunused-const-variable=2'
39433  as_fn_append ws ' -Wvla-larger-than=4031'
39434
39435  # These are needed for older GCC versions.
39436  if test -n "$GCC"; then
39437    case `($CC --version) 2>/dev/null` in
39438      'gcc (GCC) '[0-3].* | \
39439      'gcc (GCC) '4.[0-7].*)
39440        as_fn_append ws ' -fdiagnostics-show-option'
39441        as_fn_append ws ' -funit-at-a-time'
39442          ;;
39443    esac
39444  fi
39445
39446  # Disable specific options as needed.
39447  if test "$gl_cv_cc_nomfi_needed" = yes; then
39448    as_fn_append ws ' -Wno-missing-field-initializers'
39449  fi
39450
39451  if test "$gl_cv_cc_uninitialized_supported" = no; then
39452    as_fn_append ws ' -Wno-uninitialized'
39453  fi
39454
39455  # Some warnings have too many false alarms in GCC 10.1.
39456  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93695
39457  as_fn_append ws ' -Wno-analyzer-double-free'
39458  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94458
39459  as_fn_append ws ' -Wno-analyzer-malloc-leak'
39460  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94851
39461  as_fn_append ws ' -Wno-analyzer-null-dereference'
39462  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95758
39463  as_fn_append ws ' -Wno-analyzer-use-after-free'
39464
39465  ac_ext=c
39466ac_cpp='$CPP $CPPFLAGS'
39467ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
39468ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
39469ac_compiler_gnu=$ac_cv_c_compiler_gnu
39470
39471
39472
39473  gl_warn_set=
39474  set x $ws; shift
39475  for gl_warn_item
39476  do
39477    case " $nw " in
39478      *" $gl_warn_item "*)
39479        ;;
39480      *)
39481        as_fn_append gl_warn_set " $gl_warn_item"
39482        ;;
39483    esac
39484  done
39485  ws=$gl_warn_set
39486
39487  for w in $ws; do
39488
39489
39490as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
39491gl_positive="$w"
39492case $gl_positive in
39493  -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
39494esac
39495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
39496$as_echo_n "checking whether C compiler handles $w... " >&6; }
39497if eval \${$as_gl_Warn+:} false; then :
39498  $as_echo_n "(cached) " >&6
39499else
39500
39501  gl_save_compiler_FLAGS="$CFLAGS"
39502  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
39503  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39504/* end confdefs.h.  */
39505
39506int
39507main ()
39508{
39509
39510  ;
39511  return 0;
39512}
39513_ACEOF
39514if ac_fn_c_try_link "$LINENO"; then :
39515  eval "$as_gl_Warn=yes"
39516else
39517  eval "$as_gl_Warn=no"
39518fi
39519rm -f core conftest.err conftest.$ac_objext \
39520    conftest$ac_exeext conftest.$ac_ext
39521  CFLAGS="$gl_save_compiler_FLAGS"
39522
39523fi
39524eval ac_res=\$$as_gl_Warn
39525	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
39526$as_echo "$ac_res" >&6; }
39527if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
39528  as_fn_append WARN_CFLAGS " $w"
39529fi
39530
39531
39532  done
39533
39534
39535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
39536$as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; }
39537if ${gl_cv_warn_c__Wno_sign_compare+:} false; then :
39538  $as_echo_n "(cached) " >&6
39539else
39540
39541  gl_save_compiler_FLAGS="$CFLAGS"
39542  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsign-compare"
39543  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39544/* end confdefs.h.  */
39545
39546int
39547main ()
39548{
39549
39550  ;
39551  return 0;
39552}
39553_ACEOF
39554if ac_fn_c_try_link "$LINENO"; then :
39555  gl_cv_warn_c__Wno_sign_compare=yes
39556else
39557  gl_cv_warn_c__Wno_sign_compare=no
39558fi
39559rm -f core conftest.err conftest.$ac_objext \
39560    conftest$ac_exeext conftest.$ac_ext
39561  CFLAGS="$gl_save_compiler_FLAGS"
39562
39563fi
39564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
39565$as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; }
39566if test "x$gl_cv_warn_c__Wno_sign_compare" = xyes; then :
39567  as_fn_append WARN_CFLAGS " -Wno-sign-compare"
39568fi
39569
39570     # Too many warnings for now
39571
39572
39573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-type-limits" >&5
39574$as_echo_n "checking whether C compiler handles -Wno-type-limits... " >&6; }
39575if ${gl_cv_warn_c__Wno_type_limits+:} false; then :
39576  $as_echo_n "(cached) " >&6
39577else
39578
39579  gl_save_compiler_FLAGS="$CFLAGS"
39580  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wtype-limits"
39581  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39582/* end confdefs.h.  */
39583
39584int
39585main ()
39586{
39587
39588  ;
39589  return 0;
39590}
39591_ACEOF
39592if ac_fn_c_try_link "$LINENO"; then :
39593  gl_cv_warn_c__Wno_type_limits=yes
39594else
39595  gl_cv_warn_c__Wno_type_limits=no
39596fi
39597rm -f core conftest.err conftest.$ac_objext \
39598    conftest$ac_exeext conftest.$ac_ext
39599  CFLAGS="$gl_save_compiler_FLAGS"
39600
39601fi
39602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_type_limits" >&5
39603$as_echo "$gl_cv_warn_c__Wno_type_limits" >&6; }
39604if test "x$gl_cv_warn_c__Wno_type_limits" = xyes; then :
39605  as_fn_append WARN_CFLAGS " -Wno-type-limits"
39606fi
39607
39608      # It's OK to optimize based on types.
39609
39610
39611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
39612$as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
39613if ${gl_cv_warn_c__Wno_unused_parameter+:} false; then :
39614  $as_echo_n "(cached) " >&6
39615else
39616
39617  gl_save_compiler_FLAGS="$CFLAGS"
39618  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-parameter"
39619  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39620/* end confdefs.h.  */
39621
39622int
39623main ()
39624{
39625
39626  ;
39627  return 0;
39628}
39629_ACEOF
39630if ac_fn_c_try_link "$LINENO"; then :
39631  gl_cv_warn_c__Wno_unused_parameter=yes
39632else
39633  gl_cv_warn_c__Wno_unused_parameter=no
39634fi
39635rm -f core conftest.err conftest.$ac_objext \
39636    conftest$ac_exeext conftest.$ac_ext
39637  CFLAGS="$gl_save_compiler_FLAGS"
39638
39639fi
39640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
39641$as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
39642if test "x$gl_cv_warn_c__Wno_unused_parameter" = xyes; then :
39643  as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
39644fi
39645
39646 # Too many warnings for now
39647
39648
39649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
39650$as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
39651if ${gl_cv_warn_c__Wno_format_nonliteral+:} false; then :
39652  $as_echo_n "(cached) " >&6
39653else
39654
39655  gl_save_compiler_FLAGS="$CFLAGS"
39656  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-nonliteral"
39657  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39658/* end confdefs.h.  */
39659
39660int
39661main ()
39662{
39663
39664  ;
39665  return 0;
39666}
39667_ACEOF
39668if ac_fn_c_try_link "$LINENO"; then :
39669  gl_cv_warn_c__Wno_format_nonliteral=yes
39670else
39671  gl_cv_warn_c__Wno_format_nonliteral=no
39672fi
39673rm -f core conftest.err conftest.$ac_objext \
39674    conftest$ac_exeext conftest.$ac_ext
39675  CFLAGS="$gl_save_compiler_FLAGS"
39676
39677fi
39678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
39679$as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
39680if test "x$gl_cv_warn_c__Wno_format_nonliteral" = xyes; then :
39681  as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
39682fi
39683
39684
39685
39686
39687
39688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
39689$as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
39690if ${gl_cv_warn_c__fdiagnostics_show_option+:} false; then :
39691  $as_echo_n "(cached) " >&6
39692else
39693
39694  gl_save_compiler_FLAGS="$CFLAGS"
39695  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fdiagnostics-show-option"
39696  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39697/* end confdefs.h.  */
39698
39699int
39700main ()
39701{
39702
39703  ;
39704  return 0;
39705}
39706_ACEOF
39707if ac_fn_c_try_link "$LINENO"; then :
39708  gl_cv_warn_c__fdiagnostics_show_option=yes
39709else
39710  gl_cv_warn_c__fdiagnostics_show_option=no
39711fi
39712rm -f core conftest.err conftest.$ac_objext \
39713    conftest$ac_exeext conftest.$ac_ext
39714  CFLAGS="$gl_save_compiler_FLAGS"
39715
39716fi
39717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
39718$as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
39719if test "x$gl_cv_warn_c__fdiagnostics_show_option" = xyes; then :
39720  as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
39721fi
39722
39723
39724
39725
39726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
39727$as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; }
39728if ${gl_cv_warn_c__funit_at_a_time+:} false; then :
39729  $as_echo_n "(cached) " >&6
39730else
39731
39732  gl_save_compiler_FLAGS="$CFLAGS"
39733  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -funit-at-a-time"
39734  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39735/* end confdefs.h.  */
39736
39737int
39738main ()
39739{
39740
39741  ;
39742  return 0;
39743}
39744_ACEOF
39745if ac_fn_c_try_link "$LINENO"; then :
39746  gl_cv_warn_c__funit_at_a_time=yes
39747else
39748  gl_cv_warn_c__funit_at_a_time=no
39749fi
39750rm -f core conftest.err conftest.$ac_objext \
39751    conftest$ac_exeext conftest.$ac_ext
39752  CFLAGS="$gl_save_compiler_FLAGS"
39753
39754fi
39755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
39756$as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; }
39757if test "x$gl_cv_warn_c__funit_at_a_time" = xyes; then :
39758  as_fn_append WARN_CFLAGS " -funit-at-a-time"
39759fi
39760
39761
39762
39763
39764
39765
39766
39767$as_echo "#define lint 1" >>confdefs.h
39768
39769
39770
39771$as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h
39772
39773
39774  # Use a slightly smaller set of warning options for lib/.
39775  # Remove the following and save the result in GNULIB_WARN_CFLAGS.
39776  nw=
39777  nw="$nw -Wmissing-prototypes"
39778  nw="$nw -Wunused-macros"
39779  #
39780  # These are for argp.
39781  nw="$nw -Wmissing-field-initializers"
39782  nw="$nw -Wshadow"
39783  #
39784
39785  gl_warn_set=
39786  set x $WARN_CFLAGS; shift
39787  for gl_warn_item
39788  do
39789    case " $nw " in
39790      *" $gl_warn_item "*)
39791        ;;
39792      *)
39793        as_fn_append gl_warn_set " $gl_warn_item"
39794        ;;
39795    esac
39796  done
39797  GNULIB_WARN_CFLAGS=$gl_warn_set
39798
39799
39800  # This is also for argp.
39801
39802
39803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
39804$as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
39805if ${gl_cv_warn_c__Wno_missing_field_initializers+:} false; then :
39806  $as_echo_n "(cached) " >&6
39807else
39808
39809  gl_save_compiler_FLAGS="$CFLAGS"
39810  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wmissing-field-initializers"
39811  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39812/* end confdefs.h.  */
39813
39814int
39815main ()
39816{
39817
39818  ;
39819  return 0;
39820}
39821_ACEOF
39822if ac_fn_c_try_link "$LINENO"; then :
39823  gl_cv_warn_c__Wno_missing_field_initializers=yes
39824else
39825  gl_cv_warn_c__Wno_missing_field_initializers=no
39826fi
39827rm -f core conftest.err conftest.$ac_objext \
39828    conftest$ac_exeext conftest.$ac_ext
39829  CFLAGS="$gl_save_compiler_FLAGS"
39830
39831fi
39832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
39833$as_echo "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
39834if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = xyes; then :
39835  as_fn_append GNULIB_WARN_CFLAGS " -Wno-missing-field-initializers"
39836fi
39837
39838
39839
39840
39841
39842  # For gnulib-tests, the set is slightly smaller still.
39843  nw=
39844  # It's not worth being this picky about test programs.
39845  nw="$nw -Wsuggest-attribute=const"
39846
39847  gl_warn_set=
39848  set x $GNULIB_WARN_CFLAGS; shift
39849  for gl_warn_item
39850  do
39851    case " $nw " in
39852      *" $gl_warn_item "*)
39853        ;;
39854      *)
39855        as_fn_append gl_warn_set " $gl_warn_item"
39856        ;;
39857    esac
39858  done
39859  GNULIB_TEST_WARN_CFLAGS=$gl_warn_set
39860
39861
39862fi
39863
39864
39865
39866# Check whether --with-xattrs was given.
39867if test "${with_xattrs+set}" = set; then :
39868  withval=$with_xattrs;
39869else
39870  with_xattrs=maybe
39871
39872fi
39873
39874
39875  # First check for <sys/xattr.h>
39876  for ac_header in sys/xattr.h
39877do :
39878  ac_fn_c_check_header_mongrel "$LINENO" "sys/xattr.h" "ac_cv_header_sys_xattr_h" "$ac_includes_default"
39879if test "x$ac_cv_header_sys_xattr_h" = xyes; then :
39880  cat >>confdefs.h <<_ACEOF
39881#define HAVE_SYS_XATTR_H 1
39882_ACEOF
39883
39884fi
39885
39886done
39887
39888   if test "$ac_cv_header_sys_xattr_h" = yes; then
39889  TAR_COND_XATTR_H_TRUE=
39890  TAR_COND_XATTR_H_FALSE='#'
39891else
39892  TAR_COND_XATTR_H_TRUE='#'
39893  TAR_COND_XATTR_H_FALSE=
39894fi
39895
39896  if test "$ac_cv_header_sys_xattr_h" != yes; then
39897    for ac_header in attr/xattr.h
39898do :
39899  ac_fn_c_check_header_mongrel "$LINENO" "attr/xattr.h" "ac_cv_header_attr_xattr_h" "$ac_includes_default"
39900if test "x$ac_cv_header_attr_xattr_h" = xyes; then :
39901  cat >>confdefs.h <<_ACEOF
39902#define HAVE_ATTR_XATTR_H 1
39903_ACEOF
39904
39905fi
39906
39907done
39908
39909     if test "$ac_cv_header_attr_xattr_h" = yes; then
39910  TAR_COND_XATTR_H_TRUE=
39911  TAR_COND_XATTR_H_FALSE='#'
39912else
39913  TAR_COND_XATTR_H_TRUE='#'
39914  TAR_COND_XATTR_H_FALSE=
39915fi
39916
39917  fi
39918
39919  if test "$with_xattrs" != no; then
39920    for i in getxattr  fgetxattr  lgetxattr \
39921             setxattr  fsetxattr  lsetxattr \
39922             listxattr flistxattr llistxattr
39923    do
39924      as_ac_Search=`$as_echo "ac_cv_search_$i" | $as_tr_sh`
39925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing $i" >&5
39926$as_echo_n "checking for library containing $i... " >&6; }
39927if eval \${$as_ac_Search+:} false; then :
39928  $as_echo_n "(cached) " >&6
39929else
39930  ac_func_search_save_LIBS=$LIBS
39931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39932/* end confdefs.h.  */
39933
39934/* Override any GCC internal prototype to avoid an error.
39935   Use char because int might match the return type of a GCC
39936   builtin and then its argument prototype would still apply.  */
39937#ifdef __cplusplus
39938extern "C"
39939#endif
39940char $i ();
39941int
39942main ()
39943{
39944return $i ();
39945  ;
39946  return 0;
39947}
39948_ACEOF
39949for ac_lib in '' attr; do
39950  if test -z "$ac_lib"; then
39951    ac_res="none required"
39952  else
39953    ac_res=-l$ac_lib
39954    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
39955  fi
39956  if ac_fn_c_try_link "$LINENO"; then :
39957  eval "$as_ac_Search=\$ac_res"
39958fi
39959rm -f core conftest.err conftest.$ac_objext \
39960    conftest$ac_exeext
39961  if eval \${$as_ac_Search+:} false; then :
39962  break
39963fi
39964done
39965if eval \${$as_ac_Search+:} false; then :
39966
39967else
39968  eval "$as_ac_Search=no"
39969fi
39970rm conftest.$ac_ext
39971LIBS=$ac_func_search_save_LIBS
39972fi
39973eval ac_res=\$$as_ac_Search
39974	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
39975$as_echo "$ac_res" >&6; }
39976eval ac_res=\$$as_ac_Search
39977if test "$ac_res" != no; then :
39978  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
39979
39980fi
39981
39982      eval found=\$ac_cv_search_$i
39983      test "$found" = "no" && break
39984    done
39985
39986    if test "$found" != no; then
39987
39988$as_echo "#define HAVE_XATTRS /**/" >>confdefs.h
39989
39990    fi
39991  fi
39992
39993
39994
39995
39996
39997
39998ac_fn_c_check_decl "$LINENO" "getgrgid" "ac_cv_have_decl_getgrgid" "#include <grp.h>
39999"
40000if test "x$ac_cv_have_decl_getgrgid" = xyes; then :
40001  ac_have_decl=1
40002else
40003  ac_have_decl=0
40004fi
40005
40006cat >>confdefs.h <<_ACEOF
40007#define HAVE_DECL_GETGRGID $ac_have_decl
40008_ACEOF
40009
40010ac_fn_c_check_decl "$LINENO" "getpwuid" "ac_cv_have_decl_getpwuid" "#include <pwd.h>
40011"
40012if test "x$ac_cv_have_decl_getpwuid" = xyes; then :
40013  ac_have_decl=1
40014else
40015  ac_have_decl=0
40016fi
40017
40018cat >>confdefs.h <<_ACEOF
40019#define HAVE_DECL_GETPWUID $ac_have_decl
40020_ACEOF
40021
40022ac_fn_c_check_decl "$LINENO" "time" "ac_cv_have_decl_time" "#include <time.h>
40023"
40024if test "x$ac_cv_have_decl_time" = xyes; then :
40025  ac_have_decl=1
40026else
40027  ac_have_decl=0
40028fi
40029
40030cat >>confdefs.h <<_ACEOF
40031#define HAVE_DECL_TIME $ac_have_decl
40032_ACEOF
40033
40034
40035ac_fn_c_check_func "$LINENO" "waitpid" "ac_cv_func_waitpid"
40036if test "x$ac_cv_func_waitpid" = xyes; then :
40037  $as_echo "#define HAVE_WAITPID 1" >>confdefs.h
40038
40039else
40040  case " $LIBOBJS " in
40041  *" waitpid.$ac_objext "* ) ;;
40042  *) LIBOBJS="$LIBOBJS waitpid.$ac_objext"
40043 ;;
40044esac
40045
40046fi
40047
40048
40049
40050
40051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for remote shell" >&5
40052$as_echo_n "checking for remote shell... " >&6; }
40053if ${tar_cv_path_RSH+:} false; then :
40054  $as_echo_n "(cached) " >&6
40055else
40056  if test -n "$RSH"; then
40057    tar_cv_path_RSH=$RSH
40058  else
40059    tar_cv_path_RSH=no
40060    for ac_file in /usr/ucb/rsh /usr/bin/remsh /usr/bin/rsh /usr/bsd/rsh \
40061	/usr/bin/nsh /usr/bin/rcmd
40062    do
40063      # Prefer a non-symlink rsh to a symlink one, so that binaries built
40064      # on AIX 4.1.4, where /usr/ucb/rsh is a symlink to /usr/bin/rsh
40065      # will run on AIX 4.3.0, which has only /usr/bin/rsh.
40066      if test -f $ac_file; then
40067	if (test -h $ac_file) 2>/dev/null; then
40068	  test $tar_cv_path_RSH = no && tar_cv_path_RSH=$ac_file
40069	else
40070	  tar_cv_path_RSH=$ac_file
40071	  break
40072	fi
40073      fi
40074    done
40075  fi
40076fi
40077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tar_cv_path_RSH" >&5
40078$as_echo "$tar_cv_path_RSH" >&6; }
40079if test $tar_cv_path_RSH = no; then
40080  for ac_header in netdb.h
40081do :
40082  ac_fn_c_check_header_mongrel "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default"
40083if test "x$ac_cv_header_netdb_h" = xyes; then :
40084  cat >>confdefs.h <<_ACEOF
40085#define HAVE_NETDB_H 1
40086_ACEOF
40087
40088fi
40089
40090done
40091
40092else
40093
40094cat >>confdefs.h <<_ACEOF
40095#define REMOTE_SHELL "$tar_cv_path_RSH"
40096_ACEOF
40097
40098fi
40099
40100
40101
40102
40103
40104# Check whether --with-compress was given.
40105if test "${with_compress+set}" = set; then :
40106  withval=$with_compress; tar_cv_compressor_compress=${withval}
40107else
40108  tar_cv_compressor_compress=compress
40109fi
40110
40111
40112cat >>confdefs.h <<_ACEOF
40113#define COMPRESS_PROGRAM "$tar_cv_compressor_compress"
40114_ACEOF
40115
40116
40117
40118
40119
40120# Check whether --with-gzip was given.
40121if test "${with_gzip+set}" = set; then :
40122  withval=$with_gzip; tar_cv_compressor_gzip=${withval}
40123else
40124  tar_cv_compressor_gzip=gzip
40125fi
40126
40127
40128cat >>confdefs.h <<_ACEOF
40129#define GZIP_PROGRAM "$tar_cv_compressor_gzip"
40130_ACEOF
40131
40132
40133
40134
40135
40136# Check whether --with-bzip2 was given.
40137if test "${with_bzip2+set}" = set; then :
40138  withval=$with_bzip2; tar_cv_compressor_bzip2=${withval}
40139else
40140  tar_cv_compressor_bzip2=bzip2
40141fi
40142
40143
40144cat >>confdefs.h <<_ACEOF
40145#define BZIP2_PROGRAM "$tar_cv_compressor_bzip2"
40146_ACEOF
40147
40148
40149
40150
40151
40152# Check whether --with-lzip was given.
40153if test "${with_lzip+set}" = set; then :
40154  withval=$with_lzip; tar_cv_compressor_lzip=${withval}
40155else
40156  tar_cv_compressor_lzip=lzip
40157fi
40158
40159
40160cat >>confdefs.h <<_ACEOF
40161#define LZIP_PROGRAM "$tar_cv_compressor_lzip"
40162_ACEOF
40163
40164
40165
40166
40167
40168# Check whether --with-lzma was given.
40169if test "${with_lzma+set}" = set; then :
40170  withval=$with_lzma; tar_cv_compressor_lzma=${withval}
40171else
40172  tar_cv_compressor_lzma=lzma
40173fi
40174
40175
40176cat >>confdefs.h <<_ACEOF
40177#define LZMA_PROGRAM "$tar_cv_compressor_lzma"
40178_ACEOF
40179
40180
40181
40182
40183
40184# Check whether --with-lzop was given.
40185if test "${with_lzop+set}" = set; then :
40186  withval=$with_lzop; tar_cv_compressor_lzop=${withval}
40187else
40188  tar_cv_compressor_lzop=lzop
40189fi
40190
40191
40192cat >>confdefs.h <<_ACEOF
40193#define LZOP_PROGRAM "$tar_cv_compressor_lzop"
40194_ACEOF
40195
40196
40197
40198
40199
40200# Check whether --with-xz was given.
40201if test "${with_xz+set}" = set; then :
40202  withval=$with_xz; tar_cv_compressor_xz=${withval}
40203else
40204  tar_cv_compressor_xz=xz
40205fi
40206
40207
40208cat >>confdefs.h <<_ACEOF
40209#define XZ_PROGRAM "$tar_cv_compressor_xz"
40210_ACEOF
40211
40212
40213
40214
40215
40216# Check whether --with-zstd was given.
40217if test "${with_zstd+set}" = set; then :
40218  withval=$with_zstd; tar_cv_compressor_zstd=${withval}
40219else
40220  tar_cv_compressor_zstd=zstd
40221fi
40222
40223
40224cat >>confdefs.h <<_ACEOF
40225#define ZSTD_PROGRAM "$tar_cv_compressor_zstd"
40226_ACEOF
40227
40228
40229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default archive format" >&5
40230$as_echo_n "checking for default archive format... " >&6; }
40231
40232
40233
40234if test -z "$DEFAULT_ARCHIVE_FORMAT"; then
40235  DEFAULT_ARCHIVE_FORMAT="GNU"
40236fi
40237case $DEFAULT_ARCHIVE_FORMAT in
40238  V7|OLDGNU|USTAR|POSIX|GNU) ;;
40239  *) as_fn_error $? "Invalid format name" "$LINENO" 5;;
40240esac
40241
40242cat >>confdefs.h <<_ACEOF
40243#define DEFAULT_ARCHIVE_FORMAT ${DEFAULT_ARCHIVE_FORMAT}_FORMAT
40244_ACEOF
40245
40246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_ARCHIVE_FORMAT" >&5
40247$as_echo "$DEFAULT_ARCHIVE_FORMAT" >&6; }
40248
40249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default archive" >&5
40250$as_echo_n "checking for default archive... " >&6; }
40251
40252
40253if test -z "$DEFAULT_ARCHIVE"; then
40254  DEFAULT_ARCHIVE=-
40255else
40256  if test -z "`ls $DEFAULT_ARCHIVE 2>/dev/null`"; then
40257    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: DEFAULT_ARCHIVE '$DEFAULT_ARCHIVE' not found on this system" >&5
40258$as_echo "$as_me: WARNING: DEFAULT_ARCHIVE '$DEFAULT_ARCHIVE' not found on this system" >&2;}
40259  fi
40260  # FIXME: Look for DEFTAPE in <sys/mtio.h>.
40261  # FIXME: Let DEVICE_PREFIX be configured from the environment.
40262  # FIXME: Rearrange, here.
40263  case $DEFAULT_ARCHIVE in
40264    *[0-7][lmh])
40265
40266$as_echo "#define DENSITY_LETTER 1" >>confdefs.h
40267
40268      device_prefix=`echo $DEFAULT_ARCHIVE | sed 's/0-7lmh$//'`
40269      ;;
40270    *[0-7])
40271      device_prefix=`echo $DEFAULT_ARCHIVE | sed 's/0-7$//'`
40272      ;;
40273    *)
40274      device_prefix=
40275      ;;
40276  esac
40277  case "$device_prefix" in
40278    ?*)
40279
40280cat >>confdefs.h <<_ACEOF
40281#define DEVICE_PREFIX "$device_prefix"
40282_ACEOF
40283
40284      ;;
40285  esac
40286fi
40287
40288cat >>confdefs.h <<_ACEOF
40289#define DEFAULT_ARCHIVE "$DEFAULT_ARCHIVE"
40290_ACEOF
40291
40292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_ARCHIVE" >&5
40293$as_echo "$DEFAULT_ARCHIVE" >&6; }
40294
40295
40296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default blocking" >&5
40297$as_echo_n "checking for default blocking... " >&6; }
40298DEFAULT_BLOCKING=${DEFAULT_BLOCKING-20}
40299
40300cat >>confdefs.h <<_ACEOF
40301#define DEFAULT_BLOCKING $DEFAULT_BLOCKING
40302_ACEOF
40303
40304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_BLOCKING" >&5
40305$as_echo "$DEFAULT_BLOCKING" >&6; }
40306
40307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default quoting style" >&5
40308$as_echo_n "checking for default quoting style... " >&6; }
40309
40310
40311DEFAULT_QUOTING_STYLE="escape"
40312
40313
40314case $DEFAULT_QUOTING_STYLE in
40315          literal|shell|shell-always|c|escape|locale|clocale) ;;
40316*)  as_fn_error $? "Invalid quoting style" "$LINENO" 5;;
40317esac
40318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_QUOTING_STYLE" >&5
40319$as_echo "$DEFAULT_QUOTING_STYLE" >&6; }
40320DEFAULT_QUOTING_STYLE=`echo ${DEFAULT_QUOTING_STYLE}|sed 's/-/_/g'`_quoting_style
40321
40322cat >>confdefs.h <<_ACEOF
40323#define DEFAULT_QUOTING_STYLE $DEFAULT_QUOTING_STYLE
40324_ACEOF
40325
40326
40327# Iconv
40328
40329      if test "X$prefix" = "XNONE"; then
40330    acl_final_prefix="$ac_default_prefix"
40331  else
40332    acl_final_prefix="$prefix"
40333  fi
40334  if test "X$exec_prefix" = "XNONE"; then
40335    acl_final_exec_prefix='${prefix}'
40336  else
40337    acl_final_exec_prefix="$exec_prefix"
40338  fi
40339  acl_save_prefix="$prefix"
40340  prefix="$acl_final_prefix"
40341  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
40342  prefix="$acl_save_prefix"
40343
40344
40345
40346# Check whether --with-gnu-ld was given.
40347if test "${with_gnu_ld+set}" = set; then :
40348  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
40349else
40350  with_gnu_ld=no
40351fi
40352
40353# Prepare PATH_SEPARATOR.
40354# The user is always right.
40355if test "${PATH_SEPARATOR+set}" != set; then
40356  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
40357  # contains only /bin. Note that ksh looks also at the FPATH variable,
40358  # so we have to set that as well for the test.
40359  PATH_SEPARATOR=:
40360  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
40361    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
40362           || PATH_SEPARATOR=';'
40363       }
40364fi
40365
40366if test -n "$LD"; then
40367  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld" >&5
40368$as_echo_n "checking for ld... " >&6; }
40369elif test "$GCC" = yes; then
40370  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
40371$as_echo_n "checking for ld used by $CC... " >&6; }
40372elif test "$with_gnu_ld" = yes; then
40373  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
40374$as_echo_n "checking for GNU ld... " >&6; }
40375else
40376  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
40377$as_echo_n "checking for non-GNU ld... " >&6; }
40378fi
40379if test -n "$LD"; then
40380  # Let the user override the test with a path.
40381  :
40382else
40383  if ${acl_cv_path_LD+:} false; then :
40384  $as_echo_n "(cached) " >&6
40385else
40386
40387    acl_cv_path_LD= # Final result of this test
40388    ac_prog=ld # Program to search in $PATH
40389    if test "$GCC" = yes; then
40390      # Check if gcc -print-prog-name=ld gives a path.
40391      case $host in
40392        *-*-mingw*)
40393          # gcc leaves a trailing carriage return which upsets mingw
40394          acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
40395        *)
40396          acl_output=`($CC -print-prog-name=ld) 2>&5` ;;
40397      esac
40398      case $acl_output in
40399        # Accept absolute paths.
40400        [\\/]* | ?:[\\/]*)
40401          re_direlt='/[^/][^/]*/\.\./'
40402          # Canonicalize the pathname of ld
40403          acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'`
40404          while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do
40405            acl_output=`echo $acl_output | sed "s%$re_direlt%/%"`
40406          done
40407          # Got the pathname. No search in PATH is needed.
40408          acl_cv_path_LD="$acl_output"
40409          ac_prog=
40410          ;;
40411        "")
40412          # If it fails, then pretend we aren't using GCC.
40413          ;;
40414        *)
40415          # If it is relative, then search for the first ld in PATH.
40416          with_gnu_ld=unknown
40417          ;;
40418      esac
40419    fi
40420    if test -n "$ac_prog"; then
40421      # Search for $ac_prog in $PATH.
40422      acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
40423      for ac_dir in $PATH; do
40424        IFS="$acl_save_ifs"
40425        test -z "$ac_dir" && ac_dir=.
40426        if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
40427          acl_cv_path_LD="$ac_dir/$ac_prog"
40428          # Check to see if the program is GNU ld.  I'd rather use --version,
40429          # but apparently some variants of GNU ld only accept -v.
40430          # Break only if it was the GNU/non-GNU ld that we prefer.
40431          case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
40432            *GNU* | *'with BFD'*)
40433              test "$with_gnu_ld" != no && break
40434              ;;
40435            *)
40436              test "$with_gnu_ld" != yes && break
40437              ;;
40438          esac
40439        fi
40440      done
40441      IFS="$acl_save_ifs"
40442    fi
40443    case $host in
40444      *-*-aix*)
40445        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40446/* end confdefs.h.  */
40447#if defined __powerpc64__ || defined _ARCH_PPC64
40448                int ok;
40449               #else
40450                error fail
40451               #endif
40452
40453_ACEOF
40454if ac_fn_c_try_compile "$LINENO"; then :
40455  # The compiler produces 64-bit code. Add option '-b64' so that the
40456           # linker groks 64-bit object files.
40457           case "$acl_cv_path_LD " in
40458             *" -b64 "*) ;;
40459             *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;;
40460           esac
40461
40462fi
40463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40464        ;;
40465      sparc64-*-netbsd*)
40466        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40467/* end confdefs.h.  */
40468#if defined __sparcv9 || defined __arch64__
40469                int ok;
40470               #else
40471                error fail
40472               #endif
40473
40474_ACEOF
40475if ac_fn_c_try_compile "$LINENO"; then :
40476
40477else
40478  # The compiler produces 32-bit code. Add option '-m elf32_sparc'
40479           # so that the linker groks 32-bit object files.
40480           case "$acl_cv_path_LD " in
40481             *" -m elf32_sparc "*) ;;
40482             *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;;
40483           esac
40484
40485fi
40486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40487        ;;
40488    esac
40489
40490fi
40491
40492  LD="$acl_cv_path_LD"
40493fi
40494if test -n "$LD"; then
40495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
40496$as_echo "$LD" >&6; }
40497else
40498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40499$as_echo "no" >&6; }
40500  as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
40501fi
40502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
40503$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
40504if ${acl_cv_prog_gnu_ld+:} false; then :
40505  $as_echo_n "(cached) " >&6
40506else
40507  # I'd rather use --version here, but apparently some GNU lds only accept -v.
40508case `$LD -v 2>&1 </dev/null` in
40509*GNU* | *'with BFD'*)
40510  acl_cv_prog_gnu_ld=yes
40511  ;;
40512*)
40513  acl_cv_prog_gnu_ld=no
40514  ;;
40515esac
40516fi
40517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
40518$as_echo "$acl_cv_prog_gnu_ld" >&6; }
40519with_gnu_ld=$acl_cv_prog_gnu_ld
40520
40521
40522
40523
40524                                                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
40525$as_echo_n "checking for shared library run path origin... " >&6; }
40526if ${acl_cv_rpath+:} false; then :
40527  $as_echo_n "(cached) " >&6
40528else
40529
40530    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
40531    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
40532    . ./conftest.sh
40533    rm -f ./conftest.sh
40534    acl_cv_rpath=done
40535
40536fi
40537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
40538$as_echo "$acl_cv_rpath" >&6; }
40539  wl="$acl_cv_wl"
40540  acl_libext="$acl_cv_libext"
40541  acl_shlibext="${SHLIBEXT-$acl_cv_shlibext}"
40542  acl_libname_spec="$acl_cv_libname_spec"
40543  acl_library_names_spec="$acl_cv_library_names_spec"
40544  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
40545  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
40546  acl_hardcode_direct="$acl_cv_hardcode_direct"
40547  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
40548    # Check whether --enable-rpath was given.
40549if test "${enable_rpath+set}" = set; then :
40550  enableval=$enable_rpath; :
40551else
40552  enable_rpath=yes
40553fi
40554
40555
40556
40557
40558  { $as_echo "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5
40559$as_echo_n "checking 32-bit host C ABI... " >&6; }
40560if ${gl_cv_host_cpu_c_abi_32bit+:} false; then :
40561  $as_echo_n "(cached) " >&6
40562else
40563  if test -n "$gl_cv_host_cpu_c_abi"; then
40564       case "$gl_cv_host_cpu_c_abi" in
40565         i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
40566           gl_cv_host_cpu_c_abi_32bit=yes ;;
40567         x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 )
40568           gl_cv_host_cpu_c_abi_32bit=no ;;
40569         *)
40570           gl_cv_host_cpu_c_abi_32bit=unknown ;;
40571       esac
40572     else
40573       case "$host_cpu" in
40574
40575         # CPUs that only support a 32-bit ABI.
40576         arc \
40577         | bfin \
40578         | cris* \
40579         | csky \
40580         | epiphany \
40581         | ft32 \
40582         | h8300 \
40583         | m68k \
40584         | microblaze | microblazeel \
40585         | nds32 | nds32le | nds32be \
40586         | nios2 | nios2eb | nios2el \
40587         | or1k* \
40588         | or32 \
40589         | sh | sh1234 | sh1234elb \
40590         | tic6x \
40591         | xtensa* )
40592           gl_cv_host_cpu_c_abi_32bit=yes
40593           ;;
40594
40595         # CPUs that only support a 64-bit ABI.
40596         alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \
40597         | mmix )
40598           gl_cv_host_cpu_c_abi_32bit=no
40599           ;;
40600
40601         i[34567]86 )
40602           gl_cv_host_cpu_c_abi_32bit=yes
40603           ;;
40604
40605         x86_64 )
40606           # On x86_64 systems, the C compiler may be generating code in one of
40607           # these ABIs:
40608           # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
40609           # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
40610           #   with native Windows (mingw, MSVC).
40611           # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
40612           # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
40613           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40614/* end confdefs.h.  */
40615#if (defined __x86_64__ || defined __amd64__ \
40616                       || defined _M_X64 || defined _M_AMD64) \
40617                      && !(defined __ILP32__ || defined _ILP32)
40618                   int ok;
40619                  #else
40620                   error fail
40621                  #endif
40622
40623_ACEOF
40624if ac_fn_c_try_compile "$LINENO"; then :
40625  gl_cv_host_cpu_c_abi_32bit=no
40626else
40627  gl_cv_host_cpu_c_abi_32bit=yes
40628fi
40629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40630           ;;
40631
40632         arm* | aarch64 )
40633           # Assume arm with EABI.
40634           # On arm64 systems, the C compiler may be generating code in one of
40635           # these ABIs:
40636           # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
40637           # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
40638           # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
40639           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40640/* end confdefs.h.  */
40641#if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32)
40642                   int ok;
40643                  #else
40644                   error fail
40645                  #endif
40646
40647_ACEOF
40648if ac_fn_c_try_compile "$LINENO"; then :
40649  gl_cv_host_cpu_c_abi_32bit=no
40650else
40651  gl_cv_host_cpu_c_abi_32bit=yes
40652fi
40653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40654           ;;
40655
40656         hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
40657           # On hppa, the C compiler may be generating 32-bit code or 64-bit
40658           # code. In the latter case, it defines _LP64 and __LP64__.
40659           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40660/* end confdefs.h.  */
40661#ifdef __LP64__
40662                   int ok;
40663                  #else
40664                   error fail
40665                  #endif
40666
40667_ACEOF
40668if ac_fn_c_try_compile "$LINENO"; then :
40669  gl_cv_host_cpu_c_abi_32bit=no
40670else
40671  gl_cv_host_cpu_c_abi_32bit=yes
40672fi
40673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40674           ;;
40675
40676         ia64* )
40677           # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
40678           # 32-bit code. In the latter case, it defines _ILP32.
40679           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40680/* end confdefs.h.  */
40681#ifdef _ILP32
40682                   int ok;
40683                  #else
40684                   error fail
40685                  #endif
40686
40687_ACEOF
40688if ac_fn_c_try_compile "$LINENO"; then :
40689  gl_cv_host_cpu_c_abi_32bit=yes
40690else
40691  gl_cv_host_cpu_c_abi_32bit=no
40692fi
40693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40694           ;;
40695
40696         mips* )
40697           # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
40698           # at 32.
40699           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40700/* end confdefs.h.  */
40701#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
40702                   int ok;
40703                  #else
40704                   error fail
40705                  #endif
40706
40707_ACEOF
40708if ac_fn_c_try_compile "$LINENO"; then :
40709  gl_cv_host_cpu_c_abi_32bit=no
40710else
40711  gl_cv_host_cpu_c_abi_32bit=yes
40712fi
40713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40714           ;;
40715
40716         powerpc* )
40717           # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
40718           # No need to distinguish them here; the caller may distinguish
40719           # them based on the OS.
40720           # On powerpc64 systems, the C compiler may still be generating
40721           # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
40722           # be generating 64-bit code.
40723           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40724/* end confdefs.h.  */
40725#if defined __powerpc64__ || defined _ARCH_PPC64
40726                   int ok;
40727                  #else
40728                   error fail
40729                  #endif
40730
40731_ACEOF
40732if ac_fn_c_try_compile "$LINENO"; then :
40733  gl_cv_host_cpu_c_abi_32bit=no
40734else
40735  gl_cv_host_cpu_c_abi_32bit=yes
40736fi
40737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40738           ;;
40739
40740         rs6000 )
40741           gl_cv_host_cpu_c_abi_32bit=yes
40742           ;;
40743
40744         riscv32 | riscv64 )
40745           # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
40746           # Size of 'long' and 'void *':
40747           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40748/* end confdefs.h.  */
40749#if defined __LP64__
40750                    int ok;
40751                  #else
40752                    error fail
40753                  #endif
40754
40755_ACEOF
40756if ac_fn_c_try_compile "$LINENO"; then :
40757  gl_cv_host_cpu_c_abi_32bit=no
40758else
40759  gl_cv_host_cpu_c_abi_32bit=yes
40760fi
40761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40762           ;;
40763
40764         s390* )
40765           # On s390x, the C compiler may be generating 64-bit (= s390x) code
40766           # or 31-bit (= s390) code.
40767           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40768/* end confdefs.h.  */
40769#if defined __LP64__ || defined __s390x__
40770                    int ok;
40771                  #else
40772                    error fail
40773                  #endif
40774
40775_ACEOF
40776if ac_fn_c_try_compile "$LINENO"; then :
40777  gl_cv_host_cpu_c_abi_32bit=no
40778else
40779  gl_cv_host_cpu_c_abi_32bit=yes
40780fi
40781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40782           ;;
40783
40784         sparc | sparc64 )
40785           # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
40786           # C compiler still generates 32-bit code.
40787           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40788/* end confdefs.h.  */
40789#if defined __sparcv9 || defined __arch64__
40790                   int ok;
40791                  #else
40792                   error fail
40793                  #endif
40794
40795_ACEOF
40796if ac_fn_c_try_compile "$LINENO"; then :
40797  gl_cv_host_cpu_c_abi_32bit=no
40798else
40799  gl_cv_host_cpu_c_abi_32bit=yes
40800fi
40801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40802           ;;
40803
40804         *)
40805           gl_cv_host_cpu_c_abi_32bit=unknown
40806           ;;
40807       esac
40808     fi
40809
40810fi
40811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5
40812$as_echo "$gl_cv_host_cpu_c_abi_32bit" >&6; }
40813
40814  HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit"
40815
40816
40817
40818
40819
40820  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF binary format" >&5
40821$as_echo_n "checking for ELF binary format... " >&6; }
40822if ${gl_cv_elf+:} false; then :
40823  $as_echo_n "(cached) " >&6
40824else
40825  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40826/* end confdefs.h.  */
40827#ifdef __ELF__
40828        Extensible Linking Format
40829        #endif
40830
40831_ACEOF
40832if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40833  $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
40834  gl_cv_elf=yes
40835else
40836  gl_cv_elf=no
40837fi
40838rm -f conftest*
40839
40840
40841fi
40842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_elf" >&5
40843$as_echo "$gl_cv_elf" >&6; }
40844  if test $gl_cv_elf = yes; then
40845    # Extract the ELF class of a file (5th byte) in decimal.
40846    # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header
40847    if od -A x < /dev/null >/dev/null 2>/dev/null; then
40848      # Use POSIX od.
40849      func_elfclass ()
40850      {
40851        od -A n -t d1 -j 4 -N 1
40852      }
40853    else
40854      # Use BSD hexdump.
40855      func_elfclass ()
40856      {
40857        dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "'
40858        echo
40859      }
40860    fi
40861    # Use 'expr', not 'test', to compare the values of func_elfclass, because on
40862    # Solaris 11 OpenIndiana and Solaris 11 OmniOS, the result is 001 or 002,
40863    # not 1 or 2.
40864    case $HOST_CPU_C_ABI_32BIT in
40865      yes)
40866        # 32-bit ABI.
40867        acl_is_expected_elfclass ()
40868        {
40869          expr "`func_elfclass | sed -e 's/[ 	]//g'`" = 1 > /dev/null
40870        }
40871        ;;
40872      no)
40873        # 64-bit ABI.
40874        acl_is_expected_elfclass ()
40875        {
40876          expr "`func_elfclass | sed -e 's/[ 	]//g'`" = 2 > /dev/null
40877        }
40878        ;;
40879      *)
40880        # Unknown.
40881        acl_is_expected_elfclass ()
40882        {
40883          :
40884        }
40885        ;;
40886    esac
40887  else
40888    acl_is_expected_elfclass ()
40889    {
40890      :
40891    }
40892  fi
40893
40894    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5
40895$as_echo_n "checking for the common suffixes of directories in the library search path... " >&6; }
40896if ${acl_cv_libdirstems+:} false; then :
40897  $as_echo_n "(cached) " >&6
40898else
40899            acl_libdirstem=lib
40900     acl_libdirstem2=
40901     acl_libdirstem3=
40902     case "$host_os" in
40903       solaris*)
40904                                                      if test $HOST_CPU_C_ABI_32BIT = no; then
40905           acl_libdirstem2=lib/64
40906           case "$host_cpu" in
40907             sparc*)        acl_libdirstem3=lib/sparcv9 ;;
40908             i*86 | x86_64) acl_libdirstem3=lib/amd64 ;;
40909           esac
40910         fi
40911         ;;
40912       *)
40913                                                                                 searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \
40914                     | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
40915         if test $HOST_CPU_C_ABI_32BIT != no; then
40916           # 32-bit or unknown ABI.
40917           if test -d /usr/lib32; then
40918             acl_libdirstem2=lib32
40919           fi
40920         fi
40921         if test $HOST_CPU_C_ABI_32BIT != yes; then
40922           # 64-bit or unknown ABI.
40923           if test -d /usr/lib64; then
40924             acl_libdirstem3=lib64
40925           fi
40926         fi
40927         if test -n "$searchpath"; then
40928           acl_save_IFS="${IFS= 	}"; IFS=":"
40929           for searchdir in $searchpath; do
40930             if test -d "$searchdir"; then
40931               case "$searchdir" in
40932                 */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;;
40933                 */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;;
40934                 */../ | */.. )
40935                   # Better ignore directories of this form. They are misleading.
40936                   ;;
40937                 *) searchdir=`cd "$searchdir" && pwd`
40938                    case "$searchdir" in
40939                      */lib32 ) acl_libdirstem2=lib32 ;;
40940                      */lib64 ) acl_libdirstem3=lib64 ;;
40941                    esac ;;
40942               esac
40943             fi
40944           done
40945           IFS="$acl_save_IFS"
40946           if test $HOST_CPU_C_ABI_32BIT = yes; then
40947             # 32-bit ABI.
40948             acl_libdirstem3=
40949           fi
40950           if test $HOST_CPU_C_ABI_32BIT = no; then
40951             # 64-bit ABI.
40952             acl_libdirstem2=
40953           fi
40954         fi
40955         ;;
40956     esac
40957     test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
40958     test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem"
40959     acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3"
40960
40961fi
40962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5
40963$as_echo "$acl_cv_libdirstems" >&6; }
40964      acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
40965  acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'`
40966  acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'`
40967
40968
40969
40970
40971
40972
40973
40974
40975
40976
40977
40978    use_additional=yes
40979
40980  acl_save_prefix="$prefix"
40981  prefix="$acl_final_prefix"
40982  acl_save_exec_prefix="$exec_prefix"
40983  exec_prefix="$acl_final_exec_prefix"
40984
40985    eval additional_includedir=\"$includedir\"
40986    eval additional_libdir=\"$libdir\"
40987    eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
40988    eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
40989
40990  exec_prefix="$acl_save_exec_prefix"
40991  prefix="$acl_save_prefix"
40992
40993
40994# Check whether --with-libiconv-prefix was given.
40995if test "${with_libiconv_prefix+set}" = set; then :
40996  withval=$with_libiconv_prefix;
40997    if test "X$withval" = "Xno"; then
40998      use_additional=no
40999    else
41000      if test "X$withval" = "X"; then
41001
41002  acl_save_prefix="$prefix"
41003  prefix="$acl_final_prefix"
41004  acl_save_exec_prefix="$exec_prefix"
41005  exec_prefix="$acl_final_exec_prefix"
41006
41007          eval additional_includedir=\"$includedir\"
41008          eval additional_libdir=\"$libdir\"
41009          eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
41010          eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
41011
41012  exec_prefix="$acl_save_exec_prefix"
41013  prefix="$acl_save_prefix"
41014
41015      else
41016        additional_includedir="$withval/include"
41017        additional_libdir="$withval/$acl_libdirstem"
41018        additional_libdir2="$withval/$acl_libdirstem2"
41019        additional_libdir3="$withval/$acl_libdirstem3"
41020      fi
41021    fi
41022
41023fi
41024
41025  if test "X$additional_libdir2" = "X$additional_libdir"; then
41026    additional_libdir2=
41027  fi
41028  if test "X$additional_libdir3" = "X$additional_libdir"; then
41029    additional_libdir3=
41030  fi
41031      LIBICONV=
41032  LTLIBICONV=
41033  INCICONV=
41034  LIBICONV_PREFIX=
41035      HAVE_LIBICONV=
41036  rpathdirs=
41037  ltrpathdirs=
41038  names_already_handled=
41039  names_next_round='iconv '
41040  while test -n "$names_next_round"; do
41041    names_this_round="$names_next_round"
41042    names_next_round=
41043    for name in $names_this_round; do
41044      already_handled=
41045      for n in $names_already_handled; do
41046        if test "$n" = "$name"; then
41047          already_handled=yes
41048          break
41049        fi
41050      done
41051      if test -z "$already_handled"; then
41052        names_already_handled="$names_already_handled $name"
41053                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
41054        eval value=\"\$HAVE_LIB$uppername\"
41055        if test -n "$value"; then
41056          if test "$value" = yes; then
41057            eval value=\"\$LIB$uppername\"
41058            test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
41059            eval value=\"\$LTLIB$uppername\"
41060            test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
41061          else
41062                                    :
41063          fi
41064        else
41065                              found_dir=
41066          found_la=
41067          found_so=
41068          found_a=
41069          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
41070          if test -n "$acl_shlibext"; then
41071            shrext=".$acl_shlibext"             # typically: shrext=.so
41072          else
41073            shrext=
41074          fi
41075          if test $use_additional = yes; then
41076            for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
41077              if test "X$found_dir" = "X"; then
41078                eval dir=\$$additional_libdir_variable
41079                if test -n "$dir"; then
41080                                                      if test -n "$acl_shlibext"; then
41081                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
41082                      found_dir="$dir"
41083                      found_so="$dir/$libname$shrext"
41084                    else
41085                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
41086                        ver=`(cd "$dir" && \
41087                              for f in "$libname$shrext".*; do echo "$f"; done \
41088                              | sed -e "s,^$libname$shrext\\\\.,," \
41089                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
41090                              | sed 1q ) 2>/dev/null`
41091                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
41092                          found_dir="$dir"
41093                          found_so="$dir/$libname$shrext.$ver"
41094                        fi
41095                      else
41096                        eval library_names=\"$acl_library_names_spec\"
41097                        for f in $library_names; do
41098                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
41099                            found_dir="$dir"
41100                            found_so="$dir/$f"
41101                            break
41102                          fi
41103                        done
41104                      fi
41105                    fi
41106                  fi
41107                                    if test "X$found_dir" = "X"; then
41108                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
41109                      found_dir="$dir"
41110                      found_a="$dir/$libname.$acl_libext"
41111                    fi
41112                  fi
41113                  if test "X$found_dir" != "X"; then
41114                    if test -f "$dir/$libname.la"; then
41115                      found_la="$dir/$libname.la"
41116                    fi
41117                  fi
41118                fi
41119              fi
41120            done
41121          fi
41122          if test "X$found_dir" = "X"; then
41123            for x in $LDFLAGS $LTLIBICONV; do
41124
41125  acl_save_prefix="$prefix"
41126  prefix="$acl_final_prefix"
41127  acl_save_exec_prefix="$exec_prefix"
41128  exec_prefix="$acl_final_exec_prefix"
41129  eval x=\"$x\"
41130  exec_prefix="$acl_save_exec_prefix"
41131  prefix="$acl_save_prefix"
41132
41133              case "$x" in
41134                -L*)
41135                  dir=`echo "X$x" | sed -e 's/^X-L//'`
41136                                    if test -n "$acl_shlibext"; then
41137                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
41138                      found_dir="$dir"
41139                      found_so="$dir/$libname$shrext"
41140                    else
41141                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
41142                        ver=`(cd "$dir" && \
41143                              for f in "$libname$shrext".*; do echo "$f"; done \
41144                              | sed -e "s,^$libname$shrext\\\\.,," \
41145                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
41146                              | sed 1q ) 2>/dev/null`
41147                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
41148                          found_dir="$dir"
41149                          found_so="$dir/$libname$shrext.$ver"
41150                        fi
41151                      else
41152                        eval library_names=\"$acl_library_names_spec\"
41153                        for f in $library_names; do
41154                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
41155                            found_dir="$dir"
41156                            found_so="$dir/$f"
41157                            break
41158                          fi
41159                        done
41160                      fi
41161                    fi
41162                  fi
41163                                    if test "X$found_dir" = "X"; then
41164                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
41165                      found_dir="$dir"
41166                      found_a="$dir/$libname.$acl_libext"
41167                    fi
41168                  fi
41169                  if test "X$found_dir" != "X"; then
41170                    if test -f "$dir/$libname.la"; then
41171                      found_la="$dir/$libname.la"
41172                    fi
41173                  fi
41174                  ;;
41175              esac
41176              if test "X$found_dir" != "X"; then
41177                break
41178              fi
41179            done
41180          fi
41181          if test "X$found_dir" != "X"; then
41182                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
41183            if test "X$found_so" != "X"; then
41184                                                        if test "$enable_rpath" = no \
41185                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
41186                 || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
41187                 || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
41188                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
41189              else
41190                                                                                haveit=
41191                for x in $ltrpathdirs; do
41192                  if test "X$x" = "X$found_dir"; then
41193                    haveit=yes
41194                    break
41195                  fi
41196                done
41197                if test -z "$haveit"; then
41198                  ltrpathdirs="$ltrpathdirs $found_dir"
41199                fi
41200                                if test "$acl_hardcode_direct" = yes; then
41201                                                      LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
41202                else
41203                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
41204                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
41205                                                            haveit=
41206                    for x in $rpathdirs; do
41207                      if test "X$x" = "X$found_dir"; then
41208                        haveit=yes
41209                        break
41210                      fi
41211                    done
41212                    if test -z "$haveit"; then
41213                      rpathdirs="$rpathdirs $found_dir"
41214                    fi
41215                  else
41216                                                                                haveit=
41217                    for x in $LDFLAGS $LIBICONV; do
41218
41219  acl_save_prefix="$prefix"
41220  prefix="$acl_final_prefix"
41221  acl_save_exec_prefix="$exec_prefix"
41222  exec_prefix="$acl_final_exec_prefix"
41223  eval x=\"$x\"
41224  exec_prefix="$acl_save_exec_prefix"
41225  prefix="$acl_save_prefix"
41226
41227                      if test "X$x" = "X-L$found_dir"; then
41228                        haveit=yes
41229                        break
41230                      fi
41231                    done
41232                    if test -z "$haveit"; then
41233                      LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
41234                    fi
41235                    if test "$acl_hardcode_minus_L" != no; then
41236                                                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
41237                    else
41238                                                                                                                                                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
41239                    fi
41240                  fi
41241                fi
41242              fi
41243            else
41244              if test "X$found_a" != "X"; then
41245                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
41246              else
41247                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
41248              fi
41249            fi
41250                        additional_includedir=
41251            case "$found_dir" in
41252              */$acl_libdirstem | */$acl_libdirstem/)
41253                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
41254                if test "$name" = 'iconv'; then
41255                  LIBICONV_PREFIX="$basedir"
41256                fi
41257                additional_includedir="$basedir/include"
41258                ;;
41259              */$acl_libdirstem2 | */$acl_libdirstem2/)
41260                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
41261                if test "$name" = 'iconv'; then
41262                  LIBICONV_PREFIX="$basedir"
41263                fi
41264                additional_includedir="$basedir/include"
41265                ;;
41266              */$acl_libdirstem3 | */$acl_libdirstem3/)
41267                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
41268                if test "$name" = 'iconv'; then
41269                  LIBICONV_PREFIX="$basedir"
41270                fi
41271                additional_includedir="$basedir/include"
41272                ;;
41273            esac
41274            if test "X$additional_includedir" != "X"; then
41275                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
41276                haveit=
41277                if test "X$additional_includedir" = "X/usr/local/include"; then
41278                  if test -n "$GCC"; then
41279                    case $host_os in
41280                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
41281                    esac
41282                  fi
41283                fi
41284                if test -z "$haveit"; then
41285                  for x in $CPPFLAGS $INCICONV; do
41286
41287  acl_save_prefix="$prefix"
41288  prefix="$acl_final_prefix"
41289  acl_save_exec_prefix="$exec_prefix"
41290  exec_prefix="$acl_final_exec_prefix"
41291  eval x=\"$x\"
41292  exec_prefix="$acl_save_exec_prefix"
41293  prefix="$acl_save_prefix"
41294
41295                    if test "X$x" = "X-I$additional_includedir"; then
41296                      haveit=yes
41297                      break
41298                    fi
41299                  done
41300                  if test -z "$haveit"; then
41301                    if test -d "$additional_includedir"; then
41302                                            INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
41303                    fi
41304                  fi
41305                fi
41306              fi
41307            fi
41308                        if test -n "$found_la"; then
41309                                                        save_libdir="$libdir"
41310              case "$found_la" in
41311                */* | *\\*) . "$found_la" ;;
41312                *) . "./$found_la" ;;
41313              esac
41314              libdir="$save_libdir"
41315                            for dep in $dependency_libs; do
41316                case "$dep" in
41317                  -L*)
41318                    dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
41319                                                                                                                                                                if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
41320                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
41321                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
41322                      haveit=
41323                      if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
41324                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
41325                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
41326                        if test -n "$GCC"; then
41327                          case $host_os in
41328                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
41329                          esac
41330                        fi
41331                      fi
41332                      if test -z "$haveit"; then
41333                        haveit=
41334                        for x in $LDFLAGS $LIBICONV; do
41335
41336  acl_save_prefix="$prefix"
41337  prefix="$acl_final_prefix"
41338  acl_save_exec_prefix="$exec_prefix"
41339  exec_prefix="$acl_final_exec_prefix"
41340  eval x=\"$x\"
41341  exec_prefix="$acl_save_exec_prefix"
41342  prefix="$acl_save_prefix"
41343
41344                          if test "X$x" = "X-L$dependency_libdir"; then
41345                            haveit=yes
41346                            break
41347                          fi
41348                        done
41349                        if test -z "$haveit"; then
41350                          if test -d "$dependency_libdir"; then
41351                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }-L$dependency_libdir"
41352                          fi
41353                        fi
41354                        haveit=
41355                        for x in $LDFLAGS $LTLIBICONV; do
41356
41357  acl_save_prefix="$prefix"
41358  prefix="$acl_final_prefix"
41359  acl_save_exec_prefix="$exec_prefix"
41360  exec_prefix="$acl_final_exec_prefix"
41361  eval x=\"$x\"
41362  exec_prefix="$acl_save_exec_prefix"
41363  prefix="$acl_save_prefix"
41364
41365                          if test "X$x" = "X-L$dependency_libdir"; then
41366                            haveit=yes
41367                            break
41368                          fi
41369                        done
41370                        if test -z "$haveit"; then
41371                          if test -d "$dependency_libdir"; then
41372                                                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$dependency_libdir"
41373                          fi
41374                        fi
41375                      fi
41376                    fi
41377                    ;;
41378                  -R*)
41379                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
41380                    if test "$enable_rpath" != no; then
41381                                                                  haveit=
41382                      for x in $rpathdirs; do
41383                        if test "X$x" = "X$dir"; then
41384                          haveit=yes
41385                          break
41386                        fi
41387                      done
41388                      if test -z "$haveit"; then
41389                        rpathdirs="$rpathdirs $dir"
41390                      fi
41391                                                                  haveit=
41392                      for x in $ltrpathdirs; do
41393                        if test "X$x" = "X$dir"; then
41394                          haveit=yes
41395                          break
41396                        fi
41397                      done
41398                      if test -z "$haveit"; then
41399                        ltrpathdirs="$ltrpathdirs $dir"
41400                      fi
41401                    fi
41402                    ;;
41403                  -l*)
41404                                                                                                                                                                dep=`echo "X$dep" | sed -e 's/^X-l//'`
41405                    if test "X$dep" != Xc \
41406                       || case $host_os in
41407                            linux* | gnu* | k*bsd*-gnu) false ;;
41408                            *)                          true ;;
41409                          esac; then
41410                      names_next_round="$names_next_round $dep"
41411                    fi
41412                    ;;
41413                  *.la)
41414                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
41415                    ;;
41416                  *)
41417                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
41418                    LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
41419                    ;;
41420                esac
41421              done
41422            fi
41423          else
41424                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
41425            LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
41426          fi
41427        fi
41428      fi
41429    done
41430  done
41431  if test "X$rpathdirs" != "X"; then
41432    if test -n "$acl_hardcode_libdir_separator"; then
41433                        alldirs=
41434      for found_dir in $rpathdirs; do
41435        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
41436      done
41437            acl_save_libdir="$libdir"
41438      libdir="$alldirs"
41439      eval flag=\"$acl_hardcode_libdir_flag_spec\"
41440      libdir="$acl_save_libdir"
41441      LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
41442    else
41443            for found_dir in $rpathdirs; do
41444        acl_save_libdir="$libdir"
41445        libdir="$found_dir"
41446        eval flag=\"$acl_hardcode_libdir_flag_spec\"
41447        libdir="$acl_save_libdir"
41448        LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
41449      done
41450    fi
41451  fi
41452  if test "X$ltrpathdirs" != "X"; then
41453            for found_dir in $ltrpathdirs; do
41454      LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
41455    done
41456  fi
41457
41458
41459
41460
41461
41462
41463
41464
41465
41466
41467
41468          am_save_CPPFLAGS="$CPPFLAGS"
41469
41470  for element in $INCICONV; do
41471    haveit=
41472    for x in $CPPFLAGS; do
41473
41474  acl_save_prefix="$prefix"
41475  prefix="$acl_final_prefix"
41476  acl_save_exec_prefix="$exec_prefix"
41477  exec_prefix="$acl_final_exec_prefix"
41478  eval x=\"$x\"
41479  exec_prefix="$acl_save_exec_prefix"
41480  prefix="$acl_save_prefix"
41481
41482      if test "X$x" = "X$element"; then
41483        haveit=yes
41484        break
41485      fi
41486    done
41487    if test -z "$haveit"; then
41488      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
41489    fi
41490  done
41491
41492
41493  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
41494$as_echo_n "checking for iconv... " >&6; }
41495if ${am_cv_func_iconv+:} false; then :
41496  $as_echo_n "(cached) " >&6
41497else
41498
41499    am_cv_func_iconv="no, consider installing GNU libiconv"
41500    am_cv_lib_iconv=no
41501    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41502/* end confdefs.h.  */
41503
41504#include <stdlib.h>
41505#include <iconv.h>
41506
41507int
41508main ()
41509{
41510iconv_t cd = iconv_open("","");
41511           iconv(cd,NULL,NULL,NULL,NULL);
41512           iconv_close(cd);
41513  ;
41514  return 0;
41515}
41516_ACEOF
41517if ac_fn_c_try_link "$LINENO"; then :
41518  am_cv_func_iconv=yes
41519fi
41520rm -f core conftest.err conftest.$ac_objext \
41521    conftest$ac_exeext conftest.$ac_ext
41522    if test "$am_cv_func_iconv" != yes; then
41523      am_save_LIBS="$LIBS"
41524      LIBS="$LIBS $LIBICONV"
41525      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41526/* end confdefs.h.  */
41527
41528#include <stdlib.h>
41529#include <iconv.h>
41530
41531int
41532main ()
41533{
41534iconv_t cd = iconv_open("","");
41535             iconv(cd,NULL,NULL,NULL,NULL);
41536             iconv_close(cd);
41537  ;
41538  return 0;
41539}
41540_ACEOF
41541if ac_fn_c_try_link "$LINENO"; then :
41542  am_cv_lib_iconv=yes
41543        am_cv_func_iconv=yes
41544fi
41545rm -f core conftest.err conftest.$ac_objext \
41546    conftest$ac_exeext conftest.$ac_ext
41547      LIBS="$am_save_LIBS"
41548    fi
41549
41550fi
41551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
41552$as_echo "$am_cv_func_iconv" >&6; }
41553  if test "$am_cv_func_iconv" = yes; then
41554    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
41555$as_echo_n "checking for working iconv... " >&6; }
41556if ${am_cv_func_iconv_works+:} false; then :
41557  $as_echo_n "(cached) " >&6
41558else
41559
41560                  am_save_LIBS="$LIBS"
41561      if test $am_cv_lib_iconv = yes; then
41562        LIBS="$LIBS $LIBICONV"
41563      fi
41564      am_cv_func_iconv_works=no
41565      for ac_iconv_const in '' 'const'; do
41566        if test "$cross_compiling" = yes; then :
41567  case "$host_os" in
41568             aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
41569             *)            am_cv_func_iconv_works="guessing yes" ;;
41570           esac
41571else
41572  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41573/* end confdefs.h.  */
41574
41575#include <iconv.h>
41576#include <string.h>
41577
41578#ifndef ICONV_CONST
41579# define ICONV_CONST $ac_iconv_const
41580#endif
41581
41582int
41583main ()
41584{
41585int result = 0;
41586  /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from
41587     successful returns.  This is even documented in
41588     <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */
41589  {
41590    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
41591    if (cd_utf8_to_88591 != (iconv_t)(-1))
41592      {
41593        static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
41594        char buf[10];
41595        ICONV_CONST char *inptr = input;
41596        size_t inbytesleft = strlen (input);
41597        char *outptr = buf;
41598        size_t outbytesleft = sizeof (buf);
41599        size_t res = iconv (cd_utf8_to_88591,
41600                            &inptr, &inbytesleft,
41601                            &outptr, &outbytesleft);
41602        if (res == 0)
41603          result |= 1;
41604        iconv_close (cd_utf8_to_88591);
41605      }
41606  }
41607  /* Test against Solaris 10 bug: Failures are not distinguishable from
41608     successful returns.  */
41609  {
41610    iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
41611    if (cd_ascii_to_88591 != (iconv_t)(-1))
41612      {
41613        static ICONV_CONST char input[] = "\263";
41614        char buf[10];
41615        ICONV_CONST char *inptr = input;
41616        size_t inbytesleft = strlen (input);
41617        char *outptr = buf;
41618        size_t outbytesleft = sizeof (buf);
41619        size_t res = iconv (cd_ascii_to_88591,
41620                            &inptr, &inbytesleft,
41621                            &outptr, &outbytesleft);
41622        if (res == 0)
41623          result |= 2;
41624        iconv_close (cd_ascii_to_88591);
41625      }
41626  }
41627  /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
41628  {
41629    iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
41630    if (cd_88591_to_utf8 != (iconv_t)(-1))
41631      {
41632        static ICONV_CONST char input[] = "\304";
41633        static char buf[2] = { (char)0xDE, (char)0xAD };
41634        ICONV_CONST char *inptr = input;
41635        size_t inbytesleft = 1;
41636        char *outptr = buf;
41637        size_t outbytesleft = 1;
41638        size_t res = iconv (cd_88591_to_utf8,
41639                            &inptr, &inbytesleft,
41640                            &outptr, &outbytesleft);
41641        if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
41642          result |= 4;
41643        iconv_close (cd_88591_to_utf8);
41644      }
41645  }
41646#if 0 /* This bug could be worked around by the caller.  */
41647  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
41648  {
41649    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
41650    if (cd_88591_to_utf8 != (iconv_t)(-1))
41651      {
41652        static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
41653        char buf[50];
41654        ICONV_CONST char *inptr = input;
41655        size_t inbytesleft = strlen (input);
41656        char *outptr = buf;
41657        size_t outbytesleft = sizeof (buf);
41658        size_t res = iconv (cd_88591_to_utf8,
41659                            &inptr, &inbytesleft,
41660                            &outptr, &outbytesleft);
41661        if ((int)res > 0)
41662          result |= 8;
41663        iconv_close (cd_88591_to_utf8);
41664      }
41665  }
41666#endif
41667  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
41668     provided.  */
41669  {
41670    /* Try standardized names.  */
41671    iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
41672    /* Try IRIX, OSF/1 names.  */
41673    iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
41674    /* Try AIX names.  */
41675    iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
41676    /* Try HP-UX names.  */
41677    iconv_t cd4 = iconv_open ("utf8", "eucJP");
41678    if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
41679        && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
41680      result |= 16;
41681    if (cd1 != (iconv_t)(-1))
41682      iconv_close (cd1);
41683    if (cd2 != (iconv_t)(-1))
41684      iconv_close (cd2);
41685    if (cd3 != (iconv_t)(-1))
41686      iconv_close (cd3);
41687    if (cd4 != (iconv_t)(-1))
41688      iconv_close (cd4);
41689  }
41690  return result;
41691
41692  ;
41693  return 0;
41694}
41695_ACEOF
41696if ac_fn_c_try_run "$LINENO"; then :
41697  am_cv_func_iconv_works=yes
41698fi
41699rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41700  conftest.$ac_objext conftest.beam conftest.$ac_ext
41701fi
41702
41703        test "$am_cv_func_iconv_works" = no || break
41704      done
41705      LIBS="$am_save_LIBS"
41706
41707fi
41708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
41709$as_echo "$am_cv_func_iconv_works" >&6; }
41710    case "$am_cv_func_iconv_works" in
41711      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
41712      *)   am_func_iconv=yes ;;
41713    esac
41714  else
41715    am_func_iconv=no am_cv_lib_iconv=no
41716  fi
41717  if test "$am_func_iconv" = yes; then
41718
41719$as_echo "#define HAVE_ICONV 1" >>confdefs.h
41720
41721  fi
41722  if test "$am_cv_lib_iconv" = yes; then
41723    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
41724$as_echo_n "checking how to link with libiconv... " >&6; }
41725    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
41726$as_echo "$LIBICONV" >&6; }
41727  else
41728            CPPFLAGS="$am_save_CPPFLAGS"
41729    LIBICONV=
41730    LTLIBICONV=
41731  fi
41732
41733
41734
41735  if test "$am_cv_func_iconv" = yes; then
41736    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iconv is compatible with its POSIX signature" >&5
41737$as_echo_n "checking whether iconv is compatible with its POSIX signature... " >&6; }
41738if ${gl_cv_iconv_nonconst+:} false; then :
41739  $as_echo_n "(cached) " >&6
41740else
41741  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41742/* end confdefs.h.  */
41743
41744#include <stdlib.h>
41745#include <iconv.h>
41746extern
41747#ifdef __cplusplus
41748"C"
41749#endif
41750size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
41751
41752int
41753main ()
41754{
41755
41756  ;
41757  return 0;
41758}
41759_ACEOF
41760if ac_fn_c_try_compile "$LINENO"; then :
41761  gl_cv_iconv_nonconst=yes
41762else
41763  gl_cv_iconv_nonconst=no
41764fi
41765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41766
41767fi
41768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_iconv_nonconst" >&5
41769$as_echo "$gl_cv_iconv_nonconst" >&6; }
41770  else
41771            gl_cv_iconv_nonconst=yes
41772  fi
41773  if test $gl_cv_iconv_nonconst = yes; then
41774    iconv_arg1=""
41775  else
41776    iconv_arg1="const"
41777  fi
41778
41779cat >>confdefs.h <<_ACEOF
41780#define ICONV_CONST $iconv_arg1
41781_ACEOF
41782
41783
41784
41785for ac_header in iconv.h
41786do :
41787  ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
41788if test "x$ac_cv_header_iconv_h" = xyes; then :
41789  cat >>confdefs.h <<_ACEOF
41790#define HAVE_ICONV_H 1
41791_ACEOF
41792
41793fi
41794
41795done
41796
41797ac_fn_c_check_type "$LINENO" "iconv_t" "ac_cv_type_iconv_t" "
41798#ifdef HAVE_ICONV_H
41799# include <iconv.h>
41800#endif
41801
41802"
41803if test "x$ac_cv_type_iconv_t" = xyes; then :
41804  :
41805else
41806
41807$as_echo "#define iconv_t int" >>confdefs.h
41808
41809fi
41810
41811
41812# Gettext.
41813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
41814$as_echo_n "checking for a sed that does not truncate output... " >&6; }
41815if ${ac_cv_path_SED+:} false; then :
41816  $as_echo_n "(cached) " >&6
41817else
41818            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
41819     for ac_i in 1 2 3 4 5 6 7; do
41820       ac_script="$ac_script$as_nl$ac_script"
41821     done
41822     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
41823     { ac_script=; unset ac_script;}
41824     if test -z "$SED"; then
41825  ac_path_SED_found=false
41826  # Loop through the user's path and test for each of PROGNAME-LIST
41827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41828for as_dir in $PATH
41829do
41830  IFS=$as_save_IFS
41831  test -z "$as_dir" && as_dir=.
41832    for ac_prog in sed gsed; do
41833    for ac_exec_ext in '' $ac_executable_extensions; do
41834      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
41835      as_fn_executable_p "$ac_path_SED" || continue
41836# Check for GNU ac_path_SED and select it if it is found.
41837  # Check for GNU $ac_path_SED
41838case `"$ac_path_SED" --version 2>&1` in
41839*GNU*)
41840  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
41841*)
41842  ac_count=0
41843  $as_echo_n 0123456789 >"conftest.in"
41844  while :
41845  do
41846    cat "conftest.in" "conftest.in" >"conftest.tmp"
41847    mv "conftest.tmp" "conftest.in"
41848    cp "conftest.in" "conftest.nl"
41849    $as_echo '' >> "conftest.nl"
41850    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
41851    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
41852    as_fn_arith $ac_count + 1 && ac_count=$as_val
41853    if test $ac_count -gt ${ac_path_SED_max-0}; then
41854      # Best one so far, save it but keep looking for a better one
41855      ac_cv_path_SED="$ac_path_SED"
41856      ac_path_SED_max=$ac_count
41857    fi
41858    # 10*(2^10) chars as input seems more than enough
41859    test $ac_count -gt 10 && break
41860  done
41861  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
41862esac
41863
41864      $ac_path_SED_found && break 3
41865    done
41866  done
41867  done
41868IFS=$as_save_IFS
41869  if test -z "$ac_cv_path_SED"; then
41870    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
41871  fi
41872else
41873  ac_cv_path_SED=$SED
41874fi
41875
41876fi
41877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
41878$as_echo "$ac_cv_path_SED" >&6; }
41879 SED="$ac_cv_path_SED"
41880  rm -f conftest.sed
41881
41882
41883  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
41884$as_echo_n "checking whether NLS is requested... " >&6; }
41885    # Check whether --enable-nls was given.
41886if test "${enable_nls+set}" = set; then :
41887  enableval=$enable_nls; USE_NLS=$enableval
41888else
41889  USE_NLS=yes
41890fi
41891
41892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
41893$as_echo "$USE_NLS" >&6; }
41894
41895
41896
41897
41898      GETTEXT_MACRO_VERSION=0.20
41899
41900
41901
41902
41903# Prepare PATH_SEPARATOR.
41904# The user is always right.
41905if test "${PATH_SEPARATOR+set}" != set; then
41906  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
41907  # contains only /bin. Note that ksh looks also at the FPATH variable,
41908  # so we have to set that as well for the test.
41909  PATH_SEPARATOR=:
41910  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
41911    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
41912           || PATH_SEPARATOR=';'
41913       }
41914fi
41915
41916# Find out how to test for executable files. Don't use a zero-byte file,
41917# as systems may use methods other than mode bits to determine executability.
41918cat >conf$$.file <<_ASEOF
41919#! /bin/sh
41920exit 0
41921_ASEOF
41922chmod +x conf$$.file
41923if test -x conf$$.file >/dev/null 2>&1; then
41924  ac_executable_p="test -x"
41925else
41926  ac_executable_p="test -f"
41927fi
41928rm -f conf$$.file
41929
41930# Extract the first word of "msgfmt", so it can be a program name with args.
41931set dummy msgfmt; ac_word=$2
41932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41933$as_echo_n "checking for $ac_word... " >&6; }
41934if ${ac_cv_path_MSGFMT+:} false; then :
41935  $as_echo_n "(cached) " >&6
41936else
41937  case "$MSGFMT" in
41938  [\\/]* | ?:[\\/]*)
41939    ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
41940    ;;
41941  *)
41942    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
41943    for ac_dir in $PATH; do
41944      IFS="$ac_save_IFS"
41945      test -z "$ac_dir" && ac_dir=.
41946      for ac_exec_ext in '' $ac_executable_extensions; do
41947        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
41948          echo "$as_me: trying $ac_dir/$ac_word..." >&5
41949          if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
41950     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
41951            ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
41952            break 2
41953          fi
41954        fi
41955      done
41956    done
41957    IFS="$ac_save_IFS"
41958  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
41959    ;;
41960esac
41961fi
41962MSGFMT="$ac_cv_path_MSGFMT"
41963if test "$MSGFMT" != ":"; then
41964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
41965$as_echo "$MSGFMT" >&6; }
41966else
41967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41968$as_echo "no" >&6; }
41969fi
41970
41971  # Extract the first word of "gmsgfmt", so it can be a program name with args.
41972set dummy gmsgfmt; ac_word=$2
41973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41974$as_echo_n "checking for $ac_word... " >&6; }
41975if ${ac_cv_path_GMSGFMT+:} false; then :
41976  $as_echo_n "(cached) " >&6
41977else
41978  case $GMSGFMT in
41979  [\\/]* | ?:[\\/]*)
41980  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
41981  ;;
41982  *)
41983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41984for as_dir in $PATH
41985do
41986  IFS=$as_save_IFS
41987  test -z "$as_dir" && as_dir=.
41988    for ac_exec_ext in '' $ac_executable_extensions; do
41989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41990    ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
41991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41992    break 2
41993  fi
41994done
41995  done
41996IFS=$as_save_IFS
41997
41998  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
41999  ;;
42000esac
42001fi
42002GMSGFMT=$ac_cv_path_GMSGFMT
42003if test -n "$GMSGFMT"; then
42004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
42005$as_echo "$GMSGFMT" >&6; }
42006else
42007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42008$as_echo "no" >&6; }
42009fi
42010
42011
42012
42013    case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
42014    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
42015    *) GMSGFMT_015=$GMSGFMT ;;
42016  esac
42017
42018
42019
42020# Prepare PATH_SEPARATOR.
42021# The user is always right.
42022if test "${PATH_SEPARATOR+set}" != set; then
42023  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
42024  # contains only /bin. Note that ksh looks also at the FPATH variable,
42025  # so we have to set that as well for the test.
42026  PATH_SEPARATOR=:
42027  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
42028    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
42029           || PATH_SEPARATOR=';'
42030       }
42031fi
42032
42033# Find out how to test for executable files. Don't use a zero-byte file,
42034# as systems may use methods other than mode bits to determine executability.
42035cat >conf$$.file <<_ASEOF
42036#! /bin/sh
42037exit 0
42038_ASEOF
42039chmod +x conf$$.file
42040if test -x conf$$.file >/dev/null 2>&1; then
42041  ac_executable_p="test -x"
42042else
42043  ac_executable_p="test -f"
42044fi
42045rm -f conf$$.file
42046
42047# Extract the first word of "xgettext", so it can be a program name with args.
42048set dummy xgettext; ac_word=$2
42049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42050$as_echo_n "checking for $ac_word... " >&6; }
42051if ${ac_cv_path_XGETTEXT+:} false; then :
42052  $as_echo_n "(cached) " >&6
42053else
42054  case "$XGETTEXT" in
42055  [\\/]* | ?:[\\/]*)
42056    ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
42057    ;;
42058  *)
42059    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
42060    for ac_dir in $PATH; do
42061      IFS="$ac_save_IFS"
42062      test -z "$ac_dir" && ac_dir=.
42063      for ac_exec_ext in '' $ac_executable_extensions; do
42064        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
42065          echo "$as_me: trying $ac_dir/$ac_word..." >&5
42066          if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
42067     (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
42068            ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
42069            break 2
42070          fi
42071        fi
42072      done
42073    done
42074    IFS="$ac_save_IFS"
42075  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
42076    ;;
42077esac
42078fi
42079XGETTEXT="$ac_cv_path_XGETTEXT"
42080if test "$XGETTEXT" != ":"; then
42081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
42082$as_echo "$XGETTEXT" >&6; }
42083else
42084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42085$as_echo "no" >&6; }
42086fi
42087
42088    rm -f messages.po
42089
42090    case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
42091    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
42092    *) XGETTEXT_015=$XGETTEXT ;;
42093  esac
42094
42095
42096
42097# Prepare PATH_SEPARATOR.
42098# The user is always right.
42099if test "${PATH_SEPARATOR+set}" != set; then
42100  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
42101  # contains only /bin. Note that ksh looks also at the FPATH variable,
42102  # so we have to set that as well for the test.
42103  PATH_SEPARATOR=:
42104  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
42105    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
42106           || PATH_SEPARATOR=';'
42107       }
42108fi
42109
42110# Find out how to test for executable files. Don't use a zero-byte file,
42111# as systems may use methods other than mode bits to determine executability.
42112cat >conf$$.file <<_ASEOF
42113#! /bin/sh
42114exit 0
42115_ASEOF
42116chmod +x conf$$.file
42117if test -x conf$$.file >/dev/null 2>&1; then
42118  ac_executable_p="test -x"
42119else
42120  ac_executable_p="test -f"
42121fi
42122rm -f conf$$.file
42123
42124# Extract the first word of "msgmerge", so it can be a program name with args.
42125set dummy msgmerge; ac_word=$2
42126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42127$as_echo_n "checking for $ac_word... " >&6; }
42128if ${ac_cv_path_MSGMERGE+:} false; then :
42129  $as_echo_n "(cached) " >&6
42130else
42131  case "$MSGMERGE" in
42132  [\\/]* | ?:[\\/]*)
42133    ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
42134    ;;
42135  *)
42136    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
42137    for ac_dir in $PATH; do
42138      IFS="$ac_save_IFS"
42139      test -z "$ac_dir" && ac_dir=.
42140      for ac_exec_ext in '' $ac_executable_extensions; do
42141        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
42142          echo "$as_me: trying $ac_dir/$ac_word..." >&5
42143          if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
42144            ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
42145            break 2
42146          fi
42147        fi
42148      done
42149    done
42150    IFS="$ac_save_IFS"
42151  test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
42152    ;;
42153esac
42154fi
42155MSGMERGE="$ac_cv_path_MSGMERGE"
42156if test "$MSGMERGE" != ":"; then
42157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
42158$as_echo "$MSGMERGE" >&6; }
42159else
42160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42161$as_echo "no" >&6; }
42162fi
42163
42164
42165    if LC_ALL=C $MSGMERGE --help | grep ' --for-msgfmt ' >/dev/null; then
42166    MSGMERGE_FOR_MSGFMT_OPTION='--for-msgfmt'
42167  else
42168        if LC_ALL=C $MSGMERGE --help | grep ' --no-fuzzy-matching ' >/dev/null; then
42169      MSGMERGE_FOR_MSGFMT_OPTION='--no-fuzzy-matching --no-location --quiet'
42170    else
42171                        MSGMERGE_FOR_MSGFMT_OPTION='--no-location --quiet'
42172    fi
42173  fi
42174
42175
42176    test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
42177
42178
42179  ac_config_commands="$ac_config_commands po-directories"
42180
42181
42182
42183
42184
42185
42186
42187
42188
42189
42190
42191
42192
42193
42194
42195
42196
42197
42198
42199
42200
42201
42202
42203
42204
42205    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
42206$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
42207if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
42208  $as_echo_n "(cached) " >&6
42209else
42210  gt_save_LIBS="$LIBS"
42211     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
42212     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42213/* end confdefs.h.  */
42214#include <CoreFoundation/CFPreferences.h>
42215int
42216main ()
42217{
42218CFPreferencesCopyAppValue(NULL, NULL)
42219  ;
42220  return 0;
42221}
42222_ACEOF
42223if ac_fn_c_try_link "$LINENO"; then :
42224  gt_cv_func_CFPreferencesCopyAppValue=yes
42225else
42226  gt_cv_func_CFPreferencesCopyAppValue=no
42227fi
42228rm -f core conftest.err conftest.$ac_objext \
42229    conftest$ac_exeext conftest.$ac_ext
42230     LIBS="$gt_save_LIBS"
42231fi
42232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
42233$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
42234  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
42235
42236$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
42237
42238  fi
42239                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5
42240$as_echo_n "checking for CFLocaleCopyPreferredLanguages... " >&6; }
42241if ${gt_cv_func_CFLocaleCopyPreferredLanguages+:} false; then :
42242  $as_echo_n "(cached) " >&6
42243else
42244  gt_save_LIBS="$LIBS"
42245     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
42246     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42247/* end confdefs.h.  */
42248#include <CoreFoundation/CFLocale.h>
42249int
42250main ()
42251{
42252CFLocaleCopyPreferredLanguages();
42253  ;
42254  return 0;
42255}
42256_ACEOF
42257if ac_fn_c_try_link "$LINENO"; then :
42258  gt_cv_func_CFLocaleCopyPreferredLanguages=yes
42259else
42260  gt_cv_func_CFLocaleCopyPreferredLanguages=no
42261fi
42262rm -f core conftest.err conftest.$ac_objext \
42263    conftest$ac_exeext conftest.$ac_ext
42264     LIBS="$gt_save_LIBS"
42265fi
42266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5
42267$as_echo "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; }
42268  if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
42269
42270$as_echo "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h
42271
42272  fi
42273  INTL_MACOSX_LIBS=
42274  if test $gt_cv_func_CFPreferencesCopyAppValue = yes \
42275     || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
42276    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
42277  fi
42278
42279
42280
42281
42282
42283
42284  LIBINTL=
42285  LTLIBINTL=
42286  POSUB=
42287
42288    case " $gt_needs " in
42289    *" need-formatstring-macros "*) gt_api_version=3 ;;
42290    *" need-ngettext "*) gt_api_version=2 ;;
42291    *) gt_api_version=1 ;;
42292  esac
42293  gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
42294  gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
42295
42296    if test "$USE_NLS" = "yes"; then
42297    gt_use_preinstalled_gnugettext=no
42298
42299
42300        if test $gt_api_version -ge 3; then
42301          gt_revision_test_code='
42302#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
42303#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
42304#endif
42305typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
42306'
42307        else
42308          gt_revision_test_code=
42309        fi
42310        if test $gt_api_version -ge 2; then
42311          gt_expression_test_code=' + * ngettext ("", "", 0)'
42312        else
42313          gt_expression_test_code=
42314        fi
42315
42316        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
42317$as_echo_n "checking for GNU gettext in libc... " >&6; }
42318if eval \${$gt_func_gnugettext_libc+:} false; then :
42319  $as_echo_n "(cached) " >&6
42320else
42321  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42322/* end confdefs.h.  */
42323
42324#include <libintl.h>
42325#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
42326extern int _nl_msg_cat_cntr;
42327extern int *_nl_domain_bindings;
42328#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings)
42329#else
42330#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
42331#endif
42332$gt_revision_test_code
42333
42334int
42335main ()
42336{
42337
42338bindtextdomain ("", "");
42339return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
42340
42341  ;
42342  return 0;
42343}
42344_ACEOF
42345if ac_fn_c_try_link "$LINENO"; then :
42346  eval "$gt_func_gnugettext_libc=yes"
42347else
42348  eval "$gt_func_gnugettext_libc=no"
42349fi
42350rm -f core conftest.err conftest.$ac_objext \
42351    conftest$ac_exeext conftest.$ac_ext
42352fi
42353eval ac_res=\$$gt_func_gnugettext_libc
42354	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
42355$as_echo "$ac_res" >&6; }
42356
42357        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
42358
42359
42360
42361
42362
42363          am_save_CPPFLAGS="$CPPFLAGS"
42364
42365  for element in $INCICONV; do
42366    haveit=
42367    for x in $CPPFLAGS; do
42368
42369  acl_save_prefix="$prefix"
42370  prefix="$acl_final_prefix"
42371  acl_save_exec_prefix="$exec_prefix"
42372  exec_prefix="$acl_final_exec_prefix"
42373  eval x=\"$x\"
42374  exec_prefix="$acl_save_exec_prefix"
42375  prefix="$acl_save_prefix"
42376
42377      if test "X$x" = "X$element"; then
42378        haveit=yes
42379        break
42380      fi
42381    done
42382    if test -z "$haveit"; then
42383      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
42384    fi
42385  done
42386
42387
42388  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
42389$as_echo_n "checking for iconv... " >&6; }
42390if ${am_cv_func_iconv+:} false; then :
42391  $as_echo_n "(cached) " >&6
42392else
42393
42394    am_cv_func_iconv="no, consider installing GNU libiconv"
42395    am_cv_lib_iconv=no
42396    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42397/* end confdefs.h.  */
42398
42399#include <stdlib.h>
42400#include <iconv.h>
42401
42402int
42403main ()
42404{
42405iconv_t cd = iconv_open("","");
42406           iconv(cd,NULL,NULL,NULL,NULL);
42407           iconv_close(cd);
42408  ;
42409  return 0;
42410}
42411_ACEOF
42412if ac_fn_c_try_link "$LINENO"; then :
42413  am_cv_func_iconv=yes
42414fi
42415rm -f core conftest.err conftest.$ac_objext \
42416    conftest$ac_exeext conftest.$ac_ext
42417    if test "$am_cv_func_iconv" != yes; then
42418      am_save_LIBS="$LIBS"
42419      LIBS="$LIBS $LIBICONV"
42420      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42421/* end confdefs.h.  */
42422
42423#include <stdlib.h>
42424#include <iconv.h>
42425
42426int
42427main ()
42428{
42429iconv_t cd = iconv_open("","");
42430             iconv(cd,NULL,NULL,NULL,NULL);
42431             iconv_close(cd);
42432  ;
42433  return 0;
42434}
42435_ACEOF
42436if ac_fn_c_try_link "$LINENO"; then :
42437  am_cv_lib_iconv=yes
42438        am_cv_func_iconv=yes
42439fi
42440rm -f core conftest.err conftest.$ac_objext \
42441    conftest$ac_exeext conftest.$ac_ext
42442      LIBS="$am_save_LIBS"
42443    fi
42444
42445fi
42446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
42447$as_echo "$am_cv_func_iconv" >&6; }
42448  if test "$am_cv_func_iconv" = yes; then
42449    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
42450$as_echo_n "checking for working iconv... " >&6; }
42451if ${am_cv_func_iconv_works+:} false; then :
42452  $as_echo_n "(cached) " >&6
42453else
42454
42455                  am_save_LIBS="$LIBS"
42456      if test $am_cv_lib_iconv = yes; then
42457        LIBS="$LIBS $LIBICONV"
42458      fi
42459      am_cv_func_iconv_works=no
42460      for ac_iconv_const in '' 'const'; do
42461        if test "$cross_compiling" = yes; then :
42462  case "$host_os" in
42463             aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
42464             *)            am_cv_func_iconv_works="guessing yes" ;;
42465           esac
42466else
42467  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42468/* end confdefs.h.  */
42469
42470#include <iconv.h>
42471#include <string.h>
42472
42473#ifndef ICONV_CONST
42474# define ICONV_CONST $ac_iconv_const
42475#endif
42476
42477int
42478main ()
42479{
42480int result = 0;
42481  /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from
42482     successful returns.  This is even documented in
42483     <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */
42484  {
42485    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
42486    if (cd_utf8_to_88591 != (iconv_t)(-1))
42487      {
42488        static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
42489        char buf[10];
42490        ICONV_CONST char *inptr = input;
42491        size_t inbytesleft = strlen (input);
42492        char *outptr = buf;
42493        size_t outbytesleft = sizeof (buf);
42494        size_t res = iconv (cd_utf8_to_88591,
42495                            &inptr, &inbytesleft,
42496                            &outptr, &outbytesleft);
42497        if (res == 0)
42498          result |= 1;
42499        iconv_close (cd_utf8_to_88591);
42500      }
42501  }
42502  /* Test against Solaris 10 bug: Failures are not distinguishable from
42503     successful returns.  */
42504  {
42505    iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
42506    if (cd_ascii_to_88591 != (iconv_t)(-1))
42507      {
42508        static ICONV_CONST char input[] = "\263";
42509        char buf[10];
42510        ICONV_CONST char *inptr = input;
42511        size_t inbytesleft = strlen (input);
42512        char *outptr = buf;
42513        size_t outbytesleft = sizeof (buf);
42514        size_t res = iconv (cd_ascii_to_88591,
42515                            &inptr, &inbytesleft,
42516                            &outptr, &outbytesleft);
42517        if (res == 0)
42518          result |= 2;
42519        iconv_close (cd_ascii_to_88591);
42520      }
42521  }
42522  /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
42523  {
42524    iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
42525    if (cd_88591_to_utf8 != (iconv_t)(-1))
42526      {
42527        static ICONV_CONST char input[] = "\304";
42528        static char buf[2] = { (char)0xDE, (char)0xAD };
42529        ICONV_CONST char *inptr = input;
42530        size_t inbytesleft = 1;
42531        char *outptr = buf;
42532        size_t outbytesleft = 1;
42533        size_t res = iconv (cd_88591_to_utf8,
42534                            &inptr, &inbytesleft,
42535                            &outptr, &outbytesleft);
42536        if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
42537          result |= 4;
42538        iconv_close (cd_88591_to_utf8);
42539      }
42540  }
42541#if 0 /* This bug could be worked around by the caller.  */
42542  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
42543  {
42544    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
42545    if (cd_88591_to_utf8 != (iconv_t)(-1))
42546      {
42547        static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
42548        char buf[50];
42549        ICONV_CONST char *inptr = input;
42550        size_t inbytesleft = strlen (input);
42551        char *outptr = buf;
42552        size_t outbytesleft = sizeof (buf);
42553        size_t res = iconv (cd_88591_to_utf8,
42554                            &inptr, &inbytesleft,
42555                            &outptr, &outbytesleft);
42556        if ((int)res > 0)
42557          result |= 8;
42558        iconv_close (cd_88591_to_utf8);
42559      }
42560  }
42561#endif
42562  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
42563     provided.  */
42564  {
42565    /* Try standardized names.  */
42566    iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
42567    /* Try IRIX, OSF/1 names.  */
42568    iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
42569    /* Try AIX names.  */
42570    iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
42571    /* Try HP-UX names.  */
42572    iconv_t cd4 = iconv_open ("utf8", "eucJP");
42573    if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
42574        && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
42575      result |= 16;
42576    if (cd1 != (iconv_t)(-1))
42577      iconv_close (cd1);
42578    if (cd2 != (iconv_t)(-1))
42579      iconv_close (cd2);
42580    if (cd3 != (iconv_t)(-1))
42581      iconv_close (cd3);
42582    if (cd4 != (iconv_t)(-1))
42583      iconv_close (cd4);
42584  }
42585  return result;
42586
42587  ;
42588  return 0;
42589}
42590_ACEOF
42591if ac_fn_c_try_run "$LINENO"; then :
42592  am_cv_func_iconv_works=yes
42593fi
42594rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42595  conftest.$ac_objext conftest.beam conftest.$ac_ext
42596fi
42597
42598        test "$am_cv_func_iconv_works" = no || break
42599      done
42600      LIBS="$am_save_LIBS"
42601
42602fi
42603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
42604$as_echo "$am_cv_func_iconv_works" >&6; }
42605    case "$am_cv_func_iconv_works" in
42606      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
42607      *)   am_func_iconv=yes ;;
42608    esac
42609  else
42610    am_func_iconv=no am_cv_lib_iconv=no
42611  fi
42612  if test "$am_func_iconv" = yes; then
42613
42614$as_echo "#define HAVE_ICONV 1" >>confdefs.h
42615
42616  fi
42617  if test "$am_cv_lib_iconv" = yes; then
42618    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
42619$as_echo_n "checking how to link with libiconv... " >&6; }
42620    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
42621$as_echo "$LIBICONV" >&6; }
42622  else
42623            CPPFLAGS="$am_save_CPPFLAGS"
42624    LIBICONV=
42625    LTLIBICONV=
42626  fi
42627
42628
42629
42630
42631
42632
42633
42634
42635
42636
42637    use_additional=yes
42638
42639  acl_save_prefix="$prefix"
42640  prefix="$acl_final_prefix"
42641  acl_save_exec_prefix="$exec_prefix"
42642  exec_prefix="$acl_final_exec_prefix"
42643
42644    eval additional_includedir=\"$includedir\"
42645    eval additional_libdir=\"$libdir\"
42646    eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
42647    eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
42648
42649  exec_prefix="$acl_save_exec_prefix"
42650  prefix="$acl_save_prefix"
42651
42652
42653# Check whether --with-libintl-prefix was given.
42654if test "${with_libintl_prefix+set}" = set; then :
42655  withval=$with_libintl_prefix;
42656    if test "X$withval" = "Xno"; then
42657      use_additional=no
42658    else
42659      if test "X$withval" = "X"; then
42660
42661  acl_save_prefix="$prefix"
42662  prefix="$acl_final_prefix"
42663  acl_save_exec_prefix="$exec_prefix"
42664  exec_prefix="$acl_final_exec_prefix"
42665
42666          eval additional_includedir=\"$includedir\"
42667          eval additional_libdir=\"$libdir\"
42668          eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
42669          eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
42670
42671  exec_prefix="$acl_save_exec_prefix"
42672  prefix="$acl_save_prefix"
42673
42674      else
42675        additional_includedir="$withval/include"
42676        additional_libdir="$withval/$acl_libdirstem"
42677        additional_libdir2="$withval/$acl_libdirstem2"
42678        additional_libdir3="$withval/$acl_libdirstem3"
42679      fi
42680    fi
42681
42682fi
42683
42684  if test "X$additional_libdir2" = "X$additional_libdir"; then
42685    additional_libdir2=
42686  fi
42687  if test "X$additional_libdir3" = "X$additional_libdir"; then
42688    additional_libdir3=
42689  fi
42690      LIBINTL=
42691  LTLIBINTL=
42692  INCINTL=
42693  LIBINTL_PREFIX=
42694      HAVE_LIBINTL=
42695  rpathdirs=
42696  ltrpathdirs=
42697  names_already_handled=
42698  names_next_round='intl '
42699  while test -n "$names_next_round"; do
42700    names_this_round="$names_next_round"
42701    names_next_round=
42702    for name in $names_this_round; do
42703      already_handled=
42704      for n in $names_already_handled; do
42705        if test "$n" = "$name"; then
42706          already_handled=yes
42707          break
42708        fi
42709      done
42710      if test -z "$already_handled"; then
42711        names_already_handled="$names_already_handled $name"
42712                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
42713        eval value=\"\$HAVE_LIB$uppername\"
42714        if test -n "$value"; then
42715          if test "$value" = yes; then
42716            eval value=\"\$LIB$uppername\"
42717            test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
42718            eval value=\"\$LTLIB$uppername\"
42719            test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
42720          else
42721                                    :
42722          fi
42723        else
42724                              found_dir=
42725          found_la=
42726          found_so=
42727          found_a=
42728          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
42729          if test -n "$acl_shlibext"; then
42730            shrext=".$acl_shlibext"             # typically: shrext=.so
42731          else
42732            shrext=
42733          fi
42734          if test $use_additional = yes; then
42735            for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
42736              if test "X$found_dir" = "X"; then
42737                eval dir=\$$additional_libdir_variable
42738                if test -n "$dir"; then
42739                                                      if test -n "$acl_shlibext"; then
42740                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
42741                      found_dir="$dir"
42742                      found_so="$dir/$libname$shrext"
42743                    else
42744                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
42745                        ver=`(cd "$dir" && \
42746                              for f in "$libname$shrext".*; do echo "$f"; done \
42747                              | sed -e "s,^$libname$shrext\\\\.,," \
42748                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
42749                              | sed 1q ) 2>/dev/null`
42750                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
42751                          found_dir="$dir"
42752                          found_so="$dir/$libname$shrext.$ver"
42753                        fi
42754                      else
42755                        eval library_names=\"$acl_library_names_spec\"
42756                        for f in $library_names; do
42757                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
42758                            found_dir="$dir"
42759                            found_so="$dir/$f"
42760                            break
42761                          fi
42762                        done
42763                      fi
42764                    fi
42765                  fi
42766                                    if test "X$found_dir" = "X"; then
42767                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
42768                      found_dir="$dir"
42769                      found_a="$dir/$libname.$acl_libext"
42770                    fi
42771                  fi
42772                  if test "X$found_dir" != "X"; then
42773                    if test -f "$dir/$libname.la"; then
42774                      found_la="$dir/$libname.la"
42775                    fi
42776                  fi
42777                fi
42778              fi
42779            done
42780          fi
42781          if test "X$found_dir" = "X"; then
42782            for x in $LDFLAGS $LTLIBINTL; do
42783
42784  acl_save_prefix="$prefix"
42785  prefix="$acl_final_prefix"
42786  acl_save_exec_prefix="$exec_prefix"
42787  exec_prefix="$acl_final_exec_prefix"
42788  eval x=\"$x\"
42789  exec_prefix="$acl_save_exec_prefix"
42790  prefix="$acl_save_prefix"
42791
42792              case "$x" in
42793                -L*)
42794                  dir=`echo "X$x" | sed -e 's/^X-L//'`
42795                                    if test -n "$acl_shlibext"; then
42796                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
42797                      found_dir="$dir"
42798                      found_so="$dir/$libname$shrext"
42799                    else
42800                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
42801                        ver=`(cd "$dir" && \
42802                              for f in "$libname$shrext".*; do echo "$f"; done \
42803                              | sed -e "s,^$libname$shrext\\\\.,," \
42804                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
42805                              | sed 1q ) 2>/dev/null`
42806                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
42807                          found_dir="$dir"
42808                          found_so="$dir/$libname$shrext.$ver"
42809                        fi
42810                      else
42811                        eval library_names=\"$acl_library_names_spec\"
42812                        for f in $library_names; do
42813                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
42814                            found_dir="$dir"
42815                            found_so="$dir/$f"
42816                            break
42817                          fi
42818                        done
42819                      fi
42820                    fi
42821                  fi
42822                                    if test "X$found_dir" = "X"; then
42823                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
42824                      found_dir="$dir"
42825                      found_a="$dir/$libname.$acl_libext"
42826                    fi
42827                  fi
42828                  if test "X$found_dir" != "X"; then
42829                    if test -f "$dir/$libname.la"; then
42830                      found_la="$dir/$libname.la"
42831                    fi
42832                  fi
42833                  ;;
42834              esac
42835              if test "X$found_dir" != "X"; then
42836                break
42837              fi
42838            done
42839          fi
42840          if test "X$found_dir" != "X"; then
42841                        LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
42842            if test "X$found_so" != "X"; then
42843                                                        if test "$enable_rpath" = no \
42844                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
42845                 || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
42846                 || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
42847                                LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
42848              else
42849                                                                                haveit=
42850                for x in $ltrpathdirs; do
42851                  if test "X$x" = "X$found_dir"; then
42852                    haveit=yes
42853                    break
42854                  fi
42855                done
42856                if test -z "$haveit"; then
42857                  ltrpathdirs="$ltrpathdirs $found_dir"
42858                fi
42859                                if test "$acl_hardcode_direct" = yes; then
42860                                                      LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
42861                else
42862                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
42863                                                            LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
42864                                                            haveit=
42865                    for x in $rpathdirs; do
42866                      if test "X$x" = "X$found_dir"; then
42867                        haveit=yes
42868                        break
42869                      fi
42870                    done
42871                    if test -z "$haveit"; then
42872                      rpathdirs="$rpathdirs $found_dir"
42873                    fi
42874                  else
42875                                                                                haveit=
42876                    for x in $LDFLAGS $LIBINTL; do
42877
42878  acl_save_prefix="$prefix"
42879  prefix="$acl_final_prefix"
42880  acl_save_exec_prefix="$exec_prefix"
42881  exec_prefix="$acl_final_exec_prefix"
42882  eval x=\"$x\"
42883  exec_prefix="$acl_save_exec_prefix"
42884  prefix="$acl_save_prefix"
42885
42886                      if test "X$x" = "X-L$found_dir"; then
42887                        haveit=yes
42888                        break
42889                      fi
42890                    done
42891                    if test -z "$haveit"; then
42892                      LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
42893                    fi
42894                    if test "$acl_hardcode_minus_L" != no; then
42895                                                                                        LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
42896                    else
42897                                                                                                                                                                                LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
42898                    fi
42899                  fi
42900                fi
42901              fi
42902            else
42903              if test "X$found_a" != "X"; then
42904                                LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
42905              else
42906                                                LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
42907              fi
42908            fi
42909                        additional_includedir=
42910            case "$found_dir" in
42911              */$acl_libdirstem | */$acl_libdirstem/)
42912                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
42913                if test "$name" = 'intl'; then
42914                  LIBINTL_PREFIX="$basedir"
42915                fi
42916                additional_includedir="$basedir/include"
42917                ;;
42918              */$acl_libdirstem2 | */$acl_libdirstem2/)
42919                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
42920                if test "$name" = 'intl'; then
42921                  LIBINTL_PREFIX="$basedir"
42922                fi
42923                additional_includedir="$basedir/include"
42924                ;;
42925              */$acl_libdirstem3 | */$acl_libdirstem3/)
42926                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
42927                if test "$name" = 'intl'; then
42928                  LIBINTL_PREFIX="$basedir"
42929                fi
42930                additional_includedir="$basedir/include"
42931                ;;
42932            esac
42933            if test "X$additional_includedir" != "X"; then
42934                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
42935                haveit=
42936                if test "X$additional_includedir" = "X/usr/local/include"; then
42937                  if test -n "$GCC"; then
42938                    case $host_os in
42939                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
42940                    esac
42941                  fi
42942                fi
42943                if test -z "$haveit"; then
42944                  for x in $CPPFLAGS $INCINTL; do
42945
42946  acl_save_prefix="$prefix"
42947  prefix="$acl_final_prefix"
42948  acl_save_exec_prefix="$exec_prefix"
42949  exec_prefix="$acl_final_exec_prefix"
42950  eval x=\"$x\"
42951  exec_prefix="$acl_save_exec_prefix"
42952  prefix="$acl_save_prefix"
42953
42954                    if test "X$x" = "X-I$additional_includedir"; then
42955                      haveit=yes
42956                      break
42957                    fi
42958                  done
42959                  if test -z "$haveit"; then
42960                    if test -d "$additional_includedir"; then
42961                                            INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
42962                    fi
42963                  fi
42964                fi
42965              fi
42966            fi
42967                        if test -n "$found_la"; then
42968                                                        save_libdir="$libdir"
42969              case "$found_la" in
42970                */* | *\\*) . "$found_la" ;;
42971                *) . "./$found_la" ;;
42972              esac
42973              libdir="$save_libdir"
42974                            for dep in $dependency_libs; do
42975                case "$dep" in
42976                  -L*)
42977                    dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
42978                                                                                                                                                                if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
42979                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
42980                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
42981                      haveit=
42982                      if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
42983                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
42984                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
42985                        if test -n "$GCC"; then
42986                          case $host_os in
42987                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
42988                          esac
42989                        fi
42990                      fi
42991                      if test -z "$haveit"; then
42992                        haveit=
42993                        for x in $LDFLAGS $LIBINTL; do
42994
42995  acl_save_prefix="$prefix"
42996  prefix="$acl_final_prefix"
42997  acl_save_exec_prefix="$exec_prefix"
42998  exec_prefix="$acl_final_exec_prefix"
42999  eval x=\"$x\"
43000  exec_prefix="$acl_save_exec_prefix"
43001  prefix="$acl_save_prefix"
43002
43003                          if test "X$x" = "X-L$dependency_libdir"; then
43004                            haveit=yes
43005                            break
43006                          fi
43007                        done
43008                        if test -z "$haveit"; then
43009                          if test -d "$dependency_libdir"; then
43010                                                        LIBINTL="${LIBINTL}${LIBINTL:+ }-L$dependency_libdir"
43011                          fi
43012                        fi
43013                        haveit=
43014                        for x in $LDFLAGS $LTLIBINTL; do
43015
43016  acl_save_prefix="$prefix"
43017  prefix="$acl_final_prefix"
43018  acl_save_exec_prefix="$exec_prefix"
43019  exec_prefix="$acl_final_exec_prefix"
43020  eval x=\"$x\"
43021  exec_prefix="$acl_save_exec_prefix"
43022  prefix="$acl_save_prefix"
43023
43024                          if test "X$x" = "X-L$dependency_libdir"; then
43025                            haveit=yes
43026                            break
43027                          fi
43028                        done
43029                        if test -z "$haveit"; then
43030                          if test -d "$dependency_libdir"; then
43031                                                        LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$dependency_libdir"
43032                          fi
43033                        fi
43034                      fi
43035                    fi
43036                    ;;
43037                  -R*)
43038                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
43039                    if test "$enable_rpath" != no; then
43040                                                                  haveit=
43041                      for x in $rpathdirs; do
43042                        if test "X$x" = "X$dir"; then
43043                          haveit=yes
43044                          break
43045                        fi
43046                      done
43047                      if test -z "$haveit"; then
43048                        rpathdirs="$rpathdirs $dir"
43049                      fi
43050                                                                  haveit=
43051                      for x in $ltrpathdirs; do
43052                        if test "X$x" = "X$dir"; then
43053                          haveit=yes
43054                          break
43055                        fi
43056                      done
43057                      if test -z "$haveit"; then
43058                        ltrpathdirs="$ltrpathdirs $dir"
43059                      fi
43060                    fi
43061                    ;;
43062                  -l*)
43063                                                                                                                                                                dep=`echo "X$dep" | sed -e 's/^X-l//'`
43064                    if test "X$dep" != Xc \
43065                       || case $host_os in
43066                            linux* | gnu* | k*bsd*-gnu) false ;;
43067                            *)                          true ;;
43068                          esac; then
43069                      names_next_round="$names_next_round $dep"
43070                    fi
43071                    ;;
43072                  *.la)
43073                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
43074                    ;;
43075                  *)
43076                                        LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
43077                    LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
43078                    ;;
43079                esac
43080              done
43081            fi
43082          else
43083                                                            LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
43084            LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
43085          fi
43086        fi
43087      fi
43088    done
43089  done
43090  if test "X$rpathdirs" != "X"; then
43091    if test -n "$acl_hardcode_libdir_separator"; then
43092                        alldirs=
43093      for found_dir in $rpathdirs; do
43094        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
43095      done
43096            acl_save_libdir="$libdir"
43097      libdir="$alldirs"
43098      eval flag=\"$acl_hardcode_libdir_flag_spec\"
43099      libdir="$acl_save_libdir"
43100      LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
43101    else
43102            for found_dir in $rpathdirs; do
43103        acl_save_libdir="$libdir"
43104        libdir="$found_dir"
43105        eval flag=\"$acl_hardcode_libdir_flag_spec\"
43106        libdir="$acl_save_libdir"
43107        LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
43108      done
43109    fi
43110  fi
43111  if test "X$ltrpathdirs" != "X"; then
43112            for found_dir in $ltrpathdirs; do
43113      LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
43114    done
43115  fi
43116
43117
43118
43119
43120
43121          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
43122$as_echo_n "checking for GNU gettext in libintl... " >&6; }
43123if eval \${$gt_func_gnugettext_libintl+:} false; then :
43124  $as_echo_n "(cached) " >&6
43125else
43126  gt_save_CPPFLAGS="$CPPFLAGS"
43127            CPPFLAGS="$CPPFLAGS $INCINTL"
43128            gt_save_LIBS="$LIBS"
43129            LIBS="$LIBS $LIBINTL"
43130                        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43131/* end confdefs.h.  */
43132
43133#include <libintl.h>
43134#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
43135extern int _nl_msg_cat_cntr;
43136extern
43137#ifdef __cplusplus
43138"C"
43139#endif
43140const char *_nl_expand_alias (const char *);
43141#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
43142#else
43143#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
43144#endif
43145$gt_revision_test_code
43146
43147int
43148main ()
43149{
43150
43151bindtextdomain ("", "");
43152return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
43153
43154  ;
43155  return 0;
43156}
43157_ACEOF
43158if ac_fn_c_try_link "$LINENO"; then :
43159  eval "$gt_func_gnugettext_libintl=yes"
43160else
43161  eval "$gt_func_gnugettext_libintl=no"
43162fi
43163rm -f core conftest.err conftest.$ac_objext \
43164    conftest$ac_exeext conftest.$ac_ext
43165                        if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
43166              LIBS="$LIBS $LIBICONV"
43167              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43168/* end confdefs.h.  */
43169
43170#include <libintl.h>
43171#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
43172extern int _nl_msg_cat_cntr;
43173extern
43174#ifdef __cplusplus
43175"C"
43176#endif
43177const char *_nl_expand_alias (const char *);
43178#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
43179#else
43180#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
43181#endif
43182$gt_revision_test_code
43183
43184int
43185main ()
43186{
43187
43188bindtextdomain ("", "");
43189return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
43190
43191  ;
43192  return 0;
43193}
43194_ACEOF
43195if ac_fn_c_try_link "$LINENO"; then :
43196  LIBINTL="$LIBINTL $LIBICONV"
43197                 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
43198                 eval "$gt_func_gnugettext_libintl=yes"
43199
43200fi
43201rm -f core conftest.err conftest.$ac_objext \
43202    conftest$ac_exeext conftest.$ac_ext
43203            fi
43204            CPPFLAGS="$gt_save_CPPFLAGS"
43205            LIBS="$gt_save_LIBS"
43206fi
43207eval ac_res=\$$gt_func_gnugettext_libintl
43208	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
43209$as_echo "$ac_res" >&6; }
43210        fi
43211
43212                                        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
43213           || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
43214                && test "$PACKAGE" != gettext-runtime \
43215                && test "$PACKAGE" != gettext-tools; }; then
43216          gt_use_preinstalled_gnugettext=yes
43217        else
43218                    LIBINTL=
43219          LTLIBINTL=
43220          INCINTL=
43221        fi
43222
43223
43224
43225    if test -n "$INTL_MACOSX_LIBS"; then
43226      if test "$gt_use_preinstalled_gnugettext" = "yes" \
43227         || test "$nls_cv_use_gnu_gettext" = "yes"; then
43228                LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
43229        LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
43230      fi
43231    fi
43232
43233    if test "$gt_use_preinstalled_gnugettext" = "yes" \
43234       || test "$nls_cv_use_gnu_gettext" = "yes"; then
43235
43236$as_echo "#define ENABLE_NLS 1" >>confdefs.h
43237
43238    else
43239      USE_NLS=no
43240    fi
43241  fi
43242
43243  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
43244$as_echo_n "checking whether to use NLS... " >&6; }
43245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
43246$as_echo "$USE_NLS" >&6; }
43247  if test "$USE_NLS" = "yes"; then
43248    { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
43249$as_echo_n "checking where the gettext function comes from... " >&6; }
43250    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
43251      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
43252        gt_source="external libintl"
43253      else
43254        gt_source="libc"
43255      fi
43256    else
43257      gt_source="included intl directory"
43258    fi
43259    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
43260$as_echo "$gt_source" >&6; }
43261  fi
43262
43263  if test "$USE_NLS" = "yes"; then
43264
43265    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
43266      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
43267        { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
43268$as_echo_n "checking how to link with libintl... " >&6; }
43269        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
43270$as_echo "$LIBINTL" >&6; }
43271
43272  for element in $INCINTL; do
43273    haveit=
43274    for x in $CPPFLAGS; do
43275
43276  acl_save_prefix="$prefix"
43277  prefix="$acl_final_prefix"
43278  acl_save_exec_prefix="$exec_prefix"
43279  exec_prefix="$acl_final_exec_prefix"
43280  eval x=\"$x\"
43281  exec_prefix="$acl_save_exec_prefix"
43282  prefix="$acl_save_prefix"
43283
43284      if test "X$x" = "X$element"; then
43285        haveit=yes
43286        break
43287      fi
43288    done
43289    if test -z "$haveit"; then
43290      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
43291    fi
43292  done
43293
43294      fi
43295
43296
43297$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
43298
43299
43300$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
43301
43302    fi
43303
43304        POSUB=po
43305  fi
43306
43307
43308
43309    INTLLIBS="$LIBINTL"
43310
43311
43312
43313
43314
43315
43316
43317
43318# Initialize the test suite.
43319ac_config_commands="$ac_config_commands tests/atconfig"
43320
43321ac_config_files="$ac_config_files tests/Makefile tests/atlocal"
43322 # FIXME: tests/preset?
43323
43324AUTOM4TE=${AUTOM4TE-"${am_missing_run}autom4te"}
43325
43326
43327
43328
43329# Check whether --enable-backup-scripts was given.
43330if test "${enable_backup_scripts+set}" = set; then :
43331  enableval=$enable_backup_scripts; case $enableval in
43332	       yes) BACKUP_LIBEXEC_SCRIPTS='$(BACKUP_LIBEXEC_SCRIPTS_LIST)'
43333                    BACKUP_SBIN_SCRIPTS='$(BACKUP_SBIN_SCRIPTS_LIST)'
43334                    ;;
43335               esac
43336fi
43337
43338
43339
43340if date +%Y-%m-%d 2>/dev/null >&2; then
43341	BACKUP_SED_COND='/^\#ELSE_DATE_FORMAT_OK/,/^\#ENDIF_DATE_FORMAT_OK/d;/^\#IF_DATE_FORMAT_OK/d'
43342else
43343	BACKUP_SED_COND='/^\#IF_DATE_FORMAT_OK/,/^\#ELSE_DATE_FORMAT_OK/d;/^\#ENDIF_DATE_FORMAT_OK/d'
43344fi
43345
43346ac_config_files="$ac_config_files Makefile doc/Makefile gnu/Makefile lib/Makefile po/Makefile.in scripts/Makefile rmt/Makefile src/Makefile"
43347
43348cat >confcache <<\_ACEOF
43349# This file is a shell script that caches the results of configure
43350# tests run on this system so they can be shared between configure
43351# scripts and configure runs, see configure's option --config-cache.
43352# It is not useful on other systems.  If it contains results you don't
43353# want to keep, you may remove or edit it.
43354#
43355# config.status only pays attention to the cache file if you give it
43356# the --recheck option to rerun configure.
43357#
43358# `ac_cv_env_foo' variables (set or unset) will be overridden when
43359# loading this file, other *unset* `ac_cv_foo' will be assigned the
43360# following values.
43361
43362_ACEOF
43363
43364# The following way of writing the cache mishandles newlines in values,
43365# but we know of no workaround that is simple, portable, and efficient.
43366# So, we kill variables containing newlines.
43367# Ultrix sh set writes to stderr and can't be redirected directly,
43368# and sets the high bit in the cache file unless we assign to the vars.
43369(
43370  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
43371    eval ac_val=\$$ac_var
43372    case $ac_val in #(
43373    *${as_nl}*)
43374      case $ac_var in #(
43375      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
43376$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
43377      esac
43378      case $ac_var in #(
43379      _ | IFS | as_nl) ;; #(
43380      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
43381      *) { eval $ac_var=; unset $ac_var;} ;;
43382      esac ;;
43383    esac
43384  done
43385
43386  (set) 2>&1 |
43387    case $as_nl`(ac_space=' '; set) 2>&1` in #(
43388    *${as_nl}ac_space=\ *)
43389      # `set' does not quote correctly, so add quotes: double-quote
43390      # substitution turns \\\\ into \\, and sed turns \\ into \.
43391      sed -n \
43392	"s/'/'\\\\''/g;
43393	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
43394      ;; #(
43395    *)
43396      # `set' quotes correctly as required by POSIX, so do not add quotes.
43397      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
43398      ;;
43399    esac |
43400    sort
43401) |
43402  sed '
43403     /^ac_cv_env_/b end
43404     t clear
43405     :clear
43406     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
43407     t end
43408     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
43409     :end' >>confcache
43410if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
43411  if test -w "$cache_file"; then
43412    if test "x$cache_file" != "x/dev/null"; then
43413      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
43414$as_echo "$as_me: updating cache $cache_file" >&6;}
43415      if test ! -f "$cache_file" || test -h "$cache_file"; then
43416	cat confcache >"$cache_file"
43417      else
43418        case $cache_file in #(
43419        */* | ?:*)
43420	  mv -f confcache "$cache_file"$$ &&
43421	  mv -f "$cache_file"$$ "$cache_file" ;; #(
43422        *)
43423	  mv -f confcache "$cache_file" ;;
43424	esac
43425      fi
43426    fi
43427  else
43428    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
43429$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
43430  fi
43431fi
43432rm -f confcache
43433
43434test "x$prefix" = xNONE && prefix=$ac_default_prefix
43435# Let make expand exec_prefix.
43436test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
43437
43438DEFS=-DHAVE_CONFIG_H
43439
43440ac_libobjs=
43441ac_ltlibobjs=
43442U=
43443for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
43444  # 1. Remove the extension, and $U if already installed.
43445  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
43446  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
43447  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
43448  #    will be set to the directory where LIBOBJS objects are built.
43449  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
43450  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
43451done
43452LIBOBJS=$ac_libobjs
43453
43454LTLIBOBJS=$ac_ltlibobjs
43455
43456
43457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
43458$as_echo_n "checking that generated files are newer than configure... " >&6; }
43459   if test -n "$am_sleep_pid"; then
43460     # Hide warnings about reused PIDs.
43461     wait $am_sleep_pid 2>/dev/null
43462   fi
43463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
43464$as_echo "done" >&6; }
43465 if test -n "$EXEEXT"; then
43466  am__EXEEXT_TRUE=
43467  am__EXEEXT_FALSE='#'
43468else
43469  am__EXEEXT_TRUE='#'
43470  am__EXEEXT_FALSE=
43471fi
43472
43473if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
43474  as_fn_error $? "conditional \"AMDEP\" was never defined.
43475Usually this means the macro was only invoked conditionally." "$LINENO" 5
43476fi
43477if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
43478  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
43479Usually this means the macro was only invoked conditionally." "$LINENO" 5
43480fi
43481if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
43482  as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
43483Usually this means the macro was only invoked conditionally." "$LINENO" 5
43484fi
43485if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
43486  as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
43487Usually this means the macro was only invoked conditionally." "$LINENO" 5
43488fi
43489if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
43490  as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
43491Usually this means the macro was only invoked conditionally." "$LINENO" 5
43492fi
43493if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
43494  as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
43495Usually this means the macro was only invoked conditionally." "$LINENO" 5
43496fi
43497if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
43498  as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
43499Usually this means the macro was only invoked conditionally." "$LINENO" 5
43500fi
43501if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
43502  as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
43503Usually this means the macro was only invoked conditionally." "$LINENO" 5
43504fi
43505if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
43506  as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
43507Usually this means the macro was only invoked conditionally." "$LINENO" 5
43508fi
43509if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
43510  as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
43511Usually this means the macro was only invoked conditionally." "$LINENO" 5
43512fi
43513if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
43514  as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
43515Usually this means the macro was only invoked conditionally." "$LINENO" 5
43516fi
43517if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
43518  as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
43519Usually this means the macro was only invoked conditionally." "$LINENO" 5
43520fi
43521if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
43522  as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
43523Usually this means the macro was only invoked conditionally." "$LINENO" 5
43524fi
43525if test -z "${GL_GENERATE_SELINUX_CONTEXT_H_TRUE}" && test -z "${GL_GENERATE_SELINUX_CONTEXT_H_FALSE}"; then
43526  as_fn_error $? "conditional \"GL_GENERATE_SELINUX_CONTEXT_H\" was never defined.
43527Usually this means the macro was only invoked conditionally." "$LINENO" 5
43528fi
43529if test -z "${GL_GENERATE_SELINUX_LABEL_H_TRUE}" && test -z "${GL_GENERATE_SELINUX_LABEL_H_FALSE}"; then
43530  as_fn_error $? "conditional \"GL_GENERATE_SELINUX_LABEL_H\" was never defined.
43531Usually this means the macro was only invoked conditionally." "$LINENO" 5
43532fi
43533if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
43534  as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
43535Usually this means the macro was only invoked conditionally." "$LINENO" 5
43536fi
43537if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
43538  as_fn_error $? "conditional \"GL_GENERATE_STDARG_H\" was never defined.
43539Usually this means the macro was only invoked conditionally." "$LINENO" 5
43540fi
43541if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
43542  as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
43543Usually this means the macro was only invoked conditionally." "$LINENO" 5
43544fi
43545if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
43546  as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
43547Usually this means the macro was only invoked conditionally." "$LINENO" 5
43548fi
43549if test -z "${GL_GENERATE_SYSEXITS_H_TRUE}" && test -z "${GL_GENERATE_SYSEXITS_H_FALSE}"; then
43550  as_fn_error $? "conditional \"GL_GENERATE_SYSEXITS_H\" was never defined.
43551Usually this means the macro was only invoked conditionally." "$LINENO" 5
43552fi
43553if test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE}"; then
43554  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH\" was never defined.
43555Usually this means the macro was only invoked conditionally." "$LINENO" 5
43556fi
43557
43558
43559    gl_libobjs=
43560    gl_ltlibobjs=
43561    if test -n "$gl_LIBOBJS"; then
43562      # Remove the extension.
43563      sed_drop_objext='s/\.o$//;s/\.obj$//'
43564      for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
43565        gl_libobjs="$gl_libobjs $i.$ac_objext"
43566        gl_ltlibobjs="$gl_ltlibobjs $i.lo"
43567      done
43568    fi
43569    gl_LIBOBJS=$gl_libobjs
43570
43571    gl_LTLIBOBJS=$gl_ltlibobjs
43572
43573
43574
43575    gltests_libobjs=
43576    gltests_ltlibobjs=
43577    if test -n "$gltests_LIBOBJS"; then
43578      # Remove the extension.
43579      sed_drop_objext='s/\.o$//;s/\.obj$//'
43580      for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
43581        gltests_libobjs="$gltests_libobjs $i.$ac_objext"
43582        gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
43583      done
43584    fi
43585    gltests_LIBOBJS=$gltests_libobjs
43586
43587    gltests_LTLIBOBJS=$gltests_ltlibobjs
43588
43589
43590if test -z "${PU_RMT_COND_TRUE}" && test -z "${PU_RMT_COND_FALSE}"; then
43591  as_fn_error $? "conditional \"PU_RMT_COND\" was never defined.
43592Usually this means the macro was only invoked conditionally." "$LINENO" 5
43593fi
43594if test -z "${TAR_COND_XATTR_H_TRUE}" && test -z "${TAR_COND_XATTR_H_FALSE}"; then
43595  as_fn_error $? "conditional \"TAR_COND_XATTR_H\" was never defined.
43596Usually this means the macro was only invoked conditionally." "$LINENO" 5
43597fi
43598if test -z "${TAR_COND_XATTR_H_TRUE}" && test -z "${TAR_COND_XATTR_H_FALSE}"; then
43599  as_fn_error $? "conditional \"TAR_COND_XATTR_H\" was never defined.
43600Usually this means the macro was only invoked conditionally." "$LINENO" 5
43601fi
43602
43603: "${CONFIG_STATUS=./config.status}"
43604ac_write_fail=0
43605ac_clean_files_save=$ac_clean_files
43606ac_clean_files="$ac_clean_files $CONFIG_STATUS"
43607{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
43608$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
43609as_write_fail=0
43610cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
43611#! $SHELL
43612# Generated by $as_me.
43613# Run this file to recreate the current configuration.
43614# Compiler output produced by configure, useful for debugging
43615# configure, is in config.log if it exists.
43616
43617debug=false
43618ac_cs_recheck=false
43619ac_cs_silent=false
43620
43621SHELL=\${CONFIG_SHELL-$SHELL}
43622export SHELL
43623_ASEOF
43624cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
43625## -------------------- ##
43626## M4sh Initialization. ##
43627## -------------------- ##
43628
43629# Be more Bourne compatible
43630DUALCASE=1; export DUALCASE # for MKS sh
43631if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
43632  emulate sh
43633  NULLCMD=:
43634  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
43635  # is contrary to our usage.  Disable this feature.
43636  alias -g '${1+"$@"}'='"$@"'
43637  setopt NO_GLOB_SUBST
43638else
43639  case `(set -o) 2>/dev/null` in #(
43640  *posix*) :
43641    set -o posix ;; #(
43642  *) :
43643     ;;
43644esac
43645fi
43646
43647
43648as_nl='
43649'
43650export as_nl
43651# Printing a long string crashes Solaris 7 /usr/bin/printf.
43652as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43653as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
43654as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43655# Prefer a ksh shell builtin over an external printf program on Solaris,
43656# but without wasting forks for bash or zsh.
43657if test -z "$BASH_VERSION$ZSH_VERSION" \
43658    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
43659  as_echo='print -r --'
43660  as_echo_n='print -rn --'
43661elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
43662  as_echo='printf %s\n'
43663  as_echo_n='printf %s'
43664else
43665  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
43666    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
43667    as_echo_n='/usr/ucb/echo -n'
43668  else
43669    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
43670    as_echo_n_body='eval
43671      arg=$1;
43672      case $arg in #(
43673      *"$as_nl"*)
43674	expr "X$arg" : "X\\(.*\\)$as_nl";
43675	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
43676      esac;
43677      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
43678    '
43679    export as_echo_n_body
43680    as_echo_n='sh -c $as_echo_n_body as_echo'
43681  fi
43682  export as_echo_body
43683  as_echo='sh -c $as_echo_body as_echo'
43684fi
43685
43686# The user is always right.
43687if test "${PATH_SEPARATOR+set}" != set; then
43688  PATH_SEPARATOR=:
43689  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
43690    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
43691      PATH_SEPARATOR=';'
43692  }
43693fi
43694
43695
43696# IFS
43697# We need space, tab and new line, in precisely that order.  Quoting is
43698# there to prevent editors from complaining about space-tab.
43699# (If _AS_PATH_WALK were called with IFS unset, it would disable word
43700# splitting by setting IFS to empty value.)
43701IFS=" ""	$as_nl"
43702
43703# Find who we are.  Look in the path if we contain no directory separator.
43704as_myself=
43705case $0 in #((
43706  *[\\/]* ) as_myself=$0 ;;
43707  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43708for as_dir in $PATH
43709do
43710  IFS=$as_save_IFS
43711  test -z "$as_dir" && as_dir=.
43712    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
43713  done
43714IFS=$as_save_IFS
43715
43716     ;;
43717esac
43718# We did not find ourselves, most probably we were run as `sh COMMAND'
43719# in which case we are not to be found in the path.
43720if test "x$as_myself" = x; then
43721  as_myself=$0
43722fi
43723if test ! -f "$as_myself"; then
43724  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
43725  exit 1
43726fi
43727
43728# Unset variables that we do not need and which cause bugs (e.g. in
43729# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
43730# suppresses any "Segmentation fault" message there.  '((' could
43731# trigger a bug in pdksh 5.2.14.
43732for as_var in BASH_ENV ENV MAIL MAILPATH
43733do eval test x\${$as_var+set} = xset \
43734  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
43735done
43736PS1='$ '
43737PS2='> '
43738PS4='+ '
43739
43740# NLS nuisances.
43741LC_ALL=C
43742export LC_ALL
43743LANGUAGE=C
43744export LANGUAGE
43745
43746# CDPATH.
43747(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
43748
43749
43750# as_fn_error STATUS ERROR [LINENO LOG_FD]
43751# ----------------------------------------
43752# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
43753# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
43754# script with STATUS, using 1 if that was 0.
43755as_fn_error ()
43756{
43757  as_status=$1; test $as_status -eq 0 && as_status=1
43758  if test "$4"; then
43759    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
43760    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
43761  fi
43762  $as_echo "$as_me: error: $2" >&2
43763  as_fn_exit $as_status
43764} # as_fn_error
43765
43766
43767# as_fn_set_status STATUS
43768# -----------------------
43769# Set $? to STATUS, without forking.
43770as_fn_set_status ()
43771{
43772  return $1
43773} # as_fn_set_status
43774
43775# as_fn_exit STATUS
43776# -----------------
43777# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
43778as_fn_exit ()
43779{
43780  set +e
43781  as_fn_set_status $1
43782  exit $1
43783} # as_fn_exit
43784
43785# as_fn_unset VAR
43786# ---------------
43787# Portably unset VAR.
43788as_fn_unset ()
43789{
43790  { eval $1=; unset $1;}
43791}
43792as_unset=as_fn_unset
43793# as_fn_append VAR VALUE
43794# ----------------------
43795# Append the text in VALUE to the end of the definition contained in VAR. Take
43796# advantage of any shell optimizations that allow amortized linear growth over
43797# repeated appends, instead of the typical quadratic growth present in naive
43798# implementations.
43799if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
43800  eval 'as_fn_append ()
43801  {
43802    eval $1+=\$2
43803  }'
43804else
43805  as_fn_append ()
43806  {
43807    eval $1=\$$1\$2
43808  }
43809fi # as_fn_append
43810
43811# as_fn_arith ARG...
43812# ------------------
43813# Perform arithmetic evaluation on the ARGs, and store the result in the
43814# global $as_val. Take advantage of shells that can avoid forks. The arguments
43815# must be portable across $(()) and expr.
43816if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
43817  eval 'as_fn_arith ()
43818  {
43819    as_val=$(( $* ))
43820  }'
43821else
43822  as_fn_arith ()
43823  {
43824    as_val=`expr "$@" || test $? -eq 1`
43825  }
43826fi # as_fn_arith
43827
43828
43829if expr a : '\(a\)' >/dev/null 2>&1 &&
43830   test "X`expr 00001 : '.*\(...\)'`" = X001; then
43831  as_expr=expr
43832else
43833  as_expr=false
43834fi
43835
43836if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
43837  as_basename=basename
43838else
43839  as_basename=false
43840fi
43841
43842if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
43843  as_dirname=dirname
43844else
43845  as_dirname=false
43846fi
43847
43848as_me=`$as_basename -- "$0" ||
43849$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
43850	 X"$0" : 'X\(//\)$' \| \
43851	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
43852$as_echo X/"$0" |
43853    sed '/^.*\/\([^/][^/]*\)\/*$/{
43854	    s//\1/
43855	    q
43856	  }
43857	  /^X\/\(\/\/\)$/{
43858	    s//\1/
43859	    q
43860	  }
43861	  /^X\/\(\/\).*/{
43862	    s//\1/
43863	    q
43864	  }
43865	  s/.*/./; q'`
43866
43867# Avoid depending upon Character Ranges.
43868as_cr_letters='abcdefghijklmnopqrstuvwxyz'
43869as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
43870as_cr_Letters=$as_cr_letters$as_cr_LETTERS
43871as_cr_digits='0123456789'
43872as_cr_alnum=$as_cr_Letters$as_cr_digits
43873
43874ECHO_C= ECHO_N= ECHO_T=
43875case `echo -n x` in #(((((
43876-n*)
43877  case `echo 'xy\c'` in
43878  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
43879  xy)  ECHO_C='\c';;
43880  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
43881       ECHO_T='	';;
43882  esac;;
43883*)
43884  ECHO_N='-n';;
43885esac
43886
43887rm -f conf$$ conf$$.exe conf$$.file
43888if test -d conf$$.dir; then
43889  rm -f conf$$.dir/conf$$.file
43890else
43891  rm -f conf$$.dir
43892  mkdir conf$$.dir 2>/dev/null
43893fi
43894if (echo >conf$$.file) 2>/dev/null; then
43895  if ln -s conf$$.file conf$$ 2>/dev/null; then
43896    as_ln_s='ln -s'
43897    # ... but there are two gotchas:
43898    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
43899    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
43900    # In both cases, we have to default to `cp -pR'.
43901    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
43902      as_ln_s='cp -pR'
43903  elif ln conf$$.file conf$$ 2>/dev/null; then
43904    as_ln_s=ln
43905  else
43906    as_ln_s='cp -pR'
43907  fi
43908else
43909  as_ln_s='cp -pR'
43910fi
43911rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
43912rmdir conf$$.dir 2>/dev/null
43913
43914
43915# as_fn_mkdir_p
43916# -------------
43917# Create "$as_dir" as a directory, including parents if necessary.
43918as_fn_mkdir_p ()
43919{
43920
43921  case $as_dir in #(
43922  -*) as_dir=./$as_dir;;
43923  esac
43924  test -d "$as_dir" || eval $as_mkdir_p || {
43925    as_dirs=
43926    while :; do
43927      case $as_dir in #(
43928      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
43929      *) as_qdir=$as_dir;;
43930      esac
43931      as_dirs="'$as_qdir' $as_dirs"
43932      as_dir=`$as_dirname -- "$as_dir" ||
43933$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
43934	 X"$as_dir" : 'X\(//\)[^/]' \| \
43935	 X"$as_dir" : 'X\(//\)$' \| \
43936	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
43937$as_echo X"$as_dir" |
43938    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
43939	    s//\1/
43940	    q
43941	  }
43942	  /^X\(\/\/\)[^/].*/{
43943	    s//\1/
43944	    q
43945	  }
43946	  /^X\(\/\/\)$/{
43947	    s//\1/
43948	    q
43949	  }
43950	  /^X\(\/\).*/{
43951	    s//\1/
43952	    q
43953	  }
43954	  s/.*/./; q'`
43955      test -d "$as_dir" && break
43956    done
43957    test -z "$as_dirs" || eval "mkdir $as_dirs"
43958  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
43959
43960
43961} # as_fn_mkdir_p
43962if mkdir -p . 2>/dev/null; then
43963  as_mkdir_p='mkdir -p "$as_dir"'
43964else
43965  test -d ./-p && rmdir ./-p
43966  as_mkdir_p=false
43967fi
43968
43969
43970# as_fn_executable_p FILE
43971# -----------------------
43972# Test if FILE is an executable regular file.
43973as_fn_executable_p ()
43974{
43975  test -f "$1" && test -x "$1"
43976} # as_fn_executable_p
43977as_test_x='test -x'
43978as_executable_p=as_fn_executable_p
43979
43980# Sed expression to map a string onto a valid CPP name.
43981as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
43982
43983# Sed expression to map a string onto a valid variable name.
43984as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
43985
43986
43987exec 6>&1
43988## ----------------------------------- ##
43989## Main body of $CONFIG_STATUS script. ##
43990## ----------------------------------- ##
43991_ASEOF
43992test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
43993
43994cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
43995# Save the log message, to keep $0 and so on meaningful, and to
43996# report actual input values of CONFIG_FILES etc. instead of their
43997# values after options handling.
43998ac_log="
43999This file was extended by GNU tar $as_me 1.34, which was
44000generated by GNU Autoconf 2.69.  Invocation command line was
44001
44002  CONFIG_FILES    = $CONFIG_FILES
44003  CONFIG_HEADERS  = $CONFIG_HEADERS
44004  CONFIG_LINKS    = $CONFIG_LINKS
44005  CONFIG_COMMANDS = $CONFIG_COMMANDS
44006  $ $0 $@
44007
44008on `(hostname || uname -n) 2>/dev/null | sed 1q`
44009"
44010
44011_ACEOF
44012
44013case $ac_config_files in *"
44014"*) set x $ac_config_files; shift; ac_config_files=$*;;
44015esac
44016
44017case $ac_config_headers in *"
44018"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
44019esac
44020
44021
44022cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
44023# Files that config.status was made for.
44024config_files="$ac_config_files"
44025config_headers="$ac_config_headers"
44026config_commands="$ac_config_commands"
44027
44028_ACEOF
44029
44030cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
44031ac_cs_usage="\
44032\`$as_me' instantiates files and other configuration actions
44033from templates according to the current configuration.  Unless the files
44034and actions are specified as TAGs, all are instantiated by default.
44035
44036Usage: $0 [OPTION]... [TAG]...
44037
44038  -h, --help       print this help, then exit
44039  -V, --version    print version number and configuration settings, then exit
44040      --config     print configuration, then exit
44041  -q, --quiet, --silent
44042                   do not print progress messages
44043  -d, --debug      don't remove temporary files
44044      --recheck    update $as_me by reconfiguring in the same conditions
44045      --file=FILE[:TEMPLATE]
44046                   instantiate the configuration file FILE
44047      --header=FILE[:TEMPLATE]
44048                   instantiate the configuration header FILE
44049
44050Configuration files:
44051$config_files
44052
44053Configuration headers:
44054$config_headers
44055
44056Configuration commands:
44057$config_commands
44058
44059Report bugs to <bug-tar@gnu.org>.
44060GNU tar home page: <http://www.gnu.org/software/tar/>.
44061General help using GNU software: <http://www.gnu.org/gethelp/>."
44062
44063_ACEOF
44064cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
44065ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
44066ac_cs_version="\\
44067GNU tar config.status 1.34
44068configured by $0, generated by GNU Autoconf 2.69,
44069  with options \\"\$ac_cs_config\\"
44070
44071Copyright (C) 2012 Free Software Foundation, Inc.
44072This config.status script is free software; the Free Software Foundation
44073gives unlimited permission to copy, distribute and modify it."
44074
44075ac_pwd='$ac_pwd'
44076srcdir='$srcdir'
44077INSTALL='$INSTALL'
44078MKDIR_P='$MKDIR_P'
44079AWK='$AWK'
44080test -n "\$AWK" || AWK=awk
44081_ACEOF
44082
44083cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
44084# The default lists apply if the user does not specify any file.
44085ac_need_defaults=:
44086while test $# != 0
44087do
44088  case $1 in
44089  --*=?*)
44090    ac_option=`expr "X$1" : 'X\([^=]*\)='`
44091    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
44092    ac_shift=:
44093    ;;
44094  --*=)
44095    ac_option=`expr "X$1" : 'X\([^=]*\)='`
44096    ac_optarg=
44097    ac_shift=:
44098    ;;
44099  *)
44100    ac_option=$1
44101    ac_optarg=$2
44102    ac_shift=shift
44103    ;;
44104  esac
44105
44106  case $ac_option in
44107  # Handling of the options.
44108  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
44109    ac_cs_recheck=: ;;
44110  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
44111    $as_echo "$ac_cs_version"; exit ;;
44112  --config | --confi | --conf | --con | --co | --c )
44113    $as_echo "$ac_cs_config"; exit ;;
44114  --debug | --debu | --deb | --de | --d | -d )
44115    debug=: ;;
44116  --file | --fil | --fi | --f )
44117    $ac_shift
44118    case $ac_optarg in
44119    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
44120    '') as_fn_error $? "missing file argument" ;;
44121    esac
44122    as_fn_append CONFIG_FILES " '$ac_optarg'"
44123    ac_need_defaults=false;;
44124  --header | --heade | --head | --hea )
44125    $ac_shift
44126    case $ac_optarg in
44127    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
44128    esac
44129    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
44130    ac_need_defaults=false;;
44131  --he | --h)
44132    # Conflict between --help and --header
44133    as_fn_error $? "ambiguous option: \`$1'
44134Try \`$0 --help' for more information.";;
44135  --help | --hel | -h )
44136    $as_echo "$ac_cs_usage"; exit ;;
44137  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
44138  | -silent | --silent | --silen | --sile | --sil | --si | --s)
44139    ac_cs_silent=: ;;
44140
44141  # This is an error.
44142  -*) as_fn_error $? "unrecognized option: \`$1'
44143Try \`$0 --help' for more information." ;;
44144
44145  *) as_fn_append ac_config_targets " $1"
44146     ac_need_defaults=false ;;
44147
44148  esac
44149  shift
44150done
44151
44152ac_configure_extra_args=
44153
44154if $ac_cs_silent; then
44155  exec 6>/dev/null
44156  ac_configure_extra_args="$ac_configure_extra_args --silent"
44157fi
44158
44159_ACEOF
44160cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
44161if \$ac_cs_recheck; then
44162  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
44163  shift
44164  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
44165  CONFIG_SHELL='$SHELL'
44166  export CONFIG_SHELL
44167  exec "\$@"
44168fi
44169
44170_ACEOF
44171cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
44172exec 5>>config.log
44173{
44174  echo
44175  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
44176## Running $as_me. ##
44177_ASBOX
44178  $as_echo "$ac_log"
44179} >&5
44180
44181_ACEOF
44182cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
44183#
44184# INIT-COMMANDS
44185#
44186AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
44187# Capture the value of obsolete ALL_LINGUAS because we need it to compute
44188    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS.
44189    OBSOLETE_ALL_LINGUAS="$ALL_LINGUAS"
44190    # Capture the value of LINGUAS because we need it to compute CATALOGS.
44191    LINGUAS="${LINGUAS-%UNSET%}"
44192
44193
44194
44195_ACEOF
44196
44197cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
44198
44199# Handling of arguments.
44200for ac_config_target in $ac_config_targets
44201do
44202  case $ac_config_target in
44203    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
44204    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
44205    "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
44206    "tests/atconfig") CONFIG_COMMANDS="$CONFIG_COMMANDS tests/atconfig" ;;
44207    "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
44208    "tests/atlocal") CONFIG_FILES="$CONFIG_FILES tests/atlocal" ;;
44209    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
44210    "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
44211    "gnu/Makefile") CONFIG_FILES="$CONFIG_FILES gnu/Makefile" ;;
44212    "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
44213    "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
44214    "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
44215    "rmt/Makefile") CONFIG_FILES="$CONFIG_FILES rmt/Makefile" ;;
44216    "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
44217
44218  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
44219  esac
44220done
44221
44222
44223# If the user did not use the arguments to specify the items to instantiate,
44224# then the envvar interface is used.  Set only those that are not.
44225# We use the long form for the default assignment because of an extremely
44226# bizarre bug on SunOS 4.1.3.
44227if $ac_need_defaults; then
44228  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
44229  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
44230  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
44231fi
44232
44233# Have a temporary directory for convenience.  Make it in the build tree
44234# simply because there is no reason against having it here, and in addition,
44235# creating and moving files from /tmp can sometimes cause problems.
44236# Hook for its removal unless debugging.
44237# Note that there is a small window in which the directory will not be cleaned:
44238# after its creation but before its name has been assigned to `$tmp'.
44239$debug ||
44240{
44241  tmp= ac_tmp=
44242  trap 'exit_status=$?
44243  : "${ac_tmp:=$tmp}"
44244  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
44245' 0
44246  trap 'as_fn_exit 1' 1 2 13 15
44247}
44248# Create a (secure) tmp directory for tmp files.
44249
44250{
44251  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
44252  test -d "$tmp"
44253}  ||
44254{
44255  tmp=./conf$$-$RANDOM
44256  (umask 077 && mkdir "$tmp")
44257} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
44258ac_tmp=$tmp
44259
44260# Set up the scripts for CONFIG_FILES section.
44261# No need to generate them if there are no CONFIG_FILES.
44262# This happens for instance with `./config.status config.h'.
44263if test -n "$CONFIG_FILES"; then
44264
44265
44266ac_cr=`echo X | tr X '\015'`
44267# On cygwin, bash can eat \r inside `` if the user requested igncr.
44268# But we know of no other shell where ac_cr would be empty at this
44269# point, so we can use a bashism as a fallback.
44270if test "x$ac_cr" = x; then
44271  eval ac_cr=\$\'\\r\'
44272fi
44273ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
44274if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
44275  ac_cs_awk_cr='\\r'
44276else
44277  ac_cs_awk_cr=$ac_cr
44278fi
44279
44280echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
44281_ACEOF
44282
44283
44284{
44285  echo "cat >conf$$subs.awk <<_ACEOF" &&
44286  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
44287  echo "_ACEOF"
44288} >conf$$subs.sh ||
44289  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
44290ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
44291ac_delim='%!_!# '
44292for ac_last_try in false false false false false :; do
44293  . ./conf$$subs.sh ||
44294    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
44295
44296  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
44297  if test $ac_delim_n = $ac_delim_num; then
44298    break
44299  elif $ac_last_try; then
44300    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
44301  else
44302    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
44303  fi
44304done
44305rm -f conf$$subs.sh
44306
44307cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
44308cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
44309_ACEOF
44310sed -n '
44311h
44312s/^/S["/; s/!.*/"]=/
44313p
44314g
44315s/^[^!]*!//
44316:repl
44317t repl
44318s/'"$ac_delim"'$//
44319t delim
44320:nl
44321h
44322s/\(.\{148\}\)..*/\1/
44323t more1
44324s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
44325p
44326n
44327b repl
44328:more1
44329s/["\\]/\\&/g; s/^/"/; s/$/"\\/
44330p
44331g
44332s/.\{148\}//
44333t nl
44334:delim
44335h
44336s/\(.\{148\}\)..*/\1/
44337t more2
44338s/["\\]/\\&/g; s/^/"/; s/$/"/
44339p
44340b
44341:more2
44342s/["\\]/\\&/g; s/^/"/; s/$/"\\/
44343p
44344g
44345s/.\{148\}//
44346t delim
44347' <conf$$subs.awk | sed '
44348/^[^""]/{
44349  N
44350  s/\n//
44351}
44352' >>$CONFIG_STATUS || ac_write_fail=1
44353rm -f conf$$subs.awk
44354cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
44355_ACAWK
44356cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
44357  for (key in S) S_is_set[key] = 1
44358  FS = ""
44359
44360}
44361{
44362  line = $ 0
44363  nfields = split(line, field, "@")
44364  substed = 0
44365  len = length(field[1])
44366  for (i = 2; i < nfields; i++) {
44367    key = field[i]
44368    keylen = length(key)
44369    if (S_is_set[key]) {
44370      value = S[key]
44371      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
44372      len += length(value) + length(field[++i])
44373      substed = 1
44374    } else
44375      len += 1 + keylen
44376  }
44377
44378  print line
44379}
44380
44381_ACAWK
44382_ACEOF
44383cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
44384if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
44385  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
44386else
44387  cat
44388fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
44389  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
44390_ACEOF
44391
44392# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
44393# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
44394# trailing colons and then remove the whole line if VPATH becomes empty
44395# (actually we leave an empty line to preserve line numbers).
44396if test "x$srcdir" = x.; then
44397  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
44398h
44399s///
44400s/^/:/
44401s/[	 ]*$/:/
44402s/:\$(srcdir):/:/g
44403s/:\${srcdir}:/:/g
44404s/:@srcdir@:/:/g
44405s/^:*//
44406s/:*$//
44407x
44408s/\(=[	 ]*\).*/\1/
44409G
44410s/\n//
44411s/^[^=]*=[	 ]*$//
44412}'
44413fi
44414
44415cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
44416fi # test -n "$CONFIG_FILES"
44417
44418# Set up the scripts for CONFIG_HEADERS section.
44419# No need to generate them if there are no CONFIG_HEADERS.
44420# This happens for instance with `./config.status Makefile'.
44421if test -n "$CONFIG_HEADERS"; then
44422cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
44423BEGIN {
44424_ACEOF
44425
44426# Transform confdefs.h into an awk script `defines.awk', embedded as
44427# here-document in config.status, that substitutes the proper values into
44428# config.h.in to produce config.h.
44429
44430# Create a delimiter string that does not exist in confdefs.h, to ease
44431# handling of long lines.
44432ac_delim='%!_!# '
44433for ac_last_try in false false :; do
44434  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
44435  if test -z "$ac_tt"; then
44436    break
44437  elif $ac_last_try; then
44438    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
44439  else
44440    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
44441  fi
44442done
44443
44444# For the awk script, D is an array of macro values keyed by name,
44445# likewise P contains macro parameters if any.  Preserve backslash
44446# newline sequences.
44447
44448ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
44449sed -n '
44450s/.\{148\}/&'"$ac_delim"'/g
44451t rset
44452:rset
44453s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
44454t def
44455d
44456:def
44457s/\\$//
44458t bsnl
44459s/["\\]/\\&/g
44460s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
44461D["\1"]=" \3"/p
44462s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
44463d
44464:bsnl
44465s/["\\]/\\&/g
44466s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
44467D["\1"]=" \3\\\\\\n"\\/p
44468t cont
44469s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
44470t cont
44471d
44472:cont
44473n
44474s/.\{148\}/&'"$ac_delim"'/g
44475t clear
44476:clear
44477s/\\$//
44478t bsnlc
44479s/["\\]/\\&/g; s/^/"/; s/$/"/p
44480d
44481:bsnlc
44482s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
44483b cont
44484' <confdefs.h | sed '
44485s/'"$ac_delim"'/"\\\
44486"/g' >>$CONFIG_STATUS || ac_write_fail=1
44487
44488cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
44489  for (key in D) D_is_set[key] = 1
44490  FS = ""
44491}
44492/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
44493  line = \$ 0
44494  split(line, arg, " ")
44495  if (arg[1] == "#") {
44496    defundef = arg[2]
44497    mac1 = arg[3]
44498  } else {
44499    defundef = substr(arg[1], 2)
44500    mac1 = arg[2]
44501  }
44502  split(mac1, mac2, "(") #)
44503  macro = mac2[1]
44504  prefix = substr(line, 1, index(line, defundef) - 1)
44505  if (D_is_set[macro]) {
44506    # Preserve the white space surrounding the "#".
44507    print prefix "define", macro P[macro] D[macro]
44508    next
44509  } else {
44510    # Replace #undef with comments.  This is necessary, for example,
44511    # in the case of _POSIX_SOURCE, which is predefined and required
44512    # on some systems where configure will not decide to define it.
44513    if (defundef == "undef") {
44514      print "/*", prefix defundef, macro, "*/"
44515      next
44516    }
44517  }
44518}
44519{ print }
44520_ACAWK
44521_ACEOF
44522cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
44523  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
44524fi # test -n "$CONFIG_HEADERS"
44525
44526
44527eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
44528shift
44529for ac_tag
44530do
44531  case $ac_tag in
44532  :[FHLC]) ac_mode=$ac_tag; continue;;
44533  esac
44534  case $ac_mode$ac_tag in
44535  :[FHL]*:*);;
44536  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
44537  :[FH]-) ac_tag=-:-;;
44538  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
44539  esac
44540  ac_save_IFS=$IFS
44541  IFS=:
44542  set x $ac_tag
44543  IFS=$ac_save_IFS
44544  shift
44545  ac_file=$1
44546  shift
44547
44548  case $ac_mode in
44549  :L) ac_source=$1;;
44550  :[FH])
44551    ac_file_inputs=
44552    for ac_f
44553    do
44554      case $ac_f in
44555      -) ac_f="$ac_tmp/stdin";;
44556      *) # Look for the file first in the build tree, then in the source tree
44557	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
44558	 # because $ac_f cannot contain `:'.
44559	 test -f "$ac_f" ||
44560	   case $ac_f in
44561	   [\\/$]*) false;;
44562	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
44563	   esac ||
44564	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
44565      esac
44566      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
44567      as_fn_append ac_file_inputs " '$ac_f'"
44568    done
44569
44570    # Let's still pretend it is `configure' which instantiates (i.e., don't
44571    # use $as_me), people would be surprised to read:
44572    #    /* config.h.  Generated by config.status.  */
44573    configure_input='Generated from '`
44574	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
44575	`' by configure.'
44576    if test x"$ac_file" != x-; then
44577      configure_input="$ac_file.  $configure_input"
44578      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
44579$as_echo "$as_me: creating $ac_file" >&6;}
44580    fi
44581    # Neutralize special characters interpreted by sed in replacement strings.
44582    case $configure_input in #(
44583    *\&* | *\|* | *\\* )
44584       ac_sed_conf_input=`$as_echo "$configure_input" |
44585       sed 's/[\\\\&|]/\\\\&/g'`;; #(
44586    *) ac_sed_conf_input=$configure_input;;
44587    esac
44588
44589    case $ac_tag in
44590    *:-:* | *:-) cat >"$ac_tmp/stdin" \
44591      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
44592    esac
44593    ;;
44594  esac
44595
44596  ac_dir=`$as_dirname -- "$ac_file" ||
44597$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
44598	 X"$ac_file" : 'X\(//\)[^/]' \| \
44599	 X"$ac_file" : 'X\(//\)$' \| \
44600	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
44601$as_echo X"$ac_file" |
44602    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
44603	    s//\1/
44604	    q
44605	  }
44606	  /^X\(\/\/\)[^/].*/{
44607	    s//\1/
44608	    q
44609	  }
44610	  /^X\(\/\/\)$/{
44611	    s//\1/
44612	    q
44613	  }
44614	  /^X\(\/\).*/{
44615	    s//\1/
44616	    q
44617	  }
44618	  s/.*/./; q'`
44619  as_dir="$ac_dir"; as_fn_mkdir_p
44620  ac_builddir=.
44621
44622case "$ac_dir" in
44623.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
44624*)
44625  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
44626  # A ".." for each directory in $ac_dir_suffix.
44627  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
44628  case $ac_top_builddir_sub in
44629  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
44630  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
44631  esac ;;
44632esac
44633ac_abs_top_builddir=$ac_pwd
44634ac_abs_builddir=$ac_pwd$ac_dir_suffix
44635# for backward compatibility:
44636ac_top_builddir=$ac_top_build_prefix
44637
44638case $srcdir in
44639  .)  # We are building in place.
44640    ac_srcdir=.
44641    ac_top_srcdir=$ac_top_builddir_sub
44642    ac_abs_top_srcdir=$ac_pwd ;;
44643  [\\/]* | ?:[\\/]* )  # Absolute name.
44644    ac_srcdir=$srcdir$ac_dir_suffix;
44645    ac_top_srcdir=$srcdir
44646    ac_abs_top_srcdir=$srcdir ;;
44647  *) # Relative name.
44648    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
44649    ac_top_srcdir=$ac_top_build_prefix$srcdir
44650    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
44651esac
44652ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
44653
44654
44655  case $ac_mode in
44656  :F)
44657  #
44658  # CONFIG_FILE
44659  #
44660
44661  case $INSTALL in
44662  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
44663  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
44664  esac
44665  ac_MKDIR_P=$MKDIR_P
44666  case $MKDIR_P in
44667  [\\/$]* | ?:[\\/]* ) ;;
44668  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
44669  esac
44670_ACEOF
44671
44672cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
44673# If the template does not know about datarootdir, expand it.
44674# FIXME: This hack should be removed a few years after 2.60.
44675ac_datarootdir_hack=; ac_datarootdir_seen=
44676ac_sed_dataroot='
44677/datarootdir/ {
44678  p
44679  q
44680}
44681/@datadir@/p
44682/@docdir@/p
44683/@infodir@/p
44684/@localedir@/p
44685/@mandir@/p'
44686case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
44687*datarootdir*) ac_datarootdir_seen=yes;;
44688*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
44689  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
44690$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
44691_ACEOF
44692cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
44693  ac_datarootdir_hack='
44694  s&@datadir@&$datadir&g
44695  s&@docdir@&$docdir&g
44696  s&@infodir@&$infodir&g
44697  s&@localedir@&$localedir&g
44698  s&@mandir@&$mandir&g
44699  s&\\\${datarootdir}&$datarootdir&g' ;;
44700esac
44701_ACEOF
44702
44703# Neutralize VPATH when `$srcdir' = `.'.
44704# Shell code in configure.ac might set extrasub.
44705# FIXME: do we really want to maintain this feature?
44706cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
44707ac_sed_extra="$ac_vpsub
44708$extrasub
44709_ACEOF
44710cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
44711:t
44712/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
44713s|@configure_input@|$ac_sed_conf_input|;t t
44714s&@top_builddir@&$ac_top_builddir_sub&;t t
44715s&@top_build_prefix@&$ac_top_build_prefix&;t t
44716s&@srcdir@&$ac_srcdir&;t t
44717s&@abs_srcdir@&$ac_abs_srcdir&;t t
44718s&@top_srcdir@&$ac_top_srcdir&;t t
44719s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
44720s&@builddir@&$ac_builddir&;t t
44721s&@abs_builddir@&$ac_abs_builddir&;t t
44722s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
44723s&@INSTALL@&$ac_INSTALL&;t t
44724s&@MKDIR_P@&$ac_MKDIR_P&;t t
44725$ac_datarootdir_hack
44726"
44727eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
44728  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
44729
44730test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
44731  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
44732  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
44733      "$ac_tmp/out"`; test -z "$ac_out"; } &&
44734  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
44735which seems to be undefined.  Please make sure it is defined" >&5
44736$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
44737which seems to be undefined.  Please make sure it is defined" >&2;}
44738
44739  rm -f "$ac_tmp/stdin"
44740  case $ac_file in
44741  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
44742  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
44743  esac \
44744  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
44745 ;;
44746  :H)
44747  #
44748  # CONFIG_HEADER
44749  #
44750  if test x"$ac_file" != x-; then
44751    {
44752      $as_echo "/* $configure_input  */" \
44753      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
44754    } >"$ac_tmp/config.h" \
44755      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
44756    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
44757      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
44758$as_echo "$as_me: $ac_file is unchanged" >&6;}
44759    else
44760      rm -f "$ac_file"
44761      mv "$ac_tmp/config.h" "$ac_file" \
44762	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
44763    fi
44764  else
44765    $as_echo "/* $configure_input  */" \
44766      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
44767      || as_fn_error $? "could not create -" "$LINENO" 5
44768  fi
44769# Compute "$ac_file"'s index in $config_headers.
44770_am_arg="$ac_file"
44771_am_stamp_count=1
44772for _am_header in $config_headers :; do
44773  case $_am_header in
44774    $_am_arg | $_am_arg:* )
44775      break ;;
44776    * )
44777      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
44778  esac
44779done
44780echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
44781$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
44782	 X"$_am_arg" : 'X\(//\)[^/]' \| \
44783	 X"$_am_arg" : 'X\(//\)$' \| \
44784	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
44785$as_echo X"$_am_arg" |
44786    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
44787	    s//\1/
44788	    q
44789	  }
44790	  /^X\(\/\/\)[^/].*/{
44791	    s//\1/
44792	    q
44793	  }
44794	  /^X\(\/\/\)$/{
44795	    s//\1/
44796	    q
44797	  }
44798	  /^X\(\/\).*/{
44799	    s//\1/
44800	    q
44801	  }
44802	  s/.*/./; q'`/stamp-h$_am_stamp_count
44803 ;;
44804
44805  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
44806$as_echo "$as_me: executing $ac_file commands" >&6;}
44807 ;;
44808  esac
44809
44810
44811  case $ac_file$ac_mode in
44812    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
44813  # Older Autoconf quotes --file arguments for eval, but not when files
44814  # are listed without --file.  Let's play safe and only enable the eval
44815  # if we detect the quoting.
44816  case $CONFIG_FILES in
44817  *\'*) eval set x "$CONFIG_FILES" ;;
44818  *)   set x $CONFIG_FILES ;;
44819  esac
44820  shift
44821  for mf
44822  do
44823    # Strip MF so we end up with the name of the file.
44824    mf=`echo "$mf" | sed -e 's/:.*$//'`
44825    # Check whether this is an Automake generated Makefile or not.
44826    # We used to match only the files named 'Makefile.in', but
44827    # some people rename them; so instead we look at the file content.
44828    # Grep'ing the first line is not enough: some people post-process
44829    # each Makefile.in and add a new line on top of each file to say so.
44830    # Grep'ing the whole file is not good either: AIX grep has a line
44831    # limit of 2048, but all sed's we know have understand at least 4000.
44832    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
44833      dirpart=`$as_dirname -- "$mf" ||
44834$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
44835	 X"$mf" : 'X\(//\)[^/]' \| \
44836	 X"$mf" : 'X\(//\)$' \| \
44837	 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
44838$as_echo X"$mf" |
44839    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
44840	    s//\1/
44841	    q
44842	  }
44843	  /^X\(\/\/\)[^/].*/{
44844	    s//\1/
44845	    q
44846	  }
44847	  /^X\(\/\/\)$/{
44848	    s//\1/
44849	    q
44850	  }
44851	  /^X\(\/\).*/{
44852	    s//\1/
44853	    q
44854	  }
44855	  s/.*/./; q'`
44856    else
44857      continue
44858    fi
44859    # Extract the definition of DEPDIR, am__include, and am__quote
44860    # from the Makefile without running 'make'.
44861    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
44862    test -z "$DEPDIR" && continue
44863    am__include=`sed -n 's/^am__include = //p' < "$mf"`
44864    test -z "$am__include" && continue
44865    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
44866    # Find all dependency output files, they are included files with
44867    # $(DEPDIR) in their names.  We invoke sed twice because it is the
44868    # simplest approach to changing $(DEPDIR) to its actual value in the
44869    # expansion.
44870    for file in `sed -n "
44871      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
44872	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
44873      # Make sure the directory exists.
44874      test -f "$dirpart/$file" && continue
44875      fdir=`$as_dirname -- "$file" ||
44876$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
44877	 X"$file" : 'X\(//\)[^/]' \| \
44878	 X"$file" : 'X\(//\)$' \| \
44879	 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
44880$as_echo X"$file" |
44881    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
44882	    s//\1/
44883	    q
44884	  }
44885	  /^X\(\/\/\)[^/].*/{
44886	    s//\1/
44887	    q
44888	  }
44889	  /^X\(\/\/\)$/{
44890	    s//\1/
44891	    q
44892	  }
44893	  /^X\(\/\).*/{
44894	    s//\1/
44895	    q
44896	  }
44897	  s/.*/./; q'`
44898      as_dir=$dirpart/$fdir; as_fn_mkdir_p
44899      # echo "creating $dirpart/$file"
44900      echo '# dummy' > "$dirpart/$file"
44901    done
44902  done
44903}
44904 ;;
44905    "po-directories":C)
44906    for ac_file in $CONFIG_FILES; do
44907      # Support "outfile[:infile[:infile...]]"
44908      case "$ac_file" in
44909        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
44910      esac
44911      # PO directories have a Makefile.in generated from Makefile.in.in.
44912      case "$ac_file" in */Makefile.in)
44913        # Adjust a relative srcdir.
44914        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
44915        ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
44916        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
44917        # In autoconf-2.13 it is called $ac_given_srcdir.
44918        # In autoconf-2.50 it is called $srcdir.
44919        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
44920        case "$ac_given_srcdir" in
44921          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
44922          /*) top_srcdir="$ac_given_srcdir" ;;
44923          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
44924        esac
44925        # Treat a directory as a PO directory if and only if it has a
44926        # POTFILES.in file. This allows packages to have multiple PO
44927        # directories under different names or in different locations.
44928        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
44929          rm -f "$ac_dir/POTFILES"
44930          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
44931          gt_tab=`printf '\t'`
44932          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
44933          POMAKEFILEDEPS="POTFILES.in"
44934          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
44935          # on $ac_dir but don't depend on user-specified configuration
44936          # parameters.
44937          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
44938            # The LINGUAS file contains the set of available languages.
44939            if test -n "$OBSOLETE_ALL_LINGUAS"; then
44940              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
44941            fi
44942            ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
44943            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
44944          else
44945            # The set of available languages was given in configure.in.
44946            ALL_LINGUAS=$OBSOLETE_ALL_LINGUAS
44947          fi
44948          # Compute POFILES
44949          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
44950          # Compute UPDATEPOFILES
44951          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
44952          # Compute DUMMYPOFILES
44953          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
44954          # Compute GMOFILES
44955          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
44956          case "$ac_given_srcdir" in
44957            .) srcdirpre= ;;
44958            *) srcdirpre='$(srcdir)/' ;;
44959          esac
44960          POFILES=
44961          UPDATEPOFILES=
44962          DUMMYPOFILES=
44963          GMOFILES=
44964          for lang in $ALL_LINGUAS; do
44965            POFILES="$POFILES $srcdirpre$lang.po"
44966            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
44967            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
44968            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
44969          done
44970          # CATALOGS depends on both $ac_dir and the user's LINGUAS
44971          # environment variable.
44972          INST_LINGUAS=
44973          if test -n "$ALL_LINGUAS"; then
44974            for presentlang in $ALL_LINGUAS; do
44975              useit=no
44976              if test "%UNSET%" != "$LINGUAS"; then
44977                desiredlanguages="$LINGUAS"
44978              else
44979                desiredlanguages="$ALL_LINGUAS"
44980              fi
44981              for desiredlang in $desiredlanguages; do
44982                # Use the presentlang catalog if desiredlang is
44983                #   a. equal to presentlang, or
44984                #   b. a variant of presentlang (because in this case,
44985                #      presentlang can be used as a fallback for messages
44986                #      which are not translated in the desiredlang catalog).
44987                case "$desiredlang" in
44988                  "$presentlang"*) useit=yes;;
44989                esac
44990              done
44991              if test $useit = yes; then
44992                INST_LINGUAS="$INST_LINGUAS $presentlang"
44993              fi
44994            done
44995          fi
44996          CATALOGS=
44997          if test -n "$INST_LINGUAS"; then
44998            for lang in $INST_LINGUAS; do
44999              CATALOGS="$CATALOGS $lang.gmo"
45000            done
45001          fi
45002          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
45003          sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
45004          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
45005            if test -f "$f"; then
45006              case "$f" in
45007                *.orig | *.bak | *~) ;;
45008                *) cat "$f" >> "$ac_dir/Makefile" ;;
45009              esac
45010            fi
45011          done
45012        fi
45013        ;;
45014      esac
45015    done ;;
45016    "tests/atconfig":C) cat >tests/atconfig <<ATEOF
45017# Configurable variable values for building test suites.
45018# Generated by $0.
45019# Copyright (C) 2012 Free Software Foundation, Inc.
45020
45021# The test suite will define top_srcdir=$at_top_srcdir/../.. etc.
45022at_testdir='tests'
45023abs_builddir='$ac_abs_builddir'
45024at_srcdir='$ac_srcdir'
45025abs_srcdir='$ac_abs_srcdir'
45026at_top_srcdir='$ac_top_srcdir'
45027abs_top_srcdir='$ac_abs_top_srcdir'
45028at_top_build_prefix='$ac_top_build_prefix'
45029abs_top_builddir='$ac_abs_top_builddir'
45030
45031# Backward compatibility with Autotest <= 2.59b:
45032at_top_builddir=\$at_top_build_prefix
45033
45034AUTOTEST_PATH='tests'
45035
45036SHELL=\${CONFIG_SHELL-'$SHELL'}
45037ATEOF
45038 ;;
45039
45040  esac
45041done # for ac_tag
45042
45043
45044as_fn_exit 0
45045_ACEOF
45046ac_clean_files=$ac_clean_files_save
45047
45048test $ac_write_fail = 0 ||
45049  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
45050
45051
45052# configure is writing to config.log, and then calls config.status.
45053# config.status does its own redirection, appending to config.log.
45054# Unfortunately, on DOS this fails, as config.log is still kept open
45055# by configure, so config.status won't be able to write to it; its
45056# output is simply discarded.  So we exec the FD to /dev/null,
45057# effectively closing config.log, so it can be properly (re)opened and
45058# appended to by config.status.  When coming back to configure, we
45059# need to make the FD available again.
45060if test "$no_create" != yes; then
45061  ac_cs_success=:
45062  ac_config_status_args=
45063  test "$silent" = yes &&
45064    ac_config_status_args="$ac_config_status_args --quiet"
45065  exec 5>/dev/null
45066  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
45067  exec 5>>config.log
45068  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
45069  # would make configure fail if this is the last instruction.
45070  $ac_cs_success || as_fn_exit 1
45071fi
45072if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
45073  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
45074$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
45075fi
45076
45077