1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.71 for wget 1.21.2.
4#
5# Report bugs to <bug-wget@gnu.org>.
6#
7#
8# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
9# Inc.
10#
11#
12# This configure script is free software; the Free Software Foundation
13# gives unlimited permission to copy, distribute and modify it.
14## -------------------- ##
15## M4sh Initialization. ##
16## -------------------- ##
17
18# Be more Bourne compatible
19DUALCASE=1; export DUALCASE # for MKS sh
20as_nop=:
21if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
22then :
23  emulate sh
24  NULLCMD=:
25  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
26  # is contrary to our usage.  Disable this feature.
27  alias -g '${1+"$@"}'='"$@"'
28  setopt NO_GLOB_SUBST
29else $as_nop
30  case `(set -o) 2>/dev/null` in #(
31  *posix*) :
32    set -o posix ;; #(
33  *) :
34     ;;
35esac
36fi
37
38
39
40# Reset variables that may have inherited troublesome values from
41# the environment.
42
43# IFS needs to be set, to space, tab, and newline, in precisely that order.
44# (If _AS_PATH_WALK were called with IFS unset, it would have the
45# side effect of setting IFS to empty, thus disabling word splitting.)
46# Quoting is to prevent editors from complaining about space-tab.
47as_nl='
48'
49export as_nl
50IFS=" ""	$as_nl"
51
52PS1='$ '
53PS2='> '
54PS4='+ '
55
56# Ensure predictable behavior from utilities with locale-dependent output.
57LC_ALL=C
58export LC_ALL
59LANGUAGE=C
60export LANGUAGE
61
62# We cannot yet rely on "unset" to work, but we need these variables
63# to be unset--not just set to an empty or harmless value--now, to
64# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
65# also avoids known problems related to "unset" and subshell syntax
66# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
67for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
68do eval test \${$as_var+y} \
69  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
70done
71
72# Ensure that fds 0, 1, and 2 are open.
73if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
74if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
75if (exec 3>&2)            ; then :; else exec 2>/dev/null; fi
76
77# The user is always right.
78if ${PATH_SEPARATOR+false} :; then
79  PATH_SEPARATOR=:
80  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82      PATH_SEPARATOR=';'
83  }
84fi
85
86
87# Find who we are.  Look in the path if we contain no directory separator.
88as_myself=
89case $0 in #((
90  *[\\/]* ) as_myself=$0 ;;
91  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
92for as_dir in $PATH
93do
94  IFS=$as_save_IFS
95  case $as_dir in #(((
96    '') as_dir=./ ;;
97    */) ;;
98    *) as_dir=$as_dir/ ;;
99  esac
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  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113  exit 1
114fi
115
116
117# Use a proper internal environment variable to ensure we don't fall
118  # into an infinite loop, continuously re-executing ourselves.
119  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
120    _as_can_reexec=no; export _as_can_reexec;
121    # We cannot yet assume a decent shell, so we have to provide a
122# neutralization value for shells without unset; and this also
123# works around shells that cannot unset nonexistent variables.
124# Preserve -v and -x to the replacement shell.
125BASH_ENV=/dev/null
126ENV=/dev/null
127(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
128case $- in # ((((
129  *v*x* | *x*v* ) as_opts=-vx ;;
130  *v* ) as_opts=-v ;;
131  *x* ) as_opts=-x ;;
132  * ) as_opts= ;;
133esac
134exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
135# Admittedly, this is quite paranoid, since all the known shells bail
136# out after a failed `exec'.
137printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
138exit 255
139  fi
140  # We don't want this to propagate to other subprocesses.
141          { _as_can_reexec=; unset _as_can_reexec;}
142if test "x$CONFIG_SHELL" = x; then
143  as_bourne_compatible="as_nop=:
144if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
145then :
146  emulate sh
147  NULLCMD=:
148  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
149  # is contrary to our usage.  Disable this feature.
150  alias -g '\${1+\"\$@\"}'='\"\$@\"'
151  setopt NO_GLOB_SUBST
152else \$as_nop
153  case \`(set -o) 2>/dev/null\` in #(
154  *posix*) :
155    set -o posix ;; #(
156  *) :
157     ;;
158esac
159fi
160"
161  as_required="as_fn_return () { (exit \$1); }
162as_fn_success () { as_fn_return 0; }
163as_fn_failure () { as_fn_return 1; }
164as_fn_ret_success () { return 0; }
165as_fn_ret_failure () { return 1; }
166
167exitcode=0
168as_fn_success || { exitcode=1; echo as_fn_success failed.; }
169as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
170as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
171as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
172if ( set x; as_fn_ret_success y && test x = \"\$1\" )
173then :
174
175else \$as_nop
176  exitcode=1; echo positional parameters were not saved.
177fi
178test x\$exitcode = x0 || exit 1
179blah=\$(echo \$(echo blah))
180test x\"\$blah\" = xblah || exit 1
181test -x / || exit 1"
182  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
183  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
184  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
185  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
186test \$(( 1 + 1 )) = 2 || exit 1"
187  if (eval "$as_required") 2>/dev/null
188then :
189  as_have_required=yes
190else $as_nop
191  as_have_required=no
192fi
193  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
194then :
195
196else $as_nop
197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
198as_found=false
199for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
200do
201  IFS=$as_save_IFS
202  case $as_dir in #(((
203    '') as_dir=./ ;;
204    */) ;;
205    *) as_dir=$as_dir/ ;;
206  esac
207  as_found=:
208  case $as_dir in #(
209	 /*)
210	   for as_base in sh bash ksh sh5; do
211	     # Try only shells that exist, to save several forks.
212	     as_shell=$as_dir$as_base
213	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
214		    as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
215then :
216  CONFIG_SHELL=$as_shell as_have_required=yes
217		   if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
218then :
219  break 2
220fi
221fi
222	   done;;
223       esac
224  as_found=false
225done
226IFS=$as_save_IFS
227if $as_found
228then :
229
230else $as_nop
231  if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232	      as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
233then :
234  CONFIG_SHELL=$SHELL as_have_required=yes
235fi
236fi
237
238
239      if test "x$CONFIG_SHELL" != x
240then :
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'.
258printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
260fi
261
262    if test x$as_have_required = xno
263then :
264  printf "%s\n" "$0: This script requires a shell more modern than all"
265  printf "%s\n" "$0: the shells that I found on your system."
266  if test ${ZSH_VERSION+y} ; then
267    printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
268    printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
269  else
270    printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and bug-wget@gnu.org
271$0: about your system, including any error possibly output
272$0: before this message. Then install a modern shell, or
273$0: manually run the script under such a shell if you do
274$0: have one."
275  fi
276  exit 1
277fi
278fi
279fi
280SHELL=${CONFIG_SHELL-/bin/sh}
281export SHELL
282# Unset more variables known to interfere with behavior of common tools.
283CLICOLOR_FORCE= GREP_OPTIONS=
284unset CLICOLOR_FORCE GREP_OPTIONS
285
286## --------------------- ##
287## M4sh Shell Functions. ##
288## --------------------- ##
289# as_fn_unset VAR
290# ---------------
291# Portably unset VAR.
292as_fn_unset ()
293{
294  { eval $1=; unset $1;}
295}
296as_unset=as_fn_unset
297
298
299# as_fn_set_status STATUS
300# -----------------------
301# Set $? to STATUS, without forking.
302as_fn_set_status ()
303{
304  return $1
305} # as_fn_set_status
306
307# as_fn_exit STATUS
308# -----------------
309# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
310as_fn_exit ()
311{
312  set +e
313  as_fn_set_status $1
314  exit $1
315} # as_fn_exit
316# as_fn_nop
317# ---------
318# Do nothing but, unlike ":", preserve the value of $?.
319as_fn_nop ()
320{
321  return $?
322}
323as_nop=as_fn_nop
324
325# as_fn_mkdir_p
326# -------------
327# Create "$as_dir" as a directory, including parents if necessary.
328as_fn_mkdir_p ()
329{
330
331  case $as_dir in #(
332  -*) as_dir=./$as_dir;;
333  esac
334  test -d "$as_dir" || eval $as_mkdir_p || {
335    as_dirs=
336    while :; do
337      case $as_dir in #(
338      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
339      *) as_qdir=$as_dir;;
340      esac
341      as_dirs="'$as_qdir' $as_dirs"
342      as_dir=`$as_dirname -- "$as_dir" ||
343$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
344	 X"$as_dir" : 'X\(//\)[^/]' \| \
345	 X"$as_dir" : 'X\(//\)$' \| \
346	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
347printf "%s\n" X"$as_dir" |
348    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)[^/].*/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\/\)$/{
357	    s//\1/
358	    q
359	  }
360	  /^X\(\/\).*/{
361	    s//\1/
362	    q
363	  }
364	  s/.*/./; q'`
365      test -d "$as_dir" && break
366    done
367    test -z "$as_dirs" || eval "mkdir $as_dirs"
368  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
369
370
371} # as_fn_mkdir_p
372
373# as_fn_executable_p FILE
374# -----------------------
375# Test if FILE is an executable regular file.
376as_fn_executable_p ()
377{
378  test -f "$1" && test -x "$1"
379} # as_fn_executable_p
380# as_fn_append VAR VALUE
381# ----------------------
382# Append the text in VALUE to the end of the definition contained in VAR. Take
383# advantage of any shell optimizations that allow amortized linear growth over
384# repeated appends, instead of the typical quadratic growth present in naive
385# implementations.
386if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
387then :
388  eval 'as_fn_append ()
389  {
390    eval $1+=\$2
391  }'
392else $as_nop
393  as_fn_append ()
394  {
395    eval $1=\$$1\$2
396  }
397fi # as_fn_append
398
399# as_fn_arith ARG...
400# ------------------
401# Perform arithmetic evaluation on the ARGs, and store the result in the
402# global $as_val. Take advantage of shells that can avoid forks. The arguments
403# must be portable across $(()) and expr.
404if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
405then :
406  eval 'as_fn_arith ()
407  {
408    as_val=$(( $* ))
409  }'
410else $as_nop
411  as_fn_arith ()
412  {
413    as_val=`expr "$@" || test $? -eq 1`
414  }
415fi # as_fn_arith
416
417# as_fn_nop
418# ---------
419# Do nothing but, unlike ":", preserve the value of $?.
420as_fn_nop ()
421{
422  return $?
423}
424as_nop=as_fn_nop
425
426# as_fn_error STATUS ERROR [LINENO LOG_FD]
427# ----------------------------------------
428# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
429# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
430# script with STATUS, using 1 if that was 0.
431as_fn_error ()
432{
433  as_status=$1; test $as_status -eq 0 && as_status=1
434  if test "$4"; then
435    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
436    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
437  fi
438  printf "%s\n" "$as_me: error: $2" >&2
439  as_fn_exit $as_status
440} # as_fn_error
441
442if expr a : '\(a\)' >/dev/null 2>&1 &&
443   test "X`expr 00001 : '.*\(...\)'`" = X001; then
444  as_expr=expr
445else
446  as_expr=false
447fi
448
449if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
450  as_basename=basename
451else
452  as_basename=false
453fi
454
455if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
456  as_dirname=dirname
457else
458  as_dirname=false
459fi
460
461as_me=`$as_basename -- "$0" ||
462$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
463	 X"$0" : 'X\(//\)$' \| \
464	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
465printf "%s\n" X/"$0" |
466    sed '/^.*\/\([^/][^/]*\)\/*$/{
467	    s//\1/
468	    q
469	  }
470	  /^X\/\(\/\/\)$/{
471	    s//\1/
472	    q
473	  }
474	  /^X\/\(\/\).*/{
475	    s//\1/
476	    q
477	  }
478	  s/.*/./; q'`
479
480# Avoid depending upon Character Ranges.
481as_cr_letters='abcdefghijklmnopqrstuvwxyz'
482as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
483as_cr_Letters=$as_cr_letters$as_cr_LETTERS
484as_cr_digits='0123456789'
485as_cr_alnum=$as_cr_Letters$as_cr_digits
486
487
488  as_lineno_1=$LINENO as_lineno_1a=$LINENO
489  as_lineno_2=$LINENO as_lineno_2a=$LINENO
490  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
491  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
492  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
493  sed -n '
494    p
495    /[$]LINENO/=
496  ' <$as_myself |
497    sed '
498      s/[$]LINENO.*/&-/
499      t lineno
500      b
501      :lineno
502      N
503      :loop
504      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
505      t loop
506      s/-\n.*//
507    ' >$as_me.lineno &&
508  chmod +x "$as_me.lineno" ||
509    { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
510
511  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
512  # already done that, so ensure we don't try to do so again and fall
513  # in an infinite loop.  This has already happened in practice.
514  _as_can_reexec=no; export _as_can_reexec
515  # Don't try to exec as it changes $[0], causing all sort of problems
516  # (the dirname of $[0] is not the place where we might find the
517  # original and so on.  Autoconf is especially sensitive to this).
518  . "./$as_me.lineno"
519  # Exit status is that of the last command.
520  exit
521}
522
523
524# Determine whether it's possible to make 'echo' print without a newline.
525# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
526# for compatibility with existing Makefiles.
527ECHO_C= ECHO_N= ECHO_T=
528case `echo -n x` in #(((((
529-n*)
530  case `echo 'xy\c'` in
531  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
532  xy)  ECHO_C='\c';;
533  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
534       ECHO_T='	';;
535  esac;;
536*)
537  ECHO_N='-n';;
538esac
539
540# For backward compatibility with old third-party macros, we provide
541# the shell variables $as_echo and $as_echo_n.  New code should use
542# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
543as_echo='printf %s\n'
544as_echo_n='printf %s'
545
546
547rm -f conf$$ conf$$.exe conf$$.file
548if test -d conf$$.dir; then
549  rm -f conf$$.dir/conf$$.file
550else
551  rm -f conf$$.dir
552  mkdir conf$$.dir 2>/dev/null
553fi
554if (echo >conf$$.file) 2>/dev/null; then
555  if ln -s conf$$.file conf$$ 2>/dev/null; then
556    as_ln_s='ln -s'
557    # ... but there are two gotchas:
558    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
559    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
560    # In both cases, we have to default to `cp -pR'.
561    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
562      as_ln_s='cp -pR'
563  elif ln conf$$.file conf$$ 2>/dev/null; then
564    as_ln_s=ln
565  else
566    as_ln_s='cp -pR'
567  fi
568else
569  as_ln_s='cp -pR'
570fi
571rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
572rmdir conf$$.dir 2>/dev/null
573
574if mkdir -p . 2>/dev/null; then
575  as_mkdir_p='mkdir -p "$as_dir"'
576else
577  test -d ./-p && rmdir ./-p
578  as_mkdir_p=false
579fi
580
581as_test_x='test -x'
582as_executable_p=as_fn_executable_p
583
584# Sed expression to map a string onto a valid CPP name.
585as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
586
587# Sed expression to map a string onto a valid variable name.
588as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
589
590
591test -n "$DJDIR" || exec 7<&0 </dev/null
592exec 6>&1
593
594# Name of the host.
595# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
596# so uname gets run too.
597ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
598
599#
600# Initializations.
601#
602ac_default_prefix=/usr/local
603ac_clean_files=
604ac_config_libobj_dir=.
605LIBOBJS=
606cross_compiling=no
607subdirs=
608MFLAGS=
609MAKEFLAGS=
610
611# Identity of this package.
612PACKAGE_NAME='wget'
613PACKAGE_TARNAME='wget'
614PACKAGE_VERSION='1.21.2'
615PACKAGE_STRING='wget 1.21.2'
616PACKAGE_BUGREPORT='bug-wget@gnu.org'
617PACKAGE_URL=''
618
619ac_unique_file="src/wget.h"
620# Factoring default headers for most tests.
621ac_includes_default="\
622#include <stddef.h>
623#ifdef HAVE_STDIO_H
624# include <stdio.h>
625#endif
626#ifdef HAVE_STDLIB_H
627# include <stdlib.h>
628#endif
629#ifdef HAVE_STRING_H
630# include <string.h>
631#endif
632#ifdef HAVE_INTTYPES_H
633# include <inttypes.h>
634#endif
635#ifdef HAVE_STDINT_H
636# include <stdint.h>
637#endif
638#ifdef HAVE_STRINGS_H
639# include <strings.h>
640#endif
641#ifdef HAVE_SYS_TYPES_H
642# include <sys/types.h>
643#endif
644#ifdef HAVE_SYS_STAT_H
645# include <sys/stat.h>
646#endif
647#ifdef HAVE_UNISTD_H
648# include <unistd.h>
649#endif"
650
651ac_header_c_list=
652gl_use_threads_default=
653gl_use_winpthreads_default=
654gt_needs=
655ac_func_c_list=
656with_openssl_default='no'
657LIB_CRYPTO=
658gl_fnmatch_required=POSIX
659gl_getopt_required=POSIX
660ac_subst_vars='gltests_LTLIBOBJS
661gltests_LIBOBJS
662gl_LTLIBOBJS
663gl_LIBOBJS
664CONFIG_INCLUDE
665am__EXEEXT_FALSE
666am__EXEEXT_TRUE
667LTLIBOBJS
668WITH_NTLM_FALSE
669WITH_NTLM_TRUE
670WITH_XATTR_FALSE
671WITH_XATTR_TRUE
672METALINK_IS_ENABLED_FALSE
673METALINK_IS_ENABLED_TRUE
674WITH_SSL_FALSE
675WITH_SSL_TRUE
676IRI_IS_ENABLED_FALSE
677IRI_IS_ENABLED_TRUE
678GPGME_LIBS
679GPGME_CFLAGS
680GPGME_CONFIG
681METALINK_LIBS
682METALINK_CFLAGS
683CARES_LIBS
684CARES_CFLAGS
685PCRE_LIBS
686PCRE_CFLAGS
687PCRE2_LIBS
688PCRE2_CFLAGS
689UUID_LIBS
690UUID_CFLAGS
691COMMENT_IF_NO_POD2MAN
692POD2MAN
693PERL
694NETTLE_LIBS
695LIBGNUTLS_PREFIX
696LTLIBGNUTLS
697LIBGNUTLS
698HAVE_LIBGNUTLS
699GNUTLS_LIBS
700GNUTLS_CFLAGS
701LIBSSL_PREFIX
702LTLIBSSL
703LIBSSL
704HAVE_LIBSSL
705OPENSSL_LIBS
706OPENSSL_CFLAGS
707ZLIB_LIBS
708ZLIB_CFLAGS
709LIBPSL_LIBS
710LIBPSL_CFLAGS
711PKG_CONFIG_LIBDIR
712PKG_CONFIG_PATH
713PKG_CONFIG
714GNULIB_WARN_CFLAGS
715LIBOBJS
716CODE_COVERAGE_LIBS
717CODE_COVERAGE_CXXFLAGS
718CODE_COVERAGE_CFLAGS
719CODE_COVERAGE_CPPFLAGS
720GENHTML
721LCOV
722GCOV
723ifnGNUmake
724ifGNUmake
725CODE_COVERAGE_ENABLED
726CODE_COVERAGE_ENABLED_FALSE
727CODE_COVERAGE_ENABLED_TRUE
728LIBGNU_LTLIBDEPS
729LIBGNU_LIBDEPS
730gltests_WITNESS
731NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
732NEXT_WCHAR_H
733HAVE_UTIME_H
734NEXT_AS_FIRST_DIRECTIVE_UTIME_H
735NEXT_UTIME_H
736GL_GNULIB_MDA_UTIME
737GL_GNULIB_UTIME
738REPLACE_UTIME
739HAVE_UTIME
740LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE
741LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE
742LIBUNISTRING_UNIWIDTH_H
743LIBUNISTRING_UNITYPES_H
744LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE
745LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE
746LIBUNISTRING_COMPILE_UNISTR_U8_STRLEN_FALSE
747LIBUNISTRING_COMPILE_UNISTR_U8_STRLEN_TRUE
748LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_UNSAFE_FALSE
749LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_UNSAFE_TRUE
750LIBUNISTRING_COMPILE_UNISTR_U8_CPY_FALSE
751LIBUNISTRING_COMPILE_UNISTR_U8_CPY_TRUE
752LIBUNISTRING_UNISTR_H
753HAVE_UNISTD_H
754NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
755NEXT_UNISTD_H
756LIBUNISTRING_COMPILE_UNINORM_U8_NORMALIZE_FALSE
757LIBUNISTRING_COMPILE_UNINORM_U8_NORMALIZE_TRUE
758LIBUNISTRING_UNINORM_H
759LIBUNISTRING_COMPILE_UNICTYPE_PROPERTY_SOFT_DOTTED_FALSE
760LIBUNISTRING_COMPILE_UNICTYPE_PROPERTY_SOFT_DOTTED_TRUE
761LIBUNISTRING_COMPILE_UNICTYPE_COMBINING_CLASS_FALSE
762LIBUNISTRING_COMPILE_UNICTYPE_COMBINING_CLASS_TRUE
763LIBUNISTRING_UNICTYPE_H
764LIBUNISTRING_COMPILE_UNICASE_U8_TOLOWER_FALSE
765LIBUNISTRING_COMPILE_UNICASE_U8_TOLOWER_TRUE
766LIBUNISTRING_COMPILE_UNICASE_TOLOWER_FALSE
767LIBUNISTRING_COMPILE_UNICASE_TOLOWER_TRUE
768LIBUNISTRING_COMPILE_UNICASE_EMPTY_SUFFIX_CONTEXT_FALSE
769LIBUNISTRING_COMPILE_UNICASE_EMPTY_SUFFIX_CONTEXT_TRUE
770LIBUNISTRING_COMPILE_UNICASE_EMPTY_PREFIX_CONTEXT_FALSE
771LIBUNISTRING_COMPILE_UNICASE_EMPTY_PREFIX_CONTEXT_TRUE
772LIBUNISTRING_UNICASE_H
773TIME_H_DEFINES_TIME_UTC
774UNISTD_H_DEFINES_STRUCT_TIMESPEC
775PTHREAD_H_DEFINES_STRUCT_TIMESPEC
776SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
777TIME_H_DEFINES_STRUCT_TIMESPEC
778NEXT_AS_FIRST_DIRECTIVE_TIME_H
779NEXT_TIME_H
780GL_GNULIB_WAITPID
781NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H
782NEXT_SYS_WAIT_H
783HAVE_SYS_UIO_H
784NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H
785NEXT_SYS_UIO_H
786HAVE_SYS_RANDOM_H
787NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H
788NEXT_SYS_RANDOM_H
789NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H
790NEXT_SYS_IOCTL_H
791HAVE_SYS_IOCTL_H
792HAVE_SYS_FILE_H
793NEXT_AS_FIRST_DIRECTIVE_SYS_FILE_H
794NEXT_SYS_FILE_H
795GL_GNULIB_FFS
796HAVE_STRINGS_H
797NEXT_AS_FIRST_DIRECTIVE_STRINGS_H
798NEXT_STRINGS_H
799NEXT_AS_FIRST_DIRECTIVE_STRING_H
800NEXT_STRING_H
801HAVE_DECL_STRNCASECMP
802HAVE_STRCASECMP
803HAVE_FFS
804NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
805NEXT_STDLIB_H
806NEXT_AS_FIRST_DIRECTIVE_STDIO_H
807NEXT_STDIO_H
808HAVE__BOOL
809GL_GENERATE_STDBOOL_H_FALSE
810GL_GENERATE_STDBOOL_H_TRUE
811STDBOOL_H
812GL_GENERATE_STDALIGN_H_FALSE
813GL_GENERATE_STDALIGN_H_TRUE
814STDALIGN_H
815HAVE_SPAWN_H
816NEXT_AS_FIRST_DIRECTIVE_SPAWN_H
817NEXT_SPAWN_H
818ASM_SYMBOL_PREFIX
819NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
820NEXT_SIGNAL_H
821GL_GNULIB_SELECT
822GL_GNULIB_PSELECT
823GL_GNULIB_SCHED_YIELD
824HAVE_STRUCT_SCHED_PARAM
825HAVE_SCHED_H
826NEXT_AS_FIRST_DIRECTIVE_SCHED_H
827NEXT_SCHED_H
828REPLACE_SCHED_YIELD
829HAVE_SCHED_YIELD
830GL_GNULIB_SIGACTION
831GL_GNULIB_SIGPROCMASK
832GL_GNULIB_SIGNAL_H_SIGPIPE
833GL_GNULIB_RAISE
834GL_GNULIB_PTHREAD_SIGMASK
835REPLACE_RAISE
836REPLACE_PTHREAD_SIGMASK
837HAVE_SIGHANDLER_T
838HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
839HAVE_STRUCT_SIGACTION_SA_SIGACTION
840HAVE_SIGACTION
841HAVE_SIGINFO_T
842HAVE_SIGSET_T
843HAVE_RAISE
844HAVE_PTHREAD_SIGMASK
845HAVE_POSIX_SIGNALBLOCKING
846GL_GNULIB_POSIX_SPAWNATTR_DESTROY
847GL_GNULIB_POSIX_SPAWNATTR_SETSIGMASK
848GL_GNULIB_POSIX_SPAWNATTR_GETSIGMASK
849GL_GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT
850GL_GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT
851GL_GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY
852GL_GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY
853GL_GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM
854GL_GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM
855GL_GNULIB_POSIX_SPAWNATTR_SETPGROUP
856GL_GNULIB_POSIX_SPAWNATTR_GETPGROUP
857GL_GNULIB_POSIX_SPAWNATTR_SETFLAGS
858GL_GNULIB_POSIX_SPAWNATTR_GETFLAGS
859GL_GNULIB_POSIX_SPAWNATTR_INIT
860GL_GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY
861GL_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
862GL_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR
863GL_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
864GL_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
865GL_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR
866GL_GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT
867GL_GNULIB_POSIX_SPAWNP
868GL_GNULIB_POSIX_SPAWN
869LIB_POSIX_SPAWN
870REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
871REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR
872REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
873REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
874REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR
875REPLACE_POSIX_SPAWN
876HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR
877HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR
878HAVE_POSIX_SPAWN_FILE_ACTIONS_T
879HAVE_POSIX_SPAWNATTR_T
880HAVE_POSIX_SPAWN
881LIB_NL_LANGINFO
882GL_GENERATE_NETINET_IN_H_FALSE
883GL_GENERATE_NETINET_IN_H_TRUE
884NETINET_IN_H
885HAVE_NETINET_IN_H
886NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H
887NEXT_NETINET_IN_H
888LIB_NANOSLEEP
889LIB_SELECT
890LIBSOCKET
891HAVE_SYS_SELECT_H
892NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
893NEXT_SYS_SELECT_H
894REPLACE_SELECT
895REPLACE_PSELECT
896HAVE_PSELECT
897GL_GNULIB_MDA_TZSET
898GL_GNULIB_TZSET
899GL_GNULIB_TIME_RZ
900GL_GNULIB_TIME_R
901GL_GNULIB_TIMESPEC_GET
902GL_GNULIB_TIMEGM
903GL_GNULIB_STRPTIME
904GL_GNULIB_STRFTIME
905GL_GNULIB_NANOSLEEP
906GL_GNULIB_LOCALTIME
907GL_GNULIB_MKTIME
908GL_GNULIB_CTIME
909REPLACE_LOCALTIME
910REPLACE_GMTIME
911GNULIB_GETTIMEOFDAY
912REPLACE_TZSET
913REPLACE_TIMEGM
914REPLACE_STRFTIME
915REPLACE_NANOSLEEP
916REPLACE_MKTIME
917REPLACE_LOCALTIME_R
918REPLACE_CTIME
919HAVE_TIMEZONE_T
920HAVE_TIMESPEC_GET
921HAVE_TIMEGM
922HAVE_STRPTIME
923HAVE_NANOSLEEP
924HAVE_DECL_LOCALTIME_R
925GL_GNULIB_MDA_STRDUP
926GL_GNULIB_MDA_MEMCCPY
927GL_GNULIB_STRVERSCMP
928GL_GNULIB_STRSIGNAL
929GL_GNULIB_SIGDESCR_NP
930GL_GNULIB_SIGABBREV_NP
931GL_GNULIB_STRERRORNAME_NP
932GL_GNULIB_STRERROR_R
933GL_GNULIB_STRERROR
934GL_GNULIB_MBSTOK_R
935GL_GNULIB_MBSSEP
936GL_GNULIB_MBSSPN
937GL_GNULIB_MBSPBRK
938GL_GNULIB_MBSCSPN
939GL_GNULIB_MBSCASESTR
940GL_GNULIB_MBSPCASECMP
941GL_GNULIB_MBSNCASECMP
942GL_GNULIB_MBSCASECMP
943GL_GNULIB_MBSSTR
944GL_GNULIB_MBSRCHR
945GL_GNULIB_MBSCHR
946GL_GNULIB_MBSNLEN
947GL_GNULIB_MBSLEN
948GL_GNULIB_STRTOK_R
949GL_GNULIB_STRCASESTR
950GL_GNULIB_STRSTR
951GL_GNULIB_STRSEP
952GL_GNULIB_STRPBRK
953GL_GNULIB_STRNLEN
954GL_GNULIB_STRNDUP
955GL_GNULIB_STRNCAT
956GL_GNULIB_STRDUP
957GL_GNULIB_STRCHRNUL
958GL_GNULIB_STPNCPY
959GL_GNULIB_STPCPY
960GL_GNULIB_RAWMEMCHR
961GL_GNULIB_MEMRCHR
962GL_GNULIB_MEMPCPY
963GL_GNULIB_MEMMEM
964GL_GNULIB_MEMCHR
965GL_GNULIB_FFSLL
966GL_GNULIB_FFSL
967GL_GNULIB_EXPLICIT_BZERO
968UNDEFINE_STRTOK_R
969REPLACE_STRSIGNAL
970REPLACE_STRERRORNAME_NP
971REPLACE_STRERROR_R
972REPLACE_STRERROR
973REPLACE_STRTOK_R
974REPLACE_STRCASESTR
975REPLACE_STRSTR
976REPLACE_STRNLEN
977REPLACE_STRNDUP
978REPLACE_STRNCAT
979REPLACE_STRDUP
980REPLACE_STRCHRNUL
981REPLACE_STPNCPY
982REPLACE_MEMMEM
983REPLACE_MEMCHR
984REPLACE_FFSLL
985HAVE_STRVERSCMP
986HAVE_DECL_STRSIGNAL
987HAVE_SIGDESCR_NP
988HAVE_SIGABBREV_NP
989HAVE_STRERRORNAME_NP
990HAVE_DECL_STRERROR_R
991HAVE_DECL_STRTOK_R
992HAVE_STRCASESTR
993HAVE_STRSEP
994HAVE_STRPBRK
995HAVE_DECL_STRNLEN
996HAVE_DECL_STRNDUP
997HAVE_DECL_STRDUP
998HAVE_STRCHRNUL
999HAVE_STPNCPY
1000HAVE_STPCPY
1001HAVE_RAWMEMCHR
1002HAVE_DECL_MEMRCHR
1003HAVE_MEMPCPY
1004HAVE_DECL_MEMMEM
1005HAVE_FFSLL
1006HAVE_FFSL
1007HAVE_EXPLICIT_BZERO
1008HAVE_MBSLEN
1009HAVE_VISIBILITY
1010CFLAG_VISIBILITY
1011LIB_MBRTOWC
1012LTLIBMULTITHREAD
1013LIBMULTITHREAD
1014LTLIBTHREAD
1015LIBTHREAD
1016LIBSTDTHREAD
1017GL_GNULIB_LOCALENAME
1018GL_GNULIB_DUPLOCALE
1019GL_GNULIB_SETLOCALE_NULL
1020GL_GNULIB_SETLOCALE
1021GL_GNULIB_LOCALECONV
1022NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
1023NEXT_LOCALE_H
1024HAVE_XLOCALE_H
1025NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
1026NEXT_STDDEF_H
1027GL_GENERATE_STDDEF_H_FALSE
1028GL_GENERATE_STDDEF_H_TRUE
1029STDDEF_H
1030HAVE_WCHAR_T
1031HAVE_MAX_ALIGN_T
1032REPLACE_NULL
1033LOCALENAME_ENHANCE_LOCALE_FUNCS
1034REPLACE_STRUCT_LCONV
1035REPLACE_FREELOCALE
1036REPLACE_DUPLOCALE
1037REPLACE_NEWLOCALE
1038REPLACE_SETLOCALE
1039REPLACE_LOCALECONV
1040HAVE_FREELOCALE
1041HAVE_DUPLOCALE
1042HAVE_NEWLOCALE
1043LOCALCHARSET_TESTS_ENVIRONMENT
1044LIBUNISTRING_PREFIX
1045LTLIBUNISTRING
1046LIBUNISTRING
1047HAVE_LIBUNISTRING
1048GL_GNULIB_NL_LANGINFO
1049HAVE_LANGINFO_YESEXPR
1050HAVE_LANGINFO_ERA
1051HAVE_LANGINFO_ALTMON
1052HAVE_LANGINFO_T_FMT_AMPM
1053HAVE_LANGINFO_CODESET
1054HAVE_LANGINFO_H
1055NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
1056NEXT_LANGINFO_H
1057REPLACE_NL_LANGINFO
1058HAVE_NL_LANGINFO
1059LOCALE_ZH_CN
1060LOCALE_FR_UTF8
1061LOCALE_JA
1062GL_GNULIB_TOWCTRANS
1063GL_GNULIB_WCTRANS
1064GL_GNULIB_ISWCTYPE
1065GL_GNULIB_WCTYPE
1066GL_GNULIB_ISWXDIGIT
1067GL_GNULIB_ISWDIGIT
1068GL_GNULIB_ISWBLANK
1069REPLACE_TOWLOWER
1070REPLACE_ISWCNTRL
1071HAVE_WCTYPE_H
1072NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
1073NEXT_WCTYPE_H
1074HAVE_CRTDEFS_H
1075HAVE_WINT_T
1076HAVE_ISWCNTRL
1077REPLACE_ISWXDIGIT
1078REPLACE_ISWDIGIT
1079REPLACE_ISWBLANK
1080HAVE_WCTRANS_T
1081HAVE_WCTYPE_T
1082HAVE_ISWBLANK
1083GL_GNULIB_IOCTL
1084GL_GNULIB_STRTOUMAX
1085GL_GNULIB_STRTOIMAX
1086GL_GNULIB_IMAXDIV
1087GL_GNULIB_IMAXABS
1088NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
1089NEXT_INTTYPES_H
1090UINT64_MAX_EQ_ULONG_MAX
1091UINT32_MAX_LT_UINTMAX_MAX
1092PRIPTR_PREFIX
1093INT64_MAX_EQ_LONG_MAX
1094INT32_MAX_LT_INTMAX_MAX
1095REPLACE_STRTOUMAX
1096REPLACE_STRTOIMAX
1097HAVE_IMAXDIV_T
1098HAVE_DECL_STRTOUMAX
1099HAVE_DECL_STRTOIMAX
1100HAVE_DECL_IMAXDIV
1101HAVE_DECL_IMAXABS
1102GL_GENERATE_STDINT_H_FALSE
1103GL_GENERATE_STDINT_H_TRUE
1104STDINT_H
1105HAVE_SYS_INTTYPES_H
1106HAVE_SYS_BITYPES_H
1107HAVE_C99_STDINT_H
1108WINT_T_SUFFIX
1109WCHAR_T_SUFFIX
1110SIG_ATOMIC_T_SUFFIX
1111SIZE_T_SUFFIX
1112PTRDIFF_T_SUFFIX
1113HAVE_SIGNED_WINT_T
1114HAVE_SIGNED_WCHAR_T
1115HAVE_SIGNED_SIG_ATOMIC_T
1116BITSIZEOF_WINT_T
1117BITSIZEOF_WCHAR_T
1118BITSIZEOF_SIG_ATOMIC_T
1119BITSIZEOF_SIZE_T
1120BITSIZEOF_PTRDIFF_T
1121APPLE_UNIVERSAL_BUILD
1122HAVE_STDINT_H
1123NEXT_AS_FIRST_DIRECTIVE_STDINT_H
1124NEXT_STDINT_H
1125HAVE_SYS_TYPES_H
1126HAVE_INTTYPES_H
1127HAVE_WCHAR_H
1128GNULIBHEADERS_OVERRIDE_WINT_T
1129GL_GENERATE_LIMITS_H_FALSE
1130GL_GENERATE_LIMITS_H_TRUE
1131LIMITS_H
1132NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
1133NEXT_LIMITS_H
1134NEXT_AS_FIRST_DIRECTIVE_ICONV_H
1135NEXT_ICONV_H
1136GL_GNULIB_ICONV
1137LIB_HARD_LOCALE
1138LIB_SETLOCALE_NULL
1139LIB_SCHED_YIELD
1140LIBPMULTITHREAD
1141LIBPTHREAD
1142GL_GNULIB_GETTIMEOFDAY
1143NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1144NEXT_SYS_TIME_H
1145REPLACE_STRUCT_TIMEVAL
1146REPLACE_GETTIMEOFDAY
1147HAVE_SYS_TIME_H
1148HAVE_STRUCT_TIMEVAL
1149HAVE_GETTIMEOFDAY
1150GL_GNULIB_GETRANDOM
1151LIB_GETRANDOM
1152REPLACE_GETRANDOM
1153HAVE_GETRANDOM
1154GETOPT_CDEFS_H
1155GETOPT_H
1156HAVE_SYS_CDEFS_H
1157HAVE_GETOPT_H
1158NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
1159NEXT_GETOPT_H
1160GL_GNULIB_GETADDRINFO
1161GETADDRINFO_LIB
1162INET_NTOP_LIB
1163SERVENT_LIB
1164HOSTENT_LIB
1165HAVE_NETDB_H
1166NEXT_AS_FIRST_DIRECTIVE_NETDB_H
1167NEXT_NETDB_H
1168REPLACE_GETADDRINFO
1169REPLACE_GAI_STRERROR
1170HAVE_DECL_GETNAMEINFO
1171HAVE_DECL_GETADDRINFO
1172HAVE_DECL_GAI_STRERROR
1173HAVE_DECL_FREEADDRINFO
1174HAVE_STRUCT_ADDRINFO
1175GL_GNULIB_MDA_UMASK
1176GL_GNULIB_MDA_MKDIR
1177GL_GNULIB_MDA_CHMOD
1178GL_GNULIB_OVERRIDES_STRUCT_STAT
1179GL_GNULIB_UTIMENSAT
1180GL_GNULIB_STAT
1181GL_GNULIB_MKNODAT
1182GL_GNULIB_MKNOD
1183GL_GNULIB_MKFIFOAT
1184GL_GNULIB_MKFIFO
1185GL_GNULIB_MKDIRAT
1186GL_GNULIB_MKDIR
1187GL_GNULIB_LSTAT
1188GL_GNULIB_LCHMOD
1189GL_GNULIB_GETUMASK
1190GL_GNULIB_FUTIMENS
1191GL_GNULIB_FSTATAT
1192GL_GNULIB_FSTAT
1193GL_GNULIB_FCHMODAT
1194WINDOWS_64_BIT_ST_SIZE
1195WINDOWS_STAT_TIMESPEC
1196NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1197NEXT_SYS_STAT_H
1198REPLACE_UTIMENSAT
1199REPLACE_STAT
1200REPLACE_MKNODAT
1201REPLACE_MKNOD
1202REPLACE_MKFIFOAT
1203REPLACE_MKFIFO
1204REPLACE_MKDIR
1205REPLACE_LSTAT
1206REPLACE_FUTIMENS
1207REPLACE_FSTATAT
1208REPLACE_FSTAT
1209REPLACE_FCHMODAT
1210HAVE_UTIMENSAT
1211HAVE_MKNODAT
1212HAVE_MKNOD
1213HAVE_MKFIFOAT
1214HAVE_MKFIFO
1215HAVE_MKDIRAT
1216HAVE_LSTAT
1217HAVE_LCHMOD
1218HAVE_GETUMASK
1219HAVE_FUTIMENS
1220HAVE_FSTATAT
1221HAVE_FCHMODAT
1222WINDOWS_STAT_INODES
1223WINDOWS_64_BIT_OFF_T
1224NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
1225NEXT_SYS_TYPES_H
1226GL_GNULIB_FNMATCH
1227GL_GENERATE_FNMATCH_H_FALSE
1228GL_GENERATE_FNMATCH_H_TRUE
1229FNMATCH_H
1230HAVE_FNMATCH_H
1231NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H
1232NEXT_FNMATCH_H
1233REPLACE_FNMATCH
1234HAVE_FNMATCH
1235GL_GNULIB_FLOCK
1236HAVE_FLOCK
1237REPLACE_ITOLD
1238GL_GENERATE_FLOAT_H_FALSE
1239GL_GENERATE_FLOAT_H_TRUE
1240FLOAT_H
1241NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1242NEXT_FLOAT_H
1243GL_GNULIB_MDA_TEMPNAM
1244GL_GNULIB_MDA_PUTW
1245GL_GNULIB_MDA_GETW
1246GL_GNULIB_MDA_FILENO
1247GL_GNULIB_MDA_FDOPEN
1248GL_GNULIB_MDA_FCLOSEALL
1249GL_GNULIB_VSPRINTF_POSIX
1250GL_GNULIB_VSNPRINTF
1251GL_GNULIB_VPRINTF_POSIX
1252GL_GNULIB_VPRINTF
1253GL_GNULIB_VFPRINTF_POSIX
1254GL_GNULIB_VFPRINTF
1255GL_GNULIB_VDPRINTF
1256GL_GNULIB_VSCANF
1257GL_GNULIB_VFSCANF
1258GL_GNULIB_VASPRINTF
1259GL_GNULIB_TMPFILE
1260GL_GNULIB_STDIO_H_SIGPIPE
1261GL_GNULIB_STDIO_H_NONBLOCKING
1262GL_GNULIB_SPRINTF_POSIX
1263GL_GNULIB_SNPRINTF
1264GL_GNULIB_SCANF
1265GL_GNULIB_RENAMEAT
1266GL_GNULIB_RENAME
1267GL_GNULIB_REMOVE
1268GL_GNULIB_PUTS
1269GL_GNULIB_PUTCHAR
1270GL_GNULIB_PUTC
1271GL_GNULIB_PRINTF_POSIX
1272GL_GNULIB_PRINTF
1273GL_GNULIB_POPEN
1274GL_GNULIB_PERROR
1275GL_GNULIB_PCLOSE
1276GL_GNULIB_OBSTACK_PRINTF_POSIX
1277GL_GNULIB_OBSTACK_PRINTF
1278GL_GNULIB_GETLINE
1279GL_GNULIB_GETDELIM
1280GL_GNULIB_GETCHAR
1281GL_GNULIB_GETC
1282GL_GNULIB_FWRITE
1283GL_GNULIB_FTELLO
1284GL_GNULIB_FTELL
1285GL_GNULIB_FSEEKO
1286GL_GNULIB_FSEEK
1287GL_GNULIB_FSCANF
1288GL_GNULIB_FREOPEN
1289GL_GNULIB_FREAD
1290GL_GNULIB_FPUTS
1291GL_GNULIB_FPUTC
1292GL_GNULIB_FPURGE
1293GL_GNULIB_FPRINTF_POSIX
1294GL_GNULIB_FPRINTF
1295GL_GNULIB_FOPEN
1296GL_GNULIB_FGETS
1297GL_GNULIB_FGETC
1298GL_GNULIB_FFLUSH
1299GL_GNULIB_FDOPEN
1300GL_GNULIB_FCLOSE
1301GL_GNULIB_DPRINTF
1302REPLACE_VSPRINTF
1303REPLACE_VSNPRINTF
1304REPLACE_VPRINTF
1305REPLACE_VFPRINTF
1306REPLACE_VDPRINTF
1307REPLACE_VASPRINTF
1308REPLACE_TMPFILE
1309REPLACE_STDIO_WRITE_FUNCS
1310REPLACE_STDIO_READ_FUNCS
1311REPLACE_SPRINTF
1312REPLACE_SNPRINTF
1313REPLACE_RENAMEAT
1314REPLACE_RENAME
1315REPLACE_REMOVE
1316REPLACE_PRINTF
1317REPLACE_POPEN
1318REPLACE_PERROR
1319REPLACE_OBSTACK_PRINTF
1320REPLACE_GETLINE
1321REPLACE_GETDELIM
1322REPLACE_FTELLO
1323REPLACE_FTELL
1324REPLACE_FSEEKO
1325REPLACE_FSEEK
1326REPLACE_FREOPEN
1327REPLACE_FPURGE
1328REPLACE_FPRINTF
1329REPLACE_FOPEN
1330REPLACE_FFLUSH
1331REPLACE_FDOPEN
1332REPLACE_FCLOSE
1333REPLACE_DPRINTF
1334HAVE_VDPRINTF
1335HAVE_VASPRINTF
1336HAVE_RENAMEAT
1337HAVE_POPEN
1338HAVE_PCLOSE
1339HAVE_FTELLO
1340HAVE_FSEEKO
1341HAVE_DPRINTF
1342HAVE_DECL_VSNPRINTF
1343HAVE_DECL_SNPRINTF
1344HAVE_DECL_OBSTACK_PRINTF
1345HAVE_DECL_GETLINE
1346HAVE_DECL_GETDELIM
1347HAVE_DECL_FTELLO
1348HAVE_DECL_FSEEKO
1349HAVE_DECL_FPURGE
1350HAVE_DECL_FCLOSEALL
1351NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1352NEXT_FCNTL_H
1353GL_GNULIB_MDA_OPEN
1354GL_GNULIB_MDA_CREAT
1355GL_GNULIB_OPENAT
1356GL_GNULIB_OPEN
1357GL_GNULIB_NONBLOCKING
1358GL_GNULIB_FCNTL
1359GL_GNULIB_CREAT
1360REPLACE_OPENAT
1361REPLACE_OPEN
1362REPLACE_FCNTL
1363REPLACE_CREAT
1364HAVE_OPENAT
1365HAVE_FCNTL
1366EOVERFLOW_VALUE
1367EOVERFLOW_HIDDEN
1368ENOLINK_VALUE
1369ENOLINK_HIDDEN
1370EMULTIHOP_VALUE
1371EMULTIHOP_HIDDEN
1372GL_GENERATE_ERRNO_H_FALSE
1373GL_GENERATE_ERRNO_H_TRUE
1374ERRNO_H
1375NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1376NEXT_ERRNO_H
1377HAVE_DIRENT_H
1378NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1379NEXT_DIRENT_H
1380GL_GNULIB_ISBLANK
1381NEXT_AS_FIRST_DIRECTIVE_CTYPE_H
1382NEXT_CTYPE_H
1383HAVE_ISBLANK
1384LIB_CRYPTO
1385GL_GNULIB_ALPHASORT
1386GL_GNULIB_SCANDIR
1387GL_GNULIB_FDOPENDIR
1388GL_GNULIB_DIRFD
1389GL_GNULIB_CLOSEDIR
1390GL_GNULIB_REWINDDIR
1391GL_GNULIB_READDIR
1392GL_GNULIB_OPENDIR
1393REPLACE_FDOPENDIR
1394REPLACE_DIRFD
1395REPLACE_CLOSEDIR
1396REPLACE_OPENDIR
1397HAVE_ALPHASORT
1398HAVE_SCANDIR
1399HAVE_FDOPENDIR
1400HAVE_DECL_FDOPENDIR
1401HAVE_DECL_DIRFD
1402HAVE_CLOSEDIR
1403HAVE_REWINDDIR
1404HAVE_READDIR
1405HAVE_OPENDIR
1406HAVE_MSVC_INVALID_PARAMETER_HANDLER
1407LIB_CLOCK_GETTIME
1408GL_GNULIB_MDA_PUTENV
1409GL_GNULIB_MDA_MKTEMP
1410GL_GNULIB_MDA_GCVT
1411GL_GNULIB_MDA_FCVT
1412GL_GNULIB_MDA_ECVT
1413GL_GNULIB_WCTOMB
1414GL_GNULIB_UNSETENV
1415GL_GNULIB_UNLOCKPT
1416GL_GNULIB_SYSTEM_POSIX
1417GL_GNULIB_STRTOULL
1418GL_GNULIB_STRTOUL
1419GL_GNULIB_STRTOLL
1420GL_GNULIB_STRTOLD
1421GL_GNULIB_STRTOL
1422GL_GNULIB_STRTOD
1423GL_GNULIB_SETENV
1424GL_GNULIB_SECURE_GETENV
1425GL_GNULIB_RPMATCH
1426GL_GNULIB_REALPATH
1427GL_GNULIB_REALLOC_POSIX
1428GL_GNULIB_REALLOCARRAY
1429GL_GNULIB_RANDOM_R
1430GL_GNULIB_RANDOM
1431GL_GNULIB_QSORT_R
1432GL_GNULIB_PUTENV
1433GL_GNULIB_PTSNAME_R
1434GL_GNULIB_PTSNAME
1435GL_GNULIB_POSIX_OPENPT
1436GL_GNULIB_POSIX_MEMALIGN
1437GL_GNULIB_MKSTEMPS
1438GL_GNULIB_MKSTEMP
1439GL_GNULIB_MKOSTEMPS
1440GL_GNULIB_MKOSTEMP
1441GL_GNULIB_MKDTEMP
1442GL_GNULIB_MBTOWC
1443GL_GNULIB_MALLOC_POSIX
1444GL_GNULIB_GRANTPT
1445GL_GNULIB_GETSUBOPT
1446GL_GNULIB_GETLOADAVG
1447GL_GNULIB_FREE_POSIX
1448GL_GNULIB_CANONICALIZE_FILE_NAME
1449GL_GNULIB_CALLOC_POSIX
1450GL_GNULIB_ATOLL
1451GL_GNULIB_ALIGNED_ALLOC
1452GL_GNULIB__EXIT
1453REPLACE_WCTOMB
1454REPLACE_UNSETENV
1455REPLACE_STRTOULL
1456REPLACE_STRTOUL
1457REPLACE_STRTOLL
1458REPLACE_STRTOLD
1459REPLACE_STRTOL
1460REPLACE_STRTOD
1461REPLACE_SETSTATE
1462REPLACE_SETENV
1463REPLACE_REALPATH
1464REPLACE_REALLOCARRAY
1465REPLACE_REALLOC
1466REPLACE_RANDOM_R
1467REPLACE_RANDOM
1468REPLACE_QSORT_R
1469REPLACE_PUTENV
1470REPLACE_PTSNAME_R
1471REPLACE_PTSNAME
1472REPLACE_POSIX_MEMALIGN
1473REPLACE_MKSTEMP
1474REPLACE_MBTOWC
1475REPLACE_MALLOC
1476REPLACE_INITSTATE
1477REPLACE_FREE
1478REPLACE_CANONICALIZE_FILE_NAME
1479REPLACE_CALLOC
1480REPLACE_ALIGNED_ALLOC
1481HAVE_DECL_UNSETENV
1482HAVE_UNLOCKPT
1483HAVE_SYS_LOADAVG_H
1484HAVE_STRUCT_RANDOM_DATA
1485HAVE_STRTOULL
1486HAVE_STRTOUL
1487HAVE_STRTOLL
1488HAVE_STRTOLD
1489HAVE_STRTOL
1490HAVE_STRTOD
1491HAVE_DECL_SETSTATE
1492HAVE_SETSTATE
1493HAVE_DECL_SETENV
1494HAVE_SETENV
1495HAVE_SECURE_GETENV
1496HAVE_RPMATCH
1497HAVE_REALPATH
1498HAVE_REALLOCARRAY
1499HAVE_RANDOM_R
1500HAVE_RANDOM_H
1501HAVE_RANDOM
1502HAVE_QSORT_R
1503HAVE_PTSNAME_R
1504HAVE_PTSNAME
1505HAVE_POSIX_OPENPT
1506HAVE_POSIX_MEMALIGN
1507HAVE_MKSTEMPS
1508HAVE_MKSTEMP
1509HAVE_MKOSTEMPS
1510HAVE_MKOSTEMP
1511HAVE_MKDTEMP
1512HAVE_MBTOWC
1513HAVE_DECL_INITSTATE
1514HAVE_INITSTATE
1515HAVE_GRANTPT
1516HAVE_GETSUBOPT
1517HAVE_DECL_GETLOADAVG
1518HAVE_DECL_GCVT
1519HAVE_DECL_FCVT
1520HAVE_DECL_ECVT
1521HAVE_CANONICALIZE_FILE_NAME
1522HAVE_ATOLL
1523HAVE_ALIGNED_ALLOC
1524HAVE__EXIT
1525GL_GENERATE_BYTESWAP_H_FALSE
1526GL_GENERATE_BYTESWAP_H_TRUE
1527BYTESWAP_H
1528GL_GNULIB_MDA_WCSDUP
1529GL_GNULIB_WCSFTIME
1530GL_GNULIB_WCSWIDTH
1531GL_GNULIB_WCSTOK
1532GL_GNULIB_WCSSTR
1533GL_GNULIB_WCSPBRK
1534GL_GNULIB_WCSSPN
1535GL_GNULIB_WCSCSPN
1536GL_GNULIB_WCSRCHR
1537GL_GNULIB_WCSCHR
1538GL_GNULIB_WCSDUP
1539GL_GNULIB_WCSXFRM
1540GL_GNULIB_WCSCOLL
1541GL_GNULIB_WCSNCASECMP
1542GL_GNULIB_WCSCASECMP
1543GL_GNULIB_WCSNCMP
1544GL_GNULIB_WCSCMP
1545GL_GNULIB_WCSNCAT
1546GL_GNULIB_WCSCAT
1547GL_GNULIB_WCPNCPY
1548GL_GNULIB_WCSNCPY
1549GL_GNULIB_WCPCPY
1550GL_GNULIB_WCSCPY
1551GL_GNULIB_WCSNLEN
1552GL_GNULIB_WCSLEN
1553GL_GNULIB_WMEMSET
1554GL_GNULIB_WMEMPCPY
1555GL_GNULIB_WMEMMOVE
1556GL_GNULIB_WMEMCPY
1557GL_GNULIB_WMEMCMP
1558GL_GNULIB_WMEMCHR
1559GL_GNULIB_WCWIDTH
1560GL_GNULIB_WCSNRTOMBS
1561GL_GNULIB_WCSRTOMBS
1562GL_GNULIB_WCRTOMB
1563GL_GNULIB_MBSNRTOWCS
1564GL_GNULIB_MBSRTOWCS
1565GL_GNULIB_MBRLEN
1566GL_GNULIB_MBRTOWC
1567GL_GNULIB_MBSINIT
1568GL_GNULIB_WCTOB
1569GL_GNULIB_BTOWC
1570LOCALE_FR
1571REPLACE_WCSTOK
1572REPLACE_WCSFTIME
1573REPLACE_WCSWIDTH
1574REPLACE_WCWIDTH
1575REPLACE_WCSNRTOMBS
1576REPLACE_WCSRTOMBS
1577REPLACE_WCRTOMB
1578REPLACE_MBSNRTOWCS
1579REPLACE_MBSRTOWCS
1580REPLACE_MBRLEN
1581REPLACE_MBRTOWC
1582REPLACE_MBSINIT
1583REPLACE_WCTOB
1584REPLACE_BTOWC
1585REPLACE_MBSTATE_T
1586HAVE_DECL_WCWIDTH
1587HAVE_DECL_WCSDUP
1588HAVE_DECL_WCTOB
1589HAVE_WCSFTIME
1590HAVE_WCSWIDTH
1591HAVE_WCSTOK
1592HAVE_WCSSTR
1593HAVE_WCSPBRK
1594HAVE_WCSSPN
1595HAVE_WCSCSPN
1596HAVE_WCSRCHR
1597HAVE_WCSCHR
1598HAVE_WCSDUP
1599HAVE_WCSXFRM
1600HAVE_WCSCOLL
1601HAVE_WCSNCASECMP
1602HAVE_WCSCASECMP
1603HAVE_WCSNCMP
1604HAVE_WCSCMP
1605HAVE_WCSNCAT
1606HAVE_WCSCAT
1607HAVE_WCPNCPY
1608HAVE_WCSNCPY
1609HAVE_WCPCPY
1610HAVE_WCSCPY
1611HAVE_WCSNLEN
1612HAVE_WCSLEN
1613HAVE_WMEMSET
1614HAVE_WMEMPCPY
1615HAVE_WMEMMOVE
1616HAVE_WMEMCPY
1617HAVE_WMEMCMP
1618HAVE_WMEMCHR
1619HAVE_WCSNRTOMBS
1620HAVE_WCSRTOMBS
1621HAVE_WCRTOMB
1622HAVE_MBSNRTOWCS
1623HAVE_MBSRTOWCS
1624HAVE_MBRLEN
1625HAVE_MBRTOWC
1626HAVE_MBSINIT
1627HAVE_BTOWC
1628GL_GNULIB_INET_PTON
1629GL_GNULIB_INET_NTOP
1630HAVE_FEATURES_H
1631NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H
1632NEXT_ARPA_INET_H
1633HAVE_ARPA_INET_H
1634REPLACE_INET_PTON
1635REPLACE_INET_NTOP
1636HAVE_DECL_INET_PTON
1637HAVE_DECL_INET_NTOP
1638HAVE_ALLOCA_H
1639GL_GENERATE_ALLOCA_H_FALSE
1640GL_GENERATE_ALLOCA_H_TRUE
1641ALLOCA_H
1642ALLOCA
1643GL_GNULIB_MDA_WRITE
1644GL_GNULIB_MDA_UNLINK
1645GL_GNULIB_MDA_SWAB
1646GL_GNULIB_MDA_RMDIR
1647GL_GNULIB_MDA_READ
1648GL_GNULIB_MDA_LSEEK
1649GL_GNULIB_MDA_ISATTY
1650GL_GNULIB_MDA_GETPID
1651GL_GNULIB_MDA_GETCWD
1652GL_GNULIB_MDA_EXECVPE
1653GL_GNULIB_MDA_EXECVP
1654GL_GNULIB_MDA_EXECVE
1655GL_GNULIB_MDA_EXECV
1656GL_GNULIB_MDA_EXECLP
1657GL_GNULIB_MDA_EXECLE
1658GL_GNULIB_MDA_EXECL
1659GL_GNULIB_MDA_DUP2
1660GL_GNULIB_MDA_DUP
1661GL_GNULIB_MDA_CLOSE
1662GL_GNULIB_MDA_CHDIR
1663GL_GNULIB_MDA_ACCESS
1664GL_GNULIB_WRITE
1665GL_GNULIB_USLEEP
1666GL_GNULIB_UNLINKAT
1667GL_GNULIB_UNLINK
1668GL_GNULIB_UNISTD_H_SIGPIPE
1669GL_GNULIB_UNISTD_H_NONBLOCKING
1670GL_GNULIB_UNISTD_H_GETOPT
1671GL_GNULIB_TTYNAME_R
1672GL_GNULIB_TRUNCATE
1673GL_GNULIB_SYMLINKAT
1674GL_GNULIB_SYMLINK
1675GL_GNULIB_SLEEP
1676GL_GNULIB_SETHOSTNAME
1677GL_GNULIB_RMDIR
1678GL_GNULIB_READLINKAT
1679GL_GNULIB_READLINK
1680GL_GNULIB_READ
1681GL_GNULIB_PWRITE
1682GL_GNULIB_PREAD
1683GL_GNULIB_PIPE2
1684GL_GNULIB_PIPE
1685GL_GNULIB_LSEEK
1686GL_GNULIB_LINKAT
1687GL_GNULIB_LINK
1688GL_GNULIB_LCHOWN
1689GL_GNULIB_ISATTY
1690GL_GNULIB_GROUP_MEMBER
1691GL_GNULIB_GETUSERSHELL
1692GL_GNULIB_GETPASS
1693GL_GNULIB_GETPAGESIZE
1694GL_GNULIB_GETOPT_POSIX
1695GL_GNULIB_GETLOGIN_R
1696GL_GNULIB_GETLOGIN
1697GL_GNULIB_GETHOSTNAME
1698GL_GNULIB_GETGROUPS
1699GL_GNULIB_GETENTROPY
1700GL_GNULIB_GETDTABLESIZE
1701GL_GNULIB_GETDOMAINNAME
1702GL_GNULIB_GETCWD
1703GL_GNULIB_FTRUNCATE
1704GL_GNULIB_FSYNC
1705GL_GNULIB_FDATASYNC
1706GL_GNULIB_FCHOWNAT
1707GL_GNULIB_FCHDIR
1708GL_GNULIB_FACCESSAT
1709GL_GNULIB_EXECVPE
1710GL_GNULIB_EXECVP
1711GL_GNULIB_EXECVE
1712GL_GNULIB_EXECV
1713GL_GNULIB_EXECLP
1714GL_GNULIB_EXECLE
1715GL_GNULIB_EXECL
1716GL_GNULIB_EUIDACCESS
1717GL_GNULIB_ENVIRON
1718GL_GNULIB_DUP3
1719GL_GNULIB_DUP2
1720GL_GNULIB_DUP
1721GL_GNULIB_COPY_FILE_RANGE
1722GL_GNULIB_CLOSE
1723GL_GNULIB_CHOWN
1724GL_GNULIB_CHDIR
1725GL_GNULIB_ACCESS
1726GL_GNULIB_ACCEPT4
1727GL_GNULIB_SHUTDOWN
1728GL_GNULIB_SETSOCKOPT
1729GL_GNULIB_SENDTO
1730GL_GNULIB_RECVFROM
1731GL_GNULIB_SEND
1732GL_GNULIB_RECV
1733GL_GNULIB_LISTEN
1734GL_GNULIB_GETSOCKOPT
1735GL_GNULIB_GETSOCKNAME
1736GL_GNULIB_GETPEERNAME
1737GL_GNULIB_BIND
1738GL_GNULIB_ACCEPT
1739GL_GNULIB_CONNECT
1740GL_GNULIB_SOCKET
1741HAVE_WINSOCK2_H
1742REPLACE_IOCTL
1743SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1744SYS_IOCTL_H_HAVE_WINSOCK2_H
1745UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1746UNISTD_H_HAVE_WINSOCK2_H
1747UNISTD_H_HAVE_SYS_RANDOM_H
1748REPLACE_WRITE
1749REPLACE_USLEEP
1750REPLACE_UNLINKAT
1751REPLACE_UNLINK
1752REPLACE_TTYNAME_R
1753REPLACE_TRUNCATE
1754REPLACE_SYMLINKAT
1755REPLACE_SYMLINK
1756REPLACE_SLEEP
1757REPLACE_RMDIR
1758REPLACE_READLINKAT
1759REPLACE_READLINK
1760REPLACE_READ
1761REPLACE_PWRITE
1762REPLACE_PREAD
1763REPLACE_LSEEK
1764REPLACE_LINKAT
1765REPLACE_LINK
1766REPLACE_LCHOWN
1767REPLACE_ISATTY
1768REPLACE_GETPASS
1769REPLACE_GETPAGESIZE
1770REPLACE_GETGROUPS
1771REPLACE_GETLOGIN_R
1772REPLACE_GETDTABLESIZE
1773REPLACE_GETDOMAINNAME
1774REPLACE_GETCWD
1775REPLACE_FTRUNCATE
1776REPLACE_FCHOWNAT
1777REPLACE_FACCESSAT
1778REPLACE_EXECVPE
1779REPLACE_EXECVP
1780REPLACE_EXECVE
1781REPLACE_EXECV
1782REPLACE_EXECLP
1783REPLACE_EXECLE
1784REPLACE_EXECL
1785REPLACE_DUP2
1786REPLACE_DUP
1787REPLACE_CLOSE
1788REPLACE_CHOWN
1789REPLACE_ACCESS
1790HAVE_SYS_PARAM_H
1791HAVE_OS_H
1792HAVE_DECL_TTYNAME_R
1793HAVE_DECL_TRUNCATE
1794HAVE_DECL_SETHOSTNAME
1795HAVE_DECL_GETUSERSHELL
1796HAVE_DECL_GETPAGESIZE
1797HAVE_DECL_GETLOGIN_R
1798HAVE_DECL_GETLOGIN
1799HAVE_DECL_GETDOMAINNAME
1800HAVE_DECL_FDATASYNC
1801HAVE_DECL_FCHDIR
1802HAVE_DECL_EXECVPE
1803HAVE_DECL_ENVIRON
1804HAVE_USLEEP
1805HAVE_UNLINKAT
1806HAVE_SYMLINKAT
1807HAVE_SYMLINK
1808HAVE_SLEEP
1809HAVE_SETHOSTNAME
1810HAVE_READLINKAT
1811HAVE_READLINK
1812HAVE_PWRITE
1813HAVE_PREAD
1814HAVE_PIPE2
1815HAVE_PIPE
1816HAVE_LINKAT
1817HAVE_LINK
1818HAVE_LCHOWN
1819HAVE_GROUP_MEMBER
1820HAVE_GETPASS
1821HAVE_GETPAGESIZE
1822HAVE_GETLOGIN
1823HAVE_GETHOSTNAME
1824HAVE_GETGROUPS
1825HAVE_GETENTROPY
1826HAVE_GETDTABLESIZE
1827HAVE_FTRUNCATE
1828HAVE_FSYNC
1829HAVE_FDATASYNC
1830HAVE_FCHOWNAT
1831HAVE_FCHDIR
1832HAVE_FACCESSAT
1833HAVE_EXECVPE
1834HAVE_EUIDACCESS
1835HAVE_DUP3
1836HAVE_COPY_FILE_RANGE
1837HAVE_CHOWN
1838HAVE_WS2TCPIP_H
1839HAVE_SYS_SOCKET_H
1840NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H
1841NEXT_SYS_SOCKET_H
1842PRAGMA_COLUMNS
1843PRAGMA_SYSTEM_HEADER
1844INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1845INCLUDE_NEXT
1846HAVE_ACCEPT4
1847HAVE_SA_FAMILY_T
1848HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
1849HAVE_STRUCT_SOCKADDR_STORAGE
1850GL_COND_LIBTOOL_FALSE
1851GL_COND_LIBTOOL_TRUE
1852GL_GENERATE_ICONV_H_FALSE
1853GL_GENERATE_ICONV_H_TRUE
1854ICONV_H
1855REPLACE_ICONV_UTF
1856REPLACE_ICONV_OPEN
1857REPLACE_ICONV
1858ICONV_CONST
1859LEXLIB
1860LEX_OUTPUT_ROOT
1861LEX
1862POSUB
1863LTLIBINTL
1864LIBINTL
1865INTLLIBS
1866LTLIBICONV
1867LIBICONV
1868INTL_MACOSX_LIBS
1869XGETTEXT_EXTRA_OPTIONS
1870MSGMERGE
1871XGETTEXT_015
1872XGETTEXT
1873GMSGFMT_015
1874MSGFMT_015
1875GMSGFMT
1876MSGFMT
1877GETTEXT_MACRO_VERSION
1878USE_NLS
1879SED
1880HAVE_PYTHON3_FALSE
1881HAVE_PYTHON3_TRUE
1882pkgpyexecdir
1883pyexecdir
1884pkgpythondir
1885pythondir
1886PYTHON_PLATFORM
1887PYTHON_EXEC_PREFIX
1888PYTHON_PREFIX
1889PYTHON_VERSION
1890PYTHON
1891RANLIB
1892ARFLAGS
1893AR
1894EGREP
1895GREP
1896CPP
1897VALGRIND_TESTS
1898HAVE_VALGRIND
1899WARN_CFLAGS
1900FUZZ_LIBS
1901FUZZING_FALSE
1902FUZZING_TRUE
1903LIB_FUZZING_ENGINE
1904host_os
1905host_vendor
1906host_cpu
1907host
1908build_os
1909build_vendor
1910build_cpu
1911build
1912am__fastdepCC_FALSE
1913am__fastdepCC_TRUE
1914CCDEPMODE
1915am__nodep
1916AMDEPBACKSLASH
1917AMDEP_FALSE
1918AMDEP_TRUE
1919am__include
1920DEPDIR
1921OBJEXT
1922EXEEXT
1923ac_ct_CC
1924CPPFLAGS
1925LDFLAGS
1926CFLAGS
1927CC
1928AM_BACKSLASH
1929AM_DEFAULT_VERBOSITY
1930AM_DEFAULT_V
1931AM_V
1932CSCOPE
1933ETAGS
1934CTAGS
1935am__untar
1936am__tar
1937AMTAR
1938am__leading_dot
1939SET_MAKE
1940AWK
1941mkdir_p
1942MKDIR_P
1943INSTALL_STRIP_PROGRAM
1944STRIP
1945install_sh
1946MAKEINFO
1947AUTOHEADER
1948AUTOMAKE
1949AUTOCONF
1950ACLOCAL
1951VERSION
1952PACKAGE
1953CYGPATH_W
1954am__isrc
1955INSTALL_DATA
1956INSTALL_SCRIPT
1957INSTALL_PROGRAM
1958target_alias
1959host_alias
1960build_alias
1961LIBS
1962ECHO_T
1963ECHO_N
1964ECHO_C
1965DEFS
1966mandir
1967localedir
1968libdir
1969psdir
1970pdfdir
1971dvidir
1972htmldir
1973infodir
1974docdir
1975oldincludedir
1976includedir
1977runstatedir
1978localstatedir
1979sharedstatedir
1980sysconfdir
1981datadir
1982datarootdir
1983libexecdir
1984sbindir
1985bindir
1986program_transform_name
1987prefix
1988exec_prefix
1989PACKAGE_URL
1990PACKAGE_BUGREPORT
1991PACKAGE_STRING
1992PACKAGE_VERSION
1993PACKAGE_TARNAME
1994PACKAGE_NAME
1995PATH_SEPARATOR
1996SHELL
1997am__quote'
1998ac_subst_files=''
1999ac_user_opts='
2000enable_option_checking
2001enable_silent_rules
2002enable_dependency_tracking
2003with_libpsl
2004with_ssl
2005with_zlib
2006with_metalink
2007with_cares
2008enable_fuzzing
2009enable_fsanitize_ubsan
2010enable_fsanitize_asan
2011enable_fsanitize_msan
2012enable_opie
2013enable_digest
2014enable_ntlm
2015enable_debug
2016enable_valgrind_tests
2017enable_assert
2018enable_largefile
2019enable_year2038
2020enable_threads
2021with_python_prefix
2022with_python_exec_prefix
2023enable_nls
2024with_gnu_ld
2025enable_rpath
2026with_libiconv_prefix
2027with_libintl_prefix
2028enable_cross_guesses
2029with_linux_crypto
2030with_openssl
2031with_included_libunistring
2032with_libunistring_prefix
2033with_included_regex
2034with_gcov
2035enable_code_coverage
2036enable_manywarnings
2037with_libssl_prefix
2038with_libgnutls_prefix
2039enable_ipv6
2040enable_iri
2041with_libidn
2042with_libuuid
2043enable_pcre2
2044enable_pcre
2045with_gpgme_prefix
2046enable_xattr
2047'
2048      ac_precious_vars='build_alias
2049host_alias
2050target_alias
2051CC
2052CFLAGS
2053LDFLAGS
2054LIBS
2055CPPFLAGS
2056CPP
2057PYTHON
2058PKG_CONFIG
2059PKG_CONFIG_PATH
2060PKG_CONFIG_LIBDIR
2061LIBPSL_CFLAGS
2062LIBPSL_LIBS
2063ZLIB_CFLAGS
2064ZLIB_LIBS
2065OPENSSL_CFLAGS
2066OPENSSL_LIBS
2067GNUTLS_CFLAGS
2068GNUTLS_LIBS
2069UUID_CFLAGS
2070UUID_LIBS
2071PCRE2_CFLAGS
2072PCRE2_LIBS
2073PCRE_CFLAGS
2074PCRE_LIBS
2075CARES_CFLAGS
2076CARES_LIBS
2077METALINK_CFLAGS
2078METALINK_LIBS'
2079
2080
2081# Initialize some variables set by options.
2082ac_init_help=
2083ac_init_version=false
2084ac_unrecognized_opts=
2085ac_unrecognized_sep=
2086# The variables have the same names as the options, with
2087# dashes changed to underlines.
2088cache_file=/dev/null
2089exec_prefix=NONE
2090no_create=
2091no_recursion=
2092prefix=NONE
2093program_prefix=NONE
2094program_suffix=NONE
2095program_transform_name=s,x,x,
2096silent=
2097site=
2098srcdir=
2099verbose=
2100x_includes=NONE
2101x_libraries=NONE
2102
2103# Installation directory options.
2104# These are left unexpanded so users can "make install exec_prefix=/foo"
2105# and all the variables that are supposed to be based on exec_prefix
2106# by default will actually change.
2107# Use braces instead of parens because sh, perl, etc. also accept them.
2108# (The list follows the same order as the GNU Coding Standards.)
2109bindir='${exec_prefix}/bin'
2110sbindir='${exec_prefix}/sbin'
2111libexecdir='${exec_prefix}/libexec'
2112datarootdir='${prefix}/share'
2113datadir='${datarootdir}'
2114sysconfdir='${prefix}/etc'
2115sharedstatedir='${prefix}/com'
2116localstatedir='${prefix}/var'
2117runstatedir='${localstatedir}/run'
2118includedir='${prefix}/include'
2119oldincludedir='/usr/include'
2120docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
2121infodir='${datarootdir}/info'
2122htmldir='${docdir}'
2123dvidir='${docdir}'
2124pdfdir='${docdir}'
2125psdir='${docdir}'
2126libdir='${exec_prefix}/lib'
2127localedir='${datarootdir}/locale'
2128mandir='${datarootdir}/man'
2129
2130ac_prev=
2131ac_dashdash=
2132for ac_option
2133do
2134  # If the previous option needs an argument, assign it.
2135  if test -n "$ac_prev"; then
2136    eval $ac_prev=\$ac_option
2137    ac_prev=
2138    continue
2139  fi
2140
2141  case $ac_option in
2142  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
2143  *=)   ac_optarg= ;;
2144  *)    ac_optarg=yes ;;
2145  esac
2146
2147  case $ac_dashdash$ac_option in
2148  --)
2149    ac_dashdash=yes ;;
2150
2151  -bindir | --bindir | --bindi | --bind | --bin | --bi)
2152    ac_prev=bindir ;;
2153  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
2154    bindir=$ac_optarg ;;
2155
2156  -build | --build | --buil | --bui | --bu)
2157    ac_prev=build_alias ;;
2158  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
2159    build_alias=$ac_optarg ;;
2160
2161  -cache-file | --cache-file | --cache-fil | --cache-fi \
2162  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2163    ac_prev=cache_file ;;
2164  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2165  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2166    cache_file=$ac_optarg ;;
2167
2168  --config-cache | -C)
2169    cache_file=config.cache ;;
2170
2171  -datadir | --datadir | --datadi | --datad)
2172    ac_prev=datadir ;;
2173  -datadir=* | --datadir=* | --datadi=* | --datad=*)
2174    datadir=$ac_optarg ;;
2175
2176  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
2177  | --dataroo | --dataro | --datar)
2178    ac_prev=datarootdir ;;
2179  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
2180  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
2181    datarootdir=$ac_optarg ;;
2182
2183  -disable-* | --disable-*)
2184    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
2185    # Reject names that are not valid shell variable names.
2186    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2187      as_fn_error $? "invalid feature name: \`$ac_useropt'"
2188    ac_useropt_orig=$ac_useropt
2189    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2190    case $ac_user_opts in
2191      *"
2192"enable_$ac_useropt"
2193"*) ;;
2194      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
2195	 ac_unrecognized_sep=', ';;
2196    esac
2197    eval enable_$ac_useropt=no ;;
2198
2199  -docdir | --docdir | --docdi | --doc | --do)
2200    ac_prev=docdir ;;
2201  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
2202    docdir=$ac_optarg ;;
2203
2204  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
2205    ac_prev=dvidir ;;
2206  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
2207    dvidir=$ac_optarg ;;
2208
2209  -enable-* | --enable-*)
2210    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
2211    # Reject names that are not valid shell variable names.
2212    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2213      as_fn_error $? "invalid feature name: \`$ac_useropt'"
2214    ac_useropt_orig=$ac_useropt
2215    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2216    case $ac_user_opts in
2217      *"
2218"enable_$ac_useropt"
2219"*) ;;
2220      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
2221	 ac_unrecognized_sep=', ';;
2222    esac
2223    eval enable_$ac_useropt=\$ac_optarg ;;
2224
2225  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
2226  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
2227  | --exec | --exe | --ex)
2228    ac_prev=exec_prefix ;;
2229  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
2230  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
2231  | --exec=* | --exe=* | --ex=*)
2232    exec_prefix=$ac_optarg ;;
2233
2234  -gas | --gas | --ga | --g)
2235    # Obsolete; use --with-gas.
2236    with_gas=yes ;;
2237
2238  -help | --help | --hel | --he | -h)
2239    ac_init_help=long ;;
2240  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
2241    ac_init_help=recursive ;;
2242  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
2243    ac_init_help=short ;;
2244
2245  -host | --host | --hos | --ho)
2246    ac_prev=host_alias ;;
2247  -host=* | --host=* | --hos=* | --ho=*)
2248    host_alias=$ac_optarg ;;
2249
2250  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
2251    ac_prev=htmldir ;;
2252  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
2253  | --ht=*)
2254    htmldir=$ac_optarg ;;
2255
2256  -includedir | --includedir | --includedi | --included | --include \
2257  | --includ | --inclu | --incl | --inc)
2258    ac_prev=includedir ;;
2259  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
2260  | --includ=* | --inclu=* | --incl=* | --inc=*)
2261    includedir=$ac_optarg ;;
2262
2263  -infodir | --infodir | --infodi | --infod | --info | --inf)
2264    ac_prev=infodir ;;
2265  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
2266    infodir=$ac_optarg ;;
2267
2268  -libdir | --libdir | --libdi | --libd)
2269    ac_prev=libdir ;;
2270  -libdir=* | --libdir=* | --libdi=* | --libd=*)
2271    libdir=$ac_optarg ;;
2272
2273  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
2274  | --libexe | --libex | --libe)
2275    ac_prev=libexecdir ;;
2276  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
2277  | --libexe=* | --libex=* | --libe=*)
2278    libexecdir=$ac_optarg ;;
2279
2280  -localedir | --localedir | --localedi | --localed | --locale)
2281    ac_prev=localedir ;;
2282  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
2283    localedir=$ac_optarg ;;
2284
2285  -localstatedir | --localstatedir | --localstatedi | --localstated \
2286  | --localstate | --localstat | --localsta | --localst | --locals)
2287    ac_prev=localstatedir ;;
2288  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
2289  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
2290    localstatedir=$ac_optarg ;;
2291
2292  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2293    ac_prev=mandir ;;
2294  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2295    mandir=$ac_optarg ;;
2296
2297  -nfp | --nfp | --nf)
2298    # Obsolete; use --without-fp.
2299    with_fp=no ;;
2300
2301  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2302  | --no-cr | --no-c | -n)
2303    no_create=yes ;;
2304
2305  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
2306  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
2307    no_recursion=yes ;;
2308
2309  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
2310  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
2311  | --oldin | --oldi | --old | --ol | --o)
2312    ac_prev=oldincludedir ;;
2313  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
2314  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
2315  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
2316    oldincludedir=$ac_optarg ;;
2317
2318  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2319    ac_prev=prefix ;;
2320  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2321    prefix=$ac_optarg ;;
2322
2323  -program-prefix | --program-prefix | --program-prefi | --program-pref \
2324  | --program-pre | --program-pr | --program-p)
2325    ac_prev=program_prefix ;;
2326  -program-prefix=* | --program-prefix=* | --program-prefi=* \
2327  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2328    program_prefix=$ac_optarg ;;
2329
2330  -program-suffix | --program-suffix | --program-suffi | --program-suff \
2331  | --program-suf | --program-su | --program-s)
2332    ac_prev=program_suffix ;;
2333  -program-suffix=* | --program-suffix=* | --program-suffi=* \
2334  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2335    program_suffix=$ac_optarg ;;
2336
2337  -program-transform-name | --program-transform-name \
2338  | --program-transform-nam | --program-transform-na \
2339  | --program-transform-n | --program-transform- \
2340  | --program-transform | --program-transfor \
2341  | --program-transfo | --program-transf \
2342  | --program-trans | --program-tran \
2343  | --progr-tra | --program-tr | --program-t)
2344    ac_prev=program_transform_name ;;
2345  -program-transform-name=* | --program-transform-name=* \
2346  | --program-transform-nam=* | --program-transform-na=* \
2347  | --program-transform-n=* | --program-transform-=* \
2348  | --program-transform=* | --program-transfor=* \
2349  | --program-transfo=* | --program-transf=* \
2350  | --program-trans=* | --program-tran=* \
2351  | --progr-tra=* | --program-tr=* | --program-t=*)
2352    program_transform_name=$ac_optarg ;;
2353
2354  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2355    ac_prev=pdfdir ;;
2356  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2357    pdfdir=$ac_optarg ;;
2358
2359  -psdir | --psdir | --psdi | --psd | --ps)
2360    ac_prev=psdir ;;
2361  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2362    psdir=$ac_optarg ;;
2363
2364  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2365  | -silent | --silent | --silen | --sile | --sil)
2366    silent=yes ;;
2367
2368  -runstatedir | --runstatedir | --runstatedi | --runstated \
2369  | --runstate | --runstat | --runsta | --runst | --runs \
2370  | --run | --ru | --r)
2371    ac_prev=runstatedir ;;
2372  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
2373  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
2374  | --run=* | --ru=* | --r=*)
2375    runstatedir=$ac_optarg ;;
2376
2377  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2378    ac_prev=sbindir ;;
2379  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2380  | --sbi=* | --sb=*)
2381    sbindir=$ac_optarg ;;
2382
2383  -sharedstatedir | --sharedstatedir | --sharedstatedi \
2384  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2385  | --sharedst | --shareds | --shared | --share | --shar \
2386  | --sha | --sh)
2387    ac_prev=sharedstatedir ;;
2388  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2389  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2390  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2391  | --sha=* | --sh=*)
2392    sharedstatedir=$ac_optarg ;;
2393
2394  -site | --site | --sit)
2395    ac_prev=site ;;
2396  -site=* | --site=* | --sit=*)
2397    site=$ac_optarg ;;
2398
2399  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2400    ac_prev=srcdir ;;
2401  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2402    srcdir=$ac_optarg ;;
2403
2404  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2405  | --syscon | --sysco | --sysc | --sys | --sy)
2406    ac_prev=sysconfdir ;;
2407  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2408  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2409    sysconfdir=$ac_optarg ;;
2410
2411  -target | --target | --targe | --targ | --tar | --ta | --t)
2412    ac_prev=target_alias ;;
2413  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2414    target_alias=$ac_optarg ;;
2415
2416  -v | -verbose | --verbose | --verbos | --verbo | --verb)
2417    verbose=yes ;;
2418
2419  -version | --version | --versio | --versi | --vers | -V)
2420    ac_init_version=: ;;
2421
2422  -with-* | --with-*)
2423    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2424    # Reject names that are not valid shell variable names.
2425    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2426      as_fn_error $? "invalid package name: \`$ac_useropt'"
2427    ac_useropt_orig=$ac_useropt
2428    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2429    case $ac_user_opts in
2430      *"
2431"with_$ac_useropt"
2432"*) ;;
2433      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2434	 ac_unrecognized_sep=', ';;
2435    esac
2436    eval with_$ac_useropt=\$ac_optarg ;;
2437
2438  -without-* | --without-*)
2439    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2440    # Reject names that are not valid shell variable names.
2441    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2442      as_fn_error $? "invalid package name: \`$ac_useropt'"
2443    ac_useropt_orig=$ac_useropt
2444    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2445    case $ac_user_opts in
2446      *"
2447"with_$ac_useropt"
2448"*) ;;
2449      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2450	 ac_unrecognized_sep=', ';;
2451    esac
2452    eval with_$ac_useropt=no ;;
2453
2454  --x)
2455    # Obsolete; use --with-x.
2456    with_x=yes ;;
2457
2458  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2459  | --x-incl | --x-inc | --x-in | --x-i)
2460    ac_prev=x_includes ;;
2461  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2462  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2463    x_includes=$ac_optarg ;;
2464
2465  -x-libraries | --x-libraries | --x-librarie | --x-librari \
2466  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2467    ac_prev=x_libraries ;;
2468  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2469  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2470    x_libraries=$ac_optarg ;;
2471
2472  -*) as_fn_error $? "unrecognized option: \`$ac_option'
2473Try \`$0 --help' for more information"
2474    ;;
2475
2476  *=*)
2477    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2478    # Reject names that are not valid shell variable names.
2479    case $ac_envvar in #(
2480      '' | [0-9]* | *[!_$as_cr_alnum]* )
2481      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2482    esac
2483    eval $ac_envvar=\$ac_optarg
2484    export $ac_envvar ;;
2485
2486  *)
2487    # FIXME: should be removed in autoconf 3.0.
2488    printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
2489    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2490      printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
2491    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2492    ;;
2493
2494  esac
2495done
2496
2497if test -n "$ac_prev"; then
2498  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2499  as_fn_error $? "missing argument to $ac_option"
2500fi
2501
2502if test -n "$ac_unrecognized_opts"; then
2503  case $enable_option_checking in
2504    no) ;;
2505    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2506    *)     printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2507  esac
2508fi
2509
2510# Check all directory arguments for consistency.
2511for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
2512		datadir sysconfdir sharedstatedir localstatedir includedir \
2513		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2514		libdir localedir mandir runstatedir
2515do
2516  eval ac_val=\$$ac_var
2517  # Remove trailing slashes.
2518  case $ac_val in
2519    */ )
2520      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2521      eval $ac_var=\$ac_val;;
2522  esac
2523  # Be sure to have absolute directory names.
2524  case $ac_val in
2525    [\\/$]* | ?:[\\/]* )  continue;;
2526    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2527  esac
2528  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2529done
2530
2531# There might be people who depend on the old broken behavior: `$host'
2532# used to hold the argument of --host etc.
2533# FIXME: To remove some day.
2534build=$build_alias
2535host=$host_alias
2536target=$target_alias
2537
2538# FIXME: To remove some day.
2539if test "x$host_alias" != x; then
2540  if test "x$build_alias" = x; then
2541    cross_compiling=maybe
2542  elif test "x$build_alias" != "x$host_alias"; then
2543    cross_compiling=yes
2544  fi
2545fi
2546
2547ac_tool_prefix=
2548test -n "$host_alias" && ac_tool_prefix=$host_alias-
2549
2550test "$silent" = yes && exec 6>/dev/null
2551
2552
2553ac_pwd=`pwd` && test -n "$ac_pwd" &&
2554ac_ls_di=`ls -di .` &&
2555ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2556  as_fn_error $? "working directory cannot be determined"
2557test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2558  as_fn_error $? "pwd does not report name of working directory"
2559
2560
2561# Find the source files, if location was not specified.
2562if test -z "$srcdir"; then
2563  ac_srcdir_defaulted=yes
2564  # Try the directory containing this script, then the parent directory.
2565  ac_confdir=`$as_dirname -- "$as_myself" ||
2566$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2567	 X"$as_myself" : 'X\(//\)[^/]' \| \
2568	 X"$as_myself" : 'X\(//\)$' \| \
2569	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2570printf "%s\n" X"$as_myself" |
2571    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2572	    s//\1/
2573	    q
2574	  }
2575	  /^X\(\/\/\)[^/].*/{
2576	    s//\1/
2577	    q
2578	  }
2579	  /^X\(\/\/\)$/{
2580	    s//\1/
2581	    q
2582	  }
2583	  /^X\(\/\).*/{
2584	    s//\1/
2585	    q
2586	  }
2587	  s/.*/./; q'`
2588  srcdir=$ac_confdir
2589  if test ! -r "$srcdir/$ac_unique_file"; then
2590    srcdir=..
2591  fi
2592else
2593  ac_srcdir_defaulted=no
2594fi
2595if test ! -r "$srcdir/$ac_unique_file"; then
2596  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2597  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2598fi
2599ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2600ac_abs_confdir=`(
2601	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2602	pwd)`
2603# When building in place, set srcdir=.
2604if test "$ac_abs_confdir" = "$ac_pwd"; then
2605  srcdir=.
2606fi
2607# Remove unnecessary trailing slashes from srcdir.
2608# Double slashes in file names in object file debugging info
2609# mess up M-x gdb in Emacs.
2610case $srcdir in
2611*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2612esac
2613for ac_var in $ac_precious_vars; do
2614  eval ac_env_${ac_var}_set=\${${ac_var}+set}
2615  eval ac_env_${ac_var}_value=\$${ac_var}
2616  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2617  eval ac_cv_env_${ac_var}_value=\$${ac_var}
2618done
2619
2620#
2621# Report the --help message.
2622#
2623if test "$ac_init_help" = "long"; then
2624  # Omit some internal or obsolete options to make the list less imposing.
2625  # This message is too long to be a string in the A/UX 3.1 sh.
2626  cat <<_ACEOF
2627\`configure' configures wget 1.21.2 to adapt to many kinds of systems.
2628
2629Usage: $0 [OPTION]... [VAR=VALUE]...
2630
2631To assign environment variables (e.g., CC, CFLAGS...), specify them as
2632VAR=VALUE.  See below for descriptions of some of the useful variables.
2633
2634Defaults for the options are specified in brackets.
2635
2636Configuration:
2637  -h, --help              display this help and exit
2638      --help=short        display options specific to this package
2639      --help=recursive    display the short help of all the included packages
2640  -V, --version           display version information and exit
2641  -q, --quiet, --silent   do not print \`checking ...' messages
2642      --cache-file=FILE   cache test results in FILE [disabled]
2643  -C, --config-cache      alias for \`--cache-file=config.cache'
2644  -n, --no-create         do not create output files
2645      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
2646
2647Installation directories:
2648  --prefix=PREFIX         install architecture-independent files in PREFIX
2649                          [$ac_default_prefix]
2650  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
2651                          [PREFIX]
2652
2653By default, \`make install' will install all the files in
2654\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
2655an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2656for instance \`--prefix=\$HOME'.
2657
2658For better control, use the options below.
2659
2660Fine tuning of the installation directories:
2661  --bindir=DIR            user executables [EPREFIX/bin]
2662  --sbindir=DIR           system admin executables [EPREFIX/sbin]
2663  --libexecdir=DIR        program executables [EPREFIX/libexec]
2664  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
2665  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
2666  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
2667  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
2668  --libdir=DIR            object code libraries [EPREFIX/lib]
2669  --includedir=DIR        C header files [PREFIX/include]
2670  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
2671  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
2672  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
2673  --infodir=DIR           info documentation [DATAROOTDIR/info]
2674  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
2675  --mandir=DIR            man documentation [DATAROOTDIR/man]
2676  --docdir=DIR            documentation root [DATAROOTDIR/doc/wget]
2677  --htmldir=DIR           html documentation [DOCDIR]
2678  --dvidir=DIR            dvi documentation [DOCDIR]
2679  --pdfdir=DIR            pdf documentation [DOCDIR]
2680  --psdir=DIR             ps documentation [DOCDIR]
2681_ACEOF
2682
2683  cat <<\_ACEOF
2684
2685Program names:
2686  --program-prefix=PREFIX            prepend PREFIX to installed program names
2687  --program-suffix=SUFFIX            append SUFFIX to installed program names
2688  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
2689
2690System types:
2691  --build=BUILD     configure for building on BUILD [guessed]
2692  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
2693_ACEOF
2694fi
2695
2696if test -n "$ac_init_help"; then
2697  case $ac_init_help in
2698     short | recursive ) echo "Configuration of wget 1.21.2:";;
2699   esac
2700  cat <<\_ACEOF
2701
2702Optional Features:
2703  --disable-option-checking  ignore unrecognized --enable/--with options
2704  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
2705  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
2706  --enable-silent-rules   less verbose build output (undo: "make V=1")
2707  --disable-silent-rules  verbose build output (undo: "make V=0")
2708  --enable-dependency-tracking
2709                          do not reject slow dependency extractors
2710  --disable-dependency-tracking
2711                          speeds up one-time build
2712  --enable-fuzzing        Turn on fuzzing build (for developers)
2713  --enable-fsanitize-ubsan
2714                          Turn on Undefined Behavior Sanitizer (for
2715                          developers)
2716  --enable-fsanitize-asan Turn on Address Sanitizer (for developers) (mutually
2717                          exclusive with Memory/Thread sanitizer or Valgrind
2718                          tests)
2719  --enable-fsanitize-msan Turn on Memory Sanitizer (for developers) (mutually
2720                          exclusive with Address/Thread sanitizer or Valgrind
2721                          tests)
2722  --disable-opie          disable support for opie or s/key FTP login
2723  --disable-digest        disable support for HTTP digest authorization
2724  --disable-ntlm          disable support for NTLM authorization
2725  --disable-debug         disable support for debugging output
2726  --enable-valgrind-tests enable using Valgrind for tests
2727  --enable-assert         enable assertions in code base
2728  --disable-largefile     omit support for large files
2729  --disable-year2038      omit support for timestamps past the year 2038
2730  --enable-threads={isoc|posix|isoc+posix|windows}
2731                          specify multithreading API
2732  --disable-threads       build without multithread safety
2733  --disable-nls           do not use Native Language Support
2734  --disable-rpath         do not hardcode runtime library paths
2735  --enable-cross-guesses={conservative|risky}
2736                          specify policy for cross-compilation guesses
2737  --enable-code-coverage  Whether to enable code coverage support
2738  --enable-manywarnings   Turn on extra compiler warnings (for developers)
2739  --disable-ipv6          disable IPv6 support
2740  --disable-iri           disable IDN/IRIs support
2741  --disable-pcre2         Disable PCRE2 style regular expressions
2742  --disable-pcre          Disable PCRE style regular expressions
2743  --disable-xattr         disable support for POSIX Extended Attributes
2744
2745Optional Packages:
2746  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2747  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2748  --without-libpsl        disable support for libpsl cookie checking.
2749  --with-ssl={gnutls,openssl,no}
2750                          specify SSL backend. GNU TLS is the default.
2751  --without-zlib          disable zlib.
2752  --with-metalink         enable support for metalinks.
2753  --with-cares            enable support for C-Ares DNS lookup.
2754  --with-python_prefix    override the default PYTHON_PREFIX
2755  --with-python_exec_prefix
2756                          override the default PYTHON_EXEC_PREFIX
2757  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
2758  --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
2759  --without-libiconv-prefix     don't search for libiconv in includedir and libdir
2760  --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
2761  --without-libintl-prefix     don't search for libintl in includedir and libdir
2762  --with-linux-crypto     use Linux kernel cryptographic API (if available)
2763  --with-openssl          use libcrypto hash routines. Valid ARGs are: 'yes',
2764                          'no', 'auto' => use if any version available,
2765                          'auto-gpl-compat' => use if gpl compatible version
2766                          available, 'optional' => use if available and warn
2767                          if not available; default is 'no'. Note also
2768                          --with-linux-crypto, which will enable use of kernel
2769                          crypto routines, which have precedence
2770  --with-included-libunistring  use the libunistring parts included here
2771  --with-libunistring-prefix[=DIR]  search for libunistring in DIR/include and DIR/lib
2772  --without-libunistring-prefix     don't search for libunistring in includedir and libdir
2773  --without-included-regex
2774                          don't compile regex; this is the default on systems
2775                          with recent-enough versions of the GNU C Library
2776                          (use with caution on other systems).
2777  --with-gcov=GCOV        use given GCOV for coverage (GCOV=gcov).
2778  --with-libssl-prefix[=DIR]  search for libssl in DIR/include and DIR/lib
2779  --without-libssl-prefix     don't search for libssl in includedir and libdir
2780  --with-libgnutls-prefix[=DIR]  search for libgnutls in DIR/include and DIR/lib
2781  --without-libgnutls-prefix     don't search for libgnutls in includedir and libdir
2782  --with-libidn=DIR       Support IDN2008/IRIs (needs GNU libidn2 +
2783                          libunicode)
2784  --without-libuuid       Generate UUIDs for WARC files via libuuid
2785  --with-gpgme-prefix=PFX prefix where GPGME is installed (optional)
2786
2787Some influential environment variables:
2788  CC          C compiler command
2789  CFLAGS      C compiler flags
2790  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2791              nonstandard directory <lib dir>
2792  LIBS        libraries to pass to the linker, e.g. -l<library>
2793  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2794              you have headers in a nonstandard directory <include dir>
2795  CPP         C preprocessor
2796  PYTHON      the Python interpreter
2797  PKG_CONFIG  path to pkg-config utility
2798  PKG_CONFIG_PATH
2799              directories to add to pkg-config's search path
2800  PKG_CONFIG_LIBDIR
2801              path overriding pkg-config's built-in search path
2802  LIBPSL_CFLAGS
2803              C compiler flags for LIBPSL, overriding pkg-config
2804  LIBPSL_LIBS linker flags for LIBPSL, overriding pkg-config
2805  ZLIB_CFLAGS C compiler flags for ZLIB, overriding pkg-config
2806  ZLIB_LIBS   linker flags for ZLIB, overriding pkg-config
2807  OPENSSL_CFLAGS
2808              C compiler flags for OPENSSL, overriding pkg-config
2809  OPENSSL_LIBS
2810              linker flags for OPENSSL, overriding pkg-config
2811  GNUTLS_CFLAGS
2812              C compiler flags for GNUTLS, overriding pkg-config
2813  GNUTLS_LIBS linker flags for GNUTLS, overriding pkg-config
2814  UUID_CFLAGS C compiler flags for UUID, overriding pkg-config
2815  UUID_LIBS   linker flags for UUID, overriding pkg-config
2816  PCRE2_CFLAGS
2817              C compiler flags for PCRE2, overriding pkg-config
2818  PCRE2_LIBS  linker flags for PCRE2, overriding pkg-config
2819  PCRE_CFLAGS C compiler flags for PCRE, overriding pkg-config
2820  PCRE_LIBS   linker flags for PCRE, overriding pkg-config
2821  CARES_CFLAGS
2822              C compiler flags for CARES, overriding pkg-config
2823  CARES_LIBS  linker flags for CARES, overriding pkg-config
2824  METALINK_CFLAGS
2825              C compiler flags for METALINK, overriding pkg-config
2826  METALINK_LIBS
2827              linker flags for METALINK, overriding pkg-config
2828
2829Use these variables to override the choices made by `configure' or to help
2830it to find libraries and programs with nonstandard names/locations.
2831
2832Report bugs to <bug-wget@gnu.org>.
2833_ACEOF
2834ac_status=$?
2835fi
2836
2837if test "$ac_init_help" = "recursive"; then
2838  # If there are subdirs, report their specific --help.
2839  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2840    test -d "$ac_dir" ||
2841      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2842      continue
2843    ac_builddir=.
2844
2845case "$ac_dir" in
2846.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2847*)
2848  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
2849  # A ".." for each directory in $ac_dir_suffix.
2850  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2851  case $ac_top_builddir_sub in
2852  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2853  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2854  esac ;;
2855esac
2856ac_abs_top_builddir=$ac_pwd
2857ac_abs_builddir=$ac_pwd$ac_dir_suffix
2858# for backward compatibility:
2859ac_top_builddir=$ac_top_build_prefix
2860
2861case $srcdir in
2862  .)  # We are building in place.
2863    ac_srcdir=.
2864    ac_top_srcdir=$ac_top_builddir_sub
2865    ac_abs_top_srcdir=$ac_pwd ;;
2866  [\\/]* | ?:[\\/]* )  # Absolute name.
2867    ac_srcdir=$srcdir$ac_dir_suffix;
2868    ac_top_srcdir=$srcdir
2869    ac_abs_top_srcdir=$srcdir ;;
2870  *) # Relative name.
2871    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2872    ac_top_srcdir=$ac_top_build_prefix$srcdir
2873    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2874esac
2875ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2876
2877    cd "$ac_dir" || { ac_status=$?; continue; }
2878    # Check for configure.gnu first; this name is used for a wrapper for
2879    # Metaconfig's "Configure" on case-insensitive file systems.
2880    if test -f "$ac_srcdir/configure.gnu"; then
2881      echo &&
2882      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2883    elif test -f "$ac_srcdir/configure"; then
2884      echo &&
2885      $SHELL "$ac_srcdir/configure" --help=recursive
2886    else
2887      printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2888    fi || ac_status=$?
2889    cd "$ac_pwd" || { ac_status=$?; break; }
2890  done
2891fi
2892
2893test -n "$ac_init_help" && exit $ac_status
2894if $ac_init_version; then
2895  cat <<\_ACEOF
2896wget configure 1.21.2
2897generated by GNU Autoconf 2.71
2898
2899Copyright (C) 2021 Free Software Foundation, Inc.
2900This configure script is free software; the Free Software Foundation
2901gives unlimited permission to copy, distribute and modify it.
2902_ACEOF
2903  exit
2904fi
2905
2906## ------------------------ ##
2907## Autoconf initialization. ##
2908## ------------------------ ##
2909
2910# ac_fn_c_try_compile LINENO
2911# --------------------------
2912# Try to compile conftest.$ac_ext, and return whether this succeeded.
2913ac_fn_c_try_compile ()
2914{
2915  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2916  rm -f conftest.$ac_objext conftest.beam
2917  if { { ac_try="$ac_compile"
2918case "(($ac_try" in
2919  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2920  *) ac_try_echo=$ac_try;;
2921esac
2922eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2923printf "%s\n" "$ac_try_echo"; } >&5
2924  (eval "$ac_compile") 2>conftest.err
2925  ac_status=$?
2926  if test -s conftest.err; then
2927    grep -v '^ *+' conftest.err >conftest.er1
2928    cat conftest.er1 >&5
2929    mv -f conftest.er1 conftest.err
2930  fi
2931  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2932  test $ac_status = 0; } && {
2933	 test -z "$ac_c_werror_flag" ||
2934	 test ! -s conftest.err
2935       } && test -s conftest.$ac_objext
2936then :
2937  ac_retval=0
2938else $as_nop
2939  printf "%s\n" "$as_me: failed program was:" >&5
2940sed 's/^/| /' conftest.$ac_ext >&5
2941
2942	ac_retval=1
2943fi
2944  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2945  as_fn_set_status $ac_retval
2946
2947} # ac_fn_c_try_compile
2948
2949# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2950# -------------------------------------------------------
2951# Tests whether HEADER exists and can be compiled using the include files in
2952# INCLUDES, setting the cache variable VAR accordingly.
2953ac_fn_c_check_header_compile ()
2954{
2955  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2956  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2957printf %s "checking for $2... " >&6; }
2958if eval test \${$3+y}
2959then :
2960  printf %s "(cached) " >&6
2961else $as_nop
2962  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2963/* end confdefs.h.  */
2964$4
2965#include <$2>
2966_ACEOF
2967if ac_fn_c_try_compile "$LINENO"
2968then :
2969  eval "$3=yes"
2970else $as_nop
2971  eval "$3=no"
2972fi
2973rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2974fi
2975eval ac_res=\$$3
2976	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2977printf "%s\n" "$ac_res" >&6; }
2978  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2979
2980} # ac_fn_c_check_header_compile
2981
2982# ac_fn_c_try_link LINENO
2983# -----------------------
2984# Try to link conftest.$ac_ext, and return whether this succeeded.
2985ac_fn_c_try_link ()
2986{
2987  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2988  rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
2989  if { { ac_try="$ac_link"
2990case "(($ac_try" in
2991  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2992  *) ac_try_echo=$ac_try;;
2993esac
2994eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2995printf "%s\n" "$ac_try_echo"; } >&5
2996  (eval "$ac_link") 2>conftest.err
2997  ac_status=$?
2998  if test -s conftest.err; then
2999    grep -v '^ *+' conftest.err >conftest.er1
3000    cat conftest.er1 >&5
3001    mv -f conftest.er1 conftest.err
3002  fi
3003  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3004  test $ac_status = 0; } && {
3005	 test -z "$ac_c_werror_flag" ||
3006	 test ! -s conftest.err
3007       } && test -s conftest$ac_exeext && {
3008	 test "$cross_compiling" = yes ||
3009	 test -x conftest$ac_exeext
3010       }
3011then :
3012  ac_retval=0
3013else $as_nop
3014  printf "%s\n" "$as_me: failed program was:" >&5
3015sed 's/^/| /' conftest.$ac_ext >&5
3016
3017	ac_retval=1
3018fi
3019  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
3020  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
3021  # interfere with the next link command; also delete a directory that is
3022  # left behind by Apple's compiler.  We do this before executing the actions.
3023  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
3024  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3025  as_fn_set_status $ac_retval
3026
3027} # ac_fn_c_try_link
3028
3029# ac_fn_c_try_cpp LINENO
3030# ----------------------
3031# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
3032ac_fn_c_try_cpp ()
3033{
3034  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3035  if { { ac_try="$ac_cpp conftest.$ac_ext"
3036case "(($ac_try" in
3037  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3038  *) ac_try_echo=$ac_try;;
3039esac
3040eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3041printf "%s\n" "$ac_try_echo"; } >&5
3042  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
3043  ac_status=$?
3044  if test -s conftest.err; then
3045    grep -v '^ *+' conftest.err >conftest.er1
3046    cat conftest.er1 >&5
3047    mv -f conftest.er1 conftest.err
3048  fi
3049  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3050  test $ac_status = 0; } > conftest.i && {
3051	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3052	 test ! -s conftest.err
3053       }
3054then :
3055  ac_retval=0
3056else $as_nop
3057  printf "%s\n" "$as_me: failed program was:" >&5
3058sed 's/^/| /' conftest.$ac_ext >&5
3059
3060    ac_retval=1
3061fi
3062  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3063  as_fn_set_status $ac_retval
3064
3065} # ac_fn_c_try_cpp
3066
3067# ac_fn_c_try_run LINENO
3068# ----------------------
3069# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
3070# executables *can* be run.
3071ac_fn_c_try_run ()
3072{
3073  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3074  if { { ac_try="$ac_link"
3075case "(($ac_try" in
3076  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3077  *) ac_try_echo=$ac_try;;
3078esac
3079eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3080printf "%s\n" "$ac_try_echo"; } >&5
3081  (eval "$ac_link") 2>&5
3082  ac_status=$?
3083  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3084  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
3085  { { case "(($ac_try" in
3086  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3087  *) ac_try_echo=$ac_try;;
3088esac
3089eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3090printf "%s\n" "$ac_try_echo"; } >&5
3091  (eval "$ac_try") 2>&5
3092  ac_status=$?
3093  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3094  test $ac_status = 0; }; }
3095then :
3096  ac_retval=0
3097else $as_nop
3098  printf "%s\n" "$as_me: program exited with status $ac_status" >&5
3099       printf "%s\n" "$as_me: failed program was:" >&5
3100sed 's/^/| /' conftest.$ac_ext >&5
3101
3102       ac_retval=$ac_status
3103fi
3104  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
3105  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3106  as_fn_set_status $ac_retval
3107
3108} # ac_fn_c_try_run
3109
3110# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
3111# --------------------------------------------
3112# Tries to find the compile-time value of EXPR in a program that includes
3113# INCLUDES, setting VAR accordingly. Returns whether the value could be
3114# computed
3115ac_fn_c_compute_int ()
3116{
3117  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3118  if test "$cross_compiling" = yes; then
3119    # Depending upon the size, compute the lo and hi bounds.
3120cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3121/* end confdefs.h.  */
3122$4
3123int
3124main (void)
3125{
3126static int test_array [1 - 2 * !(($2) >= 0)];
3127test_array [0] = 0;
3128return test_array [0];
3129
3130  ;
3131  return 0;
3132}
3133_ACEOF
3134if ac_fn_c_try_compile "$LINENO"
3135then :
3136  ac_lo=0 ac_mid=0
3137  while :; do
3138    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3139/* end confdefs.h.  */
3140$4
3141int
3142main (void)
3143{
3144static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3145test_array [0] = 0;
3146return test_array [0];
3147
3148  ;
3149  return 0;
3150}
3151_ACEOF
3152if ac_fn_c_try_compile "$LINENO"
3153then :
3154  ac_hi=$ac_mid; break
3155else $as_nop
3156  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
3157			if test $ac_lo -le $ac_mid; then
3158			  ac_lo= ac_hi=
3159			  break
3160			fi
3161			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
3162fi
3163rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3164  done
3165else $as_nop
3166  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3167/* end confdefs.h.  */
3168$4
3169int
3170main (void)
3171{
3172static int test_array [1 - 2 * !(($2) < 0)];
3173test_array [0] = 0;
3174return test_array [0];
3175
3176  ;
3177  return 0;
3178}
3179_ACEOF
3180if ac_fn_c_try_compile "$LINENO"
3181then :
3182  ac_hi=-1 ac_mid=-1
3183  while :; do
3184    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185/* end confdefs.h.  */
3186$4
3187int
3188main (void)
3189{
3190static int test_array [1 - 2 * !(($2) >= $ac_mid)];
3191test_array [0] = 0;
3192return test_array [0];
3193
3194  ;
3195  return 0;
3196}
3197_ACEOF
3198if ac_fn_c_try_compile "$LINENO"
3199then :
3200  ac_lo=$ac_mid; break
3201else $as_nop
3202  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
3203			if test $ac_mid -le $ac_hi; then
3204			  ac_lo= ac_hi=
3205			  break
3206			fi
3207			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
3208fi
3209rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3210  done
3211else $as_nop
3212  ac_lo= ac_hi=
3213fi
3214rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3215fi
3216rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3217# Binary search between lo and hi bounds.
3218while test "x$ac_lo" != "x$ac_hi"; do
3219  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3220  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3221/* end confdefs.h.  */
3222$4
3223int
3224main (void)
3225{
3226static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3227test_array [0] = 0;
3228return test_array [0];
3229
3230  ;
3231  return 0;
3232}
3233_ACEOF
3234if ac_fn_c_try_compile "$LINENO"
3235then :
3236  ac_hi=$ac_mid
3237else $as_nop
3238  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3239fi
3240rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3241done
3242case $ac_lo in #((
3243?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3244'') ac_retval=1 ;;
3245esac
3246  else
3247    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3248/* end confdefs.h.  */
3249$4
3250static long int longval (void) { return $2; }
3251static unsigned long int ulongval (void) { return $2; }
3252#include <stdio.h>
3253#include <stdlib.h>
3254int
3255main (void)
3256{
3257
3258  FILE *f = fopen ("conftest.val", "w");
3259  if (! f)
3260    return 1;
3261  if (($2) < 0)
3262    {
3263      long int i = longval ();
3264      if (i != ($2))
3265	return 1;
3266      fprintf (f, "%ld", i);
3267    }
3268  else
3269    {
3270      unsigned long int i = ulongval ();
3271      if (i != ($2))
3272	return 1;
3273      fprintf (f, "%lu", i);
3274    }
3275  /* Do not output a trailing newline, as this causes \r\n confusion
3276     on some platforms.  */
3277  return ferror (f) || fclose (f) != 0;
3278
3279  ;
3280  return 0;
3281}
3282_ACEOF
3283if ac_fn_c_try_run "$LINENO"
3284then :
3285  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3286else $as_nop
3287  ac_retval=1
3288fi
3289rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3290  conftest.$ac_objext conftest.beam conftest.$ac_ext
3291rm -f conftest.val
3292
3293  fi
3294  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3295  as_fn_set_status $ac_retval
3296
3297} # ac_fn_c_compute_int
3298
3299# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
3300# -------------------------------------------
3301# Tests whether TYPE exists after having included INCLUDES, setting cache
3302# variable VAR accordingly.
3303ac_fn_c_check_type ()
3304{
3305  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3306  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3307printf %s "checking for $2... " >&6; }
3308if eval test \${$3+y}
3309then :
3310  printf %s "(cached) " >&6
3311else $as_nop
3312  eval "$3=no"
3313  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3314/* end confdefs.h.  */
3315$4
3316int
3317main (void)
3318{
3319if (sizeof ($2))
3320	 return 0;
3321  ;
3322  return 0;
3323}
3324_ACEOF
3325if ac_fn_c_try_compile "$LINENO"
3326then :
3327  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3328/* end confdefs.h.  */
3329$4
3330int
3331main (void)
3332{
3333if (sizeof (($2)))
3334	    return 0;
3335  ;
3336  return 0;
3337}
3338_ACEOF
3339if ac_fn_c_try_compile "$LINENO"
3340then :
3341
3342else $as_nop
3343  eval "$3=yes"
3344fi
3345rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3346fi
3347rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3348fi
3349eval ac_res=\$$3
3350	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3351printf "%s\n" "$ac_res" >&6; }
3352  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3353
3354} # ac_fn_c_check_type
3355
3356# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
3357# ------------------------------------------------------------------
3358# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
3359# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
3360ac_fn_check_decl ()
3361{
3362  ac_save_ac_compile="$ac_compile"
3363  if test -n "$ac_compile_for_check_decl"; then
3364    ac_compile="$ac_compile_for_check_decl"
3365  fi
3366  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3367  as_decl_name=`echo $2|sed 's/ *(.*//'`
3368  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
3369printf %s "checking whether $as_decl_name is declared... " >&6; }
3370if eval test \${$3+y}
3371then :
3372  printf %s "(cached) " >&6
3373else $as_nop
3374  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
3375  eval ac_save_FLAGS=\$$6
3376  as_fn_append $6 " $5"
3377  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3378/* end confdefs.h.  */
3379$4
3380int
3381main (void)
3382{
3383#ifndef $as_decl_name
3384#ifdef __cplusplus
3385  (void) $as_decl_use;
3386#else
3387  (void) $as_decl_name;
3388#endif
3389#endif
3390
3391  ;
3392  return 0;
3393}
3394_ACEOF
3395if ac_fn_c_try_compile "$LINENO"
3396then :
3397  eval "$3=yes"
3398else $as_nop
3399  eval "$3=no"
3400fi
3401rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3402  eval $6=\$ac_save_FLAGS
3403
3404fi
3405eval ac_res=\$$3
3406	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3407printf "%s\n" "$ac_res" >&6; }
3408  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3409  ac_compile="$ac_save_ac_compile"
3410
3411} # ac_fn_check_decl
3412
3413# ac_fn_c_check_func LINENO FUNC VAR
3414# ----------------------------------
3415# Tests whether FUNC exists, setting the cache variable VAR accordingly
3416ac_fn_c_check_func ()
3417{
3418  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3419  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3420printf %s "checking for $2... " >&6; }
3421if eval test \${$3+y}
3422then :
3423  printf %s "(cached) " >&6
3424else $as_nop
3425  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3426/* end confdefs.h.  */
3427/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3428   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3429#define $2 innocuous_$2
3430
3431/* System header to define __stub macros and hopefully few prototypes,
3432   which can conflict with char $2 (); below.  */
3433
3434#include <limits.h>
3435#undef $2
3436
3437/* Override any GCC internal prototype to avoid an error.
3438   Use char because int might match the return type of a GCC
3439   builtin and then its argument prototype would still apply.  */
3440#ifdef __cplusplus
3441extern "C"
3442#endif
3443char $2 ();
3444/* The GNU C library defines this for functions which it implements
3445    to always fail with ENOSYS.  Some functions are actually named
3446    something starting with __ and the normal name is an alias.  */
3447#if defined __stub_$2 || defined __stub___$2
3448choke me
3449#endif
3450
3451int
3452main (void)
3453{
3454return $2 ();
3455  ;
3456  return 0;
3457}
3458_ACEOF
3459if ac_fn_c_try_link "$LINENO"
3460then :
3461  eval "$3=yes"
3462else $as_nop
3463  eval "$3=no"
3464fi
3465rm -f core conftest.err conftest.$ac_objext conftest.beam \
3466    conftest$ac_exeext conftest.$ac_ext
3467fi
3468eval ac_res=\$$3
3469	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3470printf "%s\n" "$ac_res" >&6; }
3471  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3472
3473} # ac_fn_c_check_func
3474
3475# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3476# ----------------------------------------------------
3477# Tries to find if the field MEMBER exists in type AGGR, after including
3478# INCLUDES, setting cache variable VAR accordingly.
3479ac_fn_c_check_member ()
3480{
3481  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3482  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3483printf %s "checking for $2.$3... " >&6; }
3484if eval test \${$4+y}
3485then :
3486  printf %s "(cached) " >&6
3487else $as_nop
3488  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3489/* end confdefs.h.  */
3490$5
3491int
3492main (void)
3493{
3494static $2 ac_aggr;
3495if (ac_aggr.$3)
3496return 0;
3497  ;
3498  return 0;
3499}
3500_ACEOF
3501if ac_fn_c_try_compile "$LINENO"
3502then :
3503  eval "$4=yes"
3504else $as_nop
3505  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3506/* end confdefs.h.  */
3507$5
3508int
3509main (void)
3510{
3511static $2 ac_aggr;
3512if (sizeof ac_aggr.$3)
3513return 0;
3514  ;
3515  return 0;
3516}
3517_ACEOF
3518if ac_fn_c_try_compile "$LINENO"
3519then :
3520  eval "$4=yes"
3521else $as_nop
3522  eval "$4=no"
3523fi
3524rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3525fi
3526rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3527fi
3528eval ac_res=\$$4
3529	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3530printf "%s\n" "$ac_res" >&6; }
3531  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3532
3533} # ac_fn_c_check_member
3534ac_configure_args_raw=
3535for ac_arg
3536do
3537  case $ac_arg in
3538  *\'*)
3539    ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3540  esac
3541  as_fn_append ac_configure_args_raw " '$ac_arg'"
3542done
3543
3544case $ac_configure_args_raw in
3545  *$as_nl*)
3546    ac_safe_unquote= ;;
3547  *)
3548    ac_unsafe_z='|&;<>()$`\\"*?[ ''	' # This string ends in space, tab.
3549    ac_unsafe_a="$ac_unsafe_z#~"
3550    ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
3551    ac_configure_args_raw=`      printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
3552esac
3553
3554cat >config.log <<_ACEOF
3555This file contains any messages produced by compilers while
3556running configure, to aid debugging if configure makes a mistake.
3557
3558It was created by wget $as_me 1.21.2, which was
3559generated by GNU Autoconf 2.71.  Invocation command line was
3560
3561  $ $0$ac_configure_args_raw
3562
3563_ACEOF
3564exec 5>>config.log
3565{
3566cat <<_ASUNAME
3567## --------- ##
3568## Platform. ##
3569## --------- ##
3570
3571hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3572uname -m = `(uname -m) 2>/dev/null || echo unknown`
3573uname -r = `(uname -r) 2>/dev/null || echo unknown`
3574uname -s = `(uname -s) 2>/dev/null || echo unknown`
3575uname -v = `(uname -v) 2>/dev/null || echo unknown`
3576
3577/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3578/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3579
3580/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3581/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3582/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3583/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3584/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3585/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3586/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3587
3588_ASUNAME
3589
3590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3591for as_dir in $PATH
3592do
3593  IFS=$as_save_IFS
3594  case $as_dir in #(((
3595    '') as_dir=./ ;;
3596    */) ;;
3597    *) as_dir=$as_dir/ ;;
3598  esac
3599    printf "%s\n" "PATH: $as_dir"
3600  done
3601IFS=$as_save_IFS
3602
3603} >&5
3604
3605cat >&5 <<_ACEOF
3606
3607
3608## ----------- ##
3609## Core tests. ##
3610## ----------- ##
3611
3612_ACEOF
3613
3614
3615# Keep a trace of the command line.
3616# Strip out --no-create and --no-recursion so they do not pile up.
3617# Strip out --silent because we don't want to record it for future runs.
3618# Also quote any args containing shell meta-characters.
3619# Make two passes to allow for proper duplicate-argument suppression.
3620ac_configure_args=
3621ac_configure_args0=
3622ac_configure_args1=
3623ac_must_keep_next=false
3624for ac_pass in 1 2
3625do
3626  for ac_arg
3627  do
3628    case $ac_arg in
3629    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3630    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3631    | -silent | --silent | --silen | --sile | --sil)
3632      continue ;;
3633    *\'*)
3634      ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3635    esac
3636    case $ac_pass in
3637    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3638    2)
3639      as_fn_append ac_configure_args1 " '$ac_arg'"
3640      if test $ac_must_keep_next = true; then
3641	ac_must_keep_next=false # Got value, back to normal.
3642      else
3643	case $ac_arg in
3644	  *=* | --config-cache | -C | -disable-* | --disable-* \
3645	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3646	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3647	  | -with-* | --with-* | -without-* | --without-* | --x)
3648	    case "$ac_configure_args0 " in
3649	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3650	    esac
3651	    ;;
3652	  -* ) ac_must_keep_next=true ;;
3653	esac
3654      fi
3655      as_fn_append ac_configure_args " '$ac_arg'"
3656      ;;
3657    esac
3658  done
3659done
3660{ ac_configure_args0=; unset ac_configure_args0;}
3661{ ac_configure_args1=; unset ac_configure_args1;}
3662
3663# When interrupted or exit'd, cleanup temporary files, and complete
3664# config.log.  We remove comments because anyway the quotes in there
3665# would cause problems or look ugly.
3666# WARNING: Use '\'' to represent an apostrophe within the trap.
3667# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3668trap 'exit_status=$?
3669  # Sanitize IFS.
3670  IFS=" ""	$as_nl"
3671  # Save into config.log some information that might help in debugging.
3672  {
3673    echo
3674
3675    printf "%s\n" "## ---------------- ##
3676## Cache variables. ##
3677## ---------------- ##"
3678    echo
3679    # The following way of writing the cache mishandles newlines in values,
3680(
3681  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3682    eval ac_val=\$$ac_var
3683    case $ac_val in #(
3684    *${as_nl}*)
3685      case $ac_var in #(
3686      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3687printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3688      esac
3689      case $ac_var in #(
3690      _ | IFS | as_nl) ;; #(
3691      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3692      *) { eval $ac_var=; unset $ac_var;} ;;
3693      esac ;;
3694    esac
3695  done
3696  (set) 2>&1 |
3697    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3698    *${as_nl}ac_space=\ *)
3699      sed -n \
3700	"s/'\''/'\''\\\\'\'''\''/g;
3701	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3702      ;; #(
3703    *)
3704      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3705      ;;
3706    esac |
3707    sort
3708)
3709    echo
3710
3711    printf "%s\n" "## ----------------- ##
3712## Output variables. ##
3713## ----------------- ##"
3714    echo
3715    for ac_var in $ac_subst_vars
3716    do
3717      eval ac_val=\$$ac_var
3718      case $ac_val in
3719      *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3720      esac
3721      printf "%s\n" "$ac_var='\''$ac_val'\''"
3722    done | sort
3723    echo
3724
3725    if test -n "$ac_subst_files"; then
3726      printf "%s\n" "## ------------------- ##
3727## File substitutions. ##
3728## ------------------- ##"
3729      echo
3730      for ac_var in $ac_subst_files
3731      do
3732	eval ac_val=\$$ac_var
3733	case $ac_val in
3734	*\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3735	esac
3736	printf "%s\n" "$ac_var='\''$ac_val'\''"
3737      done | sort
3738      echo
3739    fi
3740
3741    if test -s confdefs.h; then
3742      printf "%s\n" "## ----------- ##
3743## confdefs.h. ##
3744## ----------- ##"
3745      echo
3746      cat confdefs.h
3747      echo
3748    fi
3749    test "$ac_signal" != 0 &&
3750      printf "%s\n" "$as_me: caught signal $ac_signal"
3751    printf "%s\n" "$as_me: exit $exit_status"
3752  } >&5
3753  rm -f core *.core core.conftest.* &&
3754    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3755    exit $exit_status
3756' 0
3757for ac_signal in 1 2 13 15; do
3758  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3759done
3760ac_signal=0
3761
3762# confdefs.h avoids OS command line length limits that DEFS can exceed.
3763rm -f -r conftest* confdefs.h
3764
3765printf "%s\n" "/* confdefs.h */" > confdefs.h
3766
3767# Predefined preprocessor variables.
3768
3769printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
3770
3771printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
3772
3773printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
3774
3775printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
3776
3777printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
3778
3779printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
3780
3781
3782# Let the site file select an alternate cache file if it wants to.
3783# Prefer an explicitly selected file to automatically selected ones.
3784if test -n "$CONFIG_SITE"; then
3785  ac_site_files="$CONFIG_SITE"
3786elif test "x$prefix" != xNONE; then
3787  ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
3788else
3789  ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
3790fi
3791
3792for ac_site_file in $ac_site_files
3793do
3794  case $ac_site_file in #(
3795  */*) :
3796     ;; #(
3797  *) :
3798    ac_site_file=./$ac_site_file ;;
3799esac
3800  if test -f "$ac_site_file" && test -r "$ac_site_file"; then
3801    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3802printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
3803    sed 's/^/| /' "$ac_site_file" >&5
3804    . "$ac_site_file" \
3805      || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3806printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3807as_fn_error $? "failed to load site script $ac_site_file
3808See \`config.log' for more details" "$LINENO" 5; }
3809  fi
3810done
3811
3812if test -r "$cache_file"; then
3813  # Some versions of bash will fail to source /dev/null (special files
3814  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3815  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3816    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3817printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
3818    case $cache_file in
3819      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3820      *)                      . "./$cache_file";;
3821    esac
3822  fi
3823else
3824  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3825printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
3826  >$cache_file
3827fi
3828
3829as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
3830# Test code for whether the C compiler supports C89 (global declarations)
3831ac_c_conftest_c89_globals='
3832/* Does the compiler advertise C89 conformance?
3833   Do not test the value of __STDC__, because some compilers set it to 0
3834   while being otherwise adequately conformant. */
3835#if !defined __STDC__
3836# error "Compiler does not advertise C89 conformance"
3837#endif
3838
3839#include <stddef.h>
3840#include <stdarg.h>
3841struct stat;
3842/* Most of the following tests are stolen from RCS 5.7 src/conf.sh.  */
3843struct buf { int x; };
3844struct buf * (*rcsopen) (struct buf *, struct stat *, int);
3845static char *e (p, i)
3846     char **p;
3847     int i;
3848{
3849  return p[i];
3850}
3851static char *f (char * (*g) (char **, int), char **p, ...)
3852{
3853  char *s;
3854  va_list v;
3855  va_start (v,p);
3856  s = g (p, va_arg (v,int));
3857  va_end (v);
3858  return s;
3859}
3860
3861/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3862   function prototypes and stuff, but not \xHH hex character constants.
3863   These do not provoke an error unfortunately, instead are silently treated
3864   as an "x".  The following induces an error, until -std is added to get
3865   proper ANSI mode.  Curiously \x00 != x always comes out true, for an
3866   array size at least.  It is necessary to write \x00 == 0 to get something
3867   that is true only with -std.  */
3868int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
3869
3870/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3871   inside strings and character constants.  */
3872#define FOO(x) '\''x'\''
3873int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
3874
3875int test (int i, double x);
3876struct s1 {int (*f) (int a);};
3877struct s2 {int (*f) (double a);};
3878int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
3879               int, int);'
3880
3881# Test code for whether the C compiler supports C89 (body of main).
3882ac_c_conftest_c89_main='
3883ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
3884'
3885
3886# Test code for whether the C compiler supports C99 (global declarations)
3887ac_c_conftest_c99_globals='
3888// Does the compiler advertise C99 conformance?
3889#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
3890# error "Compiler does not advertise C99 conformance"
3891#endif
3892
3893#include <stdbool.h>
3894extern int puts (const char *);
3895extern int printf (const char *, ...);
3896extern int dprintf (int, const char *, ...);
3897extern void *malloc (size_t);
3898
3899// Check varargs macros.  These examples are taken from C99 6.10.3.5.
3900// dprintf is used instead of fprintf to avoid needing to declare
3901// FILE and stderr.
3902#define debug(...) dprintf (2, __VA_ARGS__)
3903#define showlist(...) puts (#__VA_ARGS__)
3904#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
3905static void
3906test_varargs_macros (void)
3907{
3908  int x = 1234;
3909  int y = 5678;
3910  debug ("Flag");
3911  debug ("X = %d\n", x);
3912  showlist (The first, second, and third items.);
3913  report (x>y, "x is %d but y is %d", x, y);
3914}
3915
3916// Check long long types.
3917#define BIG64 18446744073709551615ull
3918#define BIG32 4294967295ul
3919#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
3920#if !BIG_OK
3921  #error "your preprocessor is broken"
3922#endif
3923#if BIG_OK
3924#else
3925  #error "your preprocessor is broken"
3926#endif
3927static long long int bignum = -9223372036854775807LL;
3928static unsigned long long int ubignum = BIG64;
3929
3930struct incomplete_array
3931{
3932  int datasize;
3933  double data[];
3934};
3935
3936struct named_init {
3937  int number;
3938  const wchar_t *name;
3939  double average;
3940};
3941
3942typedef const char *ccp;
3943
3944static inline int
3945test_restrict (ccp restrict text)
3946{
3947  // See if C++-style comments work.
3948  // Iterate through items via the restricted pointer.
3949  // Also check for declarations in for loops.
3950  for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
3951    continue;
3952  return 0;
3953}
3954
3955// Check varargs and va_copy.
3956static bool
3957test_varargs (const char *format, ...)
3958{
3959  va_list args;
3960  va_start (args, format);
3961  va_list args_copy;
3962  va_copy (args_copy, args);
3963
3964  const char *str = "";
3965  int number = 0;
3966  float fnumber = 0;
3967
3968  while (*format)
3969    {
3970      switch (*format++)
3971	{
3972	case '\''s'\'': // string
3973	  str = va_arg (args_copy, const char *);
3974	  break;
3975	case '\''d'\'': // int
3976	  number = va_arg (args_copy, int);
3977	  break;
3978	case '\''f'\'': // float
3979	  fnumber = va_arg (args_copy, double);
3980	  break;
3981	default:
3982	  break;
3983	}
3984    }
3985  va_end (args_copy);
3986  va_end (args);
3987
3988  return *str && number && fnumber;
3989}
3990'
3991
3992# Test code for whether the C compiler supports C99 (body of main).
3993ac_c_conftest_c99_main='
3994  // Check bool.
3995  _Bool success = false;
3996  success |= (argc != 0);
3997
3998  // Check restrict.
3999  if (test_restrict ("String literal") == 0)
4000    success = true;
4001  char *restrict newvar = "Another string";
4002
4003  // Check varargs.
4004  success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
4005  test_varargs_macros ();
4006
4007  // Check flexible array members.
4008  struct incomplete_array *ia =
4009    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4010  ia->datasize = 10;
4011  for (int i = 0; i < ia->datasize; ++i)
4012    ia->data[i] = i * 1.234;
4013
4014  // Check named initializers.
4015  struct named_init ni = {
4016    .number = 34,
4017    .name = L"Test wide string",
4018    .average = 543.34343,
4019  };
4020
4021  ni.number = 58;
4022
4023  int dynamic_array[ni.number];
4024  dynamic_array[0] = argv[0][0];
4025  dynamic_array[ni.number - 1] = 543;
4026
4027  // work around unused variable warnings
4028  ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
4029	 || dynamic_array[ni.number - 1] != 543);
4030'
4031
4032# Test code for whether the C compiler supports C11 (global declarations)
4033ac_c_conftest_c11_globals='
4034// Does the compiler advertise C11 conformance?
4035#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
4036# error "Compiler does not advertise C11 conformance"
4037#endif
4038
4039// Check _Alignas.
4040char _Alignas (double) aligned_as_double;
4041char _Alignas (0) no_special_alignment;
4042extern char aligned_as_int;
4043char _Alignas (0) _Alignas (int) aligned_as_int;
4044
4045// Check _Alignof.
4046enum
4047{
4048  int_alignment = _Alignof (int),
4049  int_array_alignment = _Alignof (int[100]),
4050  char_alignment = _Alignof (char)
4051};
4052_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
4053
4054// Check _Noreturn.
4055int _Noreturn does_not_return (void) { for (;;) continue; }
4056
4057// Check _Static_assert.
4058struct test_static_assert
4059{
4060  int x;
4061  _Static_assert (sizeof (int) <= sizeof (long int),
4062                  "_Static_assert does not work in struct");
4063  long int y;
4064};
4065
4066// Check UTF-8 literals.
4067#define u8 syntax error!
4068char const utf8_literal[] = u8"happens to be ASCII" "another string";
4069
4070// Check duplicate typedefs.
4071typedef long *long_ptr;
4072typedef long int *long_ptr;
4073typedef long_ptr long_ptr;
4074
4075// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
4076struct anonymous
4077{
4078  union {
4079    struct { int i; int j; };
4080    struct { int k; long int l; } w;
4081  };
4082  int m;
4083} v1;
4084'
4085
4086# Test code for whether the C compiler supports C11 (body of main).
4087ac_c_conftest_c11_main='
4088  _Static_assert ((offsetof (struct anonymous, i)
4089		   == offsetof (struct anonymous, w.k)),
4090		  "Anonymous union alignment botch");
4091  v1.i = 2;
4092  v1.w.k = 5;
4093  ok |= v1.i != 5;
4094'
4095
4096# Test code for whether the C compiler supports C11 (complete).
4097ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
4098${ac_c_conftest_c99_globals}
4099${ac_c_conftest_c11_globals}
4100
4101int
4102main (int argc, char **argv)
4103{
4104  int ok = 0;
4105  ${ac_c_conftest_c89_main}
4106  ${ac_c_conftest_c99_main}
4107  ${ac_c_conftest_c11_main}
4108  return ok;
4109}
4110"
4111
4112# Test code for whether the C compiler supports C99 (complete).
4113ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
4114${ac_c_conftest_c99_globals}
4115
4116int
4117main (int argc, char **argv)
4118{
4119  int ok = 0;
4120  ${ac_c_conftest_c89_main}
4121  ${ac_c_conftest_c99_main}
4122  return ok;
4123}
4124"
4125
4126# Test code for whether the C compiler supports C89 (complete).
4127ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
4128
4129int
4130main (int argc, char **argv)
4131{
4132  int ok = 0;
4133  ${ac_c_conftest_c89_main}
4134  return ok;
4135}
4136"
4137
4138as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
4139as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
4140as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
4141as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
4142as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
4143as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
4144as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
4145as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
4146as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
4147as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
4148gt_needs="$gt_needs need-ngettext"
4149as_fn_append ac_header_c_list " sys/socket.h sys_socket_h HAVE_SYS_SOCKET_H"
4150as_fn_append ac_header_c_list " arpa/inet.h arpa_inet_h HAVE_ARPA_INET_H"
4151as_fn_append ac_header_c_list " features.h features_h HAVE_FEATURES_H"
4152as_fn_append ac_func_c_list " btowc HAVE_BTOWC"
4153as_fn_append ac_func_c_list " canonicalize_file_name HAVE_CANONICALIZE_FILE_NAME"
4154as_fn_append ac_func_c_list " faccessat HAVE_FACCESSAT"
4155as_fn_append ac_func_c_list " realpath HAVE_REALPATH"
4156as_fn_append ac_func_c_list " lstat HAVE_LSTAT"
4157as_fn_append ac_header_c_list " sys/param.h sys_param_h HAVE_SYS_PARAM_H"
4158as_fn_append ac_func_c_list " _set_invalid_parameter_handler HAVE__SET_INVALID_PARAMETER_HANDLER"
4159as_fn_append ac_func_c_list " fchdir HAVE_FCHDIR"
4160as_fn_append ac_header_c_list " dirent.h dirent_h HAVE_DIRENT_H"
4161as_fn_append ac_func_c_list " fcntl HAVE_FCNTL"
4162as_fn_append ac_func_c_list " symlink HAVE_SYMLINK"
4163as_fn_append ac_func_c_list " fdopendir HAVE_FDOPENDIR"
4164as_fn_append ac_func_c_list " mempcpy HAVE_MEMPCPY"
4165as_fn_append ac_func_c_list " flock HAVE_FLOCK"
4166as_fn_append ac_header_c_list " fnmatch.h fnmatch_h HAVE_FNMATCH_H"
4167as_fn_append ac_func_c_list " fnmatch HAVE_FNMATCH"
4168as_fn_append ac_func_c_list " mbsrtowcs HAVE_MBSRTOWCS"
4169gl_fnmatch_required=GNU
4170as_fn_append ac_header_c_list " stdio_ext.h stdio_ext_h HAVE_STDIO_EXT_H"
4171as_fn_append ac_func_c_list " fpurge HAVE_FPURGE"
4172as_fn_append ac_func_c_list " __fpurge HAVE___FPURGE"
4173as_fn_append ac_func_c_list " __freading HAVE___FREADING"
4174as_fn_append ac_func_c_list " fstatat HAVE_FSTATAT"
4175as_fn_append ac_func_c_list " futimens HAVE_FUTIMENS"
4176as_fn_append ac_header_c_list " netdb.h netdb_h HAVE_NETDB_H"
4177as_fn_append ac_header_c_list " netinet/in.h netinet_in_h HAVE_NETINET_IN_H"
4178as_fn_append ac_func_c_list " getdelim HAVE_GETDELIM"
4179as_fn_append ac_func_c_list " getdtablesize HAVE_GETDTABLESIZE"
4180gl_getopt_required=GNU
4181as_fn_append ac_header_c_list " getopt.h getopt_h HAVE_GETOPT_H"
4182as_fn_append ac_header_c_list " sys/cdefs.h sys_cdefs_h HAVE_SYS_CDEFS_H"
4183as_fn_append ac_func_c_list " getpass HAVE_GETPASS"
4184as_fn_append ac_header_c_list " termios.h termios_h HAVE_TERMIOS_H"
4185as_fn_append ac_func_c_list " __fsetlocking HAVE___FSETLOCKING"
4186as_fn_append ac_func_c_list " getprogname HAVE_GETPROGNAME"
4187as_fn_append ac_func_c_list " getexecname HAVE_GETEXECNAME"
4188as_fn_append ac_func_c_list " getrandom HAVE_GETRANDOM"
4189as_fn_append ac_func_c_list " gettimeofday HAVE_GETTIMEOFDAY"
4190as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
4191as_fn_append ac_header_c_list " threads.h threads_h HAVE_THREADS_H"
4192as_fn_append ac_header_c_list " iconv.h iconv_h HAVE_ICONV_H"
4193as_fn_append ac_header_c_list " limits.h limits_h HAVE_LIMITS_H"
4194as_fn_append ac_func_c_list " isblank HAVE_ISBLANK"
4195as_fn_append ac_func_c_list " iswcntrl HAVE_ISWCNTRL"
4196as_fn_append ac_header_c_list " crtdefs.h crtdefs_h HAVE_CRTDEFS_H"
4197as_fn_append ac_header_c_list " wctype.h wctype_h HAVE_WCTYPE_H"
4198as_fn_append ac_func_c_list " iswblank HAVE_ISWBLANK"
4199as_fn_append ac_header_c_list " langinfo.h langinfo_h HAVE_LANGINFO_H"
4200as_fn_append ac_func_c_list " link HAVE_LINK"
4201as_fn_append ac_header_c_list " xlocale.h xlocale_h HAVE_XLOCALE_H"
4202as_fn_append ac_func_c_list " mbsinit HAVE_MBSINIT"
4203as_fn_append ac_func_c_list " mbrtowc HAVE_MBRTOWC"
4204as_fn_append ac_header_c_list " sys/mman.h sys_mman_h HAVE_SYS_MMAN_H"
4205as_fn_append ac_func_c_list " mprotect HAVE_MPROTECT"
4206as_fn_append ac_func_c_list " mkostemp HAVE_MKOSTEMP"
4207as_fn_append ac_func_c_list " mkstemp HAVE_MKSTEMP"
4208as_fn_append ac_header_c_list " sys/select.h sys_select_h HAVE_SYS_SELECT_H"
4209as_fn_append ac_func_c_list " nl_langinfo HAVE_NL_LANGINFO"
4210as_fn_append ac_func_c_list " openat HAVE_OPENAT"
4211as_fn_append ac_func_c_list " pipe HAVE_PIPE"
4212as_fn_append ac_func_c_list " pipe2 HAVE_PIPE2"
4213as_fn_append ac_func_c_list " posix_spawn_file_actions_addchdir_np HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR_NP"
4214as_fn_append ac_func_c_list " posix_spawn_file_actions_addchdir HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR"
4215as_fn_append ac_func_c_list " readlink HAVE_READLINK"
4216as_fn_append ac_header_c_list " malloc.h malloc_h HAVE_MALLOC_H"
4217as_fn_append ac_func_c_list " iswctype HAVE_ISWCTYPE"
4218as_fn_append ac_func_c_list " secure_getenv HAVE_SECURE_GETENV"
4219as_fn_append ac_func_c_list " getuid HAVE_GETUID"
4220as_fn_append ac_func_c_list " geteuid HAVE_GETEUID"
4221as_fn_append ac_func_c_list " getgid HAVE_GETGID"
4222as_fn_append ac_func_c_list " getegid HAVE_GETEGID"
4223as_fn_append ac_func_c_list " sigaction HAVE_SIGACTION"
4224as_fn_append ac_func_c_list " sigaltstack HAVE_SIGALTSTACK"
4225as_fn_append ac_func_c_list " siginterrupt HAVE_SIGINTERRUPT"
4226as_fn_append ac_func_c_list " snprintf HAVE_SNPRINTF"
4227as_fn_append ac_header_c_list " spawn.h spawn_h HAVE_SPAWN_H"
4228as_fn_append ac_func_c_list " strerror_r HAVE_STRERROR_R"
4229as_fn_append ac_func_c_list " __xpg_strerror_r HAVE___XPG_STRERROR_R"
4230as_fn_append ac_func_c_list " catgets HAVE_CATGETS"
4231as_fn_append ac_func_c_list " strndup HAVE_STRNDUP"
4232as_fn_append ac_func_c_list " strptime HAVE_STRPTIME"
4233as_fn_append ac_header_c_list " sys/file.h sys_file_h HAVE_SYS_FILE_H"
4234as_fn_append ac_header_c_list " sys/ioctl.h sys_ioctl_h HAVE_SYS_IOCTL_H"
4235as_fn_append ac_header_c_list " sys/random.h sys_random_h HAVE_SYS_RANDOM_H"
4236as_fn_append ac_header_c_list " sys/uio.h sys_uio_h HAVE_SYS_UIO_H"
4237as_fn_append ac_header_c_list " sys/wait.h sys_wait_h HAVE_SYS_WAIT_H"
4238as_fn_append ac_func_c_list " localtime_r HAVE_LOCALTIME_R"
4239as_fn_append ac_func_c_list " timegm HAVE_TIMEGM"
4240as_fn_append ac_header_c_list " utime.h utime_h HAVE_UTIME_H"
4241as_fn_append ac_func_c_list " futimes HAVE_FUTIMES"
4242as_fn_append ac_func_c_list " futimesat HAVE_FUTIMESAT"
4243as_fn_append ac_func_c_list " utimensat HAVE_UTIMENSAT"
4244as_fn_append ac_func_c_list " lutimes HAVE_LUTIMES"
4245as_fn_append ac_func_c_list " vasnprintf HAVE_VASNPRINTF"
4246as_fn_append ac_func_c_list " wcrtomb HAVE_WCRTOMB"
4247as_fn_append ac_func_c_list " wcwidth HAVE_WCWIDTH"
4248as_fn_append ac_func_c_list " wmempcpy HAVE_WMEMPCPY"
4249as_fn_append ac_func_c_list " getpagesize HAVE_GETPAGESIZE"
4250
4251# Auxiliary files required by this configure script.
4252ac_aux_files="config.rpath config.guess config.sub compile missing install-sh"
4253
4254# Locations in which to look for auxiliary files.
4255ac_aux_dir_candidates="${srcdir}/build-aux"
4256
4257# Search for a directory containing all of the required auxiliary files,
4258# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
4259# If we don't find one directory that contains all the files we need,
4260# we report the set of missing files from the *first* directory in
4261# $ac_aux_dir_candidates and give up.
4262ac_missing_aux_files=""
4263ac_first_candidate=:
4264printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
4265as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4266as_found=false
4267for as_dir in $ac_aux_dir_candidates
4268do
4269  IFS=$as_save_IFS
4270  case $as_dir in #(((
4271    '') as_dir=./ ;;
4272    */) ;;
4273    *) as_dir=$as_dir/ ;;
4274  esac
4275  as_found=:
4276
4277  printf "%s\n" "$as_me:${as_lineno-$LINENO}:  trying $as_dir" >&5
4278  ac_aux_dir_found=yes
4279  ac_install_sh=
4280  for ac_aux in $ac_aux_files
4281  do
4282    # As a special case, if "install-sh" is required, that requirement
4283    # can be satisfied by any of "install-sh", "install.sh", or "shtool",
4284    # and $ac_install_sh is set appropriately for whichever one is found.
4285    if test x"$ac_aux" = x"install-sh"
4286    then
4287      if test -f "${as_dir}install-sh"; then
4288        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install-sh found" >&5
4289        ac_install_sh="${as_dir}install-sh -c"
4290      elif test -f "${as_dir}install.sh"; then
4291        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install.sh found" >&5
4292        ac_install_sh="${as_dir}install.sh -c"
4293      elif test -f "${as_dir}shtool"; then
4294        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}shtool found" >&5
4295        ac_install_sh="${as_dir}shtool install -c"
4296      else
4297        ac_aux_dir_found=no
4298        if $ac_first_candidate; then
4299          ac_missing_aux_files="${ac_missing_aux_files} install-sh"
4300        else
4301          break
4302        fi
4303      fi
4304    else
4305      if test -f "${as_dir}${ac_aux}"; then
4306        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}${ac_aux} found" >&5
4307      else
4308        ac_aux_dir_found=no
4309        if $ac_first_candidate; then
4310          ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
4311        else
4312          break
4313        fi
4314      fi
4315    fi
4316  done
4317  if test "$ac_aux_dir_found" = yes; then
4318    ac_aux_dir="$as_dir"
4319    break
4320  fi
4321  ac_first_candidate=false
4322
4323  as_found=false
4324done
4325IFS=$as_save_IFS
4326if $as_found
4327then :
4328
4329else $as_nop
4330  as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
4331fi
4332
4333
4334# These three variables are undocumented and unsupported,
4335# and are intended to be withdrawn in a future Autoconf release.
4336# They can cause serious problems if a builder's source tree is in a directory
4337# whose full name contains unusual characters.
4338if test -f "${ac_aux_dir}config.guess"; then
4339  ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
4340fi
4341if test -f "${ac_aux_dir}config.sub"; then
4342  ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
4343fi
4344if test -f "$ac_aux_dir/configure"; then
4345  ac_configure="$SHELL ${ac_aux_dir}configure"
4346fi
4347
4348# Check that the precious variables saved in the cache have kept the same
4349# value.
4350ac_cache_corrupted=false
4351for ac_var in $ac_precious_vars; do
4352  eval ac_old_set=\$ac_cv_env_${ac_var}_set
4353  eval ac_new_set=\$ac_env_${ac_var}_set
4354  eval ac_old_val=\$ac_cv_env_${ac_var}_value
4355  eval ac_new_val=\$ac_env_${ac_var}_value
4356  case $ac_old_set,$ac_new_set in
4357    set,)
4358      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
4359printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
4360      ac_cache_corrupted=: ;;
4361    ,set)
4362      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
4363printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
4364      ac_cache_corrupted=: ;;
4365    ,);;
4366    *)
4367      if test "x$ac_old_val" != "x$ac_new_val"; then
4368	# differences in whitespace do not lead to failure.
4369	ac_old_val_w=`echo x $ac_old_val`
4370	ac_new_val_w=`echo x $ac_new_val`
4371	if test "$ac_old_val_w" != "$ac_new_val_w"; then
4372	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
4373printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
4374	  ac_cache_corrupted=:
4375	else
4376	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
4377printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
4378	  eval $ac_var=\$ac_old_val
4379	fi
4380	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
4381printf "%s\n" "$as_me:   former value:  \`$ac_old_val'" >&2;}
4382	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
4383printf "%s\n" "$as_me:   current value: \`$ac_new_val'" >&2;}
4384      fi;;
4385  esac
4386  # Pass precious variables to config.status.
4387  if test "$ac_new_set" = set; then
4388    case $ac_new_val in
4389    *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
4390    *) ac_arg=$ac_var=$ac_new_val ;;
4391    esac
4392    case " $ac_configure_args " in
4393      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
4394      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
4395    esac
4396  fi
4397done
4398if $ac_cache_corrupted; then
4399  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4400printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4401  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
4402printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
4403  as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
4404	    and start over" "$LINENO" 5
4405fi
4406## -------------------- ##
4407## Main body of script. ##
4408## -------------------- ##
4409
4410ac_ext=c
4411ac_cpp='$CPP $CPPFLAGS'
4412ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4413ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4414ac_compiler_gnu=$ac_cv_c_compiler_gnu
4415
4416
4417
4418
4419{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: configuring for GNU Wget $PACKAGE_VERSION" >&5
4420printf "%s\n" "$as_me: configuring for GNU Wget $PACKAGE_VERSION" >&6;}
4421
4422
4423
4424
4425
4426
4427am__api_version='1.16'
4428
4429
4430
4431  # Find a good install program.  We prefer a C program (faster),
4432# so one script is as good as another.  But avoid the broken or
4433# incompatible versions:
4434# SysV /etc/install, /usr/sbin/install
4435# SunOS /usr/etc/install
4436# IRIX /sbin/install
4437# AIX /bin/install
4438# AmigaOS /C/install, which installs bootblocks on floppy discs
4439# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4440# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4441# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4442# OS/2's system install, which has a completely different semantic
4443# ./install, which can be erroneously created by make from ./install.sh.
4444# Reject install programs that cannot install multiple files.
4445{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4446printf %s "checking for a BSD-compatible install... " >&6; }
4447if test -z "$INSTALL"; then
4448if test ${ac_cv_path_install+y}
4449then :
4450  printf %s "(cached) " >&6
4451else $as_nop
4452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4453for as_dir in $PATH
4454do
4455  IFS=$as_save_IFS
4456  case $as_dir in #(((
4457    '') as_dir=./ ;;
4458    */) ;;
4459    *) as_dir=$as_dir/ ;;
4460  esac
4461    # Account for fact that we put trailing slashes in our PATH walk.
4462case $as_dir in #((
4463  ./ | /[cC]/* | \
4464  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4465  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4466  /usr/ucb/* ) ;;
4467  *)
4468    # OSF1 and SCO ODT 3.0 have their own names for install.
4469    # Don't use installbsd from OSF since it installs stuff as root
4470    # by default.
4471    for ac_prog in ginstall scoinst install; do
4472      for ac_exec_ext in '' $ac_executable_extensions; do
4473	if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
4474	  if test $ac_prog = install &&
4475	    grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4476	    # AIX install.  It has an incompatible calling convention.
4477	    :
4478	  elif test $ac_prog = install &&
4479	    grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4480	    # program-specific install script used by HP pwplus--don't use.
4481	    :
4482	  else
4483	    rm -rf conftest.one conftest.two conftest.dir
4484	    echo one > conftest.one
4485	    echo two > conftest.two
4486	    mkdir conftest.dir
4487	    if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
4488	      test -s conftest.one && test -s conftest.two &&
4489	      test -s conftest.dir/conftest.one &&
4490	      test -s conftest.dir/conftest.two
4491	    then
4492	      ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
4493	      break 3
4494	    fi
4495	  fi
4496	fi
4497      done
4498    done
4499    ;;
4500esac
4501
4502  done
4503IFS=$as_save_IFS
4504
4505rm -rf conftest.one conftest.two conftest.dir
4506
4507fi
4508  if test ${ac_cv_path_install+y}; then
4509    INSTALL=$ac_cv_path_install
4510  else
4511    # As a last resort, use the slow shell script.  Don't cache a
4512    # value for INSTALL within a source directory, because that will
4513    # break other packages using the cache if that directory is
4514    # removed, or if the value is a relative name.
4515    INSTALL=$ac_install_sh
4516  fi
4517fi
4518{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4519printf "%s\n" "$INSTALL" >&6; }
4520
4521# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4522# It thinks the first close brace ends the variable substitution.
4523test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4524
4525test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4526
4527test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4528
4529{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
4530printf %s "checking whether build environment is sane... " >&6; }
4531# Reject unsafe characters in $srcdir or the absolute working directory
4532# name.  Accept space and tab only in the latter.
4533am_lf='
4534'
4535case `pwd` in
4536  *[\\\"\#\$\&\'\`$am_lf]*)
4537    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
4538esac
4539case $srcdir in
4540  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
4541    as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
4542esac
4543
4544# Do 'set' in a subshell so we don't clobber the current shell's
4545# arguments.  Must try -L first in case configure is actually a
4546# symlink; some systems play weird games with the mod time of symlinks
4547# (eg FreeBSD returns the mod time of the symlink's containing
4548# directory).
4549if (
4550   am_has_slept=no
4551   for am_try in 1 2; do
4552     echo "timestamp, slept: $am_has_slept" > conftest.file
4553     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
4554     if test "$*" = "X"; then
4555	# -L didn't work.
4556	set X `ls -t "$srcdir/configure" conftest.file`
4557     fi
4558     if test "$*" != "X $srcdir/configure conftest.file" \
4559	&& test "$*" != "X conftest.file $srcdir/configure"; then
4560
4561	# If neither matched, then we have a broken ls.  This can happen
4562	# if, for instance, CONFIG_SHELL is bash and it inherits a
4563	# broken ls alias from the environment.  This has actually
4564	# happened.  Such a system could not be considered "sane".
4565	as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
4566  alias in your environment" "$LINENO" 5
4567     fi
4568     if test "$2" = conftest.file || test $am_try -eq 2; then
4569       break
4570     fi
4571     # Just in case.
4572     sleep 1
4573     am_has_slept=yes
4574   done
4575   test "$2" = conftest.file
4576   )
4577then
4578   # Ok.
4579   :
4580else
4581   as_fn_error $? "newly created file is older than distributed files!
4582Check your system clock" "$LINENO" 5
4583fi
4584{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4585printf "%s\n" "yes" >&6; }
4586# If we didn't sleep, we still need to ensure time stamps of config.status and
4587# generated files are strictly newer.
4588am_sleep_pid=
4589if grep 'slept: no' conftest.file >/dev/null 2>&1; then
4590  ( sleep 1 ) &
4591  am_sleep_pid=$!
4592fi
4593
4594rm -f conftest.file
4595
4596test "$program_prefix" != NONE &&
4597  program_transform_name="s&^&$program_prefix&;$program_transform_name"
4598# Use a double $ so make ignores it.
4599test "$program_suffix" != NONE &&
4600  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4601# Double any \ or $.
4602# By default was `s,x,x', remove it if useless.
4603ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4604program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
4605
4606
4607# Expand $ac_aux_dir to an absolute path.
4608am_aux_dir=`cd "$ac_aux_dir" && pwd`
4609
4610
4611  if test x"${MISSING+set}" != xset; then
4612  MISSING="\${SHELL} '$am_aux_dir/missing'"
4613fi
4614# Use eval to expand $SHELL
4615if eval "$MISSING --is-lightweight"; then
4616  am_missing_run="$MISSING "
4617else
4618  am_missing_run=
4619  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
4620printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
4621fi
4622
4623if test x"${install_sh+set}" != xset; then
4624  case $am_aux_dir in
4625  *\ * | *\	*)
4626    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4627  *)
4628    install_sh="\${SHELL} $am_aux_dir/install-sh"
4629  esac
4630fi
4631
4632# Installed binaries are usually stripped using 'strip' when the user
4633# run "make install-strip".  However 'strip' might not be the right
4634# tool to use in cross-compilation environments, therefore Automake
4635# will honor the 'STRIP' environment variable to overrule this program.
4636if test "$cross_compiling" != no; then
4637  if test -n "$ac_tool_prefix"; then
4638  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4639set dummy ${ac_tool_prefix}strip; ac_word=$2
4640{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4641printf %s "checking for $ac_word... " >&6; }
4642if test ${ac_cv_prog_STRIP+y}
4643then :
4644  printf %s "(cached) " >&6
4645else $as_nop
4646  if test -n "$STRIP"; then
4647  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4648else
4649as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4650for as_dir in $PATH
4651do
4652  IFS=$as_save_IFS
4653  case $as_dir in #(((
4654    '') as_dir=./ ;;
4655    */) ;;
4656    *) as_dir=$as_dir/ ;;
4657  esac
4658    for ac_exec_ext in '' $ac_executable_extensions; do
4659  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4660    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4661    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4662    break 2
4663  fi
4664done
4665  done
4666IFS=$as_save_IFS
4667
4668fi
4669fi
4670STRIP=$ac_cv_prog_STRIP
4671if test -n "$STRIP"; then
4672  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4673printf "%s\n" "$STRIP" >&6; }
4674else
4675  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4676printf "%s\n" "no" >&6; }
4677fi
4678
4679
4680fi
4681if test -z "$ac_cv_prog_STRIP"; then
4682  ac_ct_STRIP=$STRIP
4683  # Extract the first word of "strip", so it can be a program name with args.
4684set dummy strip; ac_word=$2
4685{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4686printf %s "checking for $ac_word... " >&6; }
4687if test ${ac_cv_prog_ac_ct_STRIP+y}
4688then :
4689  printf %s "(cached) " >&6
4690else $as_nop
4691  if test -n "$ac_ct_STRIP"; then
4692  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4693else
4694as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4695for as_dir in $PATH
4696do
4697  IFS=$as_save_IFS
4698  case $as_dir in #(((
4699    '') as_dir=./ ;;
4700    */) ;;
4701    *) as_dir=$as_dir/ ;;
4702  esac
4703    for ac_exec_ext in '' $ac_executable_extensions; do
4704  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4705    ac_cv_prog_ac_ct_STRIP="strip"
4706    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4707    break 2
4708  fi
4709done
4710  done
4711IFS=$as_save_IFS
4712
4713fi
4714fi
4715ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4716if test -n "$ac_ct_STRIP"; then
4717  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4718printf "%s\n" "$ac_ct_STRIP" >&6; }
4719else
4720  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4721printf "%s\n" "no" >&6; }
4722fi
4723
4724  if test "x$ac_ct_STRIP" = x; then
4725    STRIP=":"
4726  else
4727    case $cross_compiling:$ac_tool_warned in
4728yes:)
4729{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4730printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4731ac_tool_warned=yes ;;
4732esac
4733    STRIP=$ac_ct_STRIP
4734  fi
4735else
4736  STRIP="$ac_cv_prog_STRIP"
4737fi
4738
4739fi
4740INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4741
4742
4743  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
4744printf %s "checking for a race-free mkdir -p... " >&6; }
4745if test -z "$MKDIR_P"; then
4746  if test ${ac_cv_path_mkdir+y}
4747then :
4748  printf %s "(cached) " >&6
4749else $as_nop
4750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4751for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
4752do
4753  IFS=$as_save_IFS
4754  case $as_dir in #(((
4755    '') as_dir=./ ;;
4756    */) ;;
4757    *) as_dir=$as_dir/ ;;
4758  esac
4759    for ac_prog in mkdir gmkdir; do
4760	 for ac_exec_ext in '' $ac_executable_extensions; do
4761	   as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
4762	   case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
4763	     'mkdir ('*'coreutils) '* | \
4764	     'BusyBox '* | \
4765	     'mkdir (fileutils) '4.1*)
4766	       ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
4767	       break 3;;
4768	   esac
4769	 done
4770       done
4771  done
4772IFS=$as_save_IFS
4773
4774fi
4775
4776  test -d ./--version && rmdir ./--version
4777  if test ${ac_cv_path_mkdir+y}; then
4778    MKDIR_P="$ac_cv_path_mkdir -p"
4779  else
4780    # As a last resort, use the slow shell script.  Don't cache a
4781    # value for MKDIR_P within a source directory, because that will
4782    # break other packages using the cache if that directory is
4783    # removed, or if the value is a relative name.
4784    MKDIR_P="$ac_install_sh -d"
4785  fi
4786fi
4787{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
4788printf "%s\n" "$MKDIR_P" >&6; }
4789
4790for ac_prog in gawk mawk nawk awk
4791do
4792  # Extract the first word of "$ac_prog", so it can be a program name with args.
4793set dummy $ac_prog; ac_word=$2
4794{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4795printf %s "checking for $ac_word... " >&6; }
4796if test ${ac_cv_prog_AWK+y}
4797then :
4798  printf %s "(cached) " >&6
4799else $as_nop
4800  if test -n "$AWK"; then
4801  ac_cv_prog_AWK="$AWK" # Let the user override the test.
4802else
4803as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4804for as_dir in $PATH
4805do
4806  IFS=$as_save_IFS
4807  case $as_dir in #(((
4808    '') as_dir=./ ;;
4809    */) ;;
4810    *) as_dir=$as_dir/ ;;
4811  esac
4812    for ac_exec_ext in '' $ac_executable_extensions; do
4813  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4814    ac_cv_prog_AWK="$ac_prog"
4815    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4816    break 2
4817  fi
4818done
4819  done
4820IFS=$as_save_IFS
4821
4822fi
4823fi
4824AWK=$ac_cv_prog_AWK
4825if test -n "$AWK"; then
4826  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4827printf "%s\n" "$AWK" >&6; }
4828else
4829  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4830printf "%s\n" "no" >&6; }
4831fi
4832
4833
4834  test -n "$AWK" && break
4835done
4836
4837{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4838printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4839set x ${MAKE-make}
4840ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4841if eval test \${ac_cv_prog_make_${ac_make}_set+y}
4842then :
4843  printf %s "(cached) " >&6
4844else $as_nop
4845  cat >conftest.make <<\_ACEOF
4846SHELL = /bin/sh
4847all:
4848	@echo '@@@%%%=$(MAKE)=@@@%%%'
4849_ACEOF
4850# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4851case `${MAKE-make} -f conftest.make 2>/dev/null` in
4852  *@@@%%%=?*=@@@%%%*)
4853    eval ac_cv_prog_make_${ac_make}_set=yes;;
4854  *)
4855    eval ac_cv_prog_make_${ac_make}_set=no;;
4856esac
4857rm -f conftest.make
4858fi
4859if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4860  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4861printf "%s\n" "yes" >&6; }
4862  SET_MAKE=
4863else
4864  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4865printf "%s\n" "no" >&6; }
4866  SET_MAKE="MAKE=${MAKE-make}"
4867fi
4868
4869rm -rf .tst 2>/dev/null
4870mkdir .tst 2>/dev/null
4871if test -d .tst; then
4872  am__leading_dot=.
4873else
4874  am__leading_dot=_
4875fi
4876rmdir .tst 2>/dev/null
4877
4878# Check whether --enable-silent-rules was given.
4879if test ${enable_silent_rules+y}
4880then :
4881  enableval=$enable_silent_rules;
4882fi
4883
4884case $enable_silent_rules in # (((
4885  yes) AM_DEFAULT_VERBOSITY=0;;
4886   no) AM_DEFAULT_VERBOSITY=1;;
4887    *) AM_DEFAULT_VERBOSITY=1;;
4888esac
4889am_make=${MAKE-make}
4890{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4891printf %s "checking whether $am_make supports nested variables... " >&6; }
4892if test ${am_cv_make_support_nested_variables+y}
4893then :
4894  printf %s "(cached) " >&6
4895else $as_nop
4896  if printf "%s\n" 'TRUE=$(BAR$(V))
4897BAR0=false
4898BAR1=true
4899V=1
4900am__doit:
4901	@$(TRUE)
4902.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4903  am_cv_make_support_nested_variables=yes
4904else
4905  am_cv_make_support_nested_variables=no
4906fi
4907fi
4908{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4909printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
4910if test $am_cv_make_support_nested_variables = yes; then
4911    AM_V='$(V)'
4912  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4913else
4914  AM_V=$AM_DEFAULT_VERBOSITY
4915  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4916fi
4917AM_BACKSLASH='\'
4918
4919if test "`cd $srcdir && pwd`" != "`pwd`"; then
4920  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4921  # is not polluted with repeated "-I."
4922  am__isrc=' -I$(srcdir)'
4923  # test to see if srcdir already configured
4924  if test -f $srcdir/config.status; then
4925    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
4926  fi
4927fi
4928
4929# test whether we have cygpath
4930if test -z "$CYGPATH_W"; then
4931  if (cygpath --version) >/dev/null 2>/dev/null; then
4932    CYGPATH_W='cygpath -w'
4933  else
4934    CYGPATH_W=echo
4935  fi
4936fi
4937
4938
4939# Define the identity of the package.
4940 PACKAGE='wget'
4941 VERSION='1.21.2'
4942
4943
4944printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
4945
4946
4947printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h
4948
4949# Some tools Automake needs.
4950
4951ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4952
4953
4954AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4955
4956
4957AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4958
4959
4960AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4961
4962
4963MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
4964
4965# For better backward compatibility.  To be removed once Automake 1.9.x
4966# dies out for good.  For more background, see:
4967# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
4968# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
4969mkdir_p='$(MKDIR_P)'
4970
4971# We need awk for the "check" target (and possibly the TAP driver).  The
4972# system "awk" is bad on some platforms.
4973# Always define AMTAR for backward compatibility.  Yes, it's still used
4974# in the wild :-(  We should find a proper way to deprecate it ...
4975AMTAR='$${TAR-tar}'
4976
4977
4978# We'll loop over all known methods to create a tar archive until one works.
4979_am_tools='gnutar  pax cpio none'
4980
4981am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
4982
4983
4984
4985
4986
4987# Variables for tags utilities; see am/tags.am
4988if test -z "$CTAGS"; then
4989  CTAGS=ctags
4990fi
4991
4992if test -z "$ETAGS"; then
4993  ETAGS=etags
4994fi
4995
4996if test -z "$CSCOPE"; then
4997  CSCOPE=cscope
4998fi
4999
5000
5001
5002# POSIX will say in a future version that running "rm -f" with no argument
5003# is OK; and we want to be able to make that assumption in our Makefile
5004# recipes.  So use an aggressive probe to check that the usage we want is
5005# actually supported "in the wild" to an acceptable degree.
5006# See automake bug#10828.
5007# To make any issue more visible, cause the running configure to be aborted
5008# by default if the 'rm' program in use doesn't match our expectations; the
5009# user can still override this though.
5010if rm -f && rm -fr && rm -rf; then : OK; else
5011  cat >&2 <<'END'
5012Oops!
5013
5014Your 'rm' program seems unable to run without file operands specified
5015on the command line, even when the '-f' option is present.  This is contrary
5016to the behaviour of most rm programs out there, and not conforming with
5017the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
5018
5019Please tell bug-automake@gnu.org about your system, including the value
5020of your $PATH and any error possibly output before this message.  This
5021can help us improve future automake versions.
5022
5023END
5024  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
5025    echo 'Configuration will proceed anyway, since you have set the' >&2
5026    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
5027    echo >&2
5028  else
5029    cat >&2 <<'END'
5030Aborting the configuration process, to ensure you take notice of the issue.
5031
5032You can download and install GNU coreutils to get an 'rm' implementation
5033that behaves properly: <https://www.gnu.org/software/coreutils/>.
5034
5035If you want to complete the configuration process using your problematic
5036'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
5037to "yes", and re-run configure.
5038
5039END
5040    as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
5041  fi
5042fi
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054DEPDIR="${am__leading_dot}deps"
5055
5056ac_config_commands="$ac_config_commands depfiles"
5057
5058{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
5059printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
5060cat > confinc.mk << 'END'
5061am__doit:
5062	@echo this is the am__doit target >confinc.out
5063.PHONY: am__doit
5064END
5065am__include="#"
5066am__quote=
5067# BSD make does it like this.
5068echo '.include "confinc.mk" # ignored' > confmf.BSD
5069# Other make implementations (GNU, Solaris 10, AIX) do it like this.
5070echo 'include confinc.mk # ignored' > confmf.GNU
5071_am_result=no
5072for s in GNU BSD; do
5073  { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
5074   (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
5075   ac_status=$?
5076   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5077   (exit $ac_status); }
5078  case $?:`cat confinc.out 2>/dev/null` in #(
5079  '0:this is the am__doit target') :
5080    case $s in #(
5081  BSD) :
5082    am__include='.include' am__quote='"' ;; #(
5083  *) :
5084    am__include='include' am__quote='' ;;
5085esac ;; #(
5086  *) :
5087     ;;
5088esac
5089  if test "$am__include" != "#"; then
5090    _am_result="yes ($s style)"
5091    break
5092  fi
5093done
5094rm -f confinc.* confmf.*
5095{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
5096printf "%s\n" "${_am_result}" >&6; }
5097
5098# Check whether --enable-dependency-tracking was given.
5099if test ${enable_dependency_tracking+y}
5100then :
5101  enableval=$enable_dependency_tracking;
5102fi
5103
5104if test "x$enable_dependency_tracking" != xno; then
5105  am_depcomp="$ac_aux_dir/depcomp"
5106  AMDEPBACKSLASH='\'
5107  am__nodep='_no'
5108fi
5109 if test "x$enable_dependency_tracking" != xno; then
5110  AMDEP_TRUE=
5111  AMDEP_FALSE='#'
5112else
5113  AMDEP_TRUE='#'
5114  AMDEP_FALSE=
5115fi
5116
5117
5118ac_ext=c
5119ac_cpp='$CPP $CPPFLAGS'
5120ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5121ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5122ac_compiler_gnu=$ac_cv_c_compiler_gnu
5123if test -n "$ac_tool_prefix"; then
5124  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5125set dummy ${ac_tool_prefix}gcc; ac_word=$2
5126{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5127printf %s "checking for $ac_word... " >&6; }
5128if test ${ac_cv_prog_CC+y}
5129then :
5130  printf %s "(cached) " >&6
5131else $as_nop
5132  if test -n "$CC"; then
5133  ac_cv_prog_CC="$CC" # Let the user override the test.
5134else
5135as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5136for as_dir in $PATH
5137do
5138  IFS=$as_save_IFS
5139  case $as_dir in #(((
5140    '') as_dir=./ ;;
5141    */) ;;
5142    *) as_dir=$as_dir/ ;;
5143  esac
5144    for ac_exec_ext in '' $ac_executable_extensions; do
5145  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5146    ac_cv_prog_CC="${ac_tool_prefix}gcc"
5147    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5148    break 2
5149  fi
5150done
5151  done
5152IFS=$as_save_IFS
5153
5154fi
5155fi
5156CC=$ac_cv_prog_CC
5157if test -n "$CC"; then
5158  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5159printf "%s\n" "$CC" >&6; }
5160else
5161  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5162printf "%s\n" "no" >&6; }
5163fi
5164
5165
5166fi
5167if test -z "$ac_cv_prog_CC"; then
5168  ac_ct_CC=$CC
5169  # Extract the first word of "gcc", so it can be a program name with args.
5170set dummy gcc; ac_word=$2
5171{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5172printf %s "checking for $ac_word... " >&6; }
5173if test ${ac_cv_prog_ac_ct_CC+y}
5174then :
5175  printf %s "(cached) " >&6
5176else $as_nop
5177  if test -n "$ac_ct_CC"; then
5178  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5179else
5180as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5181for as_dir in $PATH
5182do
5183  IFS=$as_save_IFS
5184  case $as_dir in #(((
5185    '') as_dir=./ ;;
5186    */) ;;
5187    *) as_dir=$as_dir/ ;;
5188  esac
5189    for ac_exec_ext in '' $ac_executable_extensions; do
5190  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5191    ac_cv_prog_ac_ct_CC="gcc"
5192    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5193    break 2
5194  fi
5195done
5196  done
5197IFS=$as_save_IFS
5198
5199fi
5200fi
5201ac_ct_CC=$ac_cv_prog_ac_ct_CC
5202if test -n "$ac_ct_CC"; then
5203  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5204printf "%s\n" "$ac_ct_CC" >&6; }
5205else
5206  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5207printf "%s\n" "no" >&6; }
5208fi
5209
5210  if test "x$ac_ct_CC" = x; then
5211    CC=""
5212  else
5213    case $cross_compiling:$ac_tool_warned in
5214yes:)
5215{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5216printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5217ac_tool_warned=yes ;;
5218esac
5219    CC=$ac_ct_CC
5220  fi
5221else
5222  CC="$ac_cv_prog_CC"
5223fi
5224
5225if test -z "$CC"; then
5226          if test -n "$ac_tool_prefix"; then
5227    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5228set dummy ${ac_tool_prefix}cc; ac_word=$2
5229{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5230printf %s "checking for $ac_word... " >&6; }
5231if test ${ac_cv_prog_CC+y}
5232then :
5233  printf %s "(cached) " >&6
5234else $as_nop
5235  if test -n "$CC"; then
5236  ac_cv_prog_CC="$CC" # Let the user override the test.
5237else
5238as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5239for as_dir in $PATH
5240do
5241  IFS=$as_save_IFS
5242  case $as_dir in #(((
5243    '') as_dir=./ ;;
5244    */) ;;
5245    *) as_dir=$as_dir/ ;;
5246  esac
5247    for ac_exec_ext in '' $ac_executable_extensions; do
5248  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5249    ac_cv_prog_CC="${ac_tool_prefix}cc"
5250    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5251    break 2
5252  fi
5253done
5254  done
5255IFS=$as_save_IFS
5256
5257fi
5258fi
5259CC=$ac_cv_prog_CC
5260if test -n "$CC"; then
5261  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5262printf "%s\n" "$CC" >&6; }
5263else
5264  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5265printf "%s\n" "no" >&6; }
5266fi
5267
5268
5269  fi
5270fi
5271if test -z "$CC"; then
5272  # Extract the first word of "cc", so it can be a program name with args.
5273set dummy cc; ac_word=$2
5274{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5275printf %s "checking for $ac_word... " >&6; }
5276if test ${ac_cv_prog_CC+y}
5277then :
5278  printf %s "(cached) " >&6
5279else $as_nop
5280  if test -n "$CC"; then
5281  ac_cv_prog_CC="$CC" # Let the user override the test.
5282else
5283  ac_prog_rejected=no
5284as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5285for as_dir in $PATH
5286do
5287  IFS=$as_save_IFS
5288  case $as_dir in #(((
5289    '') as_dir=./ ;;
5290    */) ;;
5291    *) as_dir=$as_dir/ ;;
5292  esac
5293    for ac_exec_ext in '' $ac_executable_extensions; do
5294  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5295    if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5296       ac_prog_rejected=yes
5297       continue
5298     fi
5299    ac_cv_prog_CC="cc"
5300    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5301    break 2
5302  fi
5303done
5304  done
5305IFS=$as_save_IFS
5306
5307if test $ac_prog_rejected = yes; then
5308  # We found a bogon in the path, so make sure we never use it.
5309  set dummy $ac_cv_prog_CC
5310  shift
5311  if test $# != 0; then
5312    # We chose a different compiler from the bogus one.
5313    # However, it has the same basename, so the bogon will be chosen
5314    # first if we set CC to just the basename; use the full file name.
5315    shift
5316    ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
5317  fi
5318fi
5319fi
5320fi
5321CC=$ac_cv_prog_CC
5322if test -n "$CC"; then
5323  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5324printf "%s\n" "$CC" >&6; }
5325else
5326  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5327printf "%s\n" "no" >&6; }
5328fi
5329
5330
5331fi
5332if test -z "$CC"; then
5333  if test -n "$ac_tool_prefix"; then
5334  for ac_prog in cl.exe
5335  do
5336    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5337set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5338{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5339printf %s "checking for $ac_word... " >&6; }
5340if test ${ac_cv_prog_CC+y}
5341then :
5342  printf %s "(cached) " >&6
5343else $as_nop
5344  if test -n "$CC"; then
5345  ac_cv_prog_CC="$CC" # Let the user override the test.
5346else
5347as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5348for as_dir in $PATH
5349do
5350  IFS=$as_save_IFS
5351  case $as_dir in #(((
5352    '') as_dir=./ ;;
5353    */) ;;
5354    *) as_dir=$as_dir/ ;;
5355  esac
5356    for ac_exec_ext in '' $ac_executable_extensions; do
5357  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5358    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5359    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5360    break 2
5361  fi
5362done
5363  done
5364IFS=$as_save_IFS
5365
5366fi
5367fi
5368CC=$ac_cv_prog_CC
5369if test -n "$CC"; then
5370  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5371printf "%s\n" "$CC" >&6; }
5372else
5373  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5374printf "%s\n" "no" >&6; }
5375fi
5376
5377
5378    test -n "$CC" && break
5379  done
5380fi
5381if test -z "$CC"; then
5382  ac_ct_CC=$CC
5383  for ac_prog in cl.exe
5384do
5385  # Extract the first word of "$ac_prog", so it can be a program name with args.
5386set dummy $ac_prog; ac_word=$2
5387{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5388printf %s "checking for $ac_word... " >&6; }
5389if test ${ac_cv_prog_ac_ct_CC+y}
5390then :
5391  printf %s "(cached) " >&6
5392else $as_nop
5393  if test -n "$ac_ct_CC"; then
5394  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5395else
5396as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5397for as_dir in $PATH
5398do
5399  IFS=$as_save_IFS
5400  case $as_dir in #(((
5401    '') as_dir=./ ;;
5402    */) ;;
5403    *) as_dir=$as_dir/ ;;
5404  esac
5405    for ac_exec_ext in '' $ac_executable_extensions; do
5406  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5407    ac_cv_prog_ac_ct_CC="$ac_prog"
5408    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5409    break 2
5410  fi
5411done
5412  done
5413IFS=$as_save_IFS
5414
5415fi
5416fi
5417ac_ct_CC=$ac_cv_prog_ac_ct_CC
5418if test -n "$ac_ct_CC"; then
5419  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5420printf "%s\n" "$ac_ct_CC" >&6; }
5421else
5422  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5423printf "%s\n" "no" >&6; }
5424fi
5425
5426
5427  test -n "$ac_ct_CC" && break
5428done
5429
5430  if test "x$ac_ct_CC" = x; then
5431    CC=""
5432  else
5433    case $cross_compiling:$ac_tool_warned in
5434yes:)
5435{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5436printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5437ac_tool_warned=yes ;;
5438esac
5439    CC=$ac_ct_CC
5440  fi
5441fi
5442
5443fi
5444if test -z "$CC"; then
5445  if test -n "$ac_tool_prefix"; then
5446  # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
5447set dummy ${ac_tool_prefix}clang; ac_word=$2
5448{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5449printf %s "checking for $ac_word... " >&6; }
5450if test ${ac_cv_prog_CC+y}
5451then :
5452  printf %s "(cached) " >&6
5453else $as_nop
5454  if test -n "$CC"; then
5455  ac_cv_prog_CC="$CC" # Let the user override the test.
5456else
5457as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5458for as_dir in $PATH
5459do
5460  IFS=$as_save_IFS
5461  case $as_dir in #(((
5462    '') as_dir=./ ;;
5463    */) ;;
5464    *) as_dir=$as_dir/ ;;
5465  esac
5466    for ac_exec_ext in '' $ac_executable_extensions; do
5467  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5468    ac_cv_prog_CC="${ac_tool_prefix}clang"
5469    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5470    break 2
5471  fi
5472done
5473  done
5474IFS=$as_save_IFS
5475
5476fi
5477fi
5478CC=$ac_cv_prog_CC
5479if test -n "$CC"; then
5480  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5481printf "%s\n" "$CC" >&6; }
5482else
5483  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5484printf "%s\n" "no" >&6; }
5485fi
5486
5487
5488fi
5489if test -z "$ac_cv_prog_CC"; then
5490  ac_ct_CC=$CC
5491  # Extract the first word of "clang", so it can be a program name with args.
5492set dummy clang; ac_word=$2
5493{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5494printf %s "checking for $ac_word... " >&6; }
5495if test ${ac_cv_prog_ac_ct_CC+y}
5496then :
5497  printf %s "(cached) " >&6
5498else $as_nop
5499  if test -n "$ac_ct_CC"; then
5500  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5501else
5502as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5503for as_dir in $PATH
5504do
5505  IFS=$as_save_IFS
5506  case $as_dir in #(((
5507    '') as_dir=./ ;;
5508    */) ;;
5509    *) as_dir=$as_dir/ ;;
5510  esac
5511    for ac_exec_ext in '' $ac_executable_extensions; do
5512  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5513    ac_cv_prog_ac_ct_CC="clang"
5514    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5515    break 2
5516  fi
5517done
5518  done
5519IFS=$as_save_IFS
5520
5521fi
5522fi
5523ac_ct_CC=$ac_cv_prog_ac_ct_CC
5524if test -n "$ac_ct_CC"; then
5525  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5526printf "%s\n" "$ac_ct_CC" >&6; }
5527else
5528  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5529printf "%s\n" "no" >&6; }
5530fi
5531
5532  if test "x$ac_ct_CC" = x; then
5533    CC=""
5534  else
5535    case $cross_compiling:$ac_tool_warned in
5536yes:)
5537{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5538printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5539ac_tool_warned=yes ;;
5540esac
5541    CC=$ac_ct_CC
5542  fi
5543else
5544  CC="$ac_cv_prog_CC"
5545fi
5546
5547fi
5548
5549
5550test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5551printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5552as_fn_error $? "no acceptable C compiler found in \$PATH
5553See \`config.log' for more details" "$LINENO" 5; }
5554
5555# Provide some information about the compiler.
5556printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5557set X $ac_compile
5558ac_compiler=$2
5559for ac_option in --version -v -V -qversion -version; do
5560  { { ac_try="$ac_compiler $ac_option >&5"
5561case "(($ac_try" in
5562  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5563  *) ac_try_echo=$ac_try;;
5564esac
5565eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5566printf "%s\n" "$ac_try_echo"; } >&5
5567  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5568  ac_status=$?
5569  if test -s conftest.err; then
5570    sed '10a\
5571... rest of stderr output deleted ...
5572         10q' conftest.err >conftest.er1
5573    cat conftest.er1 >&5
5574  fi
5575  rm -f conftest.er1 conftest.err
5576  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5577  test $ac_status = 0; }
5578done
5579
5580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5581/* end confdefs.h.  */
5582
5583int
5584main (void)
5585{
5586
5587  ;
5588  return 0;
5589}
5590_ACEOF
5591ac_clean_files_save=$ac_clean_files
5592ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5593# Try to create an executable without -o first, disregard a.out.
5594# It will help us diagnose broken compilers, and finding out an intuition
5595# of exeext.
5596{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5597printf %s "checking whether the C compiler works... " >&6; }
5598ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5599
5600# The possible output files:
5601ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5602
5603ac_rmfiles=
5604for ac_file in $ac_files
5605do
5606  case $ac_file in
5607    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5608    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5609  esac
5610done
5611rm -f $ac_rmfiles
5612
5613if { { ac_try="$ac_link_default"
5614case "(($ac_try" in
5615  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5616  *) ac_try_echo=$ac_try;;
5617esac
5618eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5619printf "%s\n" "$ac_try_echo"; } >&5
5620  (eval "$ac_link_default") 2>&5
5621  ac_status=$?
5622  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5623  test $ac_status = 0; }
5624then :
5625  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5626# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5627# in a Makefile.  We should not override ac_cv_exeext if it was cached,
5628# so that the user can short-circuit this test for compilers unknown to
5629# Autoconf.
5630for ac_file in $ac_files ''
5631do
5632  test -f "$ac_file" || continue
5633  case $ac_file in
5634    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5635	;;
5636    [ab].out )
5637	# We found the default executable, but exeext='' is most
5638	# certainly right.
5639	break;;
5640    *.* )
5641	if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
5642	then :; else
5643	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5644	fi
5645	# We set ac_cv_exeext here because the later test for it is not
5646	# safe: cross compilers may not add the suffix if given an `-o'
5647	# argument, so we may need to know it at that point already.
5648	# Even if this section looks crufty: it has the advantage of
5649	# actually working.
5650	break;;
5651    * )
5652	break;;
5653  esac
5654done
5655test "$ac_cv_exeext" = no && ac_cv_exeext=
5656
5657else $as_nop
5658  ac_file=''
5659fi
5660if test -z "$ac_file"
5661then :
5662  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5663printf "%s\n" "no" >&6; }
5664printf "%s\n" "$as_me: failed program was:" >&5
5665sed 's/^/| /' conftest.$ac_ext >&5
5666
5667{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5668printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5669as_fn_error 77 "C compiler cannot create executables
5670See \`config.log' for more details" "$LINENO" 5; }
5671else $as_nop
5672  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5673printf "%s\n" "yes" >&6; }
5674fi
5675{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5676printf %s "checking for C compiler default output file name... " >&6; }
5677{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5678printf "%s\n" "$ac_file" >&6; }
5679ac_exeext=$ac_cv_exeext
5680
5681rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5682ac_clean_files=$ac_clean_files_save
5683{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5684printf %s "checking for suffix of executables... " >&6; }
5685if { { ac_try="$ac_link"
5686case "(($ac_try" in
5687  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5688  *) ac_try_echo=$ac_try;;
5689esac
5690eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5691printf "%s\n" "$ac_try_echo"; } >&5
5692  (eval "$ac_link") 2>&5
5693  ac_status=$?
5694  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5695  test $ac_status = 0; }
5696then :
5697  # If both `conftest.exe' and `conftest' are `present' (well, observable)
5698# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
5699# work properly (i.e., refer to `conftest.exe'), while it won't with
5700# `rm'.
5701for ac_file in conftest.exe conftest conftest.*; do
5702  test -f "$ac_file" || continue
5703  case $ac_file in
5704    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5705    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5706	  break;;
5707    * ) break;;
5708  esac
5709done
5710else $as_nop
5711  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5712printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5713as_fn_error $? "cannot compute suffix of executables: cannot compile and link
5714See \`config.log' for more details" "$LINENO" 5; }
5715fi
5716rm -f conftest conftest$ac_cv_exeext
5717{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5718printf "%s\n" "$ac_cv_exeext" >&6; }
5719
5720rm -f conftest.$ac_ext
5721EXEEXT=$ac_cv_exeext
5722ac_exeext=$EXEEXT
5723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5724/* end confdefs.h.  */
5725#include <stdio.h>
5726int
5727main (void)
5728{
5729FILE *f = fopen ("conftest.out", "w");
5730 return ferror (f) || fclose (f) != 0;
5731
5732  ;
5733  return 0;
5734}
5735_ACEOF
5736ac_clean_files="$ac_clean_files conftest.out"
5737# Check that the compiler produces executables we can run.  If not, either
5738# the compiler is broken, or we cross compile.
5739{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5740printf %s "checking whether we are cross compiling... " >&6; }
5741if test "$cross_compiling" != yes; then
5742  { { ac_try="$ac_link"
5743case "(($ac_try" in
5744  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5745  *) ac_try_echo=$ac_try;;
5746esac
5747eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5748printf "%s\n" "$ac_try_echo"; } >&5
5749  (eval "$ac_link") 2>&5
5750  ac_status=$?
5751  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5752  test $ac_status = 0; }
5753  if { ac_try='./conftest$ac_cv_exeext'
5754  { { case "(($ac_try" in
5755  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5756  *) ac_try_echo=$ac_try;;
5757esac
5758eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5759printf "%s\n" "$ac_try_echo"; } >&5
5760  (eval "$ac_try") 2>&5
5761  ac_status=$?
5762  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5763  test $ac_status = 0; }; }; then
5764    cross_compiling=no
5765  else
5766    if test "$cross_compiling" = maybe; then
5767	cross_compiling=yes
5768    else
5769	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5770printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5771as_fn_error 77 "cannot run C compiled programs.
5772If you meant to cross compile, use \`--host'.
5773See \`config.log' for more details" "$LINENO" 5; }
5774    fi
5775  fi
5776fi
5777{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5778printf "%s\n" "$cross_compiling" >&6; }
5779
5780rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5781ac_clean_files=$ac_clean_files_save
5782{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5783printf %s "checking for suffix of object files... " >&6; }
5784if test ${ac_cv_objext+y}
5785then :
5786  printf %s "(cached) " >&6
5787else $as_nop
5788  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5789/* end confdefs.h.  */
5790
5791int
5792main (void)
5793{
5794
5795  ;
5796  return 0;
5797}
5798_ACEOF
5799rm -f conftest.o conftest.obj
5800if { { ac_try="$ac_compile"
5801case "(($ac_try" in
5802  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5803  *) ac_try_echo=$ac_try;;
5804esac
5805eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5806printf "%s\n" "$ac_try_echo"; } >&5
5807  (eval "$ac_compile") 2>&5
5808  ac_status=$?
5809  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5810  test $ac_status = 0; }
5811then :
5812  for ac_file in conftest.o conftest.obj conftest.*; do
5813  test -f "$ac_file" || continue;
5814  case $ac_file in
5815    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5816    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5817       break;;
5818  esac
5819done
5820else $as_nop
5821  printf "%s\n" "$as_me: failed program was:" >&5
5822sed 's/^/| /' conftest.$ac_ext >&5
5823
5824{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5825printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5826as_fn_error $? "cannot compute suffix of object files: cannot compile
5827See \`config.log' for more details" "$LINENO" 5; }
5828fi
5829rm -f conftest.$ac_cv_objext conftest.$ac_ext
5830fi
5831{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5832printf "%s\n" "$ac_cv_objext" >&6; }
5833OBJEXT=$ac_cv_objext
5834ac_objext=$OBJEXT
5835{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
5836printf %s "checking whether the compiler supports GNU C... " >&6; }
5837if test ${ac_cv_c_compiler_gnu+y}
5838then :
5839  printf %s "(cached) " >&6
5840else $as_nop
5841  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5842/* end confdefs.h.  */
5843
5844int
5845main (void)
5846{
5847#ifndef __GNUC__
5848       choke me
5849#endif
5850
5851  ;
5852  return 0;
5853}
5854_ACEOF
5855if ac_fn_c_try_compile "$LINENO"
5856then :
5857  ac_compiler_gnu=yes
5858else $as_nop
5859  ac_compiler_gnu=no
5860fi
5861rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5862ac_cv_c_compiler_gnu=$ac_compiler_gnu
5863
5864fi
5865{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5866printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
5867ac_compiler_gnu=$ac_cv_c_compiler_gnu
5868
5869if test $ac_compiler_gnu = yes; then
5870  GCC=yes
5871else
5872  GCC=
5873fi
5874ac_test_CFLAGS=${CFLAGS+y}
5875ac_save_CFLAGS=$CFLAGS
5876{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5877printf %s "checking whether $CC accepts -g... " >&6; }
5878if test ${ac_cv_prog_cc_g+y}
5879then :
5880  printf %s "(cached) " >&6
5881else $as_nop
5882  ac_save_c_werror_flag=$ac_c_werror_flag
5883   ac_c_werror_flag=yes
5884   ac_cv_prog_cc_g=no
5885   CFLAGS="-g"
5886   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5887/* end confdefs.h.  */
5888
5889int
5890main (void)
5891{
5892
5893  ;
5894  return 0;
5895}
5896_ACEOF
5897if ac_fn_c_try_compile "$LINENO"
5898then :
5899  ac_cv_prog_cc_g=yes
5900else $as_nop
5901  CFLAGS=""
5902      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5903/* end confdefs.h.  */
5904
5905int
5906main (void)
5907{
5908
5909  ;
5910  return 0;
5911}
5912_ACEOF
5913if ac_fn_c_try_compile "$LINENO"
5914then :
5915
5916else $as_nop
5917  ac_c_werror_flag=$ac_save_c_werror_flag
5918	 CFLAGS="-g"
5919	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5920/* end confdefs.h.  */
5921
5922int
5923main (void)
5924{
5925
5926  ;
5927  return 0;
5928}
5929_ACEOF
5930if ac_fn_c_try_compile "$LINENO"
5931then :
5932  ac_cv_prog_cc_g=yes
5933fi
5934rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5935fi
5936rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5937fi
5938rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5939   ac_c_werror_flag=$ac_save_c_werror_flag
5940fi
5941{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5942printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
5943if test $ac_test_CFLAGS; then
5944  CFLAGS=$ac_save_CFLAGS
5945elif test $ac_cv_prog_cc_g = yes; then
5946  if test "$GCC" = yes; then
5947    CFLAGS="-g -O2"
5948  else
5949    CFLAGS="-g"
5950  fi
5951else
5952  if test "$GCC" = yes; then
5953    CFLAGS="-O2"
5954  else
5955    CFLAGS=
5956  fi
5957fi
5958ac_prog_cc_stdc=no
5959if test x$ac_prog_cc_stdc = xno
5960then :
5961  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
5962printf %s "checking for $CC option to enable C11 features... " >&6; }
5963if test ${ac_cv_prog_cc_c11+y}
5964then :
5965  printf %s "(cached) " >&6
5966else $as_nop
5967  ac_cv_prog_cc_c11=no
5968ac_save_CC=$CC
5969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5970/* end confdefs.h.  */
5971$ac_c_conftest_c11_program
5972_ACEOF
5973for ac_arg in '' -std=gnu11
5974do
5975  CC="$ac_save_CC $ac_arg"
5976  if ac_fn_c_try_compile "$LINENO"
5977then :
5978  ac_cv_prog_cc_c11=$ac_arg
5979fi
5980rm -f core conftest.err conftest.$ac_objext conftest.beam
5981  test "x$ac_cv_prog_cc_c11" != "xno" && break
5982done
5983rm -f conftest.$ac_ext
5984CC=$ac_save_CC
5985fi
5986
5987if test "x$ac_cv_prog_cc_c11" = xno
5988then :
5989  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5990printf "%s\n" "unsupported" >&6; }
5991else $as_nop
5992  if test "x$ac_cv_prog_cc_c11" = x
5993then :
5994  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5995printf "%s\n" "none needed" >&6; }
5996else $as_nop
5997  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
5998printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
5999     CC="$CC $ac_cv_prog_cc_c11"
6000fi
6001  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
6002  ac_prog_cc_stdc=c11
6003fi
6004fi
6005if test x$ac_prog_cc_stdc = xno
6006then :
6007  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
6008printf %s "checking for $CC option to enable C99 features... " >&6; }
6009if test ${ac_cv_prog_cc_c99+y}
6010then :
6011  printf %s "(cached) " >&6
6012else $as_nop
6013  ac_cv_prog_cc_c99=no
6014ac_save_CC=$CC
6015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6016/* end confdefs.h.  */
6017$ac_c_conftest_c99_program
6018_ACEOF
6019for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
6020do
6021  CC="$ac_save_CC $ac_arg"
6022  if ac_fn_c_try_compile "$LINENO"
6023then :
6024  ac_cv_prog_cc_c99=$ac_arg
6025fi
6026rm -f core conftest.err conftest.$ac_objext conftest.beam
6027  test "x$ac_cv_prog_cc_c99" != "xno" && break
6028done
6029rm -f conftest.$ac_ext
6030CC=$ac_save_CC
6031fi
6032
6033if test "x$ac_cv_prog_cc_c99" = xno
6034then :
6035  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6036printf "%s\n" "unsupported" >&6; }
6037else $as_nop
6038  if test "x$ac_cv_prog_cc_c99" = x
6039then :
6040  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6041printf "%s\n" "none needed" >&6; }
6042else $as_nop
6043  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
6044printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
6045     CC="$CC $ac_cv_prog_cc_c99"
6046fi
6047  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
6048  ac_prog_cc_stdc=c99
6049fi
6050fi
6051if test x$ac_prog_cc_stdc = xno
6052then :
6053  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
6054printf %s "checking for $CC option to enable C89 features... " >&6; }
6055if test ${ac_cv_prog_cc_c89+y}
6056then :
6057  printf %s "(cached) " >&6
6058else $as_nop
6059  ac_cv_prog_cc_c89=no
6060ac_save_CC=$CC
6061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6062/* end confdefs.h.  */
6063$ac_c_conftest_c89_program
6064_ACEOF
6065for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6066do
6067  CC="$ac_save_CC $ac_arg"
6068  if ac_fn_c_try_compile "$LINENO"
6069then :
6070  ac_cv_prog_cc_c89=$ac_arg
6071fi
6072rm -f core conftest.err conftest.$ac_objext conftest.beam
6073  test "x$ac_cv_prog_cc_c89" != "xno" && break
6074done
6075rm -f conftest.$ac_ext
6076CC=$ac_save_CC
6077fi
6078
6079if test "x$ac_cv_prog_cc_c89" = xno
6080then :
6081  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6082printf "%s\n" "unsupported" >&6; }
6083else $as_nop
6084  if test "x$ac_cv_prog_cc_c89" = x
6085then :
6086  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6087printf "%s\n" "none needed" >&6; }
6088else $as_nop
6089  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6090printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
6091     CC="$CC $ac_cv_prog_cc_c89"
6092fi
6093  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
6094  ac_prog_cc_stdc=c89
6095fi
6096fi
6097
6098ac_ext=c
6099ac_cpp='$CPP $CPPFLAGS'
6100ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6101ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6102ac_compiler_gnu=$ac_cv_c_compiler_gnu
6103
6104
6105  ac_ext=c
6106ac_cpp='$CPP $CPPFLAGS'
6107ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6108ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6109ac_compiler_gnu=$ac_cv_c_compiler_gnu
6110{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
6111printf %s "checking whether $CC understands -c and -o together... " >&6; }
6112if test ${am_cv_prog_cc_c_o+y}
6113then :
6114  printf %s "(cached) " >&6
6115else $as_nop
6116  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6117/* end confdefs.h.  */
6118
6119int
6120main (void)
6121{
6122
6123  ;
6124  return 0;
6125}
6126_ACEOF
6127  # Make sure it works both with $CC and with simple cc.
6128  # Following AC_PROG_CC_C_O, we do the test twice because some
6129  # compilers refuse to overwrite an existing .o file with -o,
6130  # though they will create one.
6131  am_cv_prog_cc_c_o=yes
6132  for am_i in 1 2; do
6133    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
6134   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
6135   ac_status=$?
6136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6137   (exit $ac_status); } \
6138         && test -f conftest2.$ac_objext; then
6139      : OK
6140    else
6141      am_cv_prog_cc_c_o=no
6142      break
6143    fi
6144  done
6145  rm -f core conftest*
6146  unset am_i
6147fi
6148{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
6149printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
6150if test "$am_cv_prog_cc_c_o" != yes; then
6151   # Losing compiler, so override with the script.
6152   # FIXME: It is wrong to rewrite CC.
6153   # But if we don't then we get into trouble of one sort or another.
6154   # A longer-term fix would be to have automake use am__CC in this case,
6155   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
6156   CC="$am_aux_dir/compile $CC"
6157fi
6158ac_ext=c
6159ac_cpp='$CPP $CPPFLAGS'
6160ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6161ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6162ac_compiler_gnu=$ac_cv_c_compiler_gnu
6163
6164
6165
6166  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
6167printf %s "checking whether the compiler is clang... " >&6; }
6168if test ${gl_cv_compiler_clang+y}
6169then :
6170  printf %s "(cached) " >&6
6171else $as_nop
6172                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6173/* end confdefs.h.  */
6174
6175           #ifdef __clang__
6176           barfbarf
6177           #endif
6178
6179int
6180main (void)
6181{
6182
6183  ;
6184  return 0;
6185}
6186
6187_ACEOF
6188if ac_fn_c_try_compile "$LINENO"
6189then :
6190  gl_cv_compiler_clang=no
6191else $as_nop
6192  gl_cv_compiler_clang=yes
6193fi
6194rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6195
6196fi
6197{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_clang" >&5
6198printf "%s\n" "$gl_cv_compiler_clang" >&6; }
6199
6200
6201  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compiler option needed when checking for declarations" >&5
6202printf %s "checking for compiler option needed when checking for declarations... " >&6; }
6203if test ${gl_cv_compiler_check_decl_option+y}
6204then :
6205  printf %s "(cached) " >&6
6206else $as_nop
6207  if test $gl_cv_compiler_clang = yes; then
6208                     save_ac_compile="$ac_compile"
6209       ac_compile="$ac_compile -Werror=implicit-function-declaration"
6210                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6211/* end confdefs.h.  */
6212
6213int
6214main (void)
6215{
6216
6217  ;
6218  return 0;
6219}
6220_ACEOF
6221if ac_fn_c_try_compile "$LINENO"
6222then :
6223  gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'
6224else $as_nop
6225  gl_cv_compiler_check_decl_option=none
6226fi
6227rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6228       ac_compile="$save_ac_compile"
6229     else
6230       gl_cv_compiler_check_decl_option=none
6231     fi
6232
6233fi
6234{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_check_decl_option" >&5
6235printf "%s\n" "$gl_cv_compiler_check_decl_option" >&6; }
6236  if test "x$gl_cv_compiler_check_decl_option" != xnone; then
6237    ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option"
6238  else
6239    ac_compile_for_check_decl="$ac_compile"
6240  fi
6241
6242
6243depcc="$CC"   am_compiler_list=
6244
6245{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6246printf %s "checking dependency style of $depcc... " >&6; }
6247if test ${am_cv_CC_dependencies_compiler_type+y}
6248then :
6249  printf %s "(cached) " >&6
6250else $as_nop
6251  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6252  # We make a subdir and do the tests there.  Otherwise we can end up
6253  # making bogus files that we don't know about and never remove.  For
6254  # instance it was reported that on HP-UX the gcc test will end up
6255  # making a dummy file named 'D' -- because '-MD' means "put the output
6256  # in D".
6257  rm -rf conftest.dir
6258  mkdir conftest.dir
6259  # Copy depcomp to subdir because otherwise we won't find it if we're
6260  # using a relative directory.
6261  cp "$am_depcomp" conftest.dir
6262  cd conftest.dir
6263  # We will build objects and dependencies in a subdirectory because
6264  # it helps to detect inapplicable dependency modes.  For instance
6265  # both Tru64's cc and ICC support -MD to output dependencies as a
6266  # side effect of compilation, but ICC will put the dependencies in
6267  # the current directory while Tru64 will put them in the object
6268  # directory.
6269  mkdir sub
6270
6271  am_cv_CC_dependencies_compiler_type=none
6272  if test "$am_compiler_list" = ""; then
6273     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6274  fi
6275  am__universal=false
6276  case " $depcc " in #(
6277     *\ -arch\ *\ -arch\ *) am__universal=true ;;
6278     esac
6279
6280  for depmode in $am_compiler_list; do
6281    # Setup a source with many dependencies, because some compilers
6282    # like to wrap large dependency lists on column 80 (with \), and
6283    # we should not choose a depcomp mode which is confused by this.
6284    #
6285    # We need to recreate these files for each test, as the compiler may
6286    # overwrite some of them when testing with obscure command lines.
6287    # This happens at least with the AIX C compiler.
6288    : > sub/conftest.c
6289    for i in 1 2 3 4 5 6; do
6290      echo '#include "conftst'$i'.h"' >> sub/conftest.c
6291      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
6292      # Solaris 10 /bin/sh.
6293      echo '/* dummy */' > sub/conftst$i.h
6294    done
6295    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6296
6297    # We check with '-c' and '-o' for the sake of the "dashmstdout"
6298    # mode.  It turns out that the SunPro C++ compiler does not properly
6299    # handle '-M -o', and we need to detect this.  Also, some Intel
6300    # versions had trouble with output in subdirs.
6301    am__obj=sub/conftest.${OBJEXT-o}
6302    am__minus_obj="-o $am__obj"
6303    case $depmode in
6304    gcc)
6305      # This depmode causes a compiler race in universal mode.
6306      test "$am__universal" = false || continue
6307      ;;
6308    nosideeffect)
6309      # After this tag, mechanisms are not by side-effect, so they'll
6310      # only be used when explicitly requested.
6311      if test "x$enable_dependency_tracking" = xyes; then
6312	continue
6313      else
6314	break
6315      fi
6316      ;;
6317    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
6318      # This compiler won't grok '-c -o', but also, the minuso test has
6319      # not run yet.  These depmodes are late enough in the game, and
6320      # so weak that their functioning should not be impacted.
6321      am__obj=conftest.${OBJEXT-o}
6322      am__minus_obj=
6323      ;;
6324    none) break ;;
6325    esac
6326    if depmode=$depmode \
6327       source=sub/conftest.c object=$am__obj \
6328       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6329       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
6330         >/dev/null 2>conftest.err &&
6331       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
6332       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6333       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
6334       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6335      # icc doesn't choke on unknown options, it will just issue warnings
6336      # or remarks (even with -Werror).  So we grep stderr for any message
6337      # that says an option was ignored or not supported.
6338      # When given -MP, icc 7.0 and 7.1 complain thusly:
6339      #   icc: Command line warning: ignoring option '-M'; no argument required
6340      # The diagnosis changed in icc 8.0:
6341      #   icc: Command line remark: option '-MP' not supported
6342      if (grep 'ignoring option' conftest.err ||
6343          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6344        am_cv_CC_dependencies_compiler_type=$depmode
6345        break
6346      fi
6347    fi
6348  done
6349
6350  cd ..
6351  rm -rf conftest.dir
6352else
6353  am_cv_CC_dependencies_compiler_type=none
6354fi
6355
6356fi
6357{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6358printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
6359CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6360
6361 if
6362  test "x$enable_dependency_tracking" != xno \
6363  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
6364  am__fastdepCC_TRUE=
6365  am__fastdepCC_FALSE='#'
6366else
6367  am__fastdepCC_TRUE='#'
6368  am__fastdepCC_FALSE=
6369fi
6370
6371
6372
6373ac_header= ac_cache=
6374for ac_item in $ac_header_c_list
6375do
6376  if test $ac_cache; then
6377    ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
6378    if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
6379      printf "%s\n" "#define $ac_item 1" >> confdefs.h
6380    fi
6381    ac_header= ac_cache=
6382  elif test $ac_header; then
6383    ac_cache=$ac_item
6384  else
6385    ac_header=$ac_item
6386  fi
6387done
6388
6389
6390
6391
6392
6393
6394
6395
6396if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
6397then :
6398
6399printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
6400
6401fi
6402
6403
6404
6405
6406
6407
6408  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6409printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6410if test ${ac_cv_safe_to_define___extensions__+y}
6411then :
6412  printf %s "(cached) " >&6
6413else $as_nop
6414  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6415/* end confdefs.h.  */
6416
6417#         define __EXTENSIONS__ 1
6418          $ac_includes_default
6419int
6420main (void)
6421{
6422
6423  ;
6424  return 0;
6425}
6426_ACEOF
6427if ac_fn_c_try_compile "$LINENO"
6428then :
6429  ac_cv_safe_to_define___extensions__=yes
6430else $as_nop
6431  ac_cv_safe_to_define___extensions__=no
6432fi
6433rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6434fi
6435{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6436printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
6437
6438  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6439printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6440if test ${ac_cv_should_define__xopen_source+y}
6441then :
6442  printf %s "(cached) " >&6
6443else $as_nop
6444  ac_cv_should_define__xopen_source=no
6445    if test $ac_cv_header_wchar_h = yes
6446then :
6447  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6448/* end confdefs.h.  */
6449
6450          #include <wchar.h>
6451          mbstate_t x;
6452int
6453main (void)
6454{
6455
6456  ;
6457  return 0;
6458}
6459_ACEOF
6460if ac_fn_c_try_compile "$LINENO"
6461then :
6462
6463else $as_nop
6464  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6465/* end confdefs.h.  */
6466
6467            #define _XOPEN_SOURCE 500
6468            #include <wchar.h>
6469            mbstate_t x;
6470int
6471main (void)
6472{
6473
6474  ;
6475  return 0;
6476}
6477_ACEOF
6478if ac_fn_c_try_compile "$LINENO"
6479then :
6480  ac_cv_should_define__xopen_source=yes
6481fi
6482rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6483fi
6484rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6485fi
6486fi
6487{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6488printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
6489
6490  printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
6491
6492  printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6493
6494  printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
6495
6496  printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
6497
6498  printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
6499
6500  printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
6501
6502  printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6503
6504  printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
6505
6506  printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
6507
6508  printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
6509
6510  printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
6511
6512  printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
6513
6514  printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
6515
6516  printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
6517
6518  printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
6519
6520  if test $ac_cv_header_minix_config_h = yes
6521then :
6522  MINIX=yes
6523    printf "%s\n" "#define _MINIX 1" >>confdefs.h
6524
6525    printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
6526
6527    printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
6528
6529else $as_nop
6530  MINIX=
6531fi
6532  if test $ac_cv_safe_to_define___extensions__ = yes
6533then :
6534  printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
6535
6536fi
6537  if test $ac_cv_should_define__xopen_source = yes
6538then :
6539  printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
6540
6541fi
6542
6543ac_ext=c
6544ac_cpp='$CPP $CPPFLAGS'
6545ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6546ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6547ac_compiler_gnu=$ac_cv_c_compiler_gnu
6548if test -n "$ac_tool_prefix"; then
6549  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
6550set dummy ${ac_tool_prefix}gcc; ac_word=$2
6551{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6552printf %s "checking for $ac_word... " >&6; }
6553if test ${ac_cv_prog_CC+y}
6554then :
6555  printf %s "(cached) " >&6
6556else $as_nop
6557  if test -n "$CC"; then
6558  ac_cv_prog_CC="$CC" # Let the user override the test.
6559else
6560as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6561for as_dir in $PATH
6562do
6563  IFS=$as_save_IFS
6564  case $as_dir in #(((
6565    '') as_dir=./ ;;
6566    */) ;;
6567    *) as_dir=$as_dir/ ;;
6568  esac
6569    for ac_exec_ext in '' $ac_executable_extensions; do
6570  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6571    ac_cv_prog_CC="${ac_tool_prefix}gcc"
6572    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6573    break 2
6574  fi
6575done
6576  done
6577IFS=$as_save_IFS
6578
6579fi
6580fi
6581CC=$ac_cv_prog_CC
6582if test -n "$CC"; then
6583  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6584printf "%s\n" "$CC" >&6; }
6585else
6586  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6587printf "%s\n" "no" >&6; }
6588fi
6589
6590
6591fi
6592if test -z "$ac_cv_prog_CC"; then
6593  ac_ct_CC=$CC
6594  # Extract the first word of "gcc", so it can be a program name with args.
6595set dummy gcc; ac_word=$2
6596{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6597printf %s "checking for $ac_word... " >&6; }
6598if test ${ac_cv_prog_ac_ct_CC+y}
6599then :
6600  printf %s "(cached) " >&6
6601else $as_nop
6602  if test -n "$ac_ct_CC"; then
6603  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
6604else
6605as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6606for as_dir in $PATH
6607do
6608  IFS=$as_save_IFS
6609  case $as_dir in #(((
6610    '') as_dir=./ ;;
6611    */) ;;
6612    *) as_dir=$as_dir/ ;;
6613  esac
6614    for ac_exec_ext in '' $ac_executable_extensions; do
6615  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6616    ac_cv_prog_ac_ct_CC="gcc"
6617    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6618    break 2
6619  fi
6620done
6621  done
6622IFS=$as_save_IFS
6623
6624fi
6625fi
6626ac_ct_CC=$ac_cv_prog_ac_ct_CC
6627if test -n "$ac_ct_CC"; then
6628  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
6629printf "%s\n" "$ac_ct_CC" >&6; }
6630else
6631  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6632printf "%s\n" "no" >&6; }
6633fi
6634
6635  if test "x$ac_ct_CC" = x; then
6636    CC=""
6637  else
6638    case $cross_compiling:$ac_tool_warned in
6639yes:)
6640{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6641printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6642ac_tool_warned=yes ;;
6643esac
6644    CC=$ac_ct_CC
6645  fi
6646else
6647  CC="$ac_cv_prog_CC"
6648fi
6649
6650if test -z "$CC"; then
6651          if test -n "$ac_tool_prefix"; then
6652    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
6653set dummy ${ac_tool_prefix}cc; ac_word=$2
6654{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6655printf %s "checking for $ac_word... " >&6; }
6656if test ${ac_cv_prog_CC+y}
6657then :
6658  printf %s "(cached) " >&6
6659else $as_nop
6660  if test -n "$CC"; then
6661  ac_cv_prog_CC="$CC" # Let the user override the test.
6662else
6663as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6664for as_dir in $PATH
6665do
6666  IFS=$as_save_IFS
6667  case $as_dir in #(((
6668    '') as_dir=./ ;;
6669    */) ;;
6670    *) as_dir=$as_dir/ ;;
6671  esac
6672    for ac_exec_ext in '' $ac_executable_extensions; do
6673  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6674    ac_cv_prog_CC="${ac_tool_prefix}cc"
6675    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6676    break 2
6677  fi
6678done
6679  done
6680IFS=$as_save_IFS
6681
6682fi
6683fi
6684CC=$ac_cv_prog_CC
6685if test -n "$CC"; then
6686  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6687printf "%s\n" "$CC" >&6; }
6688else
6689  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6690printf "%s\n" "no" >&6; }
6691fi
6692
6693
6694  fi
6695fi
6696if test -z "$CC"; then
6697  # Extract the first word of "cc", so it can be a program name with args.
6698set dummy cc; ac_word=$2
6699{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6700printf %s "checking for $ac_word... " >&6; }
6701if test ${ac_cv_prog_CC+y}
6702then :
6703  printf %s "(cached) " >&6
6704else $as_nop
6705  if test -n "$CC"; then
6706  ac_cv_prog_CC="$CC" # Let the user override the test.
6707else
6708  ac_prog_rejected=no
6709as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6710for as_dir in $PATH
6711do
6712  IFS=$as_save_IFS
6713  case $as_dir in #(((
6714    '') as_dir=./ ;;
6715    */) ;;
6716    *) as_dir=$as_dir/ ;;
6717  esac
6718    for ac_exec_ext in '' $ac_executable_extensions; do
6719  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6720    if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
6721       ac_prog_rejected=yes
6722       continue
6723     fi
6724    ac_cv_prog_CC="cc"
6725    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6726    break 2
6727  fi
6728done
6729  done
6730IFS=$as_save_IFS
6731
6732if test $ac_prog_rejected = yes; then
6733  # We found a bogon in the path, so make sure we never use it.
6734  set dummy $ac_cv_prog_CC
6735  shift
6736  if test $# != 0; then
6737    # We chose a different compiler from the bogus one.
6738    # However, it has the same basename, so the bogon will be chosen
6739    # first if we set CC to just the basename; use the full file name.
6740    shift
6741    ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
6742  fi
6743fi
6744fi
6745fi
6746CC=$ac_cv_prog_CC
6747if test -n "$CC"; then
6748  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6749printf "%s\n" "$CC" >&6; }
6750else
6751  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6752printf "%s\n" "no" >&6; }
6753fi
6754
6755
6756fi
6757if test -z "$CC"; then
6758  if test -n "$ac_tool_prefix"; then
6759  for ac_prog in cl.exe
6760  do
6761    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6762set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6763{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6764printf %s "checking for $ac_word... " >&6; }
6765if test ${ac_cv_prog_CC+y}
6766then :
6767  printf %s "(cached) " >&6
6768else $as_nop
6769  if test -n "$CC"; then
6770  ac_cv_prog_CC="$CC" # Let the user override the test.
6771else
6772as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6773for as_dir in $PATH
6774do
6775  IFS=$as_save_IFS
6776  case $as_dir in #(((
6777    '') as_dir=./ ;;
6778    */) ;;
6779    *) as_dir=$as_dir/ ;;
6780  esac
6781    for ac_exec_ext in '' $ac_executable_extensions; do
6782  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6783    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
6784    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6785    break 2
6786  fi
6787done
6788  done
6789IFS=$as_save_IFS
6790
6791fi
6792fi
6793CC=$ac_cv_prog_CC
6794if test -n "$CC"; then
6795  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6796printf "%s\n" "$CC" >&6; }
6797else
6798  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6799printf "%s\n" "no" >&6; }
6800fi
6801
6802
6803    test -n "$CC" && break
6804  done
6805fi
6806if test -z "$CC"; then
6807  ac_ct_CC=$CC
6808  for ac_prog in cl.exe
6809do
6810  # Extract the first word of "$ac_prog", so it can be a program name with args.
6811set dummy $ac_prog; ac_word=$2
6812{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6813printf %s "checking for $ac_word... " >&6; }
6814if test ${ac_cv_prog_ac_ct_CC+y}
6815then :
6816  printf %s "(cached) " >&6
6817else $as_nop
6818  if test -n "$ac_ct_CC"; then
6819  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
6820else
6821as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6822for as_dir in $PATH
6823do
6824  IFS=$as_save_IFS
6825  case $as_dir in #(((
6826    '') as_dir=./ ;;
6827    */) ;;
6828    *) as_dir=$as_dir/ ;;
6829  esac
6830    for ac_exec_ext in '' $ac_executable_extensions; do
6831  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6832    ac_cv_prog_ac_ct_CC="$ac_prog"
6833    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6834    break 2
6835  fi
6836done
6837  done
6838IFS=$as_save_IFS
6839
6840fi
6841fi
6842ac_ct_CC=$ac_cv_prog_ac_ct_CC
6843if test -n "$ac_ct_CC"; then
6844  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
6845printf "%s\n" "$ac_ct_CC" >&6; }
6846else
6847  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6848printf "%s\n" "no" >&6; }
6849fi
6850
6851
6852  test -n "$ac_ct_CC" && break
6853done
6854
6855  if test "x$ac_ct_CC" = x; then
6856    CC=""
6857  else
6858    case $cross_compiling:$ac_tool_warned in
6859yes:)
6860{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6861printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6862ac_tool_warned=yes ;;
6863esac
6864    CC=$ac_ct_CC
6865  fi
6866fi
6867
6868fi
6869if test -z "$CC"; then
6870  if test -n "$ac_tool_prefix"; then
6871  # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
6872set dummy ${ac_tool_prefix}clang; ac_word=$2
6873{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6874printf %s "checking for $ac_word... " >&6; }
6875if test ${ac_cv_prog_CC+y}
6876then :
6877  printf %s "(cached) " >&6
6878else $as_nop
6879  if test -n "$CC"; then
6880  ac_cv_prog_CC="$CC" # Let the user override the test.
6881else
6882as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6883for as_dir in $PATH
6884do
6885  IFS=$as_save_IFS
6886  case $as_dir in #(((
6887    '') as_dir=./ ;;
6888    */) ;;
6889    *) as_dir=$as_dir/ ;;
6890  esac
6891    for ac_exec_ext in '' $ac_executable_extensions; do
6892  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6893    ac_cv_prog_CC="${ac_tool_prefix}clang"
6894    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6895    break 2
6896  fi
6897done
6898  done
6899IFS=$as_save_IFS
6900
6901fi
6902fi
6903CC=$ac_cv_prog_CC
6904if test -n "$CC"; then
6905  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6906printf "%s\n" "$CC" >&6; }
6907else
6908  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6909printf "%s\n" "no" >&6; }
6910fi
6911
6912
6913fi
6914if test -z "$ac_cv_prog_CC"; then
6915  ac_ct_CC=$CC
6916  # Extract the first word of "clang", so it can be a program name with args.
6917set dummy clang; ac_word=$2
6918{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6919printf %s "checking for $ac_word... " >&6; }
6920if test ${ac_cv_prog_ac_ct_CC+y}
6921then :
6922  printf %s "(cached) " >&6
6923else $as_nop
6924  if test -n "$ac_ct_CC"; then
6925  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
6926else
6927as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6928for as_dir in $PATH
6929do
6930  IFS=$as_save_IFS
6931  case $as_dir in #(((
6932    '') as_dir=./ ;;
6933    */) ;;
6934    *) as_dir=$as_dir/ ;;
6935  esac
6936    for ac_exec_ext in '' $ac_executable_extensions; do
6937  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6938    ac_cv_prog_ac_ct_CC="clang"
6939    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6940    break 2
6941  fi
6942done
6943  done
6944IFS=$as_save_IFS
6945
6946fi
6947fi
6948ac_ct_CC=$ac_cv_prog_ac_ct_CC
6949if test -n "$ac_ct_CC"; then
6950  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
6951printf "%s\n" "$ac_ct_CC" >&6; }
6952else
6953  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6954printf "%s\n" "no" >&6; }
6955fi
6956
6957  if test "x$ac_ct_CC" = x; then
6958    CC=""
6959  else
6960    case $cross_compiling:$ac_tool_warned in
6961yes:)
6962{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6963printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6964ac_tool_warned=yes ;;
6965esac
6966    CC=$ac_ct_CC
6967  fi
6968else
6969  CC="$ac_cv_prog_CC"
6970fi
6971
6972fi
6973
6974
6975test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6976printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
6977as_fn_error $? "no acceptable C compiler found in \$PATH
6978See \`config.log' for more details" "$LINENO" 5; }
6979
6980# Provide some information about the compiler.
6981printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
6982set X $ac_compile
6983ac_compiler=$2
6984for ac_option in --version -v -V -qversion -version; do
6985  { { ac_try="$ac_compiler $ac_option >&5"
6986case "(($ac_try" in
6987  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6988  *) ac_try_echo=$ac_try;;
6989esac
6990eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6991printf "%s\n" "$ac_try_echo"; } >&5
6992  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
6993  ac_status=$?
6994  if test -s conftest.err; then
6995    sed '10a\
6996... rest of stderr output deleted ...
6997         10q' conftest.err >conftest.er1
6998    cat conftest.er1 >&5
6999  fi
7000  rm -f conftest.er1 conftest.err
7001  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7002  test $ac_status = 0; }
7003done
7004
7005{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
7006printf %s "checking whether the compiler supports GNU C... " >&6; }
7007if test ${ac_cv_c_compiler_gnu+y}
7008then :
7009  printf %s "(cached) " >&6
7010else $as_nop
7011  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7012/* end confdefs.h.  */
7013
7014int
7015main (void)
7016{
7017#ifndef __GNUC__
7018       choke me
7019#endif
7020
7021  ;
7022  return 0;
7023}
7024_ACEOF
7025if ac_fn_c_try_compile "$LINENO"
7026then :
7027  ac_compiler_gnu=yes
7028else $as_nop
7029  ac_compiler_gnu=no
7030fi
7031rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7032ac_cv_c_compiler_gnu=$ac_compiler_gnu
7033
7034fi
7035{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
7036printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
7037ac_compiler_gnu=$ac_cv_c_compiler_gnu
7038
7039if test $ac_compiler_gnu = yes; then
7040  GCC=yes
7041else
7042  GCC=
7043fi
7044ac_test_CFLAGS=${CFLAGS+y}
7045ac_save_CFLAGS=$CFLAGS
7046{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
7047printf %s "checking whether $CC accepts -g... " >&6; }
7048if test ${ac_cv_prog_cc_g+y}
7049then :
7050  printf %s "(cached) " >&6
7051else $as_nop
7052  ac_save_c_werror_flag=$ac_c_werror_flag
7053   ac_c_werror_flag=yes
7054   ac_cv_prog_cc_g=no
7055   CFLAGS="-g"
7056   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7057/* end confdefs.h.  */
7058
7059int
7060main (void)
7061{
7062
7063  ;
7064  return 0;
7065}
7066_ACEOF
7067if ac_fn_c_try_compile "$LINENO"
7068then :
7069  ac_cv_prog_cc_g=yes
7070else $as_nop
7071  CFLAGS=""
7072      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7073/* end confdefs.h.  */
7074
7075int
7076main (void)
7077{
7078
7079  ;
7080  return 0;
7081}
7082_ACEOF
7083if ac_fn_c_try_compile "$LINENO"
7084then :
7085
7086else $as_nop
7087  ac_c_werror_flag=$ac_save_c_werror_flag
7088	 CFLAGS="-g"
7089	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7090/* end confdefs.h.  */
7091
7092int
7093main (void)
7094{
7095
7096  ;
7097  return 0;
7098}
7099_ACEOF
7100if ac_fn_c_try_compile "$LINENO"
7101then :
7102  ac_cv_prog_cc_g=yes
7103fi
7104rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7105fi
7106rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7107fi
7108rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7109   ac_c_werror_flag=$ac_save_c_werror_flag
7110fi
7111{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
7112printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
7113if test $ac_test_CFLAGS; then
7114  CFLAGS=$ac_save_CFLAGS
7115elif test $ac_cv_prog_cc_g = yes; then
7116  if test "$GCC" = yes; then
7117    CFLAGS="-g -O2"
7118  else
7119    CFLAGS="-g"
7120  fi
7121else
7122  if test "$GCC" = yes; then
7123    CFLAGS="-O2"
7124  else
7125    CFLAGS=
7126  fi
7127fi
7128ac_prog_cc_stdc=no
7129if test x$ac_prog_cc_stdc = xno
7130then :
7131  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
7132printf %s "checking for $CC option to enable C11 features... " >&6; }
7133if test ${ac_cv_prog_cc_c11+y}
7134then :
7135  printf %s "(cached) " >&6
7136else $as_nop
7137  ac_cv_prog_cc_c11=no
7138ac_save_CC=$CC
7139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7140/* end confdefs.h.  */
7141$ac_c_conftest_c11_program
7142_ACEOF
7143for ac_arg in '' -std=gnu11
7144do
7145  CC="$ac_save_CC $ac_arg"
7146  if ac_fn_c_try_compile "$LINENO"
7147then :
7148  ac_cv_prog_cc_c11=$ac_arg
7149fi
7150rm -f core conftest.err conftest.$ac_objext conftest.beam
7151  test "x$ac_cv_prog_cc_c11" != "xno" && break
7152done
7153rm -f conftest.$ac_ext
7154CC=$ac_save_CC
7155fi
7156
7157if test "x$ac_cv_prog_cc_c11" = xno
7158then :
7159  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7160printf "%s\n" "unsupported" >&6; }
7161else $as_nop
7162  if test "x$ac_cv_prog_cc_c11" = x
7163then :
7164  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7165printf "%s\n" "none needed" >&6; }
7166else $as_nop
7167  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
7168printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
7169     CC="$CC $ac_cv_prog_cc_c11"
7170fi
7171  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
7172  ac_prog_cc_stdc=c11
7173fi
7174fi
7175if test x$ac_prog_cc_stdc = xno
7176then :
7177  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
7178printf %s "checking for $CC option to enable C99 features... " >&6; }
7179if test ${ac_cv_prog_cc_c99+y}
7180then :
7181  printf %s "(cached) " >&6
7182else $as_nop
7183  ac_cv_prog_cc_c99=no
7184ac_save_CC=$CC
7185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7186/* end confdefs.h.  */
7187$ac_c_conftest_c99_program
7188_ACEOF
7189for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
7190do
7191  CC="$ac_save_CC $ac_arg"
7192  if ac_fn_c_try_compile "$LINENO"
7193then :
7194  ac_cv_prog_cc_c99=$ac_arg
7195fi
7196rm -f core conftest.err conftest.$ac_objext conftest.beam
7197  test "x$ac_cv_prog_cc_c99" != "xno" && break
7198done
7199rm -f conftest.$ac_ext
7200CC=$ac_save_CC
7201fi
7202
7203if test "x$ac_cv_prog_cc_c99" = xno
7204then :
7205  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7206printf "%s\n" "unsupported" >&6; }
7207else $as_nop
7208  if test "x$ac_cv_prog_cc_c99" = x
7209then :
7210  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7211printf "%s\n" "none needed" >&6; }
7212else $as_nop
7213  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
7214printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
7215     CC="$CC $ac_cv_prog_cc_c99"
7216fi
7217  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
7218  ac_prog_cc_stdc=c99
7219fi
7220fi
7221if test x$ac_prog_cc_stdc = xno
7222then :
7223  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
7224printf %s "checking for $CC option to enable C89 features... " >&6; }
7225if test ${ac_cv_prog_cc_c89+y}
7226then :
7227  printf %s "(cached) " >&6
7228else $as_nop
7229  ac_cv_prog_cc_c89=no
7230ac_save_CC=$CC
7231cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7232/* end confdefs.h.  */
7233$ac_c_conftest_c89_program
7234_ACEOF
7235for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
7236do
7237  CC="$ac_save_CC $ac_arg"
7238  if ac_fn_c_try_compile "$LINENO"
7239then :
7240  ac_cv_prog_cc_c89=$ac_arg
7241fi
7242rm -f core conftest.err conftest.$ac_objext conftest.beam
7243  test "x$ac_cv_prog_cc_c89" != "xno" && break
7244done
7245rm -f conftest.$ac_ext
7246CC=$ac_save_CC
7247fi
7248
7249if test "x$ac_cv_prog_cc_c89" = xno
7250then :
7251  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7252printf "%s\n" "unsupported" >&6; }
7253else $as_nop
7254  if test "x$ac_cv_prog_cc_c89" = x
7255then :
7256  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7257printf "%s\n" "none needed" >&6; }
7258else $as_nop
7259  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
7260printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
7261     CC="$CC $ac_cv_prog_cc_c89"
7262fi
7263  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
7264  ac_prog_cc_stdc=c89
7265fi
7266fi
7267
7268ac_ext=c
7269ac_cpp='$CPP $CPPFLAGS'
7270ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7271ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7272ac_compiler_gnu=$ac_cv_c_compiler_gnu
7273
7274
7275  ac_ext=c
7276ac_cpp='$CPP $CPPFLAGS'
7277ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7278ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7279ac_compiler_gnu=$ac_cv_c_compiler_gnu
7280{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
7281printf %s "checking whether $CC understands -c and -o together... " >&6; }
7282if test ${am_cv_prog_cc_c_o+y}
7283then :
7284  printf %s "(cached) " >&6
7285else $as_nop
7286  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7287/* end confdefs.h.  */
7288
7289int
7290main (void)
7291{
7292
7293  ;
7294  return 0;
7295}
7296_ACEOF
7297  # Make sure it works both with $CC and with simple cc.
7298  # Following AC_PROG_CC_C_O, we do the test twice because some
7299  # compilers refuse to overwrite an existing .o file with -o,
7300  # though they will create one.
7301  am_cv_prog_cc_c_o=yes
7302  for am_i in 1 2; do
7303    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
7304   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
7305   ac_status=$?
7306   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7307   (exit $ac_status); } \
7308         && test -f conftest2.$ac_objext; then
7309      : OK
7310    else
7311      am_cv_prog_cc_c_o=no
7312      break
7313    fi
7314  done
7315  rm -f core conftest*
7316  unset am_i
7317fi
7318{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
7319printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
7320if test "$am_cv_prog_cc_c_o" != yes; then
7321   # Losing compiler, so override with the script.
7322   # FIXME: It is wrong to rewrite CC.
7323   # But if we don't then we get into trouble of one sort or another.
7324   # A longer-term fix would be to have automake use am__CC in this case,
7325   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
7326   CC="$am_aux_dir/compile $CC"
7327fi
7328ac_ext=c
7329ac_cpp='$CPP $CPPFLAGS'
7330ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7331ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7332ac_compiler_gnu=$ac_cv_c_compiler_gnu
7333
7334
7335
7336  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
7337printf %s "checking whether the compiler is clang... " >&6; }
7338if test ${gl_cv_compiler_clang+y}
7339then :
7340  printf %s "(cached) " >&6
7341else $as_nop
7342                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7343/* end confdefs.h.  */
7344
7345           #ifdef __clang__
7346           barfbarf
7347           #endif
7348
7349int
7350main (void)
7351{
7352
7353  ;
7354  return 0;
7355}
7356
7357_ACEOF
7358if ac_fn_c_try_compile "$LINENO"
7359then :
7360  gl_cv_compiler_clang=no
7361else $as_nop
7362  gl_cv_compiler_clang=yes
7363fi
7364rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7365
7366fi
7367{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_clang" >&5
7368printf "%s\n" "$gl_cv_compiler_clang" >&6; }
7369
7370
7371  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compiler option needed when checking for declarations" >&5
7372printf %s "checking for compiler option needed when checking for declarations... " >&6; }
7373if test ${gl_cv_compiler_check_decl_option+y}
7374then :
7375  printf %s "(cached) " >&6
7376else $as_nop
7377  if test $gl_cv_compiler_clang = yes; then
7378                     save_ac_compile="$ac_compile"
7379       ac_compile="$ac_compile -Werror=implicit-function-declaration"
7380                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7381/* end confdefs.h.  */
7382
7383int
7384main (void)
7385{
7386
7387  ;
7388  return 0;
7389}
7390_ACEOF
7391if ac_fn_c_try_compile "$LINENO"
7392then :
7393  gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'
7394else $as_nop
7395  gl_cv_compiler_check_decl_option=none
7396fi
7397rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7398       ac_compile="$save_ac_compile"
7399     else
7400       gl_cv_compiler_check_decl_option=none
7401     fi
7402
7403fi
7404{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_check_decl_option" >&5
7405printf "%s\n" "$gl_cv_compiler_check_decl_option" >&6; }
7406  if test "x$gl_cv_compiler_check_decl_option" != xnone; then
7407    ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option"
7408  else
7409    ac_compile_for_check_decl="$ac_compile"
7410  fi
7411
7412
7413depcc="$CC"   am_compiler_list=
7414
7415{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
7416printf %s "checking dependency style of $depcc... " >&6; }
7417if test ${am_cv_CC_dependencies_compiler_type+y}
7418then :
7419  printf %s "(cached) " >&6
7420else $as_nop
7421  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
7422  # We make a subdir and do the tests there.  Otherwise we can end up
7423  # making bogus files that we don't know about and never remove.  For
7424  # instance it was reported that on HP-UX the gcc test will end up
7425  # making a dummy file named 'D' -- because '-MD' means "put the output
7426  # in D".
7427  rm -rf conftest.dir
7428  mkdir conftest.dir
7429  # Copy depcomp to subdir because otherwise we won't find it if we're
7430  # using a relative directory.
7431  cp "$am_depcomp" conftest.dir
7432  cd conftest.dir
7433  # We will build objects and dependencies in a subdirectory because
7434  # it helps to detect inapplicable dependency modes.  For instance
7435  # both Tru64's cc and ICC support -MD to output dependencies as a
7436  # side effect of compilation, but ICC will put the dependencies in
7437  # the current directory while Tru64 will put them in the object
7438  # directory.
7439  mkdir sub
7440
7441  am_cv_CC_dependencies_compiler_type=none
7442  if test "$am_compiler_list" = ""; then
7443     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
7444  fi
7445  am__universal=false
7446  case " $depcc " in #(
7447     *\ -arch\ *\ -arch\ *) am__universal=true ;;
7448     esac
7449
7450  for depmode in $am_compiler_list; do
7451    # Setup a source with many dependencies, because some compilers
7452    # like to wrap large dependency lists on column 80 (with \), and
7453    # we should not choose a depcomp mode which is confused by this.
7454    #
7455    # We need to recreate these files for each test, as the compiler may
7456    # overwrite some of them when testing with obscure command lines.
7457    # This happens at least with the AIX C compiler.
7458    : > sub/conftest.c
7459    for i in 1 2 3 4 5 6; do
7460      echo '#include "conftst'$i'.h"' >> sub/conftest.c
7461      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
7462      # Solaris 10 /bin/sh.
7463      echo '/* dummy */' > sub/conftst$i.h
7464    done
7465    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
7466
7467    # We check with '-c' and '-o' for the sake of the "dashmstdout"
7468    # mode.  It turns out that the SunPro C++ compiler does not properly
7469    # handle '-M -o', and we need to detect this.  Also, some Intel
7470    # versions had trouble with output in subdirs.
7471    am__obj=sub/conftest.${OBJEXT-o}
7472    am__minus_obj="-o $am__obj"
7473    case $depmode in
7474    gcc)
7475      # This depmode causes a compiler race in universal mode.
7476      test "$am__universal" = false || continue
7477      ;;
7478    nosideeffect)
7479      # After this tag, mechanisms are not by side-effect, so they'll
7480      # only be used when explicitly requested.
7481      if test "x$enable_dependency_tracking" = xyes; then
7482	continue
7483      else
7484	break
7485      fi
7486      ;;
7487    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
7488      # This compiler won't grok '-c -o', but also, the minuso test has
7489      # not run yet.  These depmodes are late enough in the game, and
7490      # so weak that their functioning should not be impacted.
7491      am__obj=conftest.${OBJEXT-o}
7492      am__minus_obj=
7493      ;;
7494    none) break ;;
7495    esac
7496    if depmode=$depmode \
7497       source=sub/conftest.c object=$am__obj \
7498       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
7499       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
7500         >/dev/null 2>conftest.err &&
7501       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
7502       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
7503       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
7504       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7505      # icc doesn't choke on unknown options, it will just issue warnings
7506      # or remarks (even with -Werror).  So we grep stderr for any message
7507      # that says an option was ignored or not supported.
7508      # When given -MP, icc 7.0 and 7.1 complain thusly:
7509      #   icc: Command line warning: ignoring option '-M'; no argument required
7510      # The diagnosis changed in icc 8.0:
7511      #   icc: Command line remark: option '-MP' not supported
7512      if (grep 'ignoring option' conftest.err ||
7513          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7514        am_cv_CC_dependencies_compiler_type=$depmode
7515        break
7516      fi
7517    fi
7518  done
7519
7520  cd ..
7521  rm -rf conftest.dir
7522else
7523  am_cv_CC_dependencies_compiler_type=none
7524fi
7525
7526fi
7527{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
7528printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
7529CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
7530
7531 if
7532  test "x$enable_dependency_tracking" != xno \
7533  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
7534  am__fastdepCC_TRUE=
7535  am__fastdepCC_FALSE='#'
7536else
7537  am__fastdepCC_TRUE='#'
7538  am__fastdepCC_FALSE=
7539fi
7540
7541
7542
7543
7544
7545  # Make sure we can run config.sub.
7546$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
7547  as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
7548
7549{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
7550printf %s "checking build system type... " >&6; }
7551if test ${ac_cv_build+y}
7552then :
7553  printf %s "(cached) " >&6
7554else $as_nop
7555  ac_build_alias=$build_alias
7556test "x$ac_build_alias" = x &&
7557  ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
7558test "x$ac_build_alias" = x &&
7559  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
7560ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
7561  as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
7562
7563fi
7564{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
7565printf "%s\n" "$ac_cv_build" >&6; }
7566case $ac_cv_build in
7567*-*-*) ;;
7568*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
7569esac
7570build=$ac_cv_build
7571ac_save_IFS=$IFS; IFS='-'
7572set x $ac_cv_build
7573shift
7574build_cpu=$1
7575build_vendor=$2
7576shift; shift
7577# Remember, the first character of IFS is used to create $*,
7578# except with old shells:
7579build_os=$*
7580IFS=$ac_save_IFS
7581case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
7582
7583
7584{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
7585printf %s "checking host system type... " >&6; }
7586if test ${ac_cv_host+y}
7587then :
7588  printf %s "(cached) " >&6
7589else $as_nop
7590  if test "x$host_alias" = x; then
7591  ac_cv_host=$ac_cv_build
7592else
7593  ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
7594    as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
7595fi
7596
7597fi
7598{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
7599printf "%s\n" "$ac_cv_host" >&6; }
7600case $ac_cv_host in
7601*-*-*) ;;
7602*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
7603esac
7604host=$ac_cv_host
7605ac_save_IFS=$IFS; IFS='-'
7606set x $ac_cv_host
7607shift
7608host_cpu=$1
7609host_vendor=$2
7610shift; shift
7611# Remember, the first character of IFS is used to create $*,
7612# except with old shells:
7613host_os=$*
7614IFS=$ac_save_IFS
7615case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
7616
7617
7618
7619printf "%s\n" "#define OS_TYPE \"$host_os\"" >>confdefs.h
7620
7621
7622# Check whether --enable-silent-rules was given.
7623if test ${enable_silent_rules+y}
7624then :
7625  enableval=$enable_silent_rules;
7626fi
7627
7628case $enable_silent_rules in # (((
7629  yes) AM_DEFAULT_VERBOSITY=0;;
7630   no) AM_DEFAULT_VERBOSITY=1;;
7631    *) AM_DEFAULT_VERBOSITY=0;;
7632esac
7633am_make=${MAKE-make}
7634{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
7635printf %s "checking whether $am_make supports nested variables... " >&6; }
7636if test ${am_cv_make_support_nested_variables+y}
7637then :
7638  printf %s "(cached) " >&6
7639else $as_nop
7640  if printf "%s\n" 'TRUE=$(BAR$(V))
7641BAR0=false
7642BAR1=true
7643V=1
7644am__doit:
7645	@$(TRUE)
7646.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
7647  am_cv_make_support_nested_variables=yes
7648else
7649  am_cv_make_support_nested_variables=no
7650fi
7651fi
7652{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
7653printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
7654if test $am_cv_make_support_nested_variables = yes; then
7655    AM_V='$(V)'
7656  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
7657else
7658  AM_V=$AM_DEFAULT_VERBOSITY
7659  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
7660fi
7661AM_BACKSLASH='\'
7662
7663
7664
7665
7666# Check whether --with-libpsl was given.
7667if test ${with_libpsl+y}
7668then :
7669  withval=$with_libpsl;
7670fi
7671
7672
7673
7674# Check whether --with-ssl was given.
7675if test ${with_ssl+y}
7676then :
7677  withval=$with_ssl;
7678fi
7679
7680
7681
7682# Check whether --with-zlib was given.
7683if test ${with_zlib+y}
7684then :
7685  withval=$with_zlib;
7686fi
7687
7688
7689
7690# Check whether --with-metalink was given.
7691if test ${with_metalink+y}
7692then :
7693  withval=$with_metalink;
7694fi
7695
7696
7697
7698# Check whether --with-cares was given.
7699if test ${with_cares+y}
7700then :
7701  withval=$with_cares; with_cares=$withval
7702else $as_nop
7703  with_cares=no
7704fi
7705
7706
7707
7708# Check whether --enable-fuzzing was given.
7709if test ${enable_fuzzing+y}
7710then :
7711  enableval=$enable_fuzzing; enable_fuzzing=yes;
7712
7713
7714printf "%s\n" "#define FUZZING 1" >>confdefs.h
7715
7716
7717else $as_nop
7718  enable_fuzzing=no; LIB_FUZZING_ENGINE=""
7719fi
7720
7721 if test "$enable_fuzzing" = "yes"; then
7722  FUZZING_TRUE=
7723  FUZZING_FALSE='#'
7724else
7725  FUZZING_TRUE='#'
7726  FUZZING_FALSE=
7727fi
7728
7729
7730OLD_LIBS="$LIBS"
7731{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
7732printf %s "checking for library containing dlopen... " >&6; }
7733if test ${ac_cv_search_dlopen+y}
7734then :
7735  printf %s "(cached) " >&6
7736else $as_nop
7737  ac_func_search_save_LIBS=$LIBS
7738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7739/* end confdefs.h.  */
7740
7741/* Override any GCC internal prototype to avoid an error.
7742   Use char because int might match the return type of a GCC
7743   builtin and then its argument prototype would still apply.  */
7744char dlopen ();
7745int
7746main (void)
7747{
7748return dlopen ();
7749  ;
7750  return 0;
7751}
7752_ACEOF
7753for ac_lib in '' dl dld
7754do
7755  if test -z "$ac_lib"; then
7756    ac_res="none required"
7757  else
7758    ac_res=-l$ac_lib
7759    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7760  fi
7761  if ac_fn_c_try_link "$LINENO"
7762then :
7763  ac_cv_search_dlopen=$ac_res
7764fi
7765rm -f core conftest.err conftest.$ac_objext conftest.beam \
7766    conftest$ac_exeext
7767  if test ${ac_cv_search_dlopen+y}
7768then :
7769  break
7770fi
7771done
7772if test ${ac_cv_search_dlopen+y}
7773then :
7774
7775else $as_nop
7776  ac_cv_search_dlopen=no
7777fi
7778rm conftest.$ac_ext
7779LIBS=$ac_func_search_save_LIBS
7780fi
7781{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
7782printf "%s\n" "$ac_cv_search_dlopen" >&6; }
7783ac_res=$ac_cv_search_dlopen
7784if test "$ac_res" != no
7785then :
7786  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7787
7788fi
7789
7790if [ "${ac_cv_search_dlopen#-l}" != "${ac_cv_search_dlopen}" ]; then
7791  FUZZ_LIBS="${ac_cv_search_dlopen}"
7792
7793fi
7794LIBS="$OLD_LIBS"
7795
7796
7797# Check whether --enable-fsanitize-ubsan was given.
7798if test ${enable_fsanitize_ubsan+y}
7799then :
7800  enableval=$enable_fsanitize_ubsan; gl_cc_sanitize_ubsan=yes
7801else $as_nop
7802  gl_cc_sanitize_ubsan=no
7803fi
7804
7805
7806# Check whether --enable-fsanitize-asan was given.
7807if test ${enable_fsanitize_asan+y}
7808then :
7809  enableval=$enable_fsanitize_asan; gl_cc_sanitize_asan=yes
7810else $as_nop
7811  gl_cc_sanitize_asan=no
7812fi
7813
7814
7815# Check whether --enable-fsanitize-msan was given.
7816if test ${enable_fsanitize_msan+y}
7817then :
7818  enableval=$enable_fsanitize_msan; gl_cc_sanitize_msan=yes
7819else $as_nop
7820  gl_cc_sanitize_msan=no
7821fi
7822
7823
7824if test "$gl_cc_sanitize_asan" = yes; then
7825  if test "$gl_cc_sanitize_msan" = yes; then
7826    as_fn_error $? "Address Sanitizer and Memory Sanitizer are mutually exclusive" "$LINENO" 5
7827  fi
7828fi
7829
7830if test "$gl_cc_sanitize_ubsan" = yes; then
7831
7832  ac_ext=c
7833ac_cpp='$CPP $CPPFLAGS'
7834ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7835ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7836ac_compiler_gnu=$ac_cv_c_compiler_gnu
7837
7838
7839{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
7840printf %s "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
7841if test ${gl_cv_warn_c__Werror__Wunknown_warning_option+y}
7842then :
7843  printf %s "(cached) " >&6
7844else $as_nop
7845
7846  gl_save_compiler_FLAGS="$CFLAGS"
7847  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
7848  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7849/* end confdefs.h.  */
7850
7851int
7852main (void)
7853{
7854
7855  ;
7856  return 0;
7857}
7858_ACEOF
7859if ac_fn_c_try_link "$LINENO"
7860then :
7861  gl_cv_warn_c__Werror__Wunknown_warning_option=yes
7862else $as_nop
7863  gl_cv_warn_c__Werror__Wunknown_warning_option=no
7864fi
7865rm -f core conftest.err conftest.$ac_objext conftest.beam \
7866    conftest$ac_exeext conftest.$ac_ext
7867  CFLAGS="$gl_save_compiler_FLAGS"
7868
7869fi
7870{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
7871printf "%s\n" "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
7872if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes
7873then :
7874  gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
7875else $as_nop
7876  gl_unknown_warnings_are_errors=
7877fi
7878
7879  ac_ext=c
7880ac_cpp='$CPP $CPPFLAGS'
7881ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7882ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7883ac_compiler_gnu=$ac_cv_c_compiler_gnu
7884
7885
7886
7887
7888{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize=undefined" >&5
7889printf %s "checking whether C compiler handles -fsanitize=undefined... " >&6; }
7890if test ${gl_cv_warn_c__fsanitize_undefined+y}
7891then :
7892  printf %s "(cached) " >&6
7893else $as_nop
7894
7895  gl_save_compiler_FLAGS="$CFLAGS"
7896  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize=undefined"
7897  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7898/* end confdefs.h.  */
7899
7900int
7901main (void)
7902{
7903
7904  ;
7905  return 0;
7906}
7907_ACEOF
7908if ac_fn_c_try_link "$LINENO"
7909then :
7910  gl_cv_warn_c__fsanitize_undefined=yes
7911else $as_nop
7912  gl_cv_warn_c__fsanitize_undefined=no
7913fi
7914rm -f core conftest.err conftest.$ac_objext conftest.beam \
7915    conftest$ac_exeext conftest.$ac_ext
7916  CFLAGS="$gl_save_compiler_FLAGS"
7917
7918fi
7919{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_undefined" >&5
7920printf "%s\n" "$gl_cv_warn_c__fsanitize_undefined" >&6; }
7921if test "x$gl_cv_warn_c__fsanitize_undefined" = xyes
7922then :
7923  as_fn_append WARN_CFLAGS " -fsanitize=undefined"
7924fi
7925
7926
7927
7928
7929{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fno-sanitize-recover=undefined" >&5
7930printf %s "checking whether C compiler handles -fno-sanitize-recover=undefined... " >&6; }
7931if test ${gl_cv_warn_c__fno_sanitize_recover_undefined+y}
7932then :
7933  printf %s "(cached) " >&6
7934else $as_nop
7935
7936  gl_save_compiler_FLAGS="$CFLAGS"
7937  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fno-sanitize-recover=undefined"
7938  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7939/* end confdefs.h.  */
7940
7941int
7942main (void)
7943{
7944
7945  ;
7946  return 0;
7947}
7948_ACEOF
7949if ac_fn_c_try_link "$LINENO"
7950then :
7951  gl_cv_warn_c__fno_sanitize_recover_undefined=yes
7952else $as_nop
7953  gl_cv_warn_c__fno_sanitize_recover_undefined=no
7954fi
7955rm -f core conftest.err conftest.$ac_objext conftest.beam \
7956    conftest$ac_exeext conftest.$ac_ext
7957  CFLAGS="$gl_save_compiler_FLAGS"
7958
7959fi
7960{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fno_sanitize_recover_undefined" >&5
7961printf "%s\n" "$gl_cv_warn_c__fno_sanitize_recover_undefined" >&6; }
7962if test "x$gl_cv_warn_c__fno_sanitize_recover_undefined" = xyes
7963then :
7964  as_fn_append WARN_CFLAGS " -fno-sanitize-recover=undefined"
7965fi
7966
7967
7968
7969  # additional clang options
7970
7971
7972{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize=integer" >&5
7973printf %s "checking whether C compiler handles -fsanitize=integer... " >&6; }
7974if test ${gl_cv_warn_c__fsanitize_integer+y}
7975then :
7976  printf %s "(cached) " >&6
7977else $as_nop
7978
7979  gl_save_compiler_FLAGS="$CFLAGS"
7980  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize=integer"
7981  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7982/* end confdefs.h.  */
7983
7984int
7985main (void)
7986{
7987
7988  ;
7989  return 0;
7990}
7991_ACEOF
7992if ac_fn_c_try_link "$LINENO"
7993then :
7994  gl_cv_warn_c__fsanitize_integer=yes
7995else $as_nop
7996  gl_cv_warn_c__fsanitize_integer=no
7997fi
7998rm -f core conftest.err conftest.$ac_objext conftest.beam \
7999    conftest$ac_exeext conftest.$ac_ext
8000  CFLAGS="$gl_save_compiler_FLAGS"
8001
8002fi
8003{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_integer" >&5
8004printf "%s\n" "$gl_cv_warn_c__fsanitize_integer" >&6; }
8005if test "x$gl_cv_warn_c__fsanitize_integer" = xyes
8006then :
8007  as_fn_append WARN_CFLAGS " -fsanitize=integer"
8008fi
8009
8010
8011
8012
8013{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize=nullability" >&5
8014printf %s "checking whether C compiler handles -fsanitize=nullability... " >&6; }
8015if test ${gl_cv_warn_c__fsanitize_nullability+y}
8016then :
8017  printf %s "(cached) " >&6
8018else $as_nop
8019
8020  gl_save_compiler_FLAGS="$CFLAGS"
8021  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize=nullability"
8022  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8023/* end confdefs.h.  */
8024
8025int
8026main (void)
8027{
8028
8029  ;
8030  return 0;
8031}
8032_ACEOF
8033if ac_fn_c_try_link "$LINENO"
8034then :
8035  gl_cv_warn_c__fsanitize_nullability=yes
8036else $as_nop
8037  gl_cv_warn_c__fsanitize_nullability=no
8038fi
8039rm -f core conftest.err conftest.$ac_objext conftest.beam \
8040    conftest$ac_exeext conftest.$ac_ext
8041  CFLAGS="$gl_save_compiler_FLAGS"
8042
8043fi
8044{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_nullability" >&5
8045printf "%s\n" "$gl_cv_warn_c__fsanitize_nullability" >&6; }
8046if test "x$gl_cv_warn_c__fsanitize_nullability" = xyes
8047then :
8048  as_fn_append WARN_CFLAGS " -fsanitize=nullability"
8049fi
8050
8051
8052
8053
8054{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fno-sanitize-recover=nullability" >&5
8055printf %s "checking whether C compiler handles -fno-sanitize-recover=nullability... " >&6; }
8056if test ${gl_cv_warn_c__fno_sanitize_recover_nullability+y}
8057then :
8058  printf %s "(cached) " >&6
8059else $as_nop
8060
8061  gl_save_compiler_FLAGS="$CFLAGS"
8062  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fno-sanitize-recover=nullability"
8063  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8064/* end confdefs.h.  */
8065
8066int
8067main (void)
8068{
8069
8070  ;
8071  return 0;
8072}
8073_ACEOF
8074if ac_fn_c_try_link "$LINENO"
8075then :
8076  gl_cv_warn_c__fno_sanitize_recover_nullability=yes
8077else $as_nop
8078  gl_cv_warn_c__fno_sanitize_recover_nullability=no
8079fi
8080rm -f core conftest.err conftest.$ac_objext conftest.beam \
8081    conftest$ac_exeext conftest.$ac_ext
8082  CFLAGS="$gl_save_compiler_FLAGS"
8083
8084fi
8085{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fno_sanitize_recover_nullability" >&5
8086printf "%s\n" "$gl_cv_warn_c__fno_sanitize_recover_nullability" >&6; }
8087if test "x$gl_cv_warn_c__fno_sanitize_recover_nullability" = xyes
8088then :
8089  as_fn_append WARN_CFLAGS " -fno-sanitize-recover=nullability"
8090fi
8091
8092
8093fi
8094
8095if test "$gl_cc_sanitize_asan" = yes; then
8096
8097
8098{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize=address" >&5
8099printf %s "checking whether C compiler handles -fsanitize=address... " >&6; }
8100if test ${gl_cv_warn_c__fsanitize_address+y}
8101then :
8102  printf %s "(cached) " >&6
8103else $as_nop
8104
8105  gl_save_compiler_FLAGS="$CFLAGS"
8106  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize=address"
8107  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8108/* end confdefs.h.  */
8109
8110int
8111main (void)
8112{
8113
8114  ;
8115  return 0;
8116}
8117_ACEOF
8118if ac_fn_c_try_link "$LINENO"
8119then :
8120  gl_cv_warn_c__fsanitize_address=yes
8121else $as_nop
8122  gl_cv_warn_c__fsanitize_address=no
8123fi
8124rm -f core conftest.err conftest.$ac_objext conftest.beam \
8125    conftest$ac_exeext conftest.$ac_ext
8126  CFLAGS="$gl_save_compiler_FLAGS"
8127
8128fi
8129{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_address" >&5
8130printf "%s\n" "$gl_cv_warn_c__fsanitize_address" >&6; }
8131if test "x$gl_cv_warn_c__fsanitize_address" = xyes
8132then :
8133  as_fn_append WARN_CFLAGS " -fsanitize=address"
8134fi
8135
8136
8137
8138
8139{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fno-omit-frame-pointer" >&5
8140printf %s "checking whether C compiler handles -fno-omit-frame-pointer... " >&6; }
8141if test ${gl_cv_warn_c__fno_omit_frame_pointer+y}
8142then :
8143  printf %s "(cached) " >&6
8144else $as_nop
8145
8146  gl_save_compiler_FLAGS="$CFLAGS"
8147  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fno-omit-frame-pointer"
8148  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8149/* end confdefs.h.  */
8150
8151int
8152main (void)
8153{
8154
8155  ;
8156  return 0;
8157}
8158_ACEOF
8159if ac_fn_c_try_link "$LINENO"
8160then :
8161  gl_cv_warn_c__fno_omit_frame_pointer=yes
8162else $as_nop
8163  gl_cv_warn_c__fno_omit_frame_pointer=no
8164fi
8165rm -f core conftest.err conftest.$ac_objext conftest.beam \
8166    conftest$ac_exeext conftest.$ac_ext
8167  CFLAGS="$gl_save_compiler_FLAGS"
8168
8169fi
8170{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fno_omit_frame_pointer" >&5
8171printf "%s\n" "$gl_cv_warn_c__fno_omit_frame_pointer" >&6; }
8172if test "x$gl_cv_warn_c__fno_omit_frame_pointer" = xyes
8173then :
8174  as_fn_append WARN_CFLAGS " -fno-omit-frame-pointer"
8175fi
8176
8177
8178
8179  # additional clang option
8180
8181
8182{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize-address-use-after-scope" >&5
8183printf %s "checking whether C compiler handles -fsanitize-address-use-after-scope... " >&6; }
8184if test ${gl_cv_warn_c__fsanitize_address_use_after_scope+y}
8185then :
8186  printf %s "(cached) " >&6
8187else $as_nop
8188
8189  gl_save_compiler_FLAGS="$CFLAGS"
8190  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize-address-use-after-scope"
8191  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8192/* end confdefs.h.  */
8193
8194int
8195main (void)
8196{
8197
8198  ;
8199  return 0;
8200}
8201_ACEOF
8202if ac_fn_c_try_link "$LINENO"
8203then :
8204  gl_cv_warn_c__fsanitize_address_use_after_scope=yes
8205else $as_nop
8206  gl_cv_warn_c__fsanitize_address_use_after_scope=no
8207fi
8208rm -f core conftest.err conftest.$ac_objext conftest.beam \
8209    conftest$ac_exeext conftest.$ac_ext
8210  CFLAGS="$gl_save_compiler_FLAGS"
8211
8212fi
8213{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_address_use_after_scope" >&5
8214printf "%s\n" "$gl_cv_warn_c__fsanitize_address_use_after_scope" >&6; }
8215if test "x$gl_cv_warn_c__fsanitize_address_use_after_scope" = xyes
8216then :
8217  as_fn_append WARN_CFLAGS " -fsanitize-address-use-after-scope"
8218fi
8219
8220
8221fi
8222
8223if test "$gl_cc_sanitize_msan" = yes; then
8224  # clang options
8225
8226
8227{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize=memory" >&5
8228printf %s "checking whether C compiler handles -fsanitize=memory... " >&6; }
8229if test ${gl_cv_warn_c__fsanitize_memory+y}
8230then :
8231  printf %s "(cached) " >&6
8232else $as_nop
8233
8234  gl_save_compiler_FLAGS="$CFLAGS"
8235  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize=memory"
8236  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8237/* end confdefs.h.  */
8238
8239int
8240main (void)
8241{
8242
8243  ;
8244  return 0;
8245}
8246_ACEOF
8247if ac_fn_c_try_link "$LINENO"
8248then :
8249  gl_cv_warn_c__fsanitize_memory=yes
8250else $as_nop
8251  gl_cv_warn_c__fsanitize_memory=no
8252fi
8253rm -f core conftest.err conftest.$ac_objext conftest.beam \
8254    conftest$ac_exeext conftest.$ac_ext
8255  CFLAGS="$gl_save_compiler_FLAGS"
8256
8257fi
8258{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_memory" >&5
8259printf "%s\n" "$gl_cv_warn_c__fsanitize_memory" >&6; }
8260if test "x$gl_cv_warn_c__fsanitize_memory" = xyes
8261then :
8262  as_fn_append WARN_CFLAGS " -fsanitize=memory"
8263fi
8264
8265
8266
8267
8268{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize-memory-track-origins" >&5
8269printf %s "checking whether C compiler handles -fsanitize-memory-track-origins... " >&6; }
8270if test ${gl_cv_warn_c__fsanitize_memory_track_origins+y}
8271then :
8272  printf %s "(cached) " >&6
8273else $as_nop
8274
8275  gl_save_compiler_FLAGS="$CFLAGS"
8276  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize-memory-track-origins"
8277  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8278/* end confdefs.h.  */
8279
8280int
8281main (void)
8282{
8283
8284  ;
8285  return 0;
8286}
8287_ACEOF
8288if ac_fn_c_try_link "$LINENO"
8289then :
8290  gl_cv_warn_c__fsanitize_memory_track_origins=yes
8291else $as_nop
8292  gl_cv_warn_c__fsanitize_memory_track_origins=no
8293fi
8294rm -f core conftest.err conftest.$ac_objext conftest.beam \
8295    conftest$ac_exeext conftest.$ac_ext
8296  CFLAGS="$gl_save_compiler_FLAGS"
8297
8298fi
8299{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_memory_track_origins" >&5
8300printf "%s\n" "$gl_cv_warn_c__fsanitize_memory_track_origins" >&6; }
8301if test "x$gl_cv_warn_c__fsanitize_memory_track_origins" = xyes
8302then :
8303  as_fn_append WARN_CFLAGS " -fsanitize-memory-track-origins"
8304fi
8305
8306
8307
8308  # gcc options
8309  if test "$CCNAME" = "gcc"; then
8310
8311
8312{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize=leak" >&5
8313printf %s "checking whether C compiler handles -fsanitize=leak... " >&6; }
8314if test ${gl_cv_warn_c__fsanitize_leak+y}
8315then :
8316  printf %s "(cached) " >&6
8317else $as_nop
8318
8319  gl_save_compiler_FLAGS="$CFLAGS"
8320  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize=leak"
8321  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8322/* end confdefs.h.  */
8323
8324int
8325main (void)
8326{
8327
8328  ;
8329  return 0;
8330}
8331_ACEOF
8332if ac_fn_c_try_link "$LINENO"
8333then :
8334  gl_cv_warn_c__fsanitize_leak=yes
8335else $as_nop
8336  gl_cv_warn_c__fsanitize_leak=no
8337fi
8338rm -f core conftest.err conftest.$ac_objext conftest.beam \
8339    conftest$ac_exeext conftest.$ac_ext
8340  CFLAGS="$gl_save_compiler_FLAGS"
8341
8342fi
8343{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_leak" >&5
8344printf "%s\n" "$gl_cv_warn_c__fsanitize_leak" >&6; }
8345if test "x$gl_cv_warn_c__fsanitize_leak" = xyes
8346then :
8347  as_fn_append WARN_CFLAGS " -fsanitize=leak"
8348fi
8349
8350
8351  fi
8352
8353
8354
8355{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fno-omit-frame-pointer" >&5
8356printf %s "checking whether C compiler handles -fno-omit-frame-pointer... " >&6; }
8357if test ${gl_cv_warn_c__fno_omit_frame_pointer+y}
8358then :
8359  printf %s "(cached) " >&6
8360else $as_nop
8361
8362  gl_save_compiler_FLAGS="$CFLAGS"
8363  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fno-omit-frame-pointer"
8364  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8365/* end confdefs.h.  */
8366
8367int
8368main (void)
8369{
8370
8371  ;
8372  return 0;
8373}
8374_ACEOF
8375if ac_fn_c_try_link "$LINENO"
8376then :
8377  gl_cv_warn_c__fno_omit_frame_pointer=yes
8378else $as_nop
8379  gl_cv_warn_c__fno_omit_frame_pointer=no
8380fi
8381rm -f core conftest.err conftest.$ac_objext conftest.beam \
8382    conftest$ac_exeext conftest.$ac_ext
8383  CFLAGS="$gl_save_compiler_FLAGS"
8384
8385fi
8386{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fno_omit_frame_pointer" >&5
8387printf "%s\n" "$gl_cv_warn_c__fno_omit_frame_pointer" >&6; }
8388if test "x$gl_cv_warn_c__fno_omit_frame_pointer" = xyes
8389then :
8390  as_fn_append WARN_CFLAGS " -fno-omit-frame-pointer"
8391fi
8392
8393
8394
8395
8396{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fPIE" >&5
8397printf %s "checking whether C compiler handles -fPIE... " >&6; }
8398if test ${gl_cv_warn_c__fPIE+y}
8399then :
8400  printf %s "(cached) " >&6
8401else $as_nop
8402
8403  gl_save_compiler_FLAGS="$CFLAGS"
8404  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fPIE"
8405  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8406/* end confdefs.h.  */
8407
8408int
8409main (void)
8410{
8411
8412  ;
8413  return 0;
8414}
8415_ACEOF
8416if ac_fn_c_try_link "$LINENO"
8417then :
8418  gl_cv_warn_c__fPIE=yes
8419else $as_nop
8420  gl_cv_warn_c__fPIE=no
8421fi
8422rm -f core conftest.err conftest.$ac_objext conftest.beam \
8423    conftest$ac_exeext conftest.$ac_ext
8424  CFLAGS="$gl_save_compiler_FLAGS"
8425
8426fi
8427{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fPIE" >&5
8428printf "%s\n" "$gl_cv_warn_c__fPIE" >&6; }
8429if test "x$gl_cv_warn_c__fPIE" = xyes
8430then :
8431  as_fn_append WARN_CFLAGS " -fPIE"
8432fi
8433
8434
8435fi
8436
8437
8438# Check whether --enable-opie was given.
8439if test ${enable_opie+y}
8440then :
8441  enableval=$enable_opie; ENABLE_OPIE=$enableval
8442else $as_nop
8443  ENABLE_OPIE=yes
8444fi
8445
8446
8447if test "x$ENABLE_OPIE" = xyes
8448then :
8449
8450printf "%s\n" "#define ENABLE_OPIE 1" >>confdefs.h
8451
8452fi
8453
8454
8455# Check whether --enable-digest was given.
8456if test ${enable_digest+y}
8457then :
8458  enableval=$enable_digest; ENABLE_DIGEST=$enableval
8459else $as_nop
8460  ENABLE_DIGEST=yes
8461fi
8462
8463
8464if test "x$ENABLE_DIGEST" = xyes
8465then :
8466
8467printf "%s\n" "#define ENABLE_DIGEST 1" >>confdefs.h
8468
8469fi
8470
8471
8472# Check whether --enable-ntlm was given.
8473if test ${enable_ntlm+y}
8474then :
8475  enableval=$enable_ntlm; ENABLE_NTLM=$enableval
8476else $as_nop
8477  ENABLE_NTLM=auto
8478
8479fi
8480
8481
8482
8483# Check whether --enable-debug was given.
8484if test ${enable_debug+y}
8485then :
8486  enableval=$enable_debug; ENABLE_DEBUG=$enableval
8487else $as_nop
8488  ENABLE_DEBUG=yes
8489fi
8490
8491
8492if test "x$ENABLE_DEBUG" = xyes
8493then :
8494
8495printf "%s\n" "#define ENABLE_DEBUG 1" >>confdefs.h
8496
8497fi
8498
8499# Check whether --enable-valgrind-tests was given.
8500if test ${enable_valgrind_tests+y}
8501then :
8502  enableval=$enable_valgrind_tests; ENABLE_VALGRIND=$enableval
8503else $as_nop
8504  ENABLE_VALGRIND=no
8505fi
8506
8507
8508if test "x$ENABLE_VALGRIND" != xno
8509then :
8510
8511  # Extract the first word of "valgrind", so it can be a program name with args.
8512set dummy valgrind; ac_word=$2
8513{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8514printf %s "checking for $ac_word... " >&6; }
8515if test ${ac_cv_prog_HAVE_VALGRIND+y}
8516then :
8517  printf %s "(cached) " >&6
8518else $as_nop
8519  if test -n "$HAVE_VALGRIND"; then
8520  ac_cv_prog_HAVE_VALGRIND="$HAVE_VALGRIND" # Let the user override the test.
8521else
8522as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8523for as_dir in $PATH
8524do
8525  IFS=$as_save_IFS
8526  case $as_dir in #(((
8527    '') as_dir=./ ;;
8528    */) ;;
8529    *) as_dir=$as_dir/ ;;
8530  esac
8531    for ac_exec_ext in '' $ac_executable_extensions; do
8532  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8533    ac_cv_prog_HAVE_VALGRIND="yes"
8534    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8535    break 2
8536  fi
8537done
8538  done
8539IFS=$as_save_IFS
8540
8541  test -z "$ac_cv_prog_HAVE_VALGRIND" && ac_cv_prog_HAVE_VALGRIND="no"
8542fi
8543fi
8544HAVE_VALGRIND=$ac_cv_prog_HAVE_VALGRIND
8545if test -n "$HAVE_VALGRIND"; then
8546  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_VALGRIND" >&5
8547printf "%s\n" "$HAVE_VALGRIND" >&6; }
8548else
8549  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8550printf "%s\n" "no" >&6; }
8551fi
8552
8553
8554  if test "x$HAVE_VALGRIND" = xyes
8555then :
8556
8557    if test "$gl_cc_sanitize_asan" = yes; then
8558      as_fn_error $? "Valgrind and Address Sanitizer are mutually exclusive" "$LINENO" 5
8559    elif test "$gl_cc_sanitize_msan" = yes; then
8560      as_fn_error $? "Valgrind and Memory Sanitizer are mutually exclusive" "$LINENO" 5
8561    fi
8562
8563    VALGRIND_TESTS="1"
8564
8565    VALGRIND_INFO="Test suite will be run under Valgrind"
8566
8567else $as_nop
8568
8569    VALGRIND_INFO="Valgrind not found"
8570
8571fi
8572
8573else $as_nop
8574
8575  VALGRIND_INFO="Valgrind testing not enabled"
8576
8577fi
8578
8579# Check whether --enable-assert was given.
8580if test ${enable_assert+y}
8581then :
8582  enableval=$enable_assert; ENABLE_ASSERTION=$enableval
8583else $as_nop
8584  ENABLE_ASSERTION=no
8585
8586fi
8587
8588
8589if test "x$ENABLE_ASSERTION" != xyes
8590then :
8591
8592  CFLAGS="-DNDEBUG $CFLAGS"
8593
8594fi
8595
8596
8597test -z "$CFLAGS"  && CFLAGS= auto_cflags=1
8598test -z "$CC" && cc_specified=yes
8599
8600
8601
8602
8603
8604  case "$host_os" in
8605    openbsd*)
8606
8607printf "%s\n" "#define _ISOC11_SOURCE 1" >>confdefs.h
8608
8609      ;;
8610  esac
8611
8612ac_ext=c
8613ac_cpp='$CPP $CPPFLAGS'
8614ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8615ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8616ac_compiler_gnu=$ac_cv_c_compiler_gnu
8617{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
8618printf %s "checking how to run the C preprocessor... " >&6; }
8619# On Suns, sometimes $CPP names a directory.
8620if test -n "$CPP" && test -d "$CPP"; then
8621  CPP=
8622fi
8623if test -z "$CPP"; then
8624  if test ${ac_cv_prog_CPP+y}
8625then :
8626  printf %s "(cached) " >&6
8627else $as_nop
8628      # Double quotes because $CC needs to be expanded
8629    for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
8630    do
8631      ac_preproc_ok=false
8632for ac_c_preproc_warn_flag in '' yes
8633do
8634  # Use a header file that comes with gcc, so configuring glibc
8635  # with a fresh cross-compiler works.
8636  # On the NeXT, cc -E runs the code through the compiler's parser,
8637  # not just through cpp. "Syntax error" is here to catch this case.
8638  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8639/* end confdefs.h.  */
8640#include <limits.h>
8641		     Syntax error
8642_ACEOF
8643if ac_fn_c_try_cpp "$LINENO"
8644then :
8645
8646else $as_nop
8647  # Broken: fails on valid input.
8648continue
8649fi
8650rm -f conftest.err conftest.i conftest.$ac_ext
8651
8652  # OK, works on sane cases.  Now check whether nonexistent headers
8653  # can be detected and how.
8654  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8655/* end confdefs.h.  */
8656#include <ac_nonexistent.h>
8657_ACEOF
8658if ac_fn_c_try_cpp "$LINENO"
8659then :
8660  # Broken: success on invalid input.
8661continue
8662else $as_nop
8663  # Passes both tests.
8664ac_preproc_ok=:
8665break
8666fi
8667rm -f conftest.err conftest.i conftest.$ac_ext
8668
8669done
8670# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
8671rm -f conftest.i conftest.err conftest.$ac_ext
8672if $ac_preproc_ok
8673then :
8674  break
8675fi
8676
8677    done
8678    ac_cv_prog_CPP=$CPP
8679
8680fi
8681  CPP=$ac_cv_prog_CPP
8682else
8683  ac_cv_prog_CPP=$CPP
8684fi
8685{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
8686printf "%s\n" "$CPP" >&6; }
8687ac_preproc_ok=false
8688for ac_c_preproc_warn_flag in '' yes
8689do
8690  # Use a header file that comes with gcc, so configuring glibc
8691  # with a fresh cross-compiler works.
8692  # On the NeXT, cc -E runs the code through the compiler's parser,
8693  # not just through cpp. "Syntax error" is here to catch this case.
8694  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8695/* end confdefs.h.  */
8696#include <limits.h>
8697		     Syntax error
8698_ACEOF
8699if ac_fn_c_try_cpp "$LINENO"
8700then :
8701
8702else $as_nop
8703  # Broken: fails on valid input.
8704continue
8705fi
8706rm -f conftest.err conftest.i conftest.$ac_ext
8707
8708  # OK, works on sane cases.  Now check whether nonexistent headers
8709  # can be detected and how.
8710  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8711/* end confdefs.h.  */
8712#include <ac_nonexistent.h>
8713_ACEOF
8714if ac_fn_c_try_cpp "$LINENO"
8715then :
8716  # Broken: success on invalid input.
8717continue
8718else $as_nop
8719  # Passes both tests.
8720ac_preproc_ok=:
8721break
8722fi
8723rm -f conftest.err conftest.i conftest.$ac_ext
8724
8725done
8726# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
8727rm -f conftest.i conftest.err conftest.$ac_ext
8728if $ac_preproc_ok
8729then :
8730
8731else $as_nop
8732  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8733printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
8734as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
8735See \`config.log' for more details" "$LINENO" 5; }
8736fi
8737
8738ac_ext=c
8739ac_cpp='$CPP $CPPFLAGS'
8740ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8741ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8742ac_compiler_gnu=$ac_cv_c_compiler_gnu
8743
8744
8745{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
8746printf %s "checking for grep that handles long lines and -e... " >&6; }
8747if test ${ac_cv_path_GREP+y}
8748then :
8749  printf %s "(cached) " >&6
8750else $as_nop
8751  if test -z "$GREP"; then
8752  ac_path_GREP_found=false
8753  # Loop through the user's path and test for each of PROGNAME-LIST
8754  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8755for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8756do
8757  IFS=$as_save_IFS
8758  case $as_dir in #(((
8759    '') as_dir=./ ;;
8760    */) ;;
8761    *) as_dir=$as_dir/ ;;
8762  esac
8763    for ac_prog in grep ggrep
8764   do
8765    for ac_exec_ext in '' $ac_executable_extensions; do
8766      ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
8767      as_fn_executable_p "$ac_path_GREP" || continue
8768# Check for GNU ac_path_GREP and select it if it is found.
8769  # Check for GNU $ac_path_GREP
8770case `"$ac_path_GREP" --version 2>&1` in
8771*GNU*)
8772  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
8773*)
8774  ac_count=0
8775  printf %s 0123456789 >"conftest.in"
8776  while :
8777  do
8778    cat "conftest.in" "conftest.in" >"conftest.tmp"
8779    mv "conftest.tmp" "conftest.in"
8780    cp "conftest.in" "conftest.nl"
8781    printf "%s\n" 'GREP' >> "conftest.nl"
8782    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8783    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8784    as_fn_arith $ac_count + 1 && ac_count=$as_val
8785    if test $ac_count -gt ${ac_path_GREP_max-0}; then
8786      # Best one so far, save it but keep looking for a better one
8787      ac_cv_path_GREP="$ac_path_GREP"
8788      ac_path_GREP_max=$ac_count
8789    fi
8790    # 10*(2^10) chars as input seems more than enough
8791    test $ac_count -gt 10 && break
8792  done
8793  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8794esac
8795
8796      $ac_path_GREP_found && break 3
8797    done
8798  done
8799  done
8800IFS=$as_save_IFS
8801  if test -z "$ac_cv_path_GREP"; then
8802    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8803  fi
8804else
8805  ac_cv_path_GREP=$GREP
8806fi
8807
8808fi
8809{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
8810printf "%s\n" "$ac_cv_path_GREP" >&6; }
8811 GREP="$ac_cv_path_GREP"
8812
8813
8814{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
8815printf %s "checking for egrep... " >&6; }
8816if test ${ac_cv_path_EGREP+y}
8817then :
8818  printf %s "(cached) " >&6
8819else $as_nop
8820  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
8821   then ac_cv_path_EGREP="$GREP -E"
8822   else
8823     if test -z "$EGREP"; then
8824  ac_path_EGREP_found=false
8825  # Loop through the user's path and test for each of PROGNAME-LIST
8826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8827for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8828do
8829  IFS=$as_save_IFS
8830  case $as_dir in #(((
8831    '') as_dir=./ ;;
8832    */) ;;
8833    *) as_dir=$as_dir/ ;;
8834  esac
8835    for ac_prog in egrep
8836   do
8837    for ac_exec_ext in '' $ac_executable_extensions; do
8838      ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
8839      as_fn_executable_p "$ac_path_EGREP" || continue
8840# Check for GNU ac_path_EGREP and select it if it is found.
8841  # Check for GNU $ac_path_EGREP
8842case `"$ac_path_EGREP" --version 2>&1` in
8843*GNU*)
8844  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
8845*)
8846  ac_count=0
8847  printf %s 0123456789 >"conftest.in"
8848  while :
8849  do
8850    cat "conftest.in" "conftest.in" >"conftest.tmp"
8851    mv "conftest.tmp" "conftest.in"
8852    cp "conftest.in" "conftest.nl"
8853    printf "%s\n" 'EGREP' >> "conftest.nl"
8854    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8855    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8856    as_fn_arith $ac_count + 1 && ac_count=$as_val
8857    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
8858      # Best one so far, save it but keep looking for a better one
8859      ac_cv_path_EGREP="$ac_path_EGREP"
8860      ac_path_EGREP_max=$ac_count
8861    fi
8862    # 10*(2^10) chars as input seems more than enough
8863    test $ac_count -gt 10 && break
8864  done
8865  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8866esac
8867
8868      $ac_path_EGREP_found && break 3
8869    done
8870  done
8871  done
8872IFS=$as_save_IFS
8873  if test -z "$ac_cv_path_EGREP"; then
8874    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8875  fi
8876else
8877  ac_cv_path_EGREP=$EGREP
8878fi
8879
8880   fi
8881fi
8882{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
8883printf "%s\n" "$ac_cv_path_EGREP" >&6; }
8884 EGREP="$ac_cv_path_EGREP"
8885
8886
8887
8888
8889
8890  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
8891printf %s "checking for Minix Amsterdam compiler... " >&6; }
8892if test ${gl_cv_c_amsterdam_compiler+y}
8893then :
8894  printf %s "(cached) " >&6
8895else $as_nop
8896
8897      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8898/* end confdefs.h.  */
8899
8900#ifdef __ACK__
8901Amsterdam
8902#endif
8903
8904_ACEOF
8905if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8906  $EGREP "Amsterdam" >/dev/null 2>&1
8907then :
8908  gl_cv_c_amsterdam_compiler=yes
8909else $as_nop
8910  gl_cv_c_amsterdam_compiler=no
8911fi
8912rm -rf conftest*
8913
8914
8915fi
8916{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
8917printf "%s\n" "$gl_cv_c_amsterdam_compiler" >&6; }
8918
8919      if test $gl_cv_c_amsterdam_compiler = yes; then
8920    if test -z "$AR"; then
8921      AR='cc -c.a'
8922    fi
8923    if test -z "$ARFLAGS"; then
8924      ARFLAGS='-o'
8925    fi
8926  else
8927                                                :
8928  fi
8929
8930        if test -n "$ac_tool_prefix"; then
8931  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8932set dummy ${ac_tool_prefix}ar; ac_word=$2
8933{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8934printf %s "checking for $ac_word... " >&6; }
8935if test ${ac_cv_prog_AR+y}
8936then :
8937  printf %s "(cached) " >&6
8938else $as_nop
8939  if test -n "$AR"; then
8940  ac_cv_prog_AR="$AR" # Let the user override the test.
8941else
8942as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8943for as_dir in $PATH
8944do
8945  IFS=$as_save_IFS
8946  case $as_dir in #(((
8947    '') as_dir=./ ;;
8948    */) ;;
8949    *) as_dir=$as_dir/ ;;
8950  esac
8951    for ac_exec_ext in '' $ac_executable_extensions; do
8952  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8953    ac_cv_prog_AR="${ac_tool_prefix}ar"
8954    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8955    break 2
8956  fi
8957done
8958  done
8959IFS=$as_save_IFS
8960
8961fi
8962fi
8963AR=$ac_cv_prog_AR
8964if test -n "$AR"; then
8965  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8966printf "%s\n" "$AR" >&6; }
8967else
8968  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8969printf "%s\n" "no" >&6; }
8970fi
8971
8972
8973fi
8974if test -z "$ac_cv_prog_AR"; then
8975  ac_ct_AR=$AR
8976  # Extract the first word of "ar", so it can be a program name with args.
8977set dummy ar; ac_word=$2
8978{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8979printf %s "checking for $ac_word... " >&6; }
8980if test ${ac_cv_prog_ac_ct_AR+y}
8981then :
8982  printf %s "(cached) " >&6
8983else $as_nop
8984  if test -n "$ac_ct_AR"; then
8985  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8986else
8987as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8988for as_dir in $PATH
8989do
8990  IFS=$as_save_IFS
8991  case $as_dir in #(((
8992    '') as_dir=./ ;;
8993    */) ;;
8994    *) as_dir=$as_dir/ ;;
8995  esac
8996    for ac_exec_ext in '' $ac_executable_extensions; do
8997  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8998    ac_cv_prog_ac_ct_AR="ar"
8999    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9000    break 2
9001  fi
9002done
9003  done
9004IFS=$as_save_IFS
9005
9006fi
9007fi
9008ac_ct_AR=$ac_cv_prog_ac_ct_AR
9009if test -n "$ac_ct_AR"; then
9010  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9011printf "%s\n" "$ac_ct_AR" >&6; }
9012else
9013  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9014printf "%s\n" "no" >&6; }
9015fi
9016
9017  if test "x$ac_ct_AR" = x; then
9018    AR="ar"
9019  else
9020    case $cross_compiling:$ac_tool_warned in
9021yes:)
9022{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9023printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9024ac_tool_warned=yes ;;
9025esac
9026    AR=$ac_ct_AR
9027  fi
9028else
9029  AR="$ac_cv_prog_AR"
9030fi
9031
9032  if test -z "$ARFLAGS"; then
9033    ARFLAGS='cr'
9034  fi
9035
9036
9037
9038  if test -z "$RANLIB"; then
9039    if test $gl_cv_c_amsterdam_compiler = yes; then
9040      RANLIB=':'
9041    else
9042            if test -n "$ac_tool_prefix"; then
9043  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
9044set dummy ${ac_tool_prefix}ranlib; ac_word=$2
9045{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9046printf %s "checking for $ac_word... " >&6; }
9047if test ${ac_cv_prog_RANLIB+y}
9048then :
9049  printf %s "(cached) " >&6
9050else $as_nop
9051  if test -n "$RANLIB"; then
9052  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
9053else
9054as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9055for as_dir in $PATH
9056do
9057  IFS=$as_save_IFS
9058  case $as_dir in #(((
9059    '') as_dir=./ ;;
9060    */) ;;
9061    *) as_dir=$as_dir/ ;;
9062  esac
9063    for ac_exec_ext in '' $ac_executable_extensions; do
9064  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9065    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
9066    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9067    break 2
9068  fi
9069done
9070  done
9071IFS=$as_save_IFS
9072
9073fi
9074fi
9075RANLIB=$ac_cv_prog_RANLIB
9076if test -n "$RANLIB"; then
9077  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
9078printf "%s\n" "$RANLIB" >&6; }
9079else
9080  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9081printf "%s\n" "no" >&6; }
9082fi
9083
9084
9085fi
9086if test -z "$ac_cv_prog_RANLIB"; then
9087  ac_ct_RANLIB=$RANLIB
9088  # Extract the first word of "ranlib", so it can be a program name with args.
9089set dummy ranlib; ac_word=$2
9090{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9091printf %s "checking for $ac_word... " >&6; }
9092if test ${ac_cv_prog_ac_ct_RANLIB+y}
9093then :
9094  printf %s "(cached) " >&6
9095else $as_nop
9096  if test -n "$ac_ct_RANLIB"; then
9097  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
9098else
9099as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9100for as_dir in $PATH
9101do
9102  IFS=$as_save_IFS
9103  case $as_dir in #(((
9104    '') as_dir=./ ;;
9105    */) ;;
9106    *) as_dir=$as_dir/ ;;
9107  esac
9108    for ac_exec_ext in '' $ac_executable_extensions; do
9109  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9110    ac_cv_prog_ac_ct_RANLIB="ranlib"
9111    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9112    break 2
9113  fi
9114done
9115  done
9116IFS=$as_save_IFS
9117
9118fi
9119fi
9120ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
9121if test -n "$ac_ct_RANLIB"; then
9122  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
9123printf "%s\n" "$ac_ct_RANLIB" >&6; }
9124else
9125  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9126printf "%s\n" "no" >&6; }
9127fi
9128
9129  if test "x$ac_ct_RANLIB" = x; then
9130    RANLIB=":"
9131  else
9132    case $cross_compiling:$ac_tool_warned in
9133yes:)
9134{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9135printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9136ac_tool_warned=yes ;;
9137esac
9138    RANLIB=$ac_ct_RANLIB
9139  fi
9140else
9141  RANLIB="$ac_cv_prog_RANLIB"
9142fi
9143
9144    fi
9145  fi
9146
9147
9148
9149
9150
9151  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9152printf %s "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
9153if test ${ac_cv_sys_largefile_source+y}
9154then :
9155  printf %s "(cached) " >&6
9156else $as_nop
9157  while :; do
9158  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9159/* end confdefs.h.  */
9160#include <sys/types.h> /* for off_t */
9161     #include <stdio.h>
9162int
9163main (void)
9164{
9165int (*fp) (FILE *, off_t, int) = fseeko;
9166     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
9167  ;
9168  return 0;
9169}
9170_ACEOF
9171if ac_fn_c_try_link "$LINENO"
9172then :
9173  ac_cv_sys_largefile_source=no; break
9174fi
9175rm -f core conftest.err conftest.$ac_objext conftest.beam \
9176    conftest$ac_exeext conftest.$ac_ext
9177  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9178/* end confdefs.h.  */
9179#undef _LARGEFILE_SOURCE
9180#define _LARGEFILE_SOURCE 1
9181#include <sys/types.h> /* for off_t */
9182     #include <stdio.h>
9183int
9184main (void)
9185{
9186int (*fp) (FILE *, off_t, int) = fseeko;
9187     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
9188  ;
9189  return 0;
9190}
9191_ACEOF
9192if ac_fn_c_try_link "$LINENO"
9193then :
9194  ac_cv_sys_largefile_source=1; break
9195fi
9196rm -f core conftest.err conftest.$ac_objext conftest.beam \
9197    conftest$ac_exeext conftest.$ac_ext
9198  ac_cv_sys_largefile_source=unknown
9199  break
9200done
9201fi
9202{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
9203printf "%s\n" "$ac_cv_sys_largefile_source" >&6; }
9204case $ac_cv_sys_largefile_source in #(
9205  no | unknown) ;;
9206  *)
9207printf "%s\n" "#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source" >>confdefs.h
9208;;
9209esac
9210rm -rf conftest*
9211
9212# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9213# in glibc 2.1.3, but that breaks too many other things.
9214# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
9215if test $ac_cv_sys_largefile_source != unknown; then
9216
9217printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
9218
9219fi
9220
9221  case "$host_os" in
9222    hpux*)
9223
9224printf "%s\n" "#define _LARGEFILE_SOURCE 1" >>confdefs.h
9225
9226      ;;
9227  esac
9228
9229# Check whether --enable-largefile was given.
9230if test ${enable_largefile+y}
9231then :
9232  enableval=$enable_largefile;
9233fi
9234
9235if test "$enable_largefile" != no
9236then :
9237  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
9238printf %s "checking for special C compiler options needed for large files... " >&6; }
9239if test ${ac_cv_sys_largefile_CC+y}
9240then :
9241  printf %s "(cached) " >&6
9242else $as_nop
9243  ac_cv_sys_largefile_CC=no
9244     if test "$GCC" != yes; then
9245       ac_save_CC=$CC
9246       while :; do
9247         # IRIX 6.2 and later do not support large files by default,
9248         # so use the C compiler's -n32 option if that helps.
9249         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9250/* end confdefs.h.  */
9251#include <sys/types.h>
9252 /* Check that off_t can represent 2**63 - 1 correctly.
9253    We can't simply define LARGE_OFF_T to be 9223372036854775807,
9254    since some C++ compilers masquerading as C compilers
9255    incorrectly reject 9223372036854775807.  */
9256#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
9257  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9258		       && LARGE_OFF_T % 2147483647 == 1)
9259		      ? 1 : -1];
9260int
9261main (void)
9262{
9263
9264  ;
9265  return 0;
9266}
9267_ACEOF
9268         if ac_fn_c_try_compile "$LINENO"
9269then :
9270  break
9271fi
9272rm -f core conftest.err conftest.$ac_objext conftest.beam
9273         CC="$CC -n32"
9274         if ac_fn_c_try_compile "$LINENO"
9275then :
9276  ac_cv_sys_largefile_CC=' -n32'; break
9277fi
9278rm -f core conftest.err conftest.$ac_objext conftest.beam
9279         break
9280       done
9281       CC=$ac_save_CC
9282       rm -f conftest.$ac_ext
9283    fi
9284fi
9285{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
9286printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
9287  if test "$ac_cv_sys_largefile_CC" != no; then
9288    CC=$CC$ac_cv_sys_largefile_CC
9289  fi
9290
9291  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9292printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
9293if test ${ac_cv_sys_file_offset_bits+y}
9294then :
9295  printf %s "(cached) " >&6
9296else $as_nop
9297  while :; do
9298  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9299/* end confdefs.h.  */
9300#include <sys/types.h>
9301 /* Check that off_t can represent 2**63 - 1 correctly.
9302    We can't simply define LARGE_OFF_T to be 9223372036854775807,
9303    since some C++ compilers masquerading as C compilers
9304    incorrectly reject 9223372036854775807.  */
9305#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
9306  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9307		       && LARGE_OFF_T % 2147483647 == 1)
9308		      ? 1 : -1];
9309int
9310main (void)
9311{
9312
9313  ;
9314  return 0;
9315}
9316_ACEOF
9317if ac_fn_c_try_compile "$LINENO"
9318then :
9319  ac_cv_sys_file_offset_bits=no; break
9320fi
9321rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9322  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9323/* end confdefs.h.  */
9324#undef _FILE_OFFSET_BITS
9325#define _FILE_OFFSET_BITS 64
9326#include <sys/types.h>
9327 /* Check that off_t can represent 2**63 - 1 correctly.
9328    We can't simply define LARGE_OFF_T to be 9223372036854775807,
9329    since some C++ compilers masquerading as C compilers
9330    incorrectly reject 9223372036854775807.  */
9331#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
9332  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9333		       && LARGE_OFF_T % 2147483647 == 1)
9334		      ? 1 : -1];
9335int
9336main (void)
9337{
9338
9339  ;
9340  return 0;
9341}
9342_ACEOF
9343if ac_fn_c_try_compile "$LINENO"
9344then :
9345  ac_cv_sys_file_offset_bits=64; break
9346fi
9347rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9348  ac_cv_sys_file_offset_bits=unknown
9349  break
9350done
9351fi
9352{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
9353printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
9354case $ac_cv_sys_file_offset_bits in #(
9355  no | unknown) ;;
9356  *)
9357printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
9358;;
9359esac
9360rm -rf conftest*
9361  case $ac_cv_sys_file_offset_bits in #(
9362  unknown) :
9363    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
9364printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
9365if test ${ac_cv_sys_large_files+y}
9366then :
9367  printf %s "(cached) " >&6
9368else $as_nop
9369  while :; do
9370  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9371/* end confdefs.h.  */
9372#include <sys/types.h>
9373 /* Check that off_t can represent 2**63 - 1 correctly.
9374    We can't simply define LARGE_OFF_T to be 9223372036854775807,
9375    since some C++ compilers masquerading as C compilers
9376    incorrectly reject 9223372036854775807.  */
9377#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
9378  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9379		       && LARGE_OFF_T % 2147483647 == 1)
9380		      ? 1 : -1];
9381int
9382main (void)
9383{
9384
9385  ;
9386  return 0;
9387}
9388_ACEOF
9389if ac_fn_c_try_compile "$LINENO"
9390then :
9391  ac_cv_sys_large_files=no; break
9392fi
9393rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9394  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9395/* end confdefs.h.  */
9396#undef _LARGE_FILES
9397#define _LARGE_FILES 1
9398#include <sys/types.h>
9399 /* Check that off_t can represent 2**63 - 1 correctly.
9400    We can't simply define LARGE_OFF_T to be 9223372036854775807,
9401    since some C++ compilers masquerading as C compilers
9402    incorrectly reject 9223372036854775807.  */
9403#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
9404  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9405		       && LARGE_OFF_T % 2147483647 == 1)
9406		      ? 1 : -1];
9407int
9408main (void)
9409{
9410
9411  ;
9412  return 0;
9413}
9414_ACEOF
9415if ac_fn_c_try_compile "$LINENO"
9416then :
9417  ac_cv_sys_large_files=1; break
9418fi
9419rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9420  ac_cv_sys_large_files=unknown
9421  break
9422done
9423fi
9424{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
9425printf "%s\n" "$ac_cv_sys_large_files" >&6; }
9426case $ac_cv_sys_large_files in #(
9427  no | unknown) ;;
9428  *)
9429printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
9430;;
9431esac
9432rm -rf conftest* ;; #(
9433  64) :
9434
9435 # Check whether --enable-year2038 was given.
9436if test ${enable_year2038+y}
9437then :
9438  enableval=$enable_year2038;
9439fi
9440
9441 if test "$enable_year2038" != no
9442then :
9443
9444                            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for time_t past the year 2038" >&5
9445printf %s "checking for time_t past the year 2038... " >&6; }
9446if test ${gl_cv_type_time_t_y2038+y}
9447then :
9448  printf %s "(cached) " >&6
9449else $as_nop
9450  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9451/* end confdefs.h.  */
9452
9453  #include <time.h>
9454  /* Check that time_t can represent 2**32 - 1 correctly.  */
9455  #define LARGE_TIME_T \\
9456    ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30)))
9457  int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535
9458                           && LARGE_TIME_T % 65537 == 0)
9459                          ? 1 : -1];
9460
9461_ACEOF
9462if ac_fn_c_try_compile "$LINENO"
9463then :
9464  gl_cv_type_time_t_y2038=yes
9465else $as_nop
9466  gl_cv_type_time_t_y2038=no
9467fi
9468rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9469
9470fi
9471{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_time_t_y2038" >&5
9472printf "%s\n" "$gl_cv_type_time_t_y2038" >&6; }
9473  if test "$gl_cv_type_time_t_y2038" = no; then
9474    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit time_t with _TIME_BITS=64" >&5
9475printf %s "checking for 64-bit time_t with _TIME_BITS=64... " >&6; }
9476if test ${gl_cv_type_time_t_bits_macro+y}
9477then :
9478  printf %s "(cached) " >&6
9479else $as_nop
9480  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9481/* end confdefs.h.  */
9482#define _TIME_BITS 64
9483                           #define _FILE_OFFSET_BITS 64
9484
9485  #include <time.h>
9486  /* Check that time_t can represent 2**32 - 1 correctly.  */
9487  #define LARGE_TIME_T \\
9488    ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30)))
9489  int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535
9490                           && LARGE_TIME_T % 65537 == 0)
9491                          ? 1 : -1];
9492
9493_ACEOF
9494if ac_fn_c_try_compile "$LINENO"
9495then :
9496  gl_cv_type_time_t_bits_macro=yes
9497else $as_nop
9498  gl_cv_type_time_t_bits_macro=no
9499fi
9500rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9501
9502fi
9503{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_time_t_bits_macro" >&5
9504printf "%s\n" "$gl_cv_type_time_t_bits_macro" >&6; }
9505    if test "$gl_cv_type_time_t_bits_macro" = yes; then
9506
9507printf "%s\n" "#define _TIME_BITS 64" >>confdefs.h
9508
9509
9510printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
9511
9512      gl_cv_type_time_t_y2038=yes
9513    fi
9514  fi
9515  if test $gl_cv_type_time_t_y2038 = no; then
9516    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9517/* end confdefs.h.  */
9518#ifdef _USE_32BIT_TIME_T
9519             int ok;
9520           #else
9521             error fail
9522           #endif
9523
9524_ACEOF
9525if ac_fn_c_try_compile "$LINENO"
9526then :
9527  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9528printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
9529as_fn_error $? "The 'time_t' type stops working after January 2038.
9530          Remove _USE_32BIT_TIME_T from the compiler flags.
9531See \`config.log' for more details" "$LINENO" 5; }
9532else $as_nop
9533  # If not cross-compiling and  says we should check,
9534       # and 'touch' works with a large timestamp, then evidently wider time_t
9535       # is desired and supported, so fail and ask the builder to fix the
9536       # problem.  Otherwise, just warn the builder.
9537
9538       if test "$gl_warned_about_y2038" != yes; then
9539         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: The 'time_t' type stops working after January 2038,
9540            and this package needs a wider 'time_t' type
9541            if there is any way to access timestamps after that.
9542            Configure with 'CC=\"${CC} -m64\"' perhaps?" >&5
9543printf "%s\n" "$as_me: WARNING: The 'time_t' type stops working after January 2038,
9544            and this package needs a wider 'time_t' type
9545            if there is any way to access timestamps after that.
9546            Configure with 'CC=\"${CC} -m64\"' perhaps?" >&2;}
9547         gl_warned_about_y2038=yes
9548       fi
9549
9550fi
9551rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9552  fi
9553fi
9554 ;; #(
9555  *) :
9556     ;;
9557esac
9558fi
9559
9560
9561
9562  case "$host_os" in
9563    mingw*)
9564
9565printf "%s\n" "#define __MINGW_USE_VC2005_COMPAT 1" >>confdefs.h
9566
9567      ;;
9568  esac
9569
9570
9571
9572
9573
9574
9575
9576  # Check whether --enable-threads was given.
9577if test ${enable_threads+y}
9578then :
9579  enableval=$enable_threads; gl_use_threads=$enableval
9580else $as_nop
9581  if test -n "$gl_use_threads_default"; then
9582       gl_use_threads="$gl_use_threads_default"
9583     else
9584       case "$host_os" in
9585                                    osf*) gl_use_threads=no ;;
9586                                    cygwin*)
9587               case `uname -r` in
9588                 1.[0-5].*) gl_use_threads=no ;;
9589                 *)         gl_use_threads=yes ;;
9590               esac
9591               ;;
9592                  mingw*)
9593               case "$gl_use_winpthreads_default" in
9594                 yes) gl_use_threads=posix ;;
9595                 no)  gl_use_threads=windows ;;
9596                 *)   gl_use_threads=yes ;;
9597               esac
9598               ;;
9599         *)    gl_use_threads=yes ;;
9600       esac
9601     fi
9602
9603fi
9604
9605  if test "$gl_use_threads" = yes \
9606     || test "$gl_use_threads" = isoc \
9607     || test "$gl_use_threads" = posix \
9608     || test "$gl_use_threads" = isoc+posix; then
9609    # For using <threads.h> or <pthread.h>:
9610
9611
9612  if test -z "$gl_anythreadlib_early_done"; then
9613    case "$host_os" in
9614      osf*)
9615        # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
9616        # groks <pthread.h>. cc also understands the flag -pthread, but
9617        # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
9618        # 2. putting a flag into CPPFLAGS that has an effect on the linker
9619        # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
9620        # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
9621        CPPFLAGS="$CPPFLAGS -D_REENTRANT"
9622        ;;
9623    esac
9624    # Some systems optimize for single-threaded programs by default, and
9625    # need special flags to disable these optimizations. For example, the
9626    # definition of 'errno' in <errno.h>.
9627    case "$host_os" in
9628      aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
9629      solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
9630    esac
9631    gl_anythreadlib_early_done=done
9632  fi
9633
9634  fi
9635
9636
9637
9638  # Pre-early section.
9639
9640
9641
9642
9643  # Code from module absolute-header:
9644  # Code from module accept:
9645  # Code from module access:
9646  # Code from module alloca:
9647  # Code from module alloca-opt:
9648  # Code from module announce-gen:
9649  # Code from module arpa_inet:
9650  # Code from module array-mergesort:
9651  # Code from module assure:
9652  # Code from module at-internal:
9653  # Code from module attribute:
9654  # Code from module base32:
9655  # Code from module basename-lgpl:
9656  # Code from module binary-io:
9657  # Code from module bind:
9658  # Code from module bitrotate:
9659  # Code from module btowc:
9660  # Code from module builtin-expect:
9661  # Code from module byteswap:
9662  # Code from module c-ctype:
9663  # Code from module c-strcase:
9664  # Code from module c-strcaseeq:
9665  # Code from module c-strcasestr:
9666  # Code from module c99:
9667  # Code from module calloc-gnu:
9668  # Code from module calloc-posix:
9669  # Code from module canonicalize:
9670  # Code from module canonicalize-lgpl:
9671  # Code from module chdir:
9672  # Code from module chdir-long:
9673  # Code from module clock-time:
9674  # Code from module cloexec:
9675  # Code from module close:
9676  # Code from module closedir:
9677  # Code from module concat-filename:
9678  # Code from module connect:
9679  # Code from module crypto/af_alg:
9680  # Code from module crypto/md2:
9681  # Code from module crypto/md4:
9682  # Code from module crypto/md5:
9683  # Code from module crypto/md5-buffer:
9684  # Code from module crypto/sha1:
9685  # Code from module crypto/sha1-buffer:
9686  # Code from module crypto/sha256:
9687  # Code from module crypto/sha256-buffer:
9688  # Code from module crypto/sha512:
9689  # Code from module crypto/sha512-buffer:
9690  # Code from module ctype:
9691  # Code from module d-ino:
9692  # Code from module dirent:
9693  # Code from module dirfd:
9694  # Code from module dirname:
9695  # Code from module dirname-lgpl:
9696  # Code from module double-slash-root:
9697  # Code from module dup:
9698  # Code from module dup2:
9699  # Code from module dynarray:
9700  # Code from module eloop-threshold:
9701  # Code from module environ:
9702  # Code from module errno:
9703  # Code from module error:
9704  # Code from module exitfail:
9705  # Code from module extensions:
9706  # Code from module extern-inline:
9707  # Code from module fatal-signal:
9708  # Code from module fchdir:
9709  # Code from module fcntl:
9710  # Code from module fcntl-h:
9711  # Code from module fd-hook:
9712  # Code from module fd-safer-flag:
9713  # Code from module fdopendir:
9714  # Code from module fflush:
9715
9716  # Code from module file-set:
9717  # Code from module filename:
9718  # Code from module filenamecat-lgpl:
9719  # Code from module findprog-in:
9720  # Code from module flexmember:
9721  # Code from module float:
9722  # Code from module flock:
9723  # Code from module fnmatch:
9724  # Code from module fnmatch-gnu:
9725  # Code from module fnmatch-h:
9726  # Code from module fopen:
9727  # Code from module fopen-gnu:
9728  # Code from module fpurge:
9729  # Code from module freading:
9730  # Code from module free-posix:
9731  # Code from module fseek:
9732  # Code from module fseeko:
9733
9734  # Code from module fstat:
9735  # Code from module fstatat:
9736  # Code from module ftell:
9737  # Code from module ftello:
9738
9739  # Code from module futimens:
9740  # Code from module gendocs:
9741  # Code from module getaddrinfo:
9742  # Code from module getcwd:
9743  # Code from module getcwd-lgpl:
9744  # Code from module getdelim:
9745  # Code from module getdtablesize:
9746  # Code from module getgroups:
9747  # Code from module getline:
9748  # Code from module getopt-gnu:
9749  # Code from module getopt-posix:
9750  # Code from module getpass:
9751  # Code from module getpass-gnu:
9752  # Code from module getpeername:
9753  # Code from module getprogname:
9754  # Code from module getrandom:
9755  # Code from module getsockname:
9756  # Code from module gettext-h:
9757  # Code from module gettime:
9758  # Code from module gettimeofday:
9759  # Code from module git-version-gen:
9760  # Code from module gitlog-to-changelog:
9761  # Code from module gnu-web-doc-update:
9762  # Code from module gnumakefile:
9763  # Code from module gnupload:
9764  # Code from module gperf:
9765  # Code from module group-member:
9766  # Code from module hard-locale:
9767  # Code from module hash:
9768  # Code from module hash-pjw:
9769  # Code from module hash-triple-simple:
9770  # Code from module havelib:
9771  # Code from module hostent:
9772  # Code from module ialloc:
9773  # Code from module iconv:
9774  # Code from module iconv-h:
9775  # Code from module idx:
9776  # Code from module include_next:
9777  # Code from module inet_ntop:
9778  # Code from module inline:
9779  # Code from module intprops:
9780  # Code from module inttypes:
9781  # Code from module inttypes-incomplete:
9782  # Code from module ioctl:
9783  # Code from module isblank:
9784  # Code from module iswblank:
9785  # Code from module iswdigit:
9786  # Code from module iswxdigit:
9787  # Code from module langinfo:
9788  # Code from module largefile:
9789
9790
9791  # Code from module libc-config:
9792  # Code from module libunistring-optional:
9793  # Code from module limits-h:
9794  # Code from module link:
9795  # Code from module listen:
9796  # Code from module localcharset:
9797  # Code from module locale:
9798  # Code from module localeconv:
9799  # Code from module lock:
9800  # Code from module lseek:
9801  # Code from module lstat:
9802  # Code from module maintainer-makefile:
9803  # Code from module malloc-gnu:
9804  # Code from module malloc-posix:
9805  # Code from module malloca:
9806  # Code from module mbchar:
9807  # Code from module mbiter:
9808  # Code from module mbrtowc:
9809  # Code from module mbsinit:
9810  # Code from module mbsrtowcs:
9811  # Code from module mbtowc:
9812  # Code from module memchr:
9813  # Code from module mempcpy:
9814  # Code from module memrchr:
9815  # Code from module minmax:
9816  # Code from module mkdir:
9817  # Code from module mkostemp:
9818  # Code from module mkstemp:
9819  # Code from module mktime:
9820  # Code from module mktime-internal:
9821  # Code from module msvc-inval:
9822  # Code from module msvc-nothrow:
9823  # Code from module multiarch:
9824  # Code from module nanosleep:
9825  # Code from module netdb:
9826  # Code from module netinet_in:
9827  # Code from module nl_langinfo:
9828  # Code from module nocrash:
9829  # Code from module open:
9830  # Code from module openat:
9831  # Code from module openat-die:
9832  # Code from module openat-h:
9833  # Code from module opendir:
9834  # Code from module pathmax:
9835  # Code from module pipe-posix:
9836  # Code from module pipe2:
9837  # Code from module pipe2-safer:
9838  # Code from module posix_spawn:
9839  # Code from module posix_spawn-internal:
9840  # Code from module posix_spawn_file_actions_addchdir:
9841  # Code from module posix_spawn_file_actions_addclose:
9842  # Code from module posix_spawn_file_actions_adddup2:
9843  # Code from module posix_spawn_file_actions_addopen:
9844  # Code from module posix_spawn_file_actions_destroy:
9845  # Code from module posix_spawn_file_actions_init:
9846  # Code from module posix_spawnattr_destroy:
9847  # Code from module posix_spawnattr_init:
9848  # Code from module posix_spawnattr_setflags:
9849  # Code from module posix_spawnattr_setpgroup:
9850  # Code from module posix_spawnattr_setsigmask:
9851  # Code from module posix_spawnp:
9852  # Code from module quote:
9853  # Code from module quotearg:
9854  # Code from module quotearg-simple:
9855  # Code from module raise:
9856  # Code from module rawmemchr:
9857  # Code from module readdir:
9858  # Code from module readlink:
9859  # Code from module realloc-gnu:
9860  # Code from module realloc-posix:
9861  # Code from module reallocarray:
9862  # Code from module recv:
9863  # Code from module regex:
9864  # Code from module rename:
9865  # Code from module rewinddir:
9866  # Code from module rmdir:
9867  # Code from module same-inode:
9868  # Code from module save-cwd:
9869  # Code from module sched:
9870  # Code from module scratch_buffer:
9871  # Code from module secure_getenv:
9872  # Code from module select:
9873  # Code from module send:
9874  # Code from module servent:
9875  # Code from module setlocale-null:
9876  # Code from module setsockopt:
9877  # Code from module sh-filename:
9878  # Code from module sigaction:
9879  # Code from module signal-h:
9880  # Code from module sigpipe:
9881  # Code from module sigprocmask:
9882  # Code from module size_max:
9883  # Code from module snippet/_Noreturn:
9884  # Code from module snippet/arg-nonnull:
9885  # Code from module snippet/c++defs:
9886  # Code from module snippet/warn-on-use:
9887  # Code from module snprintf:
9888  # Code from module socket:
9889  # Code from module socketlib:
9890  # Code from module sockets:
9891  # Code from module socklen:
9892  # Code from module spawn:
9893  # Code from module spawn-pipe:
9894  # Code from module ssize_t:
9895  # Code from module stat:
9896  # Code from module stat-time:
9897  # Code from module std-gnu11:
9898  # Code from module stdalign:
9899  # Code from module stdbool:
9900  # Code from module stddef:
9901  # Code from module stdint:
9902  # Code from module stdio:
9903  # Code from module stdlib:
9904  # Code from module stpcpy:
9905  # Code from module strcase:
9906  # Code from module strchrnul:
9907  # Code from module strdup-posix:
9908  # Code from module streq:
9909  # Code from module strerror:
9910  # Code from module strerror-override:
9911  # Code from module strerror_r-posix:
9912  # Code from module string:
9913  # Code from module strings:
9914  # Code from module strndup:
9915  # Code from module strnlen:
9916  # Code from module strnlen1:
9917  # Code from module strpbrk:
9918  # Code from module strptime:
9919  # Code from module strtok_r:
9920  # Code from module strtol:
9921  # Code from module strtoll:
9922  # Code from module symlink:
9923  # Code from module sys_file:
9924  # Code from module sys_ioctl:
9925  # Code from module sys_random:
9926  # Code from module sys_select:
9927  # Code from module sys_socket:
9928  # Code from module sys_stat:
9929  # Code from module sys_time:
9930  # Code from module sys_types:
9931  # Code from module sys_uio:
9932  # Code from module sys_wait:
9933  # Code from module tempname:
9934  # Code from module thread-optim:
9935  # Code from module threadlib:
9936
9937
9938
9939  # Code from module time:
9940  # Code from module time_r:
9941  # Code from module timegm:
9942  # Code from module timespec:
9943  # Code from module tmpdir:
9944  # Code from module u64:
9945  # Code from module unicase/base:
9946  # Code from module unicase/cased:
9947  # Code from module unicase/empty-prefix-context:
9948  # Code from module unicase/empty-suffix-context:
9949  # Code from module unicase/ignorable:
9950  # Code from module unicase/special-casing:
9951  # Code from module unicase/tolower:
9952  # Code from module unicase/u8-casemap:
9953  # Code from module unicase/u8-tolower:
9954  # Code from module unictype/base:
9955  # Code from module unictype/combining-class:
9956  # Code from module unictype/property-soft-dotted:
9957  # Code from module uninorm/base:
9958  # Code from module uninorm/decompose-internal:
9959  # Code from module uninorm/u8-normalize:
9960  # Code from module unistd:
9961  # Code from module unistd-safer:
9962  # Code from module unistr/base:
9963  # Code from module unistr/u8-cpy:
9964  # Code from module unistr/u8-mbtouc-unsafe:
9965  # Code from module unistr/u8-strlen:
9966  # Code from module unistr/u8-uctomb:
9967  # Code from module unitypes:
9968  # Code from module uniwidth/base:
9969  # Code from module uniwidth/width:
9970  # Code from module unlink:
9971  # Code from module unlocked-io:
9972  # Code from module unlocked-io-internal:
9973  # Code from module update-copyright:
9974  # Code from module useless-if-before-free:
9975  # Code from module utime:
9976  # Code from module utime-h:
9977  # Code from module utimens:
9978  # Code from module vasnprintf:
9979  # Code from module vasprintf:
9980  # Code from module vc-list-files:
9981  # Code from module verify:
9982  # Code from module vsnprintf:
9983  # Code from module wait-process:
9984  # Code from module waitpid:
9985  # Code from module warnings:
9986  # Code from module wchar:
9987  # Code from module wcrtomb:
9988  # Code from module wctype-h:
9989  # Code from module wcwidth:
9990  # Code from module windows-mutex:
9991  # Code from module windows-once:
9992  # Code from module windows-recmutex:
9993  # Code from module windows-rwlock:
9994  # Code from module windows-spawn:
9995  # Code from module wmemchr:
9996  # Code from module wmempcpy:
9997  # Code from module write:
9998  # Code from module xalloc:
9999  # Code from module xalloc-die:
10000  # Code from module xalloc-oversized:
10001  # Code from module xmemdup0:
10002  # Code from module xsize:
10003  # Code from module xstrndup:
10004
10005
10006
10007
10008
10009
10010
10011
10012        if test -n "$PYTHON"; then
10013      # If the user set $PYTHON, use it and don't search something else.
10014      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version is >= 3.0" >&5
10015printf %s "checking whether $PYTHON version is >= 3.0... " >&6; }
10016      prog="import sys
10017# split strings by '.' and convert to numeric.  Append some zeros
10018# because we need at least 4 digits for the hex conversion.
10019# map returns an iterator in Python 3.0 and a list in 2.x
10020minver = list(map(int, '3.0'.split('.'))) + [0, 0, 0]
10021minverhex = 0
10022# xrange is not present in Python 3.0 and range returns an iterator
10023for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
10024sys.exit(sys.hexversion < minverhex)"
10025  if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5
10026   ($PYTHON -c "$prog") >&5 2>&5
10027   ac_status=$?
10028   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10029   (exit $ac_status); }
10030then :
10031  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10032printf "%s\n" "yes" >&6; }
10033else $as_nop
10034  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10035printf "%s\n" "no" >&6; }
10036			       as_fn_error $? "Python interpreter is too old" "$LINENO" 5
10037fi
10038      am_display_PYTHON=$PYTHON
10039    else
10040      # Otherwise, try each interpreter until we find one that satisfies
10041      # VERSION.
10042      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 3.0" >&5
10043printf %s "checking for a Python interpreter with version >= 3.0... " >&6; }
10044if test ${am_cv_pathless_PYTHON+y}
10045then :
10046  printf %s "(cached) " >&6
10047else $as_nop
10048
10049	for am_cv_pathless_PYTHON in python python2 python3  python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3  python3.2 python3.1 python3.0  python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1  python2.0 none; do
10050	  test "$am_cv_pathless_PYTHON" = none && break
10051	  prog="import sys
10052# split strings by '.' and convert to numeric.  Append some zeros
10053# because we need at least 4 digits for the hex conversion.
10054# map returns an iterator in Python 3.0 and a list in 2.x
10055minver = list(map(int, '3.0'.split('.'))) + [0, 0, 0]
10056minverhex = 0
10057# xrange is not present in Python 3.0 and range returns an iterator
10058for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
10059sys.exit(sys.hexversion < minverhex)"
10060  if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5
10061   ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5
10062   ac_status=$?
10063   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10064   (exit $ac_status); }
10065then :
10066  break
10067fi
10068	done
10069fi
10070{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_pathless_PYTHON" >&5
10071printf "%s\n" "$am_cv_pathless_PYTHON" >&6; }
10072      # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
10073      if test "$am_cv_pathless_PYTHON" = none; then
10074	PYTHON=:
10075      else
10076        # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args.
10077set dummy $am_cv_pathless_PYTHON; ac_word=$2
10078{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10079printf %s "checking for $ac_word... " >&6; }
10080if test ${ac_cv_path_PYTHON+y}
10081then :
10082  printf %s "(cached) " >&6
10083else $as_nop
10084  case $PYTHON in
10085  [\\/]* | ?:[\\/]*)
10086  ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
10087  ;;
10088  *)
10089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10090for as_dir in $PATH
10091do
10092  IFS=$as_save_IFS
10093  case $as_dir in #(((
10094    '') as_dir=./ ;;
10095    */) ;;
10096    *) as_dir=$as_dir/ ;;
10097  esac
10098    for ac_exec_ext in '' $ac_executable_extensions; do
10099  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10100    ac_cv_path_PYTHON="$as_dir$ac_word$ac_exec_ext"
10101    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10102    break 2
10103  fi
10104done
10105  done
10106IFS=$as_save_IFS
10107
10108  ;;
10109esac
10110fi
10111PYTHON=$ac_cv_path_PYTHON
10112if test -n "$PYTHON"; then
10113  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10114printf "%s\n" "$PYTHON" >&6; }
10115else
10116  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10117printf "%s\n" "no" >&6; }
10118fi
10119
10120
10121      fi
10122      am_display_PYTHON=$am_cv_pathless_PYTHON
10123    fi
10124
10125
10126  if test "$PYTHON" = :; then
10127      :
10128  else
10129
10130
10131  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5
10132printf %s "checking for $am_display_PYTHON version... " >&6; }
10133if test ${am_cv_python_version+y}
10134then :
10135  printf %s "(cached) " >&6
10136else $as_nop
10137  am_cv_python_version=`$PYTHON -c "import sys; print ('%u.%u' % sys.version_info[:2])"`
10138fi
10139{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5
10140printf "%s\n" "$am_cv_python_version" >&6; }
10141  PYTHON_VERSION=$am_cv_python_version
10142
10143
10144
10145  if test "x$prefix" = xNONE
10146  then
10147   am__usable_prefix=$ac_default_prefix
10148  else
10149   am__usable_prefix=$prefix
10150  fi
10151
10152
10153# Check whether --with-python_prefix was given.
10154if test ${with_python_prefix+y}
10155then :
10156  withval=$with_python_prefix;  am_python_prefix_subst="$withval"
10157   am_cv_python_prefix="$withval"
10158   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON prefix" >&5
10159printf %s "checking for $am_display_PYTHON prefix... " >&6; }
10160   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_prefix" >&5
10161printf "%s\n" "$am_cv_python_prefix" >&6; }
10162else $as_nop
10163
10164  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON prefix" >&5
10165printf %s "checking for $am_display_PYTHON prefix... " >&6; }
10166if test ${am_cv_python_prefix+y}
10167then :
10168  printf %s "(cached) " >&6
10169else $as_nop
10170  am_cv_python_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"`
10171fi
10172{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_prefix" >&5
10173printf "%s\n" "$am_cv_python_prefix" >&6; }
10174
10175      case $am_cv_python_prefix in
10176     $am__usable_prefix*)
10177       am__strip_prefix=`echo "$am__usable_prefix" | sed 's|.|.|g'`
10178       am_python_prefix_subst=`echo "$am_cv_python_prefix" | sed "s,^$am__strip_prefix,\\${prefix},"`
10179       ;;
10180     *)
10181       am_python_prefix_subst=$am_cv_python_prefix
10182       ;;
10183  esac
10184
10185fi
10186
10187  PYTHON_PREFIX=$am_python_prefix_subst
10188
10189
10190
10191# Check whether --with-python_exec_prefix was given.
10192if test ${with_python_exec_prefix+y}
10193then :
10194  withval=$with_python_exec_prefix;  am_python_exec_prefix_subst="$withval"
10195   am_cv_python_exec_prefix="$withval"
10196   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON exec_prefix" >&5
10197printf %s "checking for $am_display_PYTHON exec_prefix... " >&6; }
10198   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_exec_prefix" >&5
10199printf "%s\n" "$am_cv_python_exec_prefix" >&6; }
10200else $as_nop
10201
10202    if test -n "$with_python_prefix"
10203then :
10204  am_python_exec_prefix_subst="$with_python_prefix"
10205  am_cv_python_exec_prefix="$with_python_prefix"
10206  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON exec_prefix" >&5
10207printf %s "checking for $am_display_PYTHON exec_prefix... " >&6; }
10208  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_exec_prefix" >&5
10209printf "%s\n" "$am_cv_python_exec_prefix" >&6; }
10210else $as_nop
10211
10212  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON exec_prefix" >&5
10213printf %s "checking for $am_display_PYTHON exec_prefix... " >&6; }
10214if test ${am_cv_python_exec_prefix+y}
10215then :
10216  printf %s "(cached) " >&6
10217else $as_nop
10218  am_cv_python_exec_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)"`
10219fi
10220{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_exec_prefix" >&5
10221printf "%s\n" "$am_cv_python_exec_prefix" >&6; }
10222        if test "x$exec_prefix" = xNONE
10223  then
10224   am__usable_exec_prefix=$am__usable_prefix
10225  else
10226   am__usable_exec_prefix=$exec_prefix
10227  fi
10228  case $am_cv_python_exec_prefix in
10229     $am__usable_exec_prefix*)
10230       am__strip_prefix=`echo "$am__usable_exec_prefix" | sed 's|.|.|g'`
10231       am_python_exec_prefix_subst=`echo "$am_cv_python_exec_prefix" | sed "s,^$am__strip_prefix,\\${exec_prefix},"`
10232       ;;
10233     *)
10234       am_python_exec_prefix_subst=$am_cv_python_exec_prefix
10235       ;;
10236  esac
10237
10238fi
10239fi
10240
10241  PYTHON_EXEC_PREFIX=$am_python_exec_prefix_subst
10242
10243
10244
10245  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5
10246printf %s "checking for $am_display_PYTHON platform... " >&6; }
10247if test ${am_cv_python_platform+y}
10248then :
10249  printf %s "(cached) " >&6
10250else $as_nop
10251  am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`
10252fi
10253{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5
10254printf "%s\n" "$am_cv_python_platform" >&6; }
10255  PYTHON_PLATFORM=$am_cv_python_platform
10256
10257
10258  # Just factor out some code duplication.
10259  am_python_setup_sysconfig="\
10260import sys
10261# Prefer sysconfig over distutils.sysconfig, for better compatibility
10262# with python 3.x.  See automake bug#10227.
10263try:
10264    import sysconfig
10265except ImportError:
10266    can_use_sysconfig = 0
10267else:
10268    can_use_sysconfig = 1
10269# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs:
10270# <https://github.com/pypa/virtualenv/issues/118>
10271try:
10272    from platform import python_implementation
10273    if python_implementation() == 'CPython' and sys.version[:3] == '2.7':
10274        can_use_sysconfig = 0
10275except ImportError:
10276    pass"
10277
10278
10279            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5
10280printf %s "checking for $am_display_PYTHON script directory... " >&6; }
10281if test ${am_cv_python_pythondir+y}
10282then :
10283  printf %s "(cached) " >&6
10284else $as_nop
10285  if test "x$am_cv_python_prefix" = x
10286     then
10287       am_py_prefix=$am__usable_prefix
10288     else
10289       am_py_prefix=$am_cv_python_prefix
10290     fi
10291     am_cv_python_pythondir=`$PYTHON -c "
10292$am_python_setup_sysconfig
10293if can_use_sysconfig:
10294    sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'})
10295else:
10296    from distutils import sysconfig
10297    sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
10298sys.stdout.write(sitedir)"`
10299     case $am_cv_python_pythondir in
10300     $am_py_prefix*)
10301       am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
10302       am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,\\${PYTHON_PREFIX},"`
10303       ;;
10304     *)
10305       case $am_py_prefix in
10306         /usr|/System*) ;;
10307         *)
10308	  am_cv_python_pythondir="\${PYTHON_PREFIX}/lib/python$PYTHON_VERSION/site-packages"
10309	  ;;
10310       esac
10311       ;;
10312     esac
10313
10314fi
10315{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5
10316printf "%s\n" "$am_cv_python_pythondir" >&6; }
10317  pythondir=$am_cv_python_pythondir
10318
10319
10320
10321  pkgpythondir=\${pythondir}/$PACKAGE
10322
10323
10324        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5
10325printf %s "checking for $am_display_PYTHON extension module directory... " >&6; }
10326if test ${am_cv_python_pyexecdir+y}
10327then :
10328  printf %s "(cached) " >&6
10329else $as_nop
10330  if test "x$am_cv_python_exec_prefix" = x
10331     then
10332       am_py_exec_prefix=$am__usable_exec_prefix
10333     else
10334       am_py_exec_prefix=$am_cv_python_exec_prefix
10335     fi
10336     am_cv_python_pyexecdir=`$PYTHON -c "
10337$am_python_setup_sysconfig
10338if can_use_sysconfig:
10339    sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_exec_prefix'})
10340else:
10341    from distutils import sysconfig
10342    sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_exec_prefix')
10343sys.stdout.write(sitedir)"`
10344     case $am_cv_python_pyexecdir in
10345     $am_py_exec_prefix*)
10346       am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
10347       am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,\\${PYTHON_EXEC_PREFIX},"`
10348       ;;
10349     *)
10350       case $am_py_exec_prefix in
10351         /usr|/System*) ;;
10352         *)
10353	   am_cv_python_pyexecdir="\${PYTHON_EXEC_PREFIX}/lib/python$PYTHON_VERSION/site-packages"
10354	   ;;
10355       esac
10356       ;;
10357     esac
10358
10359fi
10360{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5
10361printf "%s\n" "$am_cv_python_pyexecdir" >&6; }
10362  pyexecdir=$am_cv_python_pyexecdir
10363
10364
10365
10366  pkgpyexecdir=\${pyexecdir}/$PACKAGE
10367
10368
10369
10370  fi
10371
10372
10373 if test "$PYTHON" != :; then
10374  HAVE_PYTHON3_TRUE=
10375  HAVE_PYTHON3_FALSE='#'
10376else
10377  HAVE_PYTHON3_TRUE='#'
10378  HAVE_PYTHON3_FALSE=
10379fi
10380
10381
10382{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
10383printf %s "checking for a sed that does not truncate output... " >&6; }
10384if test ${ac_cv_path_SED+y}
10385then :
10386  printf %s "(cached) " >&6
10387else $as_nop
10388            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
10389     for ac_i in 1 2 3 4 5 6 7; do
10390       ac_script="$ac_script$as_nl$ac_script"
10391     done
10392     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
10393     { ac_script=; unset ac_script;}
10394     if test -z "$SED"; then
10395  ac_path_SED_found=false
10396  # Loop through the user's path and test for each of PROGNAME-LIST
10397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10398for as_dir in $PATH
10399do
10400  IFS=$as_save_IFS
10401  case $as_dir in #(((
10402    '') as_dir=./ ;;
10403    */) ;;
10404    *) as_dir=$as_dir/ ;;
10405  esac
10406    for ac_prog in sed gsed
10407   do
10408    for ac_exec_ext in '' $ac_executable_extensions; do
10409      ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
10410      as_fn_executable_p "$ac_path_SED" || continue
10411# Check for GNU ac_path_SED and select it if it is found.
10412  # Check for GNU $ac_path_SED
10413case `"$ac_path_SED" --version 2>&1` in
10414*GNU*)
10415  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
10416*)
10417  ac_count=0
10418  printf %s 0123456789 >"conftest.in"
10419  while :
10420  do
10421    cat "conftest.in" "conftest.in" >"conftest.tmp"
10422    mv "conftest.tmp" "conftest.in"
10423    cp "conftest.in" "conftest.nl"
10424    printf "%s\n" '' >> "conftest.nl"
10425    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
10426    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10427    as_fn_arith $ac_count + 1 && ac_count=$as_val
10428    if test $ac_count -gt ${ac_path_SED_max-0}; then
10429      # Best one so far, save it but keep looking for a better one
10430      ac_cv_path_SED="$ac_path_SED"
10431      ac_path_SED_max=$ac_count
10432    fi
10433    # 10*(2^10) chars as input seems more than enough
10434    test $ac_count -gt 10 && break
10435  done
10436  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10437esac
10438
10439      $ac_path_SED_found && break 3
10440    done
10441  done
10442  done
10443IFS=$as_save_IFS
10444  if test -z "$ac_cv_path_SED"; then
10445    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
10446  fi
10447else
10448  ac_cv_path_SED=$SED
10449fi
10450
10451fi
10452{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
10453printf "%s\n" "$ac_cv_path_SED" >&6; }
10454 SED="$ac_cv_path_SED"
10455  rm -f conftest.sed
10456
10457
10458  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
10459printf %s "checking whether NLS is requested... " >&6; }
10460    # Check whether --enable-nls was given.
10461if test ${enable_nls+y}
10462then :
10463  enableval=$enable_nls; USE_NLS=$enableval
10464else $as_nop
10465  USE_NLS=yes
10466fi
10467
10468  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
10469printf "%s\n" "$USE_NLS" >&6; }
10470
10471
10472
10473
10474      GETTEXT_MACRO_VERSION=0.19
10475
10476
10477
10478        # Extract the first word of "msgfmt", so it can be a program name with args.
10479set dummy msgfmt; ac_word=$2
10480{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10481printf %s "checking for $ac_word... " >&6; }
10482if test ${ac_cv_path_MSGFMT+y}
10483then :
10484  printf %s "(cached) " >&6
10485else $as_nop
10486  case "$MSGFMT" in
10487  /*)
10488  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
10489  ;;
10490  *)
10491  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
10492  for ac_dir in $PATH; do
10493    test -z "$ac_dir" && ac_dir=.
10494    if test -f $ac_dir/$ac_word; then
10495      if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
10496     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
10497	ac_cv_path_MSGFMT="$ac_dir/$ac_word"
10498	break
10499      fi
10500    fi
10501  done
10502  IFS="$ac_save_ifs"
10503  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
10504  ;;
10505esac
10506fi
10507MSGFMT="$ac_cv_path_MSGFMT"
10508if test -n "$MSGFMT"; then
10509  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
10510printf "%s\n" "$MSGFMT" >&6; }
10511else
10512  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10513printf "%s\n" "no" >&6; }
10514fi
10515
10516  # Extract the first word of "gmsgfmt", so it can be a program name with args.
10517set dummy gmsgfmt; ac_word=$2
10518{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10519printf %s "checking for $ac_word... " >&6; }
10520if test ${ac_cv_path_GMSGFMT+y}
10521then :
10522  printf %s "(cached) " >&6
10523else $as_nop
10524  case $GMSGFMT in
10525  [\\/]* | ?:[\\/]*)
10526  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
10527  ;;
10528  *)
10529  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10530for as_dir in $PATH
10531do
10532  IFS=$as_save_IFS
10533  case $as_dir in #(((
10534    '') as_dir=./ ;;
10535    */) ;;
10536    *) as_dir=$as_dir/ ;;
10537  esac
10538    for ac_exec_ext in '' $ac_executable_extensions; do
10539  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10540    ac_cv_path_GMSGFMT="$as_dir$ac_word$ac_exec_ext"
10541    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10542    break 2
10543  fi
10544done
10545  done
10546IFS=$as_save_IFS
10547
10548  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
10549  ;;
10550esac
10551fi
10552GMSGFMT=$ac_cv_path_GMSGFMT
10553if test -n "$GMSGFMT"; then
10554  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
10555printf "%s\n" "$GMSGFMT" >&6; }
10556else
10557  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10558printf "%s\n" "no" >&6; }
10559fi
10560
10561
10562
10563    case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
10564    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
10565    *) MSGFMT_015=$MSGFMT ;;
10566  esac
10567
10568  case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
10569    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
10570    *) GMSGFMT_015=$GMSGFMT ;;
10571  esac
10572
10573
10574        # Extract the first word of "xgettext", so it can be a program name with args.
10575set dummy xgettext; ac_word=$2
10576{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10577printf %s "checking for $ac_word... " >&6; }
10578if test ${ac_cv_path_XGETTEXT+y}
10579then :
10580  printf %s "(cached) " >&6
10581else $as_nop
10582  case "$XGETTEXT" in
10583  /*)
10584  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
10585  ;;
10586  *)
10587  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
10588  for ac_dir in $PATH; do
10589    test -z "$ac_dir" && ac_dir=.
10590    if test -f $ac_dir/$ac_word; then
10591      if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
10592     (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
10593	ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
10594	break
10595      fi
10596    fi
10597  done
10598  IFS="$ac_save_ifs"
10599  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
10600  ;;
10601esac
10602fi
10603XGETTEXT="$ac_cv_path_XGETTEXT"
10604if test -n "$XGETTEXT"; then
10605  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
10606printf "%s\n" "$XGETTEXT" >&6; }
10607else
10608  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10609printf "%s\n" "no" >&6; }
10610fi
10611
10612    rm -f messages.po
10613
10614    case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
10615    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
10616    *) XGETTEXT_015=$XGETTEXT ;;
10617  esac
10618
10619
10620    # Extract the first word of "msgmerge", so it can be a program name with args.
10621set dummy msgmerge; ac_word=$2
10622{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10623printf %s "checking for $ac_word... " >&6; }
10624if test ${ac_cv_path_MSGMERGE+y}
10625then :
10626  printf %s "(cached) " >&6
10627else $as_nop
10628  case "$MSGMERGE" in
10629  /*)
10630  ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
10631  ;;
10632  *)
10633  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
10634  for ac_dir in $PATH; do
10635    test -z "$ac_dir" && ac_dir=.
10636    if test -f $ac_dir/$ac_word; then
10637      if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
10638	ac_cv_path_MSGMERGE="$ac_dir/$ac_word"
10639	break
10640      fi
10641    fi
10642  done
10643  IFS="$ac_save_ifs"
10644  test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
10645  ;;
10646esac
10647fi
10648MSGMERGE="$ac_cv_path_MSGMERGE"
10649if test -n "$MSGMERGE"; then
10650  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
10651printf "%s\n" "$MSGMERGE" >&6; }
10652else
10653  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10654printf "%s\n" "no" >&6; }
10655fi
10656
10657
10658        test -n "$localedir" || localedir='${datadir}/locale'
10659
10660
10661    test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
10662
10663
10664  ac_config_commands="$ac_config_commands po-directories"
10665
10666
10667
10668      if test "X$prefix" = "XNONE"; then
10669    acl_final_prefix="$ac_default_prefix"
10670  else
10671    acl_final_prefix="$prefix"
10672  fi
10673  if test "X$exec_prefix" = "XNONE"; then
10674    acl_final_exec_prefix='${prefix}'
10675  else
10676    acl_final_exec_prefix="$exec_prefix"
10677  fi
10678  acl_save_prefix="$prefix"
10679  prefix="$acl_final_prefix"
10680  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
10681  prefix="$acl_save_prefix"
10682
10683
10684
10685# Check whether --with-gnu-ld was given.
10686if test ${with_gnu_ld+y}
10687then :
10688  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
10689else $as_nop
10690  with_gnu_ld=no
10691fi
10692
10693# Prepare PATH_SEPARATOR.
10694# The user is always right.
10695if test "${PATH_SEPARATOR+set}" != set; then
10696  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
10697  # contains only /bin. Note that ksh looks also at the FPATH variable,
10698  # so we have to set that as well for the test.
10699  PATH_SEPARATOR=:
10700  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
10701    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
10702           || PATH_SEPARATOR=';'
10703       }
10704fi
10705
10706if test -n "$LD"; then
10707  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld" >&5
10708printf %s "checking for ld... " >&6; }
10709elif test "$GCC" = yes; then
10710  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
10711printf %s "checking for ld used by $CC... " >&6; }
10712elif test "$with_gnu_ld" = yes; then
10713  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
10714printf %s "checking for GNU ld... " >&6; }
10715else
10716  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
10717printf %s "checking for non-GNU ld... " >&6; }
10718fi
10719if test -n "$LD"; then
10720  # Let the user override the test with a path.
10721  :
10722else
10723  if test ${acl_cv_path_LD+y}
10724then :
10725  printf %s "(cached) " >&6
10726else $as_nop
10727
10728    acl_cv_path_LD= # Final result of this test
10729    ac_prog=ld # Program to search in $PATH
10730    if test "$GCC" = yes; then
10731      # Check if gcc -print-prog-name=ld gives a path.
10732      case $host in
10733        *-*-mingw*)
10734          # gcc leaves a trailing carriage return which upsets mingw
10735          acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
10736        *)
10737          acl_output=`($CC -print-prog-name=ld) 2>&5` ;;
10738      esac
10739      case $acl_output in
10740        # Accept absolute paths.
10741        [\\/]* | ?:[\\/]*)
10742          re_direlt='/[^/][^/]*/\.\./'
10743          # Canonicalize the pathname of ld
10744          acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'`
10745          while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do
10746            acl_output=`echo $acl_output | sed "s%$re_direlt%/%"`
10747          done
10748          # Got the pathname. No search in PATH is needed.
10749          acl_cv_path_LD="$acl_output"
10750          ac_prog=
10751          ;;
10752        "")
10753          # If it fails, then pretend we aren't using GCC.
10754          ;;
10755        *)
10756          # If it is relative, then search for the first ld in PATH.
10757          with_gnu_ld=unknown
10758          ;;
10759      esac
10760    fi
10761    if test -n "$ac_prog"; then
10762      # Search for $ac_prog in $PATH.
10763      acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
10764      for ac_dir in $PATH; do
10765        IFS="$acl_save_ifs"
10766        test -z "$ac_dir" && ac_dir=.
10767        if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
10768          acl_cv_path_LD="$ac_dir/$ac_prog"
10769          # Check to see if the program is GNU ld.  I'd rather use --version,
10770          # but apparently some variants of GNU ld only accept -v.
10771          # Break only if it was the GNU/non-GNU ld that we prefer.
10772          case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
10773            *GNU* | *'with BFD'*)
10774              test "$with_gnu_ld" != no && break
10775              ;;
10776            *)
10777              test "$with_gnu_ld" != yes && break
10778              ;;
10779          esac
10780        fi
10781      done
10782      IFS="$acl_save_ifs"
10783    fi
10784    case $host in
10785      *-*-aix*)
10786        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10787/* end confdefs.h.  */
10788#if defined __powerpc64__ || defined __LP64__
10789                int ok;
10790               #else
10791                error fail
10792               #endif
10793
10794_ACEOF
10795if ac_fn_c_try_compile "$LINENO"
10796then :
10797  # The compiler produces 64-bit code. Add option '-b64' so that the
10798           # linker groks 64-bit object files.
10799           case "$acl_cv_path_LD " in
10800             *" -b64 "*) ;;
10801             *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;;
10802           esac
10803
10804fi
10805rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10806        ;;
10807      sparc64-*-netbsd*)
10808        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10809/* end confdefs.h.  */
10810#if defined __sparcv9 || defined __arch64__
10811                int ok;
10812               #else
10813                error fail
10814               #endif
10815
10816_ACEOF
10817if ac_fn_c_try_compile "$LINENO"
10818then :
10819
10820else $as_nop
10821  # The compiler produces 32-bit code. Add option '-m elf32_sparc'
10822           # so that the linker groks 32-bit object files.
10823           case "$acl_cv_path_LD " in
10824             *" -m elf32_sparc "*) ;;
10825             *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;;
10826           esac
10827
10828fi
10829rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10830        ;;
10831    esac
10832
10833fi
10834
10835  LD="$acl_cv_path_LD"
10836fi
10837if test -n "$LD"; then
10838  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
10839printf "%s\n" "$LD" >&6; }
10840else
10841  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10842printf "%s\n" "no" >&6; }
10843  as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
10844fi
10845{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
10846printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
10847if test ${acl_cv_prog_gnu_ld+y}
10848then :
10849  printf %s "(cached) " >&6
10850else $as_nop
10851  # I'd rather use --version here, but apparently some GNU lds only accept -v.
10852case `$LD -v 2>&1 </dev/null` in
10853*GNU* | *'with BFD'*)
10854  acl_cv_prog_gnu_ld=yes
10855  ;;
10856*)
10857  acl_cv_prog_gnu_ld=no
10858  ;;
10859esac
10860fi
10861{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
10862printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; }
10863with_gnu_ld=$acl_cv_prog_gnu_ld
10864
10865
10866
10867
10868
10869                                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
10870printf %s "checking for shared library run path origin... " >&6; }
10871if test ${acl_cv_rpath+y}
10872then :
10873  printf %s "(cached) " >&6
10874else $as_nop
10875
10876    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
10877    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
10878    . ./conftest.sh
10879    rm -f ./conftest.sh
10880    acl_cv_rpath=done
10881
10882fi
10883{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
10884printf "%s\n" "$acl_cv_rpath" >&6; }
10885  wl="$acl_cv_wl"
10886  acl_libext="$acl_cv_libext"
10887  acl_shlibext="$acl_cv_shlibext"
10888  acl_libname_spec="$acl_cv_libname_spec"
10889  acl_library_names_spec="$acl_cv_library_names_spec"
10890  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
10891  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
10892  acl_hardcode_direct="$acl_cv_hardcode_direct"
10893  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
10894    # Check whether --enable-rpath was given.
10895if test ${enable_rpath+y}
10896then :
10897  enableval=$enable_rpath; :
10898else $as_nop
10899  enable_rpath=yes
10900fi
10901
10902
10903
10904
10905  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5
10906printf %s "checking 32-bit host C ABI... " >&6; }
10907if test ${gl_cv_host_cpu_c_abi_32bit+y}
10908then :
10909  printf %s "(cached) " >&6
10910else $as_nop
10911  if test -n "$gl_cv_host_cpu_c_abi"; then
10912       case "$gl_cv_host_cpu_c_abi" in
10913         i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
10914           gl_cv_host_cpu_c_abi_32bit=yes ;;
10915         x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 )
10916           gl_cv_host_cpu_c_abi_32bit=no ;;
10917         *)
10918           gl_cv_host_cpu_c_abi_32bit=unknown ;;
10919       esac
10920     else
10921       case "$host_cpu" in
10922
10923         # CPUs that only support a 32-bit ABI.
10924         arc \
10925         | bfin \
10926         | cris* \
10927         | csky \
10928         | epiphany \
10929         | ft32 \
10930         | h8300 \
10931         | m68k \
10932         | microblaze | microblazeel \
10933         | nds32 | nds32le | nds32be \
10934         | nios2 | nios2eb | nios2el \
10935         | or1k* \
10936         | or32 \
10937         | sh | sh1234 | sh1234elb \
10938         | tic6x \
10939         | xtensa* )
10940           gl_cv_host_cpu_c_abi_32bit=yes
10941           ;;
10942
10943         # CPUs that only support a 64-bit ABI.
10944         alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \
10945         | mmix )
10946           gl_cv_host_cpu_c_abi_32bit=no
10947           ;;
10948
10949         i[34567]86 )
10950           gl_cv_host_cpu_c_abi_32bit=yes
10951           ;;
10952
10953         x86_64 )
10954           # On x86_64 systems, the C compiler may be generating code in one of
10955           # these ABIs:
10956           # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
10957           # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
10958           #   with native Windows (mingw, MSVC).
10959           # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
10960           # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
10961           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10962/* end confdefs.h.  */
10963#if (defined __x86_64__ || defined __amd64__ \
10964                       || defined _M_X64 || defined _M_AMD64) \
10965                      && !(defined __ILP32__ || defined _ILP32)
10966                   int ok;
10967                  #else
10968                   error fail
10969                  #endif
10970
10971_ACEOF
10972if ac_fn_c_try_compile "$LINENO"
10973then :
10974  gl_cv_host_cpu_c_abi_32bit=no
10975else $as_nop
10976  gl_cv_host_cpu_c_abi_32bit=yes
10977fi
10978rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10979           ;;
10980
10981         arm* | aarch64 )
10982           # Assume arm with EABI.
10983           # On arm64 systems, the C compiler may be generating code in one of
10984           # these ABIs:
10985           # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
10986           # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
10987           # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
10988           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10989/* end confdefs.h.  */
10990#if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32)
10991                   int ok;
10992                  #else
10993                   error fail
10994                  #endif
10995
10996_ACEOF
10997if ac_fn_c_try_compile "$LINENO"
10998then :
10999  gl_cv_host_cpu_c_abi_32bit=no
11000else $as_nop
11001  gl_cv_host_cpu_c_abi_32bit=yes
11002fi
11003rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11004           ;;
11005
11006         hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
11007           # On hppa, the C compiler may be generating 32-bit code or 64-bit
11008           # code. In the latter case, it defines _LP64 and __LP64__.
11009           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11010/* end confdefs.h.  */
11011#ifdef __LP64__
11012                   int ok;
11013                  #else
11014                   error fail
11015                  #endif
11016
11017_ACEOF
11018if ac_fn_c_try_compile "$LINENO"
11019then :
11020  gl_cv_host_cpu_c_abi_32bit=no
11021else $as_nop
11022  gl_cv_host_cpu_c_abi_32bit=yes
11023fi
11024rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11025           ;;
11026
11027         ia64* )
11028           # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
11029           # 32-bit code. In the latter case, it defines _ILP32.
11030           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11031/* end confdefs.h.  */
11032#ifdef _ILP32
11033                   int ok;
11034                  #else
11035                   error fail
11036                  #endif
11037
11038_ACEOF
11039if ac_fn_c_try_compile "$LINENO"
11040then :
11041  gl_cv_host_cpu_c_abi_32bit=yes
11042else $as_nop
11043  gl_cv_host_cpu_c_abi_32bit=no
11044fi
11045rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11046           ;;
11047
11048         mips* )
11049           # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
11050           # at 32.
11051           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11052/* end confdefs.h.  */
11053#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
11054                   int ok;
11055                  #else
11056                   error fail
11057                  #endif
11058
11059_ACEOF
11060if ac_fn_c_try_compile "$LINENO"
11061then :
11062  gl_cv_host_cpu_c_abi_32bit=no
11063else $as_nop
11064  gl_cv_host_cpu_c_abi_32bit=yes
11065fi
11066rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11067           ;;
11068
11069         powerpc* )
11070           # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
11071           # No need to distinguish them here; the caller may distinguish
11072           # them based on the OS.
11073           # On powerpc64 systems, the C compiler may still be generating
11074           # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
11075           # be generating 64-bit code.
11076           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11077/* end confdefs.h.  */
11078#if defined __powerpc64__ || defined __LP64__
11079                   int ok;
11080                  #else
11081                   error fail
11082                  #endif
11083
11084_ACEOF
11085if ac_fn_c_try_compile "$LINENO"
11086then :
11087  gl_cv_host_cpu_c_abi_32bit=no
11088else $as_nop
11089  gl_cv_host_cpu_c_abi_32bit=yes
11090fi
11091rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11092           ;;
11093
11094         rs6000 )
11095           gl_cv_host_cpu_c_abi_32bit=yes
11096           ;;
11097
11098         riscv32 | riscv64 )
11099           # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
11100           # Size of 'long' and 'void *':
11101           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11102/* end confdefs.h.  */
11103#if defined __LP64__
11104                    int ok;
11105                  #else
11106                    error fail
11107                  #endif
11108
11109_ACEOF
11110if ac_fn_c_try_compile "$LINENO"
11111then :
11112  gl_cv_host_cpu_c_abi_32bit=no
11113else $as_nop
11114  gl_cv_host_cpu_c_abi_32bit=yes
11115fi
11116rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11117           ;;
11118
11119         s390* )
11120           # On s390x, the C compiler may be generating 64-bit (= s390x) code
11121           # or 31-bit (= s390) code.
11122           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11123/* end confdefs.h.  */
11124#if defined __LP64__ || defined __s390x__
11125                    int ok;
11126                  #else
11127                    error fail
11128                  #endif
11129
11130_ACEOF
11131if ac_fn_c_try_compile "$LINENO"
11132then :
11133  gl_cv_host_cpu_c_abi_32bit=no
11134else $as_nop
11135  gl_cv_host_cpu_c_abi_32bit=yes
11136fi
11137rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11138           ;;
11139
11140         sparc | sparc64 )
11141           # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
11142           # C compiler still generates 32-bit code.
11143           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11144/* end confdefs.h.  */
11145#if defined __sparcv9 || defined __arch64__
11146                   int ok;
11147                  #else
11148                   error fail
11149                  #endif
11150
11151_ACEOF
11152if ac_fn_c_try_compile "$LINENO"
11153then :
11154  gl_cv_host_cpu_c_abi_32bit=no
11155else $as_nop
11156  gl_cv_host_cpu_c_abi_32bit=yes
11157fi
11158rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11159           ;;
11160
11161         *)
11162           gl_cv_host_cpu_c_abi_32bit=unknown
11163           ;;
11164       esac
11165     fi
11166
11167fi
11168{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5
11169printf "%s\n" "$gl_cv_host_cpu_c_abi_32bit" >&6; }
11170
11171  HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit"
11172
11173
11174
11175
11176
11177  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ELF binary format" >&5
11178printf %s "checking for ELF binary format... " >&6; }
11179if test ${gl_cv_elf+y}
11180then :
11181  printf %s "(cached) " >&6
11182else $as_nop
11183  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11184/* end confdefs.h.  */
11185#ifdef __ELF__
11186        Extensible Linking Format
11187        #endif
11188
11189_ACEOF
11190if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11191  $EGREP "Extensible Linking Format" >/dev/null 2>&1
11192then :
11193  gl_cv_elf=yes
11194else $as_nop
11195  gl_cv_elf=no
11196fi
11197rm -rf conftest*
11198
11199
11200fi
11201{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_elf" >&5
11202printf "%s\n" "$gl_cv_elf" >&6; }
11203  if test $gl_cv_elf = yes; then
11204    # Extract the ELF class of a file (5th byte) in decimal.
11205    # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header
11206    if od -A x < /dev/null >/dev/null 2>/dev/null; then
11207      # Use POSIX od.
11208      func_elfclass ()
11209      {
11210        od -A n -t d1 -j 4 -N 1
11211      }
11212    else
11213      # Use BSD hexdump.
11214      func_elfclass ()
11215      {
11216        dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "'
11217        echo
11218      }
11219    fi
11220    # Use 'expr', not 'test', to compare the values of func_elfclass, because on
11221    # Solaris 11 OpenIndiana and Solaris 11 OmniOS, the result is 001 or 002,
11222    # not 1 or 2.
11223    case $HOST_CPU_C_ABI_32BIT in
11224      yes)
11225        # 32-bit ABI.
11226        acl_is_expected_elfclass ()
11227        {
11228          expr "`func_elfclass | sed -e 's/[ 	]//g'`" = 1 > /dev/null
11229        }
11230        ;;
11231      no)
11232        # 64-bit ABI.
11233        acl_is_expected_elfclass ()
11234        {
11235          expr "`func_elfclass | sed -e 's/[ 	]//g'`" = 2 > /dev/null
11236        }
11237        ;;
11238      *)
11239        # Unknown.
11240        acl_is_expected_elfclass ()
11241        {
11242          :
11243        }
11244        ;;
11245    esac
11246  else
11247    acl_is_expected_elfclass ()
11248    {
11249      :
11250    }
11251  fi
11252
11253    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5
11254printf %s "checking for the common suffixes of directories in the library search path... " >&6; }
11255if test ${acl_cv_libdirstems+y}
11256then :
11257  printf %s "(cached) " >&6
11258else $as_nop
11259            acl_libdirstem=lib
11260     acl_libdirstem2=
11261     acl_libdirstem3=
11262     case "$host_os" in
11263       solaris*)
11264                                                      if test $HOST_CPU_C_ABI_32BIT = no; then
11265           acl_libdirstem2=lib/64
11266           case "$host_cpu" in
11267             sparc*)        acl_libdirstem3=lib/sparcv9 ;;
11268             i*86 | x86_64) acl_libdirstem3=lib/amd64 ;;
11269           esac
11270         fi
11271         ;;
11272       *)
11273                                                                                 searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \
11274                     | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
11275         if test $HOST_CPU_C_ABI_32BIT != no; then
11276           # 32-bit or unknown ABI.
11277           if test -d /usr/lib32; then
11278             acl_libdirstem2=lib32
11279           fi
11280         fi
11281         if test $HOST_CPU_C_ABI_32BIT != yes; then
11282           # 64-bit or unknown ABI.
11283           if test -d /usr/lib64; then
11284             acl_libdirstem3=lib64
11285           fi
11286         fi
11287         if test -n "$searchpath"; then
11288           acl_save_IFS="${IFS= 	}"; IFS=":"
11289           for searchdir in $searchpath; do
11290             if test -d "$searchdir"; then
11291               case "$searchdir" in
11292                 */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;;
11293                 */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;;
11294                 */../ | */.. )
11295                   # Better ignore directories of this form. They are misleading.
11296                   ;;
11297                 *) searchdir=`cd "$searchdir" && pwd`
11298                    case "$searchdir" in
11299                      */lib32 ) acl_libdirstem2=lib32 ;;
11300                      */lib64 ) acl_libdirstem3=lib64 ;;
11301                    esac ;;
11302               esac
11303             fi
11304           done
11305           IFS="$acl_save_IFS"
11306           if test $HOST_CPU_C_ABI_32BIT = yes; then
11307             # 32-bit ABI.
11308             acl_libdirstem3=
11309           fi
11310           if test $HOST_CPU_C_ABI_32BIT = no; then
11311             # 64-bit ABI.
11312             acl_libdirstem2=
11313           fi
11314         fi
11315         ;;
11316     esac
11317     test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
11318     test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem"
11319     acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3"
11320
11321fi
11322{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5
11323printf "%s\n" "$acl_cv_libdirstems" >&6; }
11324      acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
11325  acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'`
11326  acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'`
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338    use_additional=yes
11339
11340  acl_save_prefix="$prefix"
11341  prefix="$acl_final_prefix"
11342  acl_save_exec_prefix="$exec_prefix"
11343  exec_prefix="$acl_final_exec_prefix"
11344
11345    eval additional_includedir=\"$includedir\"
11346    eval additional_libdir=\"$libdir\"
11347    eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
11348    eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
11349
11350  exec_prefix="$acl_save_exec_prefix"
11351  prefix="$acl_save_prefix"
11352
11353
11354# Check whether --with-libiconv-prefix was given.
11355if test ${with_libiconv_prefix+y}
11356then :
11357  withval=$with_libiconv_prefix;
11358    if test "X$withval" = "Xno"; then
11359      use_additional=no
11360    else
11361      if test "X$withval" = "X"; then
11362
11363  acl_save_prefix="$prefix"
11364  prefix="$acl_final_prefix"
11365  acl_save_exec_prefix="$exec_prefix"
11366  exec_prefix="$acl_final_exec_prefix"
11367
11368          eval additional_includedir=\"$includedir\"
11369          eval additional_libdir=\"$libdir\"
11370          eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
11371          eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
11372
11373  exec_prefix="$acl_save_exec_prefix"
11374  prefix="$acl_save_prefix"
11375
11376      else
11377        additional_includedir="$withval/include"
11378        additional_libdir="$withval/$acl_libdirstem"
11379        additional_libdir2="$withval/$acl_libdirstem2"
11380        additional_libdir3="$withval/$acl_libdirstem3"
11381      fi
11382    fi
11383
11384fi
11385
11386  if test "X$additional_libdir2" = "X$additional_libdir"; then
11387    additional_libdir2=
11388  fi
11389  if test "X$additional_libdir3" = "X$additional_libdir"; then
11390    additional_libdir3=
11391  fi
11392      LIBICONV=
11393  LTLIBICONV=
11394  INCICONV=
11395  LIBICONV_PREFIX=
11396      HAVE_LIBICONV=
11397  rpathdirs=
11398  ltrpathdirs=
11399  names_already_handled=
11400  names_next_round='iconv '
11401  while test -n "$names_next_round"; do
11402    names_this_round="$names_next_round"
11403    names_next_round=
11404    for name in $names_this_round; do
11405      already_handled=
11406      for n in $names_already_handled; do
11407        if test "$n" = "$name"; then
11408          already_handled=yes
11409          break
11410        fi
11411      done
11412      if test -z "$already_handled"; then
11413        names_already_handled="$names_already_handled $name"
11414                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
11415        eval value=\"\$HAVE_LIB$uppername\"
11416        if test -n "$value"; then
11417          if test "$value" = yes; then
11418            eval value=\"\$LIB$uppername\"
11419            test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
11420            eval value=\"\$LTLIB$uppername\"
11421            test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
11422          else
11423                                    :
11424          fi
11425        else
11426                              found_dir=
11427          found_la=
11428          found_so=
11429          found_a=
11430          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
11431          if test -n "$acl_shlibext"; then
11432            shrext=".$acl_shlibext"             # typically: shrext=.so
11433          else
11434            shrext=
11435          fi
11436          if test $use_additional = yes; then
11437            for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
11438              if test "X$found_dir" = "X"; then
11439                eval dir=\$$additional_libdir_variable
11440                if test -n "$dir"; then
11441                                                      if test -n "$acl_shlibext"; then
11442                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
11443                      found_dir="$dir"
11444                      found_so="$dir/$libname$shrext"
11445                    else
11446                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
11447                        ver=`(cd "$dir" && \
11448                              for f in "$libname$shrext".*; do echo "$f"; done \
11449                              | sed -e "s,^$libname$shrext\\\\.,," \
11450                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
11451                              | sed 1q ) 2>/dev/null`
11452                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
11453                          found_dir="$dir"
11454                          found_so="$dir/$libname$shrext.$ver"
11455                        fi
11456                      else
11457                        eval library_names=\"$acl_library_names_spec\"
11458                        for f in $library_names; do
11459                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
11460                            found_dir="$dir"
11461                            found_so="$dir/$f"
11462                            break
11463                          fi
11464                        done
11465                      fi
11466                    fi
11467                  fi
11468                                    if test "X$found_dir" = "X"; then
11469                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
11470                      found_dir="$dir"
11471                      found_a="$dir/$libname.$acl_libext"
11472                    fi
11473                  fi
11474                  if test "X$found_dir" != "X"; then
11475                    if test -f "$dir/$libname.la"; then
11476                      found_la="$dir/$libname.la"
11477                    fi
11478                  fi
11479                fi
11480              fi
11481            done
11482          fi
11483          if test "X$found_dir" = "X"; then
11484            for x in $LDFLAGS $LTLIBICONV; do
11485
11486  acl_save_prefix="$prefix"
11487  prefix="$acl_final_prefix"
11488  acl_save_exec_prefix="$exec_prefix"
11489  exec_prefix="$acl_final_exec_prefix"
11490  eval x=\"$x\"
11491  exec_prefix="$acl_save_exec_prefix"
11492  prefix="$acl_save_prefix"
11493
11494              case "$x" in
11495                -L*)
11496                  dir=`echo "X$x" | sed -e 's/^X-L//'`
11497                                    if test -n "$acl_shlibext"; then
11498                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
11499                      found_dir="$dir"
11500                      found_so="$dir/$libname$shrext"
11501                    else
11502                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
11503                        ver=`(cd "$dir" && \
11504                              for f in "$libname$shrext".*; do echo "$f"; done \
11505                              | sed -e "s,^$libname$shrext\\\\.,," \
11506                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
11507                              | sed 1q ) 2>/dev/null`
11508                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
11509                          found_dir="$dir"
11510                          found_so="$dir/$libname$shrext.$ver"
11511                        fi
11512                      else
11513                        eval library_names=\"$acl_library_names_spec\"
11514                        for f in $library_names; do
11515                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
11516                            found_dir="$dir"
11517                            found_so="$dir/$f"
11518                            break
11519                          fi
11520                        done
11521                      fi
11522                    fi
11523                  fi
11524                                    if test "X$found_dir" = "X"; then
11525                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
11526                      found_dir="$dir"
11527                      found_a="$dir/$libname.$acl_libext"
11528                    fi
11529                  fi
11530                  if test "X$found_dir" != "X"; then
11531                    if test -f "$dir/$libname.la"; then
11532                      found_la="$dir/$libname.la"
11533                    fi
11534                  fi
11535                  ;;
11536              esac
11537              if test "X$found_dir" != "X"; then
11538                break
11539              fi
11540            done
11541          fi
11542          if test "X$found_dir" != "X"; then
11543                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
11544            if test "X$found_so" != "X"; then
11545                                                        if test "$enable_rpath" = no \
11546                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
11547                 || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
11548                 || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
11549                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11550              else
11551                                                                                haveit=
11552                for x in $ltrpathdirs; do
11553                  if test "X$x" = "X$found_dir"; then
11554                    haveit=yes
11555                    break
11556                  fi
11557                done
11558                if test -z "$haveit"; then
11559                  ltrpathdirs="$ltrpathdirs $found_dir"
11560                fi
11561                                if test "$acl_hardcode_direct" = yes; then
11562                                                      LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11563                else
11564                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
11565                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11566                                                            haveit=
11567                    for x in $rpathdirs; do
11568                      if test "X$x" = "X$found_dir"; then
11569                        haveit=yes
11570                        break
11571                      fi
11572                    done
11573                    if test -z "$haveit"; then
11574                      rpathdirs="$rpathdirs $found_dir"
11575                    fi
11576                  else
11577                                                                                haveit=
11578                    for x in $LDFLAGS $LIBICONV; do
11579
11580  acl_save_prefix="$prefix"
11581  prefix="$acl_final_prefix"
11582  acl_save_exec_prefix="$exec_prefix"
11583  exec_prefix="$acl_final_exec_prefix"
11584  eval x=\"$x\"
11585  exec_prefix="$acl_save_exec_prefix"
11586  prefix="$acl_save_prefix"
11587
11588                      if test "X$x" = "X-L$found_dir"; then
11589                        haveit=yes
11590                        break
11591                      fi
11592                    done
11593                    if test -z "$haveit"; then
11594                      LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
11595                    fi
11596                    if test "$acl_hardcode_minus_L" != no; then
11597                                                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11598                    else
11599                                                                                                                                                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
11600                    fi
11601                  fi
11602                fi
11603              fi
11604            else
11605              if test "X$found_a" != "X"; then
11606                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
11607              else
11608                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
11609              fi
11610            fi
11611                        additional_includedir=
11612            case "$found_dir" in
11613              */$acl_libdirstem | */$acl_libdirstem/)
11614                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
11615                if test "$name" = 'iconv'; then
11616                  LIBICONV_PREFIX="$basedir"
11617                fi
11618                additional_includedir="$basedir/include"
11619                ;;
11620              */$acl_libdirstem2 | */$acl_libdirstem2/)
11621                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
11622                if test "$name" = 'iconv'; then
11623                  LIBICONV_PREFIX="$basedir"
11624                fi
11625                additional_includedir="$basedir/include"
11626                ;;
11627              */$acl_libdirstem3 | */$acl_libdirstem3/)
11628                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
11629                if test "$name" = 'iconv'; then
11630                  LIBICONV_PREFIX="$basedir"
11631                fi
11632                additional_includedir="$basedir/include"
11633                ;;
11634            esac
11635            if test "X$additional_includedir" != "X"; then
11636                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
11637                haveit=
11638                if test "X$additional_includedir" = "X/usr/local/include"; then
11639                  if test -n "$GCC"; then
11640                    case $host_os in
11641                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
11642                    esac
11643                  fi
11644                fi
11645                if test -z "$haveit"; then
11646                  for x in $CPPFLAGS $INCICONV; do
11647
11648  acl_save_prefix="$prefix"
11649  prefix="$acl_final_prefix"
11650  acl_save_exec_prefix="$exec_prefix"
11651  exec_prefix="$acl_final_exec_prefix"
11652  eval x=\"$x\"
11653  exec_prefix="$acl_save_exec_prefix"
11654  prefix="$acl_save_prefix"
11655
11656                    if test "X$x" = "X-I$additional_includedir"; then
11657                      haveit=yes
11658                      break
11659                    fi
11660                  done
11661                  if test -z "$haveit"; then
11662                    if test -d "$additional_includedir"; then
11663                                            INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
11664                    fi
11665                  fi
11666                fi
11667              fi
11668            fi
11669                        if test -n "$found_la"; then
11670                                                        save_libdir="$libdir"
11671              case "$found_la" in
11672                */* | *\\*) . "$found_la" ;;
11673                *) . "./$found_la" ;;
11674              esac
11675              libdir="$save_libdir"
11676                            for dep in $dependency_libs; do
11677                case "$dep" in
11678                  -L*)
11679                    dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11680                                                                                                                                                                if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
11681                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
11682                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
11683                      haveit=
11684                      if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
11685                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
11686                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
11687                        if test -n "$GCC"; then
11688                          case $host_os in
11689                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
11690                          esac
11691                        fi
11692                      fi
11693                      if test -z "$haveit"; then
11694                        haveit=
11695                        for x in $LDFLAGS $LIBICONV; do
11696
11697  acl_save_prefix="$prefix"
11698  prefix="$acl_final_prefix"
11699  acl_save_exec_prefix="$exec_prefix"
11700  exec_prefix="$acl_final_exec_prefix"
11701  eval x=\"$x\"
11702  exec_prefix="$acl_save_exec_prefix"
11703  prefix="$acl_save_prefix"
11704
11705                          if test "X$x" = "X-L$dependency_libdir"; then
11706                            haveit=yes
11707                            break
11708                          fi
11709                        done
11710                        if test -z "$haveit"; then
11711                          if test -d "$dependency_libdir"; then
11712                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }-L$dependency_libdir"
11713                          fi
11714                        fi
11715                        haveit=
11716                        for x in $LDFLAGS $LTLIBICONV; do
11717
11718  acl_save_prefix="$prefix"
11719  prefix="$acl_final_prefix"
11720  acl_save_exec_prefix="$exec_prefix"
11721  exec_prefix="$acl_final_exec_prefix"
11722  eval x=\"$x\"
11723  exec_prefix="$acl_save_exec_prefix"
11724  prefix="$acl_save_prefix"
11725
11726                          if test "X$x" = "X-L$dependency_libdir"; then
11727                            haveit=yes
11728                            break
11729                          fi
11730                        done
11731                        if test -z "$haveit"; then
11732                          if test -d "$dependency_libdir"; then
11733                                                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$dependency_libdir"
11734                          fi
11735                        fi
11736                      fi
11737                    fi
11738                    ;;
11739                  -R*)
11740                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
11741                    if test "$enable_rpath" != no; then
11742                                                                  haveit=
11743                      for x in $rpathdirs; do
11744                        if test "X$x" = "X$dir"; then
11745                          haveit=yes
11746                          break
11747                        fi
11748                      done
11749                      if test -z "$haveit"; then
11750                        rpathdirs="$rpathdirs $dir"
11751                      fi
11752                                                                  haveit=
11753                      for x in $ltrpathdirs; do
11754                        if test "X$x" = "X$dir"; then
11755                          haveit=yes
11756                          break
11757                        fi
11758                      done
11759                      if test -z "$haveit"; then
11760                        ltrpathdirs="$ltrpathdirs $dir"
11761                      fi
11762                    fi
11763                    ;;
11764                  -l*)
11765                                                                                                                                                                dep=`echo "X$dep" | sed -e 's/^X-l//'`
11766                    if test "X$dep" != Xc \
11767                       || case $host_os in
11768                            linux* | gnu* | k*bsd*-gnu) false ;;
11769                            *)                          true ;;
11770                          esac; then
11771                      names_next_round="$names_next_round $dep"
11772                    fi
11773                    ;;
11774                  *.la)
11775                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11776                    ;;
11777                  *)
11778                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
11779                    LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
11780                    ;;
11781                esac
11782              done
11783            fi
11784          else
11785                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
11786            LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
11787          fi
11788        fi
11789      fi
11790    done
11791  done
11792  if test "X$rpathdirs" != "X"; then
11793    if test -n "$acl_hardcode_libdir_separator"; then
11794                        alldirs=
11795      for found_dir in $rpathdirs; do
11796        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
11797      done
11798            acl_save_libdir="$libdir"
11799      libdir="$alldirs"
11800      eval flag=\"$acl_hardcode_libdir_flag_spec\"
11801      libdir="$acl_save_libdir"
11802      LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
11803    else
11804            for found_dir in $rpathdirs; do
11805        acl_save_libdir="$libdir"
11806        libdir="$found_dir"
11807        eval flag=\"$acl_hardcode_libdir_flag_spec\"
11808        libdir="$acl_save_libdir"
11809        LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
11810      done
11811    fi
11812  fi
11813  if test "X$ltrpathdirs" != "X"; then
11814            for found_dir in $ltrpathdirs; do
11815      LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
11816    done
11817  fi
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
11849printf %s "checking for CFPreferencesCopyAppValue... " >&6; }
11850if test ${gt_cv_func_CFPreferencesCopyAppValue+y}
11851then :
11852  printf %s "(cached) " >&6
11853else $as_nop
11854  gt_save_LIBS="$LIBS"
11855     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
11856     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11857/* end confdefs.h.  */
11858#include <CoreFoundation/CFPreferences.h>
11859int
11860main (void)
11861{
11862CFPreferencesCopyAppValue(NULL, NULL)
11863  ;
11864  return 0;
11865}
11866_ACEOF
11867if ac_fn_c_try_link "$LINENO"
11868then :
11869  gt_cv_func_CFPreferencesCopyAppValue=yes
11870else $as_nop
11871  gt_cv_func_CFPreferencesCopyAppValue=no
11872fi
11873rm -f core conftest.err conftest.$ac_objext conftest.beam \
11874    conftest$ac_exeext conftest.$ac_ext
11875     LIBS="$gt_save_LIBS"
11876fi
11877{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
11878printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
11879  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
11880
11881printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
11882
11883  fi
11884    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
11885printf %s "checking for CFLocaleCopyCurrent... " >&6; }
11886if test ${gt_cv_func_CFLocaleCopyCurrent+y}
11887then :
11888  printf %s "(cached) " >&6
11889else $as_nop
11890  gt_save_LIBS="$LIBS"
11891     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
11892     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11893/* end confdefs.h.  */
11894#include <CoreFoundation/CFLocale.h>
11895int
11896main (void)
11897{
11898CFLocaleCopyCurrent();
11899  ;
11900  return 0;
11901}
11902_ACEOF
11903if ac_fn_c_try_link "$LINENO"
11904then :
11905  gt_cv_func_CFLocaleCopyCurrent=yes
11906else $as_nop
11907  gt_cv_func_CFLocaleCopyCurrent=no
11908fi
11909rm -f core conftest.err conftest.$ac_objext conftest.beam \
11910    conftest$ac_exeext conftest.$ac_ext
11911     LIBS="$gt_save_LIBS"
11912fi
11913{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
11914printf "%s\n" "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
11915  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
11916
11917printf "%s\n" "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
11918
11919  fi
11920  INTL_MACOSX_LIBS=
11921  if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
11922    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
11923  fi
11924
11925
11926
11927
11928
11929
11930  LIBINTL=
11931  LTLIBINTL=
11932  POSUB=
11933
11934    case " $gt_needs " in
11935    *" need-formatstring-macros "*) gt_api_version=3 ;;
11936    *" need-ngettext "*) gt_api_version=2 ;;
11937    *) gt_api_version=1 ;;
11938  esac
11939  gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
11940  gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
11941
11942    if test "$USE_NLS" = "yes"; then
11943    gt_use_preinstalled_gnugettext=no
11944
11945
11946        if test $gt_api_version -ge 3; then
11947          gt_revision_test_code='
11948#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
11949#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
11950#endif
11951typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
11952'
11953        else
11954          gt_revision_test_code=
11955        fi
11956        if test $gt_api_version -ge 2; then
11957          gt_expression_test_code=' + * ngettext ("", "", 0)'
11958        else
11959          gt_expression_test_code=
11960        fi
11961
11962        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
11963printf %s "checking for GNU gettext in libc... " >&6; }
11964if eval test \${$gt_func_gnugettext_libc+y}
11965then :
11966  printf %s "(cached) " >&6
11967else $as_nop
11968  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11969/* end confdefs.h.  */
11970
11971#include <libintl.h>
11972$gt_revision_test_code
11973extern int _nl_msg_cat_cntr;
11974extern int *_nl_domain_bindings;
11975
11976int
11977main (void)
11978{
11979
11980bindtextdomain ("", "");
11981return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
11982
11983  ;
11984  return 0;
11985}
11986_ACEOF
11987if ac_fn_c_try_link "$LINENO"
11988then :
11989  eval "$gt_func_gnugettext_libc=yes"
11990else $as_nop
11991  eval "$gt_func_gnugettext_libc=no"
11992fi
11993rm -f core conftest.err conftest.$ac_objext conftest.beam \
11994    conftest$ac_exeext conftest.$ac_ext
11995fi
11996eval ac_res=\$$gt_func_gnugettext_libc
11997	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11998printf "%s\n" "$ac_res" >&6; }
11999
12000        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
12001
12002
12003
12004
12005
12006          am_save_CPPFLAGS="$CPPFLAGS"
12007
12008  for element in $INCICONV; do
12009    haveit=
12010    for x in $CPPFLAGS; do
12011
12012  acl_save_prefix="$prefix"
12013  prefix="$acl_final_prefix"
12014  acl_save_exec_prefix="$exec_prefix"
12015  exec_prefix="$acl_final_exec_prefix"
12016  eval x=\"$x\"
12017  exec_prefix="$acl_save_exec_prefix"
12018  prefix="$acl_save_prefix"
12019
12020      if test "X$x" = "X$element"; then
12021        haveit=yes
12022        break
12023      fi
12024    done
12025    if test -z "$haveit"; then
12026      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
12027    fi
12028  done
12029
12030
12031  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
12032printf %s "checking for iconv... " >&6; }
12033if test ${am_cv_func_iconv+y}
12034then :
12035  printf %s "(cached) " >&6
12036else $as_nop
12037
12038    am_cv_func_iconv="no, consider installing GNU libiconv"
12039    am_cv_lib_iconv=no
12040    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12041/* end confdefs.h.  */
12042
12043#include <stdlib.h>
12044#include <iconv.h>
12045
12046int
12047main (void)
12048{
12049iconv_t cd = iconv_open("","");
12050           iconv(cd,NULL,NULL,NULL,NULL);
12051           iconv_close(cd);
12052  ;
12053  return 0;
12054}
12055_ACEOF
12056if ac_fn_c_try_link "$LINENO"
12057then :
12058  am_cv_func_iconv=yes
12059fi
12060rm -f core conftest.err conftest.$ac_objext conftest.beam \
12061    conftest$ac_exeext conftest.$ac_ext
12062    if test "$am_cv_func_iconv" != yes; then
12063      am_save_LIBS="$LIBS"
12064      LIBS="$LIBS $LIBICONV"
12065      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12066/* end confdefs.h.  */
12067
12068#include <stdlib.h>
12069#include <iconv.h>
12070
12071int
12072main (void)
12073{
12074iconv_t cd = iconv_open("","");
12075             iconv(cd,NULL,NULL,NULL,NULL);
12076             iconv_close(cd);
12077  ;
12078  return 0;
12079}
12080_ACEOF
12081if ac_fn_c_try_link "$LINENO"
12082then :
12083  am_cv_lib_iconv=yes
12084        am_cv_func_iconv=yes
12085fi
12086rm -f core conftest.err conftest.$ac_objext conftest.beam \
12087    conftest$ac_exeext conftest.$ac_ext
12088      LIBS="$am_save_LIBS"
12089    fi
12090
12091fi
12092{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
12093printf "%s\n" "$am_cv_func_iconv" >&6; }
12094  if test "$am_cv_func_iconv" = yes; then
12095    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
12096printf %s "checking for working iconv... " >&6; }
12097if test ${am_cv_func_iconv_works+y}
12098then :
12099  printf %s "(cached) " >&6
12100else $as_nop
12101
12102                  am_save_LIBS="$LIBS"
12103      if test $am_cv_lib_iconv = yes; then
12104        LIBS="$LIBS $LIBICONV"
12105      fi
12106      am_cv_func_iconv_works=no
12107      for ac_iconv_const in '' 'const'; do
12108        if test "$cross_compiling" = yes
12109then :
12110  case "$host_os" in
12111             aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
12112             *)            am_cv_func_iconv_works="guessing yes" ;;
12113           esac
12114else $as_nop
12115  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12116/* end confdefs.h.  */
12117
12118#include <iconv.h>
12119#include <string.h>
12120
12121#ifndef ICONV_CONST
12122# define ICONV_CONST $ac_iconv_const
12123#endif
12124
12125int
12126main (void)
12127{
12128int result = 0;
12129  /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from
12130     successful returns.  This is even documented in
12131     <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */
12132  {
12133    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
12134    if (cd_utf8_to_88591 != (iconv_t)(-1))
12135      {
12136        static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
12137        char buf[10];
12138        ICONV_CONST char *inptr = input;
12139        size_t inbytesleft = strlen (input);
12140        char *outptr = buf;
12141        size_t outbytesleft = sizeof (buf);
12142        size_t res = iconv (cd_utf8_to_88591,
12143                            &inptr, &inbytesleft,
12144                            &outptr, &outbytesleft);
12145        if (res == 0)
12146          result |= 1;
12147        iconv_close (cd_utf8_to_88591);
12148      }
12149  }
12150  /* Test against Solaris 10 bug: Failures are not distinguishable from
12151     successful returns.  */
12152  {
12153    iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
12154    if (cd_ascii_to_88591 != (iconv_t)(-1))
12155      {
12156        static ICONV_CONST char input[] = "\263";
12157        char buf[10];
12158        ICONV_CONST char *inptr = input;
12159        size_t inbytesleft = strlen (input);
12160        char *outptr = buf;
12161        size_t outbytesleft = sizeof (buf);
12162        size_t res = iconv (cd_ascii_to_88591,
12163                            &inptr, &inbytesleft,
12164                            &outptr, &outbytesleft);
12165        if (res == 0)
12166          result |= 2;
12167        iconv_close (cd_ascii_to_88591);
12168      }
12169  }
12170  /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
12171  {
12172    iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
12173    if (cd_88591_to_utf8 != (iconv_t)(-1))
12174      {
12175        static ICONV_CONST char input[] = "\304";
12176        static char buf[2] = { (char)0xDE, (char)0xAD };
12177        ICONV_CONST char *inptr = input;
12178        size_t inbytesleft = 1;
12179        char *outptr = buf;
12180        size_t outbytesleft = 1;
12181        size_t res = iconv (cd_88591_to_utf8,
12182                            &inptr, &inbytesleft,
12183                            &outptr, &outbytesleft);
12184        if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
12185          result |= 4;
12186        iconv_close (cd_88591_to_utf8);
12187      }
12188  }
12189#if 0 /* This bug could be worked around by the caller.  */
12190  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
12191  {
12192    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
12193    if (cd_88591_to_utf8 != (iconv_t)(-1))
12194      {
12195        static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
12196        char buf[50];
12197        ICONV_CONST char *inptr = input;
12198        size_t inbytesleft = strlen (input);
12199        char *outptr = buf;
12200        size_t outbytesleft = sizeof (buf);
12201        size_t res = iconv (cd_88591_to_utf8,
12202                            &inptr, &inbytesleft,
12203                            &outptr, &outbytesleft);
12204        if ((int)res > 0)
12205          result |= 8;
12206        iconv_close (cd_88591_to_utf8);
12207      }
12208  }
12209#endif
12210  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
12211     provided.  */
12212  {
12213    /* Try standardized names.  */
12214    iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
12215    /* Try IRIX, OSF/1 names.  */
12216    iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
12217    /* Try AIX names.  */
12218    iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
12219    /* Try HP-UX names.  */
12220    iconv_t cd4 = iconv_open ("utf8", "eucJP");
12221    if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
12222        && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
12223      result |= 16;
12224    if (cd1 != (iconv_t)(-1))
12225      iconv_close (cd1);
12226    if (cd2 != (iconv_t)(-1))
12227      iconv_close (cd2);
12228    if (cd3 != (iconv_t)(-1))
12229      iconv_close (cd3);
12230    if (cd4 != (iconv_t)(-1))
12231      iconv_close (cd4);
12232  }
12233  return result;
12234
12235  ;
12236  return 0;
12237}
12238_ACEOF
12239if ac_fn_c_try_run "$LINENO"
12240then :
12241  am_cv_func_iconv_works=yes
12242fi
12243rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12244  conftest.$ac_objext conftest.beam conftest.$ac_ext
12245fi
12246
12247        test "$am_cv_func_iconv_works" = no || break
12248      done
12249      LIBS="$am_save_LIBS"
12250
12251fi
12252{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
12253printf "%s\n" "$am_cv_func_iconv_works" >&6; }
12254    case "$am_cv_func_iconv_works" in
12255      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
12256      *)   am_func_iconv=yes ;;
12257    esac
12258  else
12259    am_func_iconv=no am_cv_lib_iconv=no
12260  fi
12261  if test "$am_func_iconv" = yes; then
12262
12263printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
12264
12265  fi
12266  if test "$am_cv_lib_iconv" = yes; then
12267    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
12268printf %s "checking how to link with libiconv... " >&6; }
12269    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
12270printf "%s\n" "$LIBICONV" >&6; }
12271  else
12272            CPPFLAGS="$am_save_CPPFLAGS"
12273    LIBICONV=
12274    LTLIBICONV=
12275  fi
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286    use_additional=yes
12287
12288  acl_save_prefix="$prefix"
12289  prefix="$acl_final_prefix"
12290  acl_save_exec_prefix="$exec_prefix"
12291  exec_prefix="$acl_final_exec_prefix"
12292
12293    eval additional_includedir=\"$includedir\"
12294    eval additional_libdir=\"$libdir\"
12295    eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
12296    eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
12297
12298  exec_prefix="$acl_save_exec_prefix"
12299  prefix="$acl_save_prefix"
12300
12301
12302# Check whether --with-libintl-prefix was given.
12303if test ${with_libintl_prefix+y}
12304then :
12305  withval=$with_libintl_prefix;
12306    if test "X$withval" = "Xno"; then
12307      use_additional=no
12308    else
12309      if test "X$withval" = "X"; then
12310
12311  acl_save_prefix="$prefix"
12312  prefix="$acl_final_prefix"
12313  acl_save_exec_prefix="$exec_prefix"
12314  exec_prefix="$acl_final_exec_prefix"
12315
12316          eval additional_includedir=\"$includedir\"
12317          eval additional_libdir=\"$libdir\"
12318          eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
12319          eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
12320
12321  exec_prefix="$acl_save_exec_prefix"
12322  prefix="$acl_save_prefix"
12323
12324      else
12325        additional_includedir="$withval/include"
12326        additional_libdir="$withval/$acl_libdirstem"
12327        additional_libdir2="$withval/$acl_libdirstem2"
12328        additional_libdir3="$withval/$acl_libdirstem3"
12329      fi
12330    fi
12331
12332fi
12333
12334  if test "X$additional_libdir2" = "X$additional_libdir"; then
12335    additional_libdir2=
12336  fi
12337  if test "X$additional_libdir3" = "X$additional_libdir"; then
12338    additional_libdir3=
12339  fi
12340      LIBINTL=
12341  LTLIBINTL=
12342  INCINTL=
12343  LIBINTL_PREFIX=
12344      HAVE_LIBINTL=
12345  rpathdirs=
12346  ltrpathdirs=
12347  names_already_handled=
12348  names_next_round='intl '
12349  while test -n "$names_next_round"; do
12350    names_this_round="$names_next_round"
12351    names_next_round=
12352    for name in $names_this_round; do
12353      already_handled=
12354      for n in $names_already_handled; do
12355        if test "$n" = "$name"; then
12356          already_handled=yes
12357          break
12358        fi
12359      done
12360      if test -z "$already_handled"; then
12361        names_already_handled="$names_already_handled $name"
12362                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
12363        eval value=\"\$HAVE_LIB$uppername\"
12364        if test -n "$value"; then
12365          if test "$value" = yes; then
12366            eval value=\"\$LIB$uppername\"
12367            test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
12368            eval value=\"\$LTLIB$uppername\"
12369            test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
12370          else
12371                                    :
12372          fi
12373        else
12374                              found_dir=
12375          found_la=
12376          found_so=
12377          found_a=
12378          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
12379          if test -n "$acl_shlibext"; then
12380            shrext=".$acl_shlibext"             # typically: shrext=.so
12381          else
12382            shrext=
12383          fi
12384          if test $use_additional = yes; then
12385            for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
12386              if test "X$found_dir" = "X"; then
12387                eval dir=\$$additional_libdir_variable
12388                if test -n "$dir"; then
12389                                                      if test -n "$acl_shlibext"; then
12390                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
12391                      found_dir="$dir"
12392                      found_so="$dir/$libname$shrext"
12393                    else
12394                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
12395                        ver=`(cd "$dir" && \
12396                              for f in "$libname$shrext".*; do echo "$f"; done \
12397                              | sed -e "s,^$libname$shrext\\\\.,," \
12398                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
12399                              | sed 1q ) 2>/dev/null`
12400                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
12401                          found_dir="$dir"
12402                          found_so="$dir/$libname$shrext.$ver"
12403                        fi
12404                      else
12405                        eval library_names=\"$acl_library_names_spec\"
12406                        for f in $library_names; do
12407                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
12408                            found_dir="$dir"
12409                            found_so="$dir/$f"
12410                            break
12411                          fi
12412                        done
12413                      fi
12414                    fi
12415                  fi
12416                                    if test "X$found_dir" = "X"; then
12417                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
12418                      found_dir="$dir"
12419                      found_a="$dir/$libname.$acl_libext"
12420                    fi
12421                  fi
12422                  if test "X$found_dir" != "X"; then
12423                    if test -f "$dir/$libname.la"; then
12424                      found_la="$dir/$libname.la"
12425                    fi
12426                  fi
12427                fi
12428              fi
12429            done
12430          fi
12431          if test "X$found_dir" = "X"; then
12432            for x in $LDFLAGS $LTLIBINTL; do
12433
12434  acl_save_prefix="$prefix"
12435  prefix="$acl_final_prefix"
12436  acl_save_exec_prefix="$exec_prefix"
12437  exec_prefix="$acl_final_exec_prefix"
12438  eval x=\"$x\"
12439  exec_prefix="$acl_save_exec_prefix"
12440  prefix="$acl_save_prefix"
12441
12442              case "$x" in
12443                -L*)
12444                  dir=`echo "X$x" | sed -e 's/^X-L//'`
12445                                    if test -n "$acl_shlibext"; then
12446                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
12447                      found_dir="$dir"
12448                      found_so="$dir/$libname$shrext"
12449                    else
12450                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
12451                        ver=`(cd "$dir" && \
12452                              for f in "$libname$shrext".*; do echo "$f"; done \
12453                              | sed -e "s,^$libname$shrext\\\\.,," \
12454                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
12455                              | sed 1q ) 2>/dev/null`
12456                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
12457                          found_dir="$dir"
12458                          found_so="$dir/$libname$shrext.$ver"
12459                        fi
12460                      else
12461                        eval library_names=\"$acl_library_names_spec\"
12462                        for f in $library_names; do
12463                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
12464                            found_dir="$dir"
12465                            found_so="$dir/$f"
12466                            break
12467                          fi
12468                        done
12469                      fi
12470                    fi
12471                  fi
12472                                    if test "X$found_dir" = "X"; then
12473                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
12474                      found_dir="$dir"
12475                      found_a="$dir/$libname.$acl_libext"
12476                    fi
12477                  fi
12478                  if test "X$found_dir" != "X"; then
12479                    if test -f "$dir/$libname.la"; then
12480                      found_la="$dir/$libname.la"
12481                    fi
12482                  fi
12483                  ;;
12484              esac
12485              if test "X$found_dir" != "X"; then
12486                break
12487              fi
12488            done
12489          fi
12490          if test "X$found_dir" != "X"; then
12491                        LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
12492            if test "X$found_so" != "X"; then
12493                                                        if test "$enable_rpath" = no \
12494                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
12495                 || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
12496                 || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
12497                                LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
12498              else
12499                                                                                haveit=
12500                for x in $ltrpathdirs; do
12501                  if test "X$x" = "X$found_dir"; then
12502                    haveit=yes
12503                    break
12504                  fi
12505                done
12506                if test -z "$haveit"; then
12507                  ltrpathdirs="$ltrpathdirs $found_dir"
12508                fi
12509                                if test "$acl_hardcode_direct" = yes; then
12510                                                      LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
12511                else
12512                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
12513                                                            LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
12514                                                            haveit=
12515                    for x in $rpathdirs; do
12516                      if test "X$x" = "X$found_dir"; then
12517                        haveit=yes
12518                        break
12519                      fi
12520                    done
12521                    if test -z "$haveit"; then
12522                      rpathdirs="$rpathdirs $found_dir"
12523                    fi
12524                  else
12525                                                                                haveit=
12526                    for x in $LDFLAGS $LIBINTL; do
12527
12528  acl_save_prefix="$prefix"
12529  prefix="$acl_final_prefix"
12530  acl_save_exec_prefix="$exec_prefix"
12531  exec_prefix="$acl_final_exec_prefix"
12532  eval x=\"$x\"
12533  exec_prefix="$acl_save_exec_prefix"
12534  prefix="$acl_save_prefix"
12535
12536                      if test "X$x" = "X-L$found_dir"; then
12537                        haveit=yes
12538                        break
12539                      fi
12540                    done
12541                    if test -z "$haveit"; then
12542                      LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
12543                    fi
12544                    if test "$acl_hardcode_minus_L" != no; then
12545                                                                                        LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
12546                    else
12547                                                                                                                                                                                LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
12548                    fi
12549                  fi
12550                fi
12551              fi
12552            else
12553              if test "X$found_a" != "X"; then
12554                                LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
12555              else
12556                                                LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
12557              fi
12558            fi
12559                        additional_includedir=
12560            case "$found_dir" in
12561              */$acl_libdirstem | */$acl_libdirstem/)
12562                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
12563                if test "$name" = 'intl'; then
12564                  LIBINTL_PREFIX="$basedir"
12565                fi
12566                additional_includedir="$basedir/include"
12567                ;;
12568              */$acl_libdirstem2 | */$acl_libdirstem2/)
12569                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
12570                if test "$name" = 'intl'; then
12571                  LIBINTL_PREFIX="$basedir"
12572                fi
12573                additional_includedir="$basedir/include"
12574                ;;
12575              */$acl_libdirstem3 | */$acl_libdirstem3/)
12576                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
12577                if test "$name" = 'intl'; then
12578                  LIBINTL_PREFIX="$basedir"
12579                fi
12580                additional_includedir="$basedir/include"
12581                ;;
12582            esac
12583            if test "X$additional_includedir" != "X"; then
12584                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
12585                haveit=
12586                if test "X$additional_includedir" = "X/usr/local/include"; then
12587                  if test -n "$GCC"; then
12588                    case $host_os in
12589                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
12590                    esac
12591                  fi
12592                fi
12593                if test -z "$haveit"; then
12594                  for x in $CPPFLAGS $INCINTL; do
12595
12596  acl_save_prefix="$prefix"
12597  prefix="$acl_final_prefix"
12598  acl_save_exec_prefix="$exec_prefix"
12599  exec_prefix="$acl_final_exec_prefix"
12600  eval x=\"$x\"
12601  exec_prefix="$acl_save_exec_prefix"
12602  prefix="$acl_save_prefix"
12603
12604                    if test "X$x" = "X-I$additional_includedir"; then
12605                      haveit=yes
12606                      break
12607                    fi
12608                  done
12609                  if test -z "$haveit"; then
12610                    if test -d "$additional_includedir"; then
12611                                            INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
12612                    fi
12613                  fi
12614                fi
12615              fi
12616            fi
12617                        if test -n "$found_la"; then
12618                                                        save_libdir="$libdir"
12619              case "$found_la" in
12620                */* | *\\*) . "$found_la" ;;
12621                *) . "./$found_la" ;;
12622              esac
12623              libdir="$save_libdir"
12624                            for dep in $dependency_libs; do
12625                case "$dep" in
12626                  -L*)
12627                    dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
12628                                                                                                                                                                if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
12629                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
12630                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
12631                      haveit=
12632                      if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
12633                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
12634                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
12635                        if test -n "$GCC"; then
12636                          case $host_os in
12637                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
12638                          esac
12639                        fi
12640                      fi
12641                      if test -z "$haveit"; then
12642                        haveit=
12643                        for x in $LDFLAGS $LIBINTL; do
12644
12645  acl_save_prefix="$prefix"
12646  prefix="$acl_final_prefix"
12647  acl_save_exec_prefix="$exec_prefix"
12648  exec_prefix="$acl_final_exec_prefix"
12649  eval x=\"$x\"
12650  exec_prefix="$acl_save_exec_prefix"
12651  prefix="$acl_save_prefix"
12652
12653                          if test "X$x" = "X-L$dependency_libdir"; then
12654                            haveit=yes
12655                            break
12656                          fi
12657                        done
12658                        if test -z "$haveit"; then
12659                          if test -d "$dependency_libdir"; then
12660                                                        LIBINTL="${LIBINTL}${LIBINTL:+ }-L$dependency_libdir"
12661                          fi
12662                        fi
12663                        haveit=
12664                        for x in $LDFLAGS $LTLIBINTL; do
12665
12666  acl_save_prefix="$prefix"
12667  prefix="$acl_final_prefix"
12668  acl_save_exec_prefix="$exec_prefix"
12669  exec_prefix="$acl_final_exec_prefix"
12670  eval x=\"$x\"
12671  exec_prefix="$acl_save_exec_prefix"
12672  prefix="$acl_save_prefix"
12673
12674                          if test "X$x" = "X-L$dependency_libdir"; then
12675                            haveit=yes
12676                            break
12677                          fi
12678                        done
12679                        if test -z "$haveit"; then
12680                          if test -d "$dependency_libdir"; then
12681                                                        LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$dependency_libdir"
12682                          fi
12683                        fi
12684                      fi
12685                    fi
12686                    ;;
12687                  -R*)
12688                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
12689                    if test "$enable_rpath" != no; then
12690                                                                  haveit=
12691                      for x in $rpathdirs; do
12692                        if test "X$x" = "X$dir"; then
12693                          haveit=yes
12694                          break
12695                        fi
12696                      done
12697                      if test -z "$haveit"; then
12698                        rpathdirs="$rpathdirs $dir"
12699                      fi
12700                                                                  haveit=
12701                      for x in $ltrpathdirs; do
12702                        if test "X$x" = "X$dir"; then
12703                          haveit=yes
12704                          break
12705                        fi
12706                      done
12707                      if test -z "$haveit"; then
12708                        ltrpathdirs="$ltrpathdirs $dir"
12709                      fi
12710                    fi
12711                    ;;
12712                  -l*)
12713                                                                                                                                                                dep=`echo "X$dep" | sed -e 's/^X-l//'`
12714                    if test "X$dep" != Xc \
12715                       || case $host_os in
12716                            linux* | gnu* | k*bsd*-gnu) false ;;
12717                            *)                          true ;;
12718                          esac; then
12719                      names_next_round="$names_next_round $dep"
12720                    fi
12721                    ;;
12722                  *.la)
12723                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
12724                    ;;
12725                  *)
12726                                        LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
12727                    LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
12728                    ;;
12729                esac
12730              done
12731            fi
12732          else
12733                                                            LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
12734            LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
12735          fi
12736        fi
12737      fi
12738    done
12739  done
12740  if test "X$rpathdirs" != "X"; then
12741    if test -n "$acl_hardcode_libdir_separator"; then
12742                        alldirs=
12743      for found_dir in $rpathdirs; do
12744        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
12745      done
12746            acl_save_libdir="$libdir"
12747      libdir="$alldirs"
12748      eval flag=\"$acl_hardcode_libdir_flag_spec\"
12749      libdir="$acl_save_libdir"
12750      LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
12751    else
12752            for found_dir in $rpathdirs; do
12753        acl_save_libdir="$libdir"
12754        libdir="$found_dir"
12755        eval flag=\"$acl_hardcode_libdir_flag_spec\"
12756        libdir="$acl_save_libdir"
12757        LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
12758      done
12759    fi
12760  fi
12761  if test "X$ltrpathdirs" != "X"; then
12762            for found_dir in $ltrpathdirs; do
12763      LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
12764    done
12765  fi
12766
12767
12768
12769
12770
12771          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
12772printf %s "checking for GNU gettext in libintl... " >&6; }
12773if eval test \${$gt_func_gnugettext_libintl+y}
12774then :
12775  printf %s "(cached) " >&6
12776else $as_nop
12777  gt_save_CPPFLAGS="$CPPFLAGS"
12778            CPPFLAGS="$CPPFLAGS $INCINTL"
12779            gt_save_LIBS="$LIBS"
12780            LIBS="$LIBS $LIBINTL"
12781                        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12782/* end confdefs.h.  */
12783
12784#include <libintl.h>
12785$gt_revision_test_code
12786extern int _nl_msg_cat_cntr;
12787extern
12788#ifdef __cplusplus
12789"C"
12790#endif
12791const char *_nl_expand_alias (const char *);
12792
12793int
12794main (void)
12795{
12796
12797bindtextdomain ("", "");
12798return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
12799
12800  ;
12801  return 0;
12802}
12803_ACEOF
12804if ac_fn_c_try_link "$LINENO"
12805then :
12806  eval "$gt_func_gnugettext_libintl=yes"
12807else $as_nop
12808  eval "$gt_func_gnugettext_libintl=no"
12809fi
12810rm -f core conftest.err conftest.$ac_objext conftest.beam \
12811    conftest$ac_exeext conftest.$ac_ext
12812                        if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
12813              LIBS="$LIBS $LIBICONV"
12814              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12815/* end confdefs.h.  */
12816
12817#include <libintl.h>
12818$gt_revision_test_code
12819extern int _nl_msg_cat_cntr;
12820extern
12821#ifdef __cplusplus
12822"C"
12823#endif
12824const char *_nl_expand_alias (const char *);
12825
12826int
12827main (void)
12828{
12829
12830bindtextdomain ("", "");
12831return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
12832
12833  ;
12834  return 0;
12835}
12836_ACEOF
12837if ac_fn_c_try_link "$LINENO"
12838then :
12839  LIBINTL="$LIBINTL $LIBICONV"
12840                 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
12841                 eval "$gt_func_gnugettext_libintl=yes"
12842
12843fi
12844rm -f core conftest.err conftest.$ac_objext conftest.beam \
12845    conftest$ac_exeext conftest.$ac_ext
12846            fi
12847            CPPFLAGS="$gt_save_CPPFLAGS"
12848            LIBS="$gt_save_LIBS"
12849fi
12850eval ac_res=\$$gt_func_gnugettext_libintl
12851	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12852printf "%s\n" "$ac_res" >&6; }
12853        fi
12854
12855                                        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
12856           || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
12857                && test "$PACKAGE" != gettext-runtime \
12858                && test "$PACKAGE" != gettext-tools; }; then
12859          gt_use_preinstalled_gnugettext=yes
12860        else
12861                    LIBINTL=
12862          LTLIBINTL=
12863          INCINTL=
12864        fi
12865
12866
12867
12868    if test -n "$INTL_MACOSX_LIBS"; then
12869      if test "$gt_use_preinstalled_gnugettext" = "yes" \
12870         || test "$nls_cv_use_gnu_gettext" = "yes"; then
12871                LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
12872        LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
12873      fi
12874    fi
12875
12876    if test "$gt_use_preinstalled_gnugettext" = "yes" \
12877       || test "$nls_cv_use_gnu_gettext" = "yes"; then
12878
12879printf "%s\n" "#define ENABLE_NLS 1" >>confdefs.h
12880
12881    else
12882      USE_NLS=no
12883    fi
12884  fi
12885
12886  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
12887printf %s "checking whether to use NLS... " >&6; }
12888  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
12889printf "%s\n" "$USE_NLS" >&6; }
12890  if test "$USE_NLS" = "yes"; then
12891    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
12892printf %s "checking where the gettext function comes from... " >&6; }
12893    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
12894      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
12895        gt_source="external libintl"
12896      else
12897        gt_source="libc"
12898      fi
12899    else
12900      gt_source="included intl directory"
12901    fi
12902    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
12903printf "%s\n" "$gt_source" >&6; }
12904  fi
12905
12906  if test "$USE_NLS" = "yes"; then
12907
12908    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
12909      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
12910        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
12911printf %s "checking how to link with libintl... " >&6; }
12912        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
12913printf "%s\n" "$LIBINTL" >&6; }
12914
12915  for element in $INCINTL; do
12916    haveit=
12917    for x in $CPPFLAGS; do
12918
12919  acl_save_prefix="$prefix"
12920  prefix="$acl_final_prefix"
12921  acl_save_exec_prefix="$exec_prefix"
12922  exec_prefix="$acl_final_exec_prefix"
12923  eval x=\"$x\"
12924  exec_prefix="$acl_save_exec_prefix"
12925  prefix="$acl_save_prefix"
12926
12927      if test "X$x" = "X$element"; then
12928        haveit=yes
12929        break
12930      fi
12931    done
12932    if test -z "$haveit"; then
12933      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
12934    fi
12935  done
12936
12937      fi
12938
12939
12940printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h
12941
12942
12943printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h
12944
12945    fi
12946
12947        POSUB=po
12948  fi
12949
12950
12951
12952    INTLLIBS="$LIBINTL"
12953
12954
12955
12956
12957
12958
12959
12960
12961if test -n "$ac_tool_prefix"; then
12962  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
12963set dummy ${ac_tool_prefix}ranlib; ac_word=$2
12964{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12965printf %s "checking for $ac_word... " >&6; }
12966if test ${ac_cv_prog_RANLIB+y}
12967then :
12968  printf %s "(cached) " >&6
12969else $as_nop
12970  if test -n "$RANLIB"; then
12971  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
12972else
12973as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12974for as_dir in $PATH
12975do
12976  IFS=$as_save_IFS
12977  case $as_dir in #(((
12978    '') as_dir=./ ;;
12979    */) ;;
12980    *) as_dir=$as_dir/ ;;
12981  esac
12982    for ac_exec_ext in '' $ac_executable_extensions; do
12983  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
12984    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
12985    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
12986    break 2
12987  fi
12988done
12989  done
12990IFS=$as_save_IFS
12991
12992fi
12993fi
12994RANLIB=$ac_cv_prog_RANLIB
12995if test -n "$RANLIB"; then
12996  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
12997printf "%s\n" "$RANLIB" >&6; }
12998else
12999  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13000printf "%s\n" "no" >&6; }
13001fi
13002
13003
13004fi
13005if test -z "$ac_cv_prog_RANLIB"; then
13006  ac_ct_RANLIB=$RANLIB
13007  # Extract the first word of "ranlib", so it can be a program name with args.
13008set dummy ranlib; ac_word=$2
13009{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13010printf %s "checking for $ac_word... " >&6; }
13011if test ${ac_cv_prog_ac_ct_RANLIB+y}
13012then :
13013  printf %s "(cached) " >&6
13014else $as_nop
13015  if test -n "$ac_ct_RANLIB"; then
13016  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
13017else
13018as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13019for as_dir in $PATH
13020do
13021  IFS=$as_save_IFS
13022  case $as_dir in #(((
13023    '') as_dir=./ ;;
13024    */) ;;
13025    *) as_dir=$as_dir/ ;;
13026  esac
13027    for ac_exec_ext in '' $ac_executable_extensions; do
13028  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
13029    ac_cv_prog_ac_ct_RANLIB="ranlib"
13030    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
13031    break 2
13032  fi
13033done
13034  done
13035IFS=$as_save_IFS
13036
13037fi
13038fi
13039ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
13040if test -n "$ac_ct_RANLIB"; then
13041  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
13042printf "%s\n" "$ac_ct_RANLIB" >&6; }
13043else
13044  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13045printf "%s\n" "no" >&6; }
13046fi
13047
13048  if test "x$ac_ct_RANLIB" = x; then
13049    RANLIB=":"
13050  else
13051    case $cross_compiling:$ac_tool_warned in
13052yes:)
13053{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13054printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13055ac_tool_warned=yes ;;
13056esac
13057    RANLIB=$ac_ct_RANLIB
13058  fi
13059else
13060  RANLIB="$ac_cv_prog_RANLIB"
13061fi
13062
13063
13064for ac_prog in flex lex
13065do
13066  # Extract the first word of "$ac_prog", so it can be a program name with args.
13067set dummy $ac_prog; ac_word=$2
13068{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13069printf %s "checking for $ac_word... " >&6; }
13070if test ${ac_cv_prog_LEX+y}
13071then :
13072  printf %s "(cached) " >&6
13073else $as_nop
13074  if test -n "$LEX"; then
13075  ac_cv_prog_LEX="$LEX" # Let the user override the test.
13076else
13077as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13078for as_dir in $PATH
13079do
13080  IFS=$as_save_IFS
13081  case $as_dir in #(((
13082    '') as_dir=./ ;;
13083    */) ;;
13084    *) as_dir=$as_dir/ ;;
13085  esac
13086    for ac_exec_ext in '' $ac_executable_extensions; do
13087  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
13088    ac_cv_prog_LEX="$ac_prog"
13089    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
13090    break 2
13091  fi
13092done
13093  done
13094IFS=$as_save_IFS
13095
13096fi
13097fi
13098LEX=$ac_cv_prog_LEX
13099if test -n "$LEX"; then
13100  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
13101printf "%s\n" "$LEX" >&6; }
13102else
13103  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13104printf "%s\n" "no" >&6; }
13105fi
13106
13107
13108  test -n "$LEX" && break
13109done
13110test -n "$LEX" || LEX=":"
13111
13112  if test "x$LEX" != "x:"; then
13113    cat >conftest.l <<_ACEOF
13114%{
13115#ifdef __cplusplus
13116extern "C"
13117#endif
13118int yywrap(void);
13119%}
13120%%
13121a { ECHO; }
13122b { REJECT; }
13123c { yymore (); }
13124d { yyless (1); }
13125e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
13126#ifdef __cplusplus
13127    yyless ((yyinput () != 0));
13128#else
13129    yyless ((input () != 0));
13130#endif
13131  }
13132f { unput (yytext[0]); }
13133. { BEGIN INITIAL; }
13134%%
13135#ifdef YYTEXT_POINTER
13136extern char *yytext;
13137#endif
13138int
13139yywrap (void)
13140{
13141  return 1;
13142}
13143int
13144main (void)
13145{
13146  return ! yylex ();
13147}
13148_ACEOF
13149{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex output file root" >&5
13150printf %s "checking for lex output file root... " >&6; }
13151if test ${ac_cv_prog_lex_root+y}
13152then :
13153  printf %s "(cached) " >&6
13154else $as_nop
13155
13156ac_cv_prog_lex_root=unknown
13157{ { ac_try="$LEX conftest.l"
13158case "(($ac_try" in
13159  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13160  *) ac_try_echo=$ac_try;;
13161esac
13162eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
13163printf "%s\n" "$ac_try_echo"; } >&5
13164  (eval "$LEX conftest.l") 2>&5
13165  ac_status=$?
13166  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13167  test $ac_status = 0; } &&
13168if test -f lex.yy.c; then
13169  ac_cv_prog_lex_root=lex.yy
13170elif test -f lexyy.c; then
13171  ac_cv_prog_lex_root=lexyy
13172fi
13173fi
13174{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
13175printf "%s\n" "$ac_cv_prog_lex_root" >&6; }
13176if test "$ac_cv_prog_lex_root" = unknown
13177then :
13178  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find output from $LEX; giving up on $LEX" >&5
13179printf "%s\n" "$as_me: WARNING: cannot find output from $LEX; giving up on $LEX" >&2;}
13180   LEX=: LEXLIB=
13181fi
13182LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
13183
13184if test ${LEXLIB+y}
13185then :
13186
13187else $as_nop
13188
13189  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex library" >&5
13190printf %s "checking for lex library... " >&6; }
13191if test ${ac_cv_lib_lex+y}
13192then :
13193  printf %s "(cached) " >&6
13194else $as_nop
13195
13196    ac_save_LIBS="$LIBS"
13197    ac_found=false
13198    for ac_cv_lib_lex in 'none needed' -lfl -ll 'not found'; do
13199      case $ac_cv_lib_lex in #(
13200  'none needed') :
13201     ;; #(
13202  'not found') :
13203    break ;; #(
13204  *) :
13205    LIBS="$ac_cv_lib_lex $ac_save_LIBS" ;; #(
13206  *) :
13207     ;;
13208esac
13209
13210      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13211/* end confdefs.h.  */
13212`cat $LEX_OUTPUT_ROOT.c`
13213_ACEOF
13214if ac_fn_c_try_link "$LINENO"
13215then :
13216  ac_found=:
13217fi
13218rm -f core conftest.err conftest.$ac_objext conftest.beam \
13219    conftest$ac_exeext conftest.$ac_ext
13220      if $ac_found; then
13221        break
13222      fi
13223    done
13224    LIBS="$ac_save_LIBS"
13225
13226fi
13227{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
13228printf "%s\n" "$ac_cv_lib_lex" >&6; }
13229  if test "$ac_cv_lib_lex" = 'not found'
13230then :
13231  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: required lex library not found; giving up on $LEX" >&5
13232printf "%s\n" "$as_me: WARNING: required lex library not found; giving up on $LEX" >&2;}
13233	 LEX=: LEXLIB=
13234elif test "$ac_cv_lib_lex" = 'none needed'
13235then :
13236  LEXLIB=''
13237else $as_nop
13238  LEXLIB=$ac_cv_lib_lex
13239fi
13240
13241fi
13242
13243
13244if test "$LEX" != :
13245then :
13246
13247{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
13248printf %s "checking whether yytext is a pointer... " >&6; }
13249if test ${ac_cv_prog_lex_yytext_pointer+y}
13250then :
13251  printf %s "(cached) " >&6
13252else $as_nop
13253  # POSIX says lex can declare yytext either as a pointer or an array; the
13254# default is implementation-dependent.  Figure out which it is, since
13255# not all implementations provide the %pointer and %array declarations.
13256ac_cv_prog_lex_yytext_pointer=no
13257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13258/* end confdefs.h.  */
13259
13260  #define YYTEXT_POINTER 1
13261`cat $LEX_OUTPUT_ROOT.c`
13262_ACEOF
13263if ac_fn_c_try_compile "$LINENO"
13264then :
13265  ac_cv_prog_lex_yytext_pointer=yes
13266fi
13267rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13268
13269fi
13270{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
13271printf "%s\n" "$ac_cv_prog_lex_yytext_pointer" >&6; }
13272if test $ac_cv_prog_lex_yytext_pointer = yes; then
13273
13274printf "%s\n" "#define YYTEXT_POINTER 1" >>confdefs.h
13275
13276fi
13277
13278fi
13279rm -f conftest.l $LEX_OUTPUT_ROOT.c
13280
13281fi
13282
13283if test -n "$auto_cflags"; then
13284  if test -n "$GCC"; then
13285    CFLAGS="$CFLAGS -O2 -Wall -Wextra"
13286  else
13287    case "$host_os" in
13288      *hpux*)  CFLAGS="$CFLAGS +O3"                      ;;
13289      *ultrix* | *osf*) CFLAGS="$CFLAGS -O -Olimit 2000" ;;
13290      *)       CFLAGS="$CFLAGS -O" ;;
13291    esac
13292  fi
13293fi
13294
13295{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13296printf %s "checking for an ANSI C-conforming const... " >&6; }
13297if test ${ac_cv_c_const+y}
13298then :
13299  printf %s "(cached) " >&6
13300else $as_nop
13301  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13302/* end confdefs.h.  */
13303
13304int
13305main (void)
13306{
13307
13308#ifndef __cplusplus
13309  /* Ultrix mips cc rejects this sort of thing.  */
13310  typedef int charset[2];
13311  const charset cs = { 0, 0 };
13312  /* SunOS 4.1.1 cc rejects this.  */
13313  char const *const *pcpcc;
13314  char **ppc;
13315  /* NEC SVR4.0.2 mips cc rejects this.  */
13316  struct point {int x, y;};
13317  static struct point const zero = {0,0};
13318  /* IBM XL C 1.02.0.0 rejects this.
13319     It does not let you subtract one const X* pointer from another in
13320     an arm of an if-expression whose if-part is not a constant
13321     expression */
13322  const char *g = "string";
13323  pcpcc = &g + (g ? g-g : 0);
13324  /* HPUX 7.0 cc rejects these. */
13325  ++pcpcc;
13326  ppc = (char**) pcpcc;
13327  pcpcc = (char const *const *) ppc;
13328  { /* SCO 3.2v4 cc rejects this sort of thing.  */
13329    char tx;
13330    char *t = &tx;
13331    char const *s = 0 ? (char *) 0 : (char const *) 0;
13332
13333    *t++ = 0;
13334    if (s) return 0;
13335  }
13336  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13337    int x[] = {25, 17};
13338    const int *foo = &x[0];
13339    ++foo;
13340  }
13341  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13342    typedef const int *iptr;
13343    iptr p = 0;
13344    ++p;
13345  }
13346  { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
13347       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13348    struct s { int j; const int *ap[3]; } bx;
13349    struct s *b = &bx; b->j = 5;
13350  }
13351  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13352    const int foo = 10;
13353    if (!foo) return 0;
13354  }
13355  return !cs[0] && !zero.x;
13356#endif
13357
13358  ;
13359  return 0;
13360}
13361_ACEOF
13362if ac_fn_c_try_compile "$LINENO"
13363then :
13364  ac_cv_c_const=yes
13365else $as_nop
13366  ac_cv_c_const=no
13367fi
13368rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13369fi
13370{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13371printf "%s\n" "$ac_cv_c_const" >&6; }
13372if test $ac_cv_c_const = no; then
13373
13374printf "%s\n" "#define const /**/" >>confdefs.h
13375
13376fi
13377
13378{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
13379printf %s "checking for inline... " >&6; }
13380if test ${ac_cv_c_inline+y}
13381then :
13382  printf %s "(cached) " >&6
13383else $as_nop
13384  ac_cv_c_inline=no
13385for ac_kw in inline __inline__ __inline; do
13386  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13387/* end confdefs.h.  */
13388#ifndef __cplusplus
13389typedef int foo_t;
13390static $ac_kw foo_t static_foo (void) {return 0; }
13391$ac_kw foo_t foo (void) {return 0; }
13392#endif
13393
13394_ACEOF
13395if ac_fn_c_try_compile "$LINENO"
13396then :
13397  ac_cv_c_inline=$ac_kw
13398fi
13399rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13400  test "$ac_cv_c_inline" != no && break
13401done
13402
13403fi
13404{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
13405printf "%s\n" "$ac_cv_c_inline" >&6; }
13406
13407case $ac_cv_c_inline in
13408  inline | yes) ;;
13409  *)
13410    case $ac_cv_c_inline in
13411      no) ac_val=;;
13412      *) ac_val=$ac_cv_c_inline;;
13413    esac
13414    cat >>confdefs.h <<_ACEOF
13415#ifndef __cplusplus
13416#define inline $ac_val
13417#endif
13418_ACEOF
13419    ;;
13420esac
13421
13422{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13423printf %s "checking for working volatile... " >&6; }
13424if test ${ac_cv_c_volatile+y}
13425then :
13426  printf %s "(cached) " >&6
13427else $as_nop
13428  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13429/* end confdefs.h.  */
13430
13431int
13432main (void)
13433{
13434
13435volatile int x;
13436int * volatile y = (int *) 0;
13437return !x && !y;
13438  ;
13439  return 0;
13440}
13441_ACEOF
13442if ac_fn_c_try_compile "$LINENO"
13443then :
13444  ac_cv_c_volatile=yes
13445else $as_nop
13446  ac_cv_c_volatile=no
13447fi
13448rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13449fi
13450{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
13451printf "%s\n" "$ac_cv_c_volatile" >&6; }
13452if test $ac_cv_c_volatile = no; then
13453
13454printf "%s\n" "#define volatile /**/" >>confdefs.h
13455
13456fi
13457
13458
13459# Check whether --enable-largefile was given.
13460if test ${enable_largefile+y}
13461then :
13462  enableval=$enable_largefile;
13463fi
13464
13465if test "$enable_largefile" != no
13466then :
13467  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
13468printf %s "checking for special C compiler options needed for large files... " >&6; }
13469if test ${ac_cv_sys_largefile_CC+y}
13470then :
13471  printf %s "(cached) " >&6
13472else $as_nop
13473  ac_cv_sys_largefile_CC=no
13474     if test "$GCC" != yes; then
13475       ac_save_CC=$CC
13476       while :; do
13477         # IRIX 6.2 and later do not support large files by default,
13478         # so use the C compiler's -n32 option if that helps.
13479         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13480/* end confdefs.h.  */
13481#include <sys/types.h>
13482 /* Check that off_t can represent 2**63 - 1 correctly.
13483    We can't simply define LARGE_OFF_T to be 9223372036854775807,
13484    since some C++ compilers masquerading as C compilers
13485    incorrectly reject 9223372036854775807.  */
13486#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
13487  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13488		       && LARGE_OFF_T % 2147483647 == 1)
13489		      ? 1 : -1];
13490int
13491main (void)
13492{
13493
13494  ;
13495  return 0;
13496}
13497_ACEOF
13498         if ac_fn_c_try_compile "$LINENO"
13499then :
13500  break
13501fi
13502rm -f core conftest.err conftest.$ac_objext conftest.beam
13503         CC="$CC -n32"
13504         if ac_fn_c_try_compile "$LINENO"
13505then :
13506  ac_cv_sys_largefile_CC=' -n32'; break
13507fi
13508rm -f core conftest.err conftest.$ac_objext conftest.beam
13509         break
13510       done
13511       CC=$ac_save_CC
13512       rm -f conftest.$ac_ext
13513    fi
13514fi
13515{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
13516printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
13517  if test "$ac_cv_sys_largefile_CC" != no; then
13518    CC=$CC$ac_cv_sys_largefile_CC
13519  fi
13520
13521  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13522printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
13523if test ${ac_cv_sys_file_offset_bits+y}
13524then :
13525  printf %s "(cached) " >&6
13526else $as_nop
13527  while :; do
13528  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13529/* end confdefs.h.  */
13530#include <sys/types.h>
13531 /* Check that off_t can represent 2**63 - 1 correctly.
13532    We can't simply define LARGE_OFF_T to be 9223372036854775807,
13533    since some C++ compilers masquerading as C compilers
13534    incorrectly reject 9223372036854775807.  */
13535#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
13536  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13537		       && LARGE_OFF_T % 2147483647 == 1)
13538		      ? 1 : -1];
13539int
13540main (void)
13541{
13542
13543  ;
13544  return 0;
13545}
13546_ACEOF
13547if ac_fn_c_try_compile "$LINENO"
13548then :
13549  ac_cv_sys_file_offset_bits=no; break
13550fi
13551rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13552  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13553/* end confdefs.h.  */
13554#undef _FILE_OFFSET_BITS
13555#define _FILE_OFFSET_BITS 64
13556#include <sys/types.h>
13557 /* Check that off_t can represent 2**63 - 1 correctly.
13558    We can't simply define LARGE_OFF_T to be 9223372036854775807,
13559    since some C++ compilers masquerading as C compilers
13560    incorrectly reject 9223372036854775807.  */
13561#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
13562  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13563		       && LARGE_OFF_T % 2147483647 == 1)
13564		      ? 1 : -1];
13565int
13566main (void)
13567{
13568
13569  ;
13570  return 0;
13571}
13572_ACEOF
13573if ac_fn_c_try_compile "$LINENO"
13574then :
13575  ac_cv_sys_file_offset_bits=64; break
13576fi
13577rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13578  ac_cv_sys_file_offset_bits=unknown
13579  break
13580done
13581fi
13582{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
13583printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
13584case $ac_cv_sys_file_offset_bits in #(
13585  no | unknown) ;;
13586  *)
13587printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
13588;;
13589esac
13590rm -rf conftest*
13591  case $ac_cv_sys_file_offset_bits in #(
13592  unknown) :
13593    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
13594printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
13595if test ${ac_cv_sys_large_files+y}
13596then :
13597  printf %s "(cached) " >&6
13598else $as_nop
13599  while :; do
13600  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13601/* end confdefs.h.  */
13602#include <sys/types.h>
13603 /* Check that off_t can represent 2**63 - 1 correctly.
13604    We can't simply define LARGE_OFF_T to be 9223372036854775807,
13605    since some C++ compilers masquerading as C compilers
13606    incorrectly reject 9223372036854775807.  */
13607#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
13608  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13609		       && LARGE_OFF_T % 2147483647 == 1)
13610		      ? 1 : -1];
13611int
13612main (void)
13613{
13614
13615  ;
13616  return 0;
13617}
13618_ACEOF
13619if ac_fn_c_try_compile "$LINENO"
13620then :
13621  ac_cv_sys_large_files=no; break
13622fi
13623rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13624  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13625/* end confdefs.h.  */
13626#undef _LARGE_FILES
13627#define _LARGE_FILES 1
13628#include <sys/types.h>
13629 /* Check that off_t can represent 2**63 - 1 correctly.
13630    We can't simply define LARGE_OFF_T to be 9223372036854775807,
13631    since some C++ compilers masquerading as C compilers
13632    incorrectly reject 9223372036854775807.  */
13633#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
13634  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13635		       && LARGE_OFF_T % 2147483647 == 1)
13636		      ? 1 : -1];
13637int
13638main (void)
13639{
13640
13641  ;
13642  return 0;
13643}
13644_ACEOF
13645if ac_fn_c_try_compile "$LINENO"
13646then :
13647  ac_cv_sys_large_files=1; break
13648fi
13649rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13650  ac_cv_sys_large_files=unknown
13651  break
13652done
13653fi
13654{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
13655printf "%s\n" "$ac_cv_sys_large_files" >&6; }
13656case $ac_cv_sys_large_files in #(
13657  no | unknown) ;;
13658  *)
13659printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
13660;;
13661esac
13662rm -rf conftest* ;; #(
13663  64) :
13664
13665 # Check whether --enable-year2038 was given.
13666if test ${enable_year2038+y}
13667then :
13668  enableval=$enable_year2038;
13669fi
13670
13671 if test "$enable_year2038" != no
13672then :
13673
13674                            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for time_t past the year 2038" >&5
13675printf %s "checking for time_t past the year 2038... " >&6; }
13676if test ${gl_cv_type_time_t_y2038+y}
13677then :
13678  printf %s "(cached) " >&6
13679else $as_nop
13680  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13681/* end confdefs.h.  */
13682
13683  #include <time.h>
13684  /* Check that time_t can represent 2**32 - 1 correctly.  */
13685  #define LARGE_TIME_T \\
13686    ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30)))
13687  int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535
13688                           && LARGE_TIME_T % 65537 == 0)
13689                          ? 1 : -1];
13690
13691_ACEOF
13692if ac_fn_c_try_compile "$LINENO"
13693then :
13694  gl_cv_type_time_t_y2038=yes
13695else $as_nop
13696  gl_cv_type_time_t_y2038=no
13697fi
13698rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13699
13700fi
13701{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_time_t_y2038" >&5
13702printf "%s\n" "$gl_cv_type_time_t_y2038" >&6; }
13703  if test "$gl_cv_type_time_t_y2038" = no; then
13704    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit time_t with _TIME_BITS=64" >&5
13705printf %s "checking for 64-bit time_t with _TIME_BITS=64... " >&6; }
13706if test ${gl_cv_type_time_t_bits_macro+y}
13707then :
13708  printf %s "(cached) " >&6
13709else $as_nop
13710  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13711/* end confdefs.h.  */
13712#define _TIME_BITS 64
13713                           #define _FILE_OFFSET_BITS 64
13714
13715  #include <time.h>
13716  /* Check that time_t can represent 2**32 - 1 correctly.  */
13717  #define LARGE_TIME_T \\
13718    ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30)))
13719  int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535
13720                           && LARGE_TIME_T % 65537 == 0)
13721                          ? 1 : -1];
13722
13723_ACEOF
13724if ac_fn_c_try_compile "$LINENO"
13725then :
13726  gl_cv_type_time_t_bits_macro=yes
13727else $as_nop
13728  gl_cv_type_time_t_bits_macro=no
13729fi
13730rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13731
13732fi
13733{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_time_t_bits_macro" >&5
13734printf "%s\n" "$gl_cv_type_time_t_bits_macro" >&6; }
13735    if test "$gl_cv_type_time_t_bits_macro" = yes; then
13736
13737printf "%s\n" "#define _TIME_BITS 64" >>confdefs.h
13738
13739
13740printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
13741
13742      gl_cv_type_time_t_y2038=yes
13743    fi
13744  fi
13745  if test $gl_cv_type_time_t_y2038 = no; then
13746    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13747/* end confdefs.h.  */
13748#ifdef _USE_32BIT_TIME_T
13749             int ok;
13750           #else
13751             error fail
13752           #endif
13753
13754_ACEOF
13755if ac_fn_c_try_compile "$LINENO"
13756then :
13757  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13758printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
13759as_fn_error $? "The 'time_t' type stops working after January 2038.
13760          Remove _USE_32BIT_TIME_T from the compiler flags.
13761See \`config.log' for more details" "$LINENO" 5; }
13762else $as_nop
13763  # If not cross-compiling and  says we should check,
13764       # and 'touch' works with a large timestamp, then evidently wider time_t
13765       # is desired and supported, so fail and ask the builder to fix the
13766       # problem.  Otherwise, just warn the builder.
13767
13768       if test "$gl_warned_about_y2038" != yes; then
13769         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: The 'time_t' type stops working after January 2038,
13770            and this package needs a wider 'time_t' type
13771            if there is any way to access timestamps after that.
13772            Configure with 'CC=\"${CC} -m64\"' perhaps?" >&5
13773printf "%s\n" "$as_me: WARNING: The 'time_t' type stops working after January 2038,
13774            and this package needs a wider 'time_t' type
13775            if there is any way to access timestamps after that.
13776            Configure with 'CC=\"${CC} -m64\"' perhaps?" >&2;}
13777         gl_warned_about_y2038=yes
13778       fi
13779
13780fi
13781rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13782  fi
13783fi
13784 ;; #(
13785  *) :
13786     ;;
13787esac
13788fi
13789
13790# The cast to long int works around a bug in the HP C Compiler
13791# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13792# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13793# This bug is HP SR number 8606223364.
13794{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
13795printf %s "checking size of off_t... " >&6; }
13796if test ${ac_cv_sizeof_off_t+y}
13797then :
13798  printf %s "(cached) " >&6
13799else $as_nop
13800  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"
13801then :
13802
13803else $as_nop
13804  if test "$ac_cv_type_off_t" = yes; then
13805     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13806printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
13807as_fn_error 77 "cannot compute sizeof (off_t)
13808See \`config.log' for more details" "$LINENO" 5; }
13809   else
13810     ac_cv_sizeof_off_t=0
13811   fi
13812fi
13813
13814fi
13815{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
13816printf "%s\n" "$ac_cv_sizeof_off_t" >&6; }
13817
13818
13819
13820printf "%s\n" "#define SIZEOF_OFF_T $ac_cv_sizeof_off_t" >>confdefs.h
13821
13822
13823
13824{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
13825printf %s "checking for stdbool.h that conforms to C99... " >&6; }
13826if test ${ac_cv_header_stdbool_h+y}
13827then :
13828  printf %s "(cached) " >&6
13829else $as_nop
13830  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13831/* end confdefs.h.  */
13832
13833             #include <stdbool.h>
13834
13835             #ifdef __cplusplus
13836              typedef bool Bool;
13837             #else
13838              typedef _Bool Bool;
13839              #ifndef bool
13840               "error: bool is not defined"
13841              #endif
13842              #ifndef false
13843               "error: false is not defined"
13844              #endif
13845              #if false
13846               "error: false is not 0"
13847              #endif
13848              #ifndef true
13849               "error: true is not defined"
13850              #endif
13851              #if true != 1
13852               "error: true is not 1"
13853              #endif
13854             #endif
13855
13856             #ifndef __bool_true_false_are_defined
13857              "error: __bool_true_false_are_defined is not defined"
13858             #endif
13859
13860             struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
13861
13862             char a[true == 1 ? 1 : -1];
13863             char b[false == 0 ? 1 : -1];
13864             char c[__bool_true_false_are_defined == 1 ? 1 : -1];
13865             char d[(bool) 0.5 == true ? 1 : -1];
13866             /* See body of main program for 'e'.  */
13867             char f[(Bool) 0.0 == false ? 1 : -1];
13868             char g[true];
13869             char h[sizeof (Bool)];
13870             char i[sizeof s.t];
13871             enum { j = false, k = true, l = false * true, m = true * 256 };
13872             /* The following fails for
13873                HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
13874             Bool n[m];
13875             char o[sizeof n == m * sizeof n[0] ? 1 : -1];
13876             char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
13877             /* Catch a bug in an HP-UX C compiler.  See
13878                https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
13879                https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
13880              */
13881             Bool q = true;
13882             Bool *pq = &q;
13883             bool *qq = &q;
13884
13885int
13886main (void)
13887{
13888
13889             bool e = &s;
13890             *pq |= q; *pq |= ! q;
13891             *qq |= q; *qq |= ! q;
13892             /* Refer to every declared value, to avoid compiler optimizations.  */
13893             return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
13894                     + !m + !n + !o + !p + !q + !pq + !qq);
13895
13896  ;
13897  return 0;
13898}
13899_ACEOF
13900if ac_fn_c_try_compile "$LINENO"
13901then :
13902  ac_cv_header_stdbool_h=yes
13903else $as_nop
13904  ac_cv_header_stdbool_h=no
13905fi
13906rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13907fi
13908{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
13909printf "%s\n" "$ac_cv_header_stdbool_h" >&6; }
13910   ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
13911if test "x$ac_cv_type__Bool" = xyes
13912then :
13913
13914printf "%s\n" "#define HAVE__BOOL 1" >>confdefs.h
13915
13916
13917fi
13918
13919
13920if test $ac_cv_header_stdbool_h = yes; then
13921
13922printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h
13923
13924fi
13925
13926ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
13927if test "x$ac_cv_header_unistd_h" = xyes
13928then :
13929  printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h
13930
13931fi
13932ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
13933if test "x$ac_cv_header_sys_time_h" = xyes
13934then :
13935  printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
13936
13937fi
13938
13939ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default"
13940if test "x$ac_cv_header_termios_h" = xyes
13941then :
13942  printf "%s\n" "#define HAVE_TERMIOS_H 1" >>confdefs.h
13943
13944fi
13945ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
13946if test "x$ac_cv_header_sys_ioctl_h" = xyes
13947then :
13948  printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h
13949
13950fi
13951ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default"
13952if test "x$ac_cv_header_sys_select_h" = xyes
13953then :
13954  printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
13955
13956fi
13957
13958ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
13959if test "x$ac_cv_header_stdint_h" = xyes
13960then :
13961  printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
13962
13963fi
13964ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
13965if test "x$ac_cv_header_inttypes_h" = xyes
13966then :
13967  printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h
13968
13969fi
13970ac_fn_c_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default"
13971if test "x$ac_cv_header_pwd_h" = xyes
13972then :
13973  printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h
13974
13975fi
13976ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
13977if test "x$ac_cv_header_wchar_h" = xyes
13978then :
13979  printf "%s\n" "#define HAVE_WCHAR_H 1" >>confdefs.h
13980
13981fi
13982ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
13983if test "x$ac_cv_header_dlfcn_h" = xyes
13984then :
13985  printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
13986
13987fi
13988
13989
13990{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
13991printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
13992if test ${ac_cv_c_undeclared_builtin_options+y}
13993then :
13994  printf %s "(cached) " >&6
13995else $as_nop
13996  ac_save_CFLAGS=$CFLAGS
13997   ac_cv_c_undeclared_builtin_options='cannot detect'
13998   for ac_arg in '' -fno-builtin; do
13999     CFLAGS="$ac_save_CFLAGS $ac_arg"
14000     # This test program should *not* compile successfully.
14001     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14002/* end confdefs.h.  */
14003
14004int
14005main (void)
14006{
14007(void) strchr;
14008  ;
14009  return 0;
14010}
14011_ACEOF
14012if ac_fn_c_try_compile "$LINENO"
14013then :
14014
14015else $as_nop
14016  # This test program should compile successfully.
14017        # No library function is consistently available on
14018        # freestanding implementations, so test against a dummy
14019        # declaration.  Include always-available headers on the
14020        # off chance that they somehow elicit warnings.
14021        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14022/* end confdefs.h.  */
14023#include <float.h>
14024#include <limits.h>
14025#include <stdarg.h>
14026#include <stddef.h>
14027extern void ac_decl (int, char *);
14028
14029int
14030main (void)
14031{
14032(void) ac_decl (0, (char *) 0);
14033  (void) ac_decl;
14034
14035  ;
14036  return 0;
14037}
14038_ACEOF
14039if ac_fn_c_try_compile "$LINENO"
14040then :
14041  if test x"$ac_arg" = x
14042then :
14043  ac_cv_c_undeclared_builtin_options='none needed'
14044else $as_nop
14045  ac_cv_c_undeclared_builtin_options=$ac_arg
14046fi
14047          break
14048fi
14049rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14050fi
14051rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14052    done
14053    CFLAGS=$ac_save_CFLAGS
14054
14055fi
14056{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
14057printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
14058  case $ac_cv_c_undeclared_builtin_options in #(
14059  'cannot detect') :
14060    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14061printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
14062as_fn_error $? "cannot make $CC report undeclared builtins
14063See \`config.log' for more details" "$LINENO" 5; } ;; #(
14064  'none needed') :
14065    ac_c_undeclared_builtin_options='' ;; #(
14066  *) :
14067    ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
14068esac
14069
14070ac_fn_check_decl "$LINENO" "h_errno" "ac_cv_have_decl_h_errno" "#include <netdb.h>
14071" "$ac_c_undeclared_builtin_options" "CFLAGS"
14072if test "x$ac_cv_have_decl_h_errno" = xyes
14073then :
14074  ac_have_decl=1
14075else $as_nop
14076  ac_have_decl=0
14077fi
14078printf "%s\n" "#define HAVE_DECL_H_ERRNO $ac_have_decl" >>confdefs.h
14079
14080
14081# The cast to long int works around a bug in the HP C Compiler
14082# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14083# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14084# This bug is HP SR number 8606223364.
14085{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
14086printf %s "checking size of long... " >&6; }
14087if test ${ac_cv_sizeof_long+y}
14088then :
14089  printf %s "(cached) " >&6
14090else $as_nop
14091  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"
14092then :
14093
14094else $as_nop
14095  if test "$ac_cv_type_long" = yes; then
14096     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14097printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
14098as_fn_error 77 "cannot compute sizeof (long)
14099See \`config.log' for more details" "$LINENO" 5; }
14100   else
14101     ac_cv_sizeof_long=0
14102   fi
14103fi
14104
14105fi
14106{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
14107printf "%s\n" "$ac_cv_sizeof_long" >&6; }
14108
14109
14110
14111printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
14112
14113
14114
14115ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
14116if test "x$ac_cv_type_size_t" = xyes
14117then :
14118
14119else $as_nop
14120
14121printf "%s\n" "#define size_t unsigned int" >>confdefs.h
14122
14123fi
14124
14125
14126  ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
14127"
14128if test "x$ac_cv_type_pid_t" = xyes
14129then :
14130
14131else $as_nop
14132                                          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14133/* end confdefs.h.  */
14134
14135          #if defined _WIN64 && !defined __CYGWIN__
14136          LLP64
14137          #endif
14138
14139int
14140main (void)
14141{
14142
14143  ;
14144  return 0;
14145}
14146
14147_ACEOF
14148if ac_fn_c_try_compile "$LINENO"
14149then :
14150  ac_pid_type='int'
14151else $as_nop
14152  ac_pid_type='__int64'
14153fi
14154rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14155
14156printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
14157
14158
14159fi
14160
14161
14162ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
14163if test "x$ac_cv_type_uint32_t" = xyes
14164then :
14165
14166printf "%s\n" "#define HAVE_UINT32_T 1" >>confdefs.h
14167
14168
14169fi
14170ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
14171if test "x$ac_cv_type_uintptr_t" = xyes
14172then :
14173
14174printf "%s\n" "#define HAVE_UINTPTR_T 1" >>confdefs.h
14175
14176
14177fi
14178ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
14179if test "x$ac_cv_type_intptr_t" = xyes
14180then :
14181
14182printf "%s\n" "#define HAVE_INTPTR_T 1" >>confdefs.h
14183
14184
14185fi
14186ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
14187if test "x$ac_cv_type_int64_t" = xyes
14188then :
14189
14190printf "%s\n" "#define HAVE_INT64_T 1" >>confdefs.h
14191
14192
14193fi
14194
14195ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "
14196#include <stdio.h>
14197#include <sys/types.h>
14198#include <inttypes.h>
14199#include <signal.h>
14200
14201"
14202if test "x$ac_cv_type_sig_atomic_t" = xyes
14203then :
14204
14205printf "%s\n" "#define HAVE_SIG_ATOMIC_T 1" >>confdefs.h
14206
14207
14208fi
14209
14210
14211# gnulib, AM_ICONV should be placed before gl_INIT
14212
14213
14214    ICONV_CONST=;
14215  REPLACE_ICONV=0;
14216  REPLACE_ICONV_OPEN=0;
14217  REPLACE_ICONV_UTF=0;
14218  ICONV_H='';
14219  if false; then
14220              ICONV_H='iconv.h'
14221     fi
14222
14223   if test -n "$ICONV_H"; then
14224  GL_GENERATE_ICONV_H_TRUE=
14225  GL_GENERATE_ICONV_H_FALSE='#'
14226else
14227  GL_GENERATE_ICONV_H_TRUE='#'
14228  GL_GENERATE_ICONV_H_FALSE=
14229fi
14230
14231
14232
14233
14234
14235
14236
14237          am_save_CPPFLAGS="$CPPFLAGS"
14238
14239  for element in $INCICONV; do
14240    haveit=
14241    for x in $CPPFLAGS; do
14242
14243  acl_save_prefix="$prefix"
14244  prefix="$acl_final_prefix"
14245  acl_save_exec_prefix="$exec_prefix"
14246  exec_prefix="$acl_final_exec_prefix"
14247  eval x=\"$x\"
14248  exec_prefix="$acl_save_exec_prefix"
14249  prefix="$acl_save_prefix"
14250
14251      if test "X$x" = "X$element"; then
14252        haveit=yes
14253        break
14254      fi
14255    done
14256    if test -z "$haveit"; then
14257      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14258    fi
14259  done
14260
14261
14262  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
14263printf %s "checking for iconv... " >&6; }
14264if test ${am_cv_func_iconv+y}
14265then :
14266  printf %s "(cached) " >&6
14267else $as_nop
14268
14269    am_cv_func_iconv="no, consider installing GNU libiconv"
14270    am_cv_lib_iconv=no
14271    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14272/* end confdefs.h.  */
14273
14274#include <stdlib.h>
14275#include <iconv.h>
14276
14277int
14278main (void)
14279{
14280iconv_t cd = iconv_open("","");
14281           iconv(cd,NULL,NULL,NULL,NULL);
14282           iconv_close(cd);
14283  ;
14284  return 0;
14285}
14286_ACEOF
14287if ac_fn_c_try_link "$LINENO"
14288then :
14289  am_cv_func_iconv=yes
14290fi
14291rm -f core conftest.err conftest.$ac_objext conftest.beam \
14292    conftest$ac_exeext conftest.$ac_ext
14293    if test "$am_cv_func_iconv" != yes; then
14294      am_save_LIBS="$LIBS"
14295      LIBS="$LIBS $LIBICONV"
14296      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14297/* end confdefs.h.  */
14298
14299#include <stdlib.h>
14300#include <iconv.h>
14301
14302int
14303main (void)
14304{
14305iconv_t cd = iconv_open("","");
14306             iconv(cd,NULL,NULL,NULL,NULL);
14307             iconv_close(cd);
14308  ;
14309  return 0;
14310}
14311_ACEOF
14312if ac_fn_c_try_link "$LINENO"
14313then :
14314  am_cv_lib_iconv=yes
14315        am_cv_func_iconv=yes
14316fi
14317rm -f core conftest.err conftest.$ac_objext conftest.beam \
14318    conftest$ac_exeext conftest.$ac_ext
14319      LIBS="$am_save_LIBS"
14320    fi
14321
14322fi
14323{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
14324printf "%s\n" "$am_cv_func_iconv" >&6; }
14325  if test "$am_cv_func_iconv" = yes; then
14326    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
14327printf %s "checking for working iconv... " >&6; }
14328if test ${am_cv_func_iconv_works+y}
14329then :
14330  printf %s "(cached) " >&6
14331else $as_nop
14332
14333                  am_save_LIBS="$LIBS"
14334      if test $am_cv_lib_iconv = yes; then
14335        LIBS="$LIBS $LIBICONV"
14336      fi
14337      am_cv_func_iconv_works=no
14338      for ac_iconv_const in '' 'const'; do
14339        if test "$cross_compiling" = yes
14340then :
14341  case "$host_os" in
14342             aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
14343             *)            am_cv_func_iconv_works="guessing yes" ;;
14344           esac
14345else $as_nop
14346  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14347/* end confdefs.h.  */
14348
14349#include <iconv.h>
14350#include <string.h>
14351
14352#ifndef ICONV_CONST
14353# define ICONV_CONST $ac_iconv_const
14354#endif
14355
14356int
14357main (void)
14358{
14359int result = 0;
14360  /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from
14361     successful returns.  This is even documented in
14362     <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */
14363  {
14364    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
14365    if (cd_utf8_to_88591 != (iconv_t)(-1))
14366      {
14367        static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
14368        char buf[10];
14369        ICONV_CONST char *inptr = input;
14370        size_t inbytesleft = strlen (input);
14371        char *outptr = buf;
14372        size_t outbytesleft = sizeof (buf);
14373        size_t res = iconv (cd_utf8_to_88591,
14374                            &inptr, &inbytesleft,
14375                            &outptr, &outbytesleft);
14376        if (res == 0)
14377          result |= 1;
14378        iconv_close (cd_utf8_to_88591);
14379      }
14380  }
14381  /* Test against Solaris 10 bug: Failures are not distinguishable from
14382     successful returns.  */
14383  {
14384    iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
14385    if (cd_ascii_to_88591 != (iconv_t)(-1))
14386      {
14387        static ICONV_CONST char input[] = "\263";
14388        char buf[10];
14389        ICONV_CONST char *inptr = input;
14390        size_t inbytesleft = strlen (input);
14391        char *outptr = buf;
14392        size_t outbytesleft = sizeof (buf);
14393        size_t res = iconv (cd_ascii_to_88591,
14394                            &inptr, &inbytesleft,
14395                            &outptr, &outbytesleft);
14396        if (res == 0)
14397          result |= 2;
14398        iconv_close (cd_ascii_to_88591);
14399      }
14400  }
14401  /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
14402  {
14403    iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
14404    if (cd_88591_to_utf8 != (iconv_t)(-1))
14405      {
14406        static ICONV_CONST char input[] = "\304";
14407        static char buf[2] = { (char)0xDE, (char)0xAD };
14408        ICONV_CONST char *inptr = input;
14409        size_t inbytesleft = 1;
14410        char *outptr = buf;
14411        size_t outbytesleft = 1;
14412        size_t res = iconv (cd_88591_to_utf8,
14413                            &inptr, &inbytesleft,
14414                            &outptr, &outbytesleft);
14415        if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
14416          result |= 4;
14417        iconv_close (cd_88591_to_utf8);
14418      }
14419  }
14420#if 0 /* This bug could be worked around by the caller.  */
14421  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
14422  {
14423    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
14424    if (cd_88591_to_utf8 != (iconv_t)(-1))
14425      {
14426        static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
14427        char buf[50];
14428        ICONV_CONST char *inptr = input;
14429        size_t inbytesleft = strlen (input);
14430        char *outptr = buf;
14431        size_t outbytesleft = sizeof (buf);
14432        size_t res = iconv (cd_88591_to_utf8,
14433                            &inptr, &inbytesleft,
14434                            &outptr, &outbytesleft);
14435        if ((int)res > 0)
14436          result |= 8;
14437        iconv_close (cd_88591_to_utf8);
14438      }
14439  }
14440#endif
14441  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
14442     provided.  */
14443  {
14444    /* Try standardized names.  */
14445    iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
14446    /* Try IRIX, OSF/1 names.  */
14447    iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
14448    /* Try AIX names.  */
14449    iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
14450    /* Try HP-UX names.  */
14451    iconv_t cd4 = iconv_open ("utf8", "eucJP");
14452    if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
14453        && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
14454      result |= 16;
14455    if (cd1 != (iconv_t)(-1))
14456      iconv_close (cd1);
14457    if (cd2 != (iconv_t)(-1))
14458      iconv_close (cd2);
14459    if (cd3 != (iconv_t)(-1))
14460      iconv_close (cd3);
14461    if (cd4 != (iconv_t)(-1))
14462      iconv_close (cd4);
14463  }
14464  return result;
14465
14466  ;
14467  return 0;
14468}
14469_ACEOF
14470if ac_fn_c_try_run "$LINENO"
14471then :
14472  am_cv_func_iconv_works=yes
14473fi
14474rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14475  conftest.$ac_objext conftest.beam conftest.$ac_ext
14476fi
14477
14478        test "$am_cv_func_iconv_works" = no || break
14479      done
14480      LIBS="$am_save_LIBS"
14481
14482fi
14483{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
14484printf "%s\n" "$am_cv_func_iconv_works" >&6; }
14485    case "$am_cv_func_iconv_works" in
14486      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
14487      *)   am_func_iconv=yes ;;
14488    esac
14489  else
14490    am_func_iconv=no am_cv_lib_iconv=no
14491  fi
14492  if test "$am_func_iconv" = yes; then
14493
14494printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
14495
14496  fi
14497  if test "$am_cv_lib_iconv" = yes; then
14498    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
14499printf %s "checking how to link with libiconv... " >&6; }
14500    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
14501printf "%s\n" "$LIBICONV" >&6; }
14502  else
14503            CPPFLAGS="$am_save_CPPFLAGS"
14504    LIBICONV=
14505    LTLIBICONV=
14506  fi
14507
14508
14509
14510  if test "$am_cv_func_iconv" = yes; then
14511    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iconv is compatible with its POSIX signature" >&5
14512printf %s "checking whether iconv is compatible with its POSIX signature... " >&6; }
14513if test ${gl_cv_iconv_nonconst+y}
14514then :
14515  printf %s "(cached) " >&6
14516else $as_nop
14517  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14518/* end confdefs.h.  */
14519
14520#include <stdlib.h>
14521#include <iconv.h>
14522extern
14523#ifdef __cplusplus
14524"C"
14525#endif
14526size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
14527
14528int
14529main (void)
14530{
14531
14532  ;
14533  return 0;
14534}
14535_ACEOF
14536if ac_fn_c_try_compile "$LINENO"
14537then :
14538  gl_cv_iconv_nonconst=yes
14539else $as_nop
14540  gl_cv_iconv_nonconst=no
14541fi
14542rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14543
14544fi
14545{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_iconv_nonconst" >&5
14546printf "%s\n" "$gl_cv_iconv_nonconst" >&6; }
14547  else
14548            gl_cv_iconv_nonconst=yes
14549  fi
14550  if test $gl_cv_iconv_nonconst = yes; then
14551    iconv_arg1=""
14552  else
14553    iconv_arg1="const"
14554  fi
14555
14556printf "%s\n" "#define ICONV_CONST $iconv_arg1" >>confdefs.h
14557
14558
14559     if test $gl_cv_iconv_nonconst != yes; then
14560       ICONV_CONST="const"
14561     fi
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571
14572                        # Check whether --enable-cross-guesses was given.
14573if test ${enable_cross_guesses+y}
14574then :
14575  enableval=$enable_cross_guesses; if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
14576       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-cross-guesses" >&5
14577printf "%s\n" "$as_me: WARNING: invalid argument supplied to --enable-cross-guesses" >&2;}
14578       enableval=conservative
14579     fi
14580     gl_cross_guesses="$enableval"
14581else $as_nop
14582  gl_cross_guesses=conservative
14583fi
14584
14585  if test $gl_cross_guesses = risky; then
14586    gl_cross_guess_normal="guessing yes"
14587    gl_cross_guess_inverted="guessing no"
14588  else
14589    gl_cross_guess_normal="guessing no"
14590    gl_cross_guess_inverted="guessing yes"
14591  fi
14592          LIBC_FATAL_STDERR_=1
14593  export LIBC_FATAL_STDERR_
14594
14595
14596
14597  HAVE_STRUCT_SOCKADDR_STORAGE=1;
14598  HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
14599
14600  HAVE_SA_FAMILY_T=1;
14601  HAVE_ACCEPT4=1;
14602
14603
14604
14605   if test $ac_cv_header_sys_socket_h = no; then
14606                         ac_fn_c_check_header_compile "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
14607if test "x$ac_cv_header_ws2tcpip_h" = xyes
14608then :
14609  printf "%s\n" "#define HAVE_WS2TCPIP_H 1" >>confdefs.h
14610
14611fi
14612
14613   fi
14614
14615
14616
14617  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
14618printf %s "checking whether the preprocessor supports include_next... " >&6; }
14619if test ${gl_cv_have_include_next+y}
14620then :
14621  printf %s "(cached) " >&6
14622else $as_nop
14623  rm -rf conftestd1a conftestd1b conftestd2
14624     mkdir conftestd1a conftestd1b conftestd2
14625                                                  cat <<EOF > conftestd1a/conftest.h
14626#define DEFINED_IN_CONFTESTD1
14627#include_next <conftest.h>
14628#ifdef DEFINED_IN_CONFTESTD2
14629int foo;
14630#else
14631#error "include_next doesn't work"
14632#endif
14633EOF
14634     cat <<EOF > conftestd1b/conftest.h
14635#define DEFINED_IN_CONFTESTD1
14636#include <stdio.h>
14637#include_next <conftest.h>
14638#ifdef DEFINED_IN_CONFTESTD2
14639int foo;
14640#else
14641#error "include_next doesn't work"
14642#endif
14643EOF
14644     cat <<EOF > conftestd2/conftest.h
14645#ifndef DEFINED_IN_CONFTESTD1
14646#error "include_next test doesn't work"
14647#endif
14648#define DEFINED_IN_CONFTESTD2
14649EOF
14650     gl_save_CPPFLAGS="$CPPFLAGS"
14651     CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
14652     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14653/* end confdefs.h.  */
14654#include <conftest.h>
14655_ACEOF
14656if ac_fn_c_try_compile "$LINENO"
14657then :
14658  gl_cv_have_include_next=yes
14659else $as_nop
14660  CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
14661        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14662/* end confdefs.h.  */
14663#include <conftest.h>
14664_ACEOF
14665if ac_fn_c_try_compile "$LINENO"
14666then :
14667  gl_cv_have_include_next=buggy
14668else $as_nop
14669  gl_cv_have_include_next=no
14670fi
14671rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14672
14673fi
14674rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14675     CPPFLAGS="$gl_save_CPPFLAGS"
14676     rm -rf conftestd1a conftestd1b conftestd2
14677
14678fi
14679{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
14680printf "%s\n" "$gl_cv_have_include_next" >&6; }
14681  PRAGMA_SYSTEM_HEADER=
14682  if test $gl_cv_have_include_next = yes; then
14683    INCLUDE_NEXT=include_next
14684    INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
14685    if test -n "$GCC"; then
14686      PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
14687    fi
14688  else
14689    if test $gl_cv_have_include_next = buggy; then
14690      INCLUDE_NEXT=include
14691      INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
14692    else
14693      INCLUDE_NEXT=include
14694      INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
14695    fi
14696  fi
14697
14698
14699
14700
14701      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether source code line length is unlimited" >&5
14702printf %s "checking whether source code line length is unlimited... " >&6; }
14703if test ${gl_cv_source_line_length_unlimited+y}
14704then :
14705  printf %s "(cached) " >&6
14706else $as_nop
14707  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14708/* end confdefs.h.  */
14709
14710#ifdef __TANDEM
14711choke me
14712#endif
14713
14714_ACEOF
14715if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14716  $EGREP "choke me" >/dev/null 2>&1
14717then :
14718  gl_cv_source_line_length_unlimited=no
14719else $as_nop
14720  gl_cv_source_line_length_unlimited=yes
14721fi
14722rm -rf conftest*
14723
14724
14725fi
14726{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_source_line_length_unlimited" >&5
14727printf "%s\n" "$gl_cv_source_line_length_unlimited" >&6; }
14728  if test $gl_cv_source_line_length_unlimited = no; then
14729    PRAGMA_COLUMNS="#pragma COLUMNS 10000"
14730  else
14731    PRAGMA_COLUMNS=
14732  fi
14733
14734
14735
14736    HAVE_CHOWN=1;
14737  HAVE_COPY_FILE_RANGE=1;
14738  HAVE_DUP3=1;
14739  HAVE_EUIDACCESS=1;
14740  HAVE_EXECVPE=1;
14741  HAVE_FACCESSAT=1;
14742  HAVE_FCHDIR=1;
14743  HAVE_FCHOWNAT=1;
14744  HAVE_FDATASYNC=1;
14745  HAVE_FSYNC=1;
14746  HAVE_FTRUNCATE=1;
14747  HAVE_GETDTABLESIZE=1;
14748  HAVE_GETENTROPY=1;
14749  HAVE_GETGROUPS=1;
14750  HAVE_GETHOSTNAME=1;
14751  HAVE_GETLOGIN=1;
14752  HAVE_GETPAGESIZE=1;
14753  HAVE_GETPASS=1;
14754  HAVE_GROUP_MEMBER=1;
14755  HAVE_LCHOWN=1;
14756  HAVE_LINK=1;
14757  HAVE_LINKAT=1;
14758  HAVE_PIPE=1;
14759  HAVE_PIPE2=1;
14760  HAVE_PREAD=1;
14761  HAVE_PWRITE=1;
14762  HAVE_READLINK=1;
14763  HAVE_READLINKAT=1;
14764  HAVE_SETHOSTNAME=1;
14765  HAVE_SLEEP=1;
14766  HAVE_SYMLINK=1;
14767  HAVE_SYMLINKAT=1;
14768  HAVE_UNLINKAT=1;
14769  HAVE_USLEEP=1;
14770  HAVE_DECL_ENVIRON=1;
14771  HAVE_DECL_EXECVPE=1;
14772  HAVE_DECL_FCHDIR=1;
14773  HAVE_DECL_FDATASYNC=1;
14774  HAVE_DECL_GETDOMAINNAME=1;
14775  HAVE_DECL_GETLOGIN=1;
14776  HAVE_DECL_GETLOGIN_R=1;
14777  HAVE_DECL_GETPAGESIZE=1;
14778  HAVE_DECL_GETUSERSHELL=1;
14779  HAVE_DECL_SETHOSTNAME=1;
14780  HAVE_DECL_TRUNCATE=1;
14781  HAVE_DECL_TTYNAME_R=1;
14782  HAVE_OS_H=0;
14783  HAVE_SYS_PARAM_H=0;
14784  REPLACE_ACCESS=0;
14785  REPLACE_CHOWN=0;
14786  REPLACE_CLOSE=0;
14787  REPLACE_DUP=0;
14788  REPLACE_DUP2=0;
14789  REPLACE_EXECL=0;
14790  REPLACE_EXECLE=0;
14791  REPLACE_EXECLP=0;
14792  REPLACE_EXECV=0;
14793  REPLACE_EXECVE=0;
14794  REPLACE_EXECVP=0;
14795  REPLACE_EXECVPE=0;
14796  REPLACE_FACCESSAT=0;
14797  REPLACE_FCHOWNAT=0;
14798  REPLACE_FTRUNCATE=0;
14799  REPLACE_GETCWD=0;
14800  REPLACE_GETDOMAINNAME=0;
14801  REPLACE_GETDTABLESIZE=0;
14802  REPLACE_GETLOGIN_R=0;
14803  REPLACE_GETGROUPS=0;
14804  REPLACE_GETPAGESIZE=0;
14805  REPLACE_GETPASS=0;
14806  REPLACE_ISATTY=0;
14807  REPLACE_LCHOWN=0;
14808  REPLACE_LINK=0;
14809  REPLACE_LINKAT=0;
14810  REPLACE_LSEEK=0;
14811  REPLACE_PREAD=0;
14812  REPLACE_PWRITE=0;
14813  REPLACE_READ=0;
14814  REPLACE_READLINK=0;
14815  REPLACE_READLINKAT=0;
14816  REPLACE_RMDIR=0;
14817  REPLACE_SLEEP=0;
14818  REPLACE_SYMLINK=0;
14819  REPLACE_SYMLINKAT=0;
14820  REPLACE_TRUNCATE=0;
14821  REPLACE_TTYNAME_R=0;
14822  REPLACE_UNLINK=0;
14823  REPLACE_UNLINKAT=0;
14824  REPLACE_USLEEP=0;
14825  REPLACE_WRITE=0;
14826  UNISTD_H_HAVE_SYS_RANDOM_H=0;
14827  UNISTD_H_HAVE_WINSOCK2_H=0;
14828  UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
14829
14830
14831
14832    SYS_IOCTL_H_HAVE_WINSOCK2_H=0;
14833  SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
14834
14835  REPLACE_IOCTL=0;
14836
14837{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14838printf %s "checking for C/C++ restrict keyword... " >&6; }
14839if test ${ac_cv_c_restrict+y}
14840then :
14841  printf %s "(cached) " >&6
14842else $as_nop
14843  ac_cv_c_restrict=no
14844   # Put '__restrict__' first, to avoid problems with glibc and non-GCC; see:
14845   # https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html
14846   # Put 'restrict' last, because C++ lacks it.
14847   for ac_kw in __restrict__ __restrict _Restrict restrict; do
14848     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14849/* end confdefs.h.  */
14850typedef int *int_ptr;
14851	   int foo (int_ptr $ac_kw ip) { return ip[0]; }
14852	   int bar (int [$ac_kw]); /* Catch GCC bug 14050.  */
14853	   int bar (int ip[$ac_kw]) { return ip[0]; }
14854
14855int
14856main (void)
14857{
14858int s[1];
14859	   int *$ac_kw t = s;
14860	   t[0] = 0;
14861	   return foo (t) + bar (t);
14862
14863  ;
14864  return 0;
14865}
14866_ACEOF
14867if ac_fn_c_try_compile "$LINENO"
14868then :
14869  ac_cv_c_restrict=$ac_kw
14870fi
14871rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14872     test "$ac_cv_c_restrict" != no && break
14873   done
14874
14875fi
14876{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14877printf "%s\n" "$ac_cv_c_restrict" >&6; }
14878
14879 case $ac_cv_c_restrict in
14880   restrict) ;;
14881   no) printf "%s\n" "#define restrict /**/" >>confdefs.h
14882 ;;
14883   *)  printf "%s\n" "#define restrict $ac_cv_c_restrict" >>confdefs.h
14884 ;;
14885 esac
14886
14887
14888
14889
14890
14891        case "$host_os" in
14892    osf*)
14893
14894printf "%s\n" "#define _POSIX_PII_SOCKET 1" >>confdefs.h
14895
14896      ;;
14897  esac
14898
14899  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
14900printf %s "checking whether <sys/socket.h> is self-contained... " >&6; }
14901if test ${gl_cv_header_sys_socket_h_selfcontained+y}
14902then :
14903  printf %s "(cached) " >&6
14904else $as_nop
14905
14906      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14907/* end confdefs.h.  */
14908#include <sys/socket.h>
14909int
14910main (void)
14911{
14912
14913  ;
14914  return 0;
14915}
14916_ACEOF
14917if ac_fn_c_try_compile "$LINENO"
14918then :
14919  gl_cv_header_sys_socket_h_selfcontained=yes
14920else $as_nop
14921  gl_cv_header_sys_socket_h_selfcontained=no
14922fi
14923rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14924
14925fi
14926{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
14927printf "%s\n" "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
14928  if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
14929            ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
14930if test "x$ac_cv_func_shutdown" = xyes
14931then :
14932  printf "%s\n" "#define HAVE_SHUTDOWN 1" >>confdefs.h
14933
14934fi
14935
14936    if test $ac_cv_func_shutdown = yes; then
14937      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
14938printf %s "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
14939if test ${gl_cv_header_sys_socket_h_shut+y}
14940then :
14941  printf %s "(cached) " >&6
14942else $as_nop
14943
14944          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14945/* end confdefs.h.  */
14946#include <sys/socket.h>
14947int
14948main (void)
14949{
14950int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
14951  ;
14952  return 0;
14953}
14954_ACEOF
14955if ac_fn_c_try_compile "$LINENO"
14956then :
14957  gl_cv_header_sys_socket_h_shut=yes
14958else $as_nop
14959  gl_cv_header_sys_socket_h_shut=no
14960fi
14961rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14962
14963fi
14964{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
14965printf "%s\n" "$gl_cv_header_sys_socket_h_shut" >&6; }
14966      if test $gl_cv_header_sys_socket_h_shut = no; then
14967        SYS_SOCKET_H='sys/socket.h'
14968      fi
14969    fi
14970  fi
14971  # We need to check for ws2tcpip.h now.
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983     if test $gl_cv_have_include_next = yes; then
14984       gl_cv_next_sys_socket_h='<'sys/socket.h'>'
14985     else
14986       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
14987printf %s "checking absolute name of <sys/socket.h>... " >&6; }
14988if test ${gl_cv_next_sys_socket_h+y}
14989then :
14990  printf %s "(cached) " >&6
14991else $as_nop
14992
14993             if test $ac_cv_header_sys_socket_h = yes; then
14994
14995
14996
14997
14998  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14999/* end confdefs.h.  */
15000#include <sys/socket.h>
15001_ACEOF
15002                case "$host_os" in
15003    aix*) gl_absname_cpp="$ac_cpp -C" ;;
15004    *)    gl_absname_cpp="$ac_cpp" ;;
15005  esac
15006
15007  case "$host_os" in
15008    mingw*)
15009                                          gl_dirsep_regex='[/\\]'
15010      ;;
15011    *)
15012      gl_dirsep_regex='\/'
15013      ;;
15014  esac
15015      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15016  gl_header_literal_regex=`echo 'sys/socket.h' \
15017                           | sed -e "$gl_make_literal_regex_sed"`
15018  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15019      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15020      s|^/[^/]|//&|
15021      p
15022      q
15023    }'
15024
15025        gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15026  sed -n "$gl_absolute_header_sed"`
15027
15028           gl_header=$gl_cv_absolute_sys_socket_h
15029           gl_cv_next_sys_socket_h='"'$gl_header'"'
15030          else
15031               gl_cv_next_sys_socket_h='<'sys/socket.h'>'
15032             fi
15033
15034
15035fi
15036{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
15037printf "%s\n" "$gl_cv_next_sys_socket_h" >&6; }
15038     fi
15039     NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
15040
15041     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15042       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15043       gl_next_as_first_directive='<'sys/socket.h'>'
15044     else
15045       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15046       gl_next_as_first_directive=$gl_cv_next_sys_socket_h
15047     fi
15048     NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
15049
15050
15051
15052
15053  if test $ac_cv_header_sys_socket_h = yes; then
15054    HAVE_SYS_SOCKET_H=1
15055  else
15056    HAVE_SYS_SOCKET_H=0
15057  fi
15058
15059
15060
15061  if test $ac_cv_header_sys_socket_h = yes; then
15062    HAVE_WS2TCPIP_H=0
15063  else
15064    if test $ac_cv_header_ws2tcpip_h = yes; then
15065      HAVE_WS2TCPIP_H=1
15066    else
15067      HAVE_WS2TCPIP_H=0
15068    fi
15069  fi
15070
15071
15072
15073  ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
15074  /* sys/types.h is not needed according to POSIX, but the
15075     sys/socket.h in i386-unknown-freebsd4.10 and
15076     powerpc-apple-darwin5.5 required it. */
15077#include <sys/types.h>
15078#ifdef HAVE_SYS_SOCKET_H
15079#include <sys/socket.h>
15080#endif
15081#ifdef HAVE_WS2TCPIP_H
15082#include <ws2tcpip.h>
15083#endif
15084
15085"
15086if test "x$ac_cv_type_struct_sockaddr_storage" = xyes
15087then :
15088
15089printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
15090
15091
15092fi
15093ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
15094  /* sys/types.h is not needed according to POSIX, but the
15095     sys/socket.h in i386-unknown-freebsd4.10 and
15096     powerpc-apple-darwin5.5 required it. */
15097#include <sys/types.h>
15098#ifdef HAVE_SYS_SOCKET_H
15099#include <sys/socket.h>
15100#endif
15101#ifdef HAVE_WS2TCPIP_H
15102#include <ws2tcpip.h>
15103#endif
15104
15105"
15106if test "x$ac_cv_type_sa_family_t" = xyes
15107then :
15108
15109printf "%s\n" "#define HAVE_SA_FAMILY_T 1" >>confdefs.h
15110
15111
15112fi
15113
15114  if test $ac_cv_type_struct_sockaddr_storage = no; then
15115    HAVE_STRUCT_SOCKADDR_STORAGE=0
15116  fi
15117  if test $ac_cv_type_sa_family_t = no; then
15118    HAVE_SA_FAMILY_T=0
15119  fi
15120  if test $ac_cv_type_struct_sockaddr_storage != no; then
15121    ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
15122       #ifdef HAVE_SYS_SOCKET_H
15123       #include <sys/socket.h>
15124       #endif
15125       #ifdef HAVE_WS2TCPIP_H
15126       #include <ws2tcpip.h>
15127       #endif
15128
15129"
15130if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes
15131then :
15132
15133printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1" >>confdefs.h
15134
15135
15136else $as_nop
15137  HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
15138fi
15139
15140  fi
15141  if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
15142     || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
15143    SYS_SOCKET_H='sys/socket.h'
15144  fi
15145
15146
15147
15148
15149  if test $ac_cv_header_sys_socket_h != yes; then
15150                    ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
15151if test "x$ac_cv_header_winsock2_h" = xyes
15152then :
15153  printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
15154
15155fi
15156
15157  fi
15158  if test "$ac_cv_header_winsock2_h" = yes; then
15159    HAVE_WINSOCK2_H=1
15160    UNISTD_H_HAVE_WINSOCK2_H=1
15161    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
15162  else
15163    HAVE_WINSOCK2_H=0
15164  fi
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176  GL_GNULIB_SOCKET=0
15177
15178
15179
15180  GL_GNULIB_CONNECT=0
15181
15182
15183
15184  GL_GNULIB_ACCEPT=0
15185
15186
15187
15188  GL_GNULIB_BIND=0
15189
15190
15191
15192  GL_GNULIB_GETPEERNAME=0
15193
15194
15195
15196  GL_GNULIB_GETSOCKNAME=0
15197
15198
15199
15200  GL_GNULIB_GETSOCKOPT=0
15201
15202
15203
15204  GL_GNULIB_LISTEN=0
15205
15206
15207
15208  GL_GNULIB_RECV=0
15209
15210
15211
15212  GL_GNULIB_SEND=0
15213
15214
15215
15216  GL_GNULIB_RECVFROM=0
15217
15218
15219
15220  GL_GNULIB_SENDTO=0
15221
15222
15223
15224  GL_GNULIB_SETSOCKOPT=0
15225
15226
15227
15228  GL_GNULIB_SHUTDOWN=0
15229
15230
15231
15232  GL_GNULIB_ACCEPT4=0
15233
15234
15235
15236
15237
15238  GL_GNULIB_ACCESS=0
15239
15240
15241
15242  GL_GNULIB_CHDIR=0
15243
15244
15245
15246  GL_GNULIB_CHOWN=0
15247
15248
15249
15250  GL_GNULIB_CLOSE=0
15251
15252
15253
15254  GL_GNULIB_COPY_FILE_RANGE=0
15255
15256
15257
15258  GL_GNULIB_DUP=0
15259
15260
15261
15262  GL_GNULIB_DUP2=0
15263
15264
15265
15266  GL_GNULIB_DUP3=0
15267
15268
15269
15270  GL_GNULIB_ENVIRON=0
15271
15272
15273
15274  GL_GNULIB_EUIDACCESS=0
15275
15276
15277
15278  GL_GNULIB_EXECL=0
15279
15280
15281
15282  GL_GNULIB_EXECLE=0
15283
15284
15285
15286  GL_GNULIB_EXECLP=0
15287
15288
15289
15290  GL_GNULIB_EXECV=0
15291
15292
15293
15294  GL_GNULIB_EXECVE=0
15295
15296
15297
15298  GL_GNULIB_EXECVP=0
15299
15300
15301
15302  GL_GNULIB_EXECVPE=0
15303
15304
15305
15306  GL_GNULIB_FACCESSAT=0
15307
15308
15309
15310  GL_GNULIB_FCHDIR=0
15311
15312
15313
15314  GL_GNULIB_FCHOWNAT=0
15315
15316
15317
15318  GL_GNULIB_FDATASYNC=0
15319
15320
15321
15322  GL_GNULIB_FSYNC=0
15323
15324
15325
15326  GL_GNULIB_FTRUNCATE=0
15327
15328
15329
15330  GL_GNULIB_GETCWD=0
15331
15332
15333
15334  GL_GNULIB_GETDOMAINNAME=0
15335
15336
15337
15338  GL_GNULIB_GETDTABLESIZE=0
15339
15340
15341
15342  GL_GNULIB_GETENTROPY=0
15343
15344
15345
15346  GL_GNULIB_GETGROUPS=0
15347
15348
15349
15350  GL_GNULIB_GETHOSTNAME=0
15351
15352
15353
15354  GL_GNULIB_GETLOGIN=0
15355
15356
15357
15358  GL_GNULIB_GETLOGIN_R=0
15359
15360
15361
15362  GL_GNULIB_GETOPT_POSIX=0
15363
15364
15365
15366  GL_GNULIB_GETPAGESIZE=0
15367
15368
15369
15370  GL_GNULIB_GETPASS=0
15371
15372
15373
15374  GL_GNULIB_GETUSERSHELL=0
15375
15376
15377
15378  GL_GNULIB_GROUP_MEMBER=0
15379
15380
15381
15382  GL_GNULIB_ISATTY=0
15383
15384
15385
15386  GL_GNULIB_LCHOWN=0
15387
15388
15389
15390  GL_GNULIB_LINK=0
15391
15392
15393
15394  GL_GNULIB_LINKAT=0
15395
15396
15397
15398  GL_GNULIB_LSEEK=0
15399
15400
15401
15402  GL_GNULIB_PIPE=0
15403
15404
15405
15406  GL_GNULIB_PIPE2=0
15407
15408
15409
15410  GL_GNULIB_PREAD=0
15411
15412
15413
15414  GL_GNULIB_PWRITE=0
15415
15416
15417
15418  GL_GNULIB_READ=0
15419
15420
15421
15422  GL_GNULIB_READLINK=0
15423
15424
15425
15426  GL_GNULIB_READLINKAT=0
15427
15428
15429
15430  GL_GNULIB_RMDIR=0
15431
15432
15433
15434  GL_GNULIB_SETHOSTNAME=0
15435
15436
15437
15438  GL_GNULIB_SLEEP=0
15439
15440
15441
15442  GL_GNULIB_SYMLINK=0
15443
15444
15445
15446  GL_GNULIB_SYMLINKAT=0
15447
15448
15449
15450  GL_GNULIB_TRUNCATE=0
15451
15452
15453
15454  GL_GNULIB_TTYNAME_R=0
15455
15456
15457
15458  GL_GNULIB_UNISTD_H_GETOPT=0
15459
15460
15461
15462  GL_GNULIB_UNISTD_H_NONBLOCKING=0
15463
15464
15465
15466  GL_GNULIB_UNISTD_H_SIGPIPE=0
15467
15468
15469
15470  GL_GNULIB_UNLINK=0
15471
15472
15473
15474  GL_GNULIB_UNLINKAT=0
15475
15476
15477
15478  GL_GNULIB_USLEEP=0
15479
15480
15481
15482  GL_GNULIB_WRITE=0
15483
15484
15485
15486  GL_GNULIB_MDA_ACCESS=1
15487
15488
15489
15490  GL_GNULIB_MDA_CHDIR=1
15491
15492
15493
15494  GL_GNULIB_MDA_CLOSE=1
15495
15496
15497
15498  GL_GNULIB_MDA_DUP=1
15499
15500
15501
15502  GL_GNULIB_MDA_DUP2=1
15503
15504
15505
15506  GL_GNULIB_MDA_EXECL=1
15507
15508
15509
15510  GL_GNULIB_MDA_EXECLE=1
15511
15512
15513
15514  GL_GNULIB_MDA_EXECLP=1
15515
15516
15517
15518  GL_GNULIB_MDA_EXECV=1
15519
15520
15521
15522  GL_GNULIB_MDA_EXECVE=1
15523
15524
15525
15526  GL_GNULIB_MDA_EXECVP=1
15527
15528
15529
15530  GL_GNULIB_MDA_EXECVPE=1
15531
15532
15533
15534  GL_GNULIB_MDA_GETCWD=1
15535
15536
15537
15538  GL_GNULIB_MDA_GETPID=1
15539
15540
15541
15542  GL_GNULIB_MDA_ISATTY=1
15543
15544
15545
15546  GL_GNULIB_MDA_LSEEK=1
15547
15548
15549
15550  GL_GNULIB_MDA_READ=1
15551
15552
15553
15554  GL_GNULIB_MDA_RMDIR=1
15555
15556
15557
15558  GL_GNULIB_MDA_SWAB=1
15559
15560
15561
15562  GL_GNULIB_MDA_UNLINK=1
15563
15564
15565
15566  GL_GNULIB_MDA_WRITE=1
15567
15568
15569
15570# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
15571# for constant arguments.  Useless!
15572{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
15573printf %s "checking for working alloca.h... " >&6; }
15574if test ${ac_cv_working_alloca_h+y}
15575then :
15576  printf %s "(cached) " >&6
15577else $as_nop
15578  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15579/* end confdefs.h.  */
15580#include <alloca.h>
15581int
15582main (void)
15583{
15584char *p = (char *) alloca (2 * sizeof (int));
15585			  if (p) return 0;
15586  ;
15587  return 0;
15588}
15589_ACEOF
15590if ac_fn_c_try_link "$LINENO"
15591then :
15592  ac_cv_working_alloca_h=yes
15593else $as_nop
15594  ac_cv_working_alloca_h=no
15595fi
15596rm -f core conftest.err conftest.$ac_objext conftest.beam \
15597    conftest$ac_exeext conftest.$ac_ext
15598fi
15599{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
15600printf "%s\n" "$ac_cv_working_alloca_h" >&6; }
15601if test $ac_cv_working_alloca_h = yes; then
15602
15603printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h
15604
15605fi
15606
15607{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
15608printf %s "checking for alloca... " >&6; }
15609if test ${ac_cv_func_alloca_works+y}
15610then :
15611  printf %s "(cached) " >&6
15612else $as_nop
15613  if test $ac_cv_working_alloca_h = yes; then
15614  ac_cv_func_alloca_works=yes
15615else
15616  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15617/* end confdefs.h.  */
15618#include <stdlib.h>
15619#include <stddef.h>
15620#ifndef alloca
15621# ifdef __GNUC__
15622#  define alloca __builtin_alloca
15623# elif defined _MSC_VER
15624#  include <malloc.h>
15625#  define alloca _alloca
15626# else
15627#  ifdef  __cplusplus
15628extern "C"
15629#  endif
15630void *alloca (size_t);
15631# endif
15632#endif
15633
15634int
15635main (void)
15636{
15637char *p = (char *) alloca (1);
15638				    if (p) return 0;
15639  ;
15640  return 0;
15641}
15642_ACEOF
15643if ac_fn_c_try_link "$LINENO"
15644then :
15645  ac_cv_func_alloca_works=yes
15646else $as_nop
15647  ac_cv_func_alloca_works=no
15648fi
15649rm -f core conftest.err conftest.$ac_objext conftest.beam \
15650    conftest$ac_exeext conftest.$ac_ext
15651fi
15652{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
15653printf "%s\n" "$ac_cv_func_alloca_works" >&6; }
15654fi
15655
15656if test $ac_cv_func_alloca_works = yes; then
15657
15658printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
15659
15660else
15661  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
15662# that cause trouble.  Some versions do not even contain alloca or
15663# contain a buggy version.  If you still want to use their alloca,
15664# use ar to extract alloca.o from them instead of compiling alloca.c.
15665
15666
15667
15668
15669
15670ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
15671
15672printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h
15673
15674
15675{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
15676printf %s "checking stack direction for C alloca... " >&6; }
15677if test ${ac_cv_c_stack_direction+y}
15678then :
15679  printf %s "(cached) " >&6
15680else $as_nop
15681  if test "$cross_compiling" = yes
15682then :
15683  ac_cv_c_stack_direction=0
15684else $as_nop
15685  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15686/* end confdefs.h.  */
15687$ac_includes_default
15688int
15689find_stack_direction (int *addr, int depth)
15690{
15691  int dir, dummy = 0;
15692  if (! addr)
15693    addr = &dummy;
15694  *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
15695  dir = depth ? find_stack_direction (addr, depth - 1) : 0;
15696  return dir + dummy;
15697}
15698
15699int
15700main (int argc, char **argv)
15701{
15702  return find_stack_direction (0, argc + !argv + 20) < 0;
15703}
15704_ACEOF
15705if ac_fn_c_try_run "$LINENO"
15706then :
15707  ac_cv_c_stack_direction=1
15708else $as_nop
15709  ac_cv_c_stack_direction=-1
15710fi
15711rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15712  conftest.$ac_objext conftest.beam conftest.$ac_ext
15713fi
15714
15715fi
15716{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
15717printf "%s\n" "$ac_cv_c_stack_direction" >&6; }
15718printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h
15719
15720
15721fi
15722
15723
15724    HAVE_DECL_INET_NTOP=1;
15725  HAVE_DECL_INET_PTON=1;
15726  REPLACE_INET_NTOP=0;
15727  REPLACE_INET_PTON=0;
15728
15729
15730
15731
15732
15733  if test $ac_cv_header_features_h = yes; then
15734    HAVE_FEATURES_H=1
15735  else
15736    HAVE_FEATURES_H=0
15737  fi
15738
15739
15740
15741
15742
15743
15744  if test $ac_cv_header_arpa_inet_h = yes; then
15745    HAVE_ARPA_INET_H=1
15746  else
15747    HAVE_ARPA_INET_H=0
15748  fi
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759     if test $gl_cv_have_include_next = yes; then
15760       gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
15761     else
15762       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
15763printf %s "checking absolute name of <arpa/inet.h>... " >&6; }
15764if test ${gl_cv_next_arpa_inet_h+y}
15765then :
15766  printf %s "(cached) " >&6
15767else $as_nop
15768
15769             if test $ac_cv_header_arpa_inet_h = yes; then
15770
15771
15772
15773
15774  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15775/* end confdefs.h.  */
15776#include <arpa/inet.h>
15777_ACEOF
15778                case "$host_os" in
15779    aix*) gl_absname_cpp="$ac_cpp -C" ;;
15780    *)    gl_absname_cpp="$ac_cpp" ;;
15781  esac
15782
15783  case "$host_os" in
15784    mingw*)
15785                                          gl_dirsep_regex='[/\\]'
15786      ;;
15787    *)
15788      gl_dirsep_regex='\/'
15789      ;;
15790  esac
15791      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15792  gl_header_literal_regex=`echo 'arpa/inet.h' \
15793                           | sed -e "$gl_make_literal_regex_sed"`
15794  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15795      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15796      s|^/[^/]|//&|
15797      p
15798      q
15799    }'
15800
15801        gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15802  sed -n "$gl_absolute_header_sed"`
15803
15804           gl_header=$gl_cv_absolute_arpa_inet_h
15805           gl_cv_next_arpa_inet_h='"'$gl_header'"'
15806          else
15807               gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
15808             fi
15809
15810
15811fi
15812{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
15813printf "%s\n" "$gl_cv_next_arpa_inet_h" >&6; }
15814     fi
15815     NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
15816
15817     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15818       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15819       gl_next_as_first_directive='<'arpa/inet.h'>'
15820     else
15821       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15822       gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
15823     fi
15824     NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834  if test $ac_cv_header_sys_socket_h = yes; then
15835    HAVE_WS2TCPIP_H=0
15836  else
15837    if test $ac_cv_header_ws2tcpip_h = yes; then
15838      HAVE_WS2TCPIP_H=1
15839    else
15840      HAVE_WS2TCPIP_H=0
15841    fi
15842  fi
15843
15844
15845
15846
15847
15848
15849
15850
15851
15852  GL_GNULIB_INET_NTOP=0
15853
15854
15855
15856  GL_GNULIB_INET_PTON=0
15857
15858
15859
15860
15861    HAVE_BTOWC=1;
15862  HAVE_MBSINIT=1;
15863  HAVE_MBRTOWC=1;
15864  HAVE_MBRLEN=1;
15865  HAVE_MBSRTOWCS=1;
15866  HAVE_MBSNRTOWCS=1;
15867  HAVE_WCRTOMB=1;
15868  HAVE_WCSRTOMBS=1;
15869  HAVE_WCSNRTOMBS=1;
15870  HAVE_WMEMCHR=1;
15871  HAVE_WMEMCMP=1;
15872  HAVE_WMEMCPY=1;
15873  HAVE_WMEMMOVE=1;
15874  HAVE_WMEMPCPY=1;
15875  HAVE_WMEMSET=1;
15876  HAVE_WCSLEN=1;
15877  HAVE_WCSNLEN=1;
15878  HAVE_WCSCPY=1;
15879  HAVE_WCPCPY=1;
15880  HAVE_WCSNCPY=1;
15881  HAVE_WCPNCPY=1;
15882  HAVE_WCSCAT=1;
15883  HAVE_WCSNCAT=1;
15884  HAVE_WCSCMP=1;
15885  HAVE_WCSNCMP=1;
15886  HAVE_WCSCASECMP=1;
15887  HAVE_WCSNCASECMP=1;
15888  HAVE_WCSCOLL=1;
15889  HAVE_WCSXFRM=1;
15890  HAVE_WCSDUP=1;
15891  HAVE_WCSCHR=1;
15892  HAVE_WCSRCHR=1;
15893  HAVE_WCSCSPN=1;
15894  HAVE_WCSSPN=1;
15895  HAVE_WCSPBRK=1;
15896  HAVE_WCSSTR=1;
15897  HAVE_WCSTOK=1;
15898  HAVE_WCSWIDTH=1;
15899  HAVE_WCSFTIME=1;
15900  HAVE_DECL_WCTOB=1;
15901  HAVE_DECL_WCSDUP=1;
15902  HAVE_DECL_WCWIDTH=1;
15903  REPLACE_MBSTATE_T=0;
15904  REPLACE_BTOWC=0;
15905  REPLACE_WCTOB=0;
15906  REPLACE_MBSINIT=0;
15907  REPLACE_MBRTOWC=0;
15908  REPLACE_MBRLEN=0;
15909  REPLACE_MBSRTOWCS=0;
15910  REPLACE_MBSNRTOWCS=0;
15911  REPLACE_WCRTOMB=0;
15912  REPLACE_WCSRTOMBS=0;
15913  REPLACE_WCSNRTOMBS=0;
15914  REPLACE_WCWIDTH=0;
15915  REPLACE_WCSWIDTH=0;
15916  REPLACE_WCSFTIME=0;
15917  REPLACE_WCSTOK=0;
15918
15919
15920
15921  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
15922printf %s "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
15923if test ${gl_cv_header_wchar_h_correct_inline+y}
15924then :
15925  printf %s "(cached) " >&6
15926else $as_nop
15927  gl_cv_header_wchar_h_correct_inline=yes
15928     case "$host_os" in
15929       *-gnu* | gnu*)
15930         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15931/* end confdefs.h.  */
15932
15933
15934             #define wcstod renamed_wcstod
15935             #include <wchar.h>
15936             extern int zero (void);
15937             int main () { return zero(); }
15938
15939_ACEOF
15940                                                      save_ac_compile="$ac_compile"
15941         ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
15942         if echo '#include "conftest.c"' >conftest1.c \
15943            && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
15944  (eval $ac_compile) 2>&5
15945  ac_status=$?
15946  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15947  test $ac_status = 0; }; then
15948           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15949/* end confdefs.h.  */
15950
15951
15952               #define wcstod renamed_wcstod
15953               #include <wchar.h>
15954               int zero (void) { return 0; }
15955
15956_ACEOF
15957                      ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
15958           if echo '#include "conftest.c"' >conftest2.c \
15959              && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
15960  (eval $ac_compile) 2>&5
15961  ac_status=$?
15962  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15963  test $ac_status = 0; }; then
15964             if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
15965               :
15966             else
15967               gl_cv_header_wchar_h_correct_inline=no
15968             fi
15969           fi
15970         fi
15971         ac_compile="$save_ac_compile"
15972         rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext
15973         ;;
15974     esac
15975
15976fi
15977{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
15978printf "%s\n" "$gl_cv_header_wchar_h_correct_inline" >&6; }
15979  if test $gl_cv_header_wchar_h_correct_inline = no; then
15980    as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
15981This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
15982C99 mode. You have four options:
15983  - Add the flag -fgnu89-inline to CC and reconfigure, or
15984  - Fix your include files, using parts of
15985    <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
15986  - Use a gcc version older than 4.3, or
15987  - Don't use the flags -std=c99 or -std=gnu99.
15988Configuration aborted." "$LINENO" 5
15989  fi
15990
15991ac_func=
15992for ac_item in $ac_func_c_list
15993do
15994  if test $ac_func; then
15995    ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func
15996    if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then
15997      echo "#define $ac_item 1" >> confdefs.h
15998    fi
15999    ac_func=
16000  else
16001    ac_func=$ac_item
16002  fi
16003done
16004
16005  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
16006printf %s "checking for nl_langinfo and CODESET... " >&6; }
16007if test ${am_cv_langinfo_codeset+y}
16008then :
16009  printf %s "(cached) " >&6
16010else $as_nop
16011  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16012/* end confdefs.h.  */
16013#include <langinfo.h>
16014int
16015main (void)
16016{
16017char* cs = nl_langinfo(CODESET); return !cs;
16018  ;
16019  return 0;
16020}
16021_ACEOF
16022if ac_fn_c_try_link "$LINENO"
16023then :
16024  am_cv_langinfo_codeset=yes
16025else $as_nop
16026  am_cv_langinfo_codeset=no
16027fi
16028rm -f core conftest.err conftest.$ac_objext conftest.beam \
16029    conftest$ac_exeext conftest.$ac_ext
16030
16031fi
16032{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
16033printf "%s\n" "$am_cv_langinfo_codeset" >&6; }
16034  if test $am_cv_langinfo_codeset = yes; then
16035
16036printf "%s\n" "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
16037
16038  fi
16039
16040
16041
16042
16043  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
16044printf %s "checking for a traditional french locale... " >&6; }
16045if test ${gt_cv_locale_fr+y}
16046then :
16047  printf %s "(cached) " >&6
16048else $as_nop
16049
16050    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16051/* end confdefs.h.  */
16052
16053#include <locale.h>
16054#include <time.h>
16055#if HAVE_LANGINFO_CODESET
16056# include <langinfo.h>
16057#endif
16058#include <stdlib.h>
16059#include <string.h>
16060struct tm t;
16061char buf[16];
16062int main () {
16063  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
16064     imitates locale dependent behaviour by looking at the environment
16065     variables, and all locales use the UTF-8 encoding.  */
16066#if defined __BEOS__ || defined __HAIKU__
16067  return 1;
16068#else
16069  /* Check whether the given locale name is recognized by the system.  */
16070# if defined _WIN32 && !defined __CYGWIN__
16071  /* On native Windows, setlocale(category, "") looks at the system settings,
16072     not at the environment variables.  Also, when an encoding suffix such
16073     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
16074     category of the locale to "C".  */
16075  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
16076      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
16077    return 1;
16078# else
16079  if (setlocale (LC_ALL, "") == NULL) return 1;
16080# endif
16081  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
16082     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
16083     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
16084     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
16085     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
16086     some unit tests fail.
16087     On MirBSD 10, when an unsupported locale is specified, setlocale()
16088     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
16089# if HAVE_LANGINFO_CODESET
16090  {
16091    const char *cs = nl_langinfo (CODESET);
16092    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
16093        || strcmp (cs, "UTF-8") == 0)
16094      return 1;
16095  }
16096# endif
16097# ifdef __CYGWIN__
16098  /* On Cygwin, avoid locale names without encoding suffix, because the
16099     locale_charset() function relies on the encoding suffix.  Note that
16100     LC_ALL is set on the command line.  */
16101  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
16102# endif
16103  /* Check whether in the abbreviation of the second month, the second
16104     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
16105     one byte long. This excludes the UTF-8 encoding.  */
16106  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
16107  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
16108# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
16109  /* Check whether the decimal separator is a comma.
16110     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
16111     are nl_langinfo(RADIXCHAR) are both ".".  */
16112  if (localeconv () ->decimal_point[0] != ',') return 1;
16113# endif
16114  return 0;
16115#endif
16116}
16117
16118_ACEOF
16119    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
16120  (eval $ac_link) 2>&5
16121  ac_status=$?
16122  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16123  test $ac_status = 0; } && test -s conftest$ac_exeext; then
16124      case "$host_os" in
16125        # Handle native Windows specially, because there setlocale() interprets
16126        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
16127        # "fr" or "fra" as "French" or "French_France.1252",
16128        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
16129        # "ja" as "Japanese" or "Japanese_Japan.932",
16130        # and similar.
16131        mingw*)
16132          # Test for the native Windows locale name.
16133          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16134            gt_cv_locale_fr=French_France.1252
16135          else
16136            # None found.
16137            gt_cv_locale_fr=none
16138          fi
16139          ;;
16140        *)
16141          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
16142          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
16143          # configure script would override the LC_ALL setting. Likewise for
16144          # LC_CTYPE, which is also set at the beginning of the configure script.
16145          # Test for the usual locale name.
16146          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16147            gt_cv_locale_fr=fr_FR
16148          else
16149            # Test for the locale name with explicit encoding suffix.
16150            if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16151              gt_cv_locale_fr=fr_FR.ISO-8859-1
16152            else
16153              # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
16154              if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16155                gt_cv_locale_fr=fr_FR.ISO8859-1
16156              else
16157                # Test for the HP-UX locale name.
16158                if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16159                  gt_cv_locale_fr=fr_FR.iso88591
16160                else
16161                  # Test for the Solaris 7 locale name.
16162                  if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16163                    gt_cv_locale_fr=fr
16164                  else
16165                    # None found.
16166                    gt_cv_locale_fr=none
16167                  fi
16168                fi
16169              fi
16170            fi
16171          fi
16172          ;;
16173      esac
16174    fi
16175    rm -fr conftest*
16176
16177fi
16178{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
16179printf "%s\n" "$gt_cv_locale_fr" >&6; }
16180  LOCALE_FR=$gt_cv_locale_fr
16181
16182
16183
16184
16185  GL_GNULIB_BTOWC=0
16186
16187
16188
16189  GL_GNULIB_WCTOB=0
16190
16191
16192
16193  GL_GNULIB_MBSINIT=0
16194
16195
16196
16197  GL_GNULIB_MBRTOWC=0
16198
16199
16200
16201  GL_GNULIB_MBRLEN=0
16202
16203
16204
16205  GL_GNULIB_MBSRTOWCS=0
16206
16207
16208
16209  GL_GNULIB_MBSNRTOWCS=0
16210
16211
16212
16213  GL_GNULIB_WCRTOMB=0
16214
16215
16216
16217  GL_GNULIB_WCSRTOMBS=0
16218
16219
16220
16221  GL_GNULIB_WCSNRTOMBS=0
16222
16223
16224
16225  GL_GNULIB_WCWIDTH=0
16226
16227
16228
16229  GL_GNULIB_WMEMCHR=0
16230
16231
16232
16233  GL_GNULIB_WMEMCMP=0
16234
16235
16236
16237  GL_GNULIB_WMEMCPY=0
16238
16239
16240
16241  GL_GNULIB_WMEMMOVE=0
16242
16243
16244
16245  GL_GNULIB_WMEMPCPY=0
16246
16247
16248
16249  GL_GNULIB_WMEMSET=0
16250
16251
16252
16253  GL_GNULIB_WCSLEN=0
16254
16255
16256
16257  GL_GNULIB_WCSNLEN=0
16258
16259
16260
16261  GL_GNULIB_WCSCPY=0
16262
16263
16264
16265  GL_GNULIB_WCPCPY=0
16266
16267
16268
16269  GL_GNULIB_WCSNCPY=0
16270
16271
16272
16273  GL_GNULIB_WCPNCPY=0
16274
16275
16276
16277  GL_GNULIB_WCSCAT=0
16278
16279
16280
16281  GL_GNULIB_WCSNCAT=0
16282
16283
16284
16285  GL_GNULIB_WCSCMP=0
16286
16287
16288
16289  GL_GNULIB_WCSNCMP=0
16290
16291
16292
16293  GL_GNULIB_WCSCASECMP=0
16294
16295
16296
16297  GL_GNULIB_WCSNCASECMP=0
16298
16299
16300
16301  GL_GNULIB_WCSCOLL=0
16302
16303
16304
16305  GL_GNULIB_WCSXFRM=0
16306
16307
16308
16309  GL_GNULIB_WCSDUP=0
16310
16311
16312
16313  GL_GNULIB_WCSCHR=0
16314
16315
16316
16317  GL_GNULIB_WCSRCHR=0
16318
16319
16320
16321  GL_GNULIB_WCSCSPN=0
16322
16323
16324
16325  GL_GNULIB_WCSSPN=0
16326
16327
16328
16329  GL_GNULIB_WCSPBRK=0
16330
16331
16332
16333  GL_GNULIB_WCSSTR=0
16334
16335
16336
16337  GL_GNULIB_WCSTOK=0
16338
16339
16340
16341  GL_GNULIB_WCSWIDTH=0
16342
16343
16344
16345  GL_GNULIB_WCSFTIME=0
16346
16347
16348
16349  GL_GNULIB_MDA_WCSDUP=1
16350
16351
16352
16353
16354    HAVE__EXIT=1;
16355  HAVE_ALIGNED_ALLOC=1;
16356  HAVE_ATOLL=1;
16357  HAVE_CANONICALIZE_FILE_NAME=1;
16358  HAVE_DECL_ECVT=1;
16359  HAVE_DECL_FCVT=1;
16360  HAVE_DECL_GCVT=1;
16361  HAVE_DECL_GETLOADAVG=1;
16362  HAVE_GETSUBOPT=1;
16363  HAVE_GRANTPT=1;
16364  HAVE_INITSTATE=1;
16365  HAVE_DECL_INITSTATE=1;
16366  HAVE_MBTOWC=1;
16367  HAVE_MKDTEMP=1;
16368  HAVE_MKOSTEMP=1;
16369  HAVE_MKOSTEMPS=1;
16370  HAVE_MKSTEMP=1;
16371  HAVE_MKSTEMPS=1;
16372  HAVE_POSIX_MEMALIGN=1;
16373  HAVE_POSIX_OPENPT=1;
16374  HAVE_PTSNAME=1;
16375  HAVE_PTSNAME_R=1;
16376  HAVE_QSORT_R=1;
16377  HAVE_RANDOM=1;
16378  HAVE_RANDOM_H=1;
16379  HAVE_RANDOM_R=1;
16380  HAVE_REALLOCARRAY=1;
16381  HAVE_REALPATH=1;
16382  HAVE_RPMATCH=1;
16383  HAVE_SECURE_GETENV=1;
16384  HAVE_SETENV=1;
16385  HAVE_DECL_SETENV=1;
16386  HAVE_SETSTATE=1;
16387  HAVE_DECL_SETSTATE=1;
16388  HAVE_STRTOD=1;
16389  HAVE_STRTOL=1;
16390  HAVE_STRTOLD=1;
16391  HAVE_STRTOLL=1;
16392  HAVE_STRTOUL=1;
16393  HAVE_STRTOULL=1;
16394  HAVE_STRUCT_RANDOM_DATA=1;
16395  HAVE_SYS_LOADAVG_H=0;
16396  HAVE_UNLOCKPT=1;
16397  HAVE_DECL_UNSETENV=1;
16398  REPLACE_ALIGNED_ALLOC=0;
16399  REPLACE_CALLOC=0;
16400  REPLACE_CANONICALIZE_FILE_NAME=0;
16401  REPLACE_FREE=0;
16402  REPLACE_INITSTATE=0;
16403  REPLACE_MALLOC=0;
16404  REPLACE_MBTOWC=0;
16405  REPLACE_MKSTEMP=0;
16406  REPLACE_POSIX_MEMALIGN=0;
16407  REPLACE_PTSNAME=0;
16408  REPLACE_PTSNAME_R=0;
16409  REPLACE_PUTENV=0;
16410  REPLACE_QSORT_R=0;
16411  REPLACE_RANDOM=0;
16412  REPLACE_RANDOM_R=0;
16413  REPLACE_REALLOC=0;
16414  REPLACE_REALLOCARRAY=0;
16415  REPLACE_REALPATH=0;
16416  REPLACE_SETENV=0;
16417  REPLACE_SETSTATE=0;
16418  REPLACE_STRTOD=0;
16419  REPLACE_STRTOL=0;
16420  REPLACE_STRTOLD=0;
16421  REPLACE_STRTOLL=0;
16422  REPLACE_STRTOUL=0;
16423  REPLACE_STRTOULL=0;
16424  REPLACE_UNSETENV=0;
16425  REPLACE_WCTOMB=0;
16426
16427
16428  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc is ptrdiff_t safe" >&5
16429printf %s "checking whether malloc is ptrdiff_t safe... " >&6; }
16430if test ${gl_cv_malloc_ptrdiff+y}
16431then :
16432  printf %s "(cached) " >&6
16433else $as_nop
16434  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16435/* end confdefs.h.  */
16436#include <stdint.h>
16437
16438int
16439main (void)
16440{
16441/* 64-bit ptrdiff_t is so wide that no practical platform
16442               can exceed it.  */
16443            #define WIDE_PTRDIFF (PTRDIFF_MAX >> 31 >> 31 != 0)
16444
16445            /* On rare machines where size_t fits in ptrdiff_t there
16446               is no problem.  */
16447            #define NARROW_SIZE (SIZE_MAX <= PTRDIFF_MAX)
16448
16449            /* glibc 2.30 and later malloc refuses to exceed ptrdiff_t
16450               bounds even on 32-bit platforms.  We don't know which
16451               non-glibc systems are safe.  */
16452            #define KNOWN_SAFE (2 < __GLIBC__ + (30 <= __GLIBC_MINOR__))
16453
16454            #if WIDE_PTRDIFF || NARROW_SIZE || KNOWN_SAFE
16455              return 0;
16456            #else
16457              #error "malloc might not be ptrdiff_t safe"
16458              syntax error
16459            #endif
16460
16461  ;
16462  return 0;
16463}
16464_ACEOF
16465if ac_fn_c_try_compile "$LINENO"
16466then :
16467  gl_cv_malloc_ptrdiff=yes
16468else $as_nop
16469  gl_cv_malloc_ptrdiff=no
16470fi
16471rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16472
16473fi
16474{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_malloc_ptrdiff" >&5
16475printf "%s\n" "$gl_cv_malloc_ptrdiff" >&6; }
16476
16477
16478
16479
16480  test "$gl_cv_malloc_ptrdiff" = yes || REPLACE_MALLOC=1
16481
16482
16483
16484  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc set errno on failure" >&5
16485printf %s "checking whether malloc, realloc, calloc set errno on failure... " >&6; }
16486if test ${gl_cv_func_malloc_posix+y}
16487then :
16488  printf %s "(cached) " >&6
16489else $as_nop
16490
16491                                    case "$host_os" in
16492        mingw*)
16493          gl_cv_func_malloc_posix=no ;;
16494        irix* | solaris*)
16495
16496          gl_cv_func_malloc_posix=no ;;
16497        *)
16498          gl_cv_func_malloc_posix=yes ;;
16499      esac
16500
16501fi
16502{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
16503printf "%s\n" "$gl_cv_func_malloc_posix" >&6; }
16504
16505
16506
16507
16508
16509  if test "$gl_cv_func_malloc_posix" = yes; then
16510
16511printf "%s\n" "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
16512
16513  else
16514    REPLACE_MALLOC=1
16515  fi
16516
16517
16518
16519
16520  if test $REPLACE_MALLOC = 1; then
16521    REPLACE_CALLOC=1
16522  fi
16523
16524
16525
16526  GL_GNULIB__EXIT=0
16527
16528
16529
16530  GL_GNULIB_ALIGNED_ALLOC=0
16531
16532
16533
16534  GL_GNULIB_ATOLL=0
16535
16536
16537
16538  GL_GNULIB_CALLOC_POSIX=0
16539
16540
16541
16542  GL_GNULIB_CANONICALIZE_FILE_NAME=0
16543
16544
16545
16546  GL_GNULIB_FREE_POSIX=0
16547
16548
16549
16550  GL_GNULIB_GETLOADAVG=0
16551
16552
16553
16554  GL_GNULIB_GETSUBOPT=0
16555
16556
16557
16558  GL_GNULIB_GRANTPT=0
16559
16560
16561
16562  GL_GNULIB_MALLOC_POSIX=0
16563
16564
16565
16566  GL_GNULIB_MBTOWC=0
16567
16568
16569
16570  GL_GNULIB_MKDTEMP=0
16571
16572
16573
16574  GL_GNULIB_MKOSTEMP=0
16575
16576
16577
16578  GL_GNULIB_MKOSTEMPS=0
16579
16580
16581
16582  GL_GNULIB_MKSTEMP=0
16583
16584
16585
16586  GL_GNULIB_MKSTEMPS=0
16587
16588
16589
16590  GL_GNULIB_POSIX_MEMALIGN=0
16591
16592
16593
16594  GL_GNULIB_POSIX_OPENPT=0
16595
16596
16597
16598  GL_GNULIB_PTSNAME=0
16599
16600
16601
16602  GL_GNULIB_PTSNAME_R=0
16603
16604
16605
16606  GL_GNULIB_PUTENV=0
16607
16608
16609
16610  GL_GNULIB_QSORT_R=0
16611
16612
16613
16614  GL_GNULIB_RANDOM=0
16615
16616
16617
16618  GL_GNULIB_RANDOM_R=0
16619
16620
16621
16622  GL_GNULIB_REALLOCARRAY=0
16623
16624
16625
16626  GL_GNULIB_REALLOC_POSIX=0
16627
16628
16629
16630  GL_GNULIB_REALPATH=0
16631
16632
16633
16634  GL_GNULIB_RPMATCH=0
16635
16636
16637
16638  GL_GNULIB_SECURE_GETENV=0
16639
16640
16641
16642  GL_GNULIB_SETENV=0
16643
16644
16645
16646  GL_GNULIB_STRTOD=0
16647
16648
16649
16650  GL_GNULIB_STRTOL=0
16651
16652
16653
16654  GL_GNULIB_STRTOLD=0
16655
16656
16657
16658  GL_GNULIB_STRTOLL=0
16659
16660
16661
16662  GL_GNULIB_STRTOUL=0
16663
16664
16665
16666  GL_GNULIB_STRTOULL=0
16667
16668
16669
16670  GL_GNULIB_SYSTEM_POSIX=0
16671
16672
16673
16674  GL_GNULIB_UNLOCKPT=0
16675
16676
16677
16678  GL_GNULIB_UNSETENV=0
16679
16680
16681
16682  GL_GNULIB_WCTOMB=0
16683
16684
16685
16686  GL_GNULIB_MDA_ECVT=1
16687
16688
16689
16690  GL_GNULIB_MDA_FCVT=1
16691
16692
16693
16694  GL_GNULIB_MDA_GCVT=1
16695
16696
16697
16698  GL_GNULIB_MDA_MKTEMP=1
16699
16700
16701
16702  GL_GNULIB_MDA_PUTENV=1
16703
16704
16705
16706
16707         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
16708printf %s "checking whether lstat correctly handles trailing slash... " >&6; }
16709if test ${gl_cv_func_lstat_dereferences_slashed_symlink+y}
16710then :
16711  printf %s "(cached) " >&6
16712else $as_nop
16713  rm -f conftest.sym conftest.file
16714     echo >conftest.file
16715     if test "$cross_compiling" = yes
16716then :
16717  case "$host_os" in
16718          linux-* | linux)
16719            # Guess yes on Linux systems.
16720            gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
16721          *-gnu* | gnu*)
16722            # Guess yes on glibc systems.
16723            gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
16724          mingw*)
16725            # Guess no on native Windows.
16726            gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
16727          *)
16728            # If we don't know, obey --enable-cross-guesses.
16729            gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;;
16730        esac
16731
16732else $as_nop
16733  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16734/* end confdefs.h.  */
16735$ac_includes_default
16736int
16737main (void)
16738{
16739struct stat sbuf;
16740            if (symlink ("conftest.file", "conftest.sym") != 0)
16741              return 1;
16742            /* Linux will dereference the symlink and fail, as required by
16743               POSIX.  That is better in the sense that it means we will not
16744               have to compile and use the lstat wrapper.  */
16745            return lstat ("conftest.sym/", &sbuf) == 0;
16746
16747  ;
16748  return 0;
16749}
16750_ACEOF
16751if ac_fn_c_try_run "$LINENO"
16752then :
16753  gl_cv_func_lstat_dereferences_slashed_symlink=yes
16754else $as_nop
16755  gl_cv_func_lstat_dereferences_slashed_symlink=no
16756fi
16757rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16758  conftest.$ac_objext conftest.beam conftest.$ac_ext
16759fi
16760
16761     rm -f conftest.sym conftest.file
16762
16763fi
16764{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
16765printf "%s\n" "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
16766  case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
16767    *yes)
16768
16769printf "%s\n" "#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1" >>confdefs.h
16770
16771      ;;
16772  esac
16773
16774
16775
16776
16777
16778  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
16779printf %s "checking whether // is distinct from /... " >&6; }
16780if test ${gl_cv_double_slash_root+y}
16781then :
16782  printf %s "(cached) " >&6
16783else $as_nop
16784   if test x"$cross_compiling" = xyes ; then
16785        # When cross-compiling, there is no way to tell whether // is special
16786        # short of a list of hosts.  However, the only known hosts to date
16787        # that have a distinct // are Apollo DomainOS (too old to port to),
16788        # Cygwin, and z/OS.  If anyone knows of another system for which // has
16789        # special semantics and is distinct from /, please report it to
16790        # <bug-gnulib@gnu.org>.
16791        case $host in
16792          *-cygwin | i370-ibm-openedition)
16793            gl_cv_double_slash_root=yes ;;
16794          *)
16795            # Be optimistic and assume that / and // are the same when we
16796            # don't know.
16797            gl_cv_double_slash_root='unknown, assuming no' ;;
16798        esac
16799      else
16800        set x `ls -di / // 2>/dev/null`
16801        if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
16802          gl_cv_double_slash_root=no
16803        else
16804          gl_cv_double_slash_root=yes
16805        fi
16806      fi
16807fi
16808{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
16809printf "%s\n" "$gl_cv_double_slash_root" >&6; }
16810  if test "$gl_cv_double_slash_root" = yes; then
16811
16812printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
16813
16814  fi
16815
16816
16817
16818
16819
16820     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
16821printf %s "checking whether realpath works... " >&6; }
16822if test ${gl_cv_func_realpath_works+y}
16823then :
16824  printf %s "(cached) " >&6
16825else $as_nop
16826
16827    rm -rf conftest.a conftest.d
16828    touch conftest.a
16829    # Assume that if we have lstat, we can also check symlinks.
16830    if test $ac_cv_func_lstat = yes; then
16831      ln -s conftest.a conftest.l
16832    fi
16833    mkdir conftest.d
16834    if test "$cross_compiling" = yes
16835then :
16836  case "$host_os" in
16837                       # Guess yes on glibc systems.
16838        *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
16839                       # Guess 'nearly' on musl systems.
16840        *-musl*)       gl_cv_func_realpath_works="guessing nearly" ;;
16841                       # Guess no on Cygwin.
16842        cygwin*)       gl_cv_func_realpath_works="guessing no" ;;
16843                       # Guess no on native Windows.
16844        mingw*)        gl_cv_func_realpath_works="guessing no" ;;
16845                       # If we don't know, obey --enable-cross-guesses.
16846        *)             gl_cv_func_realpath_works="$gl_cross_guess_normal" ;;
16847      esac
16848
16849else $as_nop
16850  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16851/* end confdefs.h.  */
16852
16853
16854
16855#include <stdlib.h>
16856#if defined __MACH__ && defined __APPLE__
16857/* Avoid a crash on Mac OS X.  */
16858#include <mach/mach.h>
16859#include <mach/mach_error.h>
16860#include <mach/thread_status.h>
16861#include <mach/exception.h>
16862#include <mach/task.h>
16863#include <pthread.h>
16864/* The exception port on which our thread listens.  */
16865static mach_port_t our_exception_port;
16866/* The main function of the thread listening for exceptions of type
16867   EXC_BAD_ACCESS.  */
16868static void *
16869mach_exception_thread (void *arg)
16870{
16871  /* Buffer for a message to be received.  */
16872  struct {
16873    mach_msg_header_t head;
16874    mach_msg_body_t msgh_body;
16875    char data[1024];
16876  } msg;
16877  mach_msg_return_t retval;
16878  /* Wait for a message on the exception port.  */
16879  retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
16880                     our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
16881  if (retval != MACH_MSG_SUCCESS)
16882    abort ();
16883  exit (1);
16884}
16885static void
16886nocrash_init (void)
16887{
16888  mach_port_t self = mach_task_self ();
16889  /* Allocate a port on which the thread shall listen for exceptions.  */
16890  if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
16891      == KERN_SUCCESS) {
16892    /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
16893    if (mach_port_insert_right (self, our_exception_port, our_exception_port,
16894                                MACH_MSG_TYPE_MAKE_SEND)
16895        == KERN_SUCCESS) {
16896      /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
16897         for us.  */
16898      exception_mask_t mask = EXC_MASK_BAD_ACCESS;
16899      /* Create the thread listening on the exception port.  */
16900      pthread_attr_t attr;
16901      pthread_t thread;
16902      if (pthread_attr_init (&attr) == 0
16903          && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
16904          && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
16905        pthread_attr_destroy (&attr);
16906        /* Replace the exception port info for these exceptions with our own.
16907           Note that we replace the exception port for the entire task, not only
16908           for a particular thread.  This has the effect that when our exception
16909           port gets the message, the thread specific exception port has already
16910           been asked, and we don't need to bother about it.
16911           See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
16912        task_set_exception_ports (self, mask, our_exception_port,
16913                                  EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
16914      }
16915    }
16916  }
16917}
16918#elif defined _WIN32 && ! defined __CYGWIN__
16919/* Avoid a crash on native Windows.  */
16920#define WIN32_LEAN_AND_MEAN
16921#include <windows.h>
16922#include <winerror.h>
16923static LONG WINAPI
16924exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
16925{
16926  switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
16927    {
16928    case EXCEPTION_ACCESS_VIOLATION:
16929    case EXCEPTION_IN_PAGE_ERROR:
16930    case EXCEPTION_STACK_OVERFLOW:
16931    case EXCEPTION_GUARD_PAGE:
16932    case EXCEPTION_PRIV_INSTRUCTION:
16933    case EXCEPTION_ILLEGAL_INSTRUCTION:
16934    case EXCEPTION_DATATYPE_MISALIGNMENT:
16935    case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
16936    case EXCEPTION_NONCONTINUABLE_EXCEPTION:
16937      exit (1);
16938    }
16939  return EXCEPTION_CONTINUE_SEARCH;
16940}
16941static void
16942nocrash_init (void)
16943{
16944  SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
16945}
16946#else
16947/* Avoid a crash on POSIX systems.  */
16948#include <signal.h>
16949#include <unistd.h>
16950/* A POSIX signal handler.  */
16951static void
16952exception_handler (int sig)
16953{
16954  _exit (1);
16955}
16956static void
16957nocrash_init (void)
16958{
16959#ifdef SIGSEGV
16960  signal (SIGSEGV, exception_handler);
16961#endif
16962#ifdef SIGBUS
16963  signal (SIGBUS, exception_handler);
16964#endif
16965}
16966#endif
16967
16968        #include <errno.h>
16969        #include <stdlib.h>
16970        #include <string.h>
16971
16972int
16973main (void)
16974{
16975
16976        int result = 0;
16977        /* This test fails on Solaris 10.  */
16978        {
16979          char *name = realpath ("conftest.a", NULL);
16980          if (!(name && *name == '/'))
16981            result |= 1;
16982          free (name);
16983        }
16984        /* This test fails on older versions of Cygwin.  */
16985        {
16986          char *name = realpath ("conftest.b/../conftest.a", NULL);
16987          if (name != NULL)
16988            result |= 2;
16989          free (name);
16990        }
16991        /* This test fails on Cygwin 2.9.  */
16992        #if HAVE_LSTAT
16993        {
16994          char *name = realpath ("conftest.l/../conftest.a", NULL);
16995          if (name != NULL || errno != ENOTDIR)
16996            result |= 4;
16997          free (name);
16998        }
16999        #endif
17000        /* This test fails on Mac OS X 10.13, OpenBSD 6.0.  */
17001        {
17002          char *name = realpath ("conftest.a/", NULL);
17003          if (name != NULL)
17004            result |= 8;
17005          free (name);
17006        }
17007        /* This test fails on AIX 7, Solaris 10.  */
17008        {
17009          char *name1 = realpath (".", NULL);
17010          char *name2 = realpath ("conftest.d//./..", NULL);
17011          if (! name1 || ! name2 || strcmp (name1, name2))
17012            result |= 16;
17013          free (name1);
17014          free (name2);
17015        }
17016        #ifdef __linux__
17017        /* On Linux, // is the same as /. See also double-slash-root.m4.
17018           realpath() should respect this.
17019           This test fails on musl libc 1.2.2.  */
17020        {
17021          char *name = realpath ("//", NULL);
17022          if (! name || strcmp (name, "/"))
17023            result |= 32;
17024          free (name);
17025        }
17026        #endif
17027        return result;
17028
17029  ;
17030  return 0;
17031}
17032
17033_ACEOF
17034if ac_fn_c_try_run "$LINENO"
17035then :
17036  gl_cv_func_realpath_works=yes
17037else $as_nop
17038  case $? in
17039        32) gl_cv_func_realpath_works=nearly ;;
17040        *)  gl_cv_func_realpath_works=no ;;
17041      esac
17042
17043fi
17044rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17045  conftest.$ac_objext conftest.beam conftest.$ac_ext
17046fi
17047
17048    rm -rf conftest.a conftest.l conftest.d
17049
17050fi
17051{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
17052printf "%s\n" "$gl_cv_func_realpath_works" >&6; }
17053  case "$gl_cv_func_realpath_works" in
17054    *yes)
17055
17056printf "%s\n" "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
17057
17058      ;;
17059    *nearly)
17060
17061printf "%s\n" "#define FUNC_REALPATH_NEARLY_WORKS 1" >>confdefs.h
17062
17063      ;;
17064  esac
17065
17066
17067
17068
17069
17070
17071
17072
17073  case "$host_os" in
17074    mingw*) ;;
17075    *)      ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
17076if test "x$ac_cv_func_getcwd" = xyes
17077then :
17078  printf "%s\n" "#define HAVE_GETCWD 1" >>confdefs.h
17079
17080fi
17081 ;;
17082  esac
17083
17084
17085
17086
17087
17088
17089
17090
17091
17092
17093
17094  if test $ac_cv_func__set_invalid_parameter_handler = yes; then
17095    HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
17096
17097printf "%s\n" "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
17098
17099  else
17100    HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
17101  fi
17102
17103
17104
17105
17106    HAVE_OPENDIR=1;
17107  HAVE_READDIR=1;
17108  HAVE_REWINDDIR=1;
17109  HAVE_CLOSEDIR=1;
17110  HAVE_DECL_DIRFD=1;
17111  HAVE_DECL_FDOPENDIR=1;
17112  HAVE_FDOPENDIR=1;
17113  HAVE_SCANDIR=1;
17114  HAVE_ALPHASORT=1;
17115  REPLACE_OPENDIR=0;
17116  REPLACE_CLOSEDIR=0;
17117  REPLACE_DIRFD=0;
17118  REPLACE_FDOPENDIR=0;
17119
17120
17121
17122
17123
17124
17125
17126  GL_GNULIB_OPENDIR=0
17127
17128
17129
17130  GL_GNULIB_READDIR=0
17131
17132
17133
17134  GL_GNULIB_REWINDDIR=0
17135
17136
17137
17138  GL_GNULIB_CLOSEDIR=0
17139
17140
17141
17142  GL_GNULIB_DIRFD=0
17143
17144
17145
17146  GL_GNULIB_FDOPENDIR=0
17147
17148
17149
17150  GL_GNULIB_SCANDIR=0
17151
17152
17153
17154  GL_GNULIB_ALPHASORT=0
17155
17156
17157
17158
17159
17160
17161
17162    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether linux/if_alg.h has struct sockaddr_alg." >&5
17163printf %s "checking whether linux/if_alg.h has struct sockaddr_alg.... " >&6; }
17164if test ${gl_cv_header_linux_if_alg_salg+y}
17165then :
17166  printf %s "(cached) " >&6
17167else $as_nop
17168  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17169/* end confdefs.h.  */
17170#include <sys/socket.h>
17171                          #include <linux/if_alg.h>
17172                          struct sockaddr_alg salg = {
17173                            .salg_family = AF_ALG,
17174                            .salg_type = "hash",
17175                            .salg_name = "sha1",
17176                          };
17177int
17178main (void)
17179{
17180
17181  ;
17182  return 0;
17183}
17184_ACEOF
17185if ac_fn_c_try_compile "$LINENO"
17186then :
17187  gl_cv_header_linux_if_alg_salg=yes
17188else $as_nop
17189  gl_cv_header_linux_if_alg_salg=no
17190fi
17191rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17192fi
17193{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_linux_if_alg_salg" >&5
17194printf "%s\n" "$gl_cv_header_linux_if_alg_salg" >&6; }
17195  if test "$gl_cv_header_linux_if_alg_salg" = yes; then
17196
17197printf "%s\n" "#define HAVE_LINUX_IF_ALG_H 1" >>confdefs.h
17198
17199  fi
17200
17201        use_af_alg=no
17202
17203# Check whether --with-linux-crypto was given.
17204if test ${with_linux_crypto+y}
17205then :
17206  withval=$with_linux_crypto; use_af_alg=$withval
17207else $as_nop
17208  use_af_alg=no
17209fi
17210
17211    if test "$gl_cv_header_linux_if_alg_salg" != yes; then
17212    if test "$use_af_alg" != no; then
17213      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Linux kernel cryptographic API not found" >&5
17214printf "%s\n" "$as_me: WARNING: Linux kernel cryptographic API not found" >&2;}
17215    fi
17216    use_af_alg=no
17217  fi
17218
17219  if test "$use_af_alg" != no; then
17220    USE_AF_ALG=1
17221  else
17222    USE_AF_ALG=0
17223  fi
17224
17225printf "%s\n" "#define USE_LINUX_CRYPTO_API $USE_AF_ALG" >>confdefs.h
17226
17227
17228
17229   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
17230printf %s "checking whether byte ordering is bigendian... " >&6; }
17231if test ${ac_cv_c_bigendian+y}
17232then :
17233  printf %s "(cached) " >&6
17234else $as_nop
17235  ac_cv_c_bigendian=unknown
17236    # See if we're dealing with a universal compiler.
17237    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17238/* end confdefs.h.  */
17239#ifndef __APPLE_CC__
17240	       not a universal capable compiler
17241	     #endif
17242	     typedef int dummy;
17243
17244_ACEOF
17245if ac_fn_c_try_compile "$LINENO"
17246then :
17247
17248	# Check for potential -arch flags.  It is not universal unless
17249	# there are at least two -arch flags with different values.
17250	ac_arch=
17251	ac_prev=
17252	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
17253	 if test -n "$ac_prev"; then
17254	   case $ac_word in
17255	     i?86 | x86_64 | ppc | ppc64)
17256	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
17257		 ac_arch=$ac_word
17258	       else
17259		 ac_cv_c_bigendian=universal
17260		 break
17261	       fi
17262	       ;;
17263	   esac
17264	   ac_prev=
17265	 elif test "x$ac_word" = "x-arch"; then
17266	   ac_prev=arch
17267	 fi
17268       done
17269fi
17270rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17271    if test $ac_cv_c_bigendian = unknown; then
17272      # See if sys/param.h defines the BYTE_ORDER macro.
17273      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17274/* end confdefs.h.  */
17275#include <sys/types.h>
17276	     #include <sys/param.h>
17277
17278int
17279main (void)
17280{
17281#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
17282		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
17283		     && LITTLE_ENDIAN)
17284	      bogus endian macros
17285	     #endif
17286
17287  ;
17288  return 0;
17289}
17290_ACEOF
17291if ac_fn_c_try_compile "$LINENO"
17292then :
17293  # It does; now see whether it defined to BIG_ENDIAN or not.
17294	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17295/* end confdefs.h.  */
17296#include <sys/types.h>
17297		#include <sys/param.h>
17298
17299int
17300main (void)
17301{
17302#if BYTE_ORDER != BIG_ENDIAN
17303		 not big endian
17304		#endif
17305
17306  ;
17307  return 0;
17308}
17309_ACEOF
17310if ac_fn_c_try_compile "$LINENO"
17311then :
17312  ac_cv_c_bigendian=yes
17313else $as_nop
17314  ac_cv_c_bigendian=no
17315fi
17316rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17317fi
17318rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17319    fi
17320    if test $ac_cv_c_bigendian = unknown; then
17321      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
17322      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17323/* end confdefs.h.  */
17324#include <limits.h>
17325
17326int
17327main (void)
17328{
17329#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
17330	      bogus endian macros
17331	     #endif
17332
17333  ;
17334  return 0;
17335}
17336_ACEOF
17337if ac_fn_c_try_compile "$LINENO"
17338then :
17339  # It does; now see whether it defined to _BIG_ENDIAN or not.
17340	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17341/* end confdefs.h.  */
17342#include <limits.h>
17343
17344int
17345main (void)
17346{
17347#ifndef _BIG_ENDIAN
17348		 not big endian
17349		#endif
17350
17351  ;
17352  return 0;
17353}
17354_ACEOF
17355if ac_fn_c_try_compile "$LINENO"
17356then :
17357  ac_cv_c_bigendian=yes
17358else $as_nop
17359  ac_cv_c_bigendian=no
17360fi
17361rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17362fi
17363rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17364    fi
17365    if test $ac_cv_c_bigendian = unknown; then
17366      # Compile a test program.
17367      if test "$cross_compiling" = yes
17368then :
17369  # Try to guess by grepping values from an object file.
17370	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17371/* end confdefs.h.  */
17372unsigned short int ascii_mm[] =
17373		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
17374		unsigned short int ascii_ii[] =
17375		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
17376		int use_ascii (int i) {
17377		  return ascii_mm[i] + ascii_ii[i];
17378		}
17379		unsigned short int ebcdic_ii[] =
17380		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
17381		unsigned short int ebcdic_mm[] =
17382		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
17383		int use_ebcdic (int i) {
17384		  return ebcdic_mm[i] + ebcdic_ii[i];
17385		}
17386		extern int foo;
17387
17388int
17389main (void)
17390{
17391return use_ascii (foo) == use_ebcdic (foo);
17392  ;
17393  return 0;
17394}
17395_ACEOF
17396if ac_fn_c_try_compile "$LINENO"
17397then :
17398  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
17399	      ac_cv_c_bigendian=yes
17400	    fi
17401	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
17402	      if test "$ac_cv_c_bigendian" = unknown; then
17403		ac_cv_c_bigendian=no
17404	      else
17405		# finding both strings is unlikely to happen, but who knows?
17406		ac_cv_c_bigendian=unknown
17407	      fi
17408	    fi
17409fi
17410rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17411else $as_nop
17412  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17413/* end confdefs.h.  */
17414$ac_includes_default
17415int
17416main (void)
17417{
17418
17419	     /* Are we little or big endian?  From Harbison&Steele.  */
17420	     union
17421	     {
17422	       long int l;
17423	       char c[sizeof (long int)];
17424	     } u;
17425	     u.l = 1;
17426	     return u.c[sizeof (long int) - 1] == 1;
17427
17428  ;
17429  return 0;
17430}
17431_ACEOF
17432if ac_fn_c_try_run "$LINENO"
17433then :
17434  ac_cv_c_bigendian=no
17435else $as_nop
17436  ac_cv_c_bigendian=yes
17437fi
17438rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17439  conftest.$ac_objext conftest.beam conftest.$ac_ext
17440fi
17441
17442    fi
17443fi
17444{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
17445printf "%s\n" "$ac_cv_c_bigendian" >&6; }
17446 case $ac_cv_c_bigendian in #(
17447   yes)
17448     printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
17449;; #(
17450   no)
17451      ;; #(
17452   universal)
17453
17454printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
17455
17456     ;; #(
17457   *)
17458     as_fn_error $? "unknown endianness
17459 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
17460 esac
17461
17462
17463
17464    HAVE_ISBLANK=1;
17465
17466
17467
17468
17469
17470
17471
17472
17473
17474
17475
17476
17477     if test $gl_cv_have_include_next = yes; then
17478       gl_cv_next_ctype_h='<'ctype.h'>'
17479     else
17480       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5
17481printf %s "checking absolute name of <ctype.h>... " >&6; }
17482if test ${gl_cv_next_ctype_h+y}
17483then :
17484  printf %s "(cached) " >&6
17485else $as_nop
17486
17487
17488
17489  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17490/* end confdefs.h.  */
17491#include <ctype.h>
17492_ACEOF
17493                case "$host_os" in
17494    aix*) gl_absname_cpp="$ac_cpp -C" ;;
17495    *)    gl_absname_cpp="$ac_cpp" ;;
17496  esac
17497
17498  case "$host_os" in
17499    mingw*)
17500                                          gl_dirsep_regex='[/\\]'
17501      ;;
17502    *)
17503      gl_dirsep_regex='\/'
17504      ;;
17505  esac
17506      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17507  gl_header_literal_regex=`echo 'ctype.h' \
17508                           | sed -e "$gl_make_literal_regex_sed"`
17509  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17510      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17511      s|^/[^/]|//&|
17512      p
17513      q
17514    }'
17515
17516        gl_cv_absolute_ctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17517  sed -n "$gl_absolute_header_sed"`
17518
17519           gl_header=$gl_cv_absolute_ctype_h
17520           gl_cv_next_ctype_h='"'$gl_header'"'
17521
17522
17523fi
17524{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5
17525printf "%s\n" "$gl_cv_next_ctype_h" >&6; }
17526     fi
17527     NEXT_CTYPE_H=$gl_cv_next_ctype_h
17528
17529     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17530       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17531       gl_next_as_first_directive='<'ctype.h'>'
17532     else
17533       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17534       gl_next_as_first_directive=$gl_cv_next_ctype_h
17535     fi
17536     NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive
17537
17538
17539
17540
17541
17542
17543
17544
17545
17546
17547
17548  GL_GNULIB_ISBLANK=0
17549
17550
17551
17552
17553
17554
17555
17556
17557
17558
17559
17560
17561
17562
17563
17564
17565     if test $gl_cv_have_include_next = yes; then
17566       gl_cv_next_dirent_h='<'dirent.h'>'
17567     else
17568       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
17569printf %s "checking absolute name of <dirent.h>... " >&6; }
17570if test ${gl_cv_next_dirent_h+y}
17571then :
17572  printf %s "(cached) " >&6
17573else $as_nop
17574
17575             if test $ac_cv_header_dirent_h = yes; then
17576
17577
17578
17579
17580  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17581/* end confdefs.h.  */
17582#include <dirent.h>
17583_ACEOF
17584                case "$host_os" in
17585    aix*) gl_absname_cpp="$ac_cpp -C" ;;
17586    *)    gl_absname_cpp="$ac_cpp" ;;
17587  esac
17588
17589  case "$host_os" in
17590    mingw*)
17591                                          gl_dirsep_regex='[/\\]'
17592      ;;
17593    *)
17594      gl_dirsep_regex='\/'
17595      ;;
17596  esac
17597      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17598  gl_header_literal_regex=`echo 'dirent.h' \
17599                           | sed -e "$gl_make_literal_regex_sed"`
17600  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17601      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17602      s|^/[^/]|//&|
17603      p
17604      q
17605    }'
17606
17607        gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17608  sed -n "$gl_absolute_header_sed"`
17609
17610           gl_header=$gl_cv_absolute_dirent_h
17611           gl_cv_next_dirent_h='"'$gl_header'"'
17612          else
17613               gl_cv_next_dirent_h='<'dirent.h'>'
17614             fi
17615
17616
17617fi
17618{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
17619printf "%s\n" "$gl_cv_next_dirent_h" >&6; }
17620     fi
17621     NEXT_DIRENT_H=$gl_cv_next_dirent_h
17622
17623     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17624       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17625       gl_next_as_first_directive='<'dirent.h'>'
17626     else
17627       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17628       gl_next_as_first_directive=$gl_cv_next_dirent_h
17629     fi
17630     NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
17631
17632
17633
17634
17635  if test $ac_cv_header_dirent_h = yes; then
17636    HAVE_DIRENT_H=1
17637  else
17638    HAVE_DIRENT_H=0
17639  fi
17640
17641
17642
17643
17644
17645
17646gl_mda_defines='
17647#if defined _WIN32 && !defined __CYGWIN__
17648#define access    _access
17649#define chdir     _chdir
17650#define chmod     _chmod
17651#define close     _close
17652#define creat     _creat
17653#define dup       _dup
17654#define dup2      _dup2
17655#define ecvt      _ecvt
17656#define execl     _execl
17657#define execle    _execle
17658#define execlp    _execlp
17659#define execv     _execv
17660#define execve    _execve
17661#define execvp    _execvp
17662#define execvpe   _execvpe
17663#define fcloseall _fcloseall
17664#define fcvt      _fcvt
17665#define fdopen    _fdopen
17666#define fileno    _fileno
17667#define gcvt      _gcvt
17668#define getcwd    _getcwd
17669#define getpid    _getpid
17670#define getw      _getw
17671#define isatty    _isatty
17672#define j0        _j0
17673#define j1        _j1
17674#define jn        _jn
17675#define lfind     _lfind
17676#define lsearch   _lsearch
17677#define lseek     _lseek
17678#define memccpy   _memccpy
17679#define mkdir     _mkdir
17680#define mktemp    _mktemp
17681#define open      _open
17682#define putenv    _putenv
17683#define putw      _putw
17684#define read      _read
17685#define rmdir     _rmdir
17686#define strdup    _strdup
17687#define swab      _swab
17688#define tempnam   _tempnam
17689#define tzset     _tzset
17690#define umask     _umask
17691#define unlink    _unlink
17692#define utime     _utime
17693#define wcsdup    _wcsdup
17694#define write     _write
17695#define y0        _y0
17696#define y1        _y1
17697#define yn        _yn
17698#endif
17699'
17700
17701
17702
17703
17704
17705
17706
17707
17708  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
17709printf %s "checking if environ is properly declared... " >&6; }
17710if test ${gt_cv_var_environ_declaration+y}
17711then :
17712  printf %s "(cached) " >&6
17713else $as_nop
17714  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17715/* end confdefs.h.  */
17716#if HAVE_UNISTD_H
17717     #include <unistd.h>
17718     #endif
17719     /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>.  */
17720     #include <stdlib.h>
17721
17722            typedef struct { int foo; } foo_t;
17723            extern foo_t environ;
17724int
17725main (void)
17726{
17727environ.foo = 1;
17728  ;
17729  return 0;
17730}
17731_ACEOF
17732if ac_fn_c_try_compile "$LINENO"
17733then :
17734  gt_cv_var_environ_declaration=no
17735else $as_nop
17736  gt_cv_var_environ_declaration=yes
17737fi
17738rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17739fi
17740{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
17741printf "%s\n" "$gt_cv_var_environ_declaration" >&6; }
17742  if test $gt_cv_var_environ_declaration = yes; then
17743
17744printf "%s\n" "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
17745
17746  fi
17747
17748
17749  if test $gt_cv_var_environ_declaration != yes; then
17750    HAVE_DECL_ENVIRON=0
17751  fi
17752
17753
17754
17755  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
17756printf %s "checking for complete errno.h... " >&6; }
17757if test ${gl_cv_header_errno_h_complete+y}
17758then :
17759  printf %s "(cached) " >&6
17760else $as_nop
17761
17762    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17763/* end confdefs.h.  */
17764
17765#include <errno.h>
17766#if !defined ETXTBSY
17767booboo
17768#endif
17769#if !defined ENOMSG
17770booboo
17771#endif
17772#if !defined EIDRM
17773booboo
17774#endif
17775#if !defined ENOLINK
17776booboo
17777#endif
17778#if !defined EPROTO
17779booboo
17780#endif
17781#if !defined EMULTIHOP
17782booboo
17783#endif
17784#if !defined EBADMSG
17785booboo
17786#endif
17787#if !defined EOVERFLOW
17788booboo
17789#endif
17790#if !defined ENOTSUP
17791booboo
17792#endif
17793#if !defined ENETRESET
17794booboo
17795#endif
17796#if !defined ECONNABORTED
17797booboo
17798#endif
17799#if !defined ESTALE
17800booboo
17801#endif
17802#if !defined EDQUOT
17803booboo
17804#endif
17805#if !defined ECANCELED
17806booboo
17807#endif
17808#if !defined EOWNERDEAD
17809booboo
17810#endif
17811#if !defined ENOTRECOVERABLE
17812booboo
17813#endif
17814#if !defined EILSEQ
17815booboo
17816#endif
17817
17818_ACEOF
17819if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17820  $EGREP "booboo" >/dev/null 2>&1
17821then :
17822  gl_cv_header_errno_h_complete=no
17823else $as_nop
17824  gl_cv_header_errno_h_complete=yes
17825fi
17826rm -rf conftest*
17827
17828
17829fi
17830{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
17831printf "%s\n" "$gl_cv_header_errno_h_complete" >&6; }
17832  if test $gl_cv_header_errno_h_complete = yes; then
17833    ERRNO_H=''
17834  else
17835
17836
17837
17838
17839
17840
17841
17842
17843     if test $gl_cv_have_include_next = yes; then
17844       gl_cv_next_errno_h='<'errno.h'>'
17845     else
17846       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
17847printf %s "checking absolute name of <errno.h>... " >&6; }
17848if test ${gl_cv_next_errno_h+y}
17849then :
17850  printf %s "(cached) " >&6
17851else $as_nop
17852
17853
17854
17855  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17856/* end confdefs.h.  */
17857#include <errno.h>
17858_ACEOF
17859                case "$host_os" in
17860    aix*) gl_absname_cpp="$ac_cpp -C" ;;
17861    *)    gl_absname_cpp="$ac_cpp" ;;
17862  esac
17863
17864  case "$host_os" in
17865    mingw*)
17866                                          gl_dirsep_regex='[/\\]'
17867      ;;
17868    *)
17869      gl_dirsep_regex='\/'
17870      ;;
17871  esac
17872      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17873  gl_header_literal_regex=`echo 'errno.h' \
17874                           | sed -e "$gl_make_literal_regex_sed"`
17875  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17876      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17877      s|^/[^/]|//&|
17878      p
17879      q
17880    }'
17881
17882        gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17883  sed -n "$gl_absolute_header_sed"`
17884
17885           gl_header=$gl_cv_absolute_errno_h
17886           gl_cv_next_errno_h='"'$gl_header'"'
17887
17888
17889fi
17890{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
17891printf "%s\n" "$gl_cv_next_errno_h" >&6; }
17892     fi
17893     NEXT_ERRNO_H=$gl_cv_next_errno_h
17894
17895     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17896       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17897       gl_next_as_first_directive='<'errno.h'>'
17898     else
17899       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17900       gl_next_as_first_directive=$gl_cv_next_errno_h
17901     fi
17902     NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
17903
17904
17905
17906
17907    ERRNO_H='errno.h'
17908  fi
17909
17910   if test -n "$ERRNO_H"; then
17911  GL_GENERATE_ERRNO_H_TRUE=
17912  GL_GENERATE_ERRNO_H_FALSE='#'
17913else
17914  GL_GENERATE_ERRNO_H_TRUE='#'
17915  GL_GENERATE_ERRNO_H_FALSE=
17916fi
17917
17918
17919  if test -n "$ERRNO_H"; then
17920    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
17921printf %s "checking for EMULTIHOP value... " >&6; }
17922if test ${gl_cv_header_errno_h_EMULTIHOP+y}
17923then :
17924  printf %s "(cached) " >&6
17925else $as_nop
17926
17927      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17928/* end confdefs.h.  */
17929
17930#include <errno.h>
17931#ifdef EMULTIHOP
17932yes
17933#endif
17934
17935_ACEOF
17936if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17937  $EGREP "yes" >/dev/null 2>&1
17938then :
17939  gl_cv_header_errno_h_EMULTIHOP=yes
17940else $as_nop
17941  gl_cv_header_errno_h_EMULTIHOP=no
17942fi
17943rm -rf conftest*
17944
17945      if test $gl_cv_header_errno_h_EMULTIHOP = no; then
17946        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17947/* end confdefs.h.  */
17948
17949#define _XOPEN_SOURCE_EXTENDED 1
17950#include <errno.h>
17951#ifdef EMULTIHOP
17952yes
17953#endif
17954
17955_ACEOF
17956if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17957  $EGREP "yes" >/dev/null 2>&1
17958then :
17959  gl_cv_header_errno_h_EMULTIHOP=hidden
17960fi
17961rm -rf conftest*
17962
17963        if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
17964                              if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP"        "
17965#define _XOPEN_SOURCE_EXTENDED 1
17966#include <errno.h>
17967/* The following two lines are a workaround against an autoconf-2.52 bug.  */
17968#include <stdio.h>
17969#include <stdlib.h>
17970"
17971then :
17972
17973fi
17974
17975        fi
17976      fi
17977
17978fi
17979{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
17980printf "%s\n" "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
17981    case $gl_cv_header_errno_h_EMULTIHOP in
17982      yes | no)
17983        EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
17984        ;;
17985      *)
17986        EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
17987        ;;
17988    esac
17989
17990
17991  fi
17992
17993
17994  if test -n "$ERRNO_H"; then
17995    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
17996printf %s "checking for ENOLINK value... " >&6; }
17997if test ${gl_cv_header_errno_h_ENOLINK+y}
17998then :
17999  printf %s "(cached) " >&6
18000else $as_nop
18001
18002      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18003/* end confdefs.h.  */
18004
18005#include <errno.h>
18006#ifdef ENOLINK
18007yes
18008#endif
18009
18010_ACEOF
18011if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18012  $EGREP "yes" >/dev/null 2>&1
18013then :
18014  gl_cv_header_errno_h_ENOLINK=yes
18015else $as_nop
18016  gl_cv_header_errno_h_ENOLINK=no
18017fi
18018rm -rf conftest*
18019
18020      if test $gl_cv_header_errno_h_ENOLINK = no; then
18021        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18022/* end confdefs.h.  */
18023
18024#define _XOPEN_SOURCE_EXTENDED 1
18025#include <errno.h>
18026#ifdef ENOLINK
18027yes
18028#endif
18029
18030_ACEOF
18031if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18032  $EGREP "yes" >/dev/null 2>&1
18033then :
18034  gl_cv_header_errno_h_ENOLINK=hidden
18035fi
18036rm -rf conftest*
18037
18038        if test $gl_cv_header_errno_h_ENOLINK = hidden; then
18039                              if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK"        "
18040#define _XOPEN_SOURCE_EXTENDED 1
18041#include <errno.h>
18042/* The following two lines are a workaround against an autoconf-2.52 bug.  */
18043#include <stdio.h>
18044#include <stdlib.h>
18045"
18046then :
18047
18048fi
18049
18050        fi
18051      fi
18052
18053fi
18054{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
18055printf "%s\n" "$gl_cv_header_errno_h_ENOLINK" >&6; }
18056    case $gl_cv_header_errno_h_ENOLINK in
18057      yes | no)
18058        ENOLINK_HIDDEN=0; ENOLINK_VALUE=
18059        ;;
18060      *)
18061        ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
18062        ;;
18063    esac
18064
18065
18066  fi
18067
18068
18069  if test -n "$ERRNO_H"; then
18070    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
18071printf %s "checking for EOVERFLOW value... " >&6; }
18072if test ${gl_cv_header_errno_h_EOVERFLOW+y}
18073then :
18074  printf %s "(cached) " >&6
18075else $as_nop
18076
18077      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18078/* end confdefs.h.  */
18079
18080#include <errno.h>
18081#ifdef EOVERFLOW
18082yes
18083#endif
18084
18085_ACEOF
18086if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18087  $EGREP "yes" >/dev/null 2>&1
18088then :
18089  gl_cv_header_errno_h_EOVERFLOW=yes
18090else $as_nop
18091  gl_cv_header_errno_h_EOVERFLOW=no
18092fi
18093rm -rf conftest*
18094
18095      if test $gl_cv_header_errno_h_EOVERFLOW = no; then
18096        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18097/* end confdefs.h.  */
18098
18099#define _XOPEN_SOURCE_EXTENDED 1
18100#include <errno.h>
18101#ifdef EOVERFLOW
18102yes
18103#endif
18104
18105_ACEOF
18106if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18107  $EGREP "yes" >/dev/null 2>&1
18108then :
18109  gl_cv_header_errno_h_EOVERFLOW=hidden
18110fi
18111rm -rf conftest*
18112
18113        if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
18114                              if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW"        "
18115#define _XOPEN_SOURCE_EXTENDED 1
18116#include <errno.h>
18117/* The following two lines are a workaround against an autoconf-2.52 bug.  */
18118#include <stdio.h>
18119#include <stdlib.h>
18120"
18121then :
18122
18123fi
18124
18125        fi
18126      fi
18127
18128fi
18129{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
18130printf "%s\n" "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
18131    case $gl_cv_header_errno_h_EOVERFLOW in
18132      yes | no)
18133        EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
18134        ;;
18135      *)
18136        EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
18137        ;;
18138    esac
18139
18140
18141  fi
18142
18143
18144ac_fn_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
18145if test "x$ac_cv_have_decl_strerror_r" = xyes
18146then :
18147  ac_have_decl=1
18148else $as_nop
18149  ac_have_decl=0
18150fi
18151printf "%s\n" "#define HAVE_DECL_STRERROR_R $ac_have_decl" >>confdefs.h
18152
18153
18154if test $ac_cv_have_decl_strerror_r = yes; then
18155  # For backward compatibility's sake, define HAVE_STRERROR_R.
18156  # (We used to run AC_CHECK_FUNCS_ONCE for strerror_r, as well
18157  # as AC_CHECK_DECLS_ONCE.)
18158
18159printf "%s\n" "#define HAVE_STRERROR_R 1" >>confdefs.h
18160
18161fi
18162
18163{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
18164printf %s "checking whether strerror_r returns char *... " >&6; }
18165if test ${ac_cv_func_strerror_r_char_p+y}
18166then :
18167  printf %s "(cached) " >&6
18168else $as_nop
18169
18170    ac_cv_func_strerror_r_char_p=no
18171    if test $ac_cv_have_decl_strerror_r = yes; then
18172      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18173/* end confdefs.h.  */
18174#include <string.h>
18175int
18176main (void)
18177{
18178
18179	  char buf[100];
18180	  char x = *strerror_r (0, buf, sizeof buf);
18181	  char *p = strerror_r (0, buf, sizeof buf);
18182	  return !p || x;
18183
18184  ;
18185  return 0;
18186}
18187_ACEOF
18188if ac_fn_c_try_compile "$LINENO"
18189then :
18190  ac_cv_func_strerror_r_char_p=yes
18191fi
18192rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18193
18194    fi
18195
18196fi
18197{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
18198printf "%s\n" "$ac_cv_func_strerror_r_char_p" >&6; }
18199if test $ac_cv_func_strerror_r_char_p = yes; then
18200
18201printf "%s\n" "#define STRERROR_R_CHAR_P 1" >>confdefs.h
18202
18203fi
18204
18205
18206  XGETTEXT_EXTRA_OPTIONS=
18207
18208
18209
18210
18211
18212  ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
18213"
18214if test "x$ac_cv_type_sig_atomic_t" = xyes
18215then :
18216
18217printf "%s\n" "#define HAVE_SIG_ATOMIC_T 1" >>confdefs.h
18218
18219
18220else $as_nop
18221
18222printf "%s\n" "#define sig_atomic_t int" >>confdefs.h
18223
18224fi
18225
18226
18227ac_fn_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
18228if test "x$ac_cv_have_decl_fchdir" = xyes
18229then :
18230  ac_have_decl=1
18231else $as_nop
18232  ac_have_decl=0
18233fi
18234printf "%s\n" "#define HAVE_DECL_FCHDIR $ac_have_decl" >>confdefs.h
18235
18236
18237    HAVE_FCNTL=1;
18238  HAVE_OPENAT=1;
18239  REPLACE_CREAT=0;
18240  REPLACE_FCNTL=0;
18241  REPLACE_OPEN=0;
18242  REPLACE_OPENAT=0;
18243
18244
18245
18246
18247  GL_GNULIB_CREAT=0
18248
18249
18250
18251  GL_GNULIB_FCNTL=0
18252
18253
18254
18255  GL_GNULIB_NONBLOCKING=0
18256
18257
18258
18259  GL_GNULIB_OPEN=0
18260
18261
18262
18263  GL_GNULIB_OPENAT=0
18264
18265
18266
18267  GL_GNULIB_MDA_CREAT=1
18268
18269
18270
18271  GL_GNULIB_MDA_OPEN=1
18272
18273
18274
18275
18276
18277
18278
18279
18280
18281  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
18282printf %s "checking for working fcntl.h... " >&6; }
18283if test ${gl_cv_header_working_fcntl_h+y}
18284then :
18285  printf %s "(cached) " >&6
18286else $as_nop
18287  if test "$cross_compiling" = yes
18288then :
18289  case "$host_os" in
18290                  # Guess 'no' on native Windows.
18291          mingw*) gl_cv_header_working_fcntl_h='no' ;;
18292          *)      gl_cv_header_working_fcntl_h=cross-compiling ;;
18293        esac
18294
18295else $as_nop
18296  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18297/* end confdefs.h.  */
18298#include <sys/types.h>
18299           #include <sys/stat.h>
18300           #if HAVE_UNISTD_H
18301           # include <unistd.h>
18302           #else /* on Windows with MSVC */
18303           # include <io.h>
18304           # include <stdlib.h>
18305           # defined sleep(n) _sleep ((n) * 1000)
18306           #endif
18307           #include <fcntl.h>
18308
18309
18310$gl_mda_defines
18311
18312           #ifndef O_NOATIME
18313            #define O_NOATIME 0
18314           #endif
18315           #ifndef O_NOFOLLOW
18316            #define O_NOFOLLOW 0
18317           #endif
18318           static int const constants[] =
18319            {
18320              O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
18321              O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
18322            };
18323
18324int
18325main (void)
18326{
18327
18328            int result = !constants;
18329            #if HAVE_SYMLINK
18330            {
18331              static char const sym[] = "conftest.sym";
18332              if (symlink ("/dev/null", sym) != 0)
18333                result |= 2;
18334              else
18335                {
18336                  int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
18337                  if (fd >= 0)
18338                    {
18339                      close (fd);
18340                      result |= 4;
18341                    }
18342                }
18343              if (unlink (sym) != 0 || symlink (".", sym) != 0)
18344                result |= 2;
18345              else
18346                {
18347                  int fd = open (sym, O_RDONLY | O_NOFOLLOW);
18348                  if (fd >= 0)
18349                    {
18350                      close (fd);
18351                      result |= 4;
18352                    }
18353                }
18354              unlink (sym);
18355            }
18356            #endif
18357            {
18358              static char const file[] = "confdefs.h";
18359              int fd = open (file, O_RDONLY | O_NOATIME);
18360              if (fd < 0)
18361                result |= 8;
18362              else
18363                {
18364                  struct stat st0;
18365                  if (fstat (fd, &st0) != 0)
18366                    result |= 16;
18367                  else
18368                    {
18369                      char c;
18370                      sleep (1);
18371                      if (read (fd, &c, 1) != 1)
18372                        result |= 24;
18373                      else
18374                        {
18375                          if (close (fd) != 0)
18376                            result |= 32;
18377                          else
18378                            {
18379                              struct stat st1;
18380                              if (stat (file, &st1) != 0)
18381                                result |= 40;
18382                              else
18383                                if (st0.st_atime != st1.st_atime)
18384                                  result |= 64;
18385                            }
18386                        }
18387                    }
18388                }
18389            }
18390            return result;
18391  ;
18392  return 0;
18393}
18394_ACEOF
18395if ac_fn_c_try_run "$LINENO"
18396then :
18397  gl_cv_header_working_fcntl_h=yes
18398else $as_nop
18399  case $? in #(
18400        4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
18401        64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
18402        68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
18403         *) gl_cv_header_working_fcntl_h='no';;
18404        esac
18405fi
18406rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18407  conftest.$ac_objext conftest.beam conftest.$ac_ext
18408fi
18409
18410
18411fi
18412{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
18413printf "%s\n" "$gl_cv_header_working_fcntl_h" >&6; }
18414
18415  case $gl_cv_header_working_fcntl_h in #(
18416  *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
18417  *) ac_val=1;;
18418  esac
18419
18420printf "%s\n" "#define HAVE_WORKING_O_NOATIME $ac_val" >>confdefs.h
18421
18422
18423  case $gl_cv_header_working_fcntl_h in #(
18424  *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
18425  *) ac_val=1;;
18426  esac
18427
18428printf "%s\n" "#define HAVE_WORKING_O_NOFOLLOW $ac_val" >>confdefs.h
18429
18430
18431ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
18432if test "x$ac_cv_type_mode_t" = xyes
18433then :
18434
18435else $as_nop
18436
18437printf "%s\n" "#define mode_t int" >>confdefs.h
18438
18439fi
18440
18441
18442
18443
18444
18445
18446
18447
18448
18449
18450
18451
18452     if test $gl_cv_have_include_next = yes; then
18453       gl_cv_next_fcntl_h='<'fcntl.h'>'
18454     else
18455       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
18456printf %s "checking absolute name of <fcntl.h>... " >&6; }
18457if test ${gl_cv_next_fcntl_h+y}
18458then :
18459  printf %s "(cached) " >&6
18460else $as_nop
18461
18462
18463
18464  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18465/* end confdefs.h.  */
18466#include <fcntl.h>
18467_ACEOF
18468                case "$host_os" in
18469    aix*) gl_absname_cpp="$ac_cpp -C" ;;
18470    *)    gl_absname_cpp="$ac_cpp" ;;
18471  esac
18472
18473  case "$host_os" in
18474    mingw*)
18475                                          gl_dirsep_regex='[/\\]'
18476      ;;
18477    *)
18478      gl_dirsep_regex='\/'
18479      ;;
18480  esac
18481      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18482  gl_header_literal_regex=`echo 'fcntl.h' \
18483                           | sed -e "$gl_make_literal_regex_sed"`
18484  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18485      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18486      s|^/[^/]|//&|
18487      p
18488      q
18489    }'
18490
18491        gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18492  sed -n "$gl_absolute_header_sed"`
18493
18494           gl_header=$gl_cv_absolute_fcntl_h
18495           gl_cv_next_fcntl_h='"'$gl_header'"'
18496
18497
18498fi
18499{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
18500printf "%s\n" "$gl_cv_next_fcntl_h" >&6; }
18501     fi
18502     NEXT_FCNTL_H=$gl_cv_next_fcntl_h
18503
18504     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18505       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18506       gl_next_as_first_directive='<'fcntl.h'>'
18507     else
18508       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18509       gl_next_as_first_directive=$gl_cv_next_fcntl_h
18510     fi
18511     NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
18512
18513
18514
18515
18516
18517
18518
18519
18520
18521
18522
18523
18524
18525
18526
18527    HAVE_DECL_FCLOSEALL=1;
18528  HAVE_DECL_FPURGE=1;
18529  HAVE_DECL_FSEEKO=1;
18530  HAVE_DECL_FTELLO=1;
18531  HAVE_DECL_GETDELIM=1;
18532  HAVE_DECL_GETLINE=1;
18533  HAVE_DECL_OBSTACK_PRINTF=1;
18534  HAVE_DECL_SNPRINTF=1;
18535  HAVE_DECL_VSNPRINTF=1;
18536  HAVE_DPRINTF=1;
18537  HAVE_FSEEKO=1;
18538  HAVE_FTELLO=1;
18539  HAVE_PCLOSE=1;
18540  HAVE_POPEN=1;
18541  HAVE_RENAMEAT=1;
18542  HAVE_VASPRINTF=1;
18543  HAVE_VDPRINTF=1;
18544  REPLACE_DPRINTF=0;
18545  REPLACE_FCLOSE=0;
18546  REPLACE_FDOPEN=0;
18547  REPLACE_FFLUSH=0;
18548  REPLACE_FOPEN=0;
18549  REPLACE_FPRINTF=0;
18550  REPLACE_FPURGE=0;
18551  REPLACE_FREOPEN=0;
18552  REPLACE_FSEEK=0;
18553  REPLACE_FSEEKO=0;
18554  REPLACE_FTELL=0;
18555  REPLACE_FTELLO=0;
18556  REPLACE_GETDELIM=0;
18557  REPLACE_GETLINE=0;
18558  REPLACE_OBSTACK_PRINTF=0;
18559  REPLACE_PERROR=0;
18560  REPLACE_POPEN=0;
18561  REPLACE_PRINTF=0;
18562  REPLACE_REMOVE=0;
18563  REPLACE_RENAME=0;
18564  REPLACE_RENAMEAT=0;
18565  REPLACE_SNPRINTF=0;
18566  REPLACE_SPRINTF=0;
18567  REPLACE_STDIO_READ_FUNCS=0;
18568  REPLACE_STDIO_WRITE_FUNCS=0;
18569  REPLACE_TMPFILE=0;
18570  REPLACE_VASPRINTF=0;
18571  REPLACE_VDPRINTF=0;
18572  REPLACE_VFPRINTF=0;
18573  REPLACE_VPRINTF=0;
18574  REPLACE_VSNPRINTF=0;
18575  REPLACE_VSPRINTF=0;
18576
18577
18578
18579  GL_GNULIB_DPRINTF=0
18580
18581
18582
18583  GL_GNULIB_FCLOSE=0
18584
18585
18586
18587  GL_GNULIB_FDOPEN=0
18588
18589
18590
18591  GL_GNULIB_FFLUSH=0
18592
18593
18594
18595  GL_GNULIB_FGETC=0
18596
18597
18598
18599  GL_GNULIB_FGETS=0
18600
18601
18602
18603  GL_GNULIB_FOPEN=0
18604
18605
18606
18607  GL_GNULIB_FPRINTF=0
18608
18609
18610
18611  GL_GNULIB_FPRINTF_POSIX=0
18612
18613
18614
18615  GL_GNULIB_FPURGE=0
18616
18617
18618
18619  GL_GNULIB_FPUTC=0
18620
18621
18622
18623  GL_GNULIB_FPUTS=0
18624
18625
18626
18627  GL_GNULIB_FREAD=0
18628
18629
18630
18631  GL_GNULIB_FREOPEN=0
18632
18633
18634
18635  GL_GNULIB_FSCANF=0
18636
18637
18638
18639  GL_GNULIB_FSEEK=0
18640
18641
18642
18643  GL_GNULIB_FSEEKO=0
18644
18645
18646
18647  GL_GNULIB_FTELL=0
18648
18649
18650
18651  GL_GNULIB_FTELLO=0
18652
18653
18654
18655  GL_GNULIB_FWRITE=0
18656
18657
18658
18659  GL_GNULIB_GETC=0
18660
18661
18662
18663  GL_GNULIB_GETCHAR=0
18664
18665
18666
18667  GL_GNULIB_GETDELIM=0
18668
18669
18670
18671  GL_GNULIB_GETLINE=0
18672
18673
18674
18675  GL_GNULIB_OBSTACK_PRINTF=0
18676
18677
18678
18679  GL_GNULIB_OBSTACK_PRINTF_POSIX=0
18680
18681
18682
18683  GL_GNULIB_PCLOSE=0
18684
18685
18686
18687  GL_GNULIB_PERROR=0
18688
18689
18690
18691  GL_GNULIB_POPEN=0
18692
18693
18694
18695  GL_GNULIB_PRINTF=0
18696
18697
18698
18699  GL_GNULIB_PRINTF_POSIX=0
18700
18701
18702
18703  GL_GNULIB_PUTC=0
18704
18705
18706
18707  GL_GNULIB_PUTCHAR=0
18708
18709
18710
18711  GL_GNULIB_PUTS=0
18712
18713
18714
18715  GL_GNULIB_REMOVE=0
18716
18717
18718
18719  GL_GNULIB_RENAME=0
18720
18721
18722
18723  GL_GNULIB_RENAMEAT=0
18724
18725
18726
18727  GL_GNULIB_SCANF=0
18728
18729
18730
18731  GL_GNULIB_SNPRINTF=0
18732
18733
18734
18735  GL_GNULIB_SPRINTF_POSIX=0
18736
18737
18738
18739  GL_GNULIB_STDIO_H_NONBLOCKING=0
18740
18741
18742
18743  GL_GNULIB_STDIO_H_SIGPIPE=0
18744
18745
18746
18747  GL_GNULIB_TMPFILE=0
18748
18749
18750
18751  GL_GNULIB_VASPRINTF=0
18752
18753
18754
18755  GL_GNULIB_VFSCANF=0
18756
18757
18758
18759  GL_GNULIB_VSCANF=0
18760
18761
18762
18763  GL_GNULIB_VDPRINTF=0
18764
18765
18766
18767  GL_GNULIB_VFPRINTF=0
18768
18769
18770
18771  GL_GNULIB_VFPRINTF_POSIX=0
18772
18773
18774
18775  GL_GNULIB_VPRINTF=0
18776
18777
18778
18779  GL_GNULIB_VPRINTF_POSIX=0
18780
18781
18782
18783  GL_GNULIB_VSNPRINTF=0
18784
18785
18786
18787  GL_GNULIB_VSPRINTF_POSIX=0
18788
18789
18790
18791  GL_GNULIB_MDA_FCLOSEALL=1
18792
18793
18794
18795  GL_GNULIB_MDA_FDOPEN=1
18796
18797
18798
18799  GL_GNULIB_MDA_FILENO=1
18800
18801
18802
18803  GL_GNULIB_MDA_GETW=1
18804
18805
18806
18807  GL_GNULIB_MDA_PUTW=1
18808
18809
18810
18811  GL_GNULIB_MDA_TEMPNAM=1
18812
18813
18814
18815
18816
18817  ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess"
18818if test "x$ac_cv_func_eaccess" = xyes
18819then :
18820
18821else $as_nop
18822
18823printf "%s\n" "#define eaccess access" >>confdefs.h
18824
18825fi
18826
18827
18828
18829  HAVE_FLOCK=1;
18830
18831
18832
18833
18834  GL_GNULIB_FLOCK=0
18835
18836
18837
18838
18839    HAVE_FNMATCH=1;
18840  REPLACE_FNMATCH=0;
18841
18842
18843
18844
18845
18846
18847
18848
18849
18850
18851
18852
18853
18854
18855
18856     if test $gl_cv_have_include_next = yes; then
18857       gl_cv_next_fnmatch_h='<'fnmatch.h'>'
18858     else
18859       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <fnmatch.h>" >&5
18860printf %s "checking absolute name of <fnmatch.h>... " >&6; }
18861if test ${gl_cv_next_fnmatch_h+y}
18862then :
18863  printf %s "(cached) " >&6
18864else $as_nop
18865
18866             if test $ac_cv_header_fnmatch_h = yes; then
18867
18868
18869
18870
18871  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18872/* end confdefs.h.  */
18873#include <fnmatch.h>
18874_ACEOF
18875                case "$host_os" in
18876    aix*) gl_absname_cpp="$ac_cpp -C" ;;
18877    *)    gl_absname_cpp="$ac_cpp" ;;
18878  esac
18879
18880  case "$host_os" in
18881    mingw*)
18882                                          gl_dirsep_regex='[/\\]'
18883      ;;
18884    *)
18885      gl_dirsep_regex='\/'
18886      ;;
18887  esac
18888      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18889  gl_header_literal_regex=`echo 'fnmatch.h' \
18890                           | sed -e "$gl_make_literal_regex_sed"`
18891  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18892      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18893      s|^/[^/]|//&|
18894      p
18895      q
18896    }'
18897
18898        gl_cv_absolute_fnmatch_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18899  sed -n "$gl_absolute_header_sed"`
18900
18901           gl_header=$gl_cv_absolute_fnmatch_h
18902           gl_cv_next_fnmatch_h='"'$gl_header'"'
18903          else
18904               gl_cv_next_fnmatch_h='<'fnmatch.h'>'
18905             fi
18906
18907
18908fi
18909{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fnmatch_h" >&5
18910printf "%s\n" "$gl_cv_next_fnmatch_h" >&6; }
18911     fi
18912     NEXT_FNMATCH_H=$gl_cv_next_fnmatch_h
18913
18914     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18915       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18916       gl_next_as_first_directive='<'fnmatch.h'>'
18917     else
18918       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18919       gl_next_as_first_directive=$gl_cv_next_fnmatch_h
18920     fi
18921     NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H=$gl_next_as_first_directive
18922
18923
18924
18925
18926
18927
18928
18929  if test $ac_cv_header_fnmatch_h = yes; then
18930    HAVE_FNMATCH_H=1
18931  else
18932    HAVE_FNMATCH_H=0
18933  fi
18934
18935
18936  FNMATCH_H=''
18937     if false; then
18938              FNMATCH_H=fnmatch.h
18939     else
18940       if test $ac_cv_header_fnmatch_h != yes; then
18941                  FNMATCH_H=fnmatch.h
18942       fi
18943     fi
18944
18945
18946   if test -n "$FNMATCH_H"; then
18947  GL_GENERATE_FNMATCH_H_TRUE=
18948  GL_GENERATE_FNMATCH_H_FALSE='#'
18949else
18950  GL_GENERATE_FNMATCH_H_TRUE='#'
18951  GL_GENERATE_FNMATCH_H_FALSE=
18952fi
18953
18954
18955
18956
18957
18958
18959
18960
18961
18962  GL_GNULIB_FNMATCH=0
18963
18964
18965
18966
18967
18968   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
18969printf %s "checking for mbstate_t... " >&6; }
18970if test ${ac_cv_type_mbstate_t+y}
18971then :
18972  printf %s "(cached) " >&6
18973else $as_nop
18974  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18975/* end confdefs.h.  */
18976$ac_includes_default
18977             #include <wchar.h>
18978int
18979main (void)
18980{
18981mbstate_t x; return sizeof x;
18982  ;
18983  return 0;
18984}
18985_ACEOF
18986if ac_fn_c_try_compile "$LINENO"
18987then :
18988  ac_cv_type_mbstate_t=yes
18989else $as_nop
18990  ac_cv_type_mbstate_t=no
18991fi
18992rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18993fi
18994{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
18995printf "%s\n" "$ac_cv_type_mbstate_t" >&6; }
18996   if test $ac_cv_type_mbstate_t = yes; then
18997
18998printf "%s\n" "#define HAVE_MBSTATE_T 1" >>confdefs.h
18999
19000   else
19001
19002printf "%s\n" "#define mbstate_t int" >>confdefs.h
19003
19004   fi
19005
19006
19007
19008
19009
19010
19011
19012    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
19013printf %s "checking whether stdin defaults to large file offsets... " >&6; }
19014if test ${gl_cv_var_stdin_large_offset+y}
19015then :
19016  printf %s "(cached) " >&6
19017else $as_nop
19018  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19019/* end confdefs.h.  */
19020#include <stdio.h>
19021int
19022main (void)
19023{
19024#if defined __SL64 && defined __SCLE /* cygwin */
19025  /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
19026     fseeko/ftello needlessly fail.  This bug was fixed in 1.5.25, and
19027     it is easier to do a version check than building a runtime test.  */
19028# include <cygwin/version.h>
19029# if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
19030  choke me
19031# endif
19032#endif
19033  ;
19034  return 0;
19035}
19036_ACEOF
19037if ac_fn_c_try_link "$LINENO"
19038then :
19039  gl_cv_var_stdin_large_offset=yes
19040else $as_nop
19041  gl_cv_var_stdin_large_offset=no
19042fi
19043rm -f core conftest.err conftest.$ac_objext conftest.beam \
19044    conftest$ac_exeext conftest.$ac_ext
19045fi
19046{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
19047printf "%s\n" "$gl_cv_var_stdin_large_offset" >&6; }
19048
19049
19050
19051
19052
19053  case "$host_os" in
19054    mingw*)
19055                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
19056printf %s "checking for 64-bit off_t... " >&6; }
19057if test ${gl_cv_type_off_t_64+y}
19058then :
19059  printf %s "(cached) " >&6
19060else $as_nop
19061  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19062/* end confdefs.h.  */
19063#include <sys/types.h>
19064                int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
19065
19066int
19067main (void)
19068{
19069
19070  ;
19071  return 0;
19072}
19073_ACEOF
19074if ac_fn_c_try_compile "$LINENO"
19075then :
19076  gl_cv_type_off_t_64=yes
19077else $as_nop
19078  gl_cv_type_off_t_64=no
19079fi
19080rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19081
19082fi
19083{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
19084printf "%s\n" "$gl_cv_type_off_t_64" >&6; }
19085      if test $gl_cv_type_off_t_64 = no; then
19086        WINDOWS_64_BIT_OFF_T=1
19087      else
19088        WINDOWS_64_BIT_OFF_T=0
19089      fi
19090                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5
19091printf %s "checking for 64-bit st_size... " >&6; }
19092if test ${gl_cv_member_st_size_64+y}
19093then :
19094  printf %s "(cached) " >&6
19095else $as_nop
19096  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19097/* end confdefs.h.  */
19098#include <sys/types.h>
19099                struct stat buf;
19100                int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
19101
19102int
19103main (void)
19104{
19105
19106  ;
19107  return 0;
19108}
19109_ACEOF
19110if ac_fn_c_try_compile "$LINENO"
19111then :
19112  gl_cv_member_st_size_64=yes
19113else $as_nop
19114  gl_cv_member_st_size_64=no
19115fi
19116rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19117
19118fi
19119{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
19120printf "%s\n" "$gl_cv_member_st_size_64" >&6; }
19121      if test $gl_cv_member_st_size_64 = no; then
19122        WINDOWS_64_BIT_ST_SIZE=1
19123      else
19124        WINDOWS_64_BIT_ST_SIZE=0
19125      fi
19126      ;;
19127    *)
19128                                                      WINDOWS_64_BIT_OFF_T=0
19129      WINDOWS_64_BIT_ST_SIZE=0
19130      ;;
19131  esac
19132
19133
19134
19135
19136
19137
19138
19139
19140
19141
19142
19143printf "%s\n" "#define _USE_STD_STAT 1" >>confdefs.h
19144
19145
19146
19147
19148
19149
19150
19151
19152
19153
19154     if test $gl_cv_have_include_next = yes; then
19155       gl_cv_next_sys_types_h='<'sys/types.h'>'
19156     else
19157       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
19158printf %s "checking absolute name of <sys/types.h>... " >&6; }
19159if test ${gl_cv_next_sys_types_h+y}
19160then :
19161  printf %s "(cached) " >&6
19162else $as_nop
19163
19164
19165
19166  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19167/* end confdefs.h.  */
19168#include <sys/types.h>
19169_ACEOF
19170                case "$host_os" in
19171    aix*) gl_absname_cpp="$ac_cpp -C" ;;
19172    *)    gl_absname_cpp="$ac_cpp" ;;
19173  esac
19174
19175  case "$host_os" in
19176    mingw*)
19177                                          gl_dirsep_regex='[/\\]'
19178      ;;
19179    *)
19180      gl_dirsep_regex='\/'
19181      ;;
19182  esac
19183      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19184  gl_header_literal_regex=`echo 'sys/types.h' \
19185                           | sed -e "$gl_make_literal_regex_sed"`
19186  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19187      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19188      s|^/[^/]|//&|
19189      p
19190      q
19191    }'
19192
19193        gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19194  sed -n "$gl_absolute_header_sed"`
19195
19196           gl_header=$gl_cv_absolute_sys_types_h
19197           gl_cv_next_sys_types_h='"'$gl_header'"'
19198
19199
19200fi
19201{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
19202printf "%s\n" "$gl_cv_next_sys_types_h" >&6; }
19203     fi
19204     NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
19205
19206     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19207       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19208       gl_next_as_first_directive='<'sys/types.h'>'
19209     else
19210       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19211       gl_next_as_first_directive=$gl_cv_next_sys_types_h
19212     fi
19213     NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
19214
19215
19216
19217
19218
19219
19220
19221
19222
19223
19224
19225
19226    WINDOWS_STAT_INODES=0
19227
19228
19229
19230ac_fn_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
19231if test "x$ac_cv_have_decl_fseeko" = xyes
19232then :
19233  ac_have_decl=1
19234else $as_nop
19235  ac_have_decl=0
19236fi
19237printf "%s\n" "#define HAVE_DECL_FSEEKO $ac_have_decl" >>confdefs.h
19238
19239
19240
19241
19242
19243
19244
19245
19246
19247  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
19248printf %s "checking for fseeko... " >&6; }
19249if test ${gl_cv_func_fseeko+y}
19250then :
19251  printf %s "(cached) " >&6
19252else $as_nop
19253
19254      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19255/* end confdefs.h.  */
19256#include <stdio.h>
19257
19258int
19259main (void)
19260{
19261fseeko (stdin, 0, 0);
19262  ;
19263  return 0;
19264}
19265_ACEOF
19266if ac_fn_c_try_link "$LINENO"
19267then :
19268  gl_cv_func_fseeko=yes
19269else $as_nop
19270  gl_cv_func_fseeko=no
19271fi
19272rm -f core conftest.err conftest.$ac_objext conftest.beam \
19273    conftest$ac_exeext conftest.$ac_ext
19274
19275fi
19276{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
19277printf "%s\n" "$gl_cv_func_fseeko" >&6; }
19278
19279
19280  if test $ac_cv_have_decl_fseeko = no; then
19281    HAVE_DECL_FSEEKO=0
19282  fi
19283
19284  if test $gl_cv_func_fseeko = no; then
19285    HAVE_FSEEKO=0
19286  else
19287    if test $WINDOWS_64_BIT_OFF_T = 1; then
19288      REPLACE_FSEEKO=1
19289    fi
19290    if test $gl_cv_var_stdin_large_offset = no; then
19291      REPLACE_FSEEKO=1
19292    fi
19293
19294
19295
19296  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
19297printf %s "checking whether fflush works on input streams... " >&6; }
19298if test ${gl_cv_func_fflush_stdin+y}
19299then :
19300  printf %s "(cached) " >&6
19301else $as_nop
19302  echo hello world > conftest.txt
19303     if test "$cross_compiling" = yes
19304then :
19305  case "$host_os" in
19306                  # Guess no on native Windows.
19307          mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
19308          *)      gl_cv_func_fflush_stdin=cross ;;
19309        esac
19310
19311else $as_nop
19312  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19313/* end confdefs.h.  */
19314
19315#include <stdio.h>
19316#if HAVE_UNISTD_H
19317# include <unistd.h>
19318#else /* on Windows with MSVC */
19319# include <io.h>
19320#endif
19321
19322
19323$gl_mda_defines
19324
19325int
19326main (void)
19327{
19328FILE *f = fopen ("conftest.txt", "r");
19329         char buffer[10];
19330         int fd;
19331         int c;
19332         if (f == NULL)
19333           return 1;
19334         fd = fileno (f);
19335         if (fd < 0 || fread (buffer, 1, 5, f) != 5)
19336           { fclose (f); return 2; }
19337         /* For deterministic results, ensure f read a bigger buffer.  */
19338         if (lseek (fd, 0, SEEK_CUR) == 5)
19339           { fclose (f); return 3; }
19340         /* POSIX requires fflush-fseek to set file offset of fd.  This fails
19341            on BSD systems and on mingw.  */
19342         if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
19343           { fclose (f); return 4; }
19344         if (lseek (fd, 0, SEEK_CUR) != 5)
19345           { fclose (f); return 5; }
19346         /* Verify behaviour of fflush after ungetc. See
19347            <https://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
19348         /* Verify behaviour of fflush after a backup ungetc.  This fails on
19349            mingw.  */
19350         c = fgetc (f);
19351         ungetc (c, f);
19352         fflush (f);
19353         if (fgetc (f) != c)
19354           { fclose (f); return 6; }
19355         /* Verify behaviour of fflush after a non-backup ungetc.  This fails
19356            on glibc 2.8 and on BSD systems.  */
19357         c = fgetc (f);
19358         ungetc ('@', f);
19359         fflush (f);
19360         if (fgetc (f) != c)
19361           { fclose (f); return 7; }
19362         fclose (f);
19363         return 0;
19364
19365  ;
19366  return 0;
19367}
19368_ACEOF
19369if ac_fn_c_try_run "$LINENO"
19370then :
19371  gl_cv_func_fflush_stdin=yes
19372else $as_nop
19373  gl_cv_func_fflush_stdin=no
19374fi
19375rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19376  conftest.$ac_objext conftest.beam conftest.$ac_ext
19377fi
19378
19379     rm conftest.txt
19380
19381fi
19382{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
19383printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
19384  case "$gl_cv_func_fflush_stdin" in
19385    *yes) gl_func_fflush_stdin=1 ;;
19386    *no)  gl_func_fflush_stdin=0 ;;
19387    *)    gl_func_fflush_stdin='(-1)' ;;
19388  esac
19389
19390printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
19391
19392
19393      case "$gl_cv_func_fflush_stdin" in
19394        *yes) ;;
19395        *) REPLACE_FSEEKO=1 ;;
19396      esac
19397
19398  fi
19399
19400
19401    HAVE_FCHMODAT=1;
19402  HAVE_FSTATAT=1;
19403  HAVE_FUTIMENS=1;
19404  HAVE_GETUMASK=1;
19405  HAVE_LCHMOD=1;
19406  HAVE_LSTAT=1;
19407  HAVE_MKDIRAT=1;
19408  HAVE_MKFIFO=1;
19409  HAVE_MKFIFOAT=1;
19410  HAVE_MKNOD=1;
19411  HAVE_MKNODAT=1;
19412  HAVE_UTIMENSAT=1;
19413  REPLACE_FCHMODAT=0;
19414  REPLACE_FSTAT=0;
19415  REPLACE_FSTATAT=0;
19416  REPLACE_FUTIMENS=0;
19417  REPLACE_LSTAT=0;
19418  REPLACE_MKDIR=0;
19419  REPLACE_MKFIFO=0;
19420  REPLACE_MKFIFOAT=0;
19421  REPLACE_MKNOD=0;
19422  REPLACE_MKNODAT=0;
19423  REPLACE_STAT=0;
19424  REPLACE_UTIMENSAT=0;
19425
19426{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
19427printf %s "checking whether stat file-mode macros are broken... " >&6; }
19428if test ${ac_cv_header_stat_broken+y}
19429then :
19430  printf %s "(cached) " >&6
19431else $as_nop
19432  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19433/* end confdefs.h.  */
19434#include <sys/types.h>
19435#include <sys/stat.h>
19436
19437#if defined S_ISBLK && defined S_IFDIR
19438extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
19439#endif
19440
19441#if defined S_ISBLK && defined S_IFCHR
19442extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
19443#endif
19444
19445#if defined S_ISLNK && defined S_IFREG
19446extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
19447#endif
19448
19449#if defined S_ISSOCK && defined S_IFREG
19450extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
19451#endif
19452
19453_ACEOF
19454if ac_fn_c_try_compile "$LINENO"
19455then :
19456  ac_cv_header_stat_broken=no
19457else $as_nop
19458  ac_cv_header_stat_broken=yes
19459fi
19460rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19461fi
19462{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
19463printf "%s\n" "$ac_cv_header_stat_broken" >&6; }
19464if test $ac_cv_header_stat_broken = yes; then
19465
19466printf "%s\n" "#define STAT_MACROS_BROKEN 1" >>confdefs.h
19467
19468fi
19469
19470
19471
19472
19473
19474
19475
19476
19477
19478
19479
19480
19481
19482
19483
19484     if test $gl_cv_have_include_next = yes; then
19485       gl_cv_next_sys_stat_h='<'sys/stat.h'>'
19486     else
19487       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
19488printf %s "checking absolute name of <sys/stat.h>... " >&6; }
19489if test ${gl_cv_next_sys_stat_h+y}
19490then :
19491  printf %s "(cached) " >&6
19492else $as_nop
19493
19494             if test $ac_cv_header_sys_stat_h = yes; then
19495
19496
19497
19498
19499  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19500/* end confdefs.h.  */
19501#include <sys/stat.h>
19502_ACEOF
19503                case "$host_os" in
19504    aix*) gl_absname_cpp="$ac_cpp -C" ;;
19505    *)    gl_absname_cpp="$ac_cpp" ;;
19506  esac
19507
19508  case "$host_os" in
19509    mingw*)
19510                                          gl_dirsep_regex='[/\\]'
19511      ;;
19512    *)
19513      gl_dirsep_regex='\/'
19514      ;;
19515  esac
19516      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19517  gl_header_literal_regex=`echo 'sys/stat.h' \
19518                           | sed -e "$gl_make_literal_regex_sed"`
19519  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19520      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19521      s|^/[^/]|//&|
19522      p
19523      q
19524    }'
19525
19526        gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19527  sed -n "$gl_absolute_header_sed"`
19528
19529           gl_header=$gl_cv_absolute_sys_stat_h
19530           gl_cv_next_sys_stat_h='"'$gl_header'"'
19531          else
19532               gl_cv_next_sys_stat_h='<'sys/stat.h'>'
19533             fi
19534
19535
19536fi
19537{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
19538printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
19539     fi
19540     NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
19541
19542     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19543       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19544       gl_next_as_first_directive='<'sys/stat.h'>'
19545     else
19546       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19547       gl_next_as_first_directive=$gl_cv_next_sys_stat_h
19548     fi
19549     NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
19550
19551
19552
19553
19554
19555
19556
19557
19558    WINDOWS_STAT_TIMESPEC=0
19559
19560
19561
19562
19563
19564
19565
19566
19567      ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
19568     #include <sys/stat.h>
19569"
19570if test "x$ac_cv_type_nlink_t" = xyes
19571then :
19572
19573else $as_nop
19574
19575printf "%s\n" "#define nlink_t int" >>confdefs.h
19576
19577fi
19578
19579
19580
19581
19582
19583
19584
19585
19586
19587
19588  case "$host_os" in
19589    mingw*)
19590      ac_fn_c_check_header_compile "$LINENO" "sdkddkver.h" "ac_cv_header_sdkddkver_h" "$ac_includes_default"
19591if test "x$ac_cv_header_sdkddkver_h" = xyes
19592then :
19593  printf "%s\n" "#define HAVE_SDKDDKVER_H 1" >>confdefs.h
19594
19595fi
19596
19597      ;;
19598  esac
19599
19600
19601
19602
19603
19604
19605
19606  GL_GNULIB_FCHMODAT=0
19607
19608
19609
19610  GL_GNULIB_FSTAT=0
19611
19612
19613
19614  GL_GNULIB_FSTATAT=0
19615
19616
19617
19618  GL_GNULIB_FUTIMENS=0
19619
19620
19621
19622  GL_GNULIB_GETUMASK=0
19623
19624
19625
19626  GL_GNULIB_LCHMOD=0
19627
19628
19629
19630  GL_GNULIB_LSTAT=0
19631
19632
19633
19634  GL_GNULIB_MKDIR=0
19635
19636
19637
19638  GL_GNULIB_MKDIRAT=0
19639
19640
19641
19642  GL_GNULIB_MKFIFO=0
19643
19644
19645
19646  GL_GNULIB_MKFIFOAT=0
19647
19648
19649
19650  GL_GNULIB_MKNOD=0
19651
19652
19653
19654  GL_GNULIB_MKNODAT=0
19655
19656
19657
19658  GL_GNULIB_STAT=0
19659
19660
19661
19662  GL_GNULIB_UTIMENSAT=0
19663
19664
19665
19666  GL_GNULIB_OVERRIDES_STRUCT_STAT=0
19667
19668
19669
19670  GL_GNULIB_MDA_CHMOD=1
19671
19672
19673
19674  GL_GNULIB_MDA_MKDIR=1
19675
19676
19677
19678  GL_GNULIB_MDA_UMASK=1
19679
19680
19681
19682
19683ac_fn_check_decl "$LINENO" "ftello" "ac_cv_have_decl_ftello" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
19684if test "x$ac_cv_have_decl_ftello" = xyes
19685then :
19686  ac_have_decl=1
19687else $as_nop
19688  ac_have_decl=0
19689fi
19690printf "%s\n" "#define HAVE_DECL_FTELLO $ac_have_decl" >>confdefs.h
19691
19692
19693
19694
19695  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ungetc works on arbitrary bytes" >&5
19696printf %s "checking whether ungetc works on arbitrary bytes... " >&6; }
19697if test ${gl_cv_func_ungetc_works+y}
19698then :
19699  printf %s "(cached) " >&6
19700else $as_nop
19701  if test "$cross_compiling" = yes
19702then :
19703  case "$host_os" in
19704                          # Guess yes on glibc systems.
19705           *-gnu* | gnu*) gl_cv_func_ungetc_works="guessing yes" ;;
19706                          # Guess yes on musl systems.
19707           *-musl*)       gl_cv_func_ungetc_works="guessing yes" ;;
19708                          # Guess yes on bionic systems.
19709           *-android*)    gl_cv_func_ungetc_works="guessing yes" ;;
19710                          # Guess yes on native Windows.
19711           mingw*)        gl_cv_func_ungetc_works="guessing yes" ;;
19712                          # If we don't know, obey --enable-cross-guesses.
19713           *)             gl_cv_func_ungetc_works="$gl_cross_guess_normal" ;;
19714         esac
19715
19716else $as_nop
19717  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19718/* end confdefs.h.  */
19719
19720#include <stdio.h>
19721
19722int
19723main (void)
19724{
19725FILE *f;
19726            if (!(f = fopen ("conftest.tmp", "w+")))
19727              return 1;
19728            if (fputs ("abc", f) < 0)
19729              { fclose (f); return 2; }
19730            rewind (f);
19731            if (fgetc (f) != 'a')
19732              { fclose (f); return 3; }
19733            if (fgetc (f) != 'b')
19734              { fclose (f); return 4; }
19735            if (ungetc ('d', f) != 'd')
19736              { fclose (f); return 5; }
19737            if (ftell (f) != 1)
19738              { fclose (f); return 6; }
19739            if (fgetc (f) != 'd')
19740              { fclose (f); return 7; }
19741            if (ftell (f) != 2)
19742              { fclose (f); return 8; }
19743            if (fseek (f, 0, SEEK_CUR) != 0)
19744              { fclose (f); return 9; }
19745            if (ftell (f) != 2)
19746              { fclose (f); return 10; }
19747            if (fgetc (f) != 'c')
19748              { fclose (f); return 11; }
19749            fclose (f);
19750            remove ("conftest.tmp");
19751
19752  ;
19753  return 0;
19754}
19755_ACEOF
19756if ac_fn_c_try_run "$LINENO"
19757then :
19758  gl_cv_func_ungetc_works=yes
19759else $as_nop
19760  gl_cv_func_ungetc_works=no
19761fi
19762rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19763  conftest.$ac_objext conftest.beam conftest.$ac_ext
19764fi
19765
19766
19767fi
19768{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ungetc_works" >&5
19769printf "%s\n" "$gl_cv_func_ungetc_works" >&6; }
19770  gl_ftello_broken_after_ungetc=no
19771  case "$gl_cv_func_ungetc_works" in
19772    *yes) ;;
19773    *)
19774                  case "$host_os" in
19775        darwin*) gl_ftello_broken_after_ungetc=yes ;;
19776        *)
19777
19778printf "%s\n" "#define FUNC_UNGETC_BROKEN 1" >>confdefs.h
19779
19780          ;;
19781      esac
19782      ;;
19783  esac
19784
19785
19786
19787
19788
19789
19790
19791
19792
19793
19794  if test $ac_cv_have_decl_ftello = no; then
19795    HAVE_DECL_FTELLO=0
19796  fi
19797
19798  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
19799printf %s "checking for ftello... " >&6; }
19800if test ${gl_cv_func_ftello+y}
19801then :
19802  printf %s "(cached) " >&6
19803else $as_nop
19804
19805      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19806/* end confdefs.h.  */
19807#include <stdio.h>
19808int
19809main (void)
19810{
19811ftello (stdin);
19812  ;
19813  return 0;
19814}
19815_ACEOF
19816if ac_fn_c_try_link "$LINENO"
19817then :
19818  gl_cv_func_ftello=yes
19819else $as_nop
19820  gl_cv_func_ftello=no
19821fi
19822rm -f core conftest.err conftest.$ac_objext conftest.beam \
19823    conftest$ac_exeext conftest.$ac_ext
19824
19825fi
19826{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
19827printf "%s\n" "$gl_cv_func_ftello" >&6; }
19828  if test $gl_cv_func_ftello = no; then
19829    HAVE_FTELLO=0
19830  else
19831    if test $WINDOWS_64_BIT_OFF_T = 1; then
19832      REPLACE_FTELLO=1
19833    fi
19834    if test $gl_cv_var_stdin_large_offset = no; then
19835      REPLACE_FTELLO=1
19836    fi
19837    if test $REPLACE_FTELLO = 0; then
19838
19839      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
19840printf %s "checking whether ftello works... " >&6; }
19841if test ${gl_cv_func_ftello_works+y}
19842then :
19843  printf %s "(cached) " >&6
19844else $as_nop
19845
19846                              case "$host_os" in
19847                      # Guess no on Solaris.
19848            solaris*) gl_cv_func_ftello_works="guessing no" ;;
19849                      # Guess yes on native Windows.
19850            mingw*)   gl_cv_func_ftello_works="guessing yes" ;;
19851                      # Guess yes otherwise.
19852            *)        gl_cv_func_ftello_works="guessing yes" ;;
19853          esac
19854          if test "$cross_compiling" = yes
19855then :
19856  :
19857else $as_nop
19858  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19859/* end confdefs.h.  */
19860
19861#include <stdio.h>
19862#include <stdlib.h>
19863#include <string.h>
19864#define TESTFILE "conftest.tmp"
19865int
19866main (void)
19867{
19868  FILE *fp;
19869
19870  /* Create a file with some contents.  */
19871  fp = fopen (TESTFILE, "w");
19872  if (fp == NULL)
19873    return 70;
19874  if (fwrite ("foogarsh", 1, 8, fp) < 8)
19875    { fclose (fp); return 71; }
19876  if (fclose (fp))
19877    return 72;
19878
19879  /* The file's contents is now "foogarsh".  */
19880
19881  /* Try writing after reading to EOF.  */
19882  fp = fopen (TESTFILE, "r+");
19883  if (fp == NULL)
19884    return 73;
19885  if (fseek (fp, -1, SEEK_END))
19886    { fclose (fp); return 74; }
19887  if (!(getc (fp) == 'h'))
19888    { fclose (fp); return 1; }
19889  if (!(getc (fp) == EOF))
19890    { fclose (fp); return 2; }
19891  if (!(ftell (fp) == 8))
19892    { fclose (fp); return 3; }
19893  if (!(ftell (fp) == 8))
19894    { fclose (fp); return 4; }
19895  if (!(putc ('!', fp) == '!'))
19896    { fclose (fp); return 5; }
19897  if (!(ftell (fp) == 9))
19898    { fclose (fp); return 6; }
19899  if (!(fclose (fp) == 0))
19900    return 7;
19901  fp = fopen (TESTFILE, "r");
19902  if (fp == NULL)
19903    return 75;
19904  {
19905    char buf[10];
19906    if (!(fread (buf, 1, 10, fp) == 9))
19907      { fclose (fp); return 10; }
19908    if (!(memcmp (buf, "foogarsh!", 9) == 0))
19909      { fclose (fp); return 11; }
19910  }
19911  if (!(fclose (fp) == 0))
19912    return 12;
19913
19914  /* The file's contents is now "foogarsh!".  */
19915
19916  return 0;
19917}
19918_ACEOF
19919if ac_fn_c_try_run "$LINENO"
19920then :
19921  gl_cv_func_ftello_works=yes
19922else $as_nop
19923  gl_cv_func_ftello_works=no
19924fi
19925rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19926  conftest.$ac_objext conftest.beam conftest.$ac_ext
19927fi
19928
19929
19930fi
19931{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
19932printf "%s\n" "$gl_cv_func_ftello_works" >&6; }
19933      case "$gl_cv_func_ftello_works" in
19934        *yes) ;;
19935        *)
19936          REPLACE_FTELLO=1
19937
19938printf "%s\n" "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
19939
19940          ;;
19941      esac
19942    fi
19943    if test $REPLACE_FTELLO = 0; then
19944
19945      if test $gl_ftello_broken_after_ungetc = yes; then
19946        REPLACE_FTELLO=1
19947
19948printf "%s\n" "#define FTELLO_BROKEN_AFTER_UNGETC 1" >>confdefs.h
19949
19950      fi
19951    fi
19952  fi
19953
19954
19955
19956    HAVE_STRUCT_ADDRINFO=1;
19957  HAVE_DECL_FREEADDRINFO=1;
19958  HAVE_DECL_GAI_STRERROR=1;
19959  HAVE_DECL_GETADDRINFO=1;
19960  HAVE_DECL_GETNAMEINFO=1;
19961  REPLACE_GAI_STRERROR=0;
19962  REPLACE_GETADDRINFO=0;
19963
19964
19965
19966
19967
19968
19969
19970
19971
19972
19973
19974
19975
19976     if test $gl_cv_have_include_next = yes; then
19977       gl_cv_next_netdb_h='<'netdb.h'>'
19978     else
19979       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <netdb.h>" >&5
19980printf %s "checking absolute name of <netdb.h>... " >&6; }
19981if test ${gl_cv_next_netdb_h+y}
19982then :
19983  printf %s "(cached) " >&6
19984else $as_nop
19985
19986             if test $ac_cv_header_netdb_h = yes; then
19987
19988
19989
19990
19991  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19992/* end confdefs.h.  */
19993#include <netdb.h>
19994_ACEOF
19995                case "$host_os" in
19996    aix*) gl_absname_cpp="$ac_cpp -C" ;;
19997    *)    gl_absname_cpp="$ac_cpp" ;;
19998  esac
19999
20000  case "$host_os" in
20001    mingw*)
20002                                          gl_dirsep_regex='[/\\]'
20003      ;;
20004    *)
20005      gl_dirsep_regex='\/'
20006      ;;
20007  esac
20008      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20009  gl_header_literal_regex=`echo 'netdb.h' \
20010                           | sed -e "$gl_make_literal_regex_sed"`
20011  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20012      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20013      s|^/[^/]|//&|
20014      p
20015      q
20016    }'
20017
20018        gl_cv_absolute_netdb_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20019  sed -n "$gl_absolute_header_sed"`
20020
20021           gl_header=$gl_cv_absolute_netdb_h
20022           gl_cv_next_netdb_h='"'$gl_header'"'
20023          else
20024               gl_cv_next_netdb_h='<'netdb.h'>'
20025             fi
20026
20027
20028fi
20029{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netdb_h" >&5
20030printf "%s\n" "$gl_cv_next_netdb_h" >&6; }
20031     fi
20032     NEXT_NETDB_H=$gl_cv_next_netdb_h
20033
20034     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20035       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20036       gl_next_as_first_directive='<'netdb.h'>'
20037     else
20038       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20039       gl_next_as_first_directive=$gl_cv_next_netdb_h
20040     fi
20041     NEXT_AS_FIRST_DIRECTIVE_NETDB_H=$gl_next_as_first_directive
20042
20043
20044
20045
20046  if test $ac_cv_header_netdb_h = yes; then
20047    HAVE_NETDB_H=1
20048  else
20049    HAVE_NETDB_H=0
20050  fi
20051
20052
20053
20054
20055
20056
20057
20058                  HOSTENT_LIB=
20059  gl_saved_libs="$LIBS"
20060  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
20061printf %s "checking for library containing gethostbyname... " >&6; }
20062if test ${ac_cv_search_gethostbyname+y}
20063then :
20064  printf %s "(cached) " >&6
20065else $as_nop
20066  ac_func_search_save_LIBS=$LIBS
20067cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20068/* end confdefs.h.  */
20069
20070/* Override any GCC internal prototype to avoid an error.
20071   Use char because int might match the return type of a GCC
20072   builtin and then its argument prototype would still apply.  */
20073char gethostbyname ();
20074int
20075main (void)
20076{
20077return gethostbyname ();
20078  ;
20079  return 0;
20080}
20081_ACEOF
20082for ac_lib in '' nsl network net
20083do
20084  if test -z "$ac_lib"; then
20085    ac_res="none required"
20086  else
20087    ac_res=-l$ac_lib
20088    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20089  fi
20090  if ac_fn_c_try_link "$LINENO"
20091then :
20092  ac_cv_search_gethostbyname=$ac_res
20093fi
20094rm -f core conftest.err conftest.$ac_objext conftest.beam \
20095    conftest$ac_exeext
20096  if test ${ac_cv_search_gethostbyname+y}
20097then :
20098  break
20099fi
20100done
20101if test ${ac_cv_search_gethostbyname+y}
20102then :
20103
20104else $as_nop
20105  ac_cv_search_gethostbyname=no
20106fi
20107rm conftest.$ac_ext
20108LIBS=$ac_func_search_save_LIBS
20109fi
20110{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
20111printf "%s\n" "$ac_cv_search_gethostbyname" >&6; }
20112ac_res=$ac_cv_search_gethostbyname
20113if test "$ac_res" != no
20114then :
20115  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20116  if test "$ac_cv_search_gethostbyname" != "none required"; then
20117       HOSTENT_LIB="$ac_cv_search_gethostbyname"
20118     fi
20119fi
20120
20121  LIBS="$gl_saved_libs"
20122  if test -z "$HOSTENT_LIB"; then
20123
20124  for ac_func in gethostbyname
20125do :
20126  ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
20127if test "x$ac_cv_func_gethostbyname" = xyes
20128then :
20129  printf "%s\n" "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h
20130
20131else $as_nop
20132
20133      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in winsock2.h and -lws2_32" >&5
20134printf %s "checking for gethostbyname in winsock2.h and -lws2_32... " >&6; }
20135if test ${gl_cv_w32_gethostbyname+y}
20136then :
20137  printf %s "(cached) " >&6
20138else $as_nop
20139  gl_cv_w32_gethostbyname=no
20140         gl_save_LIBS="$LIBS"
20141         LIBS="$LIBS -lws2_32"
20142         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20143/* end confdefs.h.  */
20144
20145#ifdef HAVE_WINSOCK2_H
20146#include <winsock2.h>
20147#endif
20148#include <stddef.h>
20149
20150int
20151main (void)
20152{
20153gethostbyname(NULL);
20154  ;
20155  return 0;
20156}
20157_ACEOF
20158if ac_fn_c_try_link "$LINENO"
20159then :
20160  gl_cv_w32_gethostbyname=yes
20161fi
20162rm -f core conftest.err conftest.$ac_objext conftest.beam \
20163    conftest$ac_exeext conftest.$ac_ext
20164         LIBS="$gl_save_LIBS"
20165
20166fi
20167{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_w32_gethostbyname" >&5
20168printf "%s\n" "$gl_cv_w32_gethostbyname" >&6; }
20169      if test "$gl_cv_w32_gethostbyname" = "yes"; then
20170        HOSTENT_LIB="-lws2_32"
20171      fi
20172
20173fi
20174
20175done
20176  fi
20177
20178
20179
20180                      SERVENT_LIB=
20181  gl_saved_libs="$LIBS"
20182  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing getservbyname" >&5
20183printf %s "checking for library containing getservbyname... " >&6; }
20184if test ${ac_cv_search_getservbyname+y}
20185then :
20186  printf %s "(cached) " >&6
20187else $as_nop
20188  ac_func_search_save_LIBS=$LIBS
20189cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20190/* end confdefs.h.  */
20191
20192/* Override any GCC internal prototype to avoid an error.
20193   Use char because int might match the return type of a GCC
20194   builtin and then its argument prototype would still apply.  */
20195char getservbyname ();
20196int
20197main (void)
20198{
20199return getservbyname ();
20200  ;
20201  return 0;
20202}
20203_ACEOF
20204for ac_lib in '' socket network net
20205do
20206  if test -z "$ac_lib"; then
20207    ac_res="none required"
20208  else
20209    ac_res=-l$ac_lib
20210    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20211  fi
20212  if ac_fn_c_try_link "$LINENO"
20213then :
20214  ac_cv_search_getservbyname=$ac_res
20215fi
20216rm -f core conftest.err conftest.$ac_objext conftest.beam \
20217    conftest$ac_exeext
20218  if test ${ac_cv_search_getservbyname+y}
20219then :
20220  break
20221fi
20222done
20223if test ${ac_cv_search_getservbyname+y}
20224then :
20225
20226else $as_nop
20227  ac_cv_search_getservbyname=no
20228fi
20229rm conftest.$ac_ext
20230LIBS=$ac_func_search_save_LIBS
20231fi
20232{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getservbyname" >&5
20233printf "%s\n" "$ac_cv_search_getservbyname" >&6; }
20234ac_res=$ac_cv_search_getservbyname
20235if test "$ac_res" != no
20236then :
20237  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20238  if test "$ac_cv_search_getservbyname" != "none required"; then
20239       SERVENT_LIB="$ac_cv_search_getservbyname"
20240     fi
20241fi
20242
20243  LIBS="$gl_saved_libs"
20244  if test -z "$SERVENT_LIB"; then
20245
20246  for ac_func in getservbyname
20247do :
20248  ac_fn_c_check_func "$LINENO" "getservbyname" "ac_cv_func_getservbyname"
20249if test "x$ac_cv_func_getservbyname" = xyes
20250then :
20251  printf "%s\n" "#define HAVE_GETSERVBYNAME 1" >>confdefs.h
20252
20253else $as_nop
20254
20255      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getservbyname in winsock2.h and -lws2_32" >&5
20256printf %s "checking for getservbyname in winsock2.h and -lws2_32... " >&6; }
20257if test ${gl_cv_w32_getservbyname+y}
20258then :
20259  printf %s "(cached) " >&6
20260else $as_nop
20261  gl_cv_w32_getservbyname=no
20262         gl_save_LIBS="$LIBS"
20263         LIBS="$LIBS -lws2_32"
20264         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20265/* end confdefs.h.  */
20266
20267#ifdef HAVE_WINSOCK2_H
20268#include <winsock2.h>
20269#endif
20270#include <stddef.h>
20271
20272int
20273main (void)
20274{
20275getservbyname(NULL,NULL);
20276  ;
20277  return 0;
20278}
20279_ACEOF
20280if ac_fn_c_try_link "$LINENO"
20281then :
20282  gl_cv_w32_getservbyname=yes
20283fi
20284rm -f core conftest.err conftest.$ac_objext conftest.beam \
20285    conftest$ac_exeext conftest.$ac_ext
20286         LIBS="$gl_save_LIBS"
20287
20288fi
20289{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_w32_getservbyname" >&5
20290printf "%s\n" "$gl_cv_w32_getservbyname" >&6; }
20291      if test "$gl_cv_w32_getservbyname" = "yes"; then
20292        SERVENT_LIB="-lws2_32"
20293      fi
20294
20295fi
20296
20297done
20298  fi
20299
20300
20301
20302
20303
20304
20305
20306
20307
20308                HAVE_INET_NTOP=1
20309  INET_NTOP_LIB=
20310
20311
20312
20313
20314  if test $ac_cv_header_sys_socket_h != yes; then
20315                    ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
20316if test "x$ac_cv_header_winsock2_h" = xyes
20317then :
20318  printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
20319
20320fi
20321
20322  fi
20323  if test "$ac_cv_header_winsock2_h" = yes; then
20324    HAVE_WINSOCK2_H=1
20325    UNISTD_H_HAVE_WINSOCK2_H=1
20326    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
20327  else
20328    HAVE_WINSOCK2_H=0
20329  fi
20330
20331
20332  if test $HAVE_WINSOCK2_H = 1; then
20333                    REPLACE_INET_NTOP=1
20334    ac_fn_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <ws2tcpip.h>
20335" "$ac_c_undeclared_builtin_options" "CFLAGS"
20336if test "x$ac_cv_have_decl_inet_ntop" = xyes
20337then :
20338  ac_have_decl=1
20339else $as_nop
20340  ac_have_decl=0
20341fi
20342printf "%s\n" "#define HAVE_DECL_INET_NTOP $ac_have_decl" >>confdefs.h
20343
20344    if test $ac_cv_have_decl_inet_ntop = yes; then
20345      INET_NTOP_LIB="-lws2_32"
20346    else
20347      HAVE_DECL_INET_NTOP=0
20348    fi
20349  else
20350    gl_save_LIBS=$LIBS
20351    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
20352printf %s "checking for library containing inet_ntop... " >&6; }
20353if test ${ac_cv_search_inet_ntop+y}
20354then :
20355  printf %s "(cached) " >&6
20356else $as_nop
20357  ac_func_search_save_LIBS=$LIBS
20358cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20359/* end confdefs.h.  */
20360
20361/* Override any GCC internal prototype to avoid an error.
20362   Use char because int might match the return type of a GCC
20363   builtin and then its argument prototype would still apply.  */
20364char inet_ntop ();
20365int
20366main (void)
20367{
20368return inet_ntop ();
20369  ;
20370  return 0;
20371}
20372_ACEOF
20373for ac_lib in '' nsl resolv network
20374do
20375  if test -z "$ac_lib"; then
20376    ac_res="none required"
20377  else
20378    ac_res=-l$ac_lib
20379    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20380  fi
20381  if ac_fn_c_try_link "$LINENO"
20382then :
20383  ac_cv_search_inet_ntop=$ac_res
20384fi
20385rm -f core conftest.err conftest.$ac_objext conftest.beam \
20386    conftest$ac_exeext
20387  if test ${ac_cv_search_inet_ntop+y}
20388then :
20389  break
20390fi
20391done
20392if test ${ac_cv_search_inet_ntop+y}
20393then :
20394
20395else $as_nop
20396  ac_cv_search_inet_ntop=no
20397fi
20398rm conftest.$ac_ext
20399LIBS=$ac_func_search_save_LIBS
20400fi
20401{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
20402printf "%s\n" "$ac_cv_search_inet_ntop" >&6; }
20403ac_res=$ac_cv_search_inet_ntop
20404if test "$ac_res" != no
20405then :
20406  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20407
20408else $as_nop
20409  ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
20410if test "x$ac_cv_func_inet_ntop" = xyes
20411then :
20412  printf "%s\n" "#define HAVE_INET_NTOP 1" >>confdefs.h
20413
20414fi
20415
20416       if test $ac_cv_func_inet_ntop = no; then
20417         HAVE_INET_NTOP=0
20418       fi
20419
20420fi
20421
20422    LIBS=$gl_save_LIBS
20423
20424    if test "$ac_cv_search_inet_ntop" != "no" \
20425       && test "$ac_cv_search_inet_ntop" != "none required"; then
20426      INET_NTOP_LIB="$ac_cv_search_inet_ntop"
20427    fi
20428
20429
20430    ac_fn_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <arpa/inet.h>
20431        #if HAVE_NETDB_H
20432        # include <netdb.h>
20433        #endif
20434
20435" "$ac_c_undeclared_builtin_options" "CFLAGS"
20436if test "x$ac_cv_have_decl_inet_ntop" = xyes
20437then :
20438  ac_have_decl=1
20439else $as_nop
20440  ac_have_decl=0
20441fi
20442printf "%s\n" "#define HAVE_DECL_INET_NTOP $ac_have_decl" >>confdefs.h
20443
20444    if test $ac_cv_have_decl_inet_ntop = no; then
20445      HAVE_DECL_INET_NTOP=0
20446    fi
20447  fi
20448
20449
20450
20451
20452
20453
20454
20455  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
20456printf %s "checking for IPv4 sockets... " >&6; }
20457if test ${gl_cv_socket_ipv4+y}
20458then :
20459  printf %s "(cached) " >&6
20460else $as_nop
20461  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20462/* end confdefs.h.  */
20463#include <sys/types.h>
20464#ifdef HAVE_SYS_SOCKET_H
20465#include <sys/socket.h>
20466#endif
20467#ifdef HAVE_NETINET_IN_H
20468#include <netinet/in.h>
20469#endif
20470#ifdef HAVE_WINSOCK2_H
20471#include <winsock2.h>
20472#endif
20473int
20474main (void)
20475{
20476int x = AF_INET; struct in_addr y; struct sockaddr_in z;
20477 if (&x && &y && &z) return 0;
20478  ;
20479  return 0;
20480}
20481_ACEOF
20482if ac_fn_c_try_compile "$LINENO"
20483then :
20484  gl_cv_socket_ipv4=yes
20485else $as_nop
20486  gl_cv_socket_ipv4=no
20487fi
20488rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20489fi
20490{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
20491printf "%s\n" "$gl_cv_socket_ipv4" >&6; }
20492  if test $gl_cv_socket_ipv4 = yes; then
20493
20494printf "%s\n" "#define HAVE_IPV4 1" >>confdefs.h
20495
20496  fi
20497
20498  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
20499printf %s "checking for IPv6 sockets... " >&6; }
20500if test ${gl_cv_socket_ipv6+y}
20501then :
20502  printf %s "(cached) " >&6
20503else $as_nop
20504  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20505/* end confdefs.h.  */
20506#include <sys/types.h>
20507#ifdef HAVE_SYS_SOCKET_H
20508#include <sys/socket.h>
20509#endif
20510#ifdef HAVE_NETINET_IN_H
20511#include <netinet/in.h>
20512#endif
20513#ifdef HAVE_WINSOCK2_H
20514#include <winsock2.h>
20515#endif
20516#ifdef HAVE_WS2TCPIP_H
20517#include <ws2tcpip.h>
20518#endif
20519int
20520main (void)
20521{
20522int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
20523 if (&x && &y && &z) return 0;
20524  ;
20525  return 0;
20526}
20527_ACEOF
20528if ac_fn_c_try_compile "$LINENO"
20529then :
20530  gl_cv_socket_ipv6=yes
20531else $as_nop
20532  gl_cv_socket_ipv6=no
20533fi
20534rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20535fi
20536{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
20537printf "%s\n" "$gl_cv_socket_ipv6" >&6; }
20538  if test $gl_cv_socket_ipv6 = yes; then
20539
20540printf "%s\n" "#define HAVE_IPV6 1" >>confdefs.h
20541
20542  fi
20543
20544
20545
20546  GL_GNULIB_GETADDRINFO=0
20547
20548
20549
20550
20551
20552   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
20553printf %s "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
20554if test ${gl_cv_func_getcwd_null+y}
20555then :
20556  printf %s "(cached) " >&6
20557else $as_nop
20558  if test "$cross_compiling" = yes
20559then :
20560  case "$host_os" in
20561                           # Guess yes on glibc systems.
20562            *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
20563                           # Guess yes on musl systems.
20564            *-musl*)       gl_cv_func_getcwd_null="guessing yes";;
20565                           # Guess yes on Cygwin.
20566            cygwin*)       gl_cv_func_getcwd_null="guessing yes";;
20567                           # If we don't know, obey --enable-cross-guesses.
20568            *)             gl_cv_func_getcwd_null="$gl_cross_guess_normal";;
20569          esac
20570
20571else $as_nop
20572  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20573/* end confdefs.h.  */
20574
20575#	 include <stdlib.h>
20576#        if HAVE_UNISTD_H
20577#         include <unistd.h>
20578#        else /* on Windows with MSVC */
20579#         include <direct.h>
20580#        endif
20581
20582
20583$gl_mda_defines
20584
20585#        ifndef getcwd
20586         char *getcwd ();
20587#        endif
20588
20589int
20590main (void)
20591{
20592
20593#if defined _WIN32 && ! defined __CYGWIN__
20594/* mingw cwd does not start with '/', but _getcwd does allocate.
20595   However, mingw fails to honor non-zero size.  */
20596#else
20597           if (chdir ("/") != 0)
20598             return 1;
20599           else
20600             {
20601               char *f = getcwd (NULL, 0);
20602               if (! f)
20603                 return 2;
20604               if (f[0] != '/')
20605                 { free (f); return 3; }
20606               if (f[1] != '\0')
20607                 { free (f); return 4; }
20608               free (f);
20609               return 0;
20610             }
20611#endif
20612
20613  ;
20614  return 0;
20615}
20616_ACEOF
20617if ac_fn_c_try_run "$LINENO"
20618then :
20619  gl_cv_func_getcwd_null=yes
20620else $as_nop
20621  gl_cv_func_getcwd_null=no
20622fi
20623rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20624  conftest.$ac_objext conftest.beam conftest.$ac_ext
20625fi
20626
20627fi
20628{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
20629printf "%s\n" "$gl_cv_func_getcwd_null" >&6; }
20630
20631
20632  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
20633printf %s "checking for getcwd with POSIX signature... " >&6; }
20634if test ${gl_cv_func_getcwd_posix_signature+y}
20635then :
20636  printf %s "(cached) " >&6
20637else $as_nop
20638  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20639/* end confdefs.h.  */
20640#include <unistd.h>
20641
20642
20643$gl_mda_defines
20644
20645int
20646main (void)
20647{
20648extern
20649           #ifdef __cplusplus
20650           "C"
20651           #endif
20652           char *getcwd (char *, size_t);
20653
20654  ;
20655  return 0;
20656}
20657
20658_ACEOF
20659if ac_fn_c_try_compile "$LINENO"
20660then :
20661  gl_cv_func_getcwd_posix_signature=yes
20662else $as_nop
20663  gl_cv_func_getcwd_posix_signature=no
20664fi
20665rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20666
20667fi
20668{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
20669printf "%s\n" "$gl_cv_func_getcwd_posix_signature" >&6; }
20670
20671ac_fn_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
20672if test "x$ac_cv_have_decl_getcwd" = xyes
20673then :
20674  ac_have_decl=1
20675else $as_nop
20676  ac_have_decl=0
20677fi
20678printf "%s\n" "#define HAVE_DECL_GETCWD $ac_have_decl" >>confdefs.h
20679
20680ac_fn_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
20681if test "x$ac_cv_have_decl_getdelim" = xyes
20682then :
20683  ac_have_decl=1
20684else $as_nop
20685  ac_have_decl=0
20686fi
20687printf "%s\n" "#define HAVE_DECL_GETDELIM $ac_have_decl" >>confdefs.h
20688
20689
20690
20691ac_fn_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
20692if test "x$ac_cv_have_decl_getdtablesize" = xyes
20693then :
20694  ac_have_decl=1
20695else $as_nop
20696  ac_have_decl=0
20697fi
20698printf "%s\n" "#define HAVE_DECL_GETDTABLESIZE $ac_have_decl" >>confdefs.h
20699
20700{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
20701printf %s "checking for uid_t in sys/types.h... " >&6; }
20702if test ${ac_cv_type_uid_t+y}
20703then :
20704  printf %s "(cached) " >&6
20705else $as_nop
20706  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20707/* end confdefs.h.  */
20708#include <sys/types.h>
20709
20710_ACEOF
20711if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20712  $EGREP "uid_t" >/dev/null 2>&1
20713then :
20714  ac_cv_type_uid_t=yes
20715else $as_nop
20716  ac_cv_type_uid_t=no
20717fi
20718rm -rf conftest*
20719
20720fi
20721{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
20722printf "%s\n" "$ac_cv_type_uid_t" >&6; }
20723if test $ac_cv_type_uid_t = no; then
20724
20725printf "%s\n" "#define uid_t int" >>confdefs.h
20726
20727
20728printf "%s\n" "#define gid_t int" >>confdefs.h
20729
20730fi
20731
20732{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
20733printf %s "checking type of array argument to getgroups... " >&6; }
20734if test ${ac_cv_type_getgroups+y}
20735then :
20736  printf %s "(cached) " >&6
20737else $as_nop
20738  if test "$cross_compiling" = yes
20739then :
20740  ac_cv_type_getgroups=cross
20741else $as_nop
20742  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20743/* end confdefs.h.  */
20744/* Thanks to Mike Rendell for this test.  */
20745$ac_includes_default
20746#define NGID 256
20747#undef MAX
20748#define MAX(x, y) ((x) > (y) ? (x) : (y))
20749
20750int
20751main (void)
20752{
20753  gid_t gidset[NGID];
20754  int i, n;
20755  union { gid_t gval; long int lval; }  val;
20756
20757  val.lval = -1;
20758  for (i = 0; i < NGID; i++)
20759    gidset[i] = val.gval;
20760  n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
20761		 gidset);
20762  /* Exit non-zero if getgroups seems to require an array of ints.  This
20763     happens when gid_t is short int but getgroups modifies an array
20764     of ints.  */
20765  return n > 0 && gidset[n] != val.gval;
20766}
20767_ACEOF
20768if ac_fn_c_try_run "$LINENO"
20769then :
20770  ac_cv_type_getgroups=gid_t
20771else $as_nop
20772  ac_cv_type_getgroups=int
20773fi
20774rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20775  conftest.$ac_objext conftest.beam conftest.$ac_ext
20776fi
20777
20778if test $ac_cv_type_getgroups = cross; then
20779        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20780/* end confdefs.h.  */
20781#include <unistd.h>
20782
20783_ACEOF
20784if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20785  $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1
20786then :
20787  ac_cv_type_getgroups=gid_t
20788else $as_nop
20789  ac_cv_type_getgroups=int
20790fi
20791rm -rf conftest*
20792
20793fi
20794fi
20795{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5
20796printf "%s\n" "$ac_cv_type_getgroups" >&6; }
20797
20798printf "%s\n" "#define GETGROUPS_T $ac_cv_type_getgroups" >>confdefs.h
20799
20800
20801ac_fn_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
20802if test "x$ac_cv_have_decl_getline" = xyes
20803then :
20804  ac_have_decl=1
20805else $as_nop
20806  ac_have_decl=0
20807fi
20808printf "%s\n" "#define HAVE_DECL_GETLINE $ac_have_decl" >>confdefs.h
20809
20810
20811
20812
20813
20814
20815
20816
20817
20818
20819
20820
20821
20822
20823
20824     if test $gl_cv_have_include_next = yes; then
20825       gl_cv_next_getopt_h='<'getopt.h'>'
20826     else
20827       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
20828printf %s "checking absolute name of <getopt.h>... " >&6; }
20829if test ${gl_cv_next_getopt_h+y}
20830then :
20831  printf %s "(cached) " >&6
20832else $as_nop
20833
20834             if test $ac_cv_header_getopt_h = yes; then
20835
20836
20837
20838
20839  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20840/* end confdefs.h.  */
20841#include <getopt.h>
20842_ACEOF
20843                case "$host_os" in
20844    aix*) gl_absname_cpp="$ac_cpp -C" ;;
20845    *)    gl_absname_cpp="$ac_cpp" ;;
20846  esac
20847
20848  case "$host_os" in
20849    mingw*)
20850                                          gl_dirsep_regex='[/\\]'
20851      ;;
20852    *)
20853      gl_dirsep_regex='\/'
20854      ;;
20855  esac
20856      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20857  gl_header_literal_regex=`echo 'getopt.h' \
20858                           | sed -e "$gl_make_literal_regex_sed"`
20859  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20860      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20861      s|^/[^/]|//&|
20862      p
20863      q
20864    }'
20865
20866        gl_cv_absolute_getopt_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20867  sed -n "$gl_absolute_header_sed"`
20868
20869           gl_header=$gl_cv_absolute_getopt_h
20870           gl_cv_next_getopt_h='"'$gl_header'"'
20871          else
20872               gl_cv_next_getopt_h='<'getopt.h'>'
20873             fi
20874
20875
20876fi
20877{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
20878printf "%s\n" "$gl_cv_next_getopt_h" >&6; }
20879     fi
20880     NEXT_GETOPT_H=$gl_cv_next_getopt_h
20881
20882     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20883       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20884       gl_next_as_first_directive='<'getopt.h'>'
20885     else
20886       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20887       gl_next_as_first_directive=$gl_cv_next_getopt_h
20888     fi
20889     NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
20890
20891
20892
20893
20894  if test $ac_cv_header_getopt_h = yes; then
20895    HAVE_GETOPT_H=1
20896  else
20897    HAVE_GETOPT_H=0
20898  fi
20899
20900
20901  gl_replace_getopt=
20902
20903    if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
20904           for ac_header in getopt.h
20905do :
20906  ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
20907if test "x$ac_cv_header_getopt_h" = xyes
20908then :
20909  printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h
20910
20911else $as_nop
20912  gl_replace_getopt=yes
20913fi
20914
20915done
20916  fi
20917
20918    if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
20919
20920  for ac_func in getopt_long_only
20921do :
20922  ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
20923if test "x$ac_cv_func_getopt_long_only" = xyes
20924then :
20925  printf "%s\n" "#define HAVE_GETOPT_LONG_ONLY 1" >>confdefs.h
20926
20927else $as_nop
20928  gl_replace_getopt=yes
20929fi
20930
20931done
20932  fi
20933
20934          if test -z "$gl_replace_getopt"; then
20935    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
20936printf %s "checking whether getopt is POSIX compatible... " >&6; }
20937if test ${gl_cv_func_getopt_posix+y}
20938then :
20939  printf %s "(cached) " >&6
20940else $as_nop
20941
20942                                                if test $cross_compiling = no; then
20943                              if test "$cross_compiling" = yes
20944then :
20945  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20946printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
20947as_fn_error $? "cannot run test program while cross compiling
20948See \`config.log' for more details" "$LINENO" 5; }
20949else $as_nop
20950  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20951/* end confdefs.h.  */
20952
20953#include <unistd.h>
20954#include <stdlib.h>
20955#include <string.h>
20956
20957int
20958main ()
20959{
20960  static char program[] = "program";
20961  static char a[] = "-a";
20962  static char foo[] = "foo";
20963  static char bar[] = "bar";
20964  char *argv[] = { program, a, foo, bar, NULL };
20965  int c;
20966
20967  c = getopt (4, argv, "ab");
20968  if (!(c == 'a'))
20969    return 1;
20970  c = getopt (4, argv, "ab");
20971  if (!(c == -1))
20972    return 2;
20973  if (!(optind == 2))
20974    return 3;
20975  return 0;
20976}
20977
20978_ACEOF
20979if ac_fn_c_try_run "$LINENO"
20980then :
20981  gl_cv_func_getopt_posix=maybe
20982else $as_nop
20983  gl_cv_func_getopt_posix=no
20984fi
20985rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20986  conftest.$ac_objext conftest.beam conftest.$ac_ext
20987fi
20988
20989          if test $gl_cv_func_getopt_posix = maybe; then
20990                                    if test "$cross_compiling" = yes
20991then :
20992  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20993printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
20994as_fn_error $? "cannot run test program while cross compiling
20995See \`config.log' for more details" "$LINENO" 5; }
20996else $as_nop
20997  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20998/* end confdefs.h.  */
20999
21000#include <unistd.h>
21001#include <stdlib.h>
21002#include <string.h>
21003
21004int
21005main ()
21006{
21007  static char program[] = "program";
21008  static char donald[] = "donald";
21009  static char p[] = "-p";
21010  static char billy[] = "billy";
21011  static char duck[] = "duck";
21012  static char a[] = "-a";
21013  static char bar[] = "bar";
21014  char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
21015  int c;
21016
21017  c = getopt (7, argv, "+abp:q:");
21018  if (!(c == -1))
21019    return 4;
21020  if (!(strcmp (argv[0], "program") == 0))
21021    return 5;
21022  if (!(strcmp (argv[1], "donald") == 0))
21023    return 6;
21024  if (!(strcmp (argv[2], "-p") == 0))
21025    return 7;
21026  if (!(strcmp (argv[3], "billy") == 0))
21027    return 8;
21028  if (!(strcmp (argv[4], "duck") == 0))
21029    return 9;
21030  if (!(strcmp (argv[5], "-a") == 0))
21031    return 10;
21032  if (!(strcmp (argv[6], "bar") == 0))
21033    return 11;
21034  if (!(optind == 1))
21035    return 12;
21036  return 0;
21037}
21038
21039_ACEOF
21040if ac_fn_c_try_run "$LINENO"
21041then :
21042  gl_cv_func_getopt_posix=maybe
21043else $as_nop
21044  gl_cv_func_getopt_posix=no
21045fi
21046rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21047  conftest.$ac_objext conftest.beam conftest.$ac_ext
21048fi
21049
21050          fi
21051          if test $gl_cv_func_getopt_posix = maybe; then
21052                        if test "$cross_compiling" = yes
21053then :
21054  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
21055printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
21056as_fn_error $? "cannot run test program while cross compiling
21057See \`config.log' for more details" "$LINENO" 5; }
21058else $as_nop
21059  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21060/* end confdefs.h.  */
21061
21062#include <unistd.h>
21063#include <stdlib.h>
21064#include <string.h>
21065
21066int
21067main ()
21068{
21069  static char program[] = "program";
21070  static char ab[] = "-ab";
21071  char *argv[3] = { program, ab, NULL };
21072  if (getopt (2, argv, "ab:") != 'a')
21073    return 13;
21074  if (getopt (2, argv, "ab:") != '?')
21075    return 14;
21076  if (optopt != 'b')
21077    return 15;
21078  if (optind != 2)
21079    return 16;
21080  return 0;
21081}
21082
21083_ACEOF
21084if ac_fn_c_try_run "$LINENO"
21085then :
21086  gl_cv_func_getopt_posix=yes
21087else $as_nop
21088  gl_cv_func_getopt_posix=no
21089fi
21090rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21091  conftest.$ac_objext conftest.beam conftest.$ac_ext
21092fi
21093
21094          fi
21095        else
21096          case "$host_os" in
21097            darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
21098            *)                       gl_cv_func_getopt_posix="guessing yes";;
21099          esac
21100        fi
21101
21102fi
21103{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
21104printf "%s\n" "$gl_cv_func_getopt_posix" >&6; }
21105    case "$gl_cv_func_getopt_posix" in
21106      *no) gl_replace_getopt=yes ;;
21107    esac
21108  fi
21109
21110  if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
21111    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
21112printf %s "checking for working GNU getopt function... " >&6; }
21113if test ${gl_cv_func_getopt_gnu+y}
21114then :
21115  printf %s "(cached) " >&6
21116else $as_nop
21117  # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
21118       # optstring is necessary for programs like m4 that have POSIX-mandated
21119       # semantics for supporting options interspersed with files.
21120       # Also, since getopt_long is a GNU extension, we require optind=0.
21121       # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
21122       # so take care to revert to the correct (non-)export state.
21123       gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
21124       case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
21125         xx) gl_had_POSIXLY_CORRECT=exported ;;
21126         x)  gl_had_POSIXLY_CORRECT=yes      ;;
21127         *)  gl_had_POSIXLY_CORRECT=         ;;
21128       esac
21129       POSIXLY_CORRECT=1
21130       export POSIXLY_CORRECT
21131       if test "$cross_compiling" = yes
21132then :
21133                             gl_cv_func_getopt_gnu="$gl_cross_guess_normal"
21134
21135else $as_nop
21136  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21137/* end confdefs.h.  */
21138#include <getopt.h>
21139                           #include <stddef.h>
21140                           #include <string.h>
21141
21142#include <stdlib.h>
21143#if defined __MACH__ && defined __APPLE__
21144/* Avoid a crash on Mac OS X.  */
21145#include <mach/mach.h>
21146#include <mach/mach_error.h>
21147#include <mach/thread_status.h>
21148#include <mach/exception.h>
21149#include <mach/task.h>
21150#include <pthread.h>
21151/* The exception port on which our thread listens.  */
21152static mach_port_t our_exception_port;
21153/* The main function of the thread listening for exceptions of type
21154   EXC_BAD_ACCESS.  */
21155static void *
21156mach_exception_thread (void *arg)
21157{
21158  /* Buffer for a message to be received.  */
21159  struct {
21160    mach_msg_header_t head;
21161    mach_msg_body_t msgh_body;
21162    char data[1024];
21163  } msg;
21164  mach_msg_return_t retval;
21165  /* Wait for a message on the exception port.  */
21166  retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
21167                     our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
21168  if (retval != MACH_MSG_SUCCESS)
21169    abort ();
21170  exit (1);
21171}
21172static void
21173nocrash_init (void)
21174{
21175  mach_port_t self = mach_task_self ();
21176  /* Allocate a port on which the thread shall listen for exceptions.  */
21177  if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
21178      == KERN_SUCCESS) {
21179    /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
21180    if (mach_port_insert_right (self, our_exception_port, our_exception_port,
21181                                MACH_MSG_TYPE_MAKE_SEND)
21182        == KERN_SUCCESS) {
21183      /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
21184         for us.  */
21185      exception_mask_t mask = EXC_MASK_BAD_ACCESS;
21186      /* Create the thread listening on the exception port.  */
21187      pthread_attr_t attr;
21188      pthread_t thread;
21189      if (pthread_attr_init (&attr) == 0
21190          && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
21191          && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
21192        pthread_attr_destroy (&attr);
21193        /* Replace the exception port info for these exceptions with our own.
21194           Note that we replace the exception port for the entire task, not only
21195           for a particular thread.  This has the effect that when our exception
21196           port gets the message, the thread specific exception port has already
21197           been asked, and we don't need to bother about it.
21198           See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
21199        task_set_exception_ports (self, mask, our_exception_port,
21200                                  EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
21201      }
21202    }
21203  }
21204}
21205#elif defined _WIN32 && ! defined __CYGWIN__
21206/* Avoid a crash on native Windows.  */
21207#define WIN32_LEAN_AND_MEAN
21208#include <windows.h>
21209#include <winerror.h>
21210static LONG WINAPI
21211exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
21212{
21213  switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
21214    {
21215    case EXCEPTION_ACCESS_VIOLATION:
21216    case EXCEPTION_IN_PAGE_ERROR:
21217    case EXCEPTION_STACK_OVERFLOW:
21218    case EXCEPTION_GUARD_PAGE:
21219    case EXCEPTION_PRIV_INSTRUCTION:
21220    case EXCEPTION_ILLEGAL_INSTRUCTION:
21221    case EXCEPTION_DATATYPE_MISALIGNMENT:
21222    case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
21223    case EXCEPTION_NONCONTINUABLE_EXCEPTION:
21224      exit (1);
21225    }
21226  return EXCEPTION_CONTINUE_SEARCH;
21227}
21228static void
21229nocrash_init (void)
21230{
21231  SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
21232}
21233#else
21234/* Avoid a crash on POSIX systems.  */
21235#include <signal.h>
21236#include <unistd.h>
21237/* A POSIX signal handler.  */
21238static void
21239exception_handler (int sig)
21240{
21241  _exit (1);
21242}
21243static void
21244nocrash_init (void)
21245{
21246#ifdef SIGSEGV
21247  signal (SIGSEGV, exception_handler);
21248#endif
21249#ifdef SIGBUS
21250  signal (SIGBUS, exception_handler);
21251#endif
21252}
21253#endif
21254
21255
21256int
21257main (void)
21258{
21259
21260             int result = 0;
21261
21262             nocrash_init();
21263
21264             /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
21265                and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
21266                OSF/1 5.1, Solaris 10.  */
21267             {
21268               static char conftest[] = "conftest";
21269               static char plus[] = "-+";
21270               char *argv[3] = { conftest, plus, NULL };
21271               opterr = 0;
21272               if (getopt (2, argv, "+a") != '?')
21273                 result |= 1;
21274             }
21275             /* This code succeeds on glibc 2.8, mingw,
21276                and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
21277                IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x.  */
21278             {
21279               static char program[] = "program";
21280               static char p[] = "-p";
21281               static char foo[] = "foo";
21282               static char bar[] = "bar";
21283               char *argv[] = { program, p, foo, bar, NULL };
21284
21285               optind = 1;
21286               if (getopt (4, argv, "p::") != 'p')
21287                 result |= 2;
21288               else if (optarg != NULL)
21289                 result |= 4;
21290               else if (getopt (4, argv, "p::") != -1)
21291                 result |= 6;
21292               else if (optind != 2)
21293                 result |= 8;
21294             }
21295             /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0.  */
21296             {
21297               static char program[] = "program";
21298               static char foo[] = "foo";
21299               static char p[] = "-p";
21300               char *argv[] = { program, foo, p, NULL };
21301               optind = 0;
21302               if (getopt (3, argv, "-p") != 1)
21303                 result |= 16;
21304               else if (getopt (3, argv, "-p") != 'p')
21305                 result |= 16;
21306             }
21307             /* This code fails on glibc 2.11.  */
21308             {
21309               static char program[] = "program";
21310               static char b[] = "-b";
21311               static char a[] = "-a";
21312               char *argv[] = { program, b, a, NULL };
21313               optind = opterr = 0;
21314               if (getopt (3, argv, "+:a:b") != 'b')
21315                 result |= 32;
21316               else if (getopt (3, argv, "+:a:b") != ':')
21317                 result |= 32;
21318             }
21319             /* This code dumps core on glibc 2.14.  */
21320             {
21321               static char program[] = "program";
21322               static char w[] = "-W";
21323               static char dummy[] = "dummy";
21324               char *argv[] = { program, w, dummy, NULL };
21325               optind = opterr = 1;
21326               if (getopt (3, argv, "W;") != 'W')
21327                 result |= 64;
21328             }
21329             return result;
21330
21331  ;
21332  return 0;
21333}
21334_ACEOF
21335if ac_fn_c_try_run "$LINENO"
21336then :
21337  gl_cv_func_getopt_gnu=yes
21338else $as_nop
21339  gl_cv_func_getopt_gnu=no
21340fi
21341rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21342  conftest.$ac_objext conftest.beam conftest.$ac_ext
21343fi
21344
21345       case $gl_had_POSIXLY_CORRECT in
21346         exported) ;;
21347         yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
21348         *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
21349       esac
21350
21351fi
21352{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
21353printf "%s\n" "$gl_cv_func_getopt_gnu" >&6; }
21354    if test "$gl_cv_func_getopt_gnu" != yes; then
21355      gl_replace_getopt=yes
21356    else
21357      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
21358printf %s "checking for working GNU getopt_long function... " >&6; }
21359if test ${gl_cv_func_getopt_long_gnu+y}
21360then :
21361  printf %s "(cached) " >&6
21362else $as_nop
21363  if test "$cross_compiling" = yes
21364then :
21365              case "$host_os" in
21366              openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
21367              *)        gl_cv_func_getopt_long_gnu="guessing yes";;
21368            esac
21369
21370else $as_nop
21371  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21372/* end confdefs.h.  */
21373#include <getopt.h>
21374                #include <stddef.h>
21375                #include <string.h>
21376
21377int
21378main (void)
21379{
21380static const struct option long_options[] =
21381                  {
21382                    { "xtremely-",no_argument,       NULL, 1003 },
21383                    { "xtra",     no_argument,       NULL, 1001 },
21384                    { "xtreme",   no_argument,       NULL, 1002 },
21385                    { "xtremely", no_argument,       NULL, 1003 },
21386                    { NULL,       0,                 NULL, 0 }
21387                  };
21388                /* This code fails on OpenBSD 5.0.  */
21389                {
21390                  static char program[] = "program";
21391                  static char xtremel[] = "--xtremel";
21392                  char *argv[] = { program, xtremel, NULL };
21393                  int option_index;
21394                  optind = 1; opterr = 0;
21395                  if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
21396                    return 1;
21397                }
21398                return 0;
21399
21400  ;
21401  return 0;
21402}
21403_ACEOF
21404if ac_fn_c_try_run "$LINENO"
21405then :
21406  gl_cv_func_getopt_long_gnu=yes
21407else $as_nop
21408  gl_cv_func_getopt_long_gnu=no
21409fi
21410rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21411  conftest.$ac_objext conftest.beam conftest.$ac_ext
21412fi
21413
21414
21415fi
21416{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
21417printf "%s\n" "$gl_cv_func_getopt_long_gnu" >&6; }
21418      case "$gl_cv_func_getopt_long_gnu" in
21419        *yes) ;;
21420        *) gl_replace_getopt=yes ;;
21421      esac
21422    fi
21423  fi
21424
21425
21426
21427
21428
21429
21430
21431
21432
21433  if test $ac_cv_func_getpass = no; then
21434    HAVE_GETPASS=0
21435  fi
21436
21437
21438
21439ac_fn_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
21440if test "x$ac_cv_have_decl_fflush_unlocked" = xyes
21441then :
21442  ac_have_decl=1
21443else $as_nop
21444  ac_have_decl=0
21445fi
21446printf "%s\n" "#define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl" >>confdefs.h
21447
21448ac_fn_check_decl "$LINENO" "flockfile" "ac_cv_have_decl_flockfile" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
21449if test "x$ac_cv_have_decl_flockfile" = xyes
21450then :
21451  ac_have_decl=1
21452else $as_nop
21453  ac_have_decl=0
21454fi
21455printf "%s\n" "#define HAVE_DECL_FLOCKFILE $ac_have_decl" >>confdefs.h
21456
21457ac_fn_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
21458if test "x$ac_cv_have_decl_fputs_unlocked" = xyes
21459then :
21460  ac_have_decl=1
21461else $as_nop
21462  ac_have_decl=0
21463fi
21464printf "%s\n" "#define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl" >>confdefs.h
21465
21466ac_fn_check_decl "$LINENO" "funlockfile" "ac_cv_have_decl_funlockfile" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
21467if test "x$ac_cv_have_decl_funlockfile" = xyes
21468then :
21469  ac_have_decl=1
21470else $as_nop
21471  ac_have_decl=0
21472fi
21473printf "%s\n" "#define HAVE_DECL_FUNLOCKFILE $ac_have_decl" >>confdefs.h
21474
21475ac_fn_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
21476if test "x$ac_cv_have_decl_putc_unlocked" = xyes
21477then :
21478  ac_have_decl=1
21479else $as_nop
21480  ac_have_decl=0
21481fi
21482printf "%s\n" "#define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl" >>confdefs.h
21483
21484
21485
21486
21487    HAVE_GETRANDOM=1;
21488  REPLACE_GETRANDOM=0;
21489
21490
21491
21492
21493  GL_GNULIB_GETRANDOM=0
21494
21495
21496
21497:
21498
21499
21500    HAVE_GETTIMEOFDAY=1;
21501  HAVE_STRUCT_TIMEVAL=1;
21502  HAVE_SYS_TIME_H=1;
21503  REPLACE_GETTIMEOFDAY=0;
21504  REPLACE_STRUCT_TIMEVAL=0;
21505
21506
21507
21508
21509
21510
21511
21512
21513
21514
21515
21516
21517
21518
21519
21520     if test $gl_cv_have_include_next = yes; then
21521       gl_cv_next_sys_time_h='<'sys/time.h'>'
21522     else
21523       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
21524printf %s "checking absolute name of <sys/time.h>... " >&6; }
21525if test ${gl_cv_next_sys_time_h+y}
21526then :
21527  printf %s "(cached) " >&6
21528else $as_nop
21529
21530             if test $ac_cv_header_sys_time_h = yes; then
21531
21532
21533
21534
21535  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21536/* end confdefs.h.  */
21537#include <sys/time.h>
21538_ACEOF
21539                case "$host_os" in
21540    aix*) gl_absname_cpp="$ac_cpp -C" ;;
21541    *)    gl_absname_cpp="$ac_cpp" ;;
21542  esac
21543
21544  case "$host_os" in
21545    mingw*)
21546                                          gl_dirsep_regex='[/\\]'
21547      ;;
21548    *)
21549      gl_dirsep_regex='\/'
21550      ;;
21551  esac
21552      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21553  gl_header_literal_regex=`echo 'sys/time.h' \
21554                           | sed -e "$gl_make_literal_regex_sed"`
21555  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21556      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21557      s|^/[^/]|//&|
21558      p
21559      q
21560    }'
21561
21562        gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21563  sed -n "$gl_absolute_header_sed"`
21564
21565           gl_header=$gl_cv_absolute_sys_time_h
21566           gl_cv_next_sys_time_h='"'$gl_header'"'
21567          else
21568               gl_cv_next_sys_time_h='<'sys/time.h'>'
21569             fi
21570
21571
21572fi
21573{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
21574printf "%s\n" "$gl_cv_next_sys_time_h" >&6; }
21575     fi
21576     NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
21577
21578     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21579       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21580       gl_next_as_first_directive='<'sys/time.h'>'
21581     else
21582       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21583       gl_next_as_first_directive=$gl_cv_next_sys_time_h
21584     fi
21585     NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
21586
21587
21588
21589
21590
21591  if test $ac_cv_header_sys_time_h != yes; then
21592    HAVE_SYS_TIME_H=0
21593  fi
21594
21595
21596
21597
21598
21599  if test $ac_cv_header_sys_socket_h != yes; then
21600                    ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
21601if test "x$ac_cv_header_winsock2_h" = xyes
21602then :
21603  printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
21604
21605fi
21606
21607  fi
21608  if test "$ac_cv_header_winsock2_h" = yes; then
21609    HAVE_WINSOCK2_H=1
21610    UNISTD_H_HAVE_WINSOCK2_H=1
21611    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
21612  else
21613    HAVE_WINSOCK2_H=0
21614  fi
21615
21616
21617  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
21618printf %s "checking for struct timeval... " >&6; }
21619if test ${gl_cv_sys_struct_timeval+y}
21620then :
21621  printf %s "(cached) " >&6
21622else $as_nop
21623  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21624/* end confdefs.h.  */
21625#if HAVE_SYS_TIME_H
21626             #include <sys/time.h>
21627            #endif
21628            #include <time.h>
21629            #if HAVE_WINSOCK2_H
21630            # include <winsock2.h>
21631            #endif
21632
21633int
21634main (void)
21635{
21636static struct timeval x; x.tv_sec = x.tv_usec;
21637  ;
21638  return 0;
21639}
21640_ACEOF
21641if ac_fn_c_try_compile "$LINENO"
21642then :
21643  gl_cv_sys_struct_timeval=yes
21644else $as_nop
21645  gl_cv_sys_struct_timeval=no
21646fi
21647rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21648
21649fi
21650{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
21651printf "%s\n" "$gl_cv_sys_struct_timeval" >&6; }
21652  if test $gl_cv_sys_struct_timeval != yes; then
21653    HAVE_STRUCT_TIMEVAL=0
21654  else
21655                            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
21656printf %s "checking for wide-enough struct timeval.tv_sec member... " >&6; }
21657if test ${gl_cv_sys_struct_timeval_tv_sec+y}
21658then :
21659  printf %s "(cached) " >&6
21660else $as_nop
21661  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21662/* end confdefs.h.  */
21663#if HAVE_SYS_TIME_H
21664               #include <sys/time.h>
21665              #endif
21666              #include <time.h>
21667              #if HAVE_WINSOCK2_H
21668              # include <winsock2.h>
21669              #endif
21670
21671int
21672main (void)
21673{
21674static struct timeval x;
21675              typedef int verify_tv_sec_type[
21676                sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
21677              ];
21678
21679  ;
21680  return 0;
21681}
21682_ACEOF
21683if ac_fn_c_try_compile "$LINENO"
21684then :
21685  gl_cv_sys_struct_timeval_tv_sec=yes
21686else $as_nop
21687  gl_cv_sys_struct_timeval_tv_sec=no
21688fi
21689rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21690
21691fi
21692{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
21693printf "%s\n" "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
21694    if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
21695      REPLACE_STRUCT_TIMEVAL=1
21696    fi
21697  fi
21698
21699
21700
21701
21702
21703
21704
21705  GL_GNULIB_GETTIMEOFDAY=0
21706
21707
21708
21709
21710
21711
21712
21713  if test -z "$gl_pthreadlib_body_done"; then
21714    gl_pthread_api=no
21715    LIBPTHREAD=
21716    LIBPMULTITHREAD=
21717    # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
21718    # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
21719    ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
21720if test "x$ac_cv_header_pthread_h" = xyes
21721then :
21722  gl_have_pthread_h=yes
21723else $as_nop
21724  gl_have_pthread_h=no
21725fi
21726
21727    if test "$gl_have_pthread_h" = yes; then
21728      # Other possible tests:
21729      #   -lpthreads (FSU threads, PCthreads)
21730      #   -lgthreads
21731      # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
21732      # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
21733      # the second one only in libpthread, and lock.c needs it.
21734      #
21735      # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
21736      # needs -pthread for some reason.  See:
21737      # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
21738      save_LIBS=$LIBS
21739      for gl_pthread in '' '-pthread'; do
21740        LIBS="$LIBS $gl_pthread"
21741        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21742/* end confdefs.h.  */
21743#include <pthread.h>
21744               pthread_mutex_t m;
21745               pthread_mutexattr_t ma;
21746
21747int
21748main (void)
21749{
21750pthread_mutex_lock (&m);
21751               pthread_mutexattr_init (&ma);
21752  ;
21753  return 0;
21754}
21755_ACEOF
21756if ac_fn_c_try_link "$LINENO"
21757then :
21758  gl_pthread_api=yes
21759           LIBPTHREAD=$gl_pthread
21760           LIBPMULTITHREAD=$gl_pthread
21761fi
21762rm -f core conftest.err conftest.$ac_objext conftest.beam \
21763    conftest$ac_exeext conftest.$ac_ext
21764        LIBS=$save_LIBS
21765        test $gl_pthread_api = yes && break
21766      done
21767      echo "$as_me:21767: gl_pthread_api=$gl_pthread_api" >&5
21768      echo "$as_me:21768: LIBPTHREAD=$LIBPTHREAD" >&5
21769
21770      gl_pthread_in_glibc=no
21771      # On Linux with glibc >= 2.34, libc contains the fully functional
21772      # pthread functions.
21773      case "$host_os" in
21774        linux*)
21775          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21776/* end confdefs.h.  */
21777#include <features.h>
21778             #ifdef __GNU_LIBRARY__
21779              #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || (__GLIBC__ > 2)
21780               Lucky user
21781              #endif
21782             #endif
21783
21784_ACEOF
21785if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21786  $EGREP "Lucky user" >/dev/null 2>&1
21787then :
21788  gl_pthread_in_glibc=yes
21789fi
21790rm -rf conftest*
21791
21792          ;;
21793      esac
21794      echo "$as_me:21794: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
21795
21796      # Test for libpthread by looking for pthread_kill. (Not pthread_self,
21797      # since it is defined as a macro on OSF/1.)
21798      if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
21799        # The program links fine without libpthread. But it may actually
21800        # need to link with libpthread in order to create multiple threads.
21801        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
21802printf %s "checking for pthread_kill in -lpthread... " >&6; }
21803if test ${ac_cv_lib_pthread_pthread_kill+y}
21804then :
21805  printf %s "(cached) " >&6
21806else $as_nop
21807  ac_check_lib_save_LIBS=$LIBS
21808LIBS="-lpthread  $LIBS"
21809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21810/* end confdefs.h.  */
21811
21812/* Override any GCC internal prototype to avoid an error.
21813   Use char because int might match the return type of a GCC
21814   builtin and then its argument prototype would still apply.  */
21815char pthread_kill ();
21816int
21817main (void)
21818{
21819return pthread_kill ();
21820  ;
21821  return 0;
21822}
21823_ACEOF
21824if ac_fn_c_try_link "$LINENO"
21825then :
21826  ac_cv_lib_pthread_pthread_kill=yes
21827else $as_nop
21828  ac_cv_lib_pthread_pthread_kill=no
21829fi
21830rm -f core conftest.err conftest.$ac_objext conftest.beam \
21831    conftest$ac_exeext conftest.$ac_ext
21832LIBS=$ac_check_lib_save_LIBS
21833fi
21834{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
21835printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
21836if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
21837then :
21838  if test $gl_pthread_in_glibc = yes; then
21839             LIBPMULTITHREAD=
21840           else
21841             LIBPMULTITHREAD=-lpthread
21842             # On Solaris and HP-UX, most pthread functions exist also in libc.
21843             # Therefore pthread_in_use() needs to actually try to create a
21844             # thread: pthread_create from libc will fail, whereas
21845             # pthread_create will actually create a thread.
21846             # On Solaris 10 or newer, this test is no longer needed, because
21847             # libc contains the fully functional pthread functions.
21848             case "$host_os" in
21849               solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
21850
21851printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
21852
21853             esac
21854           fi
21855
21856fi
21857
21858      elif test $gl_pthread_api != yes; then
21859        # Some library is needed. Try libpthread and libc_r.
21860        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
21861printf %s "checking for pthread_kill in -lpthread... " >&6; }
21862if test ${ac_cv_lib_pthread_pthread_kill+y}
21863then :
21864  printf %s "(cached) " >&6
21865else $as_nop
21866  ac_check_lib_save_LIBS=$LIBS
21867LIBS="-lpthread  $LIBS"
21868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21869/* end confdefs.h.  */
21870
21871/* Override any GCC internal prototype to avoid an error.
21872   Use char because int might match the return type of a GCC
21873   builtin and then its argument prototype would still apply.  */
21874char pthread_kill ();
21875int
21876main (void)
21877{
21878return pthread_kill ();
21879  ;
21880  return 0;
21881}
21882_ACEOF
21883if ac_fn_c_try_link "$LINENO"
21884then :
21885  ac_cv_lib_pthread_pthread_kill=yes
21886else $as_nop
21887  ac_cv_lib_pthread_pthread_kill=no
21888fi
21889rm -f core conftest.err conftest.$ac_objext conftest.beam \
21890    conftest$ac_exeext conftest.$ac_ext
21891LIBS=$ac_check_lib_save_LIBS
21892fi
21893{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
21894printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
21895if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
21896then :
21897  gl_pthread_api=yes
21898           LIBPTHREAD=-lpthread
21899           LIBPMULTITHREAD=-lpthread
21900fi
21901
21902        if test $gl_pthread_api != yes; then
21903          # For FreeBSD 4.
21904          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
21905printf %s "checking for pthread_kill in -lc_r... " >&6; }
21906if test ${ac_cv_lib_c_r_pthread_kill+y}
21907then :
21908  printf %s "(cached) " >&6
21909else $as_nop
21910  ac_check_lib_save_LIBS=$LIBS
21911LIBS="-lc_r  $LIBS"
21912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21913/* end confdefs.h.  */
21914
21915/* Override any GCC internal prototype to avoid an error.
21916   Use char because int might match the return type of a GCC
21917   builtin and then its argument prototype would still apply.  */
21918char pthread_kill ();
21919int
21920main (void)
21921{
21922return pthread_kill ();
21923  ;
21924  return 0;
21925}
21926_ACEOF
21927if ac_fn_c_try_link "$LINENO"
21928then :
21929  ac_cv_lib_c_r_pthread_kill=yes
21930else $as_nop
21931  ac_cv_lib_c_r_pthread_kill=no
21932fi
21933rm -f core conftest.err conftest.$ac_objext conftest.beam \
21934    conftest$ac_exeext conftest.$ac_ext
21935LIBS=$ac_check_lib_save_LIBS
21936fi
21937{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
21938printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
21939if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
21940then :
21941  gl_pthread_api=yes
21942             LIBPTHREAD=-lc_r
21943             LIBPMULTITHREAD=-lc_r
21944fi
21945
21946        fi
21947      fi
21948      echo "$as_me:21948: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
21949    fi
21950    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
21951printf %s "checking whether POSIX threads API is available... " >&6; }
21952    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
21953printf "%s\n" "$gl_pthread_api" >&6; }
21954
21955
21956    if test $gl_pthread_api = yes; then
21957
21958printf "%s\n" "#define HAVE_PTHREAD_API 1" >>confdefs.h
21959
21960    fi
21961
21962        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21963/* end confdefs.h.  */
21964#include <sched.h>
21965int
21966main (void)
21967{
21968sched_yield ();
21969  ;
21970  return 0;
21971}
21972_ACEOF
21973if ac_fn_c_try_link "$LINENO"
21974then :
21975  LIB_SCHED_YIELD=
21976
21977else $as_nop
21978         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
21979printf %s "checking for sched_yield in -lrt... " >&6; }
21980if test ${ac_cv_lib_rt_sched_yield+y}
21981then :
21982  printf %s "(cached) " >&6
21983else $as_nop
21984  ac_check_lib_save_LIBS=$LIBS
21985LIBS="-lrt  $LIBS"
21986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21987/* end confdefs.h.  */
21988
21989/* Override any GCC internal prototype to avoid an error.
21990   Use char because int might match the return type of a GCC
21991   builtin and then its argument prototype would still apply.  */
21992char sched_yield ();
21993int
21994main (void)
21995{
21996return sched_yield ();
21997  ;
21998  return 0;
21999}
22000_ACEOF
22001if ac_fn_c_try_link "$LINENO"
22002then :
22003  ac_cv_lib_rt_sched_yield=yes
22004else $as_nop
22005  ac_cv_lib_rt_sched_yield=no
22006fi
22007rm -f core conftest.err conftest.$ac_objext conftest.beam \
22008    conftest$ac_exeext conftest.$ac_ext
22009LIBS=$ac_check_lib_save_LIBS
22010fi
22011{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
22012printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
22013if test "x$ac_cv_lib_rt_sched_yield" = xyes
22014then :
22015  LIB_SCHED_YIELD=-lrt
22016else $as_nop
22017            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
22018printf %s "checking for sched_yield in -lposix4... " >&6; }
22019if test ${ac_cv_lib_posix4_sched_yield+y}
22020then :
22021  printf %s "(cached) " >&6
22022else $as_nop
22023  ac_check_lib_save_LIBS=$LIBS
22024LIBS="-lposix4  $LIBS"
22025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22026/* end confdefs.h.  */
22027
22028/* Override any GCC internal prototype to avoid an error.
22029   Use char because int might match the return type of a GCC
22030   builtin and then its argument prototype would still apply.  */
22031char sched_yield ();
22032int
22033main (void)
22034{
22035return sched_yield ();
22036  ;
22037  return 0;
22038}
22039_ACEOF
22040if ac_fn_c_try_link "$LINENO"
22041then :
22042  ac_cv_lib_posix4_sched_yield=yes
22043else $as_nop
22044  ac_cv_lib_posix4_sched_yield=no
22045fi
22046rm -f core conftest.err conftest.$ac_objext conftest.beam \
22047    conftest$ac_exeext conftest.$ac_ext
22048LIBS=$ac_check_lib_save_LIBS
22049fi
22050{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
22051printf "%s\n" "$ac_cv_lib_posix4_sched_yield" >&6; }
22052if test "x$ac_cv_lib_posix4_sched_yield" = xyes
22053then :
22054  LIB_SCHED_YIELD=-lposix4
22055fi
22056
22057fi
22058
22059
22060fi
22061rm -f core conftest.err conftest.$ac_objext conftest.beam \
22062    conftest$ac_exeext conftest.$ac_ext
22063
22064
22065    gl_pthreadlib_body_done=done
22066  fi
22067
22068
22069
22070
22071
22072
22073
22074
22075  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
22076printf %s "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
22077if test ${gl_cv_func_setlocale_null_all_mtsafe+y}
22078then :
22079  printf %s "(cached) " >&6
22080else $as_nop
22081  case "$host_os" in
22082       # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
22083       *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
22084         gl_cv_func_setlocale_null_all_mtsafe=no ;;
22085       # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
22086       *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
22087         gl_cv_func_setlocale_null_all_mtsafe=yes ;;
22088       # If we don't know, obey --enable-cross-guesses.
22089       *)
22090         gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
22091     esac
22092
22093fi
22094{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
22095printf "%s\n" "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
22096    case "$host_os" in
22097    mingw*) ;;
22098    *)
22099      if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
22100        gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
22101      fi
22102      ;;
22103  esac
22104  case "$gl_cv_func_setlocale_null_all_mtsafe" in
22105    *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
22106    *)    SETLOCALE_NULL_ALL_MTSAFE=0 ;;
22107  esac
22108
22109printf "%s\n" "#define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE" >>confdefs.h
22110
22111
22112    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
22113printf %s "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
22114if test ${gl_cv_func_setlocale_null_one_mtsafe+y}
22115then :
22116  printf %s "(cached) " >&6
22117else $as_nop
22118  case "$host_os" in
22119       # Guess no on OpenBSD, AIX.
22120       openbsd* | aix*)
22121         gl_cv_func_setlocale_null_one_mtsafe=no ;;
22122       # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
22123       *-gnu* | gnu* | *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
22124         gl_cv_func_setlocale_null_one_mtsafe=yes ;;
22125       # If we don't know, obey --enable-cross-guesses.
22126       *)
22127         gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
22128     esac
22129
22130fi
22131{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
22132printf "%s\n" "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
22133    case "$host_os" in
22134    mingw*) ;;
22135    *)
22136      if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
22137        gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
22138      fi
22139      ;;
22140  esac
22141  case "$gl_cv_func_setlocale_null_one_mtsafe" in
22142    *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
22143    *)    SETLOCALE_NULL_ONE_MTSAFE=0 ;;
22144  esac
22145
22146printf "%s\n" "#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE" >>confdefs.h
22147
22148
22149    if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
22150    case "$host_os" in
22151      mingw*) LIB_SETLOCALE_NULL= ;;
22152      *)
22153
22154
22155  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
22156printf %s "checking whether imported symbols can be declared weak... " >&6; }
22157if test ${gl_cv_have_weak+y}
22158then :
22159  printf %s "(cached) " >&6
22160else $as_nop
22161  gl_cv_have_weak=no
22162          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22163/* end confdefs.h.  */
22164extern void xyzzy ();
22165#pragma weak xyzzy
22166int
22167main (void)
22168{
22169xyzzy();
22170  ;
22171  return 0;
22172}
22173_ACEOF
22174if ac_fn_c_try_link "$LINENO"
22175then :
22176  gl_cv_have_weak=maybe
22177fi
22178rm -f core conftest.err conftest.$ac_objext conftest.beam \
22179    conftest$ac_exeext conftest.$ac_ext
22180     if test $gl_cv_have_weak = maybe; then
22181                     if test "$cross_compiling" = yes
22182then :
22183                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22184/* end confdefs.h.  */
22185#ifdef __ELF__
22186             Extensible Linking Format
22187             #endif
22188
22189_ACEOF
22190if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22191  $EGREP "Extensible Linking Format" >/dev/null 2>&1
22192then :
22193  gl_cv_have_weak="guessing yes"
22194else $as_nop
22195  gl_cv_have_weak="guessing no"
22196fi
22197rm -rf conftest*
22198
22199
22200else $as_nop
22201  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22202/* end confdefs.h.  */
22203
22204#include <stdio.h>
22205#pragma weak fputs
22206int main ()
22207{
22208  return (fputs == NULL);
22209}
22210_ACEOF
22211if ac_fn_c_try_run "$LINENO"
22212then :
22213  gl_cv_have_weak=yes
22214else $as_nop
22215  gl_cv_have_weak=no
22216fi
22217rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22218  conftest.$ac_objext conftest.beam conftest.$ac_ext
22219fi
22220
22221     fi
22222          case " $LDFLAGS " in
22223       *" -static "*) gl_cv_have_weak=no ;;
22224     esac
22225                    case "$gl_cv_have_weak" in
22226       *yes)
22227         case "$host_os" in
22228           freebsd* | dragonfly* | midnightbsd*)
22229             : > conftest1.c
22230             $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
22231             cat <<EOF > conftest2.c
22232#include <pthread.h>
22233#pragma weak pthread_mutexattr_gettype
22234int main ()
22235{
22236  return (pthread_mutexattr_gettype != NULL);
22237}
22238EOF
22239             $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
22240               || gl_cv_have_weak=no
22241             rm -f conftest1.c libempty.so conftest2.c conftest
22242             ;;
22243         esac
22244         ;;
22245     esac
22246
22247fi
22248{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
22249printf "%s\n" "$gl_cv_have_weak" >&6; }
22250  case "$gl_cv_have_weak" in
22251    *yes)
22252
22253printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
22254
22255      ;;
22256  esac
22257
22258        case "$gl_cv_have_weak" in
22259          *yes) LIB_SETLOCALE_NULL= ;;
22260          *)    LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
22261        esac
22262        ;;
22263    esac
22264  else
22265    LIB_SETLOCALE_NULL=
22266  fi
22267
22268
22269
22270
22271  GL_GNULIB_ICONV=0
22272
22273
22274
22275
22276
22277
22278
22279
22280
22281
22282
22283
22284
22285
22286
22287
22288     if test $gl_cv_have_include_next = yes; then
22289       gl_cv_next_iconv_h='<'iconv.h'>'
22290     else
22291       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <iconv.h>" >&5
22292printf %s "checking absolute name of <iconv.h>... " >&6; }
22293if test ${gl_cv_next_iconv_h+y}
22294then :
22295  printf %s "(cached) " >&6
22296else $as_nop
22297
22298             if test $ac_cv_header_iconv_h = yes; then
22299
22300
22301
22302
22303  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22304/* end confdefs.h.  */
22305#include <iconv.h>
22306_ACEOF
22307                case "$host_os" in
22308    aix*) gl_absname_cpp="$ac_cpp -C" ;;
22309    *)    gl_absname_cpp="$ac_cpp" ;;
22310  esac
22311
22312  case "$host_os" in
22313    mingw*)
22314                                          gl_dirsep_regex='[/\\]'
22315      ;;
22316    *)
22317      gl_dirsep_regex='\/'
22318      ;;
22319  esac
22320      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22321  gl_header_literal_regex=`echo 'iconv.h' \
22322                           | sed -e "$gl_make_literal_regex_sed"`
22323  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22324      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22325      s|^/[^/]|//&|
22326      p
22327      q
22328    }'
22329
22330        gl_cv_absolute_iconv_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22331  sed -n "$gl_absolute_header_sed"`
22332
22333           gl_header=$gl_cv_absolute_iconv_h
22334           gl_cv_next_iconv_h='"'$gl_header'"'
22335          else
22336               gl_cv_next_iconv_h='<'iconv.h'>'
22337             fi
22338
22339
22340fi
22341{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_iconv_h" >&5
22342printf "%s\n" "$gl_cv_next_iconv_h" >&6; }
22343     fi
22344     NEXT_ICONV_H=$gl_cv_next_iconv_h
22345
22346     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22347       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22348       gl_next_as_first_directive='<'iconv.h'>'
22349     else
22350       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22351       gl_next_as_first_directive=$gl_cv_next_iconv_h
22352     fi
22353     NEXT_AS_FIRST_DIRECTIVE_ICONV_H=$gl_next_as_first_directive
22354
22355
22356
22357
22358
22359
22360
22361
22362
22363
22364
22365
22366
22367
22368
22369
22370
22371
22372
22373
22374
22375
22376     if test $gl_cv_have_include_next = yes; then
22377       gl_cv_next_limits_h='<'limits.h'>'
22378     else
22379       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
22380printf %s "checking absolute name of <limits.h>... " >&6; }
22381if test ${gl_cv_next_limits_h+y}
22382then :
22383  printf %s "(cached) " >&6
22384else $as_nop
22385
22386             if test $ac_cv_header_limits_h = yes; then
22387
22388
22389
22390
22391  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22392/* end confdefs.h.  */
22393#include <limits.h>
22394_ACEOF
22395                case "$host_os" in
22396    aix*) gl_absname_cpp="$ac_cpp -C" ;;
22397    *)    gl_absname_cpp="$ac_cpp" ;;
22398  esac
22399
22400  case "$host_os" in
22401    mingw*)
22402                                          gl_dirsep_regex='[/\\]'
22403      ;;
22404    *)
22405      gl_dirsep_regex='\/'
22406      ;;
22407  esac
22408      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22409  gl_header_literal_regex=`echo 'limits.h' \
22410                           | sed -e "$gl_make_literal_regex_sed"`
22411  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22412      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22413      s|^/[^/]|//&|
22414      p
22415      q
22416    }'
22417
22418        gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22419  sed -n "$gl_absolute_header_sed"`
22420
22421           gl_header=$gl_cv_absolute_limits_h
22422           gl_cv_next_limits_h='"'$gl_header'"'
22423          else
22424               gl_cv_next_limits_h='<'limits.h'>'
22425             fi
22426
22427
22428fi
22429{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
22430printf "%s\n" "$gl_cv_next_limits_h" >&6; }
22431     fi
22432     NEXT_LIMITS_H=$gl_cv_next_limits_h
22433
22434     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22435       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22436       gl_next_as_first_directive='<'limits.h'>'
22437     else
22438       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22439       gl_next_as_first_directive=$gl_cv_next_limits_h
22440     fi
22441     NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
22442
22443
22444
22445
22446
22447  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether limits.h has WORD_BIT, BOOL_WIDTH etc." >&5
22448printf %s "checking whether limits.h has WORD_BIT, BOOL_WIDTH etc.... " >&6; }
22449if test ${gl_cv_header_limits_width+y}
22450then :
22451  printf %s "(cached) " >&6
22452else $as_nop
22453  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22454/* end confdefs.h.  */
22455#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
22456             #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
22457            #endif
22458            #include <limits.h>
22459            long long llm = LLONG_MAX;
22460            int wb = WORD_BIT;
22461            int ullw = ULLONG_WIDTH;
22462            int bw = BOOL_WIDTH;
22463
22464int
22465main (void)
22466{
22467
22468  ;
22469  return 0;
22470}
22471_ACEOF
22472if ac_fn_c_try_compile "$LINENO"
22473then :
22474  gl_cv_header_limits_width=yes
22475else $as_nop
22476  gl_cv_header_limits_width=no
22477fi
22478rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22479fi
22480{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
22481printf "%s\n" "$gl_cv_header_limits_width" >&6; }
22482  if test "$gl_cv_header_limits_width" = yes; then
22483    LIMITS_H=
22484  else
22485    LIMITS_H=limits.h
22486  fi
22487
22488   if test -n "$LIMITS_H"; then
22489  GL_GENERATE_LIMITS_H_TRUE=
22490  GL_GENERATE_LIMITS_H_FALSE='#'
22491else
22492  GL_GENERATE_LIMITS_H_TRUE='#'
22493  GL_GENERATE_LIMITS_H_FALSE=
22494fi
22495
22496
22497
22498  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
22499printf %s "checking for wint_t... " >&6; }
22500if test ${gt_cv_c_wint_t+y}
22501then :
22502  printf %s "(cached) " >&6
22503else $as_nop
22504  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22505/* end confdefs.h.  */
22506#include <wchar.h>
22507            wint_t foo = (wchar_t)'\0';
22508int
22509main (void)
22510{
22511
22512  ;
22513  return 0;
22514}
22515_ACEOF
22516if ac_fn_c_try_compile "$LINENO"
22517then :
22518  gt_cv_c_wint_t=yes
22519else $as_nop
22520  gt_cv_c_wint_t=no
22521fi
22522rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22523fi
22524{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
22525printf "%s\n" "$gt_cv_c_wint_t" >&6; }
22526  if test $gt_cv_c_wint_t = yes; then
22527
22528printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h
22529
22530
22531            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wint_t is large enough" >&5
22532printf %s "checking whether wint_t is large enough... " >&6; }
22533if test ${gl_cv_type_wint_t_large_enough+y}
22534then :
22535  printf %s "(cached) " >&6
22536else $as_nop
22537  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22538/* end confdefs.h.  */
22539#include <wchar.h>
22540              int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
22541
22542int
22543main (void)
22544{
22545
22546  ;
22547  return 0;
22548}
22549_ACEOF
22550if ac_fn_c_try_compile "$LINENO"
22551then :
22552  gl_cv_type_wint_t_large_enough=yes
22553else $as_nop
22554  gl_cv_type_wint_t_large_enough=no
22555fi
22556rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22557fi
22558{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_large_enough" >&5
22559printf "%s\n" "$gl_cv_type_wint_t_large_enough" >&6; }
22560    if test $gl_cv_type_wint_t_large_enough = no; then
22561      GNULIBHEADERS_OVERRIDE_WINT_T=1
22562    else
22563      GNULIBHEADERS_OVERRIDE_WINT_T=0
22564    fi
22565  else
22566    GNULIBHEADERS_OVERRIDE_WINT_T=0
22567  fi
22568
22569
22570
22571    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler produces multi-arch binaries" >&5
22572printf %s "checking whether the compiler produces multi-arch binaries... " >&6; }
22573if test ${gl_cv_c_multiarch+y}
22574then :
22575  printf %s "(cached) " >&6
22576else $as_nop
22577  gl_cv_c_multiarch=no
22578     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22579/* end confdefs.h.  */
22580#ifndef __APPLE_CC__
22581            not a universal capable compiler
22582           #endif
22583           typedef int dummy;
22584
22585_ACEOF
22586if ac_fn_c_try_compile "$LINENO"
22587then :
22588
22589                        arch=
22590        prev=
22591        for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
22592          if test -n "$prev"; then
22593            case $word in
22594              i?86 | x86_64 | ppc | ppc64 | arm | arm64)
22595                if test -z "$arch" || test "$arch" = "$word"; then
22596                  arch="$word"
22597                else
22598                  gl_cv_c_multiarch=yes
22599                fi
22600                ;;
22601            esac
22602            prev=
22603          else
22604            if test "x$word" = "x-arch"; then
22605              prev=arch
22606            fi
22607          fi
22608        done
22609
22610fi
22611rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22612
22613fi
22614{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_multiarch" >&5
22615printf "%s\n" "$gl_cv_c_multiarch" >&6; }
22616  if test $gl_cv_c_multiarch = yes; then
22617    APPLE_UNIVERSAL_BUILD=1
22618  else
22619    APPLE_UNIVERSAL_BUILD=0
22620  fi
22621
22622
22623
22624
22625
22626
22627
22628
22629printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
22630
22631
22632printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
22633
22634
22635
22636  if test $ac_cv_header_wchar_h = yes; then
22637    HAVE_WCHAR_H=1
22638  else
22639    HAVE_WCHAR_H=0
22640  fi
22641
22642
22643
22644  if test $ac_cv_header_inttypes_h = yes; then
22645    HAVE_INTTYPES_H=1
22646  else
22647    HAVE_INTTYPES_H=0
22648  fi
22649
22650
22651
22652  if test $ac_cv_header_sys_types_h = yes; then
22653    HAVE_SYS_TYPES_H=1
22654  else
22655    HAVE_SYS_TYPES_H=0
22656  fi
22657
22658
22659
22660
22661
22662
22663
22664
22665
22666
22667
22668     if test $gl_cv_have_include_next = yes; then
22669       gl_cv_next_stdint_h='<'stdint.h'>'
22670     else
22671       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
22672printf %s "checking absolute name of <stdint.h>... " >&6; }
22673if test ${gl_cv_next_stdint_h+y}
22674then :
22675  printf %s "(cached) " >&6
22676else $as_nop
22677
22678             if test $ac_cv_header_stdint_h = yes; then
22679
22680
22681
22682
22683  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22684/* end confdefs.h.  */
22685#include <stdint.h>
22686_ACEOF
22687                case "$host_os" in
22688    aix*) gl_absname_cpp="$ac_cpp -C" ;;
22689    *)    gl_absname_cpp="$ac_cpp" ;;
22690  esac
22691
22692  case "$host_os" in
22693    mingw*)
22694                                          gl_dirsep_regex='[/\\]'
22695      ;;
22696    *)
22697      gl_dirsep_regex='\/'
22698      ;;
22699  esac
22700      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22701  gl_header_literal_regex=`echo 'stdint.h' \
22702                           | sed -e "$gl_make_literal_regex_sed"`
22703  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22704      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22705      s|^/[^/]|//&|
22706      p
22707      q
22708    }'
22709
22710        gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22711  sed -n "$gl_absolute_header_sed"`
22712
22713           gl_header=$gl_cv_absolute_stdint_h
22714           gl_cv_next_stdint_h='"'$gl_header'"'
22715          else
22716               gl_cv_next_stdint_h='<'stdint.h'>'
22717             fi
22718
22719
22720fi
22721{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
22722printf "%s\n" "$gl_cv_next_stdint_h" >&6; }
22723     fi
22724     NEXT_STDINT_H=$gl_cv_next_stdint_h
22725
22726     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22727       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22728       gl_next_as_first_directive='<'stdint.h'>'
22729     else
22730       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22731       gl_next_as_first_directive=$gl_cv_next_stdint_h
22732     fi
22733     NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
22734
22735
22736
22737
22738  if test $ac_cv_header_stdint_h = yes; then
22739    HAVE_STDINT_H=1
22740  else
22741    HAVE_STDINT_H=0
22742  fi
22743
22744
22745    if test $ac_cv_header_stdint_h = yes; then
22746    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
22747printf %s "checking whether stdint.h conforms to C99... " >&6; }
22748if test ${gl_cv_header_working_stdint_h+y}
22749then :
22750  printf %s "(cached) " >&6
22751else $as_nop
22752  gl_cv_header_working_stdint_h=no
22753       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22754/* end confdefs.h.  */
22755
22756
22757#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
22758#define __STDC_CONSTANT_MACROS 1
22759#define __STDC_LIMIT_MACROS 1
22760#include <stdint.h>
22761/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
22762#if !(defined WCHAR_MIN && defined WCHAR_MAX)
22763#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
22764#endif
22765
22766
22767  #include <stddef.h>
22768  #include <signal.h>
22769  #if HAVE_WCHAR_H
22770  # include <wchar.h>
22771  #endif
22772
22773
22774#ifdef INT8_MAX
22775int8_t a1 = INT8_MAX;
22776int8_t a1min = INT8_MIN;
22777#endif
22778#ifdef INT16_MAX
22779int16_t a2 = INT16_MAX;
22780int16_t a2min = INT16_MIN;
22781#endif
22782#ifdef INT32_MAX
22783int32_t a3 = INT32_MAX;
22784int32_t a3min = INT32_MIN;
22785#endif
22786#ifdef INT64_MAX
22787int64_t a4 = INT64_MAX;
22788int64_t a4min = INT64_MIN;
22789#endif
22790#ifdef UINT8_MAX
22791uint8_t b1 = UINT8_MAX;
22792#else
22793typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
22794#endif
22795#ifdef UINT16_MAX
22796uint16_t b2 = UINT16_MAX;
22797#endif
22798#ifdef UINT32_MAX
22799uint32_t b3 = UINT32_MAX;
22800#endif
22801#ifdef UINT64_MAX
22802uint64_t b4 = UINT64_MAX;
22803#endif
22804int_least8_t c1 = INT8_C (0x7f);
22805int_least8_t c1max = INT_LEAST8_MAX;
22806int_least8_t c1min = INT_LEAST8_MIN;
22807int_least16_t c2 = INT16_C (0x7fff);
22808int_least16_t c2max = INT_LEAST16_MAX;
22809int_least16_t c2min = INT_LEAST16_MIN;
22810int_least32_t c3 = INT32_C (0x7fffffff);
22811int_least32_t c3max = INT_LEAST32_MAX;
22812int_least32_t c3min = INT_LEAST32_MIN;
22813int_least64_t c4 = INT64_C (0x7fffffffffffffff);
22814int_least64_t c4max = INT_LEAST64_MAX;
22815int_least64_t c4min = INT_LEAST64_MIN;
22816uint_least8_t d1 = UINT8_C (0xff);
22817uint_least8_t d1max = UINT_LEAST8_MAX;
22818uint_least16_t d2 = UINT16_C (0xffff);
22819uint_least16_t d2max = UINT_LEAST16_MAX;
22820uint_least32_t d3 = UINT32_C (0xffffffff);
22821uint_least32_t d3max = UINT_LEAST32_MAX;
22822uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
22823uint_least64_t d4max = UINT_LEAST64_MAX;
22824int_fast8_t e1 = INT_FAST8_MAX;
22825int_fast8_t e1min = INT_FAST8_MIN;
22826int_fast16_t e2 = INT_FAST16_MAX;
22827int_fast16_t e2min = INT_FAST16_MIN;
22828int_fast32_t e3 = INT_FAST32_MAX;
22829int_fast32_t e3min = INT_FAST32_MIN;
22830int_fast64_t e4 = INT_FAST64_MAX;
22831int_fast64_t e4min = INT_FAST64_MIN;
22832uint_fast8_t f1 = UINT_FAST8_MAX;
22833uint_fast16_t f2 = UINT_FAST16_MAX;
22834uint_fast32_t f3 = UINT_FAST32_MAX;
22835uint_fast64_t f4 = UINT_FAST64_MAX;
22836#ifdef INTPTR_MAX
22837intptr_t g = INTPTR_MAX;
22838intptr_t gmin = INTPTR_MIN;
22839#endif
22840#ifdef UINTPTR_MAX
22841uintptr_t h = UINTPTR_MAX;
22842#endif
22843intmax_t i = INTMAX_MAX;
22844uintmax_t j = UINTMAX_MAX;
22845
22846/* Check that SIZE_MAX has the correct type, if possible.  */
22847#if 201112 <= __STDC_VERSION__
22848int k = _Generic (SIZE_MAX, size_t: 0);
22849#elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \
22850       || (0x5110 <= __SUNPRO_C && !__STDC__))
22851extern size_t k;
22852extern __typeof__ (SIZE_MAX) k;
22853#endif
22854
22855#include <limits.h> /* for CHAR_BIT */
22856#define TYPE_MINIMUM(t) \
22857  ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
22858#define TYPE_MAXIMUM(t) \
22859  ((t) ((t) 0 < (t) -1 \
22860        ? (t) -1 \
22861        : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
22862struct s {
22863  int check_PTRDIFF:
22864      PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
22865      && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
22866      ? 1 : -1;
22867  /* Detect bug in FreeBSD 6.0/ia64 and FreeBSD 13.0/arm64.  */
22868  int check_SIG_ATOMIC:
22869      SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
22870      && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
22871      ? 1 : -1;
22872  int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
22873  int check_WCHAR:
22874      WCHAR_MIN == TYPE_MINIMUM (wchar_t)
22875      && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
22876      ? 1 : -1;
22877  /* Detect bug in mingw.  */
22878  int check_WINT:
22879      WINT_MIN == TYPE_MINIMUM (wint_t)
22880      && WINT_MAX == TYPE_MAXIMUM (wint_t)
22881      ? 1 : -1;
22882
22883  /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
22884  int check_UINT8_C:
22885        (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
22886  int check_UINT16_C:
22887        (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
22888
22889  /* Detect bugs in OpenBSD 3.9 stdint.h.  */
22890#ifdef UINT8_MAX
22891  int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
22892#endif
22893#ifdef UINT16_MAX
22894  int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
22895#endif
22896#ifdef UINT32_MAX
22897  int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
22898#endif
22899#ifdef UINT64_MAX
22900  int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
22901#endif
22902  int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
22903  int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
22904  int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
22905  int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
22906  int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
22907  int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
22908  int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
22909  int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
22910  int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
22911  int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
22912  int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
22913};
22914
22915int
22916main (void)
22917{
22918
22919  ;
22920  return 0;
22921}
22922_ACEOF
22923if ac_fn_c_try_compile "$LINENO"
22924then :
22925                                                    if test "$cross_compiling" = yes
22926then :
22927  case "$host_os" in
22928                         # Guess yes on native Windows.
22929                 mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
22930                         # In general, assume it works.
22931                 *)      gl_cv_header_working_stdint_h="guessing yes" ;;
22932               esac
22933
22934else $as_nop
22935  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22936/* end confdefs.h.  */
22937
22938
22939#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
22940#define __STDC_CONSTANT_MACROS 1
22941#define __STDC_LIMIT_MACROS 1
22942#include <stdint.h>
22943
22944
22945  #include <stddef.h>
22946  #include <signal.h>
22947  #if HAVE_WCHAR_H
22948  # include <wchar.h>
22949  #endif
22950
22951
22952#include <stdio.h>
22953#include <string.h>
22954#define MVAL(macro) MVAL1(macro)
22955#define MVAL1(expression) #expression
22956static const char *macro_values[] =
22957  {
22958#ifdef INT8_MAX
22959    MVAL (INT8_MAX),
22960#endif
22961#ifdef INT16_MAX
22962    MVAL (INT16_MAX),
22963#endif
22964#ifdef INT32_MAX
22965    MVAL (INT32_MAX),
22966#endif
22967#ifdef INT64_MAX
22968    MVAL (INT64_MAX),
22969#endif
22970#ifdef UINT8_MAX
22971    MVAL (UINT8_MAX),
22972#endif
22973#ifdef UINT16_MAX
22974    MVAL (UINT16_MAX),
22975#endif
22976#ifdef UINT32_MAX
22977    MVAL (UINT32_MAX),
22978#endif
22979#ifdef UINT64_MAX
22980    MVAL (UINT64_MAX),
22981#endif
22982    NULL
22983  };
22984
22985int
22986main (void)
22987{
22988
22989  const char **mv;
22990  for (mv = macro_values; *mv != NULL; mv++)
22991    {
22992      const char *value = *mv;
22993      /* Test whether it looks like a cast expression.  */
22994      if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
22995          || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
22996          || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
22997          || strncmp (value, "((int)"/*)*/, 6) == 0
22998          || strncmp (value, "((signed short)"/*)*/, 15) == 0
22999          || strncmp (value, "((signed char)"/*)*/, 14) == 0)
23000        return mv - macro_values + 1;
23001    }
23002  return 0;
23003
23004  ;
23005  return 0;
23006}
23007_ACEOF
23008if ac_fn_c_try_run "$LINENO"
23009then :
23010  gl_cv_header_working_stdint_h=yes
23011fi
23012rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23013  conftest.$ac_objext conftest.beam conftest.$ac_ext
23014fi
23015
23016
23017fi
23018rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23019
23020fi
23021{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
23022printf "%s\n" "$gl_cv_header_working_stdint_h" >&6; }
23023  fi
23024
23025  HAVE_C99_STDINT_H=0
23026  HAVE_SYS_BITYPES_H=0
23027  HAVE_SYS_INTTYPES_H=0
23028  STDINT_H=stdint.h
23029  case "$gl_cv_header_working_stdint_h" in
23030    *yes)
23031      HAVE_C99_STDINT_H=1
23032                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h works without ISO C predefines" >&5
23033printf %s "checking whether stdint.h works without ISO C predefines... " >&6; }
23034if test ${gl_cv_header_stdint_without_STDC_macros+y}
23035then :
23036  printf %s "(cached) " >&6
23037else $as_nop
23038  gl_cv_header_stdint_without_STDC_macros=no
23039         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23040/* end confdefs.h.  */
23041
23042
23043#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
23044#include <stdint.h>
23045
23046
23047  #include <stddef.h>
23048  #include <signal.h>
23049  #if HAVE_WCHAR_H
23050  # include <wchar.h>
23051  #endif
23052
23053
23054intmax_t im = INTMAX_MAX;
23055int32_t i32 = INT32_C (0x7fffffff);
23056
23057int
23058main (void)
23059{
23060
23061  ;
23062  return 0;
23063}
23064_ACEOF
23065if ac_fn_c_try_compile "$LINENO"
23066then :
23067  gl_cv_header_stdint_without_STDC_macros=yes
23068fi
23069rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23070
23071fi
23072{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_without_STDC_macros" >&5
23073printf "%s\n" "$gl_cv_header_stdint_without_STDC_macros" >&6; }
23074
23075      if test $gl_cv_header_stdint_without_STDC_macros = no; then
23076
23077printf "%s\n" "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
23078
23079
23080printf "%s\n" "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
23081
23082      fi
23083      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
23084printf %s "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
23085if test ${gl_cv_header_stdint_width+y}
23086then :
23087  printf %s "(cached) " >&6
23088else $as_nop
23089  gl_cv_header_stdint_width=no
23090         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23091/* end confdefs.h.  */
23092
23093              /* Work if build is not clean.  */
23094              #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
23095              #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
23096               #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
23097              #endif
23098              #include <stdint.h>
23099
23100  #include <stddef.h>
23101  #include <signal.h>
23102  #if HAVE_WCHAR_H
23103  # include <wchar.h>
23104  #endif
23105
23106              int iw = UINTMAX_WIDTH;
23107
23108int
23109main (void)
23110{
23111
23112  ;
23113  return 0;
23114}
23115_ACEOF
23116if ac_fn_c_try_compile "$LINENO"
23117then :
23118  gl_cv_header_stdint_width=yes
23119fi
23120rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23121fi
23122{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
23123printf "%s\n" "$gl_cv_header_stdint_width" >&6; }
23124      if test "$gl_cv_header_stdint_width" = yes; then
23125        STDINT_H=
23126      fi
23127      ;;
23128    *)
23129                  ac_fn_c_check_header_compile "$LINENO" "sys/inttypes.h" "ac_cv_header_sys_inttypes_h" "$ac_includes_default"
23130if test "x$ac_cv_header_sys_inttypes_h" = xyes
23131then :
23132  printf "%s\n" "#define HAVE_SYS_INTTYPES_H 1" >>confdefs.h
23133
23134fi
23135ac_fn_c_check_header_compile "$LINENO" "sys/bitypes.h" "ac_cv_header_sys_bitypes_h" "$ac_includes_default"
23136if test "x$ac_cv_header_sys_bitypes_h" = xyes
23137then :
23138  printf "%s\n" "#define HAVE_SYS_BITYPES_H 1" >>confdefs.h
23139
23140fi
23141
23142      if test $ac_cv_header_sys_inttypes_h = yes; then
23143        HAVE_SYS_INTTYPES_H=1
23144      fi
23145      if test $ac_cv_header_sys_bitypes_h = yes; then
23146        HAVE_SYS_BITYPES_H=1
23147      fi
23148
23149
23150  if test $APPLE_UNIVERSAL_BUILD = 0; then
23151
23152
23153  for gltype in ptrdiff_t size_t ; do
23154    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
23155printf %s "checking for bit size of $gltype... " >&6; }
23156if eval test \${gl_cv_bitsizeof_${gltype}+y}
23157then :
23158  printf %s "(cached) " >&6
23159else $as_nop
23160  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
23161  #include <stddef.h>
23162  #include <signal.h>
23163  #if HAVE_WCHAR_H
23164  # include <wchar.h>
23165  #endif
23166
23167#include <limits.h>"
23168then :
23169
23170else $as_nop
23171  result=unknown
23172fi
23173
23174       eval gl_cv_bitsizeof_${gltype}=\$result
23175
23176fi
23177eval ac_res=\$gl_cv_bitsizeof_${gltype}
23178	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23179printf "%s\n" "$ac_res" >&6; }
23180    eval result=\$gl_cv_bitsizeof_${gltype}
23181    if test $result = unknown; then
23182                                                result=0
23183    fi
23184    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
23185    printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
23186
23187    eval BITSIZEOF_${GLTYPE}=\$result
23188  done
23189
23190
23191  fi
23192
23193
23194  for gltype in sig_atomic_t wchar_t wint_t ; do
23195    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
23196printf %s "checking for bit size of $gltype... " >&6; }
23197if eval test \${gl_cv_bitsizeof_${gltype}+y}
23198then :
23199  printf %s "(cached) " >&6
23200else $as_nop
23201  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
23202  #include <stddef.h>
23203  #include <signal.h>
23204  #if HAVE_WCHAR_H
23205  # include <wchar.h>
23206  #endif
23207
23208#include <limits.h>"
23209then :
23210
23211else $as_nop
23212  result=unknown
23213fi
23214
23215       eval gl_cv_bitsizeof_${gltype}=\$result
23216
23217fi
23218eval ac_res=\$gl_cv_bitsizeof_${gltype}
23219	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23220printf "%s\n" "$ac_res" >&6; }
23221    eval result=\$gl_cv_bitsizeof_${gltype}
23222    if test $result = unknown; then
23223                                                result=0
23224    fi
23225    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
23226    printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
23227
23228    eval BITSIZEOF_${GLTYPE}=\$result
23229  done
23230
23231
23232
23233
23234  for gltype in sig_atomic_t wchar_t wint_t ; do
23235    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
23236printf %s "checking whether $gltype is signed... " >&6; }
23237if eval test \${gl_cv_type_${gltype}_signed+y}
23238then :
23239  printf %s "(cached) " >&6
23240else $as_nop
23241  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23242/* end confdefs.h.  */
23243
23244  #include <stddef.h>
23245  #include <signal.h>
23246  #if HAVE_WCHAR_H
23247  # include <wchar.h>
23248  #endif
23249
23250            int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
23251int
23252main (void)
23253{
23254
23255  ;
23256  return 0;
23257}
23258_ACEOF
23259if ac_fn_c_try_compile "$LINENO"
23260then :
23261  result=yes
23262else $as_nop
23263  result=no
23264fi
23265rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23266       eval gl_cv_type_${gltype}_signed=\$result
23267
23268fi
23269eval ac_res=\$gl_cv_type_${gltype}_signed
23270	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23271printf "%s\n" "$ac_res" >&6; }
23272    eval result=\$gl_cv_type_${gltype}_signed
23273    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
23274    if test "$result" = yes; then
23275      printf "%s\n" "#define HAVE_SIGNED_${GLTYPE} 1" >>confdefs.h
23276
23277      eval HAVE_SIGNED_${GLTYPE}=1
23278    else
23279      eval HAVE_SIGNED_${GLTYPE}=0
23280    fi
23281  done
23282
23283
23284  gl_cv_type_ptrdiff_t_signed=yes
23285  gl_cv_type_size_t_signed=no
23286  if test $APPLE_UNIVERSAL_BUILD = 0; then
23287
23288
23289  for gltype in ptrdiff_t size_t ; do
23290    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
23291printf %s "checking for $gltype integer literal suffix... " >&6; }
23292if eval test \${gl_cv_type_${gltype}_suffix+y}
23293then :
23294  printf %s "(cached) " >&6
23295else $as_nop
23296  eval gl_cv_type_${gltype}_suffix=no
23297       eval result=\$gl_cv_type_${gltype}_signed
23298       if test "$result" = yes; then
23299         glsufu=
23300       else
23301         glsufu=u
23302       fi
23303       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
23304         case $glsuf in
23305           '')  gltype1='int';;
23306           l)   gltype1='long int';;
23307           ll)  gltype1='long long int';;
23308           i64) gltype1='__int64';;
23309           u)   gltype1='unsigned int';;
23310           ul)  gltype1='unsigned long int';;
23311           ull) gltype1='unsigned long long int';;
23312           ui64)gltype1='unsigned __int64';;
23313         esac
23314         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23315/* end confdefs.h.  */
23316
23317  #include <stddef.h>
23318  #include <signal.h>
23319  #if HAVE_WCHAR_H
23320  # include <wchar.h>
23321  #endif
23322
23323              extern $gltype foo;
23324              extern $gltype1 foo;
23325int
23326main (void)
23327{
23328
23329  ;
23330  return 0;
23331}
23332_ACEOF
23333if ac_fn_c_try_compile "$LINENO"
23334then :
23335  eval gl_cv_type_${gltype}_suffix=\$glsuf
23336fi
23337rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23338         eval result=\$gl_cv_type_${gltype}_suffix
23339         test "$result" != no && break
23340       done
23341fi
23342eval ac_res=\$gl_cv_type_${gltype}_suffix
23343	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23344printf "%s\n" "$ac_res" >&6; }
23345    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
23346    eval result=\$gl_cv_type_${gltype}_suffix
23347    test "$result" = no && result=
23348    eval ${GLTYPE}_SUFFIX=\$result
23349    printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
23350
23351  done
23352
23353
23354  fi
23355
23356
23357  for gltype in sig_atomic_t wchar_t wint_t ; do
23358    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
23359printf %s "checking for $gltype integer literal suffix... " >&6; }
23360if eval test \${gl_cv_type_${gltype}_suffix+y}
23361then :
23362  printf %s "(cached) " >&6
23363else $as_nop
23364  eval gl_cv_type_${gltype}_suffix=no
23365       eval result=\$gl_cv_type_${gltype}_signed
23366       if test "$result" = yes; then
23367         glsufu=
23368       else
23369         glsufu=u
23370       fi
23371       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
23372         case $glsuf in
23373           '')  gltype1='int';;
23374           l)   gltype1='long int';;
23375           ll)  gltype1='long long int';;
23376           i64) gltype1='__int64';;
23377           u)   gltype1='unsigned int';;
23378           ul)  gltype1='unsigned long int';;
23379           ull) gltype1='unsigned long long int';;
23380           ui64)gltype1='unsigned __int64';;
23381         esac
23382         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23383/* end confdefs.h.  */
23384
23385  #include <stddef.h>
23386  #include <signal.h>
23387  #if HAVE_WCHAR_H
23388  # include <wchar.h>
23389  #endif
23390
23391              extern $gltype foo;
23392              extern $gltype1 foo;
23393int
23394main (void)
23395{
23396
23397  ;
23398  return 0;
23399}
23400_ACEOF
23401if ac_fn_c_try_compile "$LINENO"
23402then :
23403  eval gl_cv_type_${gltype}_suffix=\$glsuf
23404fi
23405rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23406         eval result=\$gl_cv_type_${gltype}_suffix
23407         test "$result" != no && break
23408       done
23409fi
23410eval ac_res=\$gl_cv_type_${gltype}_suffix
23411	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23412printf "%s\n" "$ac_res" >&6; }
23413    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
23414    eval result=\$gl_cv_type_${gltype}_suffix
23415    test "$result" = no && result=
23416    eval ${GLTYPE}_SUFFIX=\$result
23417    printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
23418
23419  done
23420
23421
23422
23423          if test $GNULIBHEADERS_OVERRIDE_WINT_T = 1; then
23424    BITSIZEOF_WINT_T=32
23425  fi
23426
23427      ;;
23428  esac
23429
23430
23431
23432  LIMITS_H='limits.h'
23433   if test -n "$LIMITS_H"; then
23434  GL_GENERATE_LIMITS_H_TRUE=
23435  GL_GENERATE_LIMITS_H_FALSE='#'
23436else
23437  GL_GENERATE_LIMITS_H_TRUE='#'
23438  GL_GENERATE_LIMITS_H_FALSE=
23439fi
23440
23441
23442
23443
23444
23445
23446
23447   if test -n "$STDINT_H"; then
23448  GL_GENERATE_STDINT_H_TRUE=
23449  GL_GENERATE_STDINT_H_FALSE='#'
23450else
23451  GL_GENERATE_STDINT_H_TRUE='#'
23452  GL_GENERATE_STDINT_H_FALSE=
23453fi
23454
23455
23456
23457    HAVE_DECL_IMAXABS=1;
23458  HAVE_DECL_IMAXDIV=1;
23459  HAVE_DECL_STRTOIMAX=1;
23460  HAVE_DECL_STRTOUMAX=1;
23461  HAVE_IMAXDIV_T=1;
23462  REPLACE_STRTOIMAX=0;
23463  REPLACE_STRTOUMAX=0;
23464  INT32_MAX_LT_INTMAX_MAX=1;
23465  INT64_MAX_EQ_LONG_MAX='defined _LP64';
23466  PRIPTR_PREFIX=__PRIPTR_PREFIX;
23467  UINT32_MAX_LT_UINTMAX_MAX=1;
23468  UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
23469
23470
23471
23472
23473
23474
23475
23476
23477
23478
23479
23480
23481
23482
23483
23484     if test $gl_cv_have_include_next = yes; then
23485       gl_cv_next_inttypes_h='<'inttypes.h'>'
23486     else
23487       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
23488printf %s "checking absolute name of <inttypes.h>... " >&6; }
23489if test ${gl_cv_next_inttypes_h+y}
23490then :
23491  printf %s "(cached) " >&6
23492else $as_nop
23493
23494             if test $ac_cv_header_inttypes_h = yes; then
23495
23496
23497
23498
23499  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23500/* end confdefs.h.  */
23501#include <inttypes.h>
23502_ACEOF
23503                case "$host_os" in
23504    aix*) gl_absname_cpp="$ac_cpp -C" ;;
23505    *)    gl_absname_cpp="$ac_cpp" ;;
23506  esac
23507
23508  case "$host_os" in
23509    mingw*)
23510                                          gl_dirsep_regex='[/\\]'
23511      ;;
23512    *)
23513      gl_dirsep_regex='\/'
23514      ;;
23515  esac
23516      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23517  gl_header_literal_regex=`echo 'inttypes.h' \
23518                           | sed -e "$gl_make_literal_regex_sed"`
23519  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23520      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23521      s|^/[^/]|//&|
23522      p
23523      q
23524    }'
23525
23526        gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23527  sed -n "$gl_absolute_header_sed"`
23528
23529           gl_header=$gl_cv_absolute_inttypes_h
23530           gl_cv_next_inttypes_h='"'$gl_header'"'
23531          else
23532               gl_cv_next_inttypes_h='<'inttypes.h'>'
23533             fi
23534
23535
23536fi
23537{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
23538printf "%s\n" "$gl_cv_next_inttypes_h" >&6; }
23539     fi
23540     NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
23541
23542     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23543       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23544       gl_next_as_first_directive='<'inttypes.h'>'
23545     else
23546       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23547       gl_next_as_first_directive=$gl_cv_next_inttypes_h
23548     fi
23549     NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
23550
23551
23552
23553
23554
23555
23556
23557
23558
23559
23560
23561
23562
23563
23564
23565
23566  PRIPTR_PREFIX=
23567  if test -n "$STDINT_H"; then
23568            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23569/* end confdefs.h.  */
23570
23571         #ifdef _WIN64
23572         LLP64
23573         #endif
23574
23575int
23576main (void)
23577{
23578
23579  ;
23580  return 0;
23581}
23582
23583_ACEOF
23584if ac_fn_c_try_compile "$LINENO"
23585then :
23586  PRIPTR_PREFIX='"l"'
23587else $as_nop
23588  PRIPTR_PREFIX='"ll"'
23589fi
23590rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23591  else
23592        for glpfx in '' l ll I64; do
23593      case $glpfx in
23594        '')  gltype1='int';;
23595        l)   gltype1='long int';;
23596        ll)  gltype1='long long int';;
23597        I64) gltype1='__int64';;
23598      esac
23599      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23600/* end confdefs.h.  */
23601#include <stdint.h>
23602           extern intptr_t foo;
23603           extern $gltype1 foo;
23604int
23605main (void)
23606{
23607
23608  ;
23609  return 0;
23610}
23611_ACEOF
23612if ac_fn_c_try_compile "$LINENO"
23613then :
23614  PRIPTR_PREFIX='"'$glpfx'"'
23615fi
23616rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23617      test -n "$PRIPTR_PREFIX" && break
23618    done
23619  fi
23620
23621
23622
23623  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
23624printf %s "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
23625if test ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+y}
23626then :
23627  printf %s "(cached) " >&6
23628else $as_nop
23629  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23630/* end confdefs.h.  */
23631/* Work also in C++ mode.  */
23632            #define __STDC_LIMIT_MACROS 1
23633
23634            /* Work if build is not clean.  */
23635            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
23636
23637            #include <limits.h>
23638            #if HAVE_STDINT_H
23639             #include <stdint.h>
23640            #endif
23641
23642            #if defined INT32_MAX && defined INTMAX_MAX
23643             #define CONDITION (INT32_MAX < INTMAX_MAX)
23644            #else
23645             #define CONDITION (sizeof (int) < sizeof (long long int))
23646            #endif
23647            int test[CONDITION ? 1 : -1];
23648int
23649main (void)
23650{
23651
23652  ;
23653  return 0;
23654}
23655_ACEOF
23656if ac_fn_c_try_compile "$LINENO"
23657then :
23658  gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
23659else $as_nop
23660  gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
23661fi
23662rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23663fi
23664{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
23665printf "%s\n" "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
23666  if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
23667    INT32_MAX_LT_INTMAX_MAX=1;
23668  else
23669    INT32_MAX_LT_INTMAX_MAX=0;
23670  fi
23671
23672
23673  if test $APPLE_UNIVERSAL_BUILD = 0; then
23674
23675  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
23676printf %s "checking whether INT64_MAX == LONG_MAX... " >&6; }
23677if test ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+y}
23678then :
23679  printf %s "(cached) " >&6
23680else $as_nop
23681  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23682/* end confdefs.h.  */
23683/* Work also in C++ mode.  */
23684            #define __STDC_LIMIT_MACROS 1
23685
23686            /* Work if build is not clean.  */
23687            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
23688
23689            #include <limits.h>
23690            #if HAVE_STDINT_H
23691             #include <stdint.h>
23692            #endif
23693
23694            #if defined INT64_MAX
23695             #define CONDITION (INT64_MAX == LONG_MAX)
23696            #else
23697             #define CONDITION (sizeof (long long int) == sizeof (long int))
23698            #endif
23699            int test[CONDITION ? 1 : -1];
23700int
23701main (void)
23702{
23703
23704  ;
23705  return 0;
23706}
23707_ACEOF
23708if ac_fn_c_try_compile "$LINENO"
23709then :
23710  gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
23711else $as_nop
23712  gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
23713fi
23714rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23715fi
23716{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
23717printf "%s\n" "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
23718  if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
23719    INT64_MAX_EQ_LONG_MAX=1;
23720  else
23721    INT64_MAX_EQ_LONG_MAX=0;
23722  fi
23723
23724
23725  else
23726    INT64_MAX_EQ_LONG_MAX=-1
23727  fi
23728
23729  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
23730printf %s "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
23731if test ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+y}
23732then :
23733  printf %s "(cached) " >&6
23734else $as_nop
23735  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23736/* end confdefs.h.  */
23737/* Work also in C++ mode.  */
23738            #define __STDC_LIMIT_MACROS 1
23739
23740            /* Work if build is not clean.  */
23741            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
23742
23743            #include <limits.h>
23744            #if HAVE_STDINT_H
23745             #include <stdint.h>
23746            #endif
23747
23748            #if defined UINT32_MAX && defined UINTMAX_MAX
23749             #define CONDITION (UINT32_MAX < UINTMAX_MAX)
23750            #else
23751             #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
23752            #endif
23753            int test[CONDITION ? 1 : -1];
23754int
23755main (void)
23756{
23757
23758  ;
23759  return 0;
23760}
23761_ACEOF
23762if ac_fn_c_try_compile "$LINENO"
23763then :
23764  gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
23765else $as_nop
23766  gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
23767fi
23768rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23769fi
23770{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
23771printf "%s\n" "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
23772  if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
23773    UINT32_MAX_LT_UINTMAX_MAX=1;
23774  else
23775    UINT32_MAX_LT_UINTMAX_MAX=0;
23776  fi
23777
23778
23779  if test $APPLE_UNIVERSAL_BUILD = 0; then
23780
23781  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
23782printf %s "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
23783if test ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+y}
23784then :
23785  printf %s "(cached) " >&6
23786else $as_nop
23787  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23788/* end confdefs.h.  */
23789/* Work also in C++ mode.  */
23790            #define __STDC_LIMIT_MACROS 1
23791
23792            /* Work if build is not clean.  */
23793            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
23794
23795            #include <limits.h>
23796            #if HAVE_STDINT_H
23797             #include <stdint.h>
23798            #endif
23799
23800            #if defined UINT64_MAX
23801             #define CONDITION (UINT64_MAX == ULONG_MAX)
23802            #else
23803             #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
23804            #endif
23805            int test[CONDITION ? 1 : -1];
23806int
23807main (void)
23808{
23809
23810  ;
23811  return 0;
23812}
23813_ACEOF
23814if ac_fn_c_try_compile "$LINENO"
23815then :
23816  gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
23817else $as_nop
23818  gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
23819fi
23820rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23821fi
23822{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
23823printf "%s\n" "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
23824  if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
23825    UINT64_MAX_EQ_ULONG_MAX=1;
23826  else
23827    UINT64_MAX_EQ_ULONG_MAX=0;
23828  fi
23829
23830
23831  else
23832    UINT64_MAX_EQ_ULONG_MAX=-1
23833  fi
23834
23835
23836
23837
23838  GL_GNULIB_IMAXABS=0
23839
23840
23841
23842  GL_GNULIB_IMAXDIV=0
23843
23844
23845
23846  GL_GNULIB_STRTOIMAX=0
23847
23848
23849
23850  GL_GNULIB_STRTOUMAX=0
23851
23852
23853
23854
23855
23856  GL_GNULIB_IOCTL=0
23857
23858
23859
23860
23861
23862    HAVE_ISWBLANK=1;
23863  HAVE_WCTYPE_T=1;
23864  HAVE_WCTRANS_T=1;
23865  REPLACE_ISWBLANK=0;
23866  REPLACE_ISWDIGIT=0;
23867  REPLACE_ISWXDIGIT=0;
23868
23869
23870
23871
23872
23873  if test $ac_cv_header_crtdefs_h = yes; then
23874    HAVE_CRTDEFS_H=1
23875  else
23876    HAVE_CRTDEFS_H=0
23877  fi
23878
23879
23880
23881
23882
23883
23884
23885
23886  if test $ac_cv_func_iswcntrl = yes; then
23887    HAVE_ISWCNTRL=1
23888  else
23889    HAVE_ISWCNTRL=0
23890  fi
23891
23892
23893
23894  if test $gt_cv_c_wint_t = yes; then
23895    HAVE_WINT_T=1
23896  else
23897    HAVE_WINT_T=0
23898  fi
23899
23900
23901
23902
23903
23904
23905
23906
23907
23908
23909
23910
23911
23912     if test $gl_cv_have_include_next = yes; then
23913       gl_cv_next_wctype_h='<'wctype.h'>'
23914     else
23915       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
23916printf %s "checking absolute name of <wctype.h>... " >&6; }
23917if test ${gl_cv_next_wctype_h+y}
23918then :
23919  printf %s "(cached) " >&6
23920else $as_nop
23921
23922             if test $ac_cv_header_wctype_h = yes; then
23923
23924
23925
23926
23927  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23928/* end confdefs.h.  */
23929#include <wctype.h>
23930_ACEOF
23931                case "$host_os" in
23932    aix*) gl_absname_cpp="$ac_cpp -C" ;;
23933    *)    gl_absname_cpp="$ac_cpp" ;;
23934  esac
23935
23936  case "$host_os" in
23937    mingw*)
23938                                          gl_dirsep_regex='[/\\]'
23939      ;;
23940    *)
23941      gl_dirsep_regex='\/'
23942      ;;
23943  esac
23944      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23945  gl_header_literal_regex=`echo 'wctype.h' \
23946                           | sed -e "$gl_make_literal_regex_sed"`
23947  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23948      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23949      s|^/[^/]|//&|
23950      p
23951      q
23952    }'
23953
23954        gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23955  sed -n "$gl_absolute_header_sed"`
23956
23957           gl_header=$gl_cv_absolute_wctype_h
23958           gl_cv_next_wctype_h='"'$gl_header'"'
23959          else
23960               gl_cv_next_wctype_h='<'wctype.h'>'
23961             fi
23962
23963
23964fi
23965{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
23966printf "%s\n" "$gl_cv_next_wctype_h" >&6; }
23967     fi
23968     NEXT_WCTYPE_H=$gl_cv_next_wctype_h
23969
23970     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23971       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23972       gl_next_as_first_directive='<'wctype.h'>'
23973     else
23974       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23975       gl_next_as_first_directive=$gl_cv_next_wctype_h
23976     fi
23977     NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
23978
23979
23980
23981
23982  if test $ac_cv_header_wctype_h = yes; then
23983    if test $ac_cv_func_iswcntrl = yes; then
23984                  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
23985printf %s "checking whether iswcntrl works... " >&6; }
23986if test ${gl_cv_func_iswcntrl_works+y}
23987then :
23988  printf %s "(cached) " >&6
23989else $as_nop
23990
23991          if test "$cross_compiling" = yes
23992then :
23993               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23994/* end confdefs.h.  */
23995#include <stdlib.h>
23996                          #if __GNU_LIBRARY__ == 1
23997                          Linux libc5 i18n is broken.
23998                          #endif
23999int
24000main (void)
24001{
24002
24003  ;
24004  return 0;
24005}
24006_ACEOF
24007if ac_fn_c_try_compile "$LINENO"
24008then :
24009  gl_cv_func_iswcntrl_works="guessing yes"
24010else $as_nop
24011  gl_cv_func_iswcntrl_works="guessing no"
24012fi
24013rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
24014
24015else $as_nop
24016  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24017/* end confdefs.h.  */
24018
24019               #include <wchar.h>
24020               #include <wctype.h>
24021               int main () { return iswprint ('x') == 0; }
24022
24023_ACEOF
24024if ac_fn_c_try_run "$LINENO"
24025then :
24026  gl_cv_func_iswcntrl_works=yes
24027else $as_nop
24028  gl_cv_func_iswcntrl_works=no
24029fi
24030rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24031  conftest.$ac_objext conftest.beam conftest.$ac_ext
24032fi
24033
24034
24035fi
24036{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
24037printf "%s\n" "$gl_cv_func_iswcntrl_works" >&6; }
24038    fi
24039    HAVE_WCTYPE_H=1
24040  else
24041    HAVE_WCTYPE_H=0
24042  fi
24043
24044
24045  if test $GNULIBHEADERS_OVERRIDE_WINT_T = 1; then
24046    REPLACE_ISWCNTRL=1
24047  else
24048    case "$gl_cv_func_iswcntrl_works" in
24049      *yes) REPLACE_ISWCNTRL=0 ;;
24050      *)    REPLACE_ISWCNTRL=1 ;;
24051    esac
24052  fi
24053
24054
24055  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
24056        :
24057  fi
24058
24059  if test $REPLACE_ISWCNTRL = 1; then
24060    REPLACE_TOWLOWER=1
24061  else
24062    ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
24063if test "x$ac_cv_func_towlower" = xyes
24064then :
24065  printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h
24066
24067fi
24068
24069    if test $ac_cv_func_towlower = yes; then
24070      REPLACE_TOWLOWER=0
24071    else
24072      ac_fn_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "#include <wchar.h>
24073          #if HAVE_WCTYPE_H
24074          # include <wctype.h>
24075          #endif
24076
24077" "$ac_c_undeclared_builtin_options" "CFLAGS"
24078if test "x$ac_cv_have_decl_towlower" = xyes
24079then :
24080  ac_have_decl=1
24081else $as_nop
24082  ac_have_decl=0
24083fi
24084printf "%s\n" "#define HAVE_DECL_TOWLOWER $ac_have_decl" >>confdefs.h
24085
24086      if test $ac_cv_have_decl_towlower = yes; then
24087                                REPLACE_TOWLOWER=1
24088      else
24089        REPLACE_TOWLOWER=0
24090      fi
24091    fi
24092  fi
24093
24094
24095  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
24096        :
24097  fi
24098
24099          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
24100printf %s "checking for wctype_t... " >&6; }
24101if test ${gl_cv_type_wctype_t+y}
24102then :
24103  printf %s "(cached) " >&6
24104else $as_nop
24105  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24106/* end confdefs.h.  */
24107#include <wchar.h>
24108            #if HAVE_WCTYPE_H
24109            # include <wctype.h>
24110            #endif
24111            wctype_t a;
24112
24113int
24114main (void)
24115{
24116
24117  ;
24118  return 0;
24119}
24120_ACEOF
24121if ac_fn_c_try_compile "$LINENO"
24122then :
24123  gl_cv_type_wctype_t=yes
24124else $as_nop
24125  gl_cv_type_wctype_t=no
24126fi
24127rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
24128
24129fi
24130{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
24131printf "%s\n" "$gl_cv_type_wctype_t" >&6; }
24132  if test $gl_cv_type_wctype_t = no; then
24133    HAVE_WCTYPE_T=0
24134  fi
24135
24136      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
24137printf %s "checking for wctrans_t... " >&6; }
24138if test ${gl_cv_type_wctrans_t+y}
24139then :
24140  printf %s "(cached) " >&6
24141else $as_nop
24142  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24143/* end confdefs.h.  */
24144#include <wchar.h>
24145            #include <wctype.h>
24146            wctrans_t a;
24147
24148int
24149main (void)
24150{
24151
24152  ;
24153  return 0;
24154}
24155_ACEOF
24156if ac_fn_c_try_compile "$LINENO"
24157then :
24158  gl_cv_type_wctrans_t=yes
24159else $as_nop
24160  gl_cv_type_wctrans_t=no
24161fi
24162rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
24163
24164fi
24165{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
24166printf "%s\n" "$gl_cv_type_wctrans_t" >&6; }
24167  if test $gl_cv_type_wctrans_t = no; then
24168    HAVE_WCTRANS_T=0
24169  fi
24170
24171
24172
24173
24174
24175
24176
24177
24178  GL_GNULIB_ISWBLANK=0
24179
24180
24181
24182  GL_GNULIB_ISWDIGIT=0
24183
24184
24185
24186  GL_GNULIB_ISWXDIGIT=0
24187
24188
24189
24190  GL_GNULIB_WCTYPE=0
24191
24192
24193
24194  GL_GNULIB_ISWCTYPE=0
24195
24196
24197
24198  GL_GNULIB_WCTRANS=0
24199
24200
24201
24202  GL_GNULIB_TOWCTRANS=0
24203
24204
24205
24206
24207
24208
24209  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
24210printf %s "checking for a traditional japanese locale... " >&6; }
24211if test ${gt_cv_locale_ja+y}
24212then :
24213  printf %s "(cached) " >&6
24214else $as_nop
24215
24216    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24217/* end confdefs.h.  */
24218
24219#include <locale.h>
24220#include <time.h>
24221#if HAVE_LANGINFO_CODESET
24222# include <langinfo.h>
24223#endif
24224#include <stdlib.h>
24225#include <string.h>
24226struct tm t;
24227char buf[16];
24228int main ()
24229{
24230  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
24231     imitates locale dependent behaviour by looking at the environment
24232     variables, and all locales use the UTF-8 encoding.  */
24233#if defined __BEOS__ || defined __HAIKU__
24234  return 1;
24235#else
24236  /* Check whether the given locale name is recognized by the system.  */
24237# if defined _WIN32 && !defined __CYGWIN__
24238  /* On native Windows, setlocale(category, "") looks at the system settings,
24239     not at the environment variables.  Also, when an encoding suffix such
24240     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
24241     category of the locale to "C".  */
24242  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
24243      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
24244    return 1;
24245# else
24246  if (setlocale (LC_ALL, "") == NULL) return 1;
24247# endif
24248  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
24249     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
24250     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
24251     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
24252     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
24253     some unit tests fail.
24254     On MirBSD 10, when an unsupported locale is specified, setlocale()
24255     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
24256# if HAVE_LANGINFO_CODESET
24257  {
24258    const char *cs = nl_langinfo (CODESET);
24259    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
24260        || strcmp (cs, "UTF-8") == 0)
24261      return 1;
24262  }
24263# endif
24264# ifdef __CYGWIN__
24265  /* On Cygwin, avoid locale names without encoding suffix, because the
24266     locale_charset() function relies on the encoding suffix.  Note that
24267     LC_ALL is set on the command line.  */
24268  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
24269# endif
24270  /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
24271     on Cygwin 1.5.x.  */
24272  if (MB_CUR_MAX == 1)
24273    return 1;
24274  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
24275     This excludes the UTF-8 encoding (except on MirBSD).  */
24276  {
24277    const char *p;
24278    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
24279    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
24280    for (p = buf; *p != '\0'; p++)
24281      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
24282        return 1;
24283  }
24284  return 0;
24285#endif
24286}
24287
24288_ACEOF
24289    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
24290  (eval $ac_link) 2>&5
24291  ac_status=$?
24292  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24293  test $ac_status = 0; } && test -s conftest$ac_exeext; then
24294      case "$host_os" in
24295        # Handle native Windows specially, because there setlocale() interprets
24296        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
24297        # "fr" or "fra" as "French" or "French_France.1252",
24298        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
24299        # "ja" as "Japanese" or "Japanese_Japan.932",
24300        # and similar.
24301        mingw*)
24302          # Note that on native Windows, the Japanese locale is
24303          # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
24304          # cannot use it here.
24305          gt_cv_locale_ja=none
24306          ;;
24307        *)
24308          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
24309          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
24310          # configure script would override the LC_ALL setting. Likewise for
24311          # LC_CTYPE, which is also set at the beginning of the configure script.
24312          # Test for the AIX locale name.
24313          if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
24314            gt_cv_locale_ja=ja_JP
24315          else
24316            # Test for the locale name with explicit encoding suffix.
24317            if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
24318              gt_cv_locale_ja=ja_JP.EUC-JP
24319            else
24320              # Test for the HP-UX, OSF/1, NetBSD locale name.
24321              if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
24322                gt_cv_locale_ja=ja_JP.eucJP
24323              else
24324                # Test for the IRIX, FreeBSD locale name.
24325                if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
24326                  gt_cv_locale_ja=ja_JP.EUC
24327                else
24328                  # Test for the Solaris 7 locale name.
24329                  if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
24330                    gt_cv_locale_ja=ja
24331                  else
24332                    # Special test for NetBSD 1.6.
24333                    if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
24334                      gt_cv_locale_ja=ja_JP.eucJP
24335                    else
24336                      # None found.
24337                      gt_cv_locale_ja=none
24338                    fi
24339                  fi
24340                fi
24341              fi
24342            fi
24343          fi
24344          ;;
24345      esac
24346    fi
24347    rm -fr conftest*
24348
24349fi
24350{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
24351printf "%s\n" "$gt_cv_locale_ja" >&6; }
24352  LOCALE_JA=$gt_cv_locale_ja
24353
24354
24355
24356
24357  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
24358printf %s "checking for a french Unicode locale... " >&6; }
24359if test ${gt_cv_locale_fr_utf8+y}
24360then :
24361  printf %s "(cached) " >&6
24362else $as_nop
24363
24364    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24365/* end confdefs.h.  */
24366
24367#include <locale.h>
24368#include <time.h>
24369#if HAVE_LANGINFO_CODESET
24370# include <langinfo.h>
24371#endif
24372#include <stdlib.h>
24373#include <string.h>
24374struct tm t;
24375char buf[16];
24376int main () {
24377  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
24378     imitates locale dependent behaviour by looking at the environment
24379     variables, and all locales use the UTF-8 encoding.  */
24380#if !(defined __BEOS__ || defined __HAIKU__)
24381  /* Check whether the given locale name is recognized by the system.  */
24382# if defined _WIN32 && !defined __CYGWIN__
24383  /* On native Windows, setlocale(category, "") looks at the system settings,
24384     not at the environment variables.  Also, when an encoding suffix such
24385     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
24386     category of the locale to "C".  */
24387  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
24388      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
24389    return 1;
24390# else
24391  if (setlocale (LC_ALL, "") == NULL) return 1;
24392# endif
24393  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
24394     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
24395     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
24396     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
24397     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
24398     some unit tests fail.  */
24399# if HAVE_LANGINFO_CODESET
24400  {
24401    const char *cs = nl_langinfo (CODESET);
24402    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
24403      return 1;
24404  }
24405# endif
24406# ifdef __CYGWIN__
24407  /* On Cygwin, avoid locale names without encoding suffix, because the
24408     locale_charset() function relies on the encoding suffix.  Note that
24409     LC_ALL is set on the command line.  */
24410  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
24411# endif
24412  /* Check whether in the abbreviation of the second month, the second
24413     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
24414     two bytes long, with UTF-8 encoding.  */
24415  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
24416  if (strftime (buf, sizeof (buf), "%b", &t) < 4
24417      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
24418    return 1;
24419#endif
24420#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
24421  /* Check whether the decimal separator is a comma.
24422     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
24423     are nl_langinfo(RADIXCHAR) are both ".".  */
24424  if (localeconv () ->decimal_point[0] != ',') return 1;
24425#endif
24426  return 0;
24427}
24428
24429_ACEOF
24430    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
24431  (eval $ac_link) 2>&5
24432  ac_status=$?
24433  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24434  test $ac_status = 0; } && test -s conftest$ac_exeext; then
24435      case "$host_os" in
24436        # Handle native Windows specially, because there setlocale() interprets
24437        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
24438        # "fr" or "fra" as "French" or "French_France.1252",
24439        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
24440        # "ja" as "Japanese" or "Japanese_Japan.932",
24441        # and similar.
24442        mingw*)
24443          # Test for the hypothetical native Windows locale name.
24444          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
24445            gt_cv_locale_fr_utf8=French_France.65001
24446          else
24447            # None found.
24448            gt_cv_locale_fr_utf8=none
24449          fi
24450          ;;
24451        *)
24452          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
24453          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
24454          # configure script would override the LC_ALL setting. Likewise for
24455          # LC_CTYPE, which is also set at the beginning of the configure script.
24456          # Test for the usual locale name.
24457          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
24458            gt_cv_locale_fr_utf8=fr_FR
24459          else
24460            # Test for the locale name with explicit encoding suffix.
24461            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
24462              gt_cv_locale_fr_utf8=fr_FR.UTF-8
24463            else
24464              # Test for the Solaris 7 locale name.
24465              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
24466                gt_cv_locale_fr_utf8=fr.UTF-8
24467              else
24468                # None found.
24469                gt_cv_locale_fr_utf8=none
24470              fi
24471            fi
24472          fi
24473          ;;
24474      esac
24475    fi
24476    rm -fr conftest*
24477
24478fi
24479{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
24480printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
24481  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
24482
24483
24484
24485
24486
24487  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
24488printf %s "checking for a transitional chinese locale... " >&6; }
24489if test ${gt_cv_locale_zh_CN+y}
24490then :
24491  printf %s "(cached) " >&6
24492else $as_nop
24493
24494    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24495/* end confdefs.h.  */
24496
24497#include <locale.h>
24498#include <stdlib.h>
24499#include <time.h>
24500#if HAVE_LANGINFO_CODESET
24501# include <langinfo.h>
24502#endif
24503#include <stdlib.h>
24504#include <string.h>
24505struct tm t;
24506char buf[16];
24507int main ()
24508{
24509  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
24510     imitates locale dependent behaviour by looking at the environment
24511     variables, and all locales use the UTF-8 encoding.  */
24512#if defined __BEOS__ || defined __HAIKU__
24513  return 1;
24514#else
24515  /* Check whether the given locale name is recognized by the system.  */
24516# if defined _WIN32 && !defined __CYGWIN__
24517  /* On native Windows, setlocale(category, "") looks at the system settings,
24518     not at the environment variables.  Also, when an encoding suffix such
24519     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
24520     category of the locale to "C".  */
24521  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
24522      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
24523    return 1;
24524# else
24525  if (setlocale (LC_ALL, "") == NULL) return 1;
24526# endif
24527  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
24528     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
24529     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
24530     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
24531     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
24532     some unit tests fail.
24533     On MirBSD 10, when an unsupported locale is specified, setlocale()
24534     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
24535# if HAVE_LANGINFO_CODESET
24536  {
24537    const char *cs = nl_langinfo (CODESET);
24538    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
24539        || strcmp (cs, "UTF-8") == 0)
24540      return 1;
24541  }
24542# endif
24543# ifdef __CYGWIN__
24544  /* On Cygwin, avoid locale names without encoding suffix, because the
24545     locale_charset() function relies on the encoding suffix.  Note that
24546     LC_ALL is set on the command line.  */
24547  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
24548# endif
24549  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
24550     This excludes the UTF-8 encoding (except on MirBSD).  */
24551  {
24552    const char *p;
24553    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
24554    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
24555    for (p = buf; *p != '\0'; p++)
24556      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
24557        return 1;
24558  }
24559  /* Check whether a typical GB18030 multibyte sequence is recognized as a
24560     single wide character.  This excludes the GB2312 and GBK encodings.  */
24561  if (mblen ("\203\062\332\066", 5) != 4)
24562    return 1;
24563  return 0;
24564#endif
24565}
24566
24567_ACEOF
24568    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
24569  (eval $ac_link) 2>&5
24570  ac_status=$?
24571  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24572  test $ac_status = 0; } && test -s conftest$ac_exeext; then
24573      case "$host_os" in
24574        # Handle native Windows specially, because there setlocale() interprets
24575        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
24576        # "fr" or "fra" as "French" or "French_France.1252",
24577        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
24578        # "ja" as "Japanese" or "Japanese_Japan.932",
24579        # and similar.
24580        mingw*)
24581          # Test for the hypothetical native Windows locale name.
24582          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
24583            gt_cv_locale_zh_CN=Chinese_China.54936
24584          else
24585            # None found.
24586            gt_cv_locale_zh_CN=none
24587          fi
24588          ;;
24589        solaris2.8)
24590          # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
24591          # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
24592          # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
24593          gt_cv_locale_zh_CN=none
24594          ;;
24595        *)
24596          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
24597          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
24598          # configure script would override the LC_ALL setting. Likewise for
24599          # LC_CTYPE, which is also set at the beginning of the configure script.
24600          # Test for the locale name without encoding suffix.
24601          if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
24602            gt_cv_locale_zh_CN=zh_CN
24603          else
24604            # Test for the locale name with explicit encoding suffix.
24605            if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
24606              gt_cv_locale_zh_CN=zh_CN.GB18030
24607            else
24608              # None found.
24609              gt_cv_locale_zh_CN=none
24610            fi
24611          fi
24612          ;;
24613      esac
24614    else
24615      # If there was a link error, due to mblen(), the system is so old that
24616      # it certainly doesn't have a chinese locale.
24617      gt_cv_locale_zh_CN=none
24618    fi
24619    rm -fr conftest*
24620
24621fi
24622{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
24623printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
24624  LOCALE_ZH_CN=$gt_cv_locale_zh_CN
24625
24626
24627
24628    HAVE_NL_LANGINFO=1;
24629  REPLACE_NL_LANGINFO=0;
24630
24631
24632
24633
24634
24635
24636
24637
24638
24639
24640
24641
24642
24643
24644
24645
24646     if test $gl_cv_have_include_next = yes; then
24647       gl_cv_next_langinfo_h='<'langinfo.h'>'
24648     else
24649       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
24650printf %s "checking absolute name of <langinfo.h>... " >&6; }
24651if test ${gl_cv_next_langinfo_h+y}
24652then :
24653  printf %s "(cached) " >&6
24654else $as_nop
24655
24656             if test $ac_cv_header_langinfo_h = yes; then
24657
24658
24659
24660
24661  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24662/* end confdefs.h.  */
24663#include <langinfo.h>
24664_ACEOF
24665                case "$host_os" in
24666    aix*) gl_absname_cpp="$ac_cpp -C" ;;
24667    *)    gl_absname_cpp="$ac_cpp" ;;
24668  esac
24669
24670  case "$host_os" in
24671    mingw*)
24672                                          gl_dirsep_regex='[/\\]'
24673      ;;
24674    *)
24675      gl_dirsep_regex='\/'
24676      ;;
24677  esac
24678      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24679  gl_header_literal_regex=`echo 'langinfo.h' \
24680                           | sed -e "$gl_make_literal_regex_sed"`
24681  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24682      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24683      s|^/[^/]|//&|
24684      p
24685      q
24686    }'
24687
24688        gl_cv_absolute_langinfo_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24689  sed -n "$gl_absolute_header_sed"`
24690
24691           gl_header=$gl_cv_absolute_langinfo_h
24692           gl_cv_next_langinfo_h='"'$gl_header'"'
24693          else
24694               gl_cv_next_langinfo_h='<'langinfo.h'>'
24695             fi
24696
24697
24698fi
24699{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
24700printf "%s\n" "$gl_cv_next_langinfo_h" >&6; }
24701     fi
24702     NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
24703
24704     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24705       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24706       gl_next_as_first_directive='<'langinfo.h'>'
24707     else
24708       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24709       gl_next_as_first_directive=$gl_cv_next_langinfo_h
24710     fi
24711     NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
24712
24713
24714
24715
24716
24717    HAVE_LANGINFO_CODESET=0
24718  HAVE_LANGINFO_T_FMT_AMPM=0
24719  HAVE_LANGINFO_ALTMON=0
24720  HAVE_LANGINFO_ERA=0
24721  HAVE_LANGINFO_YESEXPR=0
24722
24723  if test $ac_cv_header_langinfo_h = yes; then
24724    HAVE_LANGINFO_H=1
24725                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
24726printf %s "checking whether langinfo.h defines CODESET... " >&6; }
24727if test ${gl_cv_header_langinfo_codeset+y}
24728then :
24729  printf %s "(cached) " >&6
24730else $as_nop
24731  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24732/* end confdefs.h.  */
24733#include <langinfo.h>
24734int a = CODESET;
24735
24736int
24737main (void)
24738{
24739
24740  ;
24741  return 0;
24742}
24743_ACEOF
24744if ac_fn_c_try_compile "$LINENO"
24745then :
24746  gl_cv_header_langinfo_codeset=yes
24747else $as_nop
24748  gl_cv_header_langinfo_codeset=no
24749fi
24750rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
24751
24752fi
24753{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
24754printf "%s\n" "$gl_cv_header_langinfo_codeset" >&6; }
24755    if test $gl_cv_header_langinfo_codeset = yes; then
24756      HAVE_LANGINFO_CODESET=1
24757    fi
24758    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
24759printf %s "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
24760if test ${gl_cv_header_langinfo_t_fmt_ampm+y}
24761then :
24762  printf %s "(cached) " >&6
24763else $as_nop
24764  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24765/* end confdefs.h.  */
24766#include <langinfo.h>
24767int a = T_FMT_AMPM;
24768
24769int
24770main (void)
24771{
24772
24773  ;
24774  return 0;
24775}
24776_ACEOF
24777if ac_fn_c_try_compile "$LINENO"
24778then :
24779  gl_cv_header_langinfo_t_fmt_ampm=yes
24780else $as_nop
24781  gl_cv_header_langinfo_t_fmt_ampm=no
24782fi
24783rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
24784
24785fi
24786{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
24787printf "%s\n" "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
24788    if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
24789      HAVE_LANGINFO_T_FMT_AMPM=1
24790    fi
24791    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ALTMON_1" >&5
24792printf %s "checking whether langinfo.h defines ALTMON_1... " >&6; }
24793if test ${gl_cv_header_langinfo_altmon+y}
24794then :
24795  printf %s "(cached) " >&6
24796else $as_nop
24797  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24798/* end confdefs.h.  */
24799#include <langinfo.h>
24800int a = ALTMON_1;
24801
24802int
24803main (void)
24804{
24805
24806  ;
24807  return 0;
24808}
24809_ACEOF
24810if ac_fn_c_try_compile "$LINENO"
24811then :
24812  gl_cv_header_langinfo_altmon=yes
24813else $as_nop
24814  gl_cv_header_langinfo_altmon=no
24815fi
24816rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
24817
24818fi
24819{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_altmon" >&5
24820printf "%s\n" "$gl_cv_header_langinfo_altmon" >&6; }
24821    if test $gl_cv_header_langinfo_altmon = yes; then
24822      HAVE_LANGINFO_ALTMON=1
24823    fi
24824    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
24825printf %s "checking whether langinfo.h defines ERA... " >&6; }
24826if test ${gl_cv_header_langinfo_era+y}
24827then :
24828  printf %s "(cached) " >&6
24829else $as_nop
24830  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24831/* end confdefs.h.  */
24832#include <langinfo.h>
24833int a = ERA;
24834
24835int
24836main (void)
24837{
24838
24839  ;
24840  return 0;
24841}
24842_ACEOF
24843if ac_fn_c_try_compile "$LINENO"
24844then :
24845  gl_cv_header_langinfo_era=yes
24846else $as_nop
24847  gl_cv_header_langinfo_era=no
24848fi
24849rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
24850
24851fi
24852{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
24853printf "%s\n" "$gl_cv_header_langinfo_era" >&6; }
24854    if test $gl_cv_header_langinfo_era = yes; then
24855      HAVE_LANGINFO_ERA=1
24856    fi
24857    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
24858printf %s "checking whether langinfo.h defines YESEXPR... " >&6; }
24859if test ${gl_cv_header_langinfo_yesexpr+y}
24860then :
24861  printf %s "(cached) " >&6
24862else $as_nop
24863  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24864/* end confdefs.h.  */
24865#include <langinfo.h>
24866int a = YESEXPR;
24867
24868int
24869main (void)
24870{
24871
24872  ;
24873  return 0;
24874}
24875_ACEOF
24876if ac_fn_c_try_compile "$LINENO"
24877then :
24878  gl_cv_header_langinfo_yesexpr=yes
24879else $as_nop
24880  gl_cv_header_langinfo_yesexpr=no
24881fi
24882rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
24883
24884fi
24885{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
24886printf "%s\n" "$gl_cv_header_langinfo_yesexpr" >&6; }
24887    if test $gl_cv_header_langinfo_yesexpr = yes; then
24888      HAVE_LANGINFO_YESEXPR=1
24889    fi
24890  else
24891    HAVE_LANGINFO_H=0
24892  fi
24893
24894
24895
24896
24897
24898
24899
24900
24901
24902
24903
24904
24905
24906  GL_GNULIB_NL_LANGINFO=0
24907
24908
24909
24910
24911
24912
24913
24914
24915
24916      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether included libunistring is requested" >&5
24917printf %s "checking whether included libunistring is requested... " >&6; }
24918
24919# Check whether --with-included-libunistring was given.
24920if test ${with_included_libunistring+y}
24921then :
24922  withval=$with_included_libunistring; gl_libunistring_force_included=$withval
24923else $as_nop
24924  gl_libunistring_force_included=no
24925fi
24926
24927      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_libunistring_force_included" >&5
24928printf "%s\n" "$gl_libunistring_force_included" >&6; }
24929      gl_libunistring_use_included="$gl_libunistring_force_included"
24930      if test "$gl_libunistring_use_included" = yes; then
24931                        if test -z "$HAVE_LIBUNISTRING"; then
24932          HAVE_LIBUNISTRING=no
24933        fi
24934        LIBUNISTRING=
24935        LTLIBUNISTRING=
24936      else
24937
24938
24939  if test -n "$LIBICONV"; then
24940
24941
24942
24943
24944
24945
24946
24947
24948
24949
24950
24951
24952    use_additional=yes
24953
24954  acl_save_prefix="$prefix"
24955  prefix="$acl_final_prefix"
24956  acl_save_exec_prefix="$exec_prefix"
24957  exec_prefix="$acl_final_exec_prefix"
24958
24959    eval additional_includedir=\"$includedir\"
24960    eval additional_libdir=\"$libdir\"
24961    eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
24962    eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
24963
24964  exec_prefix="$acl_save_exec_prefix"
24965  prefix="$acl_save_prefix"
24966
24967
24968# Check whether --with-libunistring-prefix was given.
24969if test ${with_libunistring_prefix+y}
24970then :
24971  withval=$with_libunistring_prefix;
24972    if test "X$withval" = "Xno"; then
24973      use_additional=no
24974    else
24975      if test "X$withval" = "X"; then
24976
24977  acl_save_prefix="$prefix"
24978  prefix="$acl_final_prefix"
24979  acl_save_exec_prefix="$exec_prefix"
24980  exec_prefix="$acl_final_exec_prefix"
24981
24982          eval additional_includedir=\"$includedir\"
24983          eval additional_libdir=\"$libdir\"
24984          eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
24985          eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
24986
24987  exec_prefix="$acl_save_exec_prefix"
24988  prefix="$acl_save_prefix"
24989
24990      else
24991        additional_includedir="$withval/include"
24992        additional_libdir="$withval/$acl_libdirstem"
24993        additional_libdir2="$withval/$acl_libdirstem2"
24994        additional_libdir3="$withval/$acl_libdirstem3"
24995      fi
24996    fi
24997
24998fi
24999
25000  if test "X$additional_libdir2" = "X$additional_libdir"; then
25001    additional_libdir2=
25002  fi
25003  if test "X$additional_libdir3" = "X$additional_libdir"; then
25004    additional_libdir3=
25005  fi
25006      LIBUNISTRING=
25007  LTLIBUNISTRING=
25008  INCUNISTRING=
25009  LIBUNISTRING_PREFIX=
25010      HAVE_LIBUNISTRING=
25011  rpathdirs=
25012  ltrpathdirs=
25013  names_already_handled=
25014  names_next_round='unistring '
25015  while test -n "$names_next_round"; do
25016    names_this_round="$names_next_round"
25017    names_next_round=
25018    for name in $names_this_round; do
25019      already_handled=
25020      for n in $names_already_handled; do
25021        if test "$n" = "$name"; then
25022          already_handled=yes
25023          break
25024        fi
25025      done
25026      if test -z "$already_handled"; then
25027        names_already_handled="$names_already_handled $name"
25028                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
25029        eval value=\"\$HAVE_LIB$uppername\"
25030        if test -n "$value"; then
25031          if test "$value" = yes; then
25032            eval value=\"\$LIB$uppername\"
25033            test -z "$value" || LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$value"
25034            eval value=\"\$LTLIB$uppername\"
25035            test -z "$value" || LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }$value"
25036          else
25037                                    :
25038          fi
25039        else
25040                              found_dir=
25041          found_la=
25042          found_so=
25043          found_a=
25044          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
25045          if test -n "$acl_shlibext"; then
25046            shrext=".$acl_shlibext"             # typically: shrext=.so
25047          else
25048            shrext=
25049          fi
25050          if test $use_additional = yes; then
25051            for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
25052              if test "X$found_dir" = "X"; then
25053                eval dir=\$$additional_libdir_variable
25054                if test -n "$dir"; then
25055                                                      if test -n "$acl_shlibext"; then
25056                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
25057                      found_dir="$dir"
25058                      found_so="$dir/$libname$shrext"
25059                    else
25060                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
25061                        ver=`(cd "$dir" && \
25062                              for f in "$libname$shrext".*; do echo "$f"; done \
25063                              | sed -e "s,^$libname$shrext\\\\.,," \
25064                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
25065                              | sed 1q ) 2>/dev/null`
25066                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
25067                          found_dir="$dir"
25068                          found_so="$dir/$libname$shrext.$ver"
25069                        fi
25070                      else
25071                        eval library_names=\"$acl_library_names_spec\"
25072                        for f in $library_names; do
25073                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
25074                            found_dir="$dir"
25075                            found_so="$dir/$f"
25076                            break
25077                          fi
25078                        done
25079                      fi
25080                    fi
25081                  fi
25082                                    if test "X$found_dir" = "X"; then
25083                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
25084                      found_dir="$dir"
25085                      found_a="$dir/$libname.$acl_libext"
25086                    fi
25087                  fi
25088                  if test "X$found_dir" != "X"; then
25089                    if test -f "$dir/$libname.la"; then
25090                      found_la="$dir/$libname.la"
25091                    fi
25092                  fi
25093                fi
25094              fi
25095            done
25096          fi
25097          if test "X$found_dir" = "X"; then
25098            for x in $LDFLAGS $LTLIBUNISTRING; do
25099
25100  acl_save_prefix="$prefix"
25101  prefix="$acl_final_prefix"
25102  acl_save_exec_prefix="$exec_prefix"
25103  exec_prefix="$acl_final_exec_prefix"
25104  eval x=\"$x\"
25105  exec_prefix="$acl_save_exec_prefix"
25106  prefix="$acl_save_prefix"
25107
25108              case "$x" in
25109                -L*)
25110                  dir=`echo "X$x" | sed -e 's/^X-L//'`
25111                                    if test -n "$acl_shlibext"; then
25112                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
25113                      found_dir="$dir"
25114                      found_so="$dir/$libname$shrext"
25115                    else
25116                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
25117                        ver=`(cd "$dir" && \
25118                              for f in "$libname$shrext".*; do echo "$f"; done \
25119                              | sed -e "s,^$libname$shrext\\\\.,," \
25120                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
25121                              | sed 1q ) 2>/dev/null`
25122                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
25123                          found_dir="$dir"
25124                          found_so="$dir/$libname$shrext.$ver"
25125                        fi
25126                      else
25127                        eval library_names=\"$acl_library_names_spec\"
25128                        for f in $library_names; do
25129                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
25130                            found_dir="$dir"
25131                            found_so="$dir/$f"
25132                            break
25133                          fi
25134                        done
25135                      fi
25136                    fi
25137                  fi
25138                                    if test "X$found_dir" = "X"; then
25139                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
25140                      found_dir="$dir"
25141                      found_a="$dir/$libname.$acl_libext"
25142                    fi
25143                  fi
25144                  if test "X$found_dir" != "X"; then
25145                    if test -f "$dir/$libname.la"; then
25146                      found_la="$dir/$libname.la"
25147                    fi
25148                  fi
25149                  ;;
25150              esac
25151              if test "X$found_dir" != "X"; then
25152                break
25153              fi
25154            done
25155          fi
25156          if test "X$found_dir" != "X"; then
25157                        LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }-L$found_dir -l$name"
25158            if test "X$found_so" != "X"; then
25159                                                        if test "$enable_rpath" = no \
25160                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
25161                 || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
25162                 || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
25163                                LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$found_so"
25164              else
25165                                                                                haveit=
25166                for x in $ltrpathdirs; do
25167                  if test "X$x" = "X$found_dir"; then
25168                    haveit=yes
25169                    break
25170                  fi
25171                done
25172                if test -z "$haveit"; then
25173                  ltrpathdirs="$ltrpathdirs $found_dir"
25174                fi
25175                                if test "$acl_hardcode_direct" = yes; then
25176                                                      LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$found_so"
25177                else
25178                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
25179                                                            LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$found_so"
25180                                                            haveit=
25181                    for x in $rpathdirs; do
25182                      if test "X$x" = "X$found_dir"; then
25183                        haveit=yes
25184                        break
25185                      fi
25186                    done
25187                    if test -z "$haveit"; then
25188                      rpathdirs="$rpathdirs $found_dir"
25189                    fi
25190                  else
25191                                                                                haveit=
25192                    for x in $LDFLAGS $LIBUNISTRING; do
25193
25194  acl_save_prefix="$prefix"
25195  prefix="$acl_final_prefix"
25196  acl_save_exec_prefix="$exec_prefix"
25197  exec_prefix="$acl_final_exec_prefix"
25198  eval x=\"$x\"
25199  exec_prefix="$acl_save_exec_prefix"
25200  prefix="$acl_save_prefix"
25201
25202                      if test "X$x" = "X-L$found_dir"; then
25203                        haveit=yes
25204                        break
25205                      fi
25206                    done
25207                    if test -z "$haveit"; then
25208                      LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }-L$found_dir"
25209                    fi
25210                    if test "$acl_hardcode_minus_L" != no; then
25211                                                                                        LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$found_so"
25212                    else
25213                                                                                                                                                                                LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }-l$name"
25214                    fi
25215                  fi
25216                fi
25217              fi
25218            else
25219              if test "X$found_a" != "X"; then
25220                                LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$found_a"
25221              else
25222                                                LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }-L$found_dir -l$name"
25223              fi
25224            fi
25225                        additional_includedir=
25226            case "$found_dir" in
25227              */$acl_libdirstem | */$acl_libdirstem/)
25228                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
25229                if test "$name" = 'unistring'; then
25230                  LIBUNISTRING_PREFIX="$basedir"
25231                fi
25232                additional_includedir="$basedir/include"
25233                ;;
25234              */$acl_libdirstem2 | */$acl_libdirstem2/)
25235                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
25236                if test "$name" = 'unistring'; then
25237                  LIBUNISTRING_PREFIX="$basedir"
25238                fi
25239                additional_includedir="$basedir/include"
25240                ;;
25241              */$acl_libdirstem3 | */$acl_libdirstem3/)
25242                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
25243                if test "$name" = 'unistring'; then
25244                  LIBUNISTRING_PREFIX="$basedir"
25245                fi
25246                additional_includedir="$basedir/include"
25247                ;;
25248            esac
25249            if test "X$additional_includedir" != "X"; then
25250                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
25251                haveit=
25252                if test "X$additional_includedir" = "X/usr/local/include"; then
25253                  if test -n "$GCC"; then
25254                    case $host_os in
25255                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
25256                    esac
25257                  fi
25258                fi
25259                if test -z "$haveit"; then
25260                  for x in $CPPFLAGS $INCUNISTRING; do
25261
25262  acl_save_prefix="$prefix"
25263  prefix="$acl_final_prefix"
25264  acl_save_exec_prefix="$exec_prefix"
25265  exec_prefix="$acl_final_exec_prefix"
25266  eval x=\"$x\"
25267  exec_prefix="$acl_save_exec_prefix"
25268  prefix="$acl_save_prefix"
25269
25270                    if test "X$x" = "X-I$additional_includedir"; then
25271                      haveit=yes
25272                      break
25273                    fi
25274                  done
25275                  if test -z "$haveit"; then
25276                    if test -d "$additional_includedir"; then
25277                                            INCUNISTRING="${INCUNISTRING}${INCUNISTRING:+ }-I$additional_includedir"
25278                    fi
25279                  fi
25280                fi
25281              fi
25282            fi
25283                        if test -n "$found_la"; then
25284                                                        save_libdir="$libdir"
25285              case "$found_la" in
25286                */* | *\\*) . "$found_la" ;;
25287                *) . "./$found_la" ;;
25288              esac
25289              libdir="$save_libdir"
25290                            for dep in $dependency_libs; do
25291                case "$dep" in
25292                  -L*)
25293                    dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
25294                                                                                                                                                                if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
25295                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
25296                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
25297                      haveit=
25298                      if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
25299                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
25300                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
25301                        if test -n "$GCC"; then
25302                          case $host_os in
25303                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
25304                          esac
25305                        fi
25306                      fi
25307                      if test -z "$haveit"; then
25308                        haveit=
25309                        for x in $LDFLAGS $LIBUNISTRING; do
25310
25311  acl_save_prefix="$prefix"
25312  prefix="$acl_final_prefix"
25313  acl_save_exec_prefix="$exec_prefix"
25314  exec_prefix="$acl_final_exec_prefix"
25315  eval x=\"$x\"
25316  exec_prefix="$acl_save_exec_prefix"
25317  prefix="$acl_save_prefix"
25318
25319                          if test "X$x" = "X-L$dependency_libdir"; then
25320                            haveit=yes
25321                            break
25322                          fi
25323                        done
25324                        if test -z "$haveit"; then
25325                          if test -d "$dependency_libdir"; then
25326                                                        LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }-L$dependency_libdir"
25327                          fi
25328                        fi
25329                        haveit=
25330                        for x in $LDFLAGS $LTLIBUNISTRING; do
25331
25332  acl_save_prefix="$prefix"
25333  prefix="$acl_final_prefix"
25334  acl_save_exec_prefix="$exec_prefix"
25335  exec_prefix="$acl_final_exec_prefix"
25336  eval x=\"$x\"
25337  exec_prefix="$acl_save_exec_prefix"
25338  prefix="$acl_save_prefix"
25339
25340                          if test "X$x" = "X-L$dependency_libdir"; then
25341                            haveit=yes
25342                            break
25343                          fi
25344                        done
25345                        if test -z "$haveit"; then
25346                          if test -d "$dependency_libdir"; then
25347                                                        LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }-L$dependency_libdir"
25348                          fi
25349                        fi
25350                      fi
25351                    fi
25352                    ;;
25353                  -R*)
25354                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
25355                    if test "$enable_rpath" != no; then
25356                                                                  haveit=
25357                      for x in $rpathdirs; do
25358                        if test "X$x" = "X$dir"; then
25359                          haveit=yes
25360                          break
25361                        fi
25362                      done
25363                      if test -z "$haveit"; then
25364                        rpathdirs="$rpathdirs $dir"
25365                      fi
25366                                                                  haveit=
25367                      for x in $ltrpathdirs; do
25368                        if test "X$x" = "X$dir"; then
25369                          haveit=yes
25370                          break
25371                        fi
25372                      done
25373                      if test -z "$haveit"; then
25374                        ltrpathdirs="$ltrpathdirs $dir"
25375                      fi
25376                    fi
25377                    ;;
25378                  -l*)
25379                                                                                                                                                                dep=`echo "X$dep" | sed -e 's/^X-l//'`
25380                    if test "X$dep" != Xc \
25381                       || case $host_os in
25382                            linux* | gnu* | k*bsd*-gnu) false ;;
25383                            *)                          true ;;
25384                          esac; then
25385                      names_next_round="$names_next_round $dep"
25386                    fi
25387                    ;;
25388                  *.la)
25389                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
25390                    ;;
25391                  *)
25392                                        LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$dep"
25393                    LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }$dep"
25394                    ;;
25395                esac
25396              done
25397            fi
25398          else
25399                                                            LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }-l$name"
25400            LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }-l$name"
25401          fi
25402        fi
25403      fi
25404    done
25405  done
25406  if test "X$rpathdirs" != "X"; then
25407    if test -n "$acl_hardcode_libdir_separator"; then
25408                        alldirs=
25409      for found_dir in $rpathdirs; do
25410        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
25411      done
25412            acl_save_libdir="$libdir"
25413      libdir="$alldirs"
25414      eval flag=\"$acl_hardcode_libdir_flag_spec\"
25415      libdir="$acl_save_libdir"
25416      LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$flag"
25417    else
25418            for found_dir in $rpathdirs; do
25419        acl_save_libdir="$libdir"
25420        libdir="$found_dir"
25421        eval flag=\"$acl_hardcode_libdir_flag_spec\"
25422        libdir="$acl_save_libdir"
25423        LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$flag"
25424      done
25425    fi
25426  fi
25427  if test "X$ltrpathdirs" != "X"; then
25428            for found_dir in $ltrpathdirs; do
25429      LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }-R$found_dir"
25430    done
25431  fi
25432
25433
25434
25435
25436
25437
25438        ac_save_CPPFLAGS="$CPPFLAGS"
25439
25440  for element in $INCUNISTRING; do
25441    haveit=
25442    for x in $CPPFLAGS; do
25443
25444  acl_save_prefix="$prefix"
25445  prefix="$acl_final_prefix"
25446  acl_save_exec_prefix="$exec_prefix"
25447  exec_prefix="$acl_final_exec_prefix"
25448  eval x=\"$x\"
25449  exec_prefix="$acl_save_exec_prefix"
25450  prefix="$acl_save_prefix"
25451
25452      if test "X$x" = "X$element"; then
25453        haveit=yes
25454        break
25455      fi
25456    done
25457    if test -z "$haveit"; then
25458      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
25459    fi
25460  done
25461
25462
25463  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libunistring" >&5
25464printf %s "checking for libunistring... " >&6; }
25465if test ${ac_cv_libunistring+y}
25466then :
25467  printf %s "(cached) " >&6
25468else $as_nop
25469
25470    ac_save_LIBS="$LIBS"
25471                                case " $LIBUNISTRING" in
25472      *" -l"*) LIBS="$LIBS $LIBUNISTRING" ;;
25473      *)       LIBS="$LIBUNISTRING $LIBS" ;;
25474    esac
25475    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25476/* end confdefs.h.  */
25477#include <uniconv.h>
25478int
25479main (void)
25480{
25481u8_strconv_from_locale((char*)0);
25482  ;
25483  return 0;
25484}
25485_ACEOF
25486if ac_fn_c_try_link "$LINENO"
25487then :
25488  ac_cv_libunistring=yes
25489else $as_nop
25490  ac_cv_libunistring='no, trying again together with libiconv'
25491fi
25492rm -f core conftest.err conftest.$ac_objext conftest.beam \
25493    conftest$ac_exeext conftest.$ac_ext
25494    LIBS="$ac_save_LIBS"
25495
25496fi
25497{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libunistring" >&5
25498printf "%s\n" "$ac_cv_libunistring" >&6; }
25499  if test "$ac_cv_libunistring" = yes; then
25500    HAVE_LIBUNISTRING=yes
25501
25502printf "%s\n" "#define HAVE_LIBUNISTRING 1" >>confdefs.h
25503
25504    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libunistring" >&5
25505printf %s "checking how to link with libunistring... " >&6; }
25506    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBUNISTRING" >&5
25507printf "%s\n" "$LIBUNISTRING" >&6; }
25508  else
25509    HAVE_LIBUNISTRING=no
25510            CPPFLAGS="$ac_save_CPPFLAGS"
25511    LIBUNISTRING=
25512    LTLIBUNISTRING=
25513    LIBUNISTRING_PREFIX=
25514  fi
25515
25516
25517
25518
25519
25520
25521
25522    if test "$ac_cv_libunistring" != yes; then
25523                        unset ac_cv_libunistring
25524      glus_save_LIBS="$LIBS"
25525      LIBS="$LIBS $LIBICONV"
25526
25527
25528
25529
25530
25531
25532
25533
25534
25535
25536
25537
25538    use_additional=yes
25539
25540  acl_save_prefix="$prefix"
25541  prefix="$acl_final_prefix"
25542  acl_save_exec_prefix="$exec_prefix"
25543  exec_prefix="$acl_final_exec_prefix"
25544
25545    eval additional_includedir=\"$includedir\"
25546    eval additional_libdir=\"$libdir\"
25547    eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
25548    eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
25549
25550  exec_prefix="$acl_save_exec_prefix"
25551  prefix="$acl_save_prefix"
25552
25553
25554# Check whether --with-libunistring-prefix was given.
25555if test ${with_libunistring_prefix+y}
25556then :
25557  withval=$with_libunistring_prefix;
25558    if test "X$withval" = "Xno"; then
25559      use_additional=no
25560    else
25561      if test "X$withval" = "X"; then
25562
25563  acl_save_prefix="$prefix"
25564  prefix="$acl_final_prefix"
25565  acl_save_exec_prefix="$exec_prefix"
25566  exec_prefix="$acl_final_exec_prefix"
25567
25568          eval additional_includedir=\"$includedir\"
25569          eval additional_libdir=\"$libdir\"
25570          eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
25571          eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
25572
25573  exec_prefix="$acl_save_exec_prefix"
25574  prefix="$acl_save_prefix"
25575
25576      else
25577        additional_includedir="$withval/include"
25578        additional_libdir="$withval/$acl_libdirstem"
25579        additional_libdir2="$withval/$acl_libdirstem2"
25580        additional_libdir3="$withval/$acl_libdirstem3"
25581      fi
25582    fi
25583
25584fi
25585
25586  if test "X$additional_libdir2" = "X$additional_libdir"; then
25587    additional_libdir2=
25588  fi
25589  if test "X$additional_libdir3" = "X$additional_libdir"; then
25590    additional_libdir3=
25591  fi
25592      LIBUNISTRING=
25593  LTLIBUNISTRING=
25594  INCUNISTRING=
25595  LIBUNISTRING_PREFIX=
25596      HAVE_LIBUNISTRING=
25597  rpathdirs=
25598  ltrpathdirs=
25599  names_already_handled=
25600  names_next_round='unistring '
25601  while test -n "$names_next_round"; do
25602    names_this_round="$names_next_round"
25603    names_next_round=
25604    for name in $names_this_round; do
25605      already_handled=
25606      for n in $names_already_handled; do
25607        if test "$n" = "$name"; then
25608          already_handled=yes
25609          break
25610        fi
25611      done
25612      if test -z "$already_handled"; then
25613        names_already_handled="$names_already_handled $name"
25614                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
25615        eval value=\"\$HAVE_LIB$uppername\"
25616        if test -n "$value"; then
25617          if test "$value" = yes; then
25618            eval value=\"\$LIB$uppername\"
25619            test -z "$value" || LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$value"
25620            eval value=\"\$LTLIB$uppername\"
25621            test -z "$value" || LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }$value"
25622          else
25623                                    :
25624          fi
25625        else
25626                              found_dir=
25627          found_la=
25628          found_so=
25629          found_a=
25630          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
25631          if test -n "$acl_shlibext"; then
25632            shrext=".$acl_shlibext"             # typically: shrext=.so
25633          else
25634            shrext=
25635          fi
25636          if test $use_additional = yes; then
25637            for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
25638              if test "X$found_dir" = "X"; then
25639                eval dir=\$$additional_libdir_variable
25640                if test -n "$dir"; then
25641                                                      if test -n "$acl_shlibext"; then
25642                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
25643                      found_dir="$dir"
25644                      found_so="$dir/$libname$shrext"
25645                    else
25646                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
25647                        ver=`(cd "$dir" && \
25648                              for f in "$libname$shrext".*; do echo "$f"; done \
25649                              | sed -e "s,^$libname$shrext\\\\.,," \
25650                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
25651                              | sed 1q ) 2>/dev/null`
25652                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
25653                          found_dir="$dir"
25654                          found_so="$dir/$libname$shrext.$ver"
25655                        fi
25656                      else
25657                        eval library_names=\"$acl_library_names_spec\"
25658                        for f in $library_names; do
25659                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
25660                            found_dir="$dir"
25661                            found_so="$dir/$f"
25662                            break
25663                          fi
25664                        done
25665                      fi
25666                    fi
25667                  fi
25668                                    if test "X$found_dir" = "X"; then
25669                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
25670                      found_dir="$dir"
25671                      found_a="$dir/$libname.$acl_libext"
25672                    fi
25673                  fi
25674                  if test "X$found_dir" != "X"; then
25675                    if test -f "$dir/$libname.la"; then
25676                      found_la="$dir/$libname.la"
25677                    fi
25678                  fi
25679                fi
25680              fi
25681            done
25682          fi
25683          if test "X$found_dir" = "X"; then
25684            for x in $LDFLAGS $LTLIBUNISTRING; do
25685
25686  acl_save_prefix="$prefix"
25687  prefix="$acl_final_prefix"
25688  acl_save_exec_prefix="$exec_prefix"
25689  exec_prefix="$acl_final_exec_prefix"
25690  eval x=\"$x\"
25691  exec_prefix="$acl_save_exec_prefix"
25692  prefix="$acl_save_prefix"
25693
25694              case "$x" in
25695                -L*)
25696                  dir=`echo "X$x" | sed -e 's/^X-L//'`
25697                                    if test -n "$acl_shlibext"; then
25698                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
25699                      found_dir="$dir"
25700                      found_so="$dir/$libname$shrext"
25701                    else
25702                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
25703                        ver=`(cd "$dir" && \
25704                              for f in "$libname$shrext".*; do echo "$f"; done \
25705                              | sed -e "s,^$libname$shrext\\\\.,," \
25706                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
25707                              | sed 1q ) 2>/dev/null`
25708                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
25709                          found_dir="$dir"
25710                          found_so="$dir/$libname$shrext.$ver"
25711                        fi
25712                      else
25713                        eval library_names=\"$acl_library_names_spec\"
25714                        for f in $library_names; do
25715                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
25716                            found_dir="$dir"
25717                            found_so="$dir/$f"
25718                            break
25719                          fi
25720                        done
25721                      fi
25722                    fi
25723                  fi
25724                                    if test "X$found_dir" = "X"; then
25725                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
25726                      found_dir="$dir"
25727                      found_a="$dir/$libname.$acl_libext"
25728                    fi
25729                  fi
25730                  if test "X$found_dir" != "X"; then
25731                    if test -f "$dir/$libname.la"; then
25732                      found_la="$dir/$libname.la"
25733                    fi
25734                  fi
25735                  ;;
25736              esac
25737              if test "X$found_dir" != "X"; then
25738                break
25739              fi
25740            done
25741          fi
25742          if test "X$found_dir" != "X"; then
25743                        LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }-L$found_dir -l$name"
25744            if test "X$found_so" != "X"; then
25745                                                        if test "$enable_rpath" = no \
25746                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
25747                 || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
25748                 || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
25749                                LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$found_so"
25750              else
25751                                                                                haveit=
25752                for x in $ltrpathdirs; do
25753                  if test "X$x" = "X$found_dir"; then
25754                    haveit=yes
25755                    break
25756                  fi
25757                done
25758                if test -z "$haveit"; then
25759                  ltrpathdirs="$ltrpathdirs $found_dir"
25760                fi
25761                                if test "$acl_hardcode_direct" = yes; then
25762                                                      LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$found_so"
25763                else
25764                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
25765                                                            LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$found_so"
25766                                                            haveit=
25767                    for x in $rpathdirs; do
25768                      if test "X$x" = "X$found_dir"; then
25769                        haveit=yes
25770                        break
25771                      fi
25772                    done
25773                    if test -z "$haveit"; then
25774                      rpathdirs="$rpathdirs $found_dir"
25775                    fi
25776                  else
25777                                                                                haveit=
25778                    for x in $LDFLAGS $LIBUNISTRING; do
25779
25780  acl_save_prefix="$prefix"
25781  prefix="$acl_final_prefix"
25782  acl_save_exec_prefix="$exec_prefix"
25783  exec_prefix="$acl_final_exec_prefix"
25784  eval x=\"$x\"
25785  exec_prefix="$acl_save_exec_prefix"
25786  prefix="$acl_save_prefix"
25787
25788                      if test "X$x" = "X-L$found_dir"; then
25789                        haveit=yes
25790                        break
25791                      fi
25792                    done
25793                    if test -z "$haveit"; then
25794                      LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }-L$found_dir"
25795                    fi
25796                    if test "$acl_hardcode_minus_L" != no; then
25797                                                                                        LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$found_so"
25798                    else
25799                                                                                                                                                                                LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }-l$name"
25800                    fi
25801                  fi
25802                fi
25803              fi
25804            else
25805              if test "X$found_a" != "X"; then
25806                                LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$found_a"
25807              else
25808                                                LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }-L$found_dir -l$name"
25809              fi
25810            fi
25811                        additional_includedir=
25812            case "$found_dir" in
25813              */$acl_libdirstem | */$acl_libdirstem/)
25814                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
25815                if test "$name" = 'unistring'; then
25816                  LIBUNISTRING_PREFIX="$basedir"
25817                fi
25818                additional_includedir="$basedir/include"
25819                ;;
25820              */$acl_libdirstem2 | */$acl_libdirstem2/)
25821                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
25822                if test "$name" = 'unistring'; then
25823                  LIBUNISTRING_PREFIX="$basedir"
25824                fi
25825                additional_includedir="$basedir/include"
25826                ;;
25827              */$acl_libdirstem3 | */$acl_libdirstem3/)
25828                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
25829                if test "$name" = 'unistring'; then
25830                  LIBUNISTRING_PREFIX="$basedir"
25831                fi
25832                additional_includedir="$basedir/include"
25833                ;;
25834            esac
25835            if test "X$additional_includedir" != "X"; then
25836                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
25837                haveit=
25838                if test "X$additional_includedir" = "X/usr/local/include"; then
25839                  if test -n "$GCC"; then
25840                    case $host_os in
25841                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
25842                    esac
25843                  fi
25844                fi
25845                if test -z "$haveit"; then
25846                  for x in $CPPFLAGS $INCUNISTRING; do
25847
25848  acl_save_prefix="$prefix"
25849  prefix="$acl_final_prefix"
25850  acl_save_exec_prefix="$exec_prefix"
25851  exec_prefix="$acl_final_exec_prefix"
25852  eval x=\"$x\"
25853  exec_prefix="$acl_save_exec_prefix"
25854  prefix="$acl_save_prefix"
25855
25856                    if test "X$x" = "X-I$additional_includedir"; then
25857                      haveit=yes
25858                      break
25859                    fi
25860                  done
25861                  if test -z "$haveit"; then
25862                    if test -d "$additional_includedir"; then
25863                                            INCUNISTRING="${INCUNISTRING}${INCUNISTRING:+ }-I$additional_includedir"
25864                    fi
25865                  fi
25866                fi
25867              fi
25868            fi
25869                        if test -n "$found_la"; then
25870                                                        save_libdir="$libdir"
25871              case "$found_la" in
25872                */* | *\\*) . "$found_la" ;;
25873                *) . "./$found_la" ;;
25874              esac
25875              libdir="$save_libdir"
25876                            for dep in $dependency_libs; do
25877                case "$dep" in
25878                  -L*)
25879                    dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
25880                                                                                                                                                                if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
25881                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
25882                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
25883                      haveit=
25884                      if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
25885                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
25886                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
25887                        if test -n "$GCC"; then
25888                          case $host_os in
25889                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
25890                          esac
25891                        fi
25892                      fi
25893                      if test -z "$haveit"; then
25894                        haveit=
25895                        for x in $LDFLAGS $LIBUNISTRING; do
25896
25897  acl_save_prefix="$prefix"
25898  prefix="$acl_final_prefix"
25899  acl_save_exec_prefix="$exec_prefix"
25900  exec_prefix="$acl_final_exec_prefix"
25901  eval x=\"$x\"
25902  exec_prefix="$acl_save_exec_prefix"
25903  prefix="$acl_save_prefix"
25904
25905                          if test "X$x" = "X-L$dependency_libdir"; then
25906                            haveit=yes
25907                            break
25908                          fi
25909                        done
25910                        if test -z "$haveit"; then
25911                          if test -d "$dependency_libdir"; then
25912                                                        LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }-L$dependency_libdir"
25913                          fi
25914                        fi
25915                        haveit=
25916                        for x in $LDFLAGS $LTLIBUNISTRING; do
25917
25918  acl_save_prefix="$prefix"
25919  prefix="$acl_final_prefix"
25920  acl_save_exec_prefix="$exec_prefix"
25921  exec_prefix="$acl_final_exec_prefix"
25922  eval x=\"$x\"
25923  exec_prefix="$acl_save_exec_prefix"
25924  prefix="$acl_save_prefix"
25925
25926                          if test "X$x" = "X-L$dependency_libdir"; then
25927                            haveit=yes
25928                            break
25929                          fi
25930                        done
25931                        if test -z "$haveit"; then
25932                          if test -d "$dependency_libdir"; then
25933                                                        LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }-L$dependency_libdir"
25934                          fi
25935                        fi
25936                      fi
25937                    fi
25938                    ;;
25939                  -R*)
25940                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
25941                    if test "$enable_rpath" != no; then
25942                                                                  haveit=
25943                      for x in $rpathdirs; do
25944                        if test "X$x" = "X$dir"; then
25945                          haveit=yes
25946                          break
25947                        fi
25948                      done
25949                      if test -z "$haveit"; then
25950                        rpathdirs="$rpathdirs $dir"
25951                      fi
25952                                                                  haveit=
25953                      for x in $ltrpathdirs; do
25954                        if test "X$x" = "X$dir"; then
25955                          haveit=yes
25956                          break
25957                        fi
25958                      done
25959                      if test -z "$haveit"; then
25960                        ltrpathdirs="$ltrpathdirs $dir"
25961                      fi
25962                    fi
25963                    ;;
25964                  -l*)
25965                                                                                                                                                                dep=`echo "X$dep" | sed -e 's/^X-l//'`
25966                    if test "X$dep" != Xc \
25967                       || case $host_os in
25968                            linux* | gnu* | k*bsd*-gnu) false ;;
25969                            *)                          true ;;
25970                          esac; then
25971                      names_next_round="$names_next_round $dep"
25972                    fi
25973                    ;;
25974                  *.la)
25975                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
25976                    ;;
25977                  *)
25978                                        LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$dep"
25979                    LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }$dep"
25980                    ;;
25981                esac
25982              done
25983            fi
25984          else
25985                                                            LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }-l$name"
25986            LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }-l$name"
25987          fi
25988        fi
25989      fi
25990    done
25991  done
25992  if test "X$rpathdirs" != "X"; then
25993    if test -n "$acl_hardcode_libdir_separator"; then
25994                        alldirs=
25995      for found_dir in $rpathdirs; do
25996        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
25997      done
25998            acl_save_libdir="$libdir"
25999      libdir="$alldirs"
26000      eval flag=\"$acl_hardcode_libdir_flag_spec\"
26001      libdir="$acl_save_libdir"
26002      LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$flag"
26003    else
26004            for found_dir in $rpathdirs; do
26005        acl_save_libdir="$libdir"
26006        libdir="$found_dir"
26007        eval flag=\"$acl_hardcode_libdir_flag_spec\"
26008        libdir="$acl_save_libdir"
26009        LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$flag"
26010      done
26011    fi
26012  fi
26013  if test "X$ltrpathdirs" != "X"; then
26014            for found_dir in $ltrpathdirs; do
26015      LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }-R$found_dir"
26016    done
26017  fi
26018
26019
26020
26021
26022
26023
26024        ac_save_CPPFLAGS="$CPPFLAGS"
26025
26026  for element in $INCUNISTRING; do
26027    haveit=
26028    for x in $CPPFLAGS; do
26029
26030  acl_save_prefix="$prefix"
26031  prefix="$acl_final_prefix"
26032  acl_save_exec_prefix="$exec_prefix"
26033  exec_prefix="$acl_final_exec_prefix"
26034  eval x=\"$x\"
26035  exec_prefix="$acl_save_exec_prefix"
26036  prefix="$acl_save_prefix"
26037
26038      if test "X$x" = "X$element"; then
26039        haveit=yes
26040        break
26041      fi
26042    done
26043    if test -z "$haveit"; then
26044      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
26045    fi
26046  done
26047
26048
26049  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libunistring" >&5
26050printf %s "checking for libunistring... " >&6; }
26051if test ${ac_cv_libunistring+y}
26052then :
26053  printf %s "(cached) " >&6
26054else $as_nop
26055
26056    ac_save_LIBS="$LIBS"
26057                                case " $LIBUNISTRING" in
26058      *" -l"*) LIBS="$LIBS $LIBUNISTRING" ;;
26059      *)       LIBS="$LIBUNISTRING $LIBS" ;;
26060    esac
26061    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26062/* end confdefs.h.  */
26063#include <uniconv.h>
26064int
26065main (void)
26066{
26067u8_strconv_from_locale((char*)0);
26068  ;
26069  return 0;
26070}
26071_ACEOF
26072if ac_fn_c_try_link "$LINENO"
26073then :
26074  ac_cv_libunistring=yes
26075else $as_nop
26076  ac_cv_libunistring='no, consider installing GNU libunistring'
26077fi
26078rm -f core conftest.err conftest.$ac_objext conftest.beam \
26079    conftest$ac_exeext conftest.$ac_ext
26080    LIBS="$ac_save_LIBS"
26081
26082fi
26083{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libunistring" >&5
26084printf "%s\n" "$ac_cv_libunistring" >&6; }
26085  if test "$ac_cv_libunistring" = yes; then
26086    HAVE_LIBUNISTRING=yes
26087
26088printf "%s\n" "#define HAVE_LIBUNISTRING 1" >>confdefs.h
26089
26090    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libunistring" >&5
26091printf %s "checking how to link with libunistring... " >&6; }
26092    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBUNISTRING" >&5
26093printf "%s\n" "$LIBUNISTRING" >&6; }
26094  else
26095    HAVE_LIBUNISTRING=no
26096            CPPFLAGS="$ac_save_CPPFLAGS"
26097    LIBUNISTRING=
26098    LTLIBUNISTRING=
26099    LIBUNISTRING_PREFIX=
26100  fi
26101
26102
26103
26104
26105
26106
26107
26108      if test -n "$LIBUNISTRING"; then
26109        LIBUNISTRING="$LIBUNISTRING $LIBICONV"
26110        LTLIBUNISTRING="$LTLIBUNISTRING $LTLIBICONV"
26111      fi
26112      LIBS="$glus_save_LIBS"
26113    fi
26114  else
26115
26116
26117
26118
26119
26120
26121
26122
26123
26124
26125
26126
26127    use_additional=yes
26128
26129  acl_save_prefix="$prefix"
26130  prefix="$acl_final_prefix"
26131  acl_save_exec_prefix="$exec_prefix"
26132  exec_prefix="$acl_final_exec_prefix"
26133
26134    eval additional_includedir=\"$includedir\"
26135    eval additional_libdir=\"$libdir\"
26136    eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
26137    eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
26138
26139  exec_prefix="$acl_save_exec_prefix"
26140  prefix="$acl_save_prefix"
26141
26142
26143# Check whether --with-libunistring-prefix was given.
26144if test ${with_libunistring_prefix+y}
26145then :
26146  withval=$with_libunistring_prefix;
26147    if test "X$withval" = "Xno"; then
26148      use_additional=no
26149    else
26150      if test "X$withval" = "X"; then
26151
26152  acl_save_prefix="$prefix"
26153  prefix="$acl_final_prefix"
26154  acl_save_exec_prefix="$exec_prefix"
26155  exec_prefix="$acl_final_exec_prefix"
26156
26157          eval additional_includedir=\"$includedir\"
26158          eval additional_libdir=\"$libdir\"
26159          eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
26160          eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
26161
26162  exec_prefix="$acl_save_exec_prefix"
26163  prefix="$acl_save_prefix"
26164
26165      else
26166        additional_includedir="$withval/include"
26167        additional_libdir="$withval/$acl_libdirstem"
26168        additional_libdir2="$withval/$acl_libdirstem2"
26169        additional_libdir3="$withval/$acl_libdirstem3"
26170      fi
26171    fi
26172
26173fi
26174
26175  if test "X$additional_libdir2" = "X$additional_libdir"; then
26176    additional_libdir2=
26177  fi
26178  if test "X$additional_libdir3" = "X$additional_libdir"; then
26179    additional_libdir3=
26180  fi
26181      LIBUNISTRING=
26182  LTLIBUNISTRING=
26183  INCUNISTRING=
26184  LIBUNISTRING_PREFIX=
26185      HAVE_LIBUNISTRING=
26186  rpathdirs=
26187  ltrpathdirs=
26188  names_already_handled=
26189  names_next_round='unistring '
26190  while test -n "$names_next_round"; do
26191    names_this_round="$names_next_round"
26192    names_next_round=
26193    for name in $names_this_round; do
26194      already_handled=
26195      for n in $names_already_handled; do
26196        if test "$n" = "$name"; then
26197          already_handled=yes
26198          break
26199        fi
26200      done
26201      if test -z "$already_handled"; then
26202        names_already_handled="$names_already_handled $name"
26203                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
26204        eval value=\"\$HAVE_LIB$uppername\"
26205        if test -n "$value"; then
26206          if test "$value" = yes; then
26207            eval value=\"\$LIB$uppername\"
26208            test -z "$value" || LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$value"
26209            eval value=\"\$LTLIB$uppername\"
26210            test -z "$value" || LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }$value"
26211          else
26212                                    :
26213          fi
26214        else
26215                              found_dir=
26216          found_la=
26217          found_so=
26218          found_a=
26219          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
26220          if test -n "$acl_shlibext"; then
26221            shrext=".$acl_shlibext"             # typically: shrext=.so
26222          else
26223            shrext=
26224          fi
26225          if test $use_additional = yes; then
26226            for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
26227              if test "X$found_dir" = "X"; then
26228                eval dir=\$$additional_libdir_variable
26229                if test -n "$dir"; then
26230                                                      if test -n "$acl_shlibext"; then
26231                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
26232                      found_dir="$dir"
26233                      found_so="$dir/$libname$shrext"
26234                    else
26235                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
26236                        ver=`(cd "$dir" && \
26237                              for f in "$libname$shrext".*; do echo "$f"; done \
26238                              | sed -e "s,^$libname$shrext\\\\.,," \
26239                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
26240                              | sed 1q ) 2>/dev/null`
26241                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
26242                          found_dir="$dir"
26243                          found_so="$dir/$libname$shrext.$ver"
26244                        fi
26245                      else
26246                        eval library_names=\"$acl_library_names_spec\"
26247                        for f in $library_names; do
26248                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
26249                            found_dir="$dir"
26250                            found_so="$dir/$f"
26251                            break
26252                          fi
26253                        done
26254                      fi
26255                    fi
26256                  fi
26257                                    if test "X$found_dir" = "X"; then
26258                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
26259                      found_dir="$dir"
26260                      found_a="$dir/$libname.$acl_libext"
26261                    fi
26262                  fi
26263                  if test "X$found_dir" != "X"; then
26264                    if test -f "$dir/$libname.la"; then
26265                      found_la="$dir/$libname.la"
26266                    fi
26267                  fi
26268                fi
26269              fi
26270            done
26271          fi
26272          if test "X$found_dir" = "X"; then
26273            for x in $LDFLAGS $LTLIBUNISTRING; do
26274
26275  acl_save_prefix="$prefix"
26276  prefix="$acl_final_prefix"
26277  acl_save_exec_prefix="$exec_prefix"
26278  exec_prefix="$acl_final_exec_prefix"
26279  eval x=\"$x\"
26280  exec_prefix="$acl_save_exec_prefix"
26281  prefix="$acl_save_prefix"
26282
26283              case "$x" in
26284                -L*)
26285                  dir=`echo "X$x" | sed -e 's/^X-L//'`
26286                                    if test -n "$acl_shlibext"; then
26287                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
26288                      found_dir="$dir"
26289                      found_so="$dir/$libname$shrext"
26290                    else
26291                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
26292                        ver=`(cd "$dir" && \
26293                              for f in "$libname$shrext".*; do echo "$f"; done \
26294                              | sed -e "s,^$libname$shrext\\\\.,," \
26295                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
26296                              | sed 1q ) 2>/dev/null`
26297                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
26298                          found_dir="$dir"
26299                          found_so="$dir/$libname$shrext.$ver"
26300                        fi
26301                      else
26302                        eval library_names=\"$acl_library_names_spec\"
26303                        for f in $library_names; do
26304                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
26305                            found_dir="$dir"
26306                            found_so="$dir/$f"
26307                            break
26308                          fi
26309                        done
26310                      fi
26311                    fi
26312                  fi
26313                                    if test "X$found_dir" = "X"; then
26314                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
26315                      found_dir="$dir"
26316                      found_a="$dir/$libname.$acl_libext"
26317                    fi
26318                  fi
26319                  if test "X$found_dir" != "X"; then
26320                    if test -f "$dir/$libname.la"; then
26321                      found_la="$dir/$libname.la"
26322                    fi
26323                  fi
26324                  ;;
26325              esac
26326              if test "X$found_dir" != "X"; then
26327                break
26328              fi
26329            done
26330          fi
26331          if test "X$found_dir" != "X"; then
26332                        LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }-L$found_dir -l$name"
26333            if test "X$found_so" != "X"; then
26334                                                        if test "$enable_rpath" = no \
26335                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
26336                 || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
26337                 || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
26338                                LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$found_so"
26339              else
26340                                                                                haveit=
26341                for x in $ltrpathdirs; do
26342                  if test "X$x" = "X$found_dir"; then
26343                    haveit=yes
26344                    break
26345                  fi
26346                done
26347                if test -z "$haveit"; then
26348                  ltrpathdirs="$ltrpathdirs $found_dir"
26349                fi
26350                                if test "$acl_hardcode_direct" = yes; then
26351                                                      LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$found_so"
26352                else
26353                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
26354                                                            LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$found_so"
26355                                                            haveit=
26356                    for x in $rpathdirs; do
26357                      if test "X$x" = "X$found_dir"; then
26358                        haveit=yes
26359                        break
26360                      fi
26361                    done
26362                    if test -z "$haveit"; then
26363                      rpathdirs="$rpathdirs $found_dir"
26364                    fi
26365                  else
26366                                                                                haveit=
26367                    for x in $LDFLAGS $LIBUNISTRING; do
26368
26369  acl_save_prefix="$prefix"
26370  prefix="$acl_final_prefix"
26371  acl_save_exec_prefix="$exec_prefix"
26372  exec_prefix="$acl_final_exec_prefix"
26373  eval x=\"$x\"
26374  exec_prefix="$acl_save_exec_prefix"
26375  prefix="$acl_save_prefix"
26376
26377                      if test "X$x" = "X-L$found_dir"; then
26378                        haveit=yes
26379                        break
26380                      fi
26381                    done
26382                    if test -z "$haveit"; then
26383                      LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }-L$found_dir"
26384                    fi
26385                    if test "$acl_hardcode_minus_L" != no; then
26386                                                                                        LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$found_so"
26387                    else
26388                                                                                                                                                                                LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }-l$name"
26389                    fi
26390                  fi
26391                fi
26392              fi
26393            else
26394              if test "X$found_a" != "X"; then
26395                                LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$found_a"
26396              else
26397                                                LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }-L$found_dir -l$name"
26398              fi
26399            fi
26400                        additional_includedir=
26401            case "$found_dir" in
26402              */$acl_libdirstem | */$acl_libdirstem/)
26403                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
26404                if test "$name" = 'unistring'; then
26405                  LIBUNISTRING_PREFIX="$basedir"
26406                fi
26407                additional_includedir="$basedir/include"
26408                ;;
26409              */$acl_libdirstem2 | */$acl_libdirstem2/)
26410                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
26411                if test "$name" = 'unistring'; then
26412                  LIBUNISTRING_PREFIX="$basedir"
26413                fi
26414                additional_includedir="$basedir/include"
26415                ;;
26416              */$acl_libdirstem3 | */$acl_libdirstem3/)
26417                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
26418                if test "$name" = 'unistring'; then
26419                  LIBUNISTRING_PREFIX="$basedir"
26420                fi
26421                additional_includedir="$basedir/include"
26422                ;;
26423            esac
26424            if test "X$additional_includedir" != "X"; then
26425                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
26426                haveit=
26427                if test "X$additional_includedir" = "X/usr/local/include"; then
26428                  if test -n "$GCC"; then
26429                    case $host_os in
26430                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
26431                    esac
26432                  fi
26433                fi
26434                if test -z "$haveit"; then
26435                  for x in $CPPFLAGS $INCUNISTRING; do
26436
26437  acl_save_prefix="$prefix"
26438  prefix="$acl_final_prefix"
26439  acl_save_exec_prefix="$exec_prefix"
26440  exec_prefix="$acl_final_exec_prefix"
26441  eval x=\"$x\"
26442  exec_prefix="$acl_save_exec_prefix"
26443  prefix="$acl_save_prefix"
26444
26445                    if test "X$x" = "X-I$additional_includedir"; then
26446                      haveit=yes
26447                      break
26448                    fi
26449                  done
26450                  if test -z "$haveit"; then
26451                    if test -d "$additional_includedir"; then
26452                                            INCUNISTRING="${INCUNISTRING}${INCUNISTRING:+ }-I$additional_includedir"
26453                    fi
26454                  fi
26455                fi
26456              fi
26457            fi
26458                        if test -n "$found_la"; then
26459                                                        save_libdir="$libdir"
26460              case "$found_la" in
26461                */* | *\\*) . "$found_la" ;;
26462                *) . "./$found_la" ;;
26463              esac
26464              libdir="$save_libdir"
26465                            for dep in $dependency_libs; do
26466                case "$dep" in
26467                  -L*)
26468                    dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
26469                                                                                                                                                                if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
26470                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
26471                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
26472                      haveit=
26473                      if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
26474                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
26475                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
26476                        if test -n "$GCC"; then
26477                          case $host_os in
26478                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
26479                          esac
26480                        fi
26481                      fi
26482                      if test -z "$haveit"; then
26483                        haveit=
26484                        for x in $LDFLAGS $LIBUNISTRING; do
26485
26486  acl_save_prefix="$prefix"
26487  prefix="$acl_final_prefix"
26488  acl_save_exec_prefix="$exec_prefix"
26489  exec_prefix="$acl_final_exec_prefix"
26490  eval x=\"$x\"
26491  exec_prefix="$acl_save_exec_prefix"
26492  prefix="$acl_save_prefix"
26493
26494                          if test "X$x" = "X-L$dependency_libdir"; then
26495                            haveit=yes
26496                            break
26497                          fi
26498                        done
26499                        if test -z "$haveit"; then
26500                          if test -d "$dependency_libdir"; then
26501                                                        LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }-L$dependency_libdir"
26502                          fi
26503                        fi
26504                        haveit=
26505                        for x in $LDFLAGS $LTLIBUNISTRING; do
26506
26507  acl_save_prefix="$prefix"
26508  prefix="$acl_final_prefix"
26509  acl_save_exec_prefix="$exec_prefix"
26510  exec_prefix="$acl_final_exec_prefix"
26511  eval x=\"$x\"
26512  exec_prefix="$acl_save_exec_prefix"
26513  prefix="$acl_save_prefix"
26514
26515                          if test "X$x" = "X-L$dependency_libdir"; then
26516                            haveit=yes
26517                            break
26518                          fi
26519                        done
26520                        if test -z "$haveit"; then
26521                          if test -d "$dependency_libdir"; then
26522                                                        LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }-L$dependency_libdir"
26523                          fi
26524                        fi
26525                      fi
26526                    fi
26527                    ;;
26528                  -R*)
26529                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
26530                    if test "$enable_rpath" != no; then
26531                                                                  haveit=
26532                      for x in $rpathdirs; do
26533                        if test "X$x" = "X$dir"; then
26534                          haveit=yes
26535                          break
26536                        fi
26537                      done
26538                      if test -z "$haveit"; then
26539                        rpathdirs="$rpathdirs $dir"
26540                      fi
26541                                                                  haveit=
26542                      for x in $ltrpathdirs; do
26543                        if test "X$x" = "X$dir"; then
26544                          haveit=yes
26545                          break
26546                        fi
26547                      done
26548                      if test -z "$haveit"; then
26549                        ltrpathdirs="$ltrpathdirs $dir"
26550                      fi
26551                    fi
26552                    ;;
26553                  -l*)
26554                                                                                                                                                                dep=`echo "X$dep" | sed -e 's/^X-l//'`
26555                    if test "X$dep" != Xc \
26556                       || case $host_os in
26557                            linux* | gnu* | k*bsd*-gnu) false ;;
26558                            *)                          true ;;
26559                          esac; then
26560                      names_next_round="$names_next_round $dep"
26561                    fi
26562                    ;;
26563                  *.la)
26564                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
26565                    ;;
26566                  *)
26567                                        LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$dep"
26568                    LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }$dep"
26569                    ;;
26570                esac
26571              done
26572            fi
26573          else
26574                                                            LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }-l$name"
26575            LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }-l$name"
26576          fi
26577        fi
26578      fi
26579    done
26580  done
26581  if test "X$rpathdirs" != "X"; then
26582    if test -n "$acl_hardcode_libdir_separator"; then
26583                        alldirs=
26584      for found_dir in $rpathdirs; do
26585        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
26586      done
26587            acl_save_libdir="$libdir"
26588      libdir="$alldirs"
26589      eval flag=\"$acl_hardcode_libdir_flag_spec\"
26590      libdir="$acl_save_libdir"
26591      LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$flag"
26592    else
26593            for found_dir in $rpathdirs; do
26594        acl_save_libdir="$libdir"
26595        libdir="$found_dir"
26596        eval flag=\"$acl_hardcode_libdir_flag_spec\"
26597        libdir="$acl_save_libdir"
26598        LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$flag"
26599      done
26600    fi
26601  fi
26602  if test "X$ltrpathdirs" != "X"; then
26603            for found_dir in $ltrpathdirs; do
26604      LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }-R$found_dir"
26605    done
26606  fi
26607
26608
26609
26610
26611
26612
26613        ac_save_CPPFLAGS="$CPPFLAGS"
26614
26615  for element in $INCUNISTRING; do
26616    haveit=
26617    for x in $CPPFLAGS; do
26618
26619  acl_save_prefix="$prefix"
26620  prefix="$acl_final_prefix"
26621  acl_save_exec_prefix="$exec_prefix"
26622  exec_prefix="$acl_final_exec_prefix"
26623  eval x=\"$x\"
26624  exec_prefix="$acl_save_exec_prefix"
26625  prefix="$acl_save_prefix"
26626
26627      if test "X$x" = "X$element"; then
26628        haveit=yes
26629        break
26630      fi
26631    done
26632    if test -z "$haveit"; then
26633      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
26634    fi
26635  done
26636
26637
26638  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libunistring" >&5
26639printf %s "checking for libunistring... " >&6; }
26640if test ${ac_cv_libunistring+y}
26641then :
26642  printf %s "(cached) " >&6
26643else $as_nop
26644
26645    ac_save_LIBS="$LIBS"
26646                                case " $LIBUNISTRING" in
26647      *" -l"*) LIBS="$LIBS $LIBUNISTRING" ;;
26648      *)       LIBS="$LIBUNISTRING $LIBS" ;;
26649    esac
26650    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26651/* end confdefs.h.  */
26652#include <uniconv.h>
26653int
26654main (void)
26655{
26656u8_strconv_from_locale((char*)0);
26657  ;
26658  return 0;
26659}
26660_ACEOF
26661if ac_fn_c_try_link "$LINENO"
26662then :
26663  ac_cv_libunistring=yes
26664else $as_nop
26665  ac_cv_libunistring='no, consider installing GNU libunistring'
26666fi
26667rm -f core conftest.err conftest.$ac_objext conftest.beam \
26668    conftest$ac_exeext conftest.$ac_ext
26669    LIBS="$ac_save_LIBS"
26670
26671fi
26672{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libunistring" >&5
26673printf "%s\n" "$ac_cv_libunistring" >&6; }
26674  if test "$ac_cv_libunistring" = yes; then
26675    HAVE_LIBUNISTRING=yes
26676
26677printf "%s\n" "#define HAVE_LIBUNISTRING 1" >>confdefs.h
26678
26679    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libunistring" >&5
26680printf %s "checking how to link with libunistring... " >&6; }
26681    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBUNISTRING" >&5
26682printf "%s\n" "$LIBUNISTRING" >&6; }
26683  else
26684    HAVE_LIBUNISTRING=no
26685            CPPFLAGS="$ac_save_CPPFLAGS"
26686    LIBUNISTRING=
26687    LTLIBUNISTRING=
26688    LIBUNISTRING_PREFIX=
26689  fi
26690
26691
26692
26693
26694
26695
26696
26697  fi
26698  if test $HAVE_LIBUNISTRING = yes; then
26699        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libunistring version" >&5
26700printf %s "checking for libunistring version... " >&6; }
26701if test ${gl_cv_libunistring_version+y}
26702then :
26703  printf %s "(cached) " >&6
26704else $as_nop
26705  if ac_fn_c_compute_int "$LINENO" "_LIBUNISTRING_VERSION" "gl_libunistring_hexversion"        "#include <unistring/version.h>"
26706then :
26707
26708fi
26709
26710                     if test $gl_libunistring_hexversion = 9; then
26711                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26712/* end confdefs.h.  */
26713#include <unistring/cdefs.h>
26714int
26715main (void)
26716{
26717
26718  ;
26719  return 0;
26720}
26721_ACEOF
26722if ac_fn_c_try_compile "$LINENO"
26723then :
26724  gl_cv_libunistring_version092=true
26725else $as_nop
26726  gl_cv_libunistring_version092=false
26727fi
26728rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26729         if $gl_cv_libunistring_version092; then
26730
26731
26732  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26733/* end confdefs.h.  */
26734#include <unistr.h>
26735_ACEOF
26736                case "$host_os" in
26737    aix*) gl_absname_cpp="$ac_cpp -C" ;;
26738    *)    gl_absname_cpp="$ac_cpp" ;;
26739  esac
26740
26741  case "$host_os" in
26742    mingw*)
26743                                          gl_dirsep_regex='[/\\]'
26744      ;;
26745    *)
26746      gl_dirsep_regex='\/'
26747      ;;
26748  esac
26749      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26750  gl_header_literal_regex=`echo 'unistr.h' \
26751                           | sed -e "$gl_make_literal_regex_sed"`
26752  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26753      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26754      s|^/[^/]|//&|
26755      p
26756      q
26757    }'
26758
26759        gl_cv_absolute_unistr_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26760  sed -n "$gl_absolute_header_sed"`
26761
26762           if test -n "$gl_cv_absolute_unistr_h" \
26763              && grep 'Copy no more than N units of SRC to DEST.  Return a pointer' $gl_cv_absolute_unistr_h > /dev/null; then
26764                          gl_libunistring_hexversion=2307
26765           else
26766                          gl_libunistring_hexversion=2306
26767           fi
26768         else
26769                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26770/* end confdefs.h.  */
26771#include <unicase.h>
26772                  casing_suffix_context_t ct;
26773int
26774main (void)
26775{
26776
26777  ;
26778  return 0;
26779}
26780_ACEOF
26781if ac_fn_c_try_compile "$LINENO"
26782then :
26783  gl_cv_libunistring_version091=true
26784else $as_nop
26785  gl_cv_libunistring_version091=false
26786fi
26787rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26788           if $gl_cv_libunistring_version091; then
26789                          gl_libunistring_hexversion=2305
26790           else
26791                          gl_libunistring_hexversion=2304
26792           fi
26793         fi
26794       fi
26795              gl_libunistring_major=`expr $gl_libunistring_hexversion / 65536`
26796       gl_libunistring_minor=`expr $gl_libunistring_hexversion / 256 % 256`
26797       gl_libunistring_subminor=`expr $gl_libunistring_hexversion % 256`
26798       gl_cv_libunistring_version="$gl_libunistring_major.$gl_libunistring_minor.$gl_libunistring_subminor"
26799
26800fi
26801{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_libunistring_version" >&5
26802printf "%s\n" "$gl_cv_libunistring_version" >&6; }
26803    LIBUNISTRING_VERSION="$gl_cv_libunistring_version"
26804  fi
26805
26806        if test $HAVE_LIBUNISTRING = no; then
26807          gl_libunistring_use_included=yes
26808          LIBUNISTRING=
26809          LTLIBUNISTRING=
26810        fi
26811      fi
26812
26813
26814
26815
26816    HAVE_NEWLOCALE=1;
26817  HAVE_DUPLOCALE=1;
26818  HAVE_FREELOCALE=1;
26819  REPLACE_LOCALECONV=0;
26820  REPLACE_SETLOCALE=0;
26821  REPLACE_NEWLOCALE=0;
26822  REPLACE_DUPLOCALE=0;
26823  REPLACE_FREELOCALE=0;
26824  REPLACE_STRUCT_LCONV=0;
26825  LOCALENAME_ENHANCE_LOCALE_FUNCS=0;
26826
26827
26828    REPLACE_NULL=0;
26829  HAVE_MAX_ALIGN_T=1;
26830  HAVE_WCHAR_T=1;
26831
26832
26833  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
26834printf %s "checking for wchar_t... " >&6; }
26835if test ${gt_cv_c_wchar_t+y}
26836then :
26837  printf %s "(cached) " >&6
26838else $as_nop
26839  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26840/* end confdefs.h.  */
26841#include <stddef.h>
26842            wchar_t foo = (wchar_t)'\0';
26843int
26844main (void)
26845{
26846
26847  ;
26848  return 0;
26849}
26850_ACEOF
26851if ac_fn_c_try_compile "$LINENO"
26852then :
26853  gt_cv_c_wchar_t=yes
26854else $as_nop
26855  gt_cv_c_wchar_t=no
26856fi
26857rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26858fi
26859{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
26860printf "%s\n" "$gt_cv_c_wchar_t" >&6; }
26861  if test $gt_cv_c_wchar_t = yes; then
26862
26863printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h
26864
26865  fi
26866
26867
26868
26869
26870
26871
26872
26873  STDDEF_H=
26874
26875      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
26876printf %s "checking for good max_align_t... " >&6; }
26877if test ${gl_cv_type_max_align_t+y}
26878then :
26879  printf %s "(cached) " >&6
26880else $as_nop
26881  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26882/* end confdefs.h.  */
26883#include <stddef.h>
26884            unsigned int s = sizeof (max_align_t);
26885            #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
26886            int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
26887            int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
26888            #endif
26889            typedef struct { char a; max_align_t b; } max_helper;
26890            typedef struct { char a; long b; } long_helper;
26891            typedef struct { char a; double b; } double_helper;
26892            typedef struct { char a; long double b; } long_double_helper;
26893            int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
26894            int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
26895            int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
26896
26897int
26898main (void)
26899{
26900
26901  ;
26902  return 0;
26903}
26904_ACEOF
26905if ac_fn_c_try_compile "$LINENO"
26906then :
26907  gl_cv_type_max_align_t=yes
26908else $as_nop
26909  gl_cv_type_max_align_t=no
26910fi
26911rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26912
26913fi
26914{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
26915printf "%s\n" "$gl_cv_type_max_align_t" >&6; }
26916  if test $gl_cv_type_max_align_t = no; then
26917    HAVE_MAX_ALIGN_T=0
26918    STDDEF_H=stddef.h
26919  fi
26920
26921  if test $gt_cv_c_wchar_t = no; then
26922    HAVE_WCHAR_T=0
26923    STDDEF_H=stddef.h
26924  fi
26925
26926  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
26927printf %s "checking whether NULL can be used in arbitrary expressions... " >&6; }
26928if test ${gl_cv_decl_null_works+y}
26929then :
26930  printf %s "(cached) " >&6
26931else $as_nop
26932  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26933/* end confdefs.h.  */
26934#include <stddef.h>
26935      int test[2 * (sizeof NULL == sizeof (void *)) -1];
26936
26937int
26938main (void)
26939{
26940
26941  ;
26942  return 0;
26943}
26944_ACEOF
26945if ac_fn_c_try_compile "$LINENO"
26946then :
26947  gl_cv_decl_null_works=yes
26948else $as_nop
26949  gl_cv_decl_null_works=no
26950fi
26951rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26952fi
26953{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
26954printf "%s\n" "$gl_cv_decl_null_works" >&6; }
26955  if test $gl_cv_decl_null_works = no; then
26956    REPLACE_NULL=1
26957    STDDEF_H=stddef.h
26958  fi
26959
26960
26961   if test -n "$STDDEF_H"; then
26962  GL_GENERATE_STDDEF_H_TRUE=
26963  GL_GENERATE_STDDEF_H_FALSE='#'
26964else
26965  GL_GENERATE_STDDEF_H_TRUE='#'
26966  GL_GENERATE_STDDEF_H_FALSE=
26967fi
26968
26969  if test -n "$STDDEF_H"; then
26970
26971
26972
26973
26974
26975
26976
26977
26978     if test $gl_cv_have_include_next = yes; then
26979       gl_cv_next_stddef_h='<'stddef.h'>'
26980     else
26981       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
26982printf %s "checking absolute name of <stddef.h>... " >&6; }
26983if test ${gl_cv_next_stddef_h+y}
26984then :
26985  printf %s "(cached) " >&6
26986else $as_nop
26987
26988
26989
26990  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26991/* end confdefs.h.  */
26992#include <stddef.h>
26993_ACEOF
26994                case "$host_os" in
26995    aix*) gl_absname_cpp="$ac_cpp -C" ;;
26996    *)    gl_absname_cpp="$ac_cpp" ;;
26997  esac
26998
26999  case "$host_os" in
27000    mingw*)
27001                                          gl_dirsep_regex='[/\\]'
27002      ;;
27003    *)
27004      gl_dirsep_regex='\/'
27005      ;;
27006  esac
27007      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27008  gl_header_literal_regex=`echo 'stddef.h' \
27009                           | sed -e "$gl_make_literal_regex_sed"`
27010  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27011      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27012      s|^/[^/]|//&|
27013      p
27014      q
27015    }'
27016
27017        gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27018  sed -n "$gl_absolute_header_sed"`
27019
27020           gl_header=$gl_cv_absolute_stddef_h
27021           gl_cv_next_stddef_h='"'$gl_header'"'
27022
27023
27024fi
27025{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
27026printf "%s\n" "$gl_cv_next_stddef_h" >&6; }
27027     fi
27028     NEXT_STDDEF_H=$gl_cv_next_stddef_h
27029
27030     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27031       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27032       gl_next_as_first_directive='<'stddef.h'>'
27033     else
27034       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27035       gl_next_as_first_directive=$gl_cv_next_stddef_h
27036     fi
27037     NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
27038
27039
27040
27041
27042  fi
27043
27044
27045
27046
27047
27048        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
27049printf %s "checking whether locale.h defines locale_t... " >&6; }
27050if test ${gl_cv_header_locale_has_locale_t+y}
27051then :
27052  printf %s "(cached) " >&6
27053else $as_nop
27054  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27055/* end confdefs.h.  */
27056#include <locale.h>
27057            locale_t x;
27058int
27059main (void)
27060{
27061
27062  ;
27063  return 0;
27064}
27065_ACEOF
27066if ac_fn_c_try_compile "$LINENO"
27067then :
27068  gl_cv_header_locale_has_locale_t=yes
27069else $as_nop
27070  gl_cv_header_locale_has_locale_t=no
27071fi
27072rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27073
27074fi
27075{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
27076printf "%s\n" "$gl_cv_header_locale_has_locale_t" >&6; }
27077
27078
27079  if test $ac_cv_header_xlocale_h = yes; then
27080    HAVE_XLOCALE_H=1
27081    if test $gl_cv_header_locale_has_locale_t = yes; then
27082      gl_cv_header_locale_h_needs_xlocale_h=no
27083    else
27084      gl_cv_header_locale_h_needs_xlocale_h=yes
27085    fi
27086    HAVE_LOCALE_T=1
27087  else
27088    HAVE_XLOCALE_H=0
27089    gl_cv_header_locale_h_needs_xlocale_h=no
27090    if test $gl_cv_header_locale_has_locale_t = yes; then
27091      HAVE_LOCALE_T=1
27092    else
27093      HAVE_LOCALE_T=0
27094    fi
27095  fi
27096
27097
27098
27099
27100
27101
27102
27103
27104
27105
27106
27107
27108  case "$host_os" in
27109    solaris*)
27110
27111printf "%s\n" "#define _LCONV_C99 1" >>confdefs.h
27112
27113      ;;
27114  esac
27115
27116  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
27117printf %s "checking whether locale.h conforms to POSIX:2001... " >&6; }
27118if test ${gl_cv_header_locale_h_posix2001+y}
27119then :
27120  printf %s "(cached) " >&6
27121else $as_nop
27122  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27123/* end confdefs.h.  */
27124#include <locale.h>
27125            int x = LC_MESSAGES;
27126            int y = sizeof (((struct lconv *) 0)->decimal_point);
27127int
27128main (void)
27129{
27130
27131  ;
27132  return 0;
27133}
27134_ACEOF
27135if ac_fn_c_try_compile "$LINENO"
27136then :
27137  gl_cv_header_locale_h_posix2001=yes
27138else $as_nop
27139  gl_cv_header_locale_h_posix2001=no
27140fi
27141rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27142fi
27143{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
27144printf "%s\n" "$gl_cv_header_locale_h_posix2001" >&6; }
27145
27146          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
27147printf %s "checking whether struct lconv is properly defined... " >&6; }
27148if test ${gl_cv_sys_struct_lconv_ok+y}
27149then :
27150  printf %s "(cached) " >&6
27151else $as_nop
27152  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27153/* end confdefs.h.  */
27154#include <locale.h>
27155            struct lconv l;
27156            int x = sizeof (l.decimal_point);
27157            int y = sizeof (l.int_p_cs_precedes);
27158int
27159main (void)
27160{
27161
27162  ;
27163  return 0;
27164}
27165_ACEOF
27166if ac_fn_c_try_compile "$LINENO"
27167then :
27168  gl_cv_sys_struct_lconv_ok=yes
27169else $as_nop
27170  gl_cv_sys_struct_lconv_ok=no
27171fi
27172rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27173
27174fi
27175{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
27176printf "%s\n" "$gl_cv_sys_struct_lconv_ok" >&6; }
27177  if test $gl_cv_sys_struct_lconv_ok = no; then
27178            case "$host_os" in
27179      mingw*)
27180        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27181/* end confdefs.h.  */
27182
27183#ifdef _MSC_VER
27184 Special
27185#endif
27186
27187_ACEOF
27188if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27189  $EGREP "Special" >/dev/null 2>&1
27190then :
27191
27192else $as_nop
27193  REPLACE_STRUCT_LCONV=1
27194fi
27195rm -rf conftest*
27196
27197        ;;
27198      *) REPLACE_STRUCT_LCONV=1 ;;
27199    esac
27200  fi
27201
27202
27203
27204
27205
27206
27207
27208
27209
27210     if test $gl_cv_have_include_next = yes; then
27211       gl_cv_next_locale_h='<'locale.h'>'
27212     else
27213       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
27214printf %s "checking absolute name of <locale.h>... " >&6; }
27215if test ${gl_cv_next_locale_h+y}
27216then :
27217  printf %s "(cached) " >&6
27218else $as_nop
27219
27220
27221
27222  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27223/* end confdefs.h.  */
27224#include <locale.h>
27225_ACEOF
27226                case "$host_os" in
27227    aix*) gl_absname_cpp="$ac_cpp -C" ;;
27228    *)    gl_absname_cpp="$ac_cpp" ;;
27229  esac
27230
27231  case "$host_os" in
27232    mingw*)
27233                                          gl_dirsep_regex='[/\\]'
27234      ;;
27235    *)
27236      gl_dirsep_regex='\/'
27237      ;;
27238  esac
27239      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27240  gl_header_literal_regex=`echo 'locale.h' \
27241                           | sed -e "$gl_make_literal_regex_sed"`
27242  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27243      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27244      s|^/[^/]|//&|
27245      p
27246      q
27247    }'
27248
27249        gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27250  sed -n "$gl_absolute_header_sed"`
27251
27252           gl_header=$gl_cv_absolute_locale_h
27253           gl_cv_next_locale_h='"'$gl_header'"'
27254
27255
27256fi
27257{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
27258printf "%s\n" "$gl_cv_next_locale_h" >&6; }
27259     fi
27260     NEXT_LOCALE_H=$gl_cv_next_locale_h
27261
27262     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27263       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27264       gl_next_as_first_directive='<'locale.h'>'
27265     else
27266       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27267       gl_next_as_first_directive=$gl_cv_next_locale_h
27268     fi
27269     NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
27270
27271
27272
27273
27274
27275
27276
27277
27278
27279
27280
27281  GL_GNULIB_LOCALECONV=0
27282
27283
27284
27285  GL_GNULIB_SETLOCALE=0
27286
27287
27288
27289  GL_GNULIB_SETLOCALE_NULL=0
27290
27291
27292
27293  GL_GNULIB_DUPLOCALE=0
27294
27295
27296
27297  GL_GNULIB_LOCALENAME=0
27298
27299
27300
27301
27302
27303  gl_threads_api=none
27304  LIBTHREAD=
27305  LTLIBTHREAD=
27306  LIBMULTITHREAD=
27307  LTLIBMULTITHREAD=
27308  if test "$gl_use_threads" != no; then
27309
27310
27311  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
27312printf %s "checking whether imported symbols can be declared weak... " >&6; }
27313if test ${gl_cv_have_weak+y}
27314then :
27315  printf %s "(cached) " >&6
27316else $as_nop
27317  gl_cv_have_weak=no
27318          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27319/* end confdefs.h.  */
27320extern void xyzzy ();
27321#pragma weak xyzzy
27322int
27323main (void)
27324{
27325xyzzy();
27326  ;
27327  return 0;
27328}
27329_ACEOF
27330if ac_fn_c_try_link "$LINENO"
27331then :
27332  gl_cv_have_weak=maybe
27333fi
27334rm -f core conftest.err conftest.$ac_objext conftest.beam \
27335    conftest$ac_exeext conftest.$ac_ext
27336     if test $gl_cv_have_weak = maybe; then
27337                     if test "$cross_compiling" = yes
27338then :
27339                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27340/* end confdefs.h.  */
27341#ifdef __ELF__
27342             Extensible Linking Format
27343             #endif
27344
27345_ACEOF
27346if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27347  $EGREP "Extensible Linking Format" >/dev/null 2>&1
27348then :
27349  gl_cv_have_weak="guessing yes"
27350else $as_nop
27351  gl_cv_have_weak="guessing no"
27352fi
27353rm -rf conftest*
27354
27355
27356else $as_nop
27357  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27358/* end confdefs.h.  */
27359
27360#include <stdio.h>
27361#pragma weak fputs
27362int main ()
27363{
27364  return (fputs == NULL);
27365}
27366_ACEOF
27367if ac_fn_c_try_run "$LINENO"
27368then :
27369  gl_cv_have_weak=yes
27370else $as_nop
27371  gl_cv_have_weak=no
27372fi
27373rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27374  conftest.$ac_objext conftest.beam conftest.$ac_ext
27375fi
27376
27377     fi
27378          case " $LDFLAGS " in
27379       *" -static "*) gl_cv_have_weak=no ;;
27380     esac
27381                    case "$gl_cv_have_weak" in
27382       *yes)
27383         case "$host_os" in
27384           freebsd* | dragonfly* | midnightbsd*)
27385             : > conftest1.c
27386             $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
27387             cat <<EOF > conftest2.c
27388#include <pthread.h>
27389#pragma weak pthread_mutexattr_gettype
27390int main ()
27391{
27392  return (pthread_mutexattr_gettype != NULL);
27393}
27394EOF
27395             $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
27396               || gl_cv_have_weak=no
27397             rm -f conftest1.c libempty.so conftest2.c conftest
27398             ;;
27399         esac
27400         ;;
27401     esac
27402
27403fi
27404{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
27405printf "%s\n" "$gl_cv_have_weak" >&6; }
27406  case "$gl_cv_have_weak" in
27407    *yes)
27408
27409printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
27410
27411      ;;
27412  esac
27413
27414    if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
27415
27416      :
27417    fi
27418    if test "$gl_use_threads" = isoc || test "$gl_use_threads" = isoc+posix; then
27419
27420      gl_have_isoc_threads="$ac_cv_header_threads_h"
27421    fi
27422    if test "$gl_use_threads" = yes \
27423       || test "$gl_use_threads" = posix \
27424       || test "$gl_use_threads" = isoc+posix; then
27425
27426
27427  if test -z "$gl_pthreadlib_body_done"; then
27428    gl_pthread_api=no
27429    LIBPTHREAD=
27430    LIBPMULTITHREAD=
27431    # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
27432    # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
27433    ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
27434if test "x$ac_cv_header_pthread_h" = xyes
27435then :
27436  gl_have_pthread_h=yes
27437else $as_nop
27438  gl_have_pthread_h=no
27439fi
27440
27441    if test "$gl_have_pthread_h" = yes; then
27442      # Other possible tests:
27443      #   -lpthreads (FSU threads, PCthreads)
27444      #   -lgthreads
27445      # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
27446      # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
27447      # the second one only in libpthread, and lock.c needs it.
27448      #
27449      # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
27450      # needs -pthread for some reason.  See:
27451      # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
27452      save_LIBS=$LIBS
27453      for gl_pthread in '' '-pthread'; do
27454        LIBS="$LIBS $gl_pthread"
27455        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27456/* end confdefs.h.  */
27457#include <pthread.h>
27458               pthread_mutex_t m;
27459               pthread_mutexattr_t ma;
27460
27461int
27462main (void)
27463{
27464pthread_mutex_lock (&m);
27465               pthread_mutexattr_init (&ma);
27466  ;
27467  return 0;
27468}
27469_ACEOF
27470if ac_fn_c_try_link "$LINENO"
27471then :
27472  gl_pthread_api=yes
27473           LIBPTHREAD=$gl_pthread
27474           LIBPMULTITHREAD=$gl_pthread
27475fi
27476rm -f core conftest.err conftest.$ac_objext conftest.beam \
27477    conftest$ac_exeext conftest.$ac_ext
27478        LIBS=$save_LIBS
27479        test $gl_pthread_api = yes && break
27480      done
27481      echo "$as_me:27481: gl_pthread_api=$gl_pthread_api" >&5
27482      echo "$as_me:27482: LIBPTHREAD=$LIBPTHREAD" >&5
27483
27484      gl_pthread_in_glibc=no
27485      # On Linux with glibc >= 2.34, libc contains the fully functional
27486      # pthread functions.
27487      case "$host_os" in
27488        linux*)
27489          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27490/* end confdefs.h.  */
27491#include <features.h>
27492             #ifdef __GNU_LIBRARY__
27493              #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || (__GLIBC__ > 2)
27494               Lucky user
27495              #endif
27496             #endif
27497
27498_ACEOF
27499if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27500  $EGREP "Lucky user" >/dev/null 2>&1
27501then :
27502  gl_pthread_in_glibc=yes
27503fi
27504rm -rf conftest*
27505
27506          ;;
27507      esac
27508      echo "$as_me:27508: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
27509
27510      # Test for libpthread by looking for pthread_kill. (Not pthread_self,
27511      # since it is defined as a macro on OSF/1.)
27512      if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
27513        # The program links fine without libpthread. But it may actually
27514        # need to link with libpthread in order to create multiple threads.
27515        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
27516printf %s "checking for pthread_kill in -lpthread... " >&6; }
27517if test ${ac_cv_lib_pthread_pthread_kill+y}
27518then :
27519  printf %s "(cached) " >&6
27520else $as_nop
27521  ac_check_lib_save_LIBS=$LIBS
27522LIBS="-lpthread  $LIBS"
27523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27524/* end confdefs.h.  */
27525
27526/* Override any GCC internal prototype to avoid an error.
27527   Use char because int might match the return type of a GCC
27528   builtin and then its argument prototype would still apply.  */
27529char pthread_kill ();
27530int
27531main (void)
27532{
27533return pthread_kill ();
27534  ;
27535  return 0;
27536}
27537_ACEOF
27538if ac_fn_c_try_link "$LINENO"
27539then :
27540  ac_cv_lib_pthread_pthread_kill=yes
27541else $as_nop
27542  ac_cv_lib_pthread_pthread_kill=no
27543fi
27544rm -f core conftest.err conftest.$ac_objext conftest.beam \
27545    conftest$ac_exeext conftest.$ac_ext
27546LIBS=$ac_check_lib_save_LIBS
27547fi
27548{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
27549printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
27550if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
27551then :
27552  if test $gl_pthread_in_glibc = yes; then
27553             LIBPMULTITHREAD=
27554           else
27555             LIBPMULTITHREAD=-lpthread
27556             # On Solaris and HP-UX, most pthread functions exist also in libc.
27557             # Therefore pthread_in_use() needs to actually try to create a
27558             # thread: pthread_create from libc will fail, whereas
27559             # pthread_create will actually create a thread.
27560             # On Solaris 10 or newer, this test is no longer needed, because
27561             # libc contains the fully functional pthread functions.
27562             case "$host_os" in
27563               solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
27564
27565printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
27566
27567             esac
27568           fi
27569
27570fi
27571
27572      elif test $gl_pthread_api != yes; then
27573        # Some library is needed. Try libpthread and libc_r.
27574        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
27575printf %s "checking for pthread_kill in -lpthread... " >&6; }
27576if test ${ac_cv_lib_pthread_pthread_kill+y}
27577then :
27578  printf %s "(cached) " >&6
27579else $as_nop
27580  ac_check_lib_save_LIBS=$LIBS
27581LIBS="-lpthread  $LIBS"
27582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27583/* end confdefs.h.  */
27584
27585/* Override any GCC internal prototype to avoid an error.
27586   Use char because int might match the return type of a GCC
27587   builtin and then its argument prototype would still apply.  */
27588char pthread_kill ();
27589int
27590main (void)
27591{
27592return pthread_kill ();
27593  ;
27594  return 0;
27595}
27596_ACEOF
27597if ac_fn_c_try_link "$LINENO"
27598then :
27599  ac_cv_lib_pthread_pthread_kill=yes
27600else $as_nop
27601  ac_cv_lib_pthread_pthread_kill=no
27602fi
27603rm -f core conftest.err conftest.$ac_objext conftest.beam \
27604    conftest$ac_exeext conftest.$ac_ext
27605LIBS=$ac_check_lib_save_LIBS
27606fi
27607{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
27608printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
27609if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
27610then :
27611  gl_pthread_api=yes
27612           LIBPTHREAD=-lpthread
27613           LIBPMULTITHREAD=-lpthread
27614fi
27615
27616        if test $gl_pthread_api != yes; then
27617          # For FreeBSD 4.
27618          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
27619printf %s "checking for pthread_kill in -lc_r... " >&6; }
27620if test ${ac_cv_lib_c_r_pthread_kill+y}
27621then :
27622  printf %s "(cached) " >&6
27623else $as_nop
27624  ac_check_lib_save_LIBS=$LIBS
27625LIBS="-lc_r  $LIBS"
27626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27627/* end confdefs.h.  */
27628
27629/* Override any GCC internal prototype to avoid an error.
27630   Use char because int might match the return type of a GCC
27631   builtin and then its argument prototype would still apply.  */
27632char pthread_kill ();
27633int
27634main (void)
27635{
27636return pthread_kill ();
27637  ;
27638  return 0;
27639}
27640_ACEOF
27641if ac_fn_c_try_link "$LINENO"
27642then :
27643  ac_cv_lib_c_r_pthread_kill=yes
27644else $as_nop
27645  ac_cv_lib_c_r_pthread_kill=no
27646fi
27647rm -f core conftest.err conftest.$ac_objext conftest.beam \
27648    conftest$ac_exeext conftest.$ac_ext
27649LIBS=$ac_check_lib_save_LIBS
27650fi
27651{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
27652printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
27653if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
27654then :
27655  gl_pthread_api=yes
27656             LIBPTHREAD=-lc_r
27657             LIBPMULTITHREAD=-lc_r
27658fi
27659
27660        fi
27661      fi
27662      echo "$as_me:27662: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
27663    fi
27664    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
27665printf %s "checking whether POSIX threads API is available... " >&6; }
27666    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
27667printf "%s\n" "$gl_pthread_api" >&6; }
27668
27669
27670    if test $gl_pthread_api = yes; then
27671
27672printf "%s\n" "#define HAVE_PTHREAD_API 1" >>confdefs.h
27673
27674    fi
27675
27676        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27677/* end confdefs.h.  */
27678#include <sched.h>
27679int
27680main (void)
27681{
27682sched_yield ();
27683  ;
27684  return 0;
27685}
27686_ACEOF
27687if ac_fn_c_try_link "$LINENO"
27688then :
27689  LIB_SCHED_YIELD=
27690
27691else $as_nop
27692         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
27693printf %s "checking for sched_yield in -lrt... " >&6; }
27694if test ${ac_cv_lib_rt_sched_yield+y}
27695then :
27696  printf %s "(cached) " >&6
27697else $as_nop
27698  ac_check_lib_save_LIBS=$LIBS
27699LIBS="-lrt  $LIBS"
27700cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27701/* end confdefs.h.  */
27702
27703/* Override any GCC internal prototype to avoid an error.
27704   Use char because int might match the return type of a GCC
27705   builtin and then its argument prototype would still apply.  */
27706char sched_yield ();
27707int
27708main (void)
27709{
27710return sched_yield ();
27711  ;
27712  return 0;
27713}
27714_ACEOF
27715if ac_fn_c_try_link "$LINENO"
27716then :
27717  ac_cv_lib_rt_sched_yield=yes
27718else $as_nop
27719  ac_cv_lib_rt_sched_yield=no
27720fi
27721rm -f core conftest.err conftest.$ac_objext conftest.beam \
27722    conftest$ac_exeext conftest.$ac_ext
27723LIBS=$ac_check_lib_save_LIBS
27724fi
27725{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
27726printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
27727if test "x$ac_cv_lib_rt_sched_yield" = xyes
27728then :
27729  LIB_SCHED_YIELD=-lrt
27730else $as_nop
27731            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
27732printf %s "checking for sched_yield in -lposix4... " >&6; }
27733if test ${ac_cv_lib_posix4_sched_yield+y}
27734then :
27735  printf %s "(cached) " >&6
27736else $as_nop
27737  ac_check_lib_save_LIBS=$LIBS
27738LIBS="-lposix4  $LIBS"
27739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27740/* end confdefs.h.  */
27741
27742/* Override any GCC internal prototype to avoid an error.
27743   Use char because int might match the return type of a GCC
27744   builtin and then its argument prototype would still apply.  */
27745char sched_yield ();
27746int
27747main (void)
27748{
27749return sched_yield ();
27750  ;
27751  return 0;
27752}
27753_ACEOF
27754if ac_fn_c_try_link "$LINENO"
27755then :
27756  ac_cv_lib_posix4_sched_yield=yes
27757else $as_nop
27758  ac_cv_lib_posix4_sched_yield=no
27759fi
27760rm -f core conftest.err conftest.$ac_objext conftest.beam \
27761    conftest$ac_exeext conftest.$ac_ext
27762LIBS=$ac_check_lib_save_LIBS
27763fi
27764{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
27765printf "%s\n" "$ac_cv_lib_posix4_sched_yield" >&6; }
27766if test "x$ac_cv_lib_posix4_sched_yield" = xyes
27767then :
27768  LIB_SCHED_YIELD=-lposix4
27769fi
27770
27771fi
27772
27773
27774fi
27775rm -f core conftest.err conftest.$ac_objext conftest.beam \
27776    conftest$ac_exeext conftest.$ac_ext
27777
27778
27779    gl_pthreadlib_body_done=done
27780  fi
27781
27782      LIBTHREAD=$LIBPTHREAD LTLIBTHREAD=$LIBPTHREAD
27783      LIBMULTITHREAD=$LIBPMULTITHREAD LTLIBMULTITHREAD=$LIBPMULTITHREAD
27784      if test $gl_pthread_api = yes; then
27785        if test "$gl_use_threads" = isoc+posix && test "$gl_have_isoc_threads" = yes; then
27786          gl_threads_api='isoc+posix'
27787
27788printf "%s\n" "#define USE_ISOC_AND_POSIX_THREADS 1" >>confdefs.h
27789
27790          LIBTHREAD= LTLIBTHREAD=
27791        else
27792          gl_threads_api=posix
27793
27794printf "%s\n" "#define USE_POSIX_THREADS 1" >>confdefs.h
27795
27796          if test -z "$LIBMULTITHREAD" && test -z "$LTLIBMULTITHREAD"; then
27797
27798printf "%s\n" "#define USE_POSIX_THREADS_FROM_LIBC 1" >>confdefs.h
27799
27800          else
27801            if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
27802
27803printf "%s\n" "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
27804
27805              LIBTHREAD= LTLIBTHREAD=
27806            else
27807              case "$host_os" in
27808                freebsd* | dragonfly* | midnightbsd*)
27809                  if test "x$LIBTHREAD" != "x$LIBMULTITHREAD"; then
27810
27811printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
27812
27813                  fi
27814                  ;;
27815              esac
27816            fi
27817          fi
27818        fi
27819      fi
27820    fi
27821    if test $gl_threads_api = none; then
27822      if test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes; then
27823
27824
27825
27826  if test -z "$gl_stdthreadlib_body_done"; then
27827
27828
27829    case "$host_os" in
27830      mingw*)
27831        LIBSTDTHREAD=
27832        ;;
27833      *)
27834
27835
27836  if test -z "$gl_pthreadlib_body_done"; then
27837    gl_pthread_api=no
27838    LIBPTHREAD=
27839    LIBPMULTITHREAD=
27840    # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
27841    # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
27842    ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
27843if test "x$ac_cv_header_pthread_h" = xyes
27844then :
27845  gl_have_pthread_h=yes
27846else $as_nop
27847  gl_have_pthread_h=no
27848fi
27849
27850    if test "$gl_have_pthread_h" = yes; then
27851      # Other possible tests:
27852      #   -lpthreads (FSU threads, PCthreads)
27853      #   -lgthreads
27854      # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
27855      # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
27856      # the second one only in libpthread, and lock.c needs it.
27857      #
27858      # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
27859      # needs -pthread for some reason.  See:
27860      # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
27861      save_LIBS=$LIBS
27862      for gl_pthread in '' '-pthread'; do
27863        LIBS="$LIBS $gl_pthread"
27864        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27865/* end confdefs.h.  */
27866#include <pthread.h>
27867               pthread_mutex_t m;
27868               pthread_mutexattr_t ma;
27869
27870int
27871main (void)
27872{
27873pthread_mutex_lock (&m);
27874               pthread_mutexattr_init (&ma);
27875  ;
27876  return 0;
27877}
27878_ACEOF
27879if ac_fn_c_try_link "$LINENO"
27880then :
27881  gl_pthread_api=yes
27882           LIBPTHREAD=$gl_pthread
27883           LIBPMULTITHREAD=$gl_pthread
27884fi
27885rm -f core conftest.err conftest.$ac_objext conftest.beam \
27886    conftest$ac_exeext conftest.$ac_ext
27887        LIBS=$save_LIBS
27888        test $gl_pthread_api = yes && break
27889      done
27890      echo "$as_me:27890: gl_pthread_api=$gl_pthread_api" >&5
27891      echo "$as_me:27891: LIBPTHREAD=$LIBPTHREAD" >&5
27892
27893      gl_pthread_in_glibc=no
27894      # On Linux with glibc >= 2.34, libc contains the fully functional
27895      # pthread functions.
27896      case "$host_os" in
27897        linux*)
27898          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27899/* end confdefs.h.  */
27900#include <features.h>
27901             #ifdef __GNU_LIBRARY__
27902              #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || (__GLIBC__ > 2)
27903               Lucky user
27904              #endif
27905             #endif
27906
27907_ACEOF
27908if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27909  $EGREP "Lucky user" >/dev/null 2>&1
27910then :
27911  gl_pthread_in_glibc=yes
27912fi
27913rm -rf conftest*
27914
27915          ;;
27916      esac
27917      echo "$as_me:27917: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
27918
27919      # Test for libpthread by looking for pthread_kill. (Not pthread_self,
27920      # since it is defined as a macro on OSF/1.)
27921      if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
27922        # The program links fine without libpthread. But it may actually
27923        # need to link with libpthread in order to create multiple threads.
27924        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
27925printf %s "checking for pthread_kill in -lpthread... " >&6; }
27926if test ${ac_cv_lib_pthread_pthread_kill+y}
27927then :
27928  printf %s "(cached) " >&6
27929else $as_nop
27930  ac_check_lib_save_LIBS=$LIBS
27931LIBS="-lpthread  $LIBS"
27932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27933/* end confdefs.h.  */
27934
27935/* Override any GCC internal prototype to avoid an error.
27936   Use char because int might match the return type of a GCC
27937   builtin and then its argument prototype would still apply.  */
27938char pthread_kill ();
27939int
27940main (void)
27941{
27942return pthread_kill ();
27943  ;
27944  return 0;
27945}
27946_ACEOF
27947if ac_fn_c_try_link "$LINENO"
27948then :
27949  ac_cv_lib_pthread_pthread_kill=yes
27950else $as_nop
27951  ac_cv_lib_pthread_pthread_kill=no
27952fi
27953rm -f core conftest.err conftest.$ac_objext conftest.beam \
27954    conftest$ac_exeext conftest.$ac_ext
27955LIBS=$ac_check_lib_save_LIBS
27956fi
27957{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
27958printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
27959if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
27960then :
27961  if test $gl_pthread_in_glibc = yes; then
27962             LIBPMULTITHREAD=
27963           else
27964             LIBPMULTITHREAD=-lpthread
27965             # On Solaris and HP-UX, most pthread functions exist also in libc.
27966             # Therefore pthread_in_use() needs to actually try to create a
27967             # thread: pthread_create from libc will fail, whereas
27968             # pthread_create will actually create a thread.
27969             # On Solaris 10 or newer, this test is no longer needed, because
27970             # libc contains the fully functional pthread functions.
27971             case "$host_os" in
27972               solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
27973
27974printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
27975
27976             esac
27977           fi
27978
27979fi
27980
27981      elif test $gl_pthread_api != yes; then
27982        # Some library is needed. Try libpthread and libc_r.
27983        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
27984printf %s "checking for pthread_kill in -lpthread... " >&6; }
27985if test ${ac_cv_lib_pthread_pthread_kill+y}
27986then :
27987  printf %s "(cached) " >&6
27988else $as_nop
27989  ac_check_lib_save_LIBS=$LIBS
27990LIBS="-lpthread  $LIBS"
27991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27992/* end confdefs.h.  */
27993
27994/* Override any GCC internal prototype to avoid an error.
27995   Use char because int might match the return type of a GCC
27996   builtin and then its argument prototype would still apply.  */
27997char pthread_kill ();
27998int
27999main (void)
28000{
28001return pthread_kill ();
28002  ;
28003  return 0;
28004}
28005_ACEOF
28006if ac_fn_c_try_link "$LINENO"
28007then :
28008  ac_cv_lib_pthread_pthread_kill=yes
28009else $as_nop
28010  ac_cv_lib_pthread_pthread_kill=no
28011fi
28012rm -f core conftest.err conftest.$ac_objext conftest.beam \
28013    conftest$ac_exeext conftest.$ac_ext
28014LIBS=$ac_check_lib_save_LIBS
28015fi
28016{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
28017printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
28018if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
28019then :
28020  gl_pthread_api=yes
28021           LIBPTHREAD=-lpthread
28022           LIBPMULTITHREAD=-lpthread
28023fi
28024
28025        if test $gl_pthread_api != yes; then
28026          # For FreeBSD 4.
28027          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
28028printf %s "checking for pthread_kill in -lc_r... " >&6; }
28029if test ${ac_cv_lib_c_r_pthread_kill+y}
28030then :
28031  printf %s "(cached) " >&6
28032else $as_nop
28033  ac_check_lib_save_LIBS=$LIBS
28034LIBS="-lc_r  $LIBS"
28035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28036/* end confdefs.h.  */
28037
28038/* Override any GCC internal prototype to avoid an error.
28039   Use char because int might match the return type of a GCC
28040   builtin and then its argument prototype would still apply.  */
28041char pthread_kill ();
28042int
28043main (void)
28044{
28045return pthread_kill ();
28046  ;
28047  return 0;
28048}
28049_ACEOF
28050if ac_fn_c_try_link "$LINENO"
28051then :
28052  ac_cv_lib_c_r_pthread_kill=yes
28053else $as_nop
28054  ac_cv_lib_c_r_pthread_kill=no
28055fi
28056rm -f core conftest.err conftest.$ac_objext conftest.beam \
28057    conftest$ac_exeext conftest.$ac_ext
28058LIBS=$ac_check_lib_save_LIBS
28059fi
28060{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
28061printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
28062if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
28063then :
28064  gl_pthread_api=yes
28065             LIBPTHREAD=-lc_r
28066             LIBPMULTITHREAD=-lc_r
28067fi
28068
28069        fi
28070      fi
28071      echo "$as_me:28071: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
28072    fi
28073    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
28074printf %s "checking whether POSIX threads API is available... " >&6; }
28075    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
28076printf "%s\n" "$gl_pthread_api" >&6; }
28077
28078
28079    if test $gl_pthread_api = yes; then
28080
28081printf "%s\n" "#define HAVE_PTHREAD_API 1" >>confdefs.h
28082
28083    fi
28084
28085        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28086/* end confdefs.h.  */
28087#include <sched.h>
28088int
28089main (void)
28090{
28091sched_yield ();
28092  ;
28093  return 0;
28094}
28095_ACEOF
28096if ac_fn_c_try_link "$LINENO"
28097then :
28098  LIB_SCHED_YIELD=
28099
28100else $as_nop
28101         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
28102printf %s "checking for sched_yield in -lrt... " >&6; }
28103if test ${ac_cv_lib_rt_sched_yield+y}
28104then :
28105  printf %s "(cached) " >&6
28106else $as_nop
28107  ac_check_lib_save_LIBS=$LIBS
28108LIBS="-lrt  $LIBS"
28109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28110/* end confdefs.h.  */
28111
28112/* Override any GCC internal prototype to avoid an error.
28113   Use char because int might match the return type of a GCC
28114   builtin and then its argument prototype would still apply.  */
28115char sched_yield ();
28116int
28117main (void)
28118{
28119return sched_yield ();
28120  ;
28121  return 0;
28122}
28123_ACEOF
28124if ac_fn_c_try_link "$LINENO"
28125then :
28126  ac_cv_lib_rt_sched_yield=yes
28127else $as_nop
28128  ac_cv_lib_rt_sched_yield=no
28129fi
28130rm -f core conftest.err conftest.$ac_objext conftest.beam \
28131    conftest$ac_exeext conftest.$ac_ext
28132LIBS=$ac_check_lib_save_LIBS
28133fi
28134{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
28135printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
28136if test "x$ac_cv_lib_rt_sched_yield" = xyes
28137then :
28138  LIB_SCHED_YIELD=-lrt
28139else $as_nop
28140            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
28141printf %s "checking for sched_yield in -lposix4... " >&6; }
28142if test ${ac_cv_lib_posix4_sched_yield+y}
28143then :
28144  printf %s "(cached) " >&6
28145else $as_nop
28146  ac_check_lib_save_LIBS=$LIBS
28147LIBS="-lposix4  $LIBS"
28148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28149/* end confdefs.h.  */
28150
28151/* Override any GCC internal prototype to avoid an error.
28152   Use char because int might match the return type of a GCC
28153   builtin and then its argument prototype would still apply.  */
28154char sched_yield ();
28155int
28156main (void)
28157{
28158return sched_yield ();
28159  ;
28160  return 0;
28161}
28162_ACEOF
28163if ac_fn_c_try_link "$LINENO"
28164then :
28165  ac_cv_lib_posix4_sched_yield=yes
28166else $as_nop
28167  ac_cv_lib_posix4_sched_yield=no
28168fi
28169rm -f core conftest.err conftest.$ac_objext conftest.beam \
28170    conftest$ac_exeext conftest.$ac_ext
28171LIBS=$ac_check_lib_save_LIBS
28172fi
28173{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
28174printf "%s\n" "$ac_cv_lib_posix4_sched_yield" >&6; }
28175if test "x$ac_cv_lib_posix4_sched_yield" = xyes
28176then :
28177  LIB_SCHED_YIELD=-lposix4
28178fi
28179
28180fi
28181
28182
28183fi
28184rm -f core conftest.err conftest.$ac_objext conftest.beam \
28185    conftest$ac_exeext conftest.$ac_ext
28186
28187
28188    gl_pthreadlib_body_done=done
28189  fi
28190
28191        if test $ac_cv_header_threads_h = yes; then
28192                                                            ac_fn_c_check_func "$LINENO" "thrd_create" "ac_cv_func_thrd_create"
28193if test "x$ac_cv_func_thrd_create" = xyes
28194then :
28195  printf "%s\n" "#define HAVE_THRD_CREATE 1" >>confdefs.h
28196
28197fi
28198
28199          if test $ac_cv_func_thrd_create = yes; then
28200            LIBSTDTHREAD=
28201          else
28202            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thrd_create in -lstdthreads" >&5
28203printf %s "checking for thrd_create in -lstdthreads... " >&6; }
28204if test ${ac_cv_lib_stdthreads_thrd_create+y}
28205then :
28206  printf %s "(cached) " >&6
28207else $as_nop
28208  ac_check_lib_save_LIBS=$LIBS
28209LIBS="-lstdthreads  $LIBS"
28210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28211/* end confdefs.h.  */
28212
28213/* Override any GCC internal prototype to avoid an error.
28214   Use char because int might match the return type of a GCC
28215   builtin and then its argument prototype would still apply.  */
28216char thrd_create ();
28217int
28218main (void)
28219{
28220return thrd_create ();
28221  ;
28222  return 0;
28223}
28224_ACEOF
28225if ac_fn_c_try_link "$LINENO"
28226then :
28227  ac_cv_lib_stdthreads_thrd_create=yes
28228else $as_nop
28229  ac_cv_lib_stdthreads_thrd_create=no
28230fi
28231rm -f core conftest.err conftest.$ac_objext conftest.beam \
28232    conftest$ac_exeext conftest.$ac_ext
28233LIBS=$ac_check_lib_save_LIBS
28234fi
28235{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdthreads_thrd_create" >&5
28236printf "%s\n" "$ac_cv_lib_stdthreads_thrd_create" >&6; }
28237if test "x$ac_cv_lib_stdthreads_thrd_create" = xyes
28238then :
28239
28240              LIBSTDTHREAD='-lstdthreads -lpthread'
28241
28242else $as_nop
28243
28244                            LIBSTDTHREAD="$LIBPMULTITHREAD"
28245
28246fi
28247
28248          fi
28249        else
28250                    LIBSTDTHREAD="$LIBPMULTITHREAD $LIB_SCHED_YIELD"
28251        fi
28252        ;;
28253    esac
28254
28255
28256    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ISO C threads API is available" >&5
28257printf %s "checking whether ISO C threads API is available... " >&6; }
28258    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_threads_h" >&5
28259printf "%s\n" "$ac_cv_header_threads_h" >&6; }
28260    gl_stdthreadlib_body_done=done
28261  fi
28262
28263        LIBTHREAD=$LIBSTDTHREAD LTLIBTHREAD=$LIBSTDTHREAD
28264        LIBMULTITHREAD=$LIBSTDTHREAD LTLIBMULTITHREAD=$LIBSTDTHREAD
28265        gl_threads_api=isoc
28266
28267printf "%s\n" "#define USE_ISOC_THREADS 1" >>confdefs.h
28268
28269      fi
28270    fi
28271    if test $gl_threads_api = none; then
28272      case "$gl_use_threads" in
28273        yes | windows | win32) # The 'win32' is for backward compatibility.
28274          if { case "$host_os" in
28275                 mingw*) true;;
28276                 *) false;;
28277               esac
28278             }; then
28279            gl_threads_api=windows
28280
28281printf "%s\n" "#define USE_WINDOWS_THREADS 1" >>confdefs.h
28282
28283          fi
28284          ;;
28285      esac
28286    fi
28287  fi
28288  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
28289printf %s "checking for multithread API to use... " >&6; }
28290  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
28291printf "%s\n" "$gl_threads_api" >&6; }
28292
28293
28294
28295
28296
28297
28298
28299
28300
28301
28302
28303    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc (0) returns nonnull" >&5
28304printf %s "checking whether malloc (0) returns nonnull... " >&6; }
28305if test ${ac_cv_func_malloc_0_nonnull+y}
28306then :
28307  printf %s "(cached) " >&6
28308else $as_nop
28309  if test "$cross_compiling" = yes
28310then :
28311  case "$host_os" in
28312          # Guess yes on platforms where we know the result.
28313          *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
28314          | gnu* | *-musl* | midnightbsd* \
28315          | hpux* | solaris* | cygwin* | mingw* | msys* )
28316            ac_cv_func_malloc_0_nonnull="guessing yes" ;;
28317          # If we don't know, obey --enable-cross-guesses.
28318          *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
28319        esac
28320
28321else $as_nop
28322  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28323/* end confdefs.h.  */
28324#include <stdlib.h>
28325
28326int
28327main (void)
28328{
28329void *p = malloc (0);
28330            int result = !p;
28331            free (p);
28332            return result;
28333  ;
28334  return 0;
28335}
28336
28337_ACEOF
28338if ac_fn_c_try_run "$LINENO"
28339then :
28340  ac_cv_func_malloc_0_nonnull=yes
28341else $as_nop
28342  ac_cv_func_malloc_0_nonnull=no
28343fi
28344rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28345  conftest.$ac_objext conftest.beam conftest.$ac_ext
28346fi
28347
28348
28349fi
28350{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
28351printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
28352  case $ac_cv_func_malloc_0_nonnull in #(
28353  *yes) :
28354    gl_cv_func_malloc_0_nonnull=1 ;; #(
28355  *) :
28356    gl_cv_func_malloc_0_nonnull=0 ;;
28357esac
28358
28359
28360printf "%s\n" "#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull" >>confdefs.h
28361
28362
28363
28364
28365
28366
28367
28368  # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
28369  # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
28370  # irrelevant for anonymous mappings.
28371  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
28372if test "x$ac_cv_func_mmap" = xyes
28373then :
28374  gl_have_mmap=yes
28375else $as_nop
28376  gl_have_mmap=no
28377fi
28378
28379
28380  # Try to allow MAP_ANONYMOUS.
28381  gl_have_mmap_anonymous=no
28382  if test $gl_have_mmap = yes; then
28383    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
28384printf %s "checking for MAP_ANONYMOUS... " >&6; }
28385    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28386/* end confdefs.h.  */
28387
28388#include <sys/mman.h>
28389#ifdef MAP_ANONYMOUS
28390    I cannot identify this map
28391#endif
28392
28393_ACEOF
28394if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28395  $EGREP "I cannot identify this map" >/dev/null 2>&1
28396then :
28397  gl_have_mmap_anonymous=yes
28398fi
28399rm -rf conftest*
28400
28401    if test $gl_have_mmap_anonymous != yes; then
28402      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28403/* end confdefs.h.  */
28404
28405#include <sys/mman.h>
28406#ifdef MAP_ANON
28407    I cannot identify this map
28408#endif
28409
28410_ACEOF
28411if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28412  $EGREP "I cannot identify this map" >/dev/null 2>&1
28413then :
28414
28415printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
28416
28417         gl_have_mmap_anonymous=yes
28418fi
28419rm -rf conftest*
28420
28421    fi
28422    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
28423printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
28424    if test $gl_have_mmap_anonymous = yes; then
28425
28426printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
28427
28428    fi
28429  fi
28430
28431
28432
28433
28434  HAVE_MBSLEN=0;
28435    HAVE_EXPLICIT_BZERO=1;
28436  HAVE_FFSL=1;
28437  HAVE_FFSLL=1;
28438  HAVE_DECL_MEMMEM=1;
28439  HAVE_MEMPCPY=1;
28440  HAVE_DECL_MEMRCHR=1;
28441  HAVE_RAWMEMCHR=1;
28442  HAVE_STPCPY=1;
28443  HAVE_STPNCPY=1;
28444  HAVE_STRCHRNUL=1;
28445  HAVE_DECL_STRDUP=1;
28446  HAVE_DECL_STRNDUP=1;
28447  HAVE_DECL_STRNLEN=1;
28448  HAVE_STRPBRK=1;
28449  HAVE_STRSEP=1;
28450  HAVE_STRCASESTR=1;
28451  HAVE_DECL_STRTOK_R=1;
28452  HAVE_DECL_STRERROR_R=1;
28453  HAVE_STRERRORNAME_NP=1;
28454  HAVE_SIGABBREV_NP=1;
28455  HAVE_SIGDESCR_NP=1;
28456  HAVE_DECL_STRSIGNAL=1;
28457  HAVE_STRVERSCMP=1;
28458  REPLACE_FFSLL=0;
28459  REPLACE_MEMCHR=0;
28460  REPLACE_MEMMEM=0;
28461  REPLACE_STPNCPY=0;
28462  REPLACE_STRCHRNUL=0;
28463  REPLACE_STRDUP=0;
28464  REPLACE_STRNCAT=0;
28465  REPLACE_STRNDUP=0;
28466  REPLACE_STRNLEN=0;
28467  REPLACE_STRSTR=0;
28468  REPLACE_STRCASESTR=0;
28469  REPLACE_STRTOK_R=0;
28470  REPLACE_STRERROR=0;
28471  REPLACE_STRERROR_R=0;
28472  REPLACE_STRERRORNAME_NP=0;
28473  REPLACE_STRSIGNAL=0;
28474  UNDEFINE_STRTOK_R=0;
28475
28476
28477
28478
28479
28480
28481
28482
28483  # Detect platform-specific bugs in some versions of glibc:
28484  # memchr should not dereference anything with length 0
28485  #   https://bugzilla.redhat.com/show_bug.cgi?id=499689
28486  # memchr should not dereference overestimated length after a match
28487  #   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
28488  #   https://sourceware.org/bugzilla/show_bug.cgi?id=10162
28489  # memchr should cast the second argument to 'unsigned char'.
28490  #   This bug exists in Android 4.3.
28491  # Assume that memchr works on platforms that lack mprotect.
28492  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
28493printf %s "checking whether memchr works... " >&6; }
28494if test ${gl_cv_func_memchr_works+y}
28495then :
28496  printf %s "(cached) " >&6
28497else $as_nop
28498  if test "$cross_compiling" = yes
28499then :
28500  case "$host_os" in
28501                           # Guess no on Android.
28502          linux*-android*) gl_cv_func_memchr_works="guessing no" ;;
28503                           # Guess yes on native Windows.
28504          mingw*)          gl_cv_func_memchr_works="guessing yes" ;;
28505                           # If we don't know, obey --enable-cross-guesses.
28506          *)               gl_cv_func_memchr_works="$gl_cross_guess_normal" ;;
28507        esac
28508
28509else $as_nop
28510  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28511/* end confdefs.h.  */
28512
28513#include <string.h>
28514#if HAVE_SYS_MMAN_H
28515# include <fcntl.h>
28516# include <unistd.h>
28517# include <sys/types.h>
28518# include <sys/mman.h>
28519# ifndef MAP_FILE
28520#  define MAP_FILE 0
28521# endif
28522#endif
28523
28524int
28525main (void)
28526{
28527
28528  int result = 0;
28529  char *fence = NULL;
28530#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
28531# if HAVE_MAP_ANONYMOUS
28532  const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
28533  const int fd = -1;
28534# else /* !HAVE_MAP_ANONYMOUS */
28535  const int flags = MAP_FILE | MAP_PRIVATE;
28536  int fd = open ("/dev/zero", O_RDONLY, 0666);
28537  if (fd >= 0)
28538# endif
28539    {
28540      int pagesize = getpagesize ();
28541      char *two_pages =
28542        (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
28543                       flags, fd, 0);
28544      if (two_pages != (char *)(-1)
28545          && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
28546        fence = two_pages + pagesize;
28547    }
28548#endif
28549  if (fence)
28550    {
28551      /* Test against bugs on glibc systems.  */
28552      if (memchr (fence, 0, 0))
28553        result |= 1;
28554      strcpy (fence - 9, "12345678");
28555      if (memchr (fence - 9, 0, 79) != fence - 1)
28556        result |= 2;
28557      if (memchr (fence - 1, 0, 3) != fence - 1)
28558        result |= 4;
28559      /* Test against bug on AIX 7.2.  */
28560      if (memchr (fence - 4, '6', 16) != fence - 4)
28561        result |= 8;
28562    }
28563  /* Test against bug on Android 4.3.  */
28564  {
28565    char input[3];
28566    input[0] = 'a';
28567    input[1] = 'b';
28568    input[2] = 'c';
28569    if (memchr (input, 0x789abc00 | 'b', 3) != input + 1)
28570      result |= 16;
28571  }
28572  return result;
28573
28574  ;
28575  return 0;
28576}
28577_ACEOF
28578if ac_fn_c_try_run "$LINENO"
28579then :
28580  gl_cv_func_memchr_works=yes
28581else $as_nop
28582  gl_cv_func_memchr_works=no
28583fi
28584rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28585  conftest.$ac_objext conftest.beam conftest.$ac_ext
28586fi
28587
28588
28589fi
28590{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
28591printf "%s\n" "$gl_cv_func_memchr_works" >&6; }
28592  case "$gl_cv_func_memchr_works" in
28593    *yes) ;;
28594    *) REPLACE_MEMCHR=1 ;;
28595  esac
28596
28597
28598
28599  GL_GNULIB_EXPLICIT_BZERO=0
28600
28601
28602
28603  GL_GNULIB_FFSL=0
28604
28605
28606
28607  GL_GNULIB_FFSLL=0
28608
28609
28610
28611  GL_GNULIB_MEMCHR=0
28612
28613
28614
28615  GL_GNULIB_MEMMEM=0
28616
28617
28618
28619  GL_GNULIB_MEMPCPY=0
28620
28621
28622
28623  GL_GNULIB_MEMRCHR=0
28624
28625
28626
28627  GL_GNULIB_RAWMEMCHR=0
28628
28629
28630
28631  GL_GNULIB_STPCPY=0
28632
28633
28634
28635  GL_GNULIB_STPNCPY=0
28636
28637
28638
28639  GL_GNULIB_STRCHRNUL=0
28640
28641
28642
28643  GL_GNULIB_STRDUP=0
28644
28645
28646
28647  GL_GNULIB_STRNCAT=0
28648
28649
28650
28651  GL_GNULIB_STRNDUP=0
28652
28653
28654
28655  GL_GNULIB_STRNLEN=0
28656
28657
28658
28659  GL_GNULIB_STRPBRK=0
28660
28661
28662
28663  GL_GNULIB_STRSEP=0
28664
28665
28666
28667  GL_GNULIB_STRSTR=0
28668
28669
28670
28671  GL_GNULIB_STRCASESTR=0
28672
28673
28674
28675  GL_GNULIB_STRTOK_R=0
28676
28677
28678
28679  GL_GNULIB_MBSLEN=0
28680
28681
28682
28683  GL_GNULIB_MBSNLEN=0
28684
28685
28686
28687  GL_GNULIB_MBSCHR=0
28688
28689
28690
28691  GL_GNULIB_MBSRCHR=0
28692
28693
28694
28695  GL_GNULIB_MBSSTR=0
28696
28697
28698
28699  GL_GNULIB_MBSCASECMP=0
28700
28701
28702
28703  GL_GNULIB_MBSNCASECMP=0
28704
28705
28706
28707  GL_GNULIB_MBSPCASECMP=0
28708
28709
28710
28711  GL_GNULIB_MBSCASESTR=0
28712
28713
28714
28715  GL_GNULIB_MBSCSPN=0
28716
28717
28718
28719  GL_GNULIB_MBSPBRK=0
28720
28721
28722
28723  GL_GNULIB_MBSSPN=0
28724
28725
28726
28727  GL_GNULIB_MBSSEP=0
28728
28729
28730
28731  GL_GNULIB_MBSTOK_R=0
28732
28733
28734
28735  GL_GNULIB_STRERROR=0
28736
28737
28738
28739  GL_GNULIB_STRERROR_R=0
28740
28741
28742
28743  GL_GNULIB_STRERRORNAME_NP=0
28744
28745
28746
28747  GL_GNULIB_SIGABBREV_NP=0
28748
28749
28750
28751  GL_GNULIB_SIGDESCR_NP=0
28752
28753
28754
28755  GL_GNULIB_STRSIGNAL=0
28756
28757
28758
28759  GL_GNULIB_STRVERSCMP=0
28760
28761
28762
28763  GL_GNULIB_MDA_MEMCCPY=1
28764
28765
28766
28767  GL_GNULIB_MDA_STRDUP=1
28768
28769
28770
28771ac_fn_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
28772if test "x$ac_cv_have_decl_memrchr" = xyes
28773then :
28774  ac_have_decl=1
28775else $as_nop
28776  ac_have_decl=0
28777fi
28778printf "%s\n" "#define HAVE_DECL_MEMRCHR $ac_have_decl" >>confdefs.h
28779
28780
28781
28782
28783
28784  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5
28785printf %s "checking whether <limits.h> defines MIN and MAX... " >&6; }
28786if test ${gl_cv_minmax_in_limits_h+y}
28787then :
28788  printf %s "(cached) " >&6
28789else $as_nop
28790  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28791/* end confdefs.h.  */
28792#include <limits.h>
28793            int x = MIN (42, 17);
28794int
28795main (void)
28796{
28797
28798  ;
28799  return 0;
28800}
28801_ACEOF
28802if ac_fn_c_try_compile "$LINENO"
28803then :
28804  gl_cv_minmax_in_limits_h=yes
28805else $as_nop
28806  gl_cv_minmax_in_limits_h=no
28807fi
28808rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28809fi
28810{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5
28811printf "%s\n" "$gl_cv_minmax_in_limits_h" >&6; }
28812  if test $gl_cv_minmax_in_limits_h = yes; then
28813
28814printf "%s\n" "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h
28815
28816  fi
28817
28818
28819
28820
28821
28822
28823  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5
28824printf %s "checking whether <sys/param.h> defines MIN and MAX... " >&6; }
28825if test ${gl_cv_minmax_in_sys_param_h+y}
28826then :
28827  printf %s "(cached) " >&6
28828else $as_nop
28829  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28830/* end confdefs.h.  */
28831#include <sys/param.h>
28832            int x = MIN (42, 17);
28833int
28834main (void)
28835{
28836
28837  ;
28838  return 0;
28839}
28840_ACEOF
28841if ac_fn_c_try_compile "$LINENO"
28842then :
28843  gl_cv_minmax_in_sys_param_h=yes
28844else $as_nop
28845  gl_cv_minmax_in_sys_param_h=no
28846fi
28847rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28848fi
28849{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5
28850printf "%s\n" "$gl_cv_minmax_in_sys_param_h" >&6; }
28851  if test $gl_cv_minmax_in_sys_param_h = yes; then
28852
28853printf "%s\n" "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
28854
28855  fi
28856
28857
28858
28859
28860
28861
28862
28863    HAVE_DECL_LOCALTIME_R=1;
28864  HAVE_NANOSLEEP=1;
28865  HAVE_STRPTIME=1;
28866  HAVE_TIMEGM=1;
28867  HAVE_TIMESPEC_GET=1;
28868    HAVE_TIMEZONE_T=0;
28869        REPLACE_CTIME=GNULIB_PORTCHECK;
28870  REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
28871  REPLACE_MKTIME=GNULIB_PORTCHECK;
28872  REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
28873  REPLACE_STRFTIME=GNULIB_PORTCHECK;
28874  REPLACE_TIMEGM=GNULIB_PORTCHECK;
28875  REPLACE_TZSET=GNULIB_PORTCHECK;
28876
28877      : ${GNULIB_GETTIMEOFDAY=0};
28878        REPLACE_GMTIME=0;
28879  REPLACE_LOCALTIME=0;
28880
28881
28882  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether time_t is signed" >&5
28883printf %s "checking whether time_t is signed... " >&6; }
28884if test ${gl_cv_time_t_is_signed+y}
28885then :
28886  printf %s "(cached) " >&6
28887else $as_nop
28888  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28889/* end confdefs.h.  */
28890#include <time.h>
28891                          char time_t_signed[(time_t) -1 < 0 ? 1 : -1];
28892int
28893main (void)
28894{
28895
28896  ;
28897  return 0;
28898}
28899_ACEOF
28900if ac_fn_c_try_compile "$LINENO"
28901then :
28902  gl_cv_time_t_is_signed=yes
28903else $as_nop
28904  gl_cv_time_t_is_signed=no
28905fi
28906rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28907fi
28908{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_t_is_signed" >&5
28909printf "%s\n" "$gl_cv_time_t_is_signed" >&6; }
28910  if test $gl_cv_time_t_is_signed = yes; then
28911
28912printf "%s\n" "#define TIME_T_IS_SIGNED 1" >>confdefs.h
28913
28914  fi
28915
28916ac_fn_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
28917if test "x$ac_cv_have_decl_alarm" = xyes
28918then :
28919  ac_have_decl=1
28920else $as_nop
28921  ac_have_decl=0
28922fi
28923printf "%s\n" "#define HAVE_DECL_ALARM $ac_have_decl" >>confdefs.h
28924
28925
28926
28927
28928
28929
28930
28931  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
28932printf %s "checking for working mktime... " >&6; }
28933if test ${gl_cv_func_working_mktime+y}
28934then :
28935  printf %s "(cached) " >&6
28936else $as_nop
28937  if test $APPLE_UNIVERSAL_BUILD = 1; then
28938       # A universal build on Apple Mac OS X platforms.
28939       # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
28940       # But we need a configuration result that is valid in both modes.
28941       gl_cv_func_working_mktime="guessing no"
28942     else
28943       if test "$cross_compiling" = yes
28944then :
28945  case "$host_os" in
28946                    # Guess no on native Windows.
28947            mingw*) gl_cv_func_working_mktime="guessing no" ;;
28948            *)      gl_cv_func_working_mktime="$gl_cross_guess_normal" ;;
28949          esac
28950
28951else $as_nop
28952  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28953/* end confdefs.h.  */
28954/* Test program from Paul Eggert and Tony Leneis.  */
28955#include <limits.h>
28956#include <stdlib.h>
28957#include <time.h>
28958
28959#ifdef HAVE_UNISTD_H
28960# include <unistd.h>
28961#endif
28962
28963#if HAVE_DECL_ALARM
28964# include <signal.h>
28965#endif
28966
28967
28968
28969$gl_mda_defines
28970
28971
28972#ifndef TIME_T_IS_SIGNED
28973# define TIME_T_IS_SIGNED 0
28974#endif
28975
28976static time_t time_t_max;
28977static time_t time_t_min;
28978
28979/* Values we'll use to set the TZ environment variable.  */
28980static char *tz_strings[] = {
28981  (char *) 0, "TZ=GMT0", "TZ=JST-9",
28982  "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
28983};
28984#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
28985
28986/* Return 0 if mktime fails to convert a date in the spring-forward gap.
28987   Based on a problem report from Andreas Jaeger.  */
28988static int
28989spring_forward_gap ()
28990{
28991  /* glibc (up to about 1998-10-07) failed this test. */
28992  struct tm tm;
28993
28994  /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
28995     instead of "TZ=America/Vancouver" in order to detect the bug even
28996     on systems that don't support the Olson extension, or don't have the
28997     full zoneinfo tables installed.  */
28998  putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
28999
29000  tm.tm_year = 98;
29001  tm.tm_mon = 3;
29002  tm.tm_mday = 5;
29003  tm.tm_hour = 2;
29004  tm.tm_min = 0;
29005  tm.tm_sec = 0;
29006  tm.tm_isdst = -1;
29007  return mktime (&tm) != (time_t) -1;
29008}
29009
29010static int
29011mktime_test1 (time_t now)
29012{
29013  struct tm *lt;
29014  return ! (lt = localtime (&now)) || mktime (lt) == now;
29015}
29016
29017static int
29018mktime_test (time_t now)
29019{
29020  return (mktime_test1 (now)
29021          && mktime_test1 ((time_t) (time_t_max - now))
29022          && mktime_test1 ((time_t) (time_t_min + now)));
29023}
29024
29025static int
29026irix_6_4_bug ()
29027{
29028  /* Based on code from Ariel Faigon.  */
29029  struct tm tm;
29030  tm.tm_year = 96;
29031  tm.tm_mon = 3;
29032  tm.tm_mday = 0;
29033  tm.tm_hour = 0;
29034  tm.tm_min = 0;
29035  tm.tm_sec = 0;
29036  tm.tm_isdst = -1;
29037  mktime (&tm);
29038  return tm.tm_mon == 2 && tm.tm_mday == 31;
29039}
29040
29041static int
29042bigtime_test (int j)
29043{
29044  struct tm tm;
29045  time_t now;
29046  tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
29047  now = mktime (&tm);
29048  if (now != (time_t) -1)
29049    {
29050      struct tm *lt = localtime (&now);
29051      if (! (lt
29052             && lt->tm_year == tm.tm_year
29053             && lt->tm_mon == tm.tm_mon
29054             && lt->tm_mday == tm.tm_mday
29055             && lt->tm_hour == tm.tm_hour
29056             && lt->tm_min == tm.tm_min
29057             && lt->tm_sec == tm.tm_sec
29058             && lt->tm_yday == tm.tm_yday
29059             && lt->tm_wday == tm.tm_wday
29060             && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
29061                  == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
29062        return 0;
29063    }
29064  return 1;
29065}
29066
29067static int
29068year_2050_test ()
29069{
29070  /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
29071     ignoring leap seconds.  */
29072  unsigned long int answer = 2527315200UL;
29073
29074  struct tm tm;
29075  time_t t;
29076  tm.tm_year = 2050 - 1900;
29077  tm.tm_mon = 2 - 1;
29078  tm.tm_mday = 1;
29079  tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
29080  tm.tm_isdst = -1;
29081
29082  /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
29083     instead of "TZ=America/Vancouver" in order to detect the bug even
29084     on systems that don't support the Olson extension, or don't have the
29085     full zoneinfo tables installed.  */
29086  putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
29087
29088  t = mktime (&tm);
29089
29090  /* Check that the result is either a failure, or close enough
29091     to the correct answer that we can assume the discrepancy is
29092     due to leap seconds.  */
29093  return (t == (time_t) -1
29094          || (0 < t && answer - 120 <= t && t <= answer + 120));
29095}
29096
29097int
29098main ()
29099{
29100  int result = 0;
29101  time_t t, delta;
29102  int i, j;
29103  int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
29104
29105#if HAVE_DECL_ALARM
29106  /* This test makes some buggy mktime implementations loop.
29107     Give up after 60 seconds; a mktime slower than that
29108     isn't worth using anyway.  */
29109  signal (SIGALRM, SIG_DFL);
29110  alarm (60);
29111#endif
29112
29113  time_t_max = (! TIME_T_IS_SIGNED
29114                ? (time_t) -1
29115                : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
29116                   * 2 + 1));
29117  time_t_min = (! TIME_T_IS_SIGNED
29118                ? (time_t) 0
29119                : time_t_signed_magnitude
29120                ? ~ (time_t) 0
29121                : ~ time_t_max);
29122
29123  delta = time_t_max / 997; /* a suitable prime number */
29124  for (i = 0; i < N_STRINGS; i++)
29125    {
29126      if (tz_strings[i])
29127        putenv (tz_strings[i]);
29128
29129      for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
29130        if (! mktime_test (t))
29131          result |= 1;
29132      if ((result & 2) == 0
29133          && ! (mktime_test ((time_t) 1)
29134                && mktime_test ((time_t) (60 * 60))
29135                && mktime_test ((time_t) (60 * 60 * 24))))
29136        result |= 2;
29137
29138      for (j = 1; (result & 4) == 0; j <<= 1)
29139        {
29140          if (! bigtime_test (j))
29141            result |= 4;
29142          if (INT_MAX / 2 < j)
29143            break;
29144        }
29145      if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
29146        result |= 8;
29147    }
29148  if (! irix_6_4_bug ())
29149    result |= 16;
29150  if (! spring_forward_gap ())
29151    result |= 32;
29152  if (! year_2050_test ())
29153    result |= 64;
29154  return result;
29155}
29156_ACEOF
29157if ac_fn_c_try_run "$LINENO"
29158then :
29159  gl_cv_func_working_mktime=yes
29160else $as_nop
29161  gl_cv_func_working_mktime=no
29162fi
29163rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29164  conftest.$ac_objext conftest.beam conftest.$ac_ext
29165fi
29166
29167     fi
29168
29169fi
29170{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
29171printf "%s\n" "$gl_cv_func_working_mktime" >&6; }
29172
29173
29174
29175  GL_GNULIB_CTIME=0
29176
29177
29178
29179  GL_GNULIB_MKTIME=0
29180
29181
29182
29183  GL_GNULIB_LOCALTIME=0
29184
29185
29186
29187  GL_GNULIB_NANOSLEEP=0
29188
29189
29190
29191  GL_GNULIB_STRFTIME=0
29192
29193
29194
29195  GL_GNULIB_STRPTIME=0
29196
29197
29198
29199  GL_GNULIB_TIMEGM=0
29200
29201
29202
29203  GL_GNULIB_TIMESPEC_GET=0
29204
29205
29206
29207  GL_GNULIB_TIME_R=0
29208
29209
29210
29211  GL_GNULIB_TIME_RZ=0
29212
29213
29214
29215  GL_GNULIB_TZSET=0
29216
29217
29218
29219  GL_GNULIB_MDA_TZSET=1
29220
29221
29222
29223
29224
29225
29226
29227    HAVE_PSELECT=1;
29228  REPLACE_PSELECT=0;
29229  REPLACE_SELECT=0;
29230
29231
29232
29233
29234
29235  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
29236printf %s "checking whether <sys/select.h> is self-contained... " >&6; }
29237if test ${gl_cv_header_sys_select_h_selfcontained+y}
29238then :
29239  printf %s "(cached) " >&6
29240else $as_nop
29241
29242                                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29243/* end confdefs.h.  */
29244#include <sys/select.h>
29245int
29246main (void)
29247{
29248struct timeval b;
29249  ;
29250  return 0;
29251}
29252_ACEOF
29253if ac_fn_c_try_compile "$LINENO"
29254then :
29255  gl_cv_header_sys_select_h_selfcontained=yes
29256else $as_nop
29257  gl_cv_header_sys_select_h_selfcontained=no
29258fi
29259rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
29260                        if test $gl_cv_header_sys_select_h_selfcontained = yes; then
29261        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29262/* end confdefs.h.  */
29263#include <sys/select.h>
29264int
29265main (void)
29266{
29267int memset; int bzero;
29268  ;
29269  return 0;
29270}
29271
29272_ACEOF
29273if ac_fn_c_try_compile "$LINENO"
29274then :
29275  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29276/* end confdefs.h.  */
29277#include <sys/select.h>
29278int
29279main (void)
29280{
29281
29282                  #undef memset
29283                  #define memset nonexistent_memset
29284                  extern
29285                  #ifdef __cplusplus
29286                  "C"
29287                  #endif
29288                  void *memset (void *, int, unsigned long);
29289                  #undef bzero
29290                  #define bzero nonexistent_bzero
29291                  extern
29292                  #ifdef __cplusplus
29293                  "C"
29294                  #endif
29295                  void bzero (void *, unsigned long);
29296                  fd_set fds;
29297                  FD_ZERO (&fds);
29298
29299  ;
29300  return 0;
29301}
29302
29303_ACEOF
29304if ac_fn_c_try_link "$LINENO"
29305then :
29306
29307else $as_nop
29308  gl_cv_header_sys_select_h_selfcontained=no
29309fi
29310rm -f core conftest.err conftest.$ac_objext conftest.beam \
29311    conftest$ac_exeext conftest.$ac_ext
29312
29313fi
29314rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
29315      fi
29316
29317fi
29318{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
29319printf "%s\n" "$gl_cv_header_sys_select_h_selfcontained" >&6; }
29320
29321
29322
29323
29324
29325
29326
29327
29328
29329     if test $gl_cv_have_include_next = yes; then
29330       gl_cv_next_sys_select_h='<'sys/select.h'>'
29331     else
29332       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
29333printf %s "checking absolute name of <sys/select.h>... " >&6; }
29334if test ${gl_cv_next_sys_select_h+y}
29335then :
29336  printf %s "(cached) " >&6
29337else $as_nop
29338
29339             if test $ac_cv_header_sys_select_h = yes; then
29340
29341
29342
29343
29344  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29345/* end confdefs.h.  */
29346#include <sys/select.h>
29347_ACEOF
29348                case "$host_os" in
29349    aix*) gl_absname_cpp="$ac_cpp -C" ;;
29350    *)    gl_absname_cpp="$ac_cpp" ;;
29351  esac
29352
29353  case "$host_os" in
29354    mingw*)
29355                                          gl_dirsep_regex='[/\\]'
29356      ;;
29357    *)
29358      gl_dirsep_regex='\/'
29359      ;;
29360  esac
29361      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29362  gl_header_literal_regex=`echo 'sys/select.h' \
29363                           | sed -e "$gl_make_literal_regex_sed"`
29364  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29365      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29366      s|^/[^/]|//&|
29367      p
29368      q
29369    }'
29370
29371        gl_cv_absolute_sys_select_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29372  sed -n "$gl_absolute_header_sed"`
29373
29374           gl_header=$gl_cv_absolute_sys_select_h
29375           gl_cv_next_sys_select_h='"'$gl_header'"'
29376          else
29377               gl_cv_next_sys_select_h='<'sys/select.h'>'
29378             fi
29379
29380
29381fi
29382{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
29383printf "%s\n" "$gl_cv_next_sys_select_h" >&6; }
29384     fi
29385     NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
29386
29387     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29388       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29389       gl_next_as_first_directive='<'sys/select.h'>'
29390     else
29391       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29392       gl_next_as_first_directive=$gl_cv_next_sys_select_h
29393     fi
29394     NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
29395
29396
29397
29398
29399  if test $ac_cv_header_sys_select_h = yes; then
29400    HAVE_SYS_SELECT_H=1
29401  else
29402    HAVE_SYS_SELECT_H=0
29403  fi
29404
29405
29406
29407
29408
29409  if test $ac_cv_header_sys_socket_h != yes; then
29410                    ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
29411if test "x$ac_cv_header_winsock2_h" = xyes
29412then :
29413  printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
29414
29415fi
29416
29417  fi
29418  if test "$ac_cv_header_winsock2_h" = yes; then
29419    HAVE_WINSOCK2_H=1
29420    UNISTD_H_HAVE_WINSOCK2_H=1
29421    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
29422  else
29423    HAVE_WINSOCK2_H=0
29424  fi
29425
29426
29427
29428
29429
29430
29431
29432
29433
29434
29435
29436
29437  if test $ac_cv_header_sys_socket_h != yes; then
29438                    ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
29439if test "x$ac_cv_header_winsock2_h" = xyes
29440then :
29441  printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
29442
29443fi
29444
29445  fi
29446  if test "$ac_cv_header_winsock2_h" = yes; then
29447    HAVE_WINSOCK2_H=1
29448    UNISTD_H_HAVE_WINSOCK2_H=1
29449    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
29450  else
29451    HAVE_WINSOCK2_H=0
29452  fi
29453
29454   LIBSOCKET=
29455  if test $HAVE_WINSOCK2_H = 1; then
29456                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for WSAStartup" >&5
29457printf %s "checking for WSAStartup... " >&6; }
29458if test ${gl_cv_func_wsastartup+y}
29459then :
29460  printf %s "(cached) " >&6
29461else $as_nop
29462
29463       gl_save_LIBS="$LIBS"
29464       LIBS="$LIBS -lws2_32"
29465       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29466/* end confdefs.h.  */
29467
29468#ifdef HAVE_WINSOCK2_H
29469# include <winsock2.h>
29470#endif
29471int
29472main (void)
29473{
29474
29475            WORD wVersionRequested = MAKEWORD(1, 1);
29476            WSADATA wsaData;
29477            int err = WSAStartup(wVersionRequested, &wsaData);
29478            WSACleanup ();
29479
29480  ;
29481  return 0;
29482}
29483
29484_ACEOF
29485if ac_fn_c_try_link "$LINENO"
29486then :
29487  gl_cv_func_wsastartup=yes
29488else $as_nop
29489  gl_cv_func_wsastartup=no
29490fi
29491rm -f core conftest.err conftest.$ac_objext conftest.beam \
29492    conftest$ac_exeext conftest.$ac_ext
29493       LIBS="$gl_save_LIBS"
29494
29495fi
29496{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5
29497printf "%s\n" "$gl_cv_func_wsastartup" >&6; }
29498    if test "$gl_cv_func_wsastartup" = "yes"; then
29499
29500printf "%s\n" "#define WINDOWS_SOCKETS 1" >>confdefs.h
29501
29502      LIBSOCKET='-lws2_32'
29503    fi
29504  else
29505                                    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
29506printf %s "checking for library containing setsockopt... " >&6; }
29507if test ${gl_cv_lib_socket+y}
29508then :
29509  printf %s "(cached) " >&6
29510else $as_nop
29511
29512      gl_cv_lib_socket=
29513      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29514/* end confdefs.h.  */
29515extern
29516#ifdef __cplusplus
29517"C"
29518#endif
29519char setsockopt();
29520int
29521main (void)
29522{
29523setsockopt();
29524  ;
29525  return 0;
29526}
29527_ACEOF
29528if ac_fn_c_try_link "$LINENO"
29529then :
29530
29531else $as_nop
29532  gl_save_LIBS="$LIBS"
29533         LIBS="$gl_save_LIBS -lsocket"
29534         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29535/* end confdefs.h.  */
29536extern
29537#ifdef __cplusplus
29538"C"
29539#endif
29540char setsockopt();
29541int
29542main (void)
29543{
29544setsockopt();
29545  ;
29546  return 0;
29547}
29548_ACEOF
29549if ac_fn_c_try_link "$LINENO"
29550then :
29551  gl_cv_lib_socket="-lsocket"
29552fi
29553rm -f core conftest.err conftest.$ac_objext conftest.beam \
29554    conftest$ac_exeext conftest.$ac_ext
29555         if test -z "$gl_cv_lib_socket"; then
29556           LIBS="$gl_save_LIBS -lnetwork"
29557           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29558/* end confdefs.h.  */
29559extern
29560#ifdef __cplusplus
29561"C"
29562#endif
29563char setsockopt();
29564int
29565main (void)
29566{
29567setsockopt();
29568  ;
29569  return 0;
29570}
29571_ACEOF
29572if ac_fn_c_try_link "$LINENO"
29573then :
29574  gl_cv_lib_socket="-lnetwork"
29575fi
29576rm -f core conftest.err conftest.$ac_objext conftest.beam \
29577    conftest$ac_exeext conftest.$ac_ext
29578           if test -z "$gl_cv_lib_socket"; then
29579             LIBS="$gl_save_LIBS -lnet"
29580             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29581/* end confdefs.h.  */
29582extern
29583#ifdef __cplusplus
29584"C"
29585#endif
29586char setsockopt();
29587int
29588main (void)
29589{
29590setsockopt();
29591  ;
29592  return 0;
29593}
29594_ACEOF
29595if ac_fn_c_try_link "$LINENO"
29596then :
29597  gl_cv_lib_socket="-lnet"
29598fi
29599rm -f core conftest.err conftest.$ac_objext conftest.beam \
29600    conftest$ac_exeext conftest.$ac_ext
29601           fi
29602         fi
29603         LIBS="$gl_save_LIBS"
29604
29605fi
29606rm -f core conftest.err conftest.$ac_objext conftest.beam \
29607    conftest$ac_exeext conftest.$ac_ext
29608      if test -z "$gl_cv_lib_socket"; then
29609        gl_cv_lib_socket="none needed"
29610      fi
29611
29612fi
29613{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5
29614printf "%s\n" "$gl_cv_lib_socket" >&6; }
29615    if test "$gl_cv_lib_socket" != "none needed"; then
29616      LIBSOCKET="$gl_cv_lib_socket"
29617    fi
29618  fi
29619
29620
29621
29622
29623
29624
29625  :
29626
29627
29628
29629
29630
29631
29632  if test "$ac_cv_header_winsock2_h" = yes; then
29633    REPLACE_SELECT=1
29634  else
29635
29636    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
29637printf %s "checking whether select supports a 0 argument... " >&6; }
29638if test ${gl_cv_func_select_supports0+y}
29639then :
29640  printf %s "(cached) " >&6
29641else $as_nop
29642
29643        if test "$cross_compiling" = yes
29644then :
29645
29646           case "$host_os" in
29647                       # Guess no on Interix.
29648             interix*) gl_cv_func_select_supports0="guessing no";;
29649                       # Guess yes otherwise.
29650             *)        gl_cv_func_select_supports0="guessing yes";;
29651           esac
29652
29653else $as_nop
29654  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29655/* end confdefs.h.  */
29656
29657#include <sys/types.h>
29658#include <sys/time.h>
29659#if HAVE_SYS_SELECT_H
29660#include <sys/select.h>
29661#endif
29662int main ()
29663{
29664  struct timeval timeout;
29665  timeout.tv_sec = 0;
29666  timeout.tv_usec = 5;
29667  return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
29668}
29669_ACEOF
29670if ac_fn_c_try_run "$LINENO"
29671then :
29672  gl_cv_func_select_supports0=yes
29673else $as_nop
29674  gl_cv_func_select_supports0=no
29675fi
29676rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29677  conftest.$ac_objext conftest.beam conftest.$ac_ext
29678fi
29679
29680
29681fi
29682{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
29683printf "%s\n" "$gl_cv_func_select_supports0" >&6; }
29684    case "$gl_cv_func_select_supports0" in
29685      *yes) ;;
29686      *) REPLACE_SELECT=1 ;;
29687    esac
29688
29689        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
29690printf %s "checking whether select detects invalid fds... " >&6; }
29691if test ${gl_cv_func_select_detects_ebadf+y}
29692then :
29693  printf %s "(cached) " >&6
29694else $as_nop
29695
29696        if test "$cross_compiling" = yes
29697then :
29698
29699           case "$host_os" in
29700                             # Guess yes on Linux systems.
29701            linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;;
29702                             # Guess yes on glibc systems.
29703            *-gnu* | gnu*)   gl_cv_func_select_detects_ebadf="guessing yes" ;;
29704                             # If we don't know, obey --enable-cross-guesses.
29705            *)               gl_cv_func_select_detects_ebadf="$gl_cross_guess_normal" ;;
29706           esac
29707
29708else $as_nop
29709  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29710/* end confdefs.h.  */
29711
29712#include <sys/types.h>
29713#include <sys/time.h>
29714#if HAVE_SYS_SELECT_H
29715# include <sys/select.h>
29716#endif
29717#include <unistd.h>
29718#include <errno.h>
29719
29720
29721$gl_mda_defines
29722
29723int
29724main (void)
29725{
29726
29727  fd_set set;
29728  dup2(0, 16);
29729  FD_ZERO(&set);
29730  FD_SET(16, &set);
29731  close(16);
29732  struct timeval timeout;
29733  timeout.tv_sec = 0;
29734  timeout.tv_usec = 5;
29735  return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
29736
29737  ;
29738  return 0;
29739}
29740_ACEOF
29741if ac_fn_c_try_run "$LINENO"
29742then :
29743  gl_cv_func_select_detects_ebadf=yes
29744else $as_nop
29745  gl_cv_func_select_detects_ebadf=no
29746fi
29747rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29748  conftest.$ac_objext conftest.beam conftest.$ac_ext
29749fi
29750
29751
29752fi
29753{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
29754printf "%s\n" "$gl_cv_func_select_detects_ebadf" >&6; }
29755    case $gl_cv_func_select_detects_ebadf in
29756      *yes) ;;
29757      *) REPLACE_SELECT=1 ;;
29758    esac
29759  fi
29760
29761    LIB_SELECT="$LIBSOCKET"
29762  if test $REPLACE_SELECT = 1; then
29763    case "$host_os" in
29764      mingw*)
29765                                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29766/* end confdefs.h.  */
29767
29768#define WIN32_LEAN_AND_MEAN
29769#include <windows.h>
29770int
29771main ()
29772{
29773  MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
29774  return 0;
29775}
29776_ACEOF
29777if ac_fn_c_try_link "$LINENO"
29778then :
29779
29780else $as_nop
29781  LIB_SELECT="$LIB_SELECT -luser32"
29782fi
29783rm -f core conftest.err conftest.$ac_objext conftest.beam \
29784    conftest$ac_exeext conftest.$ac_ext
29785        ;;
29786    esac
29787  fi
29788
29789
29790
29791
29792  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
29793printf %s "checking for O_CLOEXEC... " >&6; }
29794if test ${gl_cv_macro_O_CLOEXEC+y}
29795then :
29796  printf %s "(cached) " >&6
29797else $as_nop
29798  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29799/* end confdefs.h.  */
29800#include <fcntl.h>
29801                          #ifndef O_CLOEXEC
29802                            choke me;
29803                          #endif
29804
29805int
29806main (void)
29807{
29808return O_CLOEXEC;
29809  ;
29810  return 0;
29811}
29812_ACEOF
29813if ac_fn_c_try_compile "$LINENO"
29814then :
29815  gl_cv_macro_O_CLOEXEC=yes
29816else $as_nop
29817  gl_cv_macro_O_CLOEXEC=no
29818fi
29819rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
29820fi
29821{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
29822printf "%s\n" "$gl_cv_macro_O_CLOEXEC" >&6; }
29823
29824
29825
29826  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
29827printf %s "checking for promoted mode_t type... " >&6; }
29828if test ${gl_cv_promoted_mode_t+y}
29829then :
29830  printf %s "(cached) " >&6
29831else $as_nop
29832
29833                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29834/* end confdefs.h.  */
29835#include <sys/types.h>
29836int
29837main (void)
29838{
29839typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
29840  ;
29841  return 0;
29842}
29843_ACEOF
29844if ac_fn_c_try_compile "$LINENO"
29845then :
29846  gl_cv_promoted_mode_t='int'
29847else $as_nop
29848  gl_cv_promoted_mode_t='mode_t'
29849fi
29850rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
29851
29852fi
29853{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
29854printf "%s\n" "$gl_cv_promoted_mode_t" >&6; }
29855
29856printf "%s\n" "#define PROMOTED_MODE_T $gl_cv_promoted_mode_t" >>confdefs.h
29857
29858
29859
29860
29861
29862
29863    HAVE_POSIX_SPAWN=1;
29864  HAVE_POSIX_SPAWNATTR_T=1;
29865  HAVE_POSIX_SPAWN_FILE_ACTIONS_T=1;
29866
29867  HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR=1;
29868
29869  HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR=1;
29870
29871  REPLACE_POSIX_SPAWN=0;
29872  REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR=0;
29873
29874  REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0;
29875
29876  REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0;
29877
29878  REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR=0;
29879
29880  REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0;
29881
29882
29883
29884
29885
29886  LIB_POSIX_SPAWN=
29887
29888  gl_saved_libs=$LIBS
29889    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing posix_spawn" >&5
29890printf %s "checking for library containing posix_spawn... " >&6; }
29891if test ${ac_cv_search_posix_spawn+y}
29892then :
29893  printf %s "(cached) " >&6
29894else $as_nop
29895  ac_func_search_save_LIBS=$LIBS
29896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29897/* end confdefs.h.  */
29898
29899/* Override any GCC internal prototype to avoid an error.
29900   Use char because int might match the return type of a GCC
29901   builtin and then its argument prototype would still apply.  */
29902char posix_spawn ();
29903int
29904main (void)
29905{
29906return posix_spawn ();
29907  ;
29908  return 0;
29909}
29910_ACEOF
29911for ac_lib in '' rt
29912do
29913  if test -z "$ac_lib"; then
29914    ac_res="none required"
29915  else
29916    ac_res=-l$ac_lib
29917    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
29918  fi
29919  if ac_fn_c_try_link "$LINENO"
29920then :
29921  ac_cv_search_posix_spawn=$ac_res
29922fi
29923rm -f core conftest.err conftest.$ac_objext conftest.beam \
29924    conftest$ac_exeext
29925  if test ${ac_cv_search_posix_spawn+y}
29926then :
29927  break
29928fi
29929done
29930if test ${ac_cv_search_posix_spawn+y}
29931then :
29932
29933else $as_nop
29934  ac_cv_search_posix_spawn=no
29935fi
29936rm conftest.$ac_ext
29937LIBS=$ac_func_search_save_LIBS
29938fi
29939{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_posix_spawn" >&5
29940printf "%s\n" "$ac_cv_search_posix_spawn" >&6; }
29941ac_res=$ac_cv_search_posix_spawn
29942if test "$ac_res" != no
29943then :
29944  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
29945  test "$ac_cv_search_posix_spawn" = "none required" ||
29946                    LIB_POSIX_SPAWN=$ac_cv_search_posix_spawn
29947fi
29948
29949    ac_fn_c_check_func "$LINENO" "posix_spawn" "ac_cv_func_posix_spawn"
29950if test "x$ac_cv_func_posix_spawn" = xyes
29951then :
29952  printf "%s\n" "#define HAVE_POSIX_SPAWN 1" >>confdefs.h
29953
29954fi
29955
29956  LIBS=$gl_saved_libs
29957
29958  if test $ac_cv_func_posix_spawn != yes; then
29959    HAVE_POSIX_SPAWN=0
29960  fi
29961
29962
29963
29964
29965
29966                                      ac_fn_check_decl "$LINENO" "posix_spawn" "ac_cv_have_decl_posix_spawn" "#include <spawn.h>
29967" "$ac_c_undeclared_builtin_options" "CFLAGS"
29968if test "x$ac_cv_have_decl_posix_spawn" = xyes
29969then :
29970  ac_have_decl=1
29971else $as_nop
29972  ac_have_decl=0
29973fi
29974printf "%s\n" "#define HAVE_DECL_POSIX_SPAWN $ac_have_decl" >>confdefs.h
29975
29976  if test $ac_cv_func_posix_spawn = yes; then
29977
29978       if test $ac_cv_func_posix_spawn_file_actions_addchdir_np = no; then
29979                           REPLACE_POSIX_SPAWN=1
29980       fi
29981
29982
29983    if test $REPLACE_POSIX_SPAWN = 0; then
29984
29985
29986     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn works" >&5
29987printf %s "checking whether posix_spawn works... " >&6; }
29988if test ${gl_cv_func_posix_spawn_works+y}
29989then :
29990  printf %s "(cached) " >&6
29991else $as_nop
29992  if test $cross_compiling = no; then
29993       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29994/* end confdefs.h.  */
29995
29996#include <errno.h>
29997#include <fcntl.h>
29998#include <signal.h>
29999#include <spawn.h>
30000#include <stdbool.h>
30001#include <stdio.h>
30002#include <stdlib.h>
30003#include <string.h>
30004#include <unistd.h>
30005#include <sys/types.h>
30006#include <sys/wait.h>
30007
30008
30009$gl_mda_defines
30010
30011
30012extern char **environ;
30013
30014#ifndef STDIN_FILENO
30015# define STDIN_FILENO 0
30016#endif
30017#ifndef STDOUT_FILENO
30018# define STDOUT_FILENO 1
30019#endif
30020#ifndef STDERR_FILENO
30021# define STDERR_FILENO 2
30022#endif
30023
30024#ifndef WTERMSIG
30025# define WTERMSIG(x) ((x) & 0x7f)
30026#endif
30027#ifndef WIFEXITED
30028# define WIFEXITED(x) (WTERMSIG (x) == 0)
30029#endif
30030#ifndef WEXITSTATUS
30031# define WEXITSTATUS(x) (((x) >> 8) & 0xff)
30032#endif
30033
30034#define CHILD_PROGRAM_FILENAME "/non/exist/ent"
30035
30036static int
30037fd_safer (int fd)
30038{
30039  if (0 <= fd && fd <= 2)
30040    {
30041      int f = fd_safer (dup (fd));
30042      int e = errno;
30043      close (fd);
30044      errno = e;
30045      fd = f;
30046    }
30047
30048  return fd;
30049}
30050
30051int
30052main ()
30053{
30054  char *argv[2] = { CHILD_PROGRAM_FILENAME, NULL };
30055  int ofd[2];
30056  sigset_t blocked_signals;
30057  sigset_t fatal_signal_set;
30058  posix_spawn_file_actions_t actions;
30059  bool actions_allocated;
30060  posix_spawnattr_t attrs;
30061  bool attrs_allocated;
30062  int err;
30063  pid_t child;
30064  int status;
30065  int exitstatus;
30066
30067  setvbuf (stdout, NULL, _IOFBF, 0);
30068  puts ("This should be seen only once.");
30069  if (pipe (ofd) < 0 || (ofd[1] = fd_safer (ofd[1])) < 0)
30070    {
30071      perror ("cannot create pipe");
30072      exit (1);
30073    }
30074  sigprocmask (SIG_SETMASK, NULL, &blocked_signals);
30075  sigemptyset (&fatal_signal_set);
30076  sigaddset (&fatal_signal_set, SIGINT);
30077  sigaddset (&fatal_signal_set, SIGTERM);
30078  sigaddset (&fatal_signal_set, SIGHUP);
30079  sigaddset (&fatal_signal_set, SIGPIPE);
30080  sigprocmask (SIG_BLOCK, &fatal_signal_set, NULL);
30081  actions_allocated = false;
30082  attrs_allocated = false;
30083  if ((err = posix_spawn_file_actions_init (&actions)) != 0
30084      || (actions_allocated = true,
30085          (err = posix_spawn_file_actions_adddup2 (&actions, ofd[0], STDIN_FILENO)) != 0
30086          || (err = posix_spawn_file_actions_addclose (&actions, ofd[0])) != 0
30087          || (err = posix_spawn_file_actions_addclose (&actions, ofd[1])) != 0
30088          || (err = posix_spawnattr_init (&attrs)) != 0
30089          || (attrs_allocated = true,
30090              (err = posix_spawnattr_setsigmask (&attrs, &blocked_signals)) != 0
30091              || (err = posix_spawnattr_setflags (&attrs, POSIX_SPAWN_SETSIGMASK)) != 0)
30092          || (err = posix_spawnp (&child, CHILD_PROGRAM_FILENAME, &actions, &attrs, argv, environ)) != 0))
30093    {
30094      if (actions_allocated)
30095        posix_spawn_file_actions_destroy (&actions);
30096      if (attrs_allocated)
30097        posix_spawnattr_destroy (&attrs);
30098      sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
30099      if (err == ENOENT)
30100        return 0;
30101      else
30102        {
30103          errno = err;
30104          perror ("subprocess failed");
30105          exit (1);
30106        }
30107    }
30108  posix_spawn_file_actions_destroy (&actions);
30109  posix_spawnattr_destroy (&attrs);
30110  sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
30111  close (ofd[0]);
30112  close (ofd[1]);
30113  status = 0;
30114  while (waitpid (child, &status, 0) != child)
30115    ;
30116  if (!WIFEXITED (status))
30117    {
30118      fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
30119      exit (1);
30120    }
30121  exitstatus = WEXITSTATUS (status);
30122  if (exitstatus != 127)
30123    {
30124      fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
30125      exit (1);
30126    }
30127  return 0;
30128}
30129
30130_ACEOF
30131if ac_fn_c_try_link "$LINENO"
30132then :
30133  if test -s conftest$ac_exeext \
30134             && ./conftest$ac_exeext > conftest.out \
30135             && echo 'This should be seen only once.' > conftest.ok \
30136             && cmp conftest.out conftest.ok >/dev/null 2>&1; then
30137            gl_cv_func_posix_spawn_works=yes
30138          else
30139            gl_cv_func_posix_spawn_works=no
30140          fi
30141else $as_nop
30142  gl_cv_func_posix_spawn_works=no
30143fi
30144rm -f core conftest.err conftest.$ac_objext conftest.beam \
30145    conftest$ac_exeext conftest.$ac_ext
30146       if test $gl_cv_func_posix_spawn_works = yes; then
30147         if test "$cross_compiling" = yes
30148then :
30149  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30150printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
30151as_fn_error $? "cannot run test program while cross compiling
30152See \`config.log' for more details" "$LINENO" 5; }
30153else $as_nop
30154  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30155/* end confdefs.h.  */
30156
30157/* Test whether posix_spawn_file_actions_addopen supports filename arguments
30158   that contain special characters such as '*'.  */
30159
30160#include <errno.h>
30161#include <fcntl.h>
30162#include <signal.h>
30163#include <spawn.h>
30164#include <stdbool.h>
30165#include <stdio.h>
30166#include <string.h>
30167#include <unistd.h>
30168#include <sys/types.h>
30169#include <sys/wait.h>
30170
30171
30172$gl_mda_defines
30173
30174
30175extern char **environ;
30176
30177#ifndef STDIN_FILENO
30178# define STDIN_FILENO 0
30179#endif
30180#ifndef STDOUT_FILENO
30181# define STDOUT_FILENO 1
30182#endif
30183#ifndef STDERR_FILENO
30184# define STDERR_FILENO 2
30185#endif
30186
30187#ifndef WTERMSIG
30188# define WTERMSIG(x) ((x) & 0x7f)
30189#endif
30190#ifndef WIFEXITED
30191# define WIFEXITED(x) (WTERMSIG (x) == 0)
30192#endif
30193#ifndef WEXITSTATUS
30194# define WEXITSTATUS(x) (((x) >> 8) & 0xff)
30195#endif
30196
30197#define CHILD_PROGRAM_FILENAME "conftest"
30198#define DATA_FILENAME "conftest%=*#?"
30199
30200static int
30201parent_main (void)
30202{
30203  FILE *fp;
30204  char *argv[3] = { CHILD_PROGRAM_FILENAME, "-child", NULL };
30205  posix_spawn_file_actions_t actions;
30206  bool actions_allocated;
30207  int err;
30208  pid_t child;
30209  int status;
30210  int exitstatus;
30211
30212  /* Create a data file with specific contents.  */
30213  fp = fopen (DATA_FILENAME, "wb");
30214  if (fp == NULL)
30215    {
30216      perror ("cannot create data file");
30217      return 1;
30218    }
30219  fwrite ("Halle Potta", 1, 11, fp);
30220  if (fflush (fp) || fclose (fp))
30221    {
30222      perror ("cannot prepare data file");
30223      return 2;
30224    }
30225
30226  /* Avoid reading from our stdin, as it could block.  */
30227  freopen ("/dev/null", "rb", stdin);
30228
30229  /* Test whether posix_spawn_file_actions_addopen with this file name
30230     actually works, but spawning a child that reads from this file.  */
30231  actions_allocated = false;
30232  if ((err = posix_spawn_file_actions_init (&actions)) != 0
30233      || (actions_allocated = true,
30234          (err = posix_spawn_file_actions_addopen (&actions, STDIN_FILENO, DATA_FILENAME, O_RDONLY, 0600)) != 0
30235          || (err = posix_spawn (&child, CHILD_PROGRAM_FILENAME, &actions, NULL, argv, environ)) != 0))
30236    {
30237      if (actions_allocated)
30238        posix_spawn_file_actions_destroy (&actions);
30239      errno = err;
30240      perror ("subprocess failed");
30241      return 3;
30242    }
30243  posix_spawn_file_actions_destroy (&actions);
30244  status = 0;
30245  while (waitpid (child, &status, 0) != child)
30246    ;
30247  if (!WIFEXITED (status))
30248    {
30249      fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
30250      return 4;
30251    }
30252  exitstatus = WEXITSTATUS (status);
30253  if (exitstatus != 0)
30254    {
30255      fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
30256      return 5;
30257    }
30258  return 0;
30259}
30260
30261static int
30262child_main (void)
30263{
30264  char buf[1024];
30265
30266  /* See if reading from STDIN_FILENO yields the expected contents.  */
30267  if (fread (buf, 1, sizeof (buf), stdin) == 11
30268      && memcmp (buf, "Halle Potta", 11) == 0)
30269    return 0;
30270  else
30271    return 8;
30272}
30273
30274static void
30275cleanup_then_die (int sig)
30276{
30277  /* Clean up data file.  */
30278  unlink (DATA_FILENAME);
30279
30280  /* Re-raise the signal and die from it.  */
30281  signal (sig, SIG_DFL);
30282  raise (sig);
30283}
30284
30285int
30286main (int argc, char *argv[])
30287{
30288  int exitstatus;
30289
30290  if (!(argc > 1 && strcmp (argv[1], "-child") == 0))
30291    {
30292      /* This is the parent process.  */
30293      signal (SIGINT, cleanup_then_die);
30294      signal (SIGTERM, cleanup_then_die);
30295      #ifdef SIGHUP
30296      signal (SIGHUP, cleanup_then_die);
30297      #endif
30298
30299      exitstatus = parent_main ();
30300    }
30301  else
30302    {
30303      /* This is the child process.  */
30304
30305      exitstatus = child_main ();
30306    }
30307  unlink (DATA_FILENAME);
30308  return exitstatus;
30309}
30310
30311_ACEOF
30312if ac_fn_c_try_run "$LINENO"
30313then :
30314
30315else $as_nop
30316  gl_cv_func_posix_spawn_works=no
30317fi
30318rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30319  conftest.$ac_objext conftest.beam conftest.$ac_ext
30320fi
30321
30322       fi
30323     else
30324       case "$host_os" in
30325         aix*) gl_cv_func_posix_spawn_works="guessing no";;
30326         *)    gl_cv_func_posix_spawn_works="guessing yes";;
30327       esac
30328     fi
30329
30330fi
30331{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_works" >&5
30332printf "%s\n" "$gl_cv_func_posix_spawn_works" >&6; }
30333
30334      case "$gl_cv_func_posix_spawn_works" in
30335        *yes) ;;
30336        *) REPLACE_POSIX_SPAWN=1 ;;
30337      esac
30338    fi
30339    if test $REPLACE_POSIX_SPAWN = 0; then
30340
30341
30342         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn rejects scripts without shebang" >&5
30343printf %s "checking whether posix_spawn rejects scripts without shebang... " >&6; }
30344if test ${gl_cv_func_posix_spawn_secure_exec+y}
30345then :
30346  printf %s "(cached) " >&6
30347else $as_nop
30348  echo ':' > conftest.scr
30349     chmod a+x conftest.scr
30350     if test "$cross_compiling" = yes
30351then :
30352  case "$host_os" in
30353          # Guess no on GNU/Hurd.
30354          gnu*)
30355            gl_cv_func_posix_spawn_secure_exec="guessing no" ;;
30356          # Guess yes on all other platforms.
30357          *)
30358            gl_cv_func_posix_spawn_secure_exec="guessing yes" ;;
30359        esac
30360
30361else $as_nop
30362  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30363/* end confdefs.h.  */
30364
30365       #include <errno.h>
30366       #include <spawn.h>
30367       #include <stddef.h>
30368       #include <sys/types.h>
30369       #include <sys/wait.h>
30370       int
30371       main ()
30372       {
30373         const char *prog_path = "./conftest.scr";
30374         const char *prog_argv[2] = { prog_path, NULL };
30375         const char *environment[2] = { "PATH=.", NULL };
30376         pid_t child;
30377         int status;
30378         int err = posix_spawn (&child, prog_path, NULL, NULL,
30379                                (char **) prog_argv, (char **) environment);
30380         if (err == ENOEXEC)
30381           return 0;
30382         if (err != 0)
30383           return 1;
30384         status = 0;
30385         while (waitpid (child, &status, 0) != child)
30386           ;
30387         if (!WIFEXITED (status))
30388           return 2;
30389         if (WEXITSTATUS (status) != 127)
30390           return 3;
30391         return 0;
30392       }
30393
30394_ACEOF
30395if ac_fn_c_try_run "$LINENO"
30396then :
30397  gl_cv_func_posix_spawn_secure_exec=yes
30398else $as_nop
30399  gl_cv_func_posix_spawn_secure_exec=no
30400fi
30401rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30402  conftest.$ac_objext conftest.beam conftest.$ac_ext
30403fi
30404
30405     rm -f conftest.scr
30406
30407fi
30408{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_secure_exec" >&5
30409printf "%s\n" "$gl_cv_func_posix_spawn_secure_exec" >&6; }
30410  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnp rejects scripts without shebang" >&5
30411printf %s "checking whether posix_spawnp rejects scripts without shebang... " >&6; }
30412if test ${gl_cv_func_posix_spawnp_secure_exec+y}
30413then :
30414  printf %s "(cached) " >&6
30415else $as_nop
30416  echo ':' > conftest.scr
30417     chmod a+x conftest.scr
30418     if test "$cross_compiling" = yes
30419then :
30420  case "$host_os" in
30421          # Guess yes on glibc systems (glibc >= 2.15 actually) except GNU/Hurd,
30422          # musl libc, NetBSD.
30423          *-gnu* | *-musl* | netbsd*)
30424            gl_cv_func_posix_spawnp_secure_exec="guessing yes" ;;
30425          # Guess no on GNU/Hurd, macOS, FreeBSD, OpenBSD, AIX, Solaris, Cygwin.
30426          gnu* | darwin* | freebsd* | dragonfly* | midnightbsd* | openbsd* | \
30427          aix* | solaris* | cygwin*)
30428            gl_cv_func_posix_spawnp_secure_exec="guessing no" ;;
30429          # If we don't know, obey --enable-cross-guesses.
30430          *)
30431            gl_cv_func_posix_spawnp_secure_exec="$gl_cross_guess_normal" ;;
30432        esac
30433
30434else $as_nop
30435  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30436/* end confdefs.h.  */
30437
30438       #include <errno.h>
30439       #include <spawn.h>
30440       #include <stddef.h>
30441       #include <sys/types.h>
30442       #include <sys/wait.h>
30443       int
30444       main ()
30445       {
30446         const char *prog_path = "./conftest.scr";
30447         const char *prog_argv[2] = { prog_path, NULL };
30448         const char *environment[2] = { "PATH=.", NULL };
30449         pid_t child;
30450         int status;
30451         int err = posix_spawnp (&child, prog_path, NULL, NULL,
30452                                 (char **) prog_argv, (char **) environment);
30453         if (err == ENOEXEC)
30454           return 0;
30455         if (err != 0)
30456           return 1;
30457         status = 0;
30458         while (waitpid (child, &status, 0) != child)
30459           ;
30460         if (!WIFEXITED (status))
30461           return 2;
30462         if (WEXITSTATUS (status) != 127)
30463           return 3;
30464         return 0;
30465       }
30466
30467_ACEOF
30468if ac_fn_c_try_run "$LINENO"
30469then :
30470  gl_cv_func_posix_spawnp_secure_exec=yes
30471else $as_nop
30472  gl_cv_func_posix_spawnp_secure_exec=no
30473fi
30474rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30475  conftest.$ac_objext conftest.beam conftest.$ac_ext
30476fi
30477
30478     rm -f conftest.scr
30479
30480fi
30481{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawnp_secure_exec" >&5
30482printf "%s\n" "$gl_cv_func_posix_spawnp_secure_exec" >&6; }
30483
30484      case "$gl_cv_func_posix_spawn_secure_exec" in
30485        *yes) ;;
30486        *) REPLACE_POSIX_SPAWN=1 ;;
30487      esac
30488      case "$gl_cv_func_posix_spawnp_secure_exec" in
30489        *yes) ;;
30490        *) REPLACE_POSIX_SPAWN=1 ;;
30491      esac
30492    fi
30493    if test $REPLACE_POSIX_SPAWN = 0; then
30494                              { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnattr_setschedpolicy is supported" >&5
30495printf %s "checking whether posix_spawnattr_setschedpolicy is supported... " >&6; }
30496if test ${gl_cv_func_spawnattr_setschedpolicy+y}
30497then :
30498  printf %s "(cached) " >&6
30499else $as_nop
30500  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30501/* end confdefs.h.  */
30502
30503#include <spawn.h>
30504#if POSIX_SPAWN_SETSCHEDULER
30505 POSIX scheduling supported
30506#endif
30507
30508_ACEOF
30509if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
30510  $EGREP "POSIX scheduling supported" >/dev/null 2>&1
30511then :
30512  gl_cv_func_spawnattr_setschedpolicy=yes
30513else $as_nop
30514  gl_cv_func_spawnattr_setschedpolicy=no
30515fi
30516rm -rf conftest*
30517
30518
30519fi
30520{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_spawnattr_setschedpolicy" >&5
30521printf "%s\n" "$gl_cv_func_spawnattr_setschedpolicy" >&6; }
30522                              { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnattr_setschedparam is supported" >&5
30523printf %s "checking whether posix_spawnattr_setschedparam is supported... " >&6; }
30524if test ${gl_cv_func_spawnattr_setschedparam+y}
30525then :
30526  printf %s "(cached) " >&6
30527else $as_nop
30528  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30529/* end confdefs.h.  */
30530
30531#include <spawn.h>
30532#if POSIX_SPAWN_SETSCHEDPARAM
30533 POSIX scheduling supported
30534#endif
30535
30536_ACEOF
30537if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
30538  $EGREP "POSIX scheduling supported" >/dev/null 2>&1
30539then :
30540  gl_cv_func_spawnattr_setschedparam=yes
30541else $as_nop
30542  gl_cv_func_spawnattr_setschedparam=no
30543fi
30544rm -rf conftest*
30545
30546
30547fi
30548{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_spawnattr_setschedparam" >&5
30549printf "%s\n" "$gl_cv_func_spawnattr_setschedparam" >&6; }
30550    fi
30551  else
30552                if test $ac_cv_have_decl_posix_spawn = yes; then
30553                              REPLACE_POSIX_SPAWN=1
30554    fi
30555  fi
30556  if test $ac_cv_func_posix_spawn != yes || test $REPLACE_POSIX_SPAWN = 1; then
30557
30558printf "%s\n" "#define REPLACE_POSIX_SPAWN 1" >>confdefs.h
30559
30560  fi
30561
30562
30563
30564  GL_GNULIB_POSIX_SPAWN=0
30565
30566
30567
30568  GL_GNULIB_POSIX_SPAWNP=0
30569
30570
30571
30572  GL_GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=0
30573
30574
30575
30576  GL_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR=0
30577
30578
30579
30580  GL_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0
30581
30582
30583
30584  GL_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0
30585
30586
30587
30588  GL_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR=0
30589
30590
30591
30592  GL_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0
30593
30594
30595
30596  GL_GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=0
30597
30598
30599
30600  GL_GNULIB_POSIX_SPAWNATTR_INIT=0
30601
30602
30603
30604  GL_GNULIB_POSIX_SPAWNATTR_GETFLAGS=0
30605
30606
30607
30608  GL_GNULIB_POSIX_SPAWNATTR_SETFLAGS=0
30609
30610
30611
30612  GL_GNULIB_POSIX_SPAWNATTR_GETPGROUP=0
30613
30614
30615
30616  GL_GNULIB_POSIX_SPAWNATTR_SETPGROUP=0
30617
30618
30619
30620  GL_GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM=0
30621
30622
30623
30624  GL_GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM=0
30625
30626
30627
30628  GL_GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY=0
30629
30630
30631
30632  GL_GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY=0
30633
30634
30635
30636  GL_GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT=0
30637
30638
30639
30640  GL_GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT=0
30641
30642
30643
30644  GL_GNULIB_POSIX_SPAWNATTR_GETSIGMASK=0
30645
30646
30647
30648  GL_GNULIB_POSIX_SPAWNATTR_SETSIGMASK=0
30649
30650
30651
30652  GL_GNULIB_POSIX_SPAWNATTR_DESTROY=0
30653
30654
30655
30656
30657
30658    HAVE_POSIX_SIGNALBLOCKING=1;
30659  HAVE_PTHREAD_SIGMASK=1;
30660  HAVE_RAISE=1;
30661  HAVE_SIGSET_T=1;
30662  HAVE_SIGINFO_T=1;
30663  HAVE_SIGACTION=1;
30664  HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
30665
30666  HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
30667
30668  HAVE_SIGHANDLER_T=1;
30669  REPLACE_PTHREAD_SIGMASK=0;
30670  REPLACE_RAISE=0;
30671
30672
30673  ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
30674      #include <signal.h>
30675      /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
30676      #include <sys/types.h>
30677
30678"
30679if test "x$ac_cv_type_sigset_t" = xyes
30680then :
30681
30682printf "%s\n" "#define HAVE_SIGSET_T 1" >>confdefs.h
30683
30684gl_cv_type_sigset_t=yes
30685else $as_nop
30686  gl_cv_type_sigset_t=no
30687fi
30688
30689  if test $gl_cv_type_sigset_t != yes; then
30690    HAVE_SIGSET_T=0
30691  fi
30692
30693
30694
30695  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIGPIPE" >&5
30696printf %s "checking for SIGPIPE... " >&6; }
30697if test ${gl_cv_header_signal_h_SIGPIPE+y}
30698then :
30699  printf %s "(cached) " >&6
30700else $as_nop
30701
30702    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30703/* end confdefs.h.  */
30704
30705#include <signal.h>
30706#if !defined SIGPIPE
30707booboo
30708#endif
30709
30710_ACEOF
30711if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
30712  $EGREP "booboo" >/dev/null 2>&1
30713then :
30714  gl_cv_header_signal_h_SIGPIPE=no
30715else $as_nop
30716  gl_cv_header_signal_h_SIGPIPE=yes
30717fi
30718rm -rf conftest*
30719
30720
30721fi
30722{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_signal_h_SIGPIPE" >&5
30723printf "%s\n" "$gl_cv_header_signal_h_SIGPIPE" >&6; }
30724
30725
30726
30727  GL_GNULIB_PTHREAD_SIGMASK=0
30728
30729
30730
30731  GL_GNULIB_RAISE=0
30732
30733
30734
30735  GL_GNULIB_SIGNAL_H_SIGPIPE=0
30736
30737
30738
30739  GL_GNULIB_SIGPROCMASK=0
30740
30741
30742
30743  GL_GNULIB_SIGACTION=0
30744
30745
30746
30747
30748
30749
30750
30751  if test $REPLACE_MALLOC = 1; then
30752    REPLACE_REALLOC=1
30753  fi
30754
30755
30756
30757
30758    HAVE_SCHED_YIELD=1;
30759  REPLACE_SCHED_YIELD=0;
30760
30761
30762
30763
30764
30765
30766
30767  ac_fn_c_check_header_compile "$LINENO" "sched.h" "ac_cv_header_sched_h" "#if HAVE_SYS_CDEFS_H
30768       #include <sys/cdefs.h>
30769      #endif
30770
30771"
30772if test "x$ac_cv_header_sched_h" = xyes
30773then :
30774  printf "%s\n" "#define HAVE_SCHED_H 1" >>confdefs.h
30775
30776fi
30777
30778
30779
30780
30781
30782
30783
30784
30785
30786     if test $gl_cv_have_include_next = yes; then
30787       gl_cv_next_sched_h='<'sched.h'>'
30788     else
30789       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sched.h>" >&5
30790printf %s "checking absolute name of <sched.h>... " >&6; }
30791if test ${gl_cv_next_sched_h+y}
30792then :
30793  printf %s "(cached) " >&6
30794else $as_nop
30795
30796
30797
30798  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30799/* end confdefs.h.  */
30800#include <sched.h>
30801_ACEOF
30802                case "$host_os" in
30803    aix*) gl_absname_cpp="$ac_cpp -C" ;;
30804    *)    gl_absname_cpp="$ac_cpp" ;;
30805  esac
30806
30807  case "$host_os" in
30808    mingw*)
30809                                          gl_dirsep_regex='[/\\]'
30810      ;;
30811    *)
30812      gl_dirsep_regex='\/'
30813      ;;
30814  esac
30815      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30816  gl_header_literal_regex=`echo 'sched.h' \
30817                           | sed -e "$gl_make_literal_regex_sed"`
30818  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30819      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30820      s|^/[^/]|//&|
30821      p
30822      q
30823    }'
30824
30825        gl_cv_absolute_sched_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30826  sed -n "$gl_absolute_header_sed"`
30827
30828           gl_header=$gl_cv_absolute_sched_h
30829           gl_cv_next_sched_h='"'$gl_header'"'
30830
30831
30832fi
30833{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sched_h" >&5
30834printf "%s\n" "$gl_cv_next_sched_h" >&6; }
30835     fi
30836     NEXT_SCHED_H=$gl_cv_next_sched_h
30837
30838     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30839       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30840       gl_next_as_first_directive='<'sched.h'>'
30841     else
30842       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30843       gl_next_as_first_directive=$gl_cv_next_sched_h
30844     fi
30845     NEXT_AS_FIRST_DIRECTIVE_SCHED_H=$gl_next_as_first_directive
30846
30847
30848
30849
30850
30851  if test "$ac_cv_header_sched_h" = yes; then
30852    HAVE_SCHED_H=1
30853  else
30854    HAVE_SCHED_H=0
30855  fi
30856
30857
30858  if test "$HAVE_SCHED_H" = 1; then
30859    ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#if HAVE_SYS_CDEFS_H
30860         #include <sys/cdefs.h>
30861        #endif
30862        #include <sched.h>
30863
30864"
30865if test "x$ac_cv_type_struct_sched_param" = xyes
30866then :
30867  HAVE_STRUCT_SCHED_PARAM=1
30868else $as_nop
30869  HAVE_STRUCT_SCHED_PARAM=0
30870fi
30871
30872  else
30873    HAVE_STRUCT_SCHED_PARAM=0
30874    case "$host_os" in
30875      os2*)
30876                ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <spawn.h>
30877"
30878if test "x$ac_cv_type_struct_sched_param" = xyes
30879then :
30880  HAVE_STRUCT_SCHED_PARAM=1
30881fi
30882
30883        ;;
30884      vms)
30885                ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <pthread.h>
30886"
30887if test "x$ac_cv_type_struct_sched_param" = xyes
30888then :
30889  HAVE_STRUCT_SCHED_PARAM=1
30890fi
30891
30892        ;;
30893    esac
30894  fi
30895
30896
30897  if test "$ac_cv_header_sys_cdefs_h" = yes; then
30898    HAVE_SYS_CDEFS_H=1
30899  else
30900    HAVE_SYS_CDEFS_H=0
30901  fi
30902
30903
30904
30905
30906
30907
30908
30909
30910
30911
30912  GL_GNULIB_SCHED_YIELD=0
30913
30914
30915
30916
30917
30918
30919
30920
30921
30922
30923  GL_GNULIB_PSELECT=0
30924
30925
30926
30927  GL_GNULIB_SELECT=0
30928
30929
30930
30931
30932
30933
30934
30935
30936
30937
30938
30939
30940
30941
30942
30943
30944
30945     if test $gl_cv_have_include_next = yes; then
30946       gl_cv_next_signal_h='<'signal.h'>'
30947     else
30948       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
30949printf %s "checking absolute name of <signal.h>... " >&6; }
30950if test ${gl_cv_next_signal_h+y}
30951then :
30952  printf %s "(cached) " >&6
30953else $as_nop
30954
30955
30956
30957  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30958/* end confdefs.h.  */
30959#include <signal.h>
30960_ACEOF
30961                case "$host_os" in
30962    aix*) gl_absname_cpp="$ac_cpp -C" ;;
30963    *)    gl_absname_cpp="$ac_cpp" ;;
30964  esac
30965
30966  case "$host_os" in
30967    mingw*)
30968                                          gl_dirsep_regex='[/\\]'
30969      ;;
30970    *)
30971      gl_dirsep_regex='\/'
30972      ;;
30973  esac
30974      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30975  gl_header_literal_regex=`echo 'signal.h' \
30976                           | sed -e "$gl_make_literal_regex_sed"`
30977  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30978      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30979      s|^/[^/]|//&|
30980      p
30981      q
30982    }'
30983
30984        gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30985  sed -n "$gl_absolute_header_sed"`
30986
30987           gl_header=$gl_cv_absolute_signal_h
30988           gl_cv_next_signal_h='"'$gl_header'"'
30989
30990
30991fi
30992{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
30993printf "%s\n" "$gl_cv_next_signal_h" >&6; }
30994     fi
30995     NEXT_SIGNAL_H=$gl_cv_next_signal_h
30996
30997     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30998       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30999       gl_next_as_first_directive='<'signal.h'>'
31000     else
31001       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31002       gl_next_as_first_directive=$gl_cv_next_signal_h
31003     fi
31004     NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
31005
31006
31007
31008
31009
31010# AIX declares sig_atomic_t to already include volatile, and C89 compilers
31011# then choke on 'volatile sig_atomic_t'.  C99 requires that it compile.
31012  ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
31013#include <signal.h>
31014
31015"
31016if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes
31017then :
31018
31019else $as_nop
31020  HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
31021fi
31022
31023
31024
31025
31026
31027
31028
31029  ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
31030#include <signal.h>
31031
31032"
31033if test "x$ac_cv_type_sighandler_t" = xyes
31034then :
31035
31036else $as_nop
31037  HAVE_SIGHANDLER_T=0
31038fi
31039
31040
31041
31042
31043
31044
31045
31046
31047
31048  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31049/* end confdefs.h.  */
31050
31051#ifdef _MSC_VER
31052MicrosoftCompiler
31053#endif
31054
31055_ACEOF
31056if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31057  $EGREP "MicrosoftCompiler" >/dev/null 2>&1
31058then :
31059            rm -f conftest*
31060     echo 'int dummy;' > conftest.c
31061     { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c'
31062  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
31063  (eval $ac_try) 2>&5
31064  ac_status=$?
31065  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31066  test $ac_status = 0; }; } >/dev/null 2>&1
31067     if test -f conftest.o; then
31068       gl_asmext='s'
31069       gl_c_asm_opt='-S'
31070     else
31071       gl_asmext='asm'
31072       gl_c_asm_opt='-c -Fa'
31073     fi
31074     rm -f conftest*
31075
31076else $as_nop
31077  gl_asmext='s'
31078     gl_c_asm_opt='-S'
31079
31080fi
31081rm -rf conftest*
31082
31083
31084
31085
31086
31087  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C symbols are prefixed with underscore at the linker level" >&5
31088printf %s "checking whether C symbols are prefixed with underscore at the linker level... " >&6; }
31089if test ${gl_cv_prog_as_underscore+y}
31090then :
31091  printf %s "(cached) " >&6
31092else $as_nop
31093  cat > conftest.c <<EOF
31094#ifdef __cplusplus
31095extern "C" int foo (void);
31096#endif
31097int foo(void) { return 0; }
31098EOF
31099     # Look for the assembly language name in the .s file.
31100     { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c'
31101  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
31102  (eval $ac_try) 2>&5
31103  ac_status=$?
31104  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31105  test $ac_status = 0; }; } >/dev/null 2>&1
31106     if LC_ALL=C $EGREP '(^|[^a-zA-Z0-9_])_foo([^a-zA-Z0-9_]|$)' conftest.$gl_asmext >/dev/null; then
31107       gl_cv_prog_as_underscore=yes
31108     else
31109       gl_cv_prog_as_underscore=no
31110     fi
31111     rm -f conftest*
31112
31113fi
31114{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_as_underscore" >&5
31115printf "%s\n" "$gl_cv_prog_as_underscore" >&6; }
31116  if test $gl_cv_prog_as_underscore = yes; then
31117    USER_LABEL_PREFIX=_
31118  else
31119    USER_LABEL_PREFIX=
31120  fi
31121
31122printf "%s\n" "#define USER_LABEL_PREFIX $USER_LABEL_PREFIX" >>confdefs.h
31123
31124  ASM_SYMBOL_PREFIX='"'${USER_LABEL_PREFIX}'"'
31125
31126
31127
31128
31129
31130
31131
31132
31133
31134  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
31135printf %s "checking whether snprintf returns a byte count as in C99... " >&6; }
31136if test ${gl_cv_func_snprintf_retval_c99+y}
31137then :
31138  printf %s "(cached) " >&6
31139else $as_nop
31140
31141      if test "$cross_compiling" = yes
31142then :
31143  case "$host_os" in
31144                                 # Guess yes on glibc systems.
31145           *-gnu* | gnu*)        gl_cv_func_snprintf_retval_c99="guessing yes";;
31146                                 # Guess yes on musl systems.
31147           *-musl*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
31148                                 # Guess yes on FreeBSD >= 5.
31149           freebsd[1-4].*)       gl_cv_func_snprintf_retval_c99="guessing no";;
31150           freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
31151           midnightbsd*)         gl_cv_func_snprintf_retval_c99="guessing yes";;
31152                                 # Guess yes on Mac OS X >= 10.3.
31153           darwin[1-6].*)        gl_cv_func_snprintf_retval_c99="guessing no";;
31154           darwin*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
31155                                 # Guess yes on OpenBSD >= 3.9.
31156           openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
31157                                 gl_cv_func_snprintf_retval_c99="guessing no";;
31158           openbsd*)             gl_cv_func_snprintf_retval_c99="guessing yes";;
31159                                 # Guess yes on Solaris >= 2.10.
31160           solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
31161           solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
31162                                 # Guess yes on AIX >= 4.
31163           aix[1-3]*)            gl_cv_func_snprintf_retval_c99="guessing no";;
31164           aix*)                 gl_cv_func_snprintf_retval_c99="guessing yes";;
31165                                 # Guess yes on NetBSD >= 3.
31166           netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
31167                                 gl_cv_func_snprintf_retval_c99="guessing no";;
31168           netbsd*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
31169                                 # Guess yes on BeOS.
31170           beos*)                gl_cv_func_snprintf_retval_c99="guessing yes";;
31171                                 # Guess yes on Android.
31172           linux*-android*)      gl_cv_func_snprintf_retval_c99="guessing yes";;
31173                                 # Guess yes on MSVC, no on mingw.
31174           mingw*)               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31175/* end confdefs.h.  */
31176
31177#ifdef _MSC_VER
31178 Known
31179#endif
31180
31181_ACEOF
31182if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31183  $EGREP "Known" >/dev/null 2>&1
31184then :
31185  gl_cv_func_snprintf_retval_c99="guessing yes"
31186else $as_nop
31187  gl_cv_func_snprintf_retval_c99="guessing no"
31188fi
31189rm -rf conftest*
31190
31191                                 ;;
31192                                 # If we don't know, obey --enable-cross-guesses.
31193           *)                    gl_cv_func_snprintf_retval_c99="$gl_cross_guess_normal";;
31194         esac
31195
31196else $as_nop
31197  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31198/* end confdefs.h.  */
31199
31200#include <stdio.h>
31201#include <string.h>
31202#if HAVE_SNPRINTF
31203# define my_snprintf snprintf
31204#else
31205# include <stdarg.h>
31206static int my_snprintf (char *buf, int size, const char *format, ...)
31207{
31208  va_list args;
31209  int ret;
31210  va_start (args, format);
31211  ret = vsnprintf (buf, size, format, args);
31212  va_end (args);
31213  return ret;
31214}
31215#endif
31216static char buf[100];
31217int main ()
31218{
31219  strcpy (buf, "ABCDEF");
31220  if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
31221    return 1;
31222  if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
31223    return 2;
31224  if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
31225    return 3;
31226  return 0;
31227}
31228_ACEOF
31229if ac_fn_c_try_run "$LINENO"
31230then :
31231  gl_cv_func_snprintf_retval_c99=yes
31232else $as_nop
31233  gl_cv_func_snprintf_retval_c99=no
31234fi
31235rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31236  conftest.$ac_objext conftest.beam conftest.$ac_ext
31237fi
31238
31239
31240fi
31241{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
31242printf "%s\n" "$gl_cv_func_snprintf_retval_c99" >&6; }
31243
31244ac_fn_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
31245if test "x$ac_cv_have_decl_snprintf" = xyes
31246then :
31247  ac_have_decl=1
31248else $as_nop
31249  ac_have_decl=0
31250fi
31251printf "%s\n" "#define HAVE_DECL_SNPRINTF $ac_have_decl" >>confdefs.h
31252
31253
31254
31255
31256
31257
31258
31259
31260
31261
31262
31263
31264
31265
31266     if test $gl_cv_have_include_next = yes; then
31267       gl_cv_next_spawn_h='<'spawn.h'>'
31268     else
31269       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <spawn.h>" >&5
31270printf %s "checking absolute name of <spawn.h>... " >&6; }
31271if test ${gl_cv_next_spawn_h+y}
31272then :
31273  printf %s "(cached) " >&6
31274else $as_nop
31275
31276             if test $ac_cv_header_spawn_h = yes; then
31277
31278
31279
31280
31281  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31282/* end confdefs.h.  */
31283#include <spawn.h>
31284_ACEOF
31285                case "$host_os" in
31286    aix*) gl_absname_cpp="$ac_cpp -C" ;;
31287    *)    gl_absname_cpp="$ac_cpp" ;;
31288  esac
31289
31290  case "$host_os" in
31291    mingw*)
31292                                          gl_dirsep_regex='[/\\]'
31293      ;;
31294    *)
31295      gl_dirsep_regex='\/'
31296      ;;
31297  esac
31298      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31299  gl_header_literal_regex=`echo 'spawn.h' \
31300                           | sed -e "$gl_make_literal_regex_sed"`
31301  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31302      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31303      s|^/[^/]|//&|
31304      p
31305      q
31306    }'
31307
31308        gl_cv_absolute_spawn_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31309  sed -n "$gl_absolute_header_sed"`
31310
31311           gl_header=$gl_cv_absolute_spawn_h
31312           gl_cv_next_spawn_h='"'$gl_header'"'
31313          else
31314               gl_cv_next_spawn_h='<'spawn.h'>'
31315             fi
31316
31317
31318fi
31319{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_spawn_h" >&5
31320printf "%s\n" "$gl_cv_next_spawn_h" >&6; }
31321     fi
31322     NEXT_SPAWN_H=$gl_cv_next_spawn_h
31323
31324     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31325       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31326       gl_next_as_first_directive='<'spawn.h'>'
31327     else
31328       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31329       gl_next_as_first_directive=$gl_cv_next_spawn_h
31330     fi
31331     NEXT_AS_FIRST_DIRECTIVE_SPAWN_H=$gl_next_as_first_directive
31332
31333
31334
31335
31336
31337  if test $ac_cv_header_spawn_h = yes; then
31338    HAVE_SPAWN_H=1
31339    ac_fn_c_check_type "$LINENO" "posix_spawnattr_t" "ac_cv_type_posix_spawnattr_t" "
31340#include <spawn.h>
31341
31342"
31343if test "x$ac_cv_type_posix_spawnattr_t" = xyes
31344then :
31345
31346printf "%s\n" "#define HAVE_POSIX_SPAWNATTR_T 1" >>confdefs.h
31347
31348
31349else $as_nop
31350  HAVE_POSIX_SPAWNATTR_T=0
31351fi
31352
31353    ac_fn_c_check_type "$LINENO" "posix_spawn_file_actions_t" "ac_cv_type_posix_spawn_file_actions_t" "
31354#include <spawn.h>
31355
31356"
31357if test "x$ac_cv_type_posix_spawn_file_actions_t" = xyes
31358then :
31359
31360printf "%s\n" "#define HAVE_POSIX_SPAWN_FILE_ACTIONS_T 1" >>confdefs.h
31361
31362
31363else $as_nop
31364  HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
31365fi
31366
31367  else
31368    HAVE_SPAWN_H=0
31369    HAVE_POSIX_SPAWNATTR_T=0
31370    HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
31371  fi
31372
31373
31374
31375
31376
31377
31378
31379
31380
31381
31382
31383
31384
31385
31386
31387
31388ac_fn_check_decl "$LINENO" "fcloseall" "ac_cv_have_decl_fcloseall" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
31389if test "x$ac_cv_have_decl_fcloseall" = xyes
31390then :
31391  ac_have_decl=1
31392else $as_nop
31393  ac_have_decl=0
31394fi
31395printf "%s\n" "#define HAVE_DECL_FCLOSEALL $ac_have_decl" >>confdefs.h
31396
31397
31398
31399
31400  printf "%s\n" "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
31401
31402
31403
31404
31405
31406
31407
31408
31409
31410     if test $gl_cv_have_include_next = yes; then
31411       gl_cv_next_stdio_h='<'stdio.h'>'
31412     else
31413       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
31414printf %s "checking absolute name of <stdio.h>... " >&6; }
31415if test ${gl_cv_next_stdio_h+y}
31416then :
31417  printf %s "(cached) " >&6
31418else $as_nop
31419
31420
31421
31422  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31423/* end confdefs.h.  */
31424#include <stdio.h>
31425_ACEOF
31426                case "$host_os" in
31427    aix*) gl_absname_cpp="$ac_cpp -C" ;;
31428    *)    gl_absname_cpp="$ac_cpp" ;;
31429  esac
31430
31431  case "$host_os" in
31432    mingw*)
31433                                          gl_dirsep_regex='[/\\]'
31434      ;;
31435    *)
31436      gl_dirsep_regex='\/'
31437      ;;
31438  esac
31439      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31440  gl_header_literal_regex=`echo 'stdio.h' \
31441                           | sed -e "$gl_make_literal_regex_sed"`
31442  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31443      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31444      s|^/[^/]|//&|
31445      p
31446      q
31447    }'
31448
31449        gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31450  sed -n "$gl_absolute_header_sed"`
31451
31452           gl_header=$gl_cv_absolute_stdio_h
31453           gl_cv_next_stdio_h='"'$gl_header'"'
31454
31455
31456fi
31457{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
31458printf "%s\n" "$gl_cv_next_stdio_h" >&6; }
31459     fi
31460     NEXT_STDIO_H=$gl_cv_next_stdio_h
31461
31462     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31463       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31464       gl_next_as_first_directive='<'stdio.h'>'
31465     else
31466       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31467       gl_next_as_first_directive=$gl_cv_next_stdio_h
31468     fi
31469     NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
31470
31471
31472
31473
31474
31475        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
31476printf %s "checking which flavor of printf attribute matches inttypes macros... " >&6; }
31477if test ${gl_cv_func_printf_attribute_flavor+y}
31478then :
31479  printf %s "(cached) " >&6
31480else $as_nop
31481  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31482/* end confdefs.h.  */
31483
31484       #define __STDC_FORMAT_MACROS 1
31485       #include <stdio.h>
31486       #include <inttypes.h>
31487       /* For non-mingw systems, compilation will trivially succeed.
31488          For mingw, compilation will succeed for older mingw (system
31489          printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
31490       #if (defined _WIN32 && ! defined __CYGWIN__) && \
31491         (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
31492       extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
31493       #endif
31494
31495int
31496main (void)
31497{
31498
31499  ;
31500  return 0;
31501}
31502_ACEOF
31503if ac_fn_c_try_compile "$LINENO"
31504then :
31505  gl_cv_func_printf_attribute_flavor=system
31506else $as_nop
31507  gl_cv_func_printf_attribute_flavor=gnu
31508fi
31509rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
31510fi
31511{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
31512printf "%s\n" "$gl_cv_func_printf_attribute_flavor" >&6; }
31513  if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
31514
31515printf "%s\n" "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
31516
31517  fi
31518
31519
31520
31521
31522
31523
31524
31525    if test $gl_cv_header_signal_h_SIGPIPE != yes; then
31526      REPLACE_STDIO_WRITE_FUNCS=1
31527
31528
31529
31530
31531
31532
31533
31534
31535  gl_LIBOBJS="$gl_LIBOBJS stdio-write.$ac_objext"
31536
31537    fi
31538
31539
31540
31541
31542
31543
31544
31545
31546
31547
31548  if test $ac_cv_have_decl_fcloseall = no; then
31549    HAVE_DECL_FCLOSEALL=0
31550  fi
31551
31552ac_fn_check_decl "$LINENO" "ecvt" "ac_cv_have_decl_ecvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
31553if test "x$ac_cv_have_decl_ecvt" = xyes
31554then :
31555  ac_have_decl=1
31556else $as_nop
31557  ac_have_decl=0
31558fi
31559printf "%s\n" "#define HAVE_DECL_ECVT $ac_have_decl" >>confdefs.h
31560
31561ac_fn_check_decl "$LINENO" "fcvt" "ac_cv_have_decl_fcvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
31562if test "x$ac_cv_have_decl_fcvt" = xyes
31563then :
31564  ac_have_decl=1
31565else $as_nop
31566  ac_have_decl=0
31567fi
31568printf "%s\n" "#define HAVE_DECL_FCVT $ac_have_decl" >>confdefs.h
31569
31570ac_fn_check_decl "$LINENO" "gcvt" "ac_cv_have_decl_gcvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
31571if test "x$ac_cv_have_decl_gcvt" = xyes
31572then :
31573  ac_have_decl=1
31574else $as_nop
31575  ac_have_decl=0
31576fi
31577printf "%s\n" "#define HAVE_DECL_GCVT $ac_have_decl" >>confdefs.h
31578
31579
31580
31581
31582
31583
31584
31585
31586
31587
31588
31589     if test $gl_cv_have_include_next = yes; then
31590       gl_cv_next_stdlib_h='<'stdlib.h'>'
31591     else
31592       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
31593printf %s "checking absolute name of <stdlib.h>... " >&6; }
31594if test ${gl_cv_next_stdlib_h+y}
31595then :
31596  printf %s "(cached) " >&6
31597else $as_nop
31598
31599
31600
31601  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31602/* end confdefs.h.  */
31603#include <stdlib.h>
31604_ACEOF
31605                case "$host_os" in
31606    aix*) gl_absname_cpp="$ac_cpp -C" ;;
31607    *)    gl_absname_cpp="$ac_cpp" ;;
31608  esac
31609
31610  case "$host_os" in
31611    mingw*)
31612                                          gl_dirsep_regex='[/\\]'
31613      ;;
31614    *)
31615      gl_dirsep_regex='\/'
31616      ;;
31617  esac
31618      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31619  gl_header_literal_regex=`echo 'stdlib.h' \
31620                           | sed -e "$gl_make_literal_regex_sed"`
31621  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31622      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31623      s|^/[^/]|//&|
31624      p
31625      q
31626    }'
31627
31628        gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31629  sed -n "$gl_absolute_header_sed"`
31630
31631           gl_header=$gl_cv_absolute_stdlib_h
31632           gl_cv_next_stdlib_h='"'$gl_header'"'
31633
31634
31635fi
31636{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
31637printf "%s\n" "$gl_cv_next_stdlib_h" >&6; }
31638     fi
31639     NEXT_STDLIB_H=$gl_cv_next_stdlib_h
31640
31641     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31642       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31643       gl_next_as_first_directive='<'stdlib.h'>'
31644     else
31645       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31646       gl_next_as_first_directive=$gl_cv_next_stdlib_h
31647     fi
31648     NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
31649
31650
31651
31652
31653
31654
31655
31656
31657
31658
31659
31660
31661  if test $ac_cv_have_decl_ecvt = no; then
31662    HAVE_DECL_ECVT=0
31663  fi
31664
31665  if test $ac_cv_have_decl_fcvt = no; then
31666    HAVE_DECL_FCVT=0
31667  fi
31668
31669  if test $ac_cv_have_decl_gcvt = no; then
31670    HAVE_DECL_GCVT=0
31671  fi
31672
31673
31674    HAVE_FFS=1;
31675  HAVE_STRCASECMP=1;
31676  HAVE_DECL_STRNCASECMP=1;
31677
31678ac_fn_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
31679if test "x$ac_cv_have_decl_strdup" = xyes
31680then :
31681  ac_have_decl=1
31682else $as_nop
31683  ac_have_decl=0
31684fi
31685printf "%s\n" "#define HAVE_DECL_STRDUP $ac_have_decl" >>confdefs.h
31686
31687
31688     REPLACE_STRERROR_0=0
31689  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
31690printf %s "checking whether strerror(0) succeeds... " >&6; }
31691if test ${gl_cv_func_strerror_0_works+y}
31692then :
31693  printf %s "(cached) " >&6
31694else $as_nop
31695  if test "$cross_compiling" = yes
31696then :
31697  case "$host_os" in
31698                        # Guess yes on glibc systems.
31699         *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
31700                        # Guess yes on musl systems.
31701         *-musl*)       gl_cv_func_strerror_0_works="guessing yes" ;;
31702                        # Guess yes on native Windows.
31703         mingw*)        gl_cv_func_strerror_0_works="guessing yes" ;;
31704                        # If we don't know, obey --enable-cross-guesses.
31705         *)             gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;;
31706       esac
31707
31708else $as_nop
31709  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31710/* end confdefs.h.  */
31711#include <string.h>
31712           #include <errno.h>
31713
31714int
31715main (void)
31716{
31717int result = 0;
31718           char *str;
31719           errno = 0;
31720           str = strerror (0);
31721           if (!*str) result |= 1;
31722           if (errno) result |= 2;
31723           if (strstr (str, "nknown") || strstr (str, "ndefined"))
31724             result |= 4;
31725           return result;
31726  ;
31727  return 0;
31728}
31729_ACEOF
31730if ac_fn_c_try_run "$LINENO"
31731then :
31732  gl_cv_func_strerror_0_works=yes
31733else $as_nop
31734  gl_cv_func_strerror_0_works=no
31735fi
31736rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31737  conftest.$ac_objext conftest.beam conftest.$ac_ext
31738fi
31739
31740
31741fi
31742{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
31743printf "%s\n" "$gl_cv_func_strerror_0_works" >&6; }
31744  case "$gl_cv_func_strerror_0_works" in
31745    *yes) ;;
31746    *)
31747      REPLACE_STRERROR_0=1
31748
31749printf "%s\n" "#define REPLACE_STRERROR_0 1" >>confdefs.h
31750
31751      ;;
31752  esac
31753
31754
31755
31756
31757
31758
31759
31760
31761  if test $ac_cv_func_strerror_r = yes; then
31762    if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
31763                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
31764printf %s "checking for strerror_r with POSIX signature... " >&6; }
31765if test ${gl_cv_func_strerror_r_posix_signature+y}
31766then :
31767  printf %s "(cached) " >&6
31768else $as_nop
31769  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31770/* end confdefs.h.  */
31771#include <string.h>
31772                int strerror_r (int, char *, size_t);
31773
31774int
31775main (void)
31776{
31777
31778  ;
31779  return 0;
31780}
31781_ACEOF
31782if ac_fn_c_try_compile "$LINENO"
31783then :
31784  gl_cv_func_strerror_r_posix_signature=yes
31785else $as_nop
31786  gl_cv_func_strerror_r_posix_signature=no
31787fi
31788rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
31789
31790fi
31791{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
31792printf "%s\n" "$gl_cv_func_strerror_r_posix_signature" >&6; }
31793      if test $gl_cv_func_strerror_r_posix_signature = yes; then
31794                                                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
31795printf %s "checking whether strerror_r works... " >&6; }
31796if test ${gl_cv_func_strerror_r_works+y}
31797then :
31798  printf %s "(cached) " >&6
31799else $as_nop
31800  if test "$cross_compiling" = yes
31801then :
31802
31803              case "$host_os" in
31804                       # Guess no on AIX.
31805                aix*)  gl_cv_func_strerror_r_works="guessing no";;
31806                       # Guess no on HP-UX.
31807                hpux*) gl_cv_func_strerror_r_works="guessing no";;
31808                       # Guess no on BSD variants.
31809                *bsd*)  gl_cv_func_strerror_r_works="guessing no";;
31810                       # Guess yes otherwise.
31811                *)     gl_cv_func_strerror_r_works="guessing yes";;
31812              esac
31813
31814else $as_nop
31815  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31816/* end confdefs.h.  */
31817#include <errno.h>
31818                  #include <string.h>
31819
31820int
31821main (void)
31822{
31823int result = 0;
31824                  char buf[79];
31825                  if (strerror_r (EACCES, buf, 0) < 0)
31826                    result |= 1;
31827                  errno = 0;
31828                  if (strerror_r (EACCES, buf, sizeof buf) != 0)
31829                    result |= 2;
31830                  strcpy (buf, "Unknown");
31831                  if (strerror_r (0, buf, sizeof buf) != 0)
31832                    result |= 4;
31833                  if (errno)
31834                    result |= 8;
31835                  if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
31836                    result |= 0x10;
31837                  errno = 0;
31838                  *buf = 0;
31839                  if (strerror_r (-3, buf, sizeof buf) < 0)
31840                    result |= 0x20;
31841                  if (errno)
31842                    result |= 0x40;
31843                  if (!*buf)
31844                    result |= 0x80;
31845                  return result;
31846
31847  ;
31848  return 0;
31849}
31850_ACEOF
31851if ac_fn_c_try_run "$LINENO"
31852then :
31853  gl_cv_func_strerror_r_works=yes
31854else $as_nop
31855  gl_cv_func_strerror_r_works=no
31856fi
31857rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31858  conftest.$ac_objext conftest.beam conftest.$ac_ext
31859fi
31860
31861
31862fi
31863{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
31864printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
31865      else
31866
31867                        if test $ac_cv_func___xpg_strerror_r = yes; then
31868          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
31869printf %s "checking whether __xpg_strerror_r works... " >&6; }
31870if test ${gl_cv_func_strerror_r_works+y}
31871then :
31872  printf %s "(cached) " >&6
31873else $as_nop
31874  if test "$cross_compiling" = yes
31875then :
31876                                  gl_cv_func_strerror_r_works="$gl_cross_guess_normal"
31877
31878else $as_nop
31879  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31880/* end confdefs.h.  */
31881#include <errno.h>
31882                    #include <string.h>
31883                    extern
31884                    #ifdef __cplusplus
31885                    "C"
31886                    #endif
31887                    int __xpg_strerror_r(int, char *, size_t);
31888
31889int
31890main (void)
31891{
31892int result = 0;
31893                    char buf[256] = "^";
31894                    char copy[256];
31895                    char *str = strerror (-1);
31896                    strcpy (copy, str);
31897                    if (__xpg_strerror_r (-2, buf, 1) == 0)
31898                      result |= 1;
31899                    if (*buf)
31900                      result |= 2;
31901                    __xpg_strerror_r (-2, buf, 256);
31902                    if (strcmp (str, copy))
31903                      result |= 4;
31904                    return result;
31905
31906  ;
31907  return 0;
31908}
31909_ACEOF
31910if ac_fn_c_try_run "$LINENO"
31911then :
31912  gl_cv_func_strerror_r_works=yes
31913else $as_nop
31914  gl_cv_func_strerror_r_works=no
31915fi
31916rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31917  conftest.$ac_objext conftest.beam conftest.$ac_ext
31918fi
31919
31920
31921fi
31922{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
31923printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
31924        fi
31925      fi
31926    fi
31927  fi
31928
31929
31930
31931
31932
31933
31934
31935
31936
31937
31938
31939
31940     if test $gl_cv_have_include_next = yes; then
31941       gl_cv_next_string_h='<'string.h'>'
31942     else
31943       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
31944printf %s "checking absolute name of <string.h>... " >&6; }
31945if test ${gl_cv_next_string_h+y}
31946then :
31947  printf %s "(cached) " >&6
31948else $as_nop
31949
31950
31951
31952  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31953/* end confdefs.h.  */
31954#include <string.h>
31955_ACEOF
31956                case "$host_os" in
31957    aix*) gl_absname_cpp="$ac_cpp -C" ;;
31958    *)    gl_absname_cpp="$ac_cpp" ;;
31959  esac
31960
31961  case "$host_os" in
31962    mingw*)
31963                                          gl_dirsep_regex='[/\\]'
31964      ;;
31965    *)
31966      gl_dirsep_regex='\/'
31967      ;;
31968  esac
31969      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31970  gl_header_literal_regex=`echo 'string.h' \
31971                           | sed -e "$gl_make_literal_regex_sed"`
31972  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31973      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31974      s|^/[^/]|//&|
31975      p
31976      q
31977    }'
31978
31979        gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31980  sed -n "$gl_absolute_header_sed"`
31981
31982           gl_header=$gl_cv_absolute_string_h
31983           gl_cv_next_string_h='"'$gl_header'"'
31984
31985
31986fi
31987{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
31988printf "%s\n" "$gl_cv_next_string_h" >&6; }
31989     fi
31990     NEXT_STRING_H=$gl_cv_next_string_h
31991
31992     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31993       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31994       gl_next_as_first_directive='<'string.h'>'
31995     else
31996       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31997       gl_next_as_first_directive=$gl_cv_next_string_h
31998     fi
31999     NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
32000
32001
32002
32003
32004
32005
32006
32007
32008
32009
32010
32011
32012
32013
32014
32015
32016
32017
32018
32019
32020
32021
32022
32023     if test $gl_cv_have_include_next = yes; then
32024       gl_cv_next_strings_h='<'strings.h'>'
32025     else
32026       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
32027printf %s "checking absolute name of <strings.h>... " >&6; }
32028if test ${gl_cv_next_strings_h+y}
32029then :
32030  printf %s "(cached) " >&6
32031else $as_nop
32032
32033             if test $ac_cv_header_strings_h = yes; then
32034
32035
32036
32037
32038  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32039/* end confdefs.h.  */
32040#include <strings.h>
32041_ACEOF
32042                case "$host_os" in
32043    aix*) gl_absname_cpp="$ac_cpp -C" ;;
32044    *)    gl_absname_cpp="$ac_cpp" ;;
32045  esac
32046
32047  case "$host_os" in
32048    mingw*)
32049                                          gl_dirsep_regex='[/\\]'
32050      ;;
32051    *)
32052      gl_dirsep_regex='\/'
32053      ;;
32054  esac
32055      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
32056  gl_header_literal_regex=`echo 'strings.h' \
32057                           | sed -e "$gl_make_literal_regex_sed"`
32058  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
32059      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
32060      s|^/[^/]|//&|
32061      p
32062      q
32063    }'
32064
32065        gl_cv_absolute_strings_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
32066  sed -n "$gl_absolute_header_sed"`
32067
32068           gl_header=$gl_cv_absolute_strings_h
32069           gl_cv_next_strings_h='"'$gl_header'"'
32070          else
32071               gl_cv_next_strings_h='<'strings.h'>'
32072             fi
32073
32074
32075fi
32076{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
32077printf "%s\n" "$gl_cv_next_strings_h" >&6; }
32078     fi
32079     NEXT_STRINGS_H=$gl_cv_next_strings_h
32080
32081     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
32082       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
32083       gl_next_as_first_directive='<'strings.h'>'
32084     else
32085       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
32086       gl_next_as_first_directive=$gl_cv_next_strings_h
32087     fi
32088     NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
32089
32090
32091
32092
32093  if test $ac_cv_header_strings_h = yes; then
32094    HAVE_STRINGS_H=1
32095  else
32096    HAVE_STRINGS_H=0
32097  fi
32098
32099
32100
32101
32102
32103
32104
32105
32106  GL_GNULIB_FFS=0
32107
32108
32109
32110ac_fn_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
32111if test "x$ac_cv_have_decl_strndup" = xyes
32112then :
32113  ac_have_decl=1
32114else $as_nop
32115  ac_have_decl=0
32116fi
32117printf "%s\n" "#define HAVE_DECL_STRNDUP $ac_have_decl" >>confdefs.h
32118
32119
32120ac_fn_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
32121if test "x$ac_cv_have_decl_strnlen" = xyes
32122then :
32123  ac_have_decl=1
32124else $as_nop
32125  ac_have_decl=0
32126fi
32127printf "%s\n" "#define HAVE_DECL_STRNLEN $ac_have_decl" >>confdefs.h
32128
32129
32130
32131 ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
32132"
32133if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes
32134then :
32135
32136printf "%s\n" "#define HAVE_TM_GMTOFF 1" >>confdefs.h
32137
32138fi
32139
32140
32141ac_fn_check_decl "$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
32142if test "x$ac_cv_have_decl_strtok_r" = xyes
32143then :
32144  ac_have_decl=1
32145else $as_nop
32146  ac_have_decl=0
32147fi
32148printf "%s\n" "#define HAVE_DECL_STRTOK_R $ac_have_decl" >>confdefs.h
32149
32150
32151
32152
32153
32154
32155
32156
32157
32158
32159
32160
32161
32162
32163     if test $gl_cv_have_include_next = yes; then
32164       gl_cv_next_sys_file_h='<'sys/file.h'>'
32165     else
32166       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/file.h>" >&5
32167printf %s "checking absolute name of <sys/file.h>... " >&6; }
32168if test ${gl_cv_next_sys_file_h+y}
32169then :
32170  printf %s "(cached) " >&6
32171else $as_nop
32172
32173             if test $ac_cv_header_sys_file_h = yes; then
32174
32175
32176
32177
32178  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32179/* end confdefs.h.  */
32180#include <sys/file.h>
32181_ACEOF
32182                case "$host_os" in
32183    aix*) gl_absname_cpp="$ac_cpp -C" ;;
32184    *)    gl_absname_cpp="$ac_cpp" ;;
32185  esac
32186
32187  case "$host_os" in
32188    mingw*)
32189                                          gl_dirsep_regex='[/\\]'
32190      ;;
32191    *)
32192      gl_dirsep_regex='\/'
32193      ;;
32194  esac
32195      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
32196  gl_header_literal_regex=`echo 'sys/file.h' \
32197                           | sed -e "$gl_make_literal_regex_sed"`
32198  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
32199      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
32200      s|^/[^/]|//&|
32201      p
32202      q
32203    }'
32204
32205        gl_cv_absolute_sys_file_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
32206  sed -n "$gl_absolute_header_sed"`
32207
32208           gl_header=$gl_cv_absolute_sys_file_h
32209           gl_cv_next_sys_file_h='"'$gl_header'"'
32210          else
32211               gl_cv_next_sys_file_h='<'sys/file.h'>'
32212             fi
32213
32214
32215fi
32216{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_file_h" >&5
32217printf "%s\n" "$gl_cv_next_sys_file_h" >&6; }
32218     fi
32219     NEXT_SYS_FILE_H=$gl_cv_next_sys_file_h
32220
32221     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
32222       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
32223       gl_next_as_first_directive='<'sys/file.h'>'
32224     else
32225       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
32226       gl_next_as_first_directive=$gl_cv_next_sys_file_h
32227     fi
32228     NEXT_AS_FIRST_DIRECTIVE_SYS_FILE_H=$gl_next_as_first_directive
32229
32230
32231
32232
32233
32234  if test $ac_cv_header_sys_file_h = yes; then
32235    HAVE_SYS_FILE_H=1
32236  else
32237    HAVE_SYS_FILE_H=0
32238  fi
32239
32240
32241
32242
32243
32244
32245
32246
32247
32248
32249
32250  if test $ac_cv_header_sys_ioctl_h = yes; then
32251    HAVE_SYS_IOCTL_H=1
32252            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/ioctl.h> declares ioctl" >&5
32253printf %s "checking whether <sys/ioctl.h> declares ioctl... " >&6; }
32254if test ${gl_cv_decl_ioctl_in_sys_ioctl_h+y}
32255then :
32256  printf %s "(cached) " >&6
32257else $as_nop
32258         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32259/* end confdefs.h.  */
32260#include <sys/ioctl.h>
32261int
32262main (void)
32263{
32264(void) ioctl;
32265  ;
32266  return 0;
32267}
32268_ACEOF
32269if ac_fn_c_try_compile "$LINENO"
32270then :
32271  gl_cv_decl_ioctl_in_sys_ioctl_h=yes
32272else $as_nop
32273  gl_cv_decl_ioctl_in_sys_ioctl_h=no
32274fi
32275rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
32276
32277fi
32278{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_ioctl_in_sys_ioctl_h" >&5
32279printf "%s\n" "$gl_cv_decl_ioctl_in_sys_ioctl_h" >&6; }
32280  else
32281    HAVE_SYS_IOCTL_H=0
32282  fi
32283
32284
32285
32286
32287
32288
32289
32290
32291
32292
32293     if test $gl_cv_have_include_next = yes; then
32294       gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
32295     else
32296       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/ioctl.h>" >&5
32297printf %s "checking absolute name of <sys/ioctl.h>... " >&6; }
32298if test ${gl_cv_next_sys_ioctl_h+y}
32299then :
32300  printf %s "(cached) " >&6
32301else $as_nop
32302
32303             if test $ac_cv_header_sys_ioctl_h = yes; then
32304
32305
32306
32307
32308  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32309/* end confdefs.h.  */
32310#include <sys/ioctl.h>
32311_ACEOF
32312                case "$host_os" in
32313    aix*) gl_absname_cpp="$ac_cpp -C" ;;
32314    *)    gl_absname_cpp="$ac_cpp" ;;
32315  esac
32316
32317  case "$host_os" in
32318    mingw*)
32319                                          gl_dirsep_regex='[/\\]'
32320      ;;
32321    *)
32322      gl_dirsep_regex='\/'
32323      ;;
32324  esac
32325      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
32326  gl_header_literal_regex=`echo 'sys/ioctl.h' \
32327                           | sed -e "$gl_make_literal_regex_sed"`
32328  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
32329      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
32330      s|^/[^/]|//&|
32331      p
32332      q
32333    }'
32334
32335        gl_cv_absolute_sys_ioctl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
32336  sed -n "$gl_absolute_header_sed"`
32337
32338           gl_header=$gl_cv_absolute_sys_ioctl_h
32339           gl_cv_next_sys_ioctl_h='"'$gl_header'"'
32340          else
32341               gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
32342             fi
32343
32344
32345fi
32346{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_ioctl_h" >&5
32347printf "%s\n" "$gl_cv_next_sys_ioctl_h" >&6; }
32348     fi
32349     NEXT_SYS_IOCTL_H=$gl_cv_next_sys_ioctl_h
32350
32351     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
32352       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
32353       gl_next_as_first_directive='<'sys/ioctl.h'>'
32354     else
32355       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
32356       gl_next_as_first_directive=$gl_cv_next_sys_ioctl_h
32357     fi
32358     NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H=$gl_next_as_first_directive
32359
32360
32361
32362
32363
32364
32365
32366
32367
32368
32369
32370
32371
32372
32373
32374
32375
32376
32377
32378
32379
32380     if test $gl_cv_have_include_next = yes; then
32381       gl_cv_next_sys_random_h='<'sys/random.h'>'
32382     else
32383       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/random.h>" >&5
32384printf %s "checking absolute name of <sys/random.h>... " >&6; }
32385if test ${gl_cv_next_sys_random_h+y}
32386then :
32387  printf %s "(cached) " >&6
32388else $as_nop
32389
32390             if test $ac_cv_header_sys_random_h = yes; then
32391
32392
32393
32394
32395  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32396/* end confdefs.h.  */
32397#include <sys/random.h>
32398_ACEOF
32399                case "$host_os" in
32400    aix*) gl_absname_cpp="$ac_cpp -C" ;;
32401    *)    gl_absname_cpp="$ac_cpp" ;;
32402  esac
32403
32404  case "$host_os" in
32405    mingw*)
32406                                          gl_dirsep_regex='[/\\]'
32407      ;;
32408    *)
32409      gl_dirsep_regex='\/'
32410      ;;
32411  esac
32412      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
32413  gl_header_literal_regex=`echo 'sys/random.h' \
32414                           | sed -e "$gl_make_literal_regex_sed"`
32415  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
32416      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
32417      s|^/[^/]|//&|
32418      p
32419      q
32420    }'
32421
32422        gl_cv_absolute_sys_random_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
32423  sed -n "$gl_absolute_header_sed"`
32424
32425           gl_header=$gl_cv_absolute_sys_random_h
32426           gl_cv_next_sys_random_h='"'$gl_header'"'
32427          else
32428               gl_cv_next_sys_random_h='<'sys/random.h'>'
32429             fi
32430
32431
32432fi
32433{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_random_h" >&5
32434printf "%s\n" "$gl_cv_next_sys_random_h" >&6; }
32435     fi
32436     NEXT_SYS_RANDOM_H=$gl_cv_next_sys_random_h
32437
32438     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
32439       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
32440       gl_next_as_first_directive='<'sys/random.h'>'
32441     else
32442       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
32443       gl_next_as_first_directive=$gl_cv_next_sys_random_h
32444     fi
32445     NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H=$gl_next_as_first_directive
32446
32447
32448
32449
32450  if test $ac_cv_header_sys_random_h = yes; then
32451    HAVE_SYS_RANDOM_H=1
32452  else
32453    HAVE_SYS_RANDOM_H=0
32454  fi
32455
32456
32457
32458  if test $ac_cv_header_sys_random_h = yes; then
32459    UNISTD_H_HAVE_SYS_RANDOM_H=1
32460  fi
32461
32462
32463
32464
32465
32466
32467
32468
32469
32470
32471
32472
32473
32474
32475
32476
32477
32478
32479
32480
32481
32482     if test $gl_cv_have_include_next = yes; then
32483       gl_cv_next_sys_uio_h='<'sys/uio.h'>'
32484     else
32485       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
32486printf %s "checking absolute name of <sys/uio.h>... " >&6; }
32487if test ${gl_cv_next_sys_uio_h+y}
32488then :
32489  printf %s "(cached) " >&6
32490else $as_nop
32491
32492             if test $ac_cv_header_sys_uio_h = yes; then
32493
32494
32495
32496
32497  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32498/* end confdefs.h.  */
32499#include <sys/uio.h>
32500_ACEOF
32501                case "$host_os" in
32502    aix*) gl_absname_cpp="$ac_cpp -C" ;;
32503    *)    gl_absname_cpp="$ac_cpp" ;;
32504  esac
32505
32506  case "$host_os" in
32507    mingw*)
32508                                          gl_dirsep_regex='[/\\]'
32509      ;;
32510    *)
32511      gl_dirsep_regex='\/'
32512      ;;
32513  esac
32514      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
32515  gl_header_literal_regex=`echo 'sys/uio.h' \
32516                           | sed -e "$gl_make_literal_regex_sed"`
32517  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
32518      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
32519      s|^/[^/]|//&|
32520      p
32521      q
32522    }'
32523
32524        gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
32525  sed -n "$gl_absolute_header_sed"`
32526
32527           gl_header=$gl_cv_absolute_sys_uio_h
32528           gl_cv_next_sys_uio_h='"'$gl_header'"'
32529          else
32530               gl_cv_next_sys_uio_h='<'sys/uio.h'>'
32531             fi
32532
32533
32534fi
32535{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
32536printf "%s\n" "$gl_cv_next_sys_uio_h" >&6; }
32537     fi
32538     NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
32539
32540     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
32541       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
32542       gl_next_as_first_directive='<'sys/uio.h'>'
32543     else
32544       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
32545       gl_next_as_first_directive=$gl_cv_next_sys_uio_h
32546     fi
32547     NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
32548
32549
32550
32551
32552  if test $ac_cv_header_sys_uio_h = yes; then
32553    HAVE_SYS_UIO_H=1
32554  else
32555    HAVE_SYS_UIO_H=0
32556  fi
32557
32558
32559
32560
32561
32562
32563
32564
32565
32566
32567
32568
32569
32570
32571
32572
32573
32574
32575
32576     if test $gl_cv_have_include_next = yes; then
32577       gl_cv_next_sys_wait_h='<'sys/wait.h'>'
32578     else
32579       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/wait.h>" >&5
32580printf %s "checking absolute name of <sys/wait.h>... " >&6; }
32581if test ${gl_cv_next_sys_wait_h+y}
32582then :
32583  printf %s "(cached) " >&6
32584else $as_nop
32585
32586             if test $ac_cv_header_sys_wait_h = yes; then
32587
32588
32589
32590
32591  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32592/* end confdefs.h.  */
32593#include <sys/wait.h>
32594_ACEOF
32595                case "$host_os" in
32596    aix*) gl_absname_cpp="$ac_cpp -C" ;;
32597    *)    gl_absname_cpp="$ac_cpp" ;;
32598  esac
32599
32600  case "$host_os" in
32601    mingw*)
32602                                          gl_dirsep_regex='[/\\]'
32603      ;;
32604    *)
32605      gl_dirsep_regex='\/'
32606      ;;
32607  esac
32608      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
32609  gl_header_literal_regex=`echo 'sys/wait.h' \
32610                           | sed -e "$gl_make_literal_regex_sed"`
32611  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
32612      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
32613      s|^/[^/]|//&|
32614      p
32615      q
32616    }'
32617
32618        gl_cv_absolute_sys_wait_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
32619  sed -n "$gl_absolute_header_sed"`
32620
32621           gl_header=$gl_cv_absolute_sys_wait_h
32622           gl_cv_next_sys_wait_h='"'$gl_header'"'
32623          else
32624               gl_cv_next_sys_wait_h='<'sys/wait.h'>'
32625             fi
32626
32627
32628fi
32629{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5
32630printf "%s\n" "$gl_cv_next_sys_wait_h" >&6; }
32631     fi
32632     NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h
32633
32634     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
32635       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
32636       gl_next_as_first_directive='<'sys/wait.h'>'
32637     else
32638       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
32639       gl_next_as_first_directive=$gl_cv_next_sys_wait_h
32640     fi
32641     NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive
32642
32643
32644
32645
32646
32647
32648
32649
32650
32651
32652
32653
32654
32655  GL_GNULIB_WAITPID=0
32656
32657
32658
32659
32660
32661  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
32662printf %s "checking for struct timespec in <time.h>... " >&6; }
32663if test ${gl_cv_sys_struct_timespec_in_time_h+y}
32664then :
32665  printf %s "(cached) " >&6
32666else $as_nop
32667  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32668/* end confdefs.h.  */
32669#include <time.h>
32670
32671int
32672main (void)
32673{
32674static struct timespec x; x.tv_sec = x.tv_nsec;
32675  ;
32676  return 0;
32677}
32678_ACEOF
32679if ac_fn_c_try_compile "$LINENO"
32680then :
32681  gl_cv_sys_struct_timespec_in_time_h=yes
32682else $as_nop
32683  gl_cv_sys_struct_timespec_in_time_h=no
32684fi
32685rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
32686fi
32687{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
32688printf "%s\n" "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
32689
32690  TIME_H_DEFINES_STRUCT_TIMESPEC=0
32691  SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
32692  PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
32693  UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
32694  if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
32695    TIME_H_DEFINES_STRUCT_TIMESPEC=1
32696  else
32697    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
32698printf %s "checking for struct timespec in <sys/time.h>... " >&6; }
32699if test ${gl_cv_sys_struct_timespec_in_sys_time_h+y}
32700then :
32701  printf %s "(cached) " >&6
32702else $as_nop
32703  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32704/* end confdefs.h.  */
32705#include <sys/time.h>
32706
32707int
32708main (void)
32709{
32710static struct timespec x; x.tv_sec = x.tv_nsec;
32711  ;
32712  return 0;
32713}
32714_ACEOF
32715if ac_fn_c_try_compile "$LINENO"
32716then :
32717  gl_cv_sys_struct_timespec_in_sys_time_h=yes
32718else $as_nop
32719  gl_cv_sys_struct_timespec_in_sys_time_h=no
32720fi
32721rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
32722fi
32723{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
32724printf "%s\n" "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
32725    if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
32726      SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
32727    else
32728      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
32729printf %s "checking for struct timespec in <pthread.h>... " >&6; }
32730if test ${gl_cv_sys_struct_timespec_in_pthread_h+y}
32731then :
32732  printf %s "(cached) " >&6
32733else $as_nop
32734  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32735/* end confdefs.h.  */
32736#include <pthread.h>
32737
32738int
32739main (void)
32740{
32741static struct timespec x; x.tv_sec = x.tv_nsec;
32742  ;
32743  return 0;
32744}
32745_ACEOF
32746if ac_fn_c_try_compile "$LINENO"
32747then :
32748  gl_cv_sys_struct_timespec_in_pthread_h=yes
32749else $as_nop
32750  gl_cv_sys_struct_timespec_in_pthread_h=no
32751fi
32752rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
32753fi
32754{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
32755printf "%s\n" "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
32756      if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
32757        PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
32758      else
32759        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
32760printf %s "checking for struct timespec in <unistd.h>... " >&6; }
32761if test ${gl_cv_sys_struct_timespec_in_unistd_h+y}
32762then :
32763  printf %s "(cached) " >&6
32764else $as_nop
32765  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32766/* end confdefs.h.  */
32767#include <unistd.h>
32768
32769int
32770main (void)
32771{
32772static struct timespec x; x.tv_sec = x.tv_nsec;
32773  ;
32774  return 0;
32775}
32776_ACEOF
32777if ac_fn_c_try_compile "$LINENO"
32778then :
32779  gl_cv_sys_struct_timespec_in_unistd_h=yes
32780else $as_nop
32781  gl_cv_sys_struct_timespec_in_unistd_h=no
32782fi
32783rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
32784fi
32785{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
32786printf "%s\n" "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
32787        if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
32788          UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
32789        fi
32790      fi
32791    fi
32792  fi
32793
32794
32795
32796
32797
32798
32799
32800
32801
32802
32803
32804
32805
32806
32807
32808
32809     if test $gl_cv_have_include_next = yes; then
32810       gl_cv_next_time_h='<'time.h'>'
32811     else
32812       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
32813printf %s "checking absolute name of <time.h>... " >&6; }
32814if test ${gl_cv_next_time_h+y}
32815then :
32816  printf %s "(cached) " >&6
32817else $as_nop
32818
32819
32820
32821  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32822/* end confdefs.h.  */
32823#include <time.h>
32824_ACEOF
32825                case "$host_os" in
32826    aix*) gl_absname_cpp="$ac_cpp -C" ;;
32827    *)    gl_absname_cpp="$ac_cpp" ;;
32828  esac
32829
32830  case "$host_os" in
32831    mingw*)
32832                                          gl_dirsep_regex='[/\\]'
32833      ;;
32834    *)
32835      gl_dirsep_regex='\/'
32836      ;;
32837  esac
32838      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
32839  gl_header_literal_regex=`echo 'time.h' \
32840                           | sed -e "$gl_make_literal_regex_sed"`
32841  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
32842      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
32843      s|^/[^/]|//&|
32844      p
32845      q
32846    }'
32847
32848        gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
32849  sed -n "$gl_absolute_header_sed"`
32850
32851           gl_header=$gl_cv_absolute_time_h
32852           gl_cv_next_time_h='"'$gl_header'"'
32853
32854
32855fi
32856{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
32857printf "%s\n" "$gl_cv_next_time_h" >&6; }
32858     fi
32859     NEXT_TIME_H=$gl_cv_next_time_h
32860
32861     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
32862       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
32863       gl_next_as_first_directive='<'time.h'>'
32864     else
32865       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
32866       gl_next_as_first_directive=$gl_cv_next_time_h
32867     fi
32868     NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
32869
32870
32871
32872
32873
32874
32875
32876
32877  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TIME_UTC in <time.h>" >&5
32878printf %s "checking for TIME_UTC in <time.h>... " >&6; }
32879if test ${gl_cv_time_h_has_TIME_UTC+y}
32880then :
32881  printf %s "(cached) " >&6
32882else $as_nop
32883  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32884/* end confdefs.h.  */
32885#include <time.h>
32886
32887int
32888main (void)
32889{
32890static int x = TIME_UTC; x++;
32891  ;
32892  return 0;
32893}
32894_ACEOF
32895if ac_fn_c_try_compile "$LINENO"
32896then :
32897  gl_cv_time_h_has_TIME_UTC=yes
32898else $as_nop
32899  gl_cv_time_h_has_TIME_UTC=no
32900fi
32901rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
32902fi
32903{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_h_has_TIME_UTC" >&5
32904printf "%s\n" "$gl_cv_time_h_has_TIME_UTC" >&6; }
32905  if test $gl_cv_time_h_has_TIME_UTC = yes; then
32906    TIME_H_DEFINES_TIME_UTC=1
32907  else
32908    TIME_H_DEFINES_TIME_UTC=0
32909  fi
32910
32911
32912
32913
32914
32915
32916
32917
32918
32919
32920gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;}
32921i\
329220
32923q
32924'
32925gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;}
32926i\
329270
32928q
32929'
32930gl_libunistring_sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;}
32931i\
329320
32933q
32934'
32935
32936
32937  if test "$HAVE_LIBUNISTRING" = yes; then
32938    LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"`
32939    LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"`
32940    LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"`
32941  fi
32942
32943ac_fn_check_decl "$LINENO" "execvpe" "ac_cv_have_decl_execvpe" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
32944if test "x$ac_cv_have_decl_execvpe" = xyes
32945then :
32946  ac_have_decl=1
32947else $as_nop
32948  ac_have_decl=0
32949fi
32950printf "%s\n" "#define HAVE_DECL_EXECVPE $ac_have_decl" >>confdefs.h
32951
32952
32953
32954
32955
32956
32957
32958
32959
32960
32961
32962
32963
32964     if test $gl_cv_have_include_next = yes; then
32965       gl_cv_next_unistd_h='<'unistd.h'>'
32966     else
32967       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
32968printf %s "checking absolute name of <unistd.h>... " >&6; }
32969if test ${gl_cv_next_unistd_h+y}
32970then :
32971  printf %s "(cached) " >&6
32972else $as_nop
32973
32974             if test $ac_cv_header_unistd_h = yes; then
32975
32976
32977
32978
32979  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32980/* end confdefs.h.  */
32981#include <unistd.h>
32982_ACEOF
32983                case "$host_os" in
32984    aix*) gl_absname_cpp="$ac_cpp -C" ;;
32985    *)    gl_absname_cpp="$ac_cpp" ;;
32986  esac
32987
32988  case "$host_os" in
32989    mingw*)
32990                                          gl_dirsep_regex='[/\\]'
32991      ;;
32992    *)
32993      gl_dirsep_regex='\/'
32994      ;;
32995  esac
32996      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
32997  gl_header_literal_regex=`echo 'unistd.h' \
32998                           | sed -e "$gl_make_literal_regex_sed"`
32999  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
33000      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
33001      s|^/[^/]|//&|
33002      p
33003      q
33004    }'
33005
33006        gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
33007  sed -n "$gl_absolute_header_sed"`
33008
33009           gl_header=$gl_cv_absolute_unistd_h
33010           gl_cv_next_unistd_h='"'$gl_header'"'
33011          else
33012               gl_cv_next_unistd_h='<'unistd.h'>'
33013             fi
33014
33015
33016fi
33017{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
33018printf "%s\n" "$gl_cv_next_unistd_h" >&6; }
33019     fi
33020     NEXT_UNISTD_H=$gl_cv_next_unistd_h
33021
33022     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
33023       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
33024       gl_next_as_first_directive='<'unistd.h'>'
33025     else
33026       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
33027       gl_next_as_first_directive=$gl_cv_next_unistd_h
33028     fi
33029     NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
33030
33031
33032
33033
33034  if test $ac_cv_header_unistd_h = yes; then
33035    HAVE_UNISTD_H=1
33036  else
33037    HAVE_UNISTD_H=0
33038  fi
33039
33040
33041
33042
33043
33044
33045
33046
33047
33048
33049
33050
33051
33052  if test $ac_cv_have_decl_execvpe = no; then
33053    HAVE_DECL_EXECVPE=0
33054  fi
33055
33056ac_fn_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
33057if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes
33058then :
33059  ac_have_decl=1
33060else $as_nop
33061  ac_have_decl=0
33062fi
33063printf "%s\n" "#define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl" >>confdefs.h
33064
33065ac_fn_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
33066if test "x$ac_cv_have_decl_feof_unlocked" = xyes
33067then :
33068  ac_have_decl=1
33069else $as_nop
33070  ac_have_decl=0
33071fi
33072printf "%s\n" "#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl" >>confdefs.h
33073
33074ac_fn_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
33075if test "x$ac_cv_have_decl_ferror_unlocked" = xyes
33076then :
33077  ac_have_decl=1
33078else $as_nop
33079  ac_have_decl=0
33080fi
33081printf "%s\n" "#define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl" >>confdefs.h
33082
33083ac_fn_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
33084if test "x$ac_cv_have_decl_fgets_unlocked" = xyes
33085then :
33086  ac_have_decl=1
33087else $as_nop
33088  ac_have_decl=0
33089fi
33090printf "%s\n" "#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl" >>confdefs.h
33091
33092ac_fn_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
33093if test "x$ac_cv_have_decl_fputc_unlocked" = xyes
33094then :
33095  ac_have_decl=1
33096else $as_nop
33097  ac_have_decl=0
33098fi
33099printf "%s\n" "#define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl" >>confdefs.h
33100
33101ac_fn_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
33102if test "x$ac_cv_have_decl_fread_unlocked" = xyes
33103then :
33104  ac_have_decl=1
33105else $as_nop
33106  ac_have_decl=0
33107fi
33108printf "%s\n" "#define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl" >>confdefs.h
33109
33110ac_fn_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
33111if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes
33112then :
33113  ac_have_decl=1
33114else $as_nop
33115  ac_have_decl=0
33116fi
33117printf "%s\n" "#define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl" >>confdefs.h
33118
33119ac_fn_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
33120if test "x$ac_cv_have_decl_getc_unlocked" = xyes
33121then :
33122  ac_have_decl=1
33123else $as_nop
33124  ac_have_decl=0
33125fi
33126printf "%s\n" "#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl" >>confdefs.h
33127
33128ac_fn_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
33129if test "x$ac_cv_have_decl_getchar_unlocked" = xyes
33130then :
33131  ac_have_decl=1
33132else $as_nop
33133  ac_have_decl=0
33134fi
33135printf "%s\n" "#define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl" >>confdefs.h
33136
33137ac_fn_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
33138if test "x$ac_cv_have_decl_putchar_unlocked" = xyes
33139then :
33140  ac_have_decl=1
33141else $as_nop
33142  ac_have_decl=0
33143fi
33144printf "%s\n" "#define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl" >>confdefs.h
33145
33146
33147    HAVE_UTIME=1;
33148  REPLACE_UTIME=0;
33149
33150
33151
33152  GL_GNULIB_UTIME=0
33153
33154
33155
33156  GL_GNULIB_MDA_UTIME=1
33157
33158
33159
33160
33161
33162
33163
33164
33165
33166
33167
33168
33169
33170
33171
33172
33173
33174
33175     if test $gl_cv_have_include_next = yes; then
33176       gl_cv_next_utime_h='<'utime.h'>'
33177     else
33178       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <utime.h>" >&5
33179printf %s "checking absolute name of <utime.h>... " >&6; }
33180if test ${gl_cv_next_utime_h+y}
33181then :
33182  printf %s "(cached) " >&6
33183else $as_nop
33184
33185             if test $ac_cv_header_utime_h = yes; then
33186
33187
33188
33189
33190  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33191/* end confdefs.h.  */
33192#include <utime.h>
33193_ACEOF
33194                case "$host_os" in
33195    aix*) gl_absname_cpp="$ac_cpp -C" ;;
33196    *)    gl_absname_cpp="$ac_cpp" ;;
33197  esac
33198
33199  case "$host_os" in
33200    mingw*)
33201                                          gl_dirsep_regex='[/\\]'
33202      ;;
33203    *)
33204      gl_dirsep_regex='\/'
33205      ;;
33206  esac
33207      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
33208  gl_header_literal_regex=`echo 'utime.h' \
33209                           | sed -e "$gl_make_literal_regex_sed"`
33210  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
33211      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
33212      s|^/[^/]|//&|
33213      p
33214      q
33215    }'
33216
33217        gl_cv_absolute_utime_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
33218  sed -n "$gl_absolute_header_sed"`
33219
33220           gl_header=$gl_cv_absolute_utime_h
33221           gl_cv_next_utime_h='"'$gl_header'"'
33222          else
33223               gl_cv_next_utime_h='<'utime.h'>'
33224             fi
33225
33226
33227fi
33228{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_utime_h" >&5
33229printf "%s\n" "$gl_cv_next_utime_h" >&6; }
33230     fi
33231     NEXT_UTIME_H=$gl_cv_next_utime_h
33232
33233     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
33234       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
33235       gl_next_as_first_directive='<'utime.h'>'
33236     else
33237       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
33238       gl_next_as_first_directive=$gl_cv_next_utime_h
33239     fi
33240     NEXT_AS_FIRST_DIRECTIVE_UTIME_H=$gl_next_as_first_directive
33241
33242
33243
33244
33245
33246  if test $ac_cv_header_utime_h = yes; then
33247    HAVE_UTIME_H=1
33248  else
33249    HAVE_UTIME_H=0
33250  fi
33251
33252
33253
33254
33255
33256
33257
33258     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
33259printf %s "checking whether the utimes function works... " >&6; }
33260if test ${gl_cv_func_working_utimes+y}
33261then :
33262  printf %s "(cached) " >&6
33263else $as_nop
33264  if test "$cross_compiling" = yes
33265then :
33266  case "$host_os" in
33267                   # Guess yes on musl systems.
33268          *-musl*) gl_cv_func_working_utimes="guessing yes" ;;
33269                   # Guess no on native Windows.
33270          mingw*)  gl_cv_func_working_utimes="guessing no" ;;
33271          *)       gl_cv_func_working_utimes="$gl_cross_guess_normal" ;;
33272        esac
33273
33274else $as_nop
33275  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33276/* end confdefs.h.  */
33277
33278#include <sys/types.h>
33279#include <sys/stat.h>
33280#include <fcntl.h>
33281#include <sys/time.h>
33282#include <time.h>
33283#include <unistd.h>
33284#include <stdlib.h>
33285#include <stdio.h>
33286#include <utime.h>
33287#include <errno.h>
33288
33289
33290$gl_mda_defines
33291
33292
33293static int
33294inorder (time_t a, time_t b, time_t c)
33295{
33296  return a <= b && b <= c;
33297}
33298
33299int
33300main ()
33301{
33302  int result = 0;
33303  char const *file = "conftest.utimes";
33304  /* On OS/2, file timestamps must be on or after 1980 in local time,
33305     with an even number of seconds.  */
33306  static struct timeval timeval[2] = {{315620000 + 10, 10},
33307                                      {315620000 + 1000000, 999998}};
33308
33309  /* Test whether utimes() essentially works.  */
33310  {
33311    struct stat sbuf;
33312    FILE *f = fopen (file, "w");
33313    if (f == NULL)
33314      result |= 1;
33315    else if (fclose (f) != 0)
33316      result |= 1;
33317    else if (utimes (file, timeval) != 0)
33318      result |= 2;
33319    else if (lstat (file, &sbuf) != 0)
33320      result |= 1;
33321    else if (!(sbuf.st_atime == timeval[0].tv_sec
33322               && sbuf.st_mtime == timeval[1].tv_sec))
33323      result |= 4;
33324    if (unlink (file) != 0)
33325      result |= 1;
33326  }
33327
33328  /* Test whether utimes() with a NULL argument sets the file's timestamp
33329     to the current time.  Use 'fstat' as well as 'time' to
33330     determine the "current" time, to accommodate NFS file systems
33331     if there is a time skew between the host and the NFS server.  */
33332  {
33333    int fd = open (file, O_WRONLY|O_CREAT, 0644);
33334    if (fd < 0)
33335      result |= 1;
33336    else
33337      {
33338        time_t t0, t2;
33339        struct stat st0, st1, st2;
33340        if (time (&t0) == (time_t) -1)
33341          result |= 1;
33342        else if (fstat (fd, &st0) != 0)
33343          result |= 1;
33344        else if (utimes (file, timeval) != 0
33345                 && (errno != EACCES
33346                     /* OS/2 kLIBC utimes fails on opened files.  */
33347                     || close (fd) != 0
33348                     || utimes (file, timeval) != 0
33349                     || (fd = open (file, O_WRONLY)) < 0))
33350          result |= 2;
33351        else if (utimes (file, NULL) != 0
33352                 && (errno != EACCES
33353                     /* OS/2 kLIBC utimes fails on opened files.  */
33354                     || close (fd) != 0
33355                     || utimes (file, NULL) != 0
33356                     || (fd = open (file, O_WRONLY)) < 0))
33357          result |= 8;
33358        else if (fstat (fd, &st1) != 0)
33359          result |= 1;
33360        else if (write (fd, "\n", 1) != 1)
33361          result |= 1;
33362        else if (fstat (fd, &st2) != 0)
33363          result |= 1;
33364        else if (time (&t2) == (time_t) -1)
33365          result |= 1;
33366        else
33367          {
33368            int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
33369            int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
33370            if (! (st1.st_atime == st1.st_mtime))
33371              result |= 16;
33372            if (! (m_ok_POSIX || m_ok_NFS))
33373              result |= 32;
33374          }
33375        if (close (fd) != 0)
33376          result |= 1;
33377      }
33378    if (unlink (file) != 0)
33379      result |= 1;
33380  }
33381
33382  /* Test whether utimes() with a NULL argument works on read-only files.  */
33383  {
33384    int fd = open (file, O_WRONLY|O_CREAT, 0444);
33385    if (fd < 0)
33386      result |= 1;
33387    else if (close (fd) != 0)
33388      result |= 1;
33389    else if (utimes (file, NULL) != 0)
33390      result |= 64;
33391    if (unlink (file) != 0)
33392      result |= 1;
33393  }
33394
33395  return result;
33396}
33397
33398_ACEOF
33399if ac_fn_c_try_run "$LINENO"
33400then :
33401  gl_cv_func_working_utimes=yes
33402else $as_nop
33403  gl_cv_func_working_utimes=no
33404fi
33405rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33406  conftest.$ac_objext conftest.beam conftest.$ac_ext
33407fi
33408
33409
33410fi
33411{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
33412printf "%s\n" "$gl_cv_func_working_utimes" >&6; }
33413
33414  case "$gl_cv_func_working_utimes" in
33415    *yes)
33416
33417printf "%s\n" "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
33418
33419      ;;
33420  esac
33421
33422
33423
33424
33425
33426
33427
33428  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
33429printf %s "checking for inttypes.h... " >&6; }
33430if test ${gl_cv_header_inttypes_h+y}
33431then :
33432  printf %s "(cached) " >&6
33433else $as_nop
33434  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33435/* end confdefs.h.  */
33436
33437#include <sys/types.h>
33438#include <inttypes.h>
33439
33440int
33441main (void)
33442{
33443uintmax_t i = (uintmax_t) -1; return !i;
33444  ;
33445  return 0;
33446}
33447_ACEOF
33448if ac_fn_c_try_compile "$LINENO"
33449then :
33450  gl_cv_header_inttypes_h=yes
33451else $as_nop
33452  gl_cv_header_inttypes_h=no
33453fi
33454rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33455fi
33456{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
33457printf "%s\n" "$gl_cv_header_inttypes_h" >&6; }
33458  if test $gl_cv_header_inttypes_h = yes; then
33459
33460printf "%s\n" "#define HAVE_INTTYPES_H_WITH_UINTMAX 1" >>confdefs.h
33461
33462  fi
33463
33464
33465  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
33466printf %s "checking for stdint.h... " >&6; }
33467if test ${gl_cv_header_stdint_h+y}
33468then :
33469  printf %s "(cached) " >&6
33470else $as_nop
33471  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33472/* end confdefs.h.  */
33473#include <sys/types.h>
33474            #include <stdint.h>
33475int
33476main (void)
33477{
33478uintmax_t i = (uintmax_t) -1; return !i;
33479  ;
33480  return 0;
33481}
33482_ACEOF
33483if ac_fn_c_try_compile "$LINENO"
33484then :
33485  gl_cv_header_stdint_h=yes
33486else $as_nop
33487  gl_cv_header_stdint_h=no
33488fi
33489rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33490fi
33491{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
33492printf "%s\n" "$gl_cv_header_stdint_h" >&6; }
33493  if test $gl_cv_header_stdint_h = yes; then
33494
33495printf "%s\n" "#define HAVE_STDINT_H_WITH_UINTMAX 1" >>confdefs.h
33496
33497  fi
33498
33499
33500
33501
33502  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
33503printf %s "checking for intmax_t... " >&6; }
33504if test ${gt_cv_c_intmax_t+y}
33505then :
33506  printf %s "(cached) " >&6
33507else $as_nop
33508  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33509/* end confdefs.h.  */
33510
33511#include <stddef.h>
33512#include <stdlib.h>
33513#if HAVE_STDINT_H_WITH_UINTMAX
33514#include <stdint.h>
33515#endif
33516#if HAVE_INTTYPES_H_WITH_UINTMAX
33517#include <inttypes.h>
33518#endif
33519
33520int
33521main (void)
33522{
33523intmax_t x = -1; return !x;
33524  ;
33525  return 0;
33526}
33527_ACEOF
33528if ac_fn_c_try_compile "$LINENO"
33529then :
33530  gt_cv_c_intmax_t=yes
33531else $as_nop
33532  gt_cv_c_intmax_t=no
33533fi
33534rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33535fi
33536{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
33537printf "%s\n" "$gt_cv_c_intmax_t" >&6; }
33538  if test $gt_cv_c_intmax_t = yes; then
33539
33540printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h
33541
33542  else
33543
33544printf "%s\n" "#define intmax_t long long" >>confdefs.h
33545
33546  fi
33547
33548
33549  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
33550printf %s "checking where to find the exponent in a 'double'... " >&6; }
33551if test ${gl_cv_cc_double_expbit0+y}
33552then :
33553  printf %s "(cached) " >&6
33554else $as_nop
33555
33556      if test "$cross_compiling" = yes
33557then :
33558
33559                                                                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33560/* end confdefs.h.  */
33561
33562#if defined arm || defined __arm || defined __arm__
33563  mixed_endianness
33564#endif
33565
33566_ACEOF
33567if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
33568  $EGREP "mixed_endianness" >/dev/null 2>&1
33569then :
33570  gl_cv_cc_double_expbit0="unknown"
33571else $as_nop
33572
33573                                                         :
33574if test ${ac_cv_c_bigendian+y}
33575then :
33576  printf %s "(cached) " >&6
33577else $as_nop
33578  ac_cv_c_bigendian=unknown
33579    # See if we're dealing with a universal compiler.
33580    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33581/* end confdefs.h.  */
33582#ifndef __APPLE_CC__
33583	       not a universal capable compiler
33584	     #endif
33585	     typedef int dummy;
33586
33587_ACEOF
33588if ac_fn_c_try_compile "$LINENO"
33589then :
33590
33591	# Check for potential -arch flags.  It is not universal unless
33592	# there are at least two -arch flags with different values.
33593	ac_arch=
33594	ac_prev=
33595	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
33596	 if test -n "$ac_prev"; then
33597	   case $ac_word in
33598	     i?86 | x86_64 | ppc | ppc64)
33599	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
33600		 ac_arch=$ac_word
33601	       else
33602		 ac_cv_c_bigendian=universal
33603		 break
33604	       fi
33605	       ;;
33606	   esac
33607	   ac_prev=
33608	 elif test "x$ac_word" = "x-arch"; then
33609	   ac_prev=arch
33610	 fi
33611       done
33612fi
33613rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33614    if test $ac_cv_c_bigendian = unknown; then
33615      # See if sys/param.h defines the BYTE_ORDER macro.
33616      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33617/* end confdefs.h.  */
33618#include <sys/types.h>
33619	     #include <sys/param.h>
33620
33621int
33622main (void)
33623{
33624#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
33625		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
33626		     && LITTLE_ENDIAN)
33627	      bogus endian macros
33628	     #endif
33629
33630  ;
33631  return 0;
33632}
33633_ACEOF
33634if ac_fn_c_try_compile "$LINENO"
33635then :
33636  # It does; now see whether it defined to BIG_ENDIAN or not.
33637	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33638/* end confdefs.h.  */
33639#include <sys/types.h>
33640		#include <sys/param.h>
33641
33642int
33643main (void)
33644{
33645#if BYTE_ORDER != BIG_ENDIAN
33646		 not big endian
33647		#endif
33648
33649  ;
33650  return 0;
33651}
33652_ACEOF
33653if ac_fn_c_try_compile "$LINENO"
33654then :
33655  ac_cv_c_bigendian=yes
33656else $as_nop
33657  ac_cv_c_bigendian=no
33658fi
33659rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33660fi
33661rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33662    fi
33663    if test $ac_cv_c_bigendian = unknown; then
33664      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
33665      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33666/* end confdefs.h.  */
33667#include <limits.h>
33668
33669int
33670main (void)
33671{
33672#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
33673	      bogus endian macros
33674	     #endif
33675
33676  ;
33677  return 0;
33678}
33679_ACEOF
33680if ac_fn_c_try_compile "$LINENO"
33681then :
33682  # It does; now see whether it defined to _BIG_ENDIAN or not.
33683	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33684/* end confdefs.h.  */
33685#include <limits.h>
33686
33687int
33688main (void)
33689{
33690#ifndef _BIG_ENDIAN
33691		 not big endian
33692		#endif
33693
33694  ;
33695  return 0;
33696}
33697_ACEOF
33698if ac_fn_c_try_compile "$LINENO"
33699then :
33700  ac_cv_c_bigendian=yes
33701else $as_nop
33702  ac_cv_c_bigendian=no
33703fi
33704rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33705fi
33706rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33707    fi
33708    if test $ac_cv_c_bigendian = unknown; then
33709      # Compile a test program.
33710      if test "$cross_compiling" = yes
33711then :
33712  # Try to guess by grepping values from an object file.
33713	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33714/* end confdefs.h.  */
33715unsigned short int ascii_mm[] =
33716		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
33717		unsigned short int ascii_ii[] =
33718		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
33719		int use_ascii (int i) {
33720		  return ascii_mm[i] + ascii_ii[i];
33721		}
33722		unsigned short int ebcdic_ii[] =
33723		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
33724		unsigned short int ebcdic_mm[] =
33725		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
33726		int use_ebcdic (int i) {
33727		  return ebcdic_mm[i] + ebcdic_ii[i];
33728		}
33729		extern int foo;
33730
33731int
33732main (void)
33733{
33734return use_ascii (foo) == use_ebcdic (foo);
33735  ;
33736  return 0;
33737}
33738_ACEOF
33739if ac_fn_c_try_compile "$LINENO"
33740then :
33741  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
33742	      ac_cv_c_bigendian=yes
33743	    fi
33744	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
33745	      if test "$ac_cv_c_bigendian" = unknown; then
33746		ac_cv_c_bigendian=no
33747	      else
33748		# finding both strings is unlikely to happen, but who knows?
33749		ac_cv_c_bigendian=unknown
33750	      fi
33751	    fi
33752fi
33753rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33754else $as_nop
33755  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33756/* end confdefs.h.  */
33757$ac_includes_default
33758int
33759main (void)
33760{
33761
33762	     /* Are we little or big endian?  From Harbison&Steele.  */
33763	     union
33764	     {
33765	       long int l;
33766	       char c[sizeof (long int)];
33767	     } u;
33768	     u.l = 1;
33769	     return u.c[sizeof (long int) - 1] == 1;
33770
33771  ;
33772  return 0;
33773}
33774_ACEOF
33775if ac_fn_c_try_run "$LINENO"
33776then :
33777  ac_cv_c_bigendian=no
33778else $as_nop
33779  ac_cv_c_bigendian=yes
33780fi
33781rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33782  conftest.$ac_objext conftest.beam conftest.$ac_ext
33783fi
33784
33785    fi
33786fi
33787:
33788 case $ac_cv_c_bigendian in #(
33789   yes)
33790     gl_cv_cc_double_expbit0="word 0 bit 20";; #(
33791   no)
33792     gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
33793   universal)
33794
33795printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
33796
33797     ;; #(
33798   *)
33799     gl_cv_cc_double_expbit0="unknown" ;;
33800 esac
33801
33802
33803fi
33804rm -rf conftest*
33805
33806
33807else $as_nop
33808  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33809/* end confdefs.h.  */
33810
33811#include <float.h>
33812#include <stddef.h>
33813#include <stdio.h>
33814#include <string.h>
33815#define NWORDS \
33816  ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
33817typedef union { double value; unsigned int word[NWORDS]; } memory_double;
33818static unsigned int ored_words[NWORDS];
33819static unsigned int anded_words[NWORDS];
33820static void add_to_ored_words (double x)
33821{
33822  memory_double m;
33823  size_t i;
33824  /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
33825  memset (&m, 0, sizeof (memory_double));
33826  m.value = x;
33827  for (i = 0; i < NWORDS; i++)
33828    {
33829      ored_words[i] |= m.word[i];
33830      anded_words[i] &= m.word[i];
33831    }
33832}
33833int main ()
33834{
33835  size_t j;
33836  FILE *fp = fopen ("conftest.out", "w");
33837  if (fp == NULL)
33838    return 1;
33839  for (j = 0; j < NWORDS; j++)
33840    anded_words[j] = ~ (unsigned int) 0;
33841  add_to_ored_words (0.25);
33842  add_to_ored_words (0.5);
33843  add_to_ored_words (1.0);
33844  add_to_ored_words (2.0);
33845  add_to_ored_words (4.0);
33846  /* Remove bits that are common (e.g. if representation of the first mantissa
33847     bit is explicit).  */
33848  for (j = 0; j < NWORDS; j++)
33849    ored_words[j] &= ~anded_words[j];
33850  /* Now find the nonzero word.  */
33851  for (j = 0; j < NWORDS; j++)
33852    if (ored_words[j] != 0)
33853      break;
33854  if (j < NWORDS)
33855    {
33856      size_t i;
33857      for (i = j + 1; i < NWORDS; i++)
33858        if (ored_words[i] != 0)
33859          {
33860            fprintf (fp, "unknown");
33861            return (fclose (fp) != 0);
33862          }
33863      for (i = 0; ; i++)
33864        if ((ored_words[j] >> i) & 1)
33865          {
33866            fprintf (fp, "word %d bit %d", (int) j, (int) i);
33867            return (fclose (fp) != 0);
33868          }
33869    }
33870  fprintf (fp, "unknown");
33871  return (fclose (fp) != 0);
33872}
33873
33874_ACEOF
33875if ac_fn_c_try_run "$LINENO"
33876then :
33877  gl_cv_cc_double_expbit0=`cat conftest.out`
33878else $as_nop
33879  gl_cv_cc_double_expbit0="unknown"
33880fi
33881rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33882  conftest.$ac_objext conftest.beam conftest.$ac_ext
33883fi
33884
33885      rm -f conftest.out
33886
33887fi
33888{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
33889printf "%s\n" "$gl_cv_cc_double_expbit0" >&6; }
33890  case "$gl_cv_cc_double_expbit0" in
33891    word*bit*)
33892      word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
33893      bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
33894
33895printf "%s\n" "#define DBL_EXPBIT0_WORD $word" >>confdefs.h
33896
33897
33898printf "%s\n" "#define DBL_EXPBIT0_BIT $bit" >>confdefs.h
33899
33900      ;;
33901  esac
33902
33903
33904
33905
33906  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf truncates the result as in C99" >&5
33907printf %s "checking whether snprintf truncates the result as in C99... " >&6; }
33908if test ${gl_cv_func_snprintf_truncation_c99+y}
33909then :
33910  printf %s "(cached) " >&6
33911else $as_nop
33912
33913      if test "$cross_compiling" = yes
33914then :
33915
33916         case "$host_os" in
33917                                 # Guess yes on glibc systems.
33918           *-gnu* | gnu*)        gl_cv_func_snprintf_truncation_c99="guessing yes";;
33919                                 # Guess yes on musl systems.
33920           *-musl*)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
33921                                 # Guess yes on FreeBSD >= 5.
33922           freebsd[1-4].*)       gl_cv_func_snprintf_truncation_c99="guessing no";;
33923           freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
33924           midnightbsd*)         gl_cv_func_snprintf_truncation_c99="guessing yes";;
33925                                 # Guess yes on Mac OS X >= 10.3.
33926           darwin[1-6].*)        gl_cv_func_snprintf_truncation_c99="guessing no";;
33927           darwin*)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
33928                                 # Guess yes on OpenBSD >= 3.9.
33929           openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
33930                                 gl_cv_func_snprintf_truncation_c99="guessing no";;
33931           openbsd*)             gl_cv_func_snprintf_truncation_c99="guessing yes";;
33932                                 # Guess yes on Solaris >= 2.6.
33933           solaris2.[0-5] | solaris2.[0-5].*)
33934                                 gl_cv_func_snprintf_truncation_c99="guessing no";;
33935           solaris*)             gl_cv_func_snprintf_truncation_c99="guessing yes";;
33936                                 # Guess yes on AIX >= 4.
33937           aix[1-3]*)            gl_cv_func_snprintf_truncation_c99="guessing no";;
33938           aix*)                 gl_cv_func_snprintf_truncation_c99="guessing yes";;
33939                                 # Guess yes on HP-UX >= 11.
33940           hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";;
33941           hpux*)                gl_cv_func_snprintf_truncation_c99="guessing yes";;
33942                                 # Guess yes on IRIX >= 6.5.
33943           irix6.5)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
33944                                 # Guess yes on OSF/1 >= 5.
33945           osf[3-4]*)            gl_cv_func_snprintf_truncation_c99="guessing no";;
33946           osf*)                 gl_cv_func_snprintf_truncation_c99="guessing yes";;
33947                                 # Guess yes on NetBSD >= 3.
33948           netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
33949                                 gl_cv_func_snprintf_truncation_c99="guessing no";;
33950           netbsd*)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
33951                                 # Guess yes on BeOS.
33952           beos*)                gl_cv_func_snprintf_truncation_c99="guessing yes";;
33953                                 # Guess yes on Android.
33954           linux*-android*)      gl_cv_func_snprintf_truncation_c99="guessing yes";;
33955                                 # Guess no on native Windows.
33956           mingw*)               gl_cv_func_snprintf_truncation_c99="guessing no";;
33957                                 # If we don't know, obey --enable-cross-guesses.
33958           *)                    gl_cv_func_snprintf_truncation_c99="$gl_cross_guess_normal";;
33959         esac
33960
33961else $as_nop
33962  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33963/* end confdefs.h.  */
33964
33965#include <stdio.h>
33966#include <string.h>
33967#if HAVE_SNPRINTF
33968# define my_snprintf snprintf
33969#else
33970# include <stdarg.h>
33971static int my_snprintf (char *buf, int size, const char *format, ...)
33972{
33973  va_list args;
33974  int ret;
33975  va_start (args, format);
33976  ret = vsnprintf (buf, size, format, args);
33977  va_end (args);
33978  return ret;
33979}
33980#endif
33981static char buf[100];
33982int main ()
33983{
33984  strcpy (buf, "ABCDEF");
33985  my_snprintf (buf, 3, "%d %d", 4567, 89);
33986  if (memcmp (buf, "45\0DEF", 6) != 0)
33987    return 1;
33988  return 0;
33989}
33990_ACEOF
33991if ac_fn_c_try_run "$LINENO"
33992then :
33993  gl_cv_func_snprintf_truncation_c99=yes
33994else $as_nop
33995  gl_cv_func_snprintf_truncation_c99=no
33996fi
33997rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33998  conftest.$ac_objext conftest.beam conftest.$ac_ext
33999fi
34000
34001
34002fi
34003{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_truncation_c99" >&5
34004printf "%s\n" "$gl_cv_func_snprintf_truncation_c99" >&6; }
34005
34006
34007
34008
34009
34010  ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
34011if test "x$ac_cv_func_snprintf" = xyes
34012then :
34013  printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
34014
34015fi
34016ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
34017if test "x$ac_cv_func_strnlen" = xyes
34018then :
34019  printf "%s\n" "#define HAVE_STRNLEN 1" >>confdefs.h
34020
34021fi
34022ac_fn_c_check_func "$LINENO" "wcslen" "ac_cv_func_wcslen"
34023if test "x$ac_cv_func_wcslen" = xyes
34024then :
34025  printf "%s\n" "#define HAVE_WCSLEN 1" >>confdefs.h
34026
34027fi
34028ac_fn_c_check_func "$LINENO" "wcsnlen" "ac_cv_func_wcsnlen"
34029if test "x$ac_cv_func_wcsnlen" = xyes
34030then :
34031  printf "%s\n" "#define HAVE_WCSNLEN 1" >>confdefs.h
34032
34033fi
34034ac_fn_c_check_func "$LINENO" "mbrtowc" "ac_cv_func_mbrtowc"
34035if test "x$ac_cv_func_mbrtowc" = xyes
34036then :
34037  printf "%s\n" "#define HAVE_MBRTOWC 1" >>confdefs.h
34038
34039fi
34040ac_fn_c_check_func "$LINENO" "wcrtomb" "ac_cv_func_wcrtomb"
34041if test "x$ac_cv_func_wcrtomb" = xyes
34042then :
34043  printf "%s\n" "#define HAVE_WCRTOMB 1" >>confdefs.h
34044
34045fi
34046
34047      ac_fn_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
34048" "$ac_c_undeclared_builtin_options" "CFLAGS"
34049if test "x$ac_cv_have_decl__snprintf" = xyes
34050then :
34051  ac_have_decl=1
34052else $as_nop
34053  ac_have_decl=0
34054fi
34055printf "%s\n" "#define HAVE_DECL__SNPRINTF $ac_have_decl" >>confdefs.h
34056
34057
34058
34059  case "$gl_cv_func_snprintf_retval_c99" in
34060    *yes)
34061
34062printf "%s\n" "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
34063
34064      ;;
34065  esac
34066
34067  case "$gl_cv_func_snprintf_truncation_c99" in
34068    *yes)
34069
34070printf "%s\n" "#define HAVE_SNPRINTF_TRUNCATION_C99 1" >>confdefs.h
34071
34072      ;;
34073  esac
34074
34075ac_fn_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
34076if test "x$ac_cv_have_decl_vsnprintf" = xyes
34077then :
34078  ac_have_decl=1
34079else $as_nop
34080  ac_have_decl=0
34081fi
34082printf "%s\n" "#define HAVE_DECL_VSNPRINTF $ac_have_decl" >>confdefs.h
34083
34084
34085
34086
34087
34088
34089
34090
34091
34092
34093
34094
34095
34096     if test $gl_cv_have_include_next = yes; then
34097       gl_cv_next_wchar_h='<'wchar.h'>'
34098     else
34099       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
34100printf %s "checking absolute name of <wchar.h>... " >&6; }
34101if test ${gl_cv_next_wchar_h+y}
34102then :
34103  printf %s "(cached) " >&6
34104else $as_nop
34105
34106             if test $ac_cv_header_wchar_h = yes; then
34107
34108
34109
34110
34111  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34112/* end confdefs.h.  */
34113#include <wchar.h>
34114_ACEOF
34115                case "$host_os" in
34116    aix*) gl_absname_cpp="$ac_cpp -C" ;;
34117    *)    gl_absname_cpp="$ac_cpp" ;;
34118  esac
34119
34120  case "$host_os" in
34121    mingw*)
34122                                          gl_dirsep_regex='[/\\]'
34123      ;;
34124    *)
34125      gl_dirsep_regex='\/'
34126      ;;
34127  esac
34128      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
34129  gl_header_literal_regex=`echo 'wchar.h' \
34130                           | sed -e "$gl_make_literal_regex_sed"`
34131  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
34132      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
34133      s|^/[^/]|//&|
34134      p
34135      q
34136    }'
34137
34138        gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
34139  sed -n "$gl_absolute_header_sed"`
34140
34141           gl_header=$gl_cv_absolute_wchar_h
34142           gl_cv_next_wchar_h='"'$gl_header'"'
34143          else
34144               gl_cv_next_wchar_h='<'wchar.h'>'
34145             fi
34146
34147
34148fi
34149{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
34150printf "%s\n" "$gl_cv_next_wchar_h" >&6; }
34151     fi
34152     NEXT_WCHAR_H=$gl_cv_next_wchar_h
34153
34154     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
34155       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
34156       gl_next_as_first_directive='<'wchar.h'>'
34157     else
34158       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
34159       gl_next_as_first_directive=$gl_cv_next_wchar_h
34160     fi
34161     NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
34162
34163
34164
34165
34166  if test $ac_cv_header_wchar_h = yes; then
34167    HAVE_WCHAR_H=1
34168  else
34169    HAVE_WCHAR_H=0
34170  fi
34171
34172
34173
34174
34175
34176  if test $gt_cv_c_wint_t = yes; then
34177    HAVE_WINT_T=1
34178  else
34179    HAVE_WINT_T=0
34180  fi
34181
34182
34183
34184
34185
34186
34187
34188
34189
34190
34191  ac_fn_check_decl "$LINENO" "wcsdup" "ac_cv_have_decl_wcsdup" "
34192      #include <wchar.h>
34193
34194" "$ac_c_undeclared_builtin_options" "CFLAGS"
34195if test "x$ac_cv_have_decl_wcsdup" = xyes
34196then :
34197  ac_have_decl=1
34198else $as_nop
34199  ac_have_decl=0
34200fi
34201printf "%s\n" "#define HAVE_DECL_WCSDUP $ac_have_decl" >>confdefs.h
34202
34203  if test $ac_cv_have_decl_wcsdup = no; then
34204    HAVE_DECL_WCSDUP=0
34205  fi
34206
34207
34208
34209
34210
34211   if false; then
34212  GL_COND_LIBTOOL_TRUE=
34213  GL_COND_LIBTOOL_FALSE='#'
34214else
34215  GL_COND_LIBTOOL_TRUE='#'
34216  GL_COND_LIBTOOL_FALSE=
34217fi
34218
34219  gl_cond_libtool=false
34220  gl_libdeps=
34221  gl_ltlibdeps=
34222  gl_m4_base='m4'
34223
34224
34225
34226
34227
34228
34229
34230
34231
34232
34233
34234
34235  gl_source_base='lib'
34236
34237  if test "$ac_cv_header_winsock2_h" = yes; then
34238
34239
34240
34241
34242
34243
34244
34245
34246  gl_LIBOBJS="$gl_LIBOBJS accept.$ac_objext"
34247
34248  fi
34249
34250
34251
34252
34253
34254
34255
34256
34257
34258          GL_GNULIB_ACCEPT=1
34259
34260
34261
34262
34263
34264printf "%s\n" "#define GNULIB_TEST_ACCEPT 1" >>confdefs.h
34265
34266
34267
34268
34269
34270
34271      case "$host_os" in
34272    mingw*) REPLACE_ACCESS=1 ;;
34273  esac
34274
34275  if test $REPLACE_ACCESS = 1; then
34276
34277
34278
34279
34280
34281
34282
34283
34284  gl_LIBOBJS="$gl_LIBOBJS access.$ac_objext"
34285
34286  fi
34287
34288
34289
34290
34291
34292
34293
34294
34295
34296          GL_GNULIB_ACCESS=1
34297
34298
34299
34300
34301
34302printf "%s\n" "#define GNULIB_TEST_ACCESS 1" >>confdefs.h
34303
34304
34305
34306
34307
34308  if test $ac_cv_func_alloca_works = no; then
34309    :
34310  fi
34311
34312  # Define an additional variable used in the Makefile substitution.
34313  if test $ac_cv_working_alloca_h = yes; then
34314    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
34315printf %s "checking for alloca as a compiler built-in... " >&6; }
34316if test ${gl_cv_rpl_alloca+y}
34317then :
34318  printf %s "(cached) " >&6
34319else $as_nop
34320
34321      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34322/* end confdefs.h.  */
34323
34324#if defined __GNUC__ || defined _AIX || defined _MSC_VER
34325        Need own alloca
34326#endif
34327
34328_ACEOF
34329if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34330  $EGREP "Need own alloca" >/dev/null 2>&1
34331then :
34332  gl_cv_rpl_alloca=yes
34333else $as_nop
34334  gl_cv_rpl_alloca=no
34335fi
34336rm -rf conftest*
34337
34338
34339fi
34340{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
34341printf "%s\n" "$gl_cv_rpl_alloca" >&6; }
34342    if test $gl_cv_rpl_alloca = yes; then
34343
34344printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
34345
34346      ALLOCA_H=alloca.h
34347    else
34348                  ALLOCA_H=
34349    fi
34350  else
34351    ALLOCA_H=alloca.h
34352  fi
34353
34354   if test -n "$ALLOCA_H"; then
34355  GL_GENERATE_ALLOCA_H_TRUE=
34356  GL_GENERATE_ALLOCA_H_FALSE='#'
34357else
34358  GL_GENERATE_ALLOCA_H_TRUE='#'
34359  GL_GENERATE_ALLOCA_H_FALSE=
34360fi
34361
34362
34363  if test $ac_cv_working_alloca_h = yes; then
34364    HAVE_ALLOCA_H=1
34365  else
34366    HAVE_ALLOCA_H=0
34367  fi
34368
34369
34370
34371
34372
34373
34374
34375
34376
34377
34378
34379
34380
34381
34382
34383
34384  if test "$ac_cv_header_winsock2_h" = yes; then
34385
34386
34387
34388
34389
34390
34391
34392
34393  gl_LIBOBJS="$gl_LIBOBJS bind.$ac_objext"
34394
34395  fi
34396
34397
34398
34399
34400
34401
34402
34403
34404
34405          GL_GNULIB_BIND=1
34406
34407
34408
34409
34410
34411printf "%s\n" "#define GNULIB_TEST_BIND 1" >>confdefs.h
34412
34413
34414
34415
34416
34417
34418
34419
34420
34421  if test $ac_cv_func_btowc = no; then
34422    HAVE_BTOWC=0
34423  else
34424
34425
34426
34427
34428        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
34429printf %s "checking whether btowc(0) is correct... " >&6; }
34430if test ${gl_cv_func_btowc_nul+y}
34431then :
34432  printf %s "(cached) " >&6
34433else $as_nop
34434
34435        if test "$cross_compiling" = yes
34436then :
34437
34438           case "$host_os" in
34439                      # Guess no on Cygwin.
34440             cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
34441                      # Guess yes on native Windows.
34442             mingw*)  gl_cv_func_btowc_nul="guessing yes" ;;
34443                      # Guess yes otherwise.
34444             *)       gl_cv_func_btowc_nul="guessing yes" ;;
34445           esac
34446
34447else $as_nop
34448  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34449/* end confdefs.h.  */
34450
34451#include <wchar.h>
34452int main ()
34453{
34454  if (btowc ('\0') != 0)
34455    return 1;
34456  return 0;
34457}
34458_ACEOF
34459if ac_fn_c_try_run "$LINENO"
34460then :
34461  gl_cv_func_btowc_nul=yes
34462else $as_nop
34463  gl_cv_func_btowc_nul=no
34464fi
34465rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34466  conftest.$ac_objext conftest.beam conftest.$ac_ext
34467fi
34468
34469
34470fi
34471{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
34472printf "%s\n" "$gl_cv_func_btowc_nul" >&6; }
34473
34474        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
34475printf %s "checking whether btowc(EOF) is correct... " >&6; }
34476if test ${gl_cv_func_btowc_eof+y}
34477then :
34478  printf %s "(cached) " >&6
34479else $as_nop
34480
34481                        case "$host_os" in
34482                  # Guess no on IRIX.
34483          irix*)  gl_cv_func_btowc_eof="guessing no" ;;
34484                  # Guess yes on native Windows.
34485          mingw*) gl_cv_func_btowc_eof="guessing yes" ;;
34486                  # Guess yes otherwise.
34487          *)      gl_cv_func_btowc_eof="guessing yes" ;;
34488        esac
34489        if test $LOCALE_FR != none; then
34490          if test "$cross_compiling" = yes
34491then :
34492  :
34493else $as_nop
34494  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34495/* end confdefs.h.  */
34496
34497#include <locale.h>
34498#include <stdio.h>
34499#include <wchar.h>
34500int main ()
34501{
34502  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
34503    {
34504      if (btowc (EOF) != WEOF)
34505        return 1;
34506    }
34507  return 0;
34508}
34509_ACEOF
34510if ac_fn_c_try_run "$LINENO"
34511then :
34512  gl_cv_func_btowc_eof=yes
34513else $as_nop
34514  gl_cv_func_btowc_eof=no
34515fi
34516rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34517  conftest.$ac_objext conftest.beam conftest.$ac_ext
34518fi
34519
34520        fi
34521
34522fi
34523{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
34524printf "%s\n" "$gl_cv_func_btowc_eof" >&6; }
34525
34526    case "$gl_cv_func_btowc_nul" in
34527      *yes) ;;
34528      *) REPLACE_BTOWC=1 ;;
34529    esac
34530    case "$gl_cv_func_btowc_eof" in
34531      *yes) ;;
34532      *) REPLACE_BTOWC=1 ;;
34533    esac
34534  fi
34535
34536  if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
34537
34538
34539
34540
34541
34542
34543
34544
34545  gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
34546
34547
34548  :
34549
34550  fi
34551
34552
34553
34554
34555
34556
34557
34558
34559
34560          GL_GNULIB_BTOWC=1
34561
34562
34563
34564
34565
34566printf "%s\n" "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
34567
34568
34569
34570
34571  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
34572printf %s "checking for __builtin_expect... " >&6; }
34573if test ${gl_cv___builtin_expect+y}
34574then :
34575  printf %s "(cached) " >&6
34576else $as_nop
34577  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34578/* end confdefs.h.  */
34579
34580         int
34581         main (int argc, char **argv)
34582         {
34583           argc = __builtin_expect (argc, 100);
34584           return argv[argc != 100][0];
34585         }
34586_ACEOF
34587if ac_fn_c_try_link "$LINENO"
34588then :
34589  gl_cv___builtin_expect=yes
34590else $as_nop
34591  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34592/* end confdefs.h.  */
34593
34594             #include <builtins.h>
34595             int
34596             main (int argc, char **argv)
34597             {
34598               argc = __builtin_expect (argc, 100);
34599               return argv[argc != 100][0];
34600             }
34601_ACEOF
34602if ac_fn_c_try_link "$LINENO"
34603then :
34604  gl_cv___builtin_expect="in <builtins.h>"
34605else $as_nop
34606  gl_cv___builtin_expect=no
34607fi
34608rm -f core conftest.err conftest.$ac_objext conftest.beam \
34609    conftest$ac_exeext conftest.$ac_ext
34610fi
34611rm -f core conftest.err conftest.$ac_objext conftest.beam \
34612    conftest$ac_exeext conftest.$ac_ext
34613fi
34614{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5
34615printf "%s\n" "$gl_cv___builtin_expect" >&6; }
34616  if test "$gl_cv___builtin_expect" = yes; then
34617    printf "%s\n" "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h
34618
34619  elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
34620    printf "%s\n" "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
34621
34622  fi
34623
34624
34625
34626           for ac_header in byteswap.h
34627do :
34628  ac_fn_c_check_header_compile "$LINENO" "byteswap.h" "ac_cv_header_byteswap_h" "$ac_includes_default"
34629if test "x$ac_cv_header_byteswap_h" = xyes
34630then :
34631  printf "%s\n" "#define HAVE_BYTESWAP_H 1" >>confdefs.h
34632
34633    BYTESWAP_H=''
34634
34635else $as_nop
34636
34637    BYTESWAP_H='byteswap.h'
34638
34639fi
34640
34641done
34642
34643   if test -n "$BYTESWAP_H"; then
34644  GL_GENERATE_BYTESWAP_H_TRUE=
34645  GL_GENERATE_BYTESWAP_H_FALSE='#'
34646else
34647  GL_GENERATE_BYTESWAP_H_TRUE='#'
34648  GL_GENERATE_BYTESWAP_H_FALSE=
34649fi
34650
34651
34652
34653
34654
34655  if test $REPLACE_CALLOC = 0; then
34656
34657     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether calloc (0, n) and calloc (n, 0) return nonnull" >&5
34658printf %s "checking whether calloc (0, n) and calloc (n, 0) return nonnull... " >&6; }
34659if test ${ac_cv_func_calloc_0_nonnull+y}
34660then :
34661  printf %s "(cached) " >&6
34662else $as_nop
34663  if test $cross_compiling != yes; then
34664       ac_cv_func_calloc_0_nonnull=yes
34665       if test "$cross_compiling" = yes
34666then :
34667  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34668printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
34669as_fn_error $? "cannot run test program while cross compiling
34670See \`config.log' for more details" "$LINENO" 5; }
34671else $as_nop
34672  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34673/* end confdefs.h.  */
34674$ac_includes_default
34675int
34676main (void)
34677{
34678int result = 0;
34679              char * volatile p = calloc (0, 0);
34680              if (!p)
34681                result |= 1;
34682              free (p);
34683              return result;
34684
34685  ;
34686  return 0;
34687}
34688_ACEOF
34689if ac_fn_c_try_run "$LINENO"
34690then :
34691
34692else $as_nop
34693  ac_cv_func_calloc_0_nonnull=no
34694fi
34695rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34696  conftest.$ac_objext conftest.beam conftest.$ac_ext
34697fi
34698
34699     else
34700       case "$host_os" in
34701                        # Guess yes on glibc systems.
34702         *-gnu* | gnu*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
34703                        # Guess yes on musl systems.
34704         *-musl*)       ac_cv_func_calloc_0_nonnull="guessing yes" ;;
34705                        # Guess yes on native Windows.
34706         mingw*)        ac_cv_func_calloc_0_nonnull="guessing yes" ;;
34707                        # If we don't know, obey --enable-cross-guesses.
34708         *)             ac_cv_func_calloc_0_nonnull="$gl_cross_guess_normal" ;;
34709       esac
34710     fi
34711
34712fi
34713{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_calloc_0_nonnull" >&5
34714printf "%s\n" "$ac_cv_func_calloc_0_nonnull" >&6; }
34715  case $ac_cv_func_calloc_0_nonnull in #(
34716  *yes) :
34717     ;; #(
34718  *) :
34719    REPLACE_CALLOC=1 ;;
34720esac
34721
34722  fi
34723
34724  if test $REPLACE_CALLOC = 1; then
34725
34726
34727
34728
34729
34730
34731
34732
34733  gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
34734
34735  fi
34736
34737
34738
34739  if test $REPLACE_MALLOC = 1; then
34740    REPLACE_CALLOC=1
34741  fi
34742
34743  if test $REPLACE_CALLOC = 1; then
34744
34745
34746
34747
34748
34749
34750
34751
34752  gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
34753
34754  fi
34755
34756
34757
34758
34759
34760
34761
34762
34763
34764          GL_GNULIB_CALLOC_POSIX=1
34765
34766
34767
34768
34769
34770printf "%s\n" "#define GNULIB_TEST_CALLOC_POSIX 1" >>confdefs.h
34771
34772
34773
34774
34775
34776
34777
34778
34779
34780  if test $ac_cv_func_canonicalize_file_name = no; then
34781    HAVE_CANONICALIZE_FILE_NAME=0
34782  else
34783    case "$gl_cv_func_realpath_works" in
34784      *yes) ;;
34785      *)    REPLACE_CANONICALIZE_FILE_NAME=1 ;;
34786    esac
34787  fi
34788
34789
34790
34791printf "%s\n" "#define GNULIB_CANONICALIZE 1" >>confdefs.h
34792
34793
34794
34795
34796printf "%s\n" "#define GNULIB_TEST_CANONICALIZE 1" >>confdefs.h
34797
34798
34799
34800
34801
34802
34803
34804
34805
34806
34807
34808          GL_GNULIB_CANONICALIZE_FILE_NAME=1
34809
34810
34811
34812
34813
34814printf "%s\n" "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
34815
34816
34817
34818
34819
34820
34821  if test $ac_cv_func_canonicalize_file_name = no; then
34822    HAVE_CANONICALIZE_FILE_NAME=0
34823    if test $ac_cv_func_realpath = no; then
34824      HAVE_REALPATH=0
34825    else
34826      case "$gl_cv_func_realpath_works" in
34827        *yes) ;;
34828        *)    REPLACE_REALPATH=1 ;;
34829      esac
34830    fi
34831  else
34832    case "$gl_cv_func_realpath_works" in
34833      *yes)
34834        ;;
34835      *)
34836        REPLACE_CANONICALIZE_FILE_NAME=1
34837        REPLACE_REALPATH=1
34838        ;;
34839    esac
34840  fi
34841
34842  if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
34843
34844
34845
34846
34847
34848
34849
34850
34851  gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
34852
34853  fi
34854
34855
34856printf "%s\n" "#define GNULIB_CANONICALIZE_LGPL 1" >>confdefs.h
34857
34858
34859
34860
34861
34862
34863
34864
34865
34866
34867
34868          GL_GNULIB_CANONICALIZE_FILE_NAME=1
34869
34870
34871
34872
34873
34874printf "%s\n" "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
34875
34876
34877
34878
34879
34880
34881
34882
34883
34884
34885
34886
34887          GL_GNULIB_REALPATH=1
34888
34889
34890
34891
34892
34893printf "%s\n" "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
34894
34895
34896
34897
34898
34899
34900
34901
34902
34903
34904
34905
34906          GL_GNULIB_CHDIR=1
34907
34908
34909
34910
34911
34912printf "%s\n" "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
34913
34914
34915
34916
34917
34918  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether this system supports file names of any length" >&5
34919printf %s "checking whether this system supports file names of any length... " >&6; }
34920if test ${gl_cv_have_unlimited_file_name_length+y}
34921then :
34922  printf %s "(cached) " >&6
34923else $as_nop
34924  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34925/* end confdefs.h.  */
34926
34927/* Arrange to define PATH_MAX, like "pathmax.h" does. */
34928#if HAVE_UNISTD_H
34929# include <unistd.h>
34930#endif
34931#include <limits.h>
34932#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
34933# include <sys/param.h>
34934#endif
34935#if !defined PATH_MAX && defined MAXPATHLEN
34936# define PATH_MAX MAXPATHLEN
34937#endif
34938#ifdef __hpux
34939# undef PATH_MAX
34940# define PATH_MAX 1024
34941#endif
34942#if defined _WIN32 && ! defined __CYGWIN__
34943# undef PATH_MAX
34944# define PATH_MAX 260
34945#endif
34946
34947#ifdef PATH_MAX
34948have_arbitrary_file_name_length_limit
34949#endif
34950_ACEOF
34951if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34952  $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1
34953then :
34954  gl_cv_have_unlimited_file_name_length=no
34955else $as_nop
34956  gl_cv_have_unlimited_file_name_length=yes
34957fi
34958rm -rf conftest*
34959
34960fi
34961{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_unlimited_file_name_length" >&5
34962printf "%s\n" "$gl_cv_have_unlimited_file_name_length" >&6; }
34963
34964  if test $gl_cv_have_unlimited_file_name_length = no; then
34965
34966
34967
34968
34969
34970
34971
34972
34973  gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
34974
34975    :
34976  fi
34977
34978
34979
34980  # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
34981  # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
34982
34983  # Save and restore LIBS so e.g., -lrt, isn't added to it.  Otherwise, *all*
34984  # programs in the package would end up linked with that potentially-shared
34985  # library, inducing unnecessary run-time overhead.
34986  LIB_CLOCK_GETTIME=
34987
34988  gl_saved_libs=$LIBS
34989    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
34990printf %s "checking for library containing clock_gettime... " >&6; }
34991if test ${ac_cv_search_clock_gettime+y}
34992then :
34993  printf %s "(cached) " >&6
34994else $as_nop
34995  ac_func_search_save_LIBS=$LIBS
34996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34997/* end confdefs.h.  */
34998
34999/* Override any GCC internal prototype to avoid an error.
35000   Use char because int might match the return type of a GCC
35001   builtin and then its argument prototype would still apply.  */
35002char clock_gettime ();
35003int
35004main (void)
35005{
35006return clock_gettime ();
35007  ;
35008  return 0;
35009}
35010_ACEOF
35011for ac_lib in '' rt posix4
35012do
35013  if test -z "$ac_lib"; then
35014    ac_res="none required"
35015  else
35016    ac_res=-l$ac_lib
35017    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
35018  fi
35019  if ac_fn_c_try_link "$LINENO"
35020then :
35021  ac_cv_search_clock_gettime=$ac_res
35022fi
35023rm -f core conftest.err conftest.$ac_objext conftest.beam \
35024    conftest$ac_exeext
35025  if test ${ac_cv_search_clock_gettime+y}
35026then :
35027  break
35028fi
35029done
35030if test ${ac_cv_search_clock_gettime+y}
35031then :
35032
35033else $as_nop
35034  ac_cv_search_clock_gettime=no
35035fi
35036rm conftest.$ac_ext
35037LIBS=$ac_func_search_save_LIBS
35038fi
35039{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
35040printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
35041ac_res=$ac_cv_search_clock_gettime
35042if test "$ac_res" != no
35043then :
35044  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
35045  test "$ac_cv_search_clock_gettime" = "none required" ||
35046                    LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
35047fi
35048
35049    ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
35050if test "x$ac_cv_func_clock_gettime" = xyes
35051then :
35052  printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
35053
35054fi
35055ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
35056if test "x$ac_cv_func_clock_settime" = xyes
35057then :
35058  printf "%s\n" "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
35059
35060fi
35061
35062  LIBS=$gl_saved_libs
35063
35064
35065
35066printf "%s\n" "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
35067
35068
35069
35070
35071
35072
35073    if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
35074      REPLACE_CLOSE=1
35075    fi
35076
35077
35078
35079
35080
35081
35082  if test $ac_cv_header_sys_socket_h != yes; then
35083                    ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
35084if test "x$ac_cv_header_winsock2_h" = xyes
35085then :
35086  printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
35087
35088fi
35089
35090  fi
35091  if test "$ac_cv_header_winsock2_h" = yes; then
35092    HAVE_WINSOCK2_H=1
35093    UNISTD_H_HAVE_WINSOCK2_H=1
35094    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
35095  else
35096    HAVE_WINSOCK2_H=0
35097  fi
35098
35099
35100    if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
35101                        REPLACE_CLOSE=1
35102    fi
35103
35104
35105    if test $REPLACE_CLOSE = 0; then
35106
35107
35108
35109  if test $ac_cv_func_fchdir = no; then
35110    HAVE_FCHDIR=0
35111  fi
35112
35113      if test $HAVE_FCHDIR = 0; then
35114        REPLACE_CLOSE=1
35115      fi
35116    fi
35117
35118
35119  if test $REPLACE_CLOSE = 1; then
35120
35121
35122
35123
35124
35125
35126
35127
35128  gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
35129
35130  fi
35131
35132
35133
35134
35135
35136
35137
35138
35139
35140          GL_GNULIB_CLOSE=1
35141
35142
35143
35144
35145
35146printf "%s\n" "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
35147
35148
35149
35150
35151
35152
35153  ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
35154if test "x$ac_cv_func_closedir" = xyes
35155then :
35156  printf "%s\n" "#define HAVE_CLOSEDIR 1" >>confdefs.h
35157
35158fi
35159
35160  if test $ac_cv_func_closedir = no; then
35161    HAVE_CLOSEDIR=0
35162  fi
35163
35164
35165
35166
35167  if test $ac_cv_func_fchdir = no; then
35168    HAVE_FCHDIR=0
35169  fi
35170
35171    if test $HAVE_FCHDIR = 0; then
35172      if test $HAVE_CLOSEDIR = 1; then
35173        REPLACE_CLOSEDIR=1
35174      fi
35175    fi
35176
35177    case $host_os,$HAVE_CLOSEDIR in
35178    os2*,1)
35179      REPLACE_CLOSEDIR=1;;
35180  esac
35181
35182  if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
35183
35184
35185
35186
35187
35188
35189
35190
35191  gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
35192
35193  fi
35194
35195
35196
35197
35198
35199
35200
35201
35202
35203          GL_GNULIB_CLOSEDIR=1
35204
35205
35206
35207
35208
35209printf "%s\n" "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
35210
35211
35212
35213
35214  if test "$ac_cv_header_winsock2_h" = yes; then
35215
35216
35217
35218
35219
35220
35221
35222
35223  gl_LIBOBJS="$gl_LIBOBJS connect.$ac_objext"
35224
35225  fi
35226
35227
35228
35229
35230
35231
35232
35233
35234
35235          GL_GNULIB_CONNECT=1
35236
35237
35238
35239
35240
35241printf "%s\n" "#define GNULIB_TEST_CONNECT 1" >>confdefs.h
35242
35243
35244
35245
35246
35247
35248
35249
35250  :
35251
35252
35253printf "%s\n" "#define GL_COMPILE_CRYPTO_STREAM 1" >>confdefs.h
35254
35255
35256
35257
35258
35259
35260
35261
35262
35263
35264
35265# Check whether --with-openssl was given.
35266if test ${with_openssl+y}
35267then :
35268  withval=$with_openssl;
35269else $as_nop
35270  with_openssl=$with_openssl_default
35271fi
35272
35273
35274
35275  if test "x$with_openssl" != xno; then
35276    if test "x$with_openssl" = xauto-gpl-compat; then
35277      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether openssl is GPL compatible" >&5
35278printf %s "checking whether openssl is GPL compatible... " >&6; }
35279if test ${gl_cv_openssl_gpl_compat+y}
35280then :
35281  printf %s "(cached) " >&6
35282else $as_nop
35283  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35284/* end confdefs.h.  */
35285
35286                #include <openssl/opensslv.h>
35287                #if OPENSSL_VERSION_MAJOR < 3
35288                  #error "openssl >= version 3 not found"
35289                #endif
35290
35291int
35292main (void)
35293{
35294
35295  ;
35296  return 0;
35297}
35298_ACEOF
35299if ac_fn_c_try_compile "$LINENO"
35300then :
35301  gl_cv_openssl_gpl_compat=yes
35302else $as_nop
35303  gl_cv_openssl_gpl_compat=no
35304fi
35305rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
35306fi
35307{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_openssl_gpl_compat" >&5
35308printf "%s\n" "$gl_cv_openssl_gpl_compat" >&6; }
35309    fi
35310    if test "x$with_openssl" != xauto-gpl-compat ||
35311       test "x$gl_cv_openssl_gpl_compat" = xyes; then
35312      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MD5 in -lcrypto" >&5
35313printf %s "checking for MD5 in -lcrypto... " >&6; }
35314if test ${ac_cv_lib_crypto_MD5+y}
35315then :
35316  printf %s "(cached) " >&6
35317else $as_nop
35318  ac_check_lib_save_LIBS=$LIBS
35319LIBS="-lcrypto  $LIBS"
35320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35321/* end confdefs.h.  */
35322
35323/* Override any GCC internal prototype to avoid an error.
35324   Use char because int might match the return type of a GCC
35325   builtin and then its argument prototype would still apply.  */
35326char MD5 ();
35327int
35328main (void)
35329{
35330return MD5 ();
35331  ;
35332  return 0;
35333}
35334_ACEOF
35335if ac_fn_c_try_link "$LINENO"
35336then :
35337  ac_cv_lib_crypto_MD5=yes
35338else $as_nop
35339  ac_cv_lib_crypto_MD5=no
35340fi
35341rm -f core conftest.err conftest.$ac_objext conftest.beam \
35342    conftest$ac_exeext conftest.$ac_ext
35343LIBS=$ac_check_lib_save_LIBS
35344fi
35345{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_MD5" >&5
35346printf "%s\n" "$ac_cv_lib_crypto_MD5" >&6; }
35347if test "x$ac_cv_lib_crypto_MD5" = xyes
35348then :
35349         for ac_header in openssl/md5.h
35350do :
35351  ac_fn_c_check_header_compile "$LINENO" "openssl/md5.h" "ac_cv_header_openssl_md5_h" "$ac_includes_default"
35352if test "x$ac_cv_header_openssl_md5_h" = xyes
35353then :
35354  printf "%s\n" "#define HAVE_OPENSSL_MD5_H 1" >>confdefs.h
35355 LIB_CRYPTO=-lcrypto
35356
35357printf "%s\n" "#define HAVE_OPENSSL_MD5 1" >>confdefs.h
35358
35359fi
35360
35361done
35362fi
35363
35364    fi
35365    if test "x$LIB_CRYPTO" = x; then
35366      if test "x$with_openssl" = xyes; then
35367        as_fn_error $? "openssl development library not found for MD5" "$LINENO" 5
35368      elif test "x$with_openssl" = xoptional; then
35369        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: openssl development library not found for MD5" >&5
35370printf "%s\n" "$as_me: WARNING: openssl development library not found for MD5" >&2;}
35371      fi
35372    fi
35373  fi
35374
35375
35376
35377printf "%s\n" "#define GL_COMPILE_CRYPTO_STREAM 1" >>confdefs.h
35378
35379
35380
35381
35382
35383
35384
35385
35386
35387
35388
35389# Check whether --with-openssl was given.
35390if test ${with_openssl+y}
35391then :
35392  withval=$with_openssl;
35393else $as_nop
35394  with_openssl=$with_openssl_default
35395fi
35396
35397
35398
35399  if test "x$with_openssl" != xno; then
35400    if test "x$with_openssl" = xauto-gpl-compat; then
35401      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether openssl is GPL compatible" >&5
35402printf %s "checking whether openssl is GPL compatible... " >&6; }
35403if test ${gl_cv_openssl_gpl_compat+y}
35404then :
35405  printf %s "(cached) " >&6
35406else $as_nop
35407  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35408/* end confdefs.h.  */
35409
35410                #include <openssl/opensslv.h>
35411                #if OPENSSL_VERSION_MAJOR < 3
35412                  #error "openssl >= version 3 not found"
35413                #endif
35414
35415int
35416main (void)
35417{
35418
35419  ;
35420  return 0;
35421}
35422_ACEOF
35423if ac_fn_c_try_compile "$LINENO"
35424then :
35425  gl_cv_openssl_gpl_compat=yes
35426else $as_nop
35427  gl_cv_openssl_gpl_compat=no
35428fi
35429rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
35430fi
35431{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_openssl_gpl_compat" >&5
35432printf "%s\n" "$gl_cv_openssl_gpl_compat" >&6; }
35433    fi
35434    if test "x$with_openssl" != xauto-gpl-compat ||
35435       test "x$gl_cv_openssl_gpl_compat" = xyes; then
35436      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SHA1 in -lcrypto" >&5
35437printf %s "checking for SHA1 in -lcrypto... " >&6; }
35438if test ${ac_cv_lib_crypto_SHA1+y}
35439then :
35440  printf %s "(cached) " >&6
35441else $as_nop
35442  ac_check_lib_save_LIBS=$LIBS
35443LIBS="-lcrypto  $LIBS"
35444cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35445/* end confdefs.h.  */
35446
35447/* Override any GCC internal prototype to avoid an error.
35448   Use char because int might match the return type of a GCC
35449   builtin and then its argument prototype would still apply.  */
35450char SHA1 ();
35451int
35452main (void)
35453{
35454return SHA1 ();
35455  ;
35456  return 0;
35457}
35458_ACEOF
35459if ac_fn_c_try_link "$LINENO"
35460then :
35461  ac_cv_lib_crypto_SHA1=yes
35462else $as_nop
35463  ac_cv_lib_crypto_SHA1=no
35464fi
35465rm -f core conftest.err conftest.$ac_objext conftest.beam \
35466    conftest$ac_exeext conftest.$ac_ext
35467LIBS=$ac_check_lib_save_LIBS
35468fi
35469{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA1" >&5
35470printf "%s\n" "$ac_cv_lib_crypto_SHA1" >&6; }
35471if test "x$ac_cv_lib_crypto_SHA1" = xyes
35472then :
35473         for ac_header in openssl/sha.h
35474do :
35475  ac_fn_c_check_header_compile "$LINENO" "openssl/sha.h" "ac_cv_header_openssl_sha_h" "$ac_includes_default"
35476if test "x$ac_cv_header_openssl_sha_h" = xyes
35477then :
35478  printf "%s\n" "#define HAVE_OPENSSL_SHA_H 1" >>confdefs.h
35479 LIB_CRYPTO=-lcrypto
35480
35481printf "%s\n" "#define HAVE_OPENSSL_SHA1 1" >>confdefs.h
35482
35483fi
35484
35485done
35486fi
35487
35488    fi
35489    if test "x$LIB_CRYPTO" = x; then
35490      if test "x$with_openssl" = xyes; then
35491        as_fn_error $? "openssl development library not found for SHA1" "$LINENO" 5
35492      elif test "x$with_openssl" = xoptional; then
35493        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: openssl development library not found for SHA1" >&5
35494printf "%s\n" "$as_me: WARNING: openssl development library not found for SHA1" >&2;}
35495      fi
35496    fi
35497  fi
35498
35499
35500
35501printf "%s\n" "#define GL_COMPILE_CRYPTO_STREAM 1" >>confdefs.h
35502
35503
35504
35505
35506
35507
35508
35509
35510
35511
35512
35513# Check whether --with-openssl was given.
35514if test ${with_openssl+y}
35515then :
35516  withval=$with_openssl;
35517else $as_nop
35518  with_openssl=$with_openssl_default
35519fi
35520
35521
35522
35523  if test "x$with_openssl" != xno; then
35524    if test "x$with_openssl" = xauto-gpl-compat; then
35525      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether openssl is GPL compatible" >&5
35526printf %s "checking whether openssl is GPL compatible... " >&6; }
35527if test ${gl_cv_openssl_gpl_compat+y}
35528then :
35529  printf %s "(cached) " >&6
35530else $as_nop
35531  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35532/* end confdefs.h.  */
35533
35534                #include <openssl/opensslv.h>
35535                #if OPENSSL_VERSION_MAJOR < 3
35536                  #error "openssl >= version 3 not found"
35537                #endif
35538
35539int
35540main (void)
35541{
35542
35543  ;
35544  return 0;
35545}
35546_ACEOF
35547if ac_fn_c_try_compile "$LINENO"
35548then :
35549  gl_cv_openssl_gpl_compat=yes
35550else $as_nop
35551  gl_cv_openssl_gpl_compat=no
35552fi
35553rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
35554fi
35555{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_openssl_gpl_compat" >&5
35556printf "%s\n" "$gl_cv_openssl_gpl_compat" >&6; }
35557    fi
35558    if test "x$with_openssl" != xauto-gpl-compat ||
35559       test "x$gl_cv_openssl_gpl_compat" = xyes; then
35560      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SHA256 in -lcrypto" >&5
35561printf %s "checking for SHA256 in -lcrypto... " >&6; }
35562if test ${ac_cv_lib_crypto_SHA256+y}
35563then :
35564  printf %s "(cached) " >&6
35565else $as_nop
35566  ac_check_lib_save_LIBS=$LIBS
35567LIBS="-lcrypto  $LIBS"
35568cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35569/* end confdefs.h.  */
35570
35571/* Override any GCC internal prototype to avoid an error.
35572   Use char because int might match the return type of a GCC
35573   builtin and then its argument prototype would still apply.  */
35574char SHA256 ();
35575int
35576main (void)
35577{
35578return SHA256 ();
35579  ;
35580  return 0;
35581}
35582_ACEOF
35583if ac_fn_c_try_link "$LINENO"
35584then :
35585  ac_cv_lib_crypto_SHA256=yes
35586else $as_nop
35587  ac_cv_lib_crypto_SHA256=no
35588fi
35589rm -f core conftest.err conftest.$ac_objext conftest.beam \
35590    conftest$ac_exeext conftest.$ac_ext
35591LIBS=$ac_check_lib_save_LIBS
35592fi
35593{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA256" >&5
35594printf "%s\n" "$ac_cv_lib_crypto_SHA256" >&6; }
35595if test "x$ac_cv_lib_crypto_SHA256" = xyes
35596then :
35597         for ac_header in openssl/sha.h
35598do :
35599  ac_fn_c_check_header_compile "$LINENO" "openssl/sha.h" "ac_cv_header_openssl_sha_h" "$ac_includes_default"
35600if test "x$ac_cv_header_openssl_sha_h" = xyes
35601then :
35602  printf "%s\n" "#define HAVE_OPENSSL_SHA_H 1" >>confdefs.h
35603 LIB_CRYPTO=-lcrypto
35604
35605printf "%s\n" "#define HAVE_OPENSSL_SHA256 1" >>confdefs.h
35606
35607fi
35608
35609done
35610fi
35611
35612    fi
35613    if test "x$LIB_CRYPTO" = x; then
35614      if test "x$with_openssl" = xyes; then
35615        as_fn_error $? "openssl development library not found for SHA256" "$LINENO" 5
35616      elif test "x$with_openssl" = xoptional; then
35617        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: openssl development library not found for SHA256" >&5
35618printf "%s\n" "$as_me: WARNING: openssl development library not found for SHA256" >&2;}
35619      fi
35620    fi
35621  fi
35622
35623
35624
35625printf "%s\n" "#define GL_COMPILE_CRYPTO_STREAM 1" >>confdefs.h
35626
35627
35628
35629
35630
35631
35632
35633
35634
35635
35636
35637# Check whether --with-openssl was given.
35638if test ${with_openssl+y}
35639then :
35640  withval=$with_openssl;
35641else $as_nop
35642  with_openssl=$with_openssl_default
35643fi
35644
35645
35646
35647  if test "x$with_openssl" != xno; then
35648    if test "x$with_openssl" = xauto-gpl-compat; then
35649      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether openssl is GPL compatible" >&5
35650printf %s "checking whether openssl is GPL compatible... " >&6; }
35651if test ${gl_cv_openssl_gpl_compat+y}
35652then :
35653  printf %s "(cached) " >&6
35654else $as_nop
35655  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35656/* end confdefs.h.  */
35657
35658                #include <openssl/opensslv.h>
35659                #if OPENSSL_VERSION_MAJOR < 3
35660                  #error "openssl >= version 3 not found"
35661                #endif
35662
35663int
35664main (void)
35665{
35666
35667  ;
35668  return 0;
35669}
35670_ACEOF
35671if ac_fn_c_try_compile "$LINENO"
35672then :
35673  gl_cv_openssl_gpl_compat=yes
35674else $as_nop
35675  gl_cv_openssl_gpl_compat=no
35676fi
35677rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
35678fi
35679{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_openssl_gpl_compat" >&5
35680printf "%s\n" "$gl_cv_openssl_gpl_compat" >&6; }
35681    fi
35682    if test "x$with_openssl" != xauto-gpl-compat ||
35683       test "x$gl_cv_openssl_gpl_compat" = xyes; then
35684      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SHA512 in -lcrypto" >&5
35685printf %s "checking for SHA512 in -lcrypto... " >&6; }
35686if test ${ac_cv_lib_crypto_SHA512+y}
35687then :
35688  printf %s "(cached) " >&6
35689else $as_nop
35690  ac_check_lib_save_LIBS=$LIBS
35691LIBS="-lcrypto  $LIBS"
35692cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35693/* end confdefs.h.  */
35694
35695/* Override any GCC internal prototype to avoid an error.
35696   Use char because int might match the return type of a GCC
35697   builtin and then its argument prototype would still apply.  */
35698char SHA512 ();
35699int
35700main (void)
35701{
35702return SHA512 ();
35703  ;
35704  return 0;
35705}
35706_ACEOF
35707if ac_fn_c_try_link "$LINENO"
35708then :
35709  ac_cv_lib_crypto_SHA512=yes
35710else $as_nop
35711  ac_cv_lib_crypto_SHA512=no
35712fi
35713rm -f core conftest.err conftest.$ac_objext conftest.beam \
35714    conftest$ac_exeext conftest.$ac_ext
35715LIBS=$ac_check_lib_save_LIBS
35716fi
35717{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA512" >&5
35718printf "%s\n" "$ac_cv_lib_crypto_SHA512" >&6; }
35719if test "x$ac_cv_lib_crypto_SHA512" = xyes
35720then :
35721         for ac_header in openssl/sha.h
35722do :
35723  ac_fn_c_check_header_compile "$LINENO" "openssl/sha.h" "ac_cv_header_openssl_sha_h" "$ac_includes_default"
35724if test "x$ac_cv_header_openssl_sha_h" = xyes
35725then :
35726  printf "%s\n" "#define HAVE_OPENSSL_SHA_H 1" >>confdefs.h
35727 LIB_CRYPTO=-lcrypto
35728
35729printf "%s\n" "#define HAVE_OPENSSL_SHA512 1" >>confdefs.h
35730
35731fi
35732
35733done
35734fi
35735
35736    fi
35737    if test "x$LIB_CRYPTO" = x; then
35738      if test "x$with_openssl" = xyes; then
35739        as_fn_error $? "openssl development library not found for SHA512" "$LINENO" 5
35740      elif test "x$with_openssl" = xoptional; then
35741        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: openssl development library not found for SHA512" >&5
35742printf "%s\n" "$as_me: WARNING: openssl development library not found for SHA512" >&2;}
35743      fi
35744    fi
35745  fi
35746
35747
35748
35749
35750
35751
35752
35753
35754      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
35755printf %s "checking for d_ino member in directory struct... " >&6; }
35756if test ${gl_cv_struct_dirent_d_ino+y}
35757then :
35758  printf %s "(cached) " >&6
35759else $as_nop
35760  if test "$cross_compiling" = yes
35761then :
35762  case "$host_os" in
35763                            # Guess yes on glibc systems with Linux kernel.
35764              linux*-gnu*)  gl_cv_struct_dirent_d_ino="guessing yes" ;;
35765                            # Guess yes on musl systems with Linux kernel.
35766              linux*-musl*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
35767                            # Guess no on native Windows.
35768              mingw*)       gl_cv_struct_dirent_d_ino="guessing no" ;;
35769                            # If we don't know, obey --enable-cross-guesses.
35770              *)            gl_cv_struct_dirent_d_ino="$gl_cross_guess_normal" ;;
35771            esac
35772
35773else $as_nop
35774  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35775/* end confdefs.h.  */
35776#include <sys/types.h>
35777             #include <sys/stat.h>
35778             #include <dirent.h>
35779
35780int
35781main (void)
35782{
35783DIR *dp = opendir (".");
35784             struct dirent *e;
35785             struct stat st;
35786             if (! dp)
35787               return 1;
35788             e = readdir (dp);
35789             if (! e)
35790               { closedir (dp); return 2; }
35791             if (lstat (e->d_name, &st) != 0)
35792               { closedir (dp); return 3; }
35793             if (e->d_ino != st.st_ino)
35794               { closedir (dp); return 4; }
35795             closedir (dp);
35796             return 0;
35797
35798  ;
35799  return 0;
35800}
35801_ACEOF
35802if ac_fn_c_try_run "$LINENO"
35803then :
35804  gl_cv_struct_dirent_d_ino=yes
35805else $as_nop
35806  gl_cv_struct_dirent_d_ino=no
35807fi
35808rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35809  conftest.$ac_objext conftest.beam conftest.$ac_ext
35810fi
35811
35812fi
35813{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
35814printf "%s\n" "$gl_cv_struct_dirent_d_ino" >&6; }
35815   case "$gl_cv_struct_dirent_d_ino" in
35816     *yes)
35817
35818printf "%s\n" "#define D_INO_IN_DIRENT 1" >>confdefs.h
35819
35820       ;;
35821   esac
35822
35823
35824
35825
35826
35827
35828
35829
35830
35831
35832
35833
35834
35835  ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
35836if test "x$ac_cv_func_dirfd" = xyes
35837then :
35838  printf "%s\n" "#define HAVE_DIRFD 1" >>confdefs.h
35839
35840fi
35841
35842  ac_fn_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
35843      #include <dirent.h>
35844" "$ac_c_undeclared_builtin_options" "CFLAGS"
35845if test "x$ac_cv_have_decl_dirfd" = xyes
35846then :
35847  ac_have_decl=1
35848else $as_nop
35849  ac_have_decl=0
35850fi
35851printf "%s\n" "#define HAVE_DECL_DIRFD $ac_have_decl" >>confdefs.h
35852
35853  if test $ac_cv_have_decl_dirfd = no; then
35854    HAVE_DECL_DIRFD=0
35855  fi
35856
35857  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
35858printf %s "checking whether dirfd is a macro... " >&6; }
35859if test ${gl_cv_func_dirfd_macro+y}
35860then :
35861  printf %s "(cached) " >&6
35862else $as_nop
35863  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35864/* end confdefs.h.  */
35865
35866#include <sys/types.h>
35867#include <dirent.h>
35868#ifdef dirfd
35869 dirent_header_defines_dirfd
35870#endif
35871_ACEOF
35872if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
35873  $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1
35874then :
35875  gl_cv_func_dirfd_macro=yes
35876else $as_nop
35877  gl_cv_func_dirfd_macro=no
35878fi
35879rm -rf conftest*
35880
35881fi
35882{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
35883printf "%s\n" "$gl_cv_func_dirfd_macro" >&6; }
35884
35885  # Use the replacement if we have no function or macro with that name,
35886  # or if OS/2 kLIBC whose dirfd() does not work.
35887  # Replace only if the system declares dirfd already.
35888  case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
35889    no,no,*,yes | *,*,os2*,yes)
35890      REPLACE_DIRFD=1
35891
35892printf "%s\n" "#define REPLACE_DIRFD 1" >>confdefs.h
35893;;
35894  esac
35895
35896  if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
35897     || test $REPLACE_DIRFD = 1; then
35898
35899
35900
35901
35902
35903
35904
35905
35906  gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
35907
35908
35909  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
35910printf %s "checking how to get the file descriptor associated with an open DIR*... " >&6; }
35911if test ${gl_cv_sys_dir_fd_member_name+y}
35912then :
35913  printf %s "(cached) " >&6
35914else $as_nop
35915
35916      dirfd_save_CFLAGS=$CFLAGS
35917      for ac_expr in d_fd dd_fd; do
35918
35919        CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
35920        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35921/* end confdefs.h.  */
35922
35923           #include <sys/types.h>
35924           #include <dirent.h>
35925int
35926main (void)
35927{
35928DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
35929  ;
35930  return 0;
35931}
35932_ACEOF
35933if ac_fn_c_try_compile "$LINENO"
35934then :
35935  dir_fd_found=yes
35936
35937fi
35938rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
35939        CFLAGS=$dirfd_save_CFLAGS
35940        test "$dir_fd_found" = yes && break
35941      done
35942      test "$dir_fd_found" = yes || ac_expr=no_such_member
35943
35944      gl_cv_sys_dir_fd_member_name=$ac_expr
35945
35946
35947fi
35948{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
35949printf "%s\n" "$gl_cv_sys_dir_fd_member_name" >&6; }
35950  if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
35951
35952printf "%s\n" "#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name" >>confdefs.h
35953
35954  fi
35955
35956
35957  fi
35958
35959
35960
35961
35962
35963
35964
35965
35966
35967          GL_GNULIB_DIRFD=1
35968
35969
35970
35971
35972
35973printf "%s\n" "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
35974
35975
35976
35977
35978
35979printf "%s\n" "#define GNULIB_DIRNAME 1" >>confdefs.h
35980
35981
35982
35983
35984  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
35985printf %s "checking whether // is distinct from /... " >&6; }
35986if test ${gl_cv_double_slash_root+y}
35987then :
35988  printf %s "(cached) " >&6
35989else $as_nop
35990   if test x"$cross_compiling" = xyes ; then
35991        # When cross-compiling, there is no way to tell whether // is special
35992        # short of a list of hosts.  However, the only known hosts to date
35993        # that have a distinct // are Apollo DomainOS (too old to port to),
35994        # Cygwin, and z/OS.  If anyone knows of another system for which // has
35995        # special semantics and is distinct from /, please report it to
35996        # <bug-gnulib@gnu.org>.
35997        case $host in
35998          *-cygwin | i370-ibm-openedition)
35999            gl_cv_double_slash_root=yes ;;
36000          *)
36001            # Be optimistic and assume that / and // are the same when we
36002            # don't know.
36003            gl_cv_double_slash_root='unknown, assuming no' ;;
36004        esac
36005      else
36006        set x `ls -di / // 2>/dev/null`
36007        if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
36008          gl_cv_double_slash_root=no
36009        else
36010          gl_cv_double_slash_root=yes
36011        fi
36012      fi
36013fi
36014{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
36015printf "%s\n" "$gl_cv_double_slash_root" >&6; }
36016  if test "$gl_cv_double_slash_root" = yes; then
36017
36018printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
36019
36020  fi
36021
36022
36023
36024
36025
36026    if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
36027      REPLACE_DUP=1
36028    fi
36029
36030
36031
36032
36033
36034  if test $ac_cv_func_fchdir = no; then
36035    HAVE_FCHDIR=0
36036  fi
36037
36038    if test $HAVE_FCHDIR = 0; then
36039      REPLACE_DUP=1
36040    fi
36041
36042  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
36043printf %s "checking whether dup works... " >&6; }
36044if test ${gl_cv_func_dup_works+y}
36045then :
36046  printf %s "(cached) " >&6
36047else $as_nop
36048  if test "$cross_compiling" = yes
36049then :
36050  case "$host_os" in
36051                 # Guess no on native Windows.
36052         mingw*) gl_cv_func_dup_works="guessing no" ;;
36053         *)      gl_cv_func_dup_works="guessing yes" ;;
36054       esac
36055
36056else $as_nop
36057  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36058/* end confdefs.h.  */
36059#include <unistd.h>
36060                         #include <fcntl.h>
36061                         #include <errno.h>
36062
36063
36064$gl_mda_defines
36065
36066int
36067main (void)
36068{
36069/* On OS/2 kLIBC, dup does not work on a directory fd.  */
36070           int fd = open (".", O_RDONLY);
36071           return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
36072
36073  ;
36074  return 0;
36075}
36076
36077_ACEOF
36078if ac_fn_c_try_run "$LINENO"
36079then :
36080  gl_cv_func_dup_works=yes
36081else $as_nop
36082  gl_cv_func_dup_works=no
36083fi
36084rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36085  conftest.$ac_objext conftest.beam conftest.$ac_ext
36086fi
36087
36088
36089fi
36090{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
36091printf "%s\n" "$gl_cv_func_dup_works" >&6; }
36092  case "$gl_cv_func_dup_works" in
36093    *yes) ;;
36094    *)
36095      REPLACE_DUP=1
36096      ;;
36097  esac
36098
36099  if test $REPLACE_DUP = 1; then
36100
36101
36102
36103
36104
36105
36106
36107
36108  gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
36109
36110    :
36111  fi
36112
36113
36114
36115
36116
36117
36118
36119
36120
36121          GL_GNULIB_DUP=1
36122
36123
36124
36125
36126
36127printf "%s\n" "#define GNULIB_TEST_DUP 1" >>confdefs.h
36128
36129
36130
36131
36132
36133
36134  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
36135printf %s "checking whether dup2 works... " >&6; }
36136if test ${gl_cv_func_dup2_works+y}
36137then :
36138  printf %s "(cached) " >&6
36139else $as_nop
36140  if test "$cross_compiling" = yes
36141then :
36142  case "$host_os" in
36143         mingw*) # on this platform, dup2 always returns 0 for success
36144           gl_cv_func_dup2_works="guessing no" ;;
36145         cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
36146           gl_cv_func_dup2_works="guessing no" ;;
36147         aix* | freebsd*)
36148                 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
36149                 # not EBADF.
36150           gl_cv_func_dup2_works="guessing no" ;;
36151         haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
36152           gl_cv_func_dup2_works="guessing no" ;;
36153         *-android*) # implemented using dup3(), which fails if oldfd == newfd
36154           gl_cv_func_dup2_works="guessing no" ;;
36155         os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
36156           gl_cv_func_dup2_works="guessing no" ;;
36157         *) gl_cv_func_dup2_works="guessing yes" ;;
36158       esac
36159else $as_nop
36160  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36161/* end confdefs.h.  */
36162
36163       #include <errno.h>
36164           #include <fcntl.h>
36165           #include <limits.h>
36166           #include <sys/resource.h>
36167           #include <unistd.h>
36168
36169
36170$gl_mda_defines
36171
36172           #ifndef RLIM_SAVED_CUR
36173           # define RLIM_SAVED_CUR RLIM_INFINITY
36174           #endif
36175           #ifndef RLIM_SAVED_MAX
36176           # define RLIM_SAVED_MAX RLIM_INFINITY
36177           #endif
36178
36179int
36180main (void)
36181{
36182int result = 0;
36183           int bad_fd = INT_MAX;
36184           struct rlimit rlim;
36185           if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
36186               && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
36187               && rlim.rlim_cur != RLIM_INFINITY
36188               && rlim.rlim_cur != RLIM_SAVED_MAX
36189               && rlim.rlim_cur != RLIM_SAVED_CUR)
36190             bad_fd = rlim.rlim_cur;
36191           #ifdef FD_CLOEXEC
36192             if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
36193               result |= 1;
36194           #endif
36195           if (dup2 (1, 1) != 1)
36196             result |= 2;
36197           #ifdef FD_CLOEXEC
36198             if (fcntl (1, F_GETFD) != FD_CLOEXEC)
36199               result |= 4;
36200           #endif
36201           close (0);
36202           if (dup2 (0, 0) != -1)
36203             result |= 8;
36204           /* Many gnulib modules require POSIX conformance of EBADF.  */
36205           if (dup2 (2, bad_fd) == -1 && errno != EBADF)
36206             result |= 16;
36207           /* Flush out some cygwin core dumps.  */
36208           if (dup2 (2, -1) != -1 || errno != EBADF)
36209             result |= 32;
36210           dup2 (2, 255);
36211           dup2 (2, 256);
36212           /* On OS/2 kLIBC, dup2() does not work on a directory fd.  */
36213           {
36214             int fd = open (".", O_RDONLY);
36215             if (fd == -1)
36216               result |= 64;
36217             else if (dup2 (fd, fd + 1) == -1)
36218               result |= 128;
36219             close (fd);
36220           }
36221           return result;
36222  ;
36223  return 0;
36224}
36225
36226_ACEOF
36227if ac_fn_c_try_run "$LINENO"
36228then :
36229  gl_cv_func_dup2_works=yes
36230else $as_nop
36231  gl_cv_func_dup2_works=no
36232fi
36233rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36234  conftest.$ac_objext conftest.beam conftest.$ac_ext
36235fi
36236
36237
36238fi
36239{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
36240printf "%s\n" "$gl_cv_func_dup2_works" >&6; }
36241  case "$gl_cv_func_dup2_works" in
36242    *yes) ;;
36243    *)
36244      REPLACE_DUP2=1
36245      ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
36246if test "x$ac_cv_func_setdtablesize" = xyes
36247then :
36248  printf "%s\n" "#define HAVE_SETDTABLESIZE 1" >>confdefs.h
36249
36250fi
36251
36252      ;;
36253  esac
36254
36255
36256
36257
36258  if test $ac_cv_func_fchdir = no; then
36259    HAVE_FCHDIR=0
36260  fi
36261
36262    if test $HAVE_FCHDIR = 0; then
36263      REPLACE_DUP2=1
36264    fi
36265
36266
36267  if test $REPLACE_DUP2 = 1; then
36268
36269
36270
36271
36272
36273
36274
36275
36276  gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
36277
36278
36279  fi
36280
36281
36282
36283
36284
36285
36286
36287
36288
36289          GL_GNULIB_DUP2=1
36290
36291
36292
36293
36294
36295printf "%s\n" "#define GNULIB_TEST_DUP2 1" >>confdefs.h
36296
36297
36298
36299
36300
36301
36302
36303
36304
36305
36306
36307
36308
36309
36310          GL_GNULIB_ENVIRON=1
36311
36312
36313
36314
36315
36316printf "%s\n" "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
36317
36318
36319
36320
36321
36322      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
36323printf %s "checking for error_at_line... " >&6; }
36324if test ${ac_cv_lib_error_at_line+y}
36325then :
36326  printf %s "(cached) " >&6
36327else $as_nop
36328  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36329/* end confdefs.h.  */
36330#include <error.h>
36331int
36332main (void)
36333{
36334error_at_line (0, 0, "", 0, "an error occurred");
36335  ;
36336  return 0;
36337}
36338_ACEOF
36339if ac_fn_c_try_link "$LINENO"
36340then :
36341  ac_cv_lib_error_at_line=yes
36342else $as_nop
36343  ac_cv_lib_error_at_line=no
36344fi
36345rm -f core conftest.err conftest.$ac_objext conftest.beam \
36346    conftest$ac_exeext conftest.$ac_ext
36347fi
36348{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
36349printf "%s\n" "$ac_cv_lib_error_at_line" >&6; }
36350
36351  if test $ac_cv_lib_error_at_line = no; then
36352
36353
36354
36355
36356
36357
36358
36359
36360  gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
36361
36362
36363
36364  :
36365
36366  fi
36367
36368
36369  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
36370
36371
36372
36373  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
36374
36375
36376
36377
36378
36379  :
36380
36381
36382
36383
36384
36385
36386  if test $ac_cv_have_decl_fchdir = no; then
36387    HAVE_DECL_FCHDIR=0
36388  fi
36389
36390
36391  if test $HAVE_FCHDIR = 0; then
36392
36393
36394
36395
36396
36397
36398
36399
36400  gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
36401
36402    :
36403
36404printf "%s\n" "#define REPLACE_FCHDIR 1" >>confdefs.h
36405
36406                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
36407printf %s "checking whether open can visit directories... " >&6; }
36408if test ${gl_cv_func_open_directory_works+y}
36409then :
36410  printf %s "(cached) " >&6
36411else $as_nop
36412  if test "$cross_compiling" = yes
36413then :
36414  case "$host_os" in
36415                             # Guess yes on Linux systems.
36416            linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;;
36417                             # Guess yes on glibc systems.
36418            *-gnu* | gnu*)   gl_cv_func_open_directory_works="guessing yes" ;;
36419                             # Guess no on native Windows.
36420            mingw*)          gl_cv_func_open_directory_works="guessing no" ;;
36421                             # If we don't know, obey --enable-cross-guesses.
36422            *)               gl_cv_func_open_directory_works="$gl_cross_guess_normal" ;;
36423          esac
36424
36425else $as_nop
36426  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36427/* end confdefs.h.  */
36428#include <fcntl.h>
36429
36430
36431$gl_mda_defines
36432
36433int
36434main (void)
36435{
36436return open(".", O_RDONLY) < 0;
36437  ;
36438  return 0;
36439}
36440_ACEOF
36441if ac_fn_c_try_run "$LINENO"
36442then :
36443  gl_cv_func_open_directory_works=yes
36444else $as_nop
36445  gl_cv_func_open_directory_works=no
36446fi
36447rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36448  conftest.$ac_objext conftest.beam conftest.$ac_ext
36449fi
36450
36451fi
36452{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
36453printf "%s\n" "$gl_cv_func_open_directory_works" >&6; }
36454    case "$gl_cv_func_open_directory_works" in
36455      *yes) ;;
36456      *)
36457
36458printf "%s\n" "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
36459
36460        ;;
36461    esac
36462  fi
36463
36464
36465
36466
36467
36468
36469
36470
36471
36472
36473          GL_GNULIB_FCHDIR=1
36474
36475
36476
36477
36478
36479printf "%s\n" "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
36480
36481
36482
36483
36484
36485
36486
36487
36488  if test $ac_cv_func_fcntl = no; then
36489
36490
36491
36492  if test $ac_cv_func_fcntl = no; then
36493    HAVE_FCNTL=0
36494  else
36495    REPLACE_FCNTL=1
36496  fi
36497
36498  else
36499            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
36500printf %s "checking whether fcntl handles F_DUPFD correctly... " >&6; }
36501if test ${gl_cv_func_fcntl_f_dupfd_works+y}
36502then :
36503  printf %s "(cached) " >&6
36504else $as_nop
36505  if test "$cross_compiling" = yes
36506then :
36507  case $host_os in
36508            aix* | cygwin* | haiku*)
36509               gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
36510            *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
36511          esac
36512else $as_nop
36513  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36514/* end confdefs.h.  */
36515#include <errno.h>
36516              #include <fcntl.h>
36517              #include <limits.h>
36518              #include <sys/resource.h>
36519              #include <unistd.h>
36520
36521
36522$gl_mda_defines
36523
36524              #ifndef RLIM_SAVED_CUR
36525              # define RLIM_SAVED_CUR RLIM_INFINITY
36526              #endif
36527              #ifndef RLIM_SAVED_MAX
36528              # define RLIM_SAVED_MAX RLIM_INFINITY
36529              #endif
36530
36531int
36532main (void)
36533{
36534int result = 0;
36535              int bad_fd = INT_MAX;
36536              struct rlimit rlim;
36537              if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
36538                  && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
36539                  && rlim.rlim_cur != RLIM_INFINITY
36540                  && rlim.rlim_cur != RLIM_SAVED_MAX
36541                  && rlim.rlim_cur != RLIM_SAVED_CUR)
36542                bad_fd = rlim.rlim_cur;
36543              if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
36544              if (errno != EINVAL) result |= 2;
36545              if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
36546              if (errno != EINVAL) result |= 8;
36547              /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
36548              {
36549                int fd;
36550                fd = open (".", O_RDONLY);
36551                if (fd == -1)
36552                  result |= 16;
36553                else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
36554                  result |= 32;
36555
36556                close (fd);
36557              }
36558              return result;
36559  ;
36560  return 0;
36561}
36562_ACEOF
36563if ac_fn_c_try_run "$LINENO"
36564then :
36565  gl_cv_func_fcntl_f_dupfd_works=yes
36566else $as_nop
36567  gl_cv_func_fcntl_f_dupfd_works=no
36568fi
36569rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36570  conftest.$ac_objext conftest.beam conftest.$ac_ext
36571fi
36572
36573fi
36574{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
36575printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
36576    case $gl_cv_func_fcntl_f_dupfd_works in
36577      *yes) ;;
36578      *)
36579
36580
36581  if test $ac_cv_func_fcntl = no; then
36582    HAVE_FCNTL=0
36583  else
36584    REPLACE_FCNTL=1
36585  fi
36586
36587
36588printf "%s\n" "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
36589 ;;
36590    esac
36591
36592            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
36593printf %s "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
36594if test ${gl_cv_func_fcntl_f_dupfd_cloexec+y}
36595then :
36596  printf %s "(cached) " >&6
36597else $as_nop
36598  if test "$cross_compiling" = yes
36599then :
36600  case "$host_os" in
36601                     # Guess no on NetBSD.
36602            netbsd*) gl_cv_func_fcntl_f_dupfd_cloexec="guessing no" ;;
36603            *)       gl_cv_func_fcntl_f_dupfd_cloexec="$gl_cross_guess_normal" ;;
36604          esac
36605
36606else $as_nop
36607  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36608/* end confdefs.h.  */
36609#include <fcntl.h>
36610              #include <unistd.h>
36611              int main (int argc, char *argv[])
36612              {
36613                if (argc == 1)
36614                  /* parent process */
36615                  {
36616                    if (fcntl (1, F_DUPFD_CLOEXEC, 10) < 0)
36617                      return 1;
36618                    return execl ("./conftest", "./conftest", "child", NULL);
36619                  }
36620                else
36621                  /* child process */
36622                  return (fcntl (10, F_GETFL) < 0 ? 0 : 42);
36623              }
36624
36625
36626_ACEOF
36627if ac_fn_c_try_run "$LINENO"
36628then :
36629  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36630/* end confdefs.h.  */
36631
36632#ifdef __linux__
36633/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
36634   it to support the semantics on older kernels that failed with EINVAL.  */
36635choke me
36636#endif
36637
36638int
36639main (void)
36640{
36641
36642  ;
36643  return 0;
36644}
36645_ACEOF
36646if ac_fn_c_try_compile "$LINENO"
36647then :
36648  gl_cv_func_fcntl_f_dupfd_cloexec=yes
36649else $as_nop
36650  gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
36651fi
36652rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
36653
36654else $as_nop
36655  gl_cv_func_fcntl_f_dupfd_cloexec=no
36656fi
36657rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36658  conftest.$ac_objext conftest.beam conftest.$ac_ext
36659fi
36660
36661
36662fi
36663{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
36664printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
36665    case "$gl_cv_func_fcntl_f_dupfd_cloexec" in
36666      *yes) ;;
36667      *)
36668
36669
36670  if test $ac_cv_func_fcntl = no; then
36671    HAVE_FCNTL=0
36672  else
36673    REPLACE_FCNTL=1
36674  fi
36675
36676                        ;;
36677    esac
36678  fi
36679
36680
36681
36682
36683  if test $ac_cv_func_fchdir = no; then
36684    HAVE_FCHDIR=0
36685  fi
36686
36687    if test $HAVE_FCHDIR = 0; then
36688
36689
36690
36691  if test $ac_cv_func_fcntl = no; then
36692    HAVE_FCNTL=0
36693  else
36694    REPLACE_FCNTL=1
36695  fi
36696
36697    fi
36698
36699
36700  if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
36701
36702
36703
36704
36705
36706
36707
36708
36709  gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
36710
36711  fi
36712
36713
36714
36715
36716
36717
36718
36719
36720
36721          GL_GNULIB_FCNTL=1
36722
36723
36724
36725
36726
36727printf "%s\n" "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
36728
36729
36730
36731
36732
36733
36734
36735
36736
36737
36738
36739printf "%s\n" "#define GNULIB_FD_SAFER_FLAG 1" >>confdefs.h
36740
36741
36742
36743
36744
36745
36746
36747    ac_fn_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
36748#include <dirent.h>
36749
36750" "$ac_c_undeclared_builtin_options" "CFLAGS"
36751if test "x$ac_cv_have_decl_fdopendir" = xyes
36752then :
36753  ac_have_decl=1
36754else $as_nop
36755  ac_have_decl=0
36756fi
36757printf "%s\n" "#define HAVE_DECL_FDOPENDIR $ac_have_decl" >>confdefs.h
36758if test $ac_have_decl = 1
36759then :
36760
36761else $as_nop
36762  HAVE_DECL_FDOPENDIR=0
36763fi
36764
36765
36766  if test $ac_cv_func_fdopendir = no; then
36767    HAVE_FDOPENDIR=0
36768  else
36769    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
36770printf %s "checking whether fdopendir works... " >&6; }
36771if test ${gl_cv_func_fdopendir_works+y}
36772then :
36773  printf %s "(cached) " >&6
36774else $as_nop
36775  if test "$cross_compiling" = yes
36776then :
36777  case "$host_os" in
36778                     # Guess yes on glibc systems.
36779            *-gnu*)  gl_cv_func_fdopendir_works="guessing yes" ;;
36780                     # Guess yes on musl systems.
36781            *-musl*) gl_cv_func_fdopendir_works="guessing yes" ;;
36782                     # If we don't know, obey --enable-cross-guesses.
36783            *)       gl_cv_func_fdopendir_works="$gl_cross_guess_normal" ;;
36784          esac
36785
36786else $as_nop
36787  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36788/* end confdefs.h.  */
36789
36790#include <dirent.h>
36791#include <fcntl.h>
36792#include <unistd.h>
36793
36794
36795$gl_mda_defines
36796
36797#if !HAVE_DECL_FDOPENDIR
36798extern
36799# ifdef __cplusplus
36800"C"
36801# endif
36802DIR *fdopendir (int);
36803#endif
36804
36805int
36806main (void)
36807{
36808int result = 0;
36809              int fd = open ("conftest.c", O_RDONLY);
36810              if (fd < 0) result |= 1;
36811              if (fdopendir (fd)) result |= 2;
36812              if (close (fd)) result |= 4;
36813              return result;
36814
36815  ;
36816  return 0;
36817}
36818_ACEOF
36819if ac_fn_c_try_run "$LINENO"
36820then :
36821  gl_cv_func_fdopendir_works=yes
36822else $as_nop
36823  gl_cv_func_fdopendir_works=no
36824fi
36825rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36826  conftest.$ac_objext conftest.beam conftest.$ac_ext
36827fi
36828
36829fi
36830{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
36831printf "%s\n" "$gl_cv_func_fdopendir_works" >&6; }
36832    case "$gl_cv_func_fdopendir_works" in
36833      *yes) ;;
36834      *)
36835        REPLACE_FDOPENDIR=1
36836        ;;
36837    esac
36838  fi
36839
36840  if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
36841
36842
36843
36844
36845
36846
36847
36848
36849  gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
36850
36851  fi
36852
36853
36854
36855
36856
36857
36858
36859
36860
36861          GL_GNULIB_FDOPENDIR=1
36862
36863
36864
36865
36866
36867printf "%s\n" "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
36868
36869
36870
36871
36872
36873printf "%s\n" "#define GNULIB_FDOPENDIR 1" >>confdefs.h
36874
36875
36876
36877
36878
36879
36880  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
36881printf %s "checking whether fflush works on input streams... " >&6; }
36882if test ${gl_cv_func_fflush_stdin+y}
36883then :
36884  printf %s "(cached) " >&6
36885else $as_nop
36886  echo hello world > conftest.txt
36887     if test "$cross_compiling" = yes
36888then :
36889  case "$host_os" in
36890                  # Guess no on native Windows.
36891          mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
36892          *)      gl_cv_func_fflush_stdin=cross ;;
36893        esac
36894
36895else $as_nop
36896  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36897/* end confdefs.h.  */
36898
36899#include <stdio.h>
36900#if HAVE_UNISTD_H
36901# include <unistd.h>
36902#else /* on Windows with MSVC */
36903# include <io.h>
36904#endif
36905
36906
36907$gl_mda_defines
36908
36909int
36910main (void)
36911{
36912FILE *f = fopen ("conftest.txt", "r");
36913         char buffer[10];
36914         int fd;
36915         int c;
36916         if (f == NULL)
36917           return 1;
36918         fd = fileno (f);
36919         if (fd < 0 || fread (buffer, 1, 5, f) != 5)
36920           { fclose (f); return 2; }
36921         /* For deterministic results, ensure f read a bigger buffer.  */
36922         if (lseek (fd, 0, SEEK_CUR) == 5)
36923           { fclose (f); return 3; }
36924         /* POSIX requires fflush-fseek to set file offset of fd.  This fails
36925            on BSD systems and on mingw.  */
36926         if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
36927           { fclose (f); return 4; }
36928         if (lseek (fd, 0, SEEK_CUR) != 5)
36929           { fclose (f); return 5; }
36930         /* Verify behaviour of fflush after ungetc. See
36931            <https://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
36932         /* Verify behaviour of fflush after a backup ungetc.  This fails on
36933            mingw.  */
36934         c = fgetc (f);
36935         ungetc (c, f);
36936         fflush (f);
36937         if (fgetc (f) != c)
36938           { fclose (f); return 6; }
36939         /* Verify behaviour of fflush after a non-backup ungetc.  This fails
36940            on glibc 2.8 and on BSD systems.  */
36941         c = fgetc (f);
36942         ungetc ('@', f);
36943         fflush (f);
36944         if (fgetc (f) != c)
36945           { fclose (f); return 7; }
36946         fclose (f);
36947         return 0;
36948
36949  ;
36950  return 0;
36951}
36952_ACEOF
36953if ac_fn_c_try_run "$LINENO"
36954then :
36955  gl_cv_func_fflush_stdin=yes
36956else $as_nop
36957  gl_cv_func_fflush_stdin=no
36958fi
36959rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36960  conftest.$ac_objext conftest.beam conftest.$ac_ext
36961fi
36962
36963     rm conftest.txt
36964
36965fi
36966{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
36967printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
36968  case "$gl_cv_func_fflush_stdin" in
36969    *yes) gl_func_fflush_stdin=1 ;;
36970    *no)  gl_func_fflush_stdin=0 ;;
36971    *)    gl_func_fflush_stdin='(-1)' ;;
36972  esac
36973
36974printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
36975
36976
36977  case "$gl_cv_func_fflush_stdin" in
36978    *yes) ;;
36979    *) REPLACE_FFLUSH=1 ;;
36980  esac
36981
36982  if test $REPLACE_FFLUSH = 1; then
36983
36984
36985
36986
36987
36988
36989
36990
36991  gl_LIBOBJS="$gl_LIBOBJS fflush.$ac_objext"
36992
36993    :
36994  fi
36995
36996
36997printf "%s\n" "#define GNULIB_FFLUSH 1" >>confdefs.h
36998
36999
37000
37001
37002
37003
37004
37005
37006
37007
37008
37009          GL_GNULIB_FFLUSH=1
37010
37011
37012
37013
37014
37015printf "%s\n" "#define GNULIB_TEST_FFLUSH 1" >>confdefs.h
37016
37017
37018
37019
37020
37021
37022
37023
37024
37025
37026  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
37027printf %s "checking for flexible array member... " >&6; }
37028if test ${ac_cv_c_flexmember+y}
37029then :
37030  printf %s "(cached) " >&6
37031else $as_nop
37032  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37033/* end confdefs.h.  */
37034#include <stdlib.h>
37035            #include <stdio.h>
37036            #include <stddef.h>
37037            struct m { struct m *next, **list; char name[]; };
37038            struct s { struct s *p; struct m *m; int n; double d[]; };
37039int
37040main (void)
37041{
37042int m = getchar ();
37043            size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
37044            nbytes += sizeof (struct s) - 1;
37045            nbytes -= nbytes % sizeof (struct s);
37046            struct s *p = malloc (nbytes);
37047            p->p = p;
37048            p->m = NULL;
37049            p->d[0] = 0.0;
37050            return p->d != (double *) NULL;
37051  ;
37052  return 0;
37053}
37054_ACEOF
37055if ac_fn_c_try_compile "$LINENO"
37056then :
37057  ac_cv_c_flexmember=yes
37058else $as_nop
37059  ac_cv_c_flexmember=no
37060fi
37061rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
37062fi
37063{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
37064printf "%s\n" "$ac_cv_c_flexmember" >&6; }
37065  if test $ac_cv_c_flexmember = yes; then
37066
37067printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
37068
37069  else
37070    printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
37071
37072  fi
37073
37074
37075
37076
37077  FLOAT_H=
37078  REPLACE_FLOAT_LDBL=0
37079  case "$host_os" in
37080    aix* | beos* | openbsd* | mirbsd* | irix*)
37081      FLOAT_H=float.h
37082      ;;
37083    freebsd* | dragonfly*)
37084      case "$host_cpu" in
37085        i[34567]86 )
37086          FLOAT_H=float.h
37087          ;;
37088        x86_64 )
37089          # On x86_64 systems, the C compiler may still be generating
37090          # 32-bit code.
37091          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37092/* end confdefs.h.  */
37093#if defined __LP64__ || defined __x86_64__ || defined __amd64__
37094                  int ok;
37095                 #else
37096                  error fail
37097                 #endif
37098
37099_ACEOF
37100if ac_fn_c_try_compile "$LINENO"
37101then :
37102
37103else $as_nop
37104  FLOAT_H=float.h
37105fi
37106rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
37107          ;;
37108      esac
37109      ;;
37110    linux*)
37111      case "$host_cpu" in
37112        powerpc*)
37113          FLOAT_H=float.h
37114          ;;
37115      esac
37116      ;;
37117  esac
37118  case "$host_os" in
37119    aix* | freebsd* | dragonfly* | linux*)
37120      if test -n "$FLOAT_H"; then
37121        REPLACE_FLOAT_LDBL=1
37122      fi
37123      ;;
37124  esac
37125
37126    REPLACE_ITOLD=0
37127  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
37128printf %s "checking whether conversion from 'int' to 'long double' works... " >&6; }
37129if test ${gl_cv_func_itold_works+y}
37130then :
37131  printf %s "(cached) " >&6
37132else $as_nop
37133
37134      if test "$cross_compiling" = yes
37135then :
37136  case "$host" in
37137           sparc*-*-linux*)
37138             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37139/* end confdefs.h.  */
37140#if defined __LP64__ || defined __arch64__
37141                    int ok;
37142                   #else
37143                    error fail
37144                   #endif
37145
37146_ACEOF
37147if ac_fn_c_try_compile "$LINENO"
37148then :
37149  gl_cv_func_itold_works="guessing no"
37150else $as_nop
37151  gl_cv_func_itold_works="guessing yes"
37152fi
37153rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
37154             ;;
37155                   # Guess yes on native Windows.
37156           mingw*) gl_cv_func_itold_works="guessing yes" ;;
37157           *)      gl_cv_func_itold_works="guessing yes" ;;
37158         esac
37159
37160else $as_nop
37161  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37162/* end confdefs.h.  */
37163
37164int i = -1;
37165volatile long double ld;
37166int main ()
37167{
37168  ld += i * 1.0L;
37169  if (ld > 0)
37170    return 1;
37171  return 0;
37172}
37173_ACEOF
37174if ac_fn_c_try_run "$LINENO"
37175then :
37176  gl_cv_func_itold_works=yes
37177else $as_nop
37178  gl_cv_func_itold_works=no
37179fi
37180rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37181  conftest.$ac_objext conftest.beam conftest.$ac_ext
37182fi
37183
37184
37185fi
37186{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
37187printf "%s\n" "$gl_cv_func_itold_works" >&6; }
37188  case "$gl_cv_func_itold_works" in
37189    *no)
37190      REPLACE_ITOLD=1
37191                  FLOAT_H=float.h
37192      ;;
37193  esac
37194
37195  if test -n "$FLOAT_H"; then
37196
37197
37198
37199
37200
37201
37202
37203
37204     if test $gl_cv_have_include_next = yes; then
37205       gl_cv_next_float_h='<'float.h'>'
37206     else
37207       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
37208printf %s "checking absolute name of <float.h>... " >&6; }
37209if test ${gl_cv_next_float_h+y}
37210then :
37211  printf %s "(cached) " >&6
37212else $as_nop
37213
37214
37215
37216  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37217/* end confdefs.h.  */
37218#include <float.h>
37219_ACEOF
37220                case "$host_os" in
37221    aix*) gl_absname_cpp="$ac_cpp -C" ;;
37222    *)    gl_absname_cpp="$ac_cpp" ;;
37223  esac
37224
37225  case "$host_os" in
37226    mingw*)
37227                                          gl_dirsep_regex='[/\\]'
37228      ;;
37229    *)
37230      gl_dirsep_regex='\/'
37231      ;;
37232  esac
37233      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
37234  gl_header_literal_regex=`echo 'float.h' \
37235                           | sed -e "$gl_make_literal_regex_sed"`
37236  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
37237      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
37238      s|^/[^/]|//&|
37239      p
37240      q
37241    }'
37242
37243        gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
37244  sed -n "$gl_absolute_header_sed"`
37245
37246           gl_header=$gl_cv_absolute_float_h
37247           gl_cv_next_float_h='"'$gl_header'"'
37248
37249
37250fi
37251{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
37252printf "%s\n" "$gl_cv_next_float_h" >&6; }
37253     fi
37254     NEXT_FLOAT_H=$gl_cv_next_float_h
37255
37256     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
37257       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
37258       gl_next_as_first_directive='<'float.h'>'
37259     else
37260       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
37261       gl_next_as_first_directive=$gl_cv_next_float_h
37262     fi
37263     NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
37264
37265
37266
37267
37268  fi
37269
37270   if test -n "$FLOAT_H"; then
37271  GL_GENERATE_FLOAT_H_TRUE=
37272  GL_GENERATE_FLOAT_H_FALSE='#'
37273else
37274  GL_GENERATE_FLOAT_H_TRUE='#'
37275  GL_GENERATE_FLOAT_H_FALSE=
37276fi
37277
37278
37279
37280  if test $REPLACE_FLOAT_LDBL = 1; then
37281
37282
37283
37284
37285
37286
37287
37288
37289  gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
37290
37291  fi
37292  if test $REPLACE_ITOLD = 1; then
37293
37294
37295
37296
37297
37298
37299
37300
37301  gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
37302
37303  fi
37304
37305
37306
37307  if test $ac_cv_func_flock = no; then
37308    HAVE_FLOCK=0
37309  fi
37310
37311  if test $HAVE_FLOCK = 0; then
37312
37313
37314
37315
37316
37317
37318
37319
37320  gl_LIBOBJS="$gl_LIBOBJS flock.$ac_objext"
37321
37322
37323
37324
37325
37326    ac_fn_c_check_member "$LINENO" "struct flock" "l_type" "ac_cv_member_struct_flock_l_type" "#include <fcntl.h>
37327"
37328if test "x$ac_cv_member_struct_flock_l_type" = xyes
37329then :
37330
37331printf "%s\n" "#define HAVE_STRUCT_FLOCK_L_TYPE 1" >>confdefs.h
37332
37333
37334fi
37335
37336
37337  fi
37338
37339
37340
37341
37342
37343
37344
37345
37346
37347          GL_GNULIB_FLOCK=1
37348
37349
37350
37351
37352
37353
37354
37355
37356     gl_fnmatch_required_lowercase=`
37357    echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
37358  `
37359
37360  if test $ac_cv_func_fnmatch = no; then
37361    HAVE_FNMATCH=0
37362  else
37363    gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
37364    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
37365printf %s "checking for working $gl_fnmatch_required fnmatch... " >&6; }
37366if eval test \${$gl_fnmatch_cache_var+y}
37367then :
37368  printf %s "(cached) " >&6
37369else $as_nop
37370                                     if test $gl_fnmatch_required = GNU; then
37371         gl_fnmatch_gnu_start=
37372         gl_fnmatch_gnu_end=
37373       else
37374         gl_fnmatch_gnu_start='#if 0'
37375         gl_fnmatch_gnu_end='#endif'
37376       fi
37377       if test "$cross_compiling" = yes
37378then :
37379  case "$host_os" in
37380                     # Guess yes on musl systems.
37381            *-musl*) eval "$gl_fnmatch_cache_var=\"guessing yes\"" ;;
37382                     # Guess no otherwise, even on glibc systems.
37383            *)       eval "$gl_fnmatch_cache_var=\"guessing no\"" ;;
37384          esac
37385
37386else $as_nop
37387  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37388/* end confdefs.h.  */
37389#include <fnmatch.h>
37390              static int
37391              y (char const *pattern, char const *string, int flags)
37392              {
37393                return fnmatch (pattern, string, flags) == 0;
37394              }
37395              static int
37396              n (char const *pattern, char const *string, int flags)
37397              {
37398                return fnmatch (pattern, string, flags) == FNM_NOMATCH;
37399              }
37400
37401int
37402main (void)
37403{
37404char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
37405              char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
37406              static char const A_1[] = { 'A' - 1, 0 };
37407              static char const A01[] = { 'A' + 1, 0 };
37408              static char const a_1[] = { 'a' - 1, 0 };
37409              static char const a01[] = { 'a' + 1, 0 };
37410              static char const bs_1[] = { '\\\\' - 1, 0 };
37411              static char const bs01[] = { '\\\\' + 1, 0 };
37412              int result = 0;
37413              if (!n ("a*", "", 0))
37414                return 1;
37415              if (!y ("a*", "abc", 0))
37416                return 1;
37417              if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
37418                return 1;
37419              if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
37420                return 2;
37421              if (!y ("a\\\\bc", "abc", 0))
37422                return 3;
37423              if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
37424                return 3;
37425              if (!y ("*x", ".x", 0))
37426                return 4;
37427              if (!n ("*x", ".x", FNM_PERIOD))
37428                return 4;
37429              if (!y (Apat, "\\\\", 0))
37430                return 5;
37431              if (!y (Apat, "A", 0))
37432                return 5;
37433              if (!y (apat, "\\\\", 0))
37434                return 5;
37435              if (!y (apat, "a", 0))
37436                return 5;
37437              if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
37438                return 5;
37439              if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
37440                return 5;
37441              if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
37442                return 5;
37443              if (!(y (apat, a01, 0) == ('a' < '\\\\')))
37444                return 5;
37445              if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
37446                return 5;
37447              if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
37448                return 5;
37449              if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
37450                return 5;
37451              if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
37452                return 5;
37453              $gl_fnmatch_gnu_start
37454              if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
37455                result |= 8;
37456              if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
37457                result |= 16;
37458              if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
37459                result |= 32;
37460              if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
37461                result |= 64;
37462              if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
37463                result |= 64;
37464              if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
37465                result |= 64;
37466              $gl_fnmatch_gnu_end
37467              return result;
37468
37469  ;
37470  return 0;
37471}
37472_ACEOF
37473if ac_fn_c_try_run "$LINENO"
37474then :
37475  eval "$gl_fnmatch_cache_var=yes"
37476else $as_nop
37477  eval "$gl_fnmatch_cache_var=no"
37478fi
37479rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37480  conftest.$ac_objext conftest.beam conftest.$ac_ext
37481fi
37482
37483
37484fi
37485eval ac_res=\$$gl_fnmatch_cache_var
37486	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
37487printf "%s\n" "$ac_res" >&6; }
37488    eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
37489    case "$gl_fnmatch_result" in
37490      *yes) ;;
37491      *) REPLACE_FNMATCH=1 ;;
37492    esac
37493  fi
37494  if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
37495
37496
37497
37498
37499
37500
37501  FNMATCH_H='fnmatch.h'
37502   if test -n "$FNMATCH_H"; then
37503  GL_GENERATE_FNMATCH_H_TRUE=
37504  GL_GENERATE_FNMATCH_H_FALSE='#'
37505else
37506  GL_GENERATE_FNMATCH_H_TRUE='#'
37507  GL_GENERATE_FNMATCH_H_FALSE=
37508fi
37509
37510
37511  fi
37512
37513  if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
37514
37515
37516
37517
37518
37519
37520
37521
37522  gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
37523
37524
37525
37526
37527
37528  fi
37529
37530
37531
37532
37533
37534
37535
37536
37537
37538          GL_GNULIB_FNMATCH=1
37539
37540
37541
37542
37543
37544printf "%s\n" "#define GNULIB_TEST_FNMATCH 1" >>confdefs.h
37545
37546
37547
37548
37549
37550
37551
37552
37553  if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
37554
37555
37556
37557
37558
37559
37560
37561
37562  gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
37563
37564
37565
37566
37567
37568  fi
37569
37570
37571printf "%s\n" "#define GNULIB_FNMATCH_GNU 1" >>confdefs.h
37572
37573
37574
37575
37576
37577
37578
37579
37580
37581
37582
37583  case "$host_os" in
37584    mingw* | pw*)
37585            REPLACE_FOPEN=1
37586            gl_cv_func_fopen_slash="guessing no"
37587      ;;
37588    *)
37589                  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopen recognizes a trailing slash" >&5
37590printf %s "checking whether fopen recognizes a trailing slash... " >&6; }
37591if test ${gl_cv_func_fopen_slash+y}
37592then :
37593  printf %s "(cached) " >&6
37594else $as_nop
37595
37596          if test "$cross_compiling" = yes
37597then :
37598
37599             case "$host_os" in
37600               aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
37601                 gl_cv_func_fopen_slash="guessing no" ;;
37602               *)
37603                 gl_cv_func_fopen_slash="guessing yes" ;;
37604             esac
37605
37606else $as_nop
37607  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37608/* end confdefs.h.  */
37609
37610#include <stddef.h>
37611#include <stdio.h>
37612int main ()
37613{
37614  FILE *fp = fopen ("conftest.sl/", "w");
37615  int result = (fp != NULL);
37616  if (fp != NULL)
37617    fclose (fp);
37618  return result;
37619}
37620_ACEOF
37621if ac_fn_c_try_run "$LINENO"
37622then :
37623  gl_cv_func_fopen_slash=yes
37624else $as_nop
37625  gl_cv_func_fopen_slash=no
37626fi
37627rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37628  conftest.$ac_objext conftest.beam conftest.$ac_ext
37629fi
37630
37631          rm -f conftest.sl
37632
37633fi
37634{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_slash" >&5
37635printf "%s\n" "$gl_cv_func_fopen_slash" >&6; }
37636      ;;
37637  esac
37638  case "$gl_cv_func_fopen_slash" in
37639    *no)
37640
37641printf "%s\n" "#define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
37642
37643      REPLACE_FOPEN=1
37644      ;;
37645  esac
37646
37647  if test $REPLACE_FOPEN = 1; then
37648
37649
37650
37651
37652
37653
37654
37655
37656  gl_LIBOBJS="$gl_LIBOBJS fopen.$ac_objext"
37657
37658    :
37659  fi
37660
37661
37662
37663
37664
37665
37666
37667
37668
37669          GL_GNULIB_FOPEN=1
37670
37671
37672
37673
37674
37675printf "%s\n" "#define GNULIB_TEST_FOPEN 1" >>confdefs.h
37676
37677
37678
37679
37680
37681  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopen supports the mode character 'x'" >&5
37682printf %s "checking whether fopen supports the mode character 'x'... " >&6; }
37683if test ${gl_cv_func_fopen_mode_x+y}
37684then :
37685  printf %s "(cached) " >&6
37686else $as_nop
37687  rm -f conftest.x
37688     if test "$cross_compiling" = yes
37689then :
37690  case "$host_os" in
37691          # Guess yes on glibc and musl systems.
37692          linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl*)
37693            gl_cv_func_fopen_mode_x="guessing yes" ;;
37694          # If we don't know, obey --enable-cross-guesses.
37695          *)
37696            gl_cv_func_fopen_mode_x="$gl_cross_guess_normal" ;;
37697        esac
37698
37699else $as_nop
37700  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37701/* end confdefs.h.  */
37702
37703#include <stdio.h>
37704#include <errno.h>
37705int main ()
37706{
37707  FILE *fp;
37708  fp = fopen ("conftest.x", "w");
37709  fclose (fp);
37710  fp = fopen ("conftest.x", "wx");
37711  if (fp != NULL)
37712    /* 'x' ignored */
37713    return 1;
37714  else if (errno == EEXIST)
37715    return 0;
37716  else
37717    /* 'x' rejected */
37718    return 2;
37719}
37720_ACEOF
37721if ac_fn_c_try_run "$LINENO"
37722then :
37723  gl_cv_func_fopen_mode_x=yes
37724else $as_nop
37725  gl_cv_func_fopen_mode_x=no
37726fi
37727rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37728  conftest.$ac_objext conftest.beam conftest.$ac_ext
37729fi
37730
37731     rm -f conftest.x
37732
37733fi
37734{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_mode_x" >&5
37735printf "%s\n" "$gl_cv_func_fopen_mode_x" >&6; }
37736  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopen supports the mode character 'e'" >&5
37737printf %s "checking whether fopen supports the mode character 'e'... " >&6; }
37738if test ${gl_cv_func_fopen_mode_e+y}
37739then :
37740  printf %s "(cached) " >&6
37741else $as_nop
37742  echo foo > conftest.x
37743     if test "$cross_compiling" = yes
37744then :
37745  case "$host_os" in
37746          # Guess yes on glibc and musl systems.
37747          linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl*)
37748            gl_cv_func_fopen_mode_e="guessing yes" ;;
37749          # Guess no on native Windows.
37750          mingw*)
37751            gl_cv_func_fopen_mode_e="guessing no" ;;
37752          # If we don't know, obey --enable-cross-guesses.
37753          *)
37754            gl_cv_func_fopen_mode_e="$gl_cross_guess_normal" ;;
37755        esac
37756
37757else $as_nop
37758  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37759/* end confdefs.h.  */
37760
37761#include <stdio.h>
37762#include <errno.h>
37763#include <fcntl.h>
37764
37765
37766$gl_mda_defines
37767
37768int main ()
37769{
37770  FILE *fp = fopen ("conftest.x", "re");
37771  if (fp != NULL)
37772    {
37773      if (fcntl (fileno (fp), F_GETFD) & FD_CLOEXEC)
37774        return 0;
37775      else
37776        /* 'e' ignored */
37777        return 1;
37778    }
37779  else
37780    /* 'e' rejected */
37781    return 2;
37782}
37783_ACEOF
37784if ac_fn_c_try_run "$LINENO"
37785then :
37786  gl_cv_func_fopen_mode_e=yes
37787else $as_nop
37788  gl_cv_func_fopen_mode_e=no
37789fi
37790rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37791  conftest.$ac_objext conftest.beam conftest.$ac_ext
37792fi
37793
37794     rm -f conftest.x
37795
37796fi
37797{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_mode_e" >&5
37798printf "%s\n" "$gl_cv_func_fopen_mode_e" >&6; }
37799  case "$gl_cv_func_fopen_mode_x" in
37800    *no) REPLACE_FOPEN=1 ;;
37801  esac
37802  case "$gl_cv_func_fopen_mode_e" in
37803    *no) REPLACE_FOPEN=1 ;;
37804  esac
37805
37806  if test $REPLACE_FOPEN = 1; then
37807
37808
37809
37810
37811
37812
37813
37814
37815  gl_LIBOBJS="$gl_LIBOBJS fopen.$ac_objext"
37816
37817    :
37818  fi
37819
37820
37821printf "%s\n" "#define GNULIB_FOPEN_GNU 1" >>confdefs.h
37822
37823
37824
37825
37826
37827
37828
37829  ac_fn_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h>
37830" "$ac_c_undeclared_builtin_options" "CFLAGS"
37831if test "x$ac_cv_have_decl_fpurge" = xyes
37832then :
37833  ac_have_decl=1
37834else $as_nop
37835  ac_have_decl=0
37836fi
37837printf "%s\n" "#define HAVE_DECL_FPURGE $ac_have_decl" >>confdefs.h
37838
37839  if test "x$ac_cv_func_fpurge" = xyes; then
37840    HAVE_FPURGE=1
37841    # Detect BSD bug.  Only cygwin 1.7 and musl are known to be immune.
37842    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fpurge works" >&5
37843printf %s "checking whether fpurge works... " >&6; }
37844if test ${gl_cv_func_fpurge_works+y}
37845then :
37846  printf %s "(cached) " >&6
37847else $as_nop
37848  if test "$cross_compiling" = yes
37849then :
37850  case "$host_os" in
37851                     # Guess yes on musl systems.
37852            *-musl*) gl_cv_func_fpurge_works="guessing yes" ;;
37853                     # Otherwise obey --enable-cross-guesses.
37854            *)       gl_cv_func_fpurge_works="$gl_cross_guess_normal" ;;
37855          esac
37856
37857else $as_nop
37858  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37859/* end confdefs.h.  */
37860#include <stdio.h>
37861
37862int
37863main (void)
37864{
37865FILE *f = fopen ("conftest.txt", "w+");
37866              if (!f)
37867                return 1;
37868              if (fputc ('a', f) != 'a')
37869                { fclose (f); return 2; }
37870              rewind (f);
37871              if (fgetc (f) != 'a')
37872                { fclose (f); return 3; }
37873              if (fgetc (f) != EOF)
37874                { fclose (f); return 4; }
37875              if (fpurge (f) != 0)
37876                { fclose (f); return 5; }
37877              if (putc ('b', f) != 'b')
37878                { fclose (f); return 6; }
37879              if (fclose (f) != 0)
37880                return 7;
37881              if ((f = fopen ("conftest.txt", "r")) == NULL)
37882                return 8;
37883              if (fgetc (f) != 'a')
37884                { fclose (f); return 9; }
37885              if (fgetc (f) != 'b')
37886                { fclose (f); return 10; }
37887              if (fgetc (f) != EOF)
37888                { fclose (f); return 11; }
37889              if (fclose (f) != 0)
37890                return 12;
37891              if (remove ("conftest.txt") != 0)
37892                return 13;
37893              return 0;
37894
37895  ;
37896  return 0;
37897}
37898_ACEOF
37899if ac_fn_c_try_run "$LINENO"
37900then :
37901  gl_cv_func_fpurge_works=yes
37902else $as_nop
37903  gl_cv_func_fpurge_works=no
37904fi
37905rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37906  conftest.$ac_objext conftest.beam conftest.$ac_ext
37907fi
37908
37909
37910fi
37911{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fpurge_works" >&5
37912printf "%s\n" "$gl_cv_func_fpurge_works" >&6; }
37913    case "$gl_cv_func_fpurge_works" in
37914      *yes) ;;
37915      *) REPLACE_FPURGE=1 ;;
37916    esac
37917  else
37918    HAVE_FPURGE=0
37919  fi
37920  if test "x$ac_cv_have_decl_fpurge" = xno; then
37921    HAVE_DECL_FPURGE=0
37922  fi
37923
37924  if test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1; then
37925
37926
37927
37928
37929
37930
37931
37932
37933  gl_LIBOBJS="$gl_LIBOBJS fpurge.$ac_objext"
37934
37935  fi
37936
37937
37938
37939
37940
37941
37942
37943
37944
37945          GL_GNULIB_FPURGE=1
37946
37947
37948
37949
37950
37951printf "%s\n" "#define GNULIB_TEST_FPURGE 1" >>confdefs.h
37952
37953
37954
37955
37956
37957
37958
37959
37960
37961
37962                          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether free is known to preserve errno" >&5
37963printf %s "checking whether free is known to preserve errno... " >&6; }
37964if test ${gl_cv_func_free_preserves_errno+y}
37965then :
37966  printf %s "(cached) " >&6
37967else $as_nop
37968  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37969/* end confdefs.h.  */
37970#include <stdlib.h>
37971
37972int
37973main (void)
37974{
37975#if 2 < __GLIBC__ + (33 <= __GLIBC_MINOR__)
37976            #elif defined __OpenBSD__
37977            #elif defined __sun
37978            #else
37979              #error "'free' is not known to preserve errno"
37980            #endif
37981
37982  ;
37983  return 0;
37984}
37985_ACEOF
37986if ac_fn_c_try_compile "$LINENO"
37987then :
37988  gl_cv_func_free_preserves_errno=yes
37989else $as_nop
37990  gl_cv_func_free_preserves_errno=no
37991fi
37992rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
37993
37994fi
37995{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_free_preserves_errno" >&5
37996printf "%s\n" "$gl_cv_func_free_preserves_errno" >&6; }
37997
37998  case $gl_cv_func_free_preserves_errno in
37999   *yes)
38000
38001printf "%s\n" "#define HAVE_FREE_POSIX 1" >>confdefs.h
38002
38003    ;;
38004   *) REPLACE_FREE=1 ;;
38005  esac
38006
38007  if test $REPLACE_FREE = 1; then
38008
38009
38010
38011
38012
38013
38014
38015
38016  gl_LIBOBJS="$gl_LIBOBJS free.$ac_objext"
38017
38018    :
38019  fi
38020
38021
38022
38023
38024
38025
38026
38027
38028
38029          GL_GNULIB_FREE_POSIX=1
38030
38031
38032
38033
38034
38035printf "%s\n" "#define GNULIB_TEST_FREE_POSIX 1" >>confdefs.h
38036
38037
38038
38039
38040
38041
38042    if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
38043    REPLACE_FSEEK=1
38044  fi
38045
38046  if test $REPLACE_FSEEK = 1; then
38047
38048
38049
38050
38051
38052
38053
38054
38055  gl_LIBOBJS="$gl_LIBOBJS fseek.$ac_objext"
38056
38057  fi
38058
38059
38060
38061
38062
38063
38064
38065
38066
38067          GL_GNULIB_FSEEK=1
38068
38069
38070
38071
38072
38073printf "%s\n" "#define GNULIB_TEST_FSEEK 1" >>confdefs.h
38074
38075
38076
38077
38078
38079
38080
38081
38082
38083
38084
38085  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
38086printf %s "checking for fseeko... " >&6; }
38087if test ${gl_cv_func_fseeko+y}
38088then :
38089  printf %s "(cached) " >&6
38090else $as_nop
38091
38092      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38093/* end confdefs.h.  */
38094#include <stdio.h>
38095
38096int
38097main (void)
38098{
38099fseeko (stdin, 0, 0);
38100  ;
38101  return 0;
38102}
38103_ACEOF
38104if ac_fn_c_try_link "$LINENO"
38105then :
38106  gl_cv_func_fseeko=yes
38107else $as_nop
38108  gl_cv_func_fseeko=no
38109fi
38110rm -f core conftest.err conftest.$ac_objext conftest.beam \
38111    conftest$ac_exeext conftest.$ac_ext
38112
38113fi
38114{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
38115printf "%s\n" "$gl_cv_func_fseeko" >&6; }
38116
38117
38118  if test $ac_cv_have_decl_fseeko = no; then
38119    HAVE_DECL_FSEEKO=0
38120  fi
38121
38122  if test $gl_cv_func_fseeko = no; then
38123    HAVE_FSEEKO=0
38124  else
38125    if test $WINDOWS_64_BIT_OFF_T = 1; then
38126      REPLACE_FSEEKO=1
38127    fi
38128    if test $gl_cv_var_stdin_large_offset = no; then
38129      REPLACE_FSEEKO=1
38130    fi
38131
38132
38133
38134  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
38135printf %s "checking whether fflush works on input streams... " >&6; }
38136if test ${gl_cv_func_fflush_stdin+y}
38137then :
38138  printf %s "(cached) " >&6
38139else $as_nop
38140  echo hello world > conftest.txt
38141     if test "$cross_compiling" = yes
38142then :
38143  case "$host_os" in
38144                  # Guess no on native Windows.
38145          mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
38146          *)      gl_cv_func_fflush_stdin=cross ;;
38147        esac
38148
38149else $as_nop
38150  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38151/* end confdefs.h.  */
38152
38153#include <stdio.h>
38154#if HAVE_UNISTD_H
38155# include <unistd.h>
38156#else /* on Windows with MSVC */
38157# include <io.h>
38158#endif
38159
38160
38161$gl_mda_defines
38162
38163int
38164main (void)
38165{
38166FILE *f = fopen ("conftest.txt", "r");
38167         char buffer[10];
38168         int fd;
38169         int c;
38170         if (f == NULL)
38171           return 1;
38172         fd = fileno (f);
38173         if (fd < 0 || fread (buffer, 1, 5, f) != 5)
38174           { fclose (f); return 2; }
38175         /* For deterministic results, ensure f read a bigger buffer.  */
38176         if (lseek (fd, 0, SEEK_CUR) == 5)
38177           { fclose (f); return 3; }
38178         /* POSIX requires fflush-fseek to set file offset of fd.  This fails
38179            on BSD systems and on mingw.  */
38180         if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
38181           { fclose (f); return 4; }
38182         if (lseek (fd, 0, SEEK_CUR) != 5)
38183           { fclose (f); return 5; }
38184         /* Verify behaviour of fflush after ungetc. See
38185            <https://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
38186         /* Verify behaviour of fflush after a backup ungetc.  This fails on
38187            mingw.  */
38188         c = fgetc (f);
38189         ungetc (c, f);
38190         fflush (f);
38191         if (fgetc (f) != c)
38192           { fclose (f); return 6; }
38193         /* Verify behaviour of fflush after a non-backup ungetc.  This fails
38194            on glibc 2.8 and on BSD systems.  */
38195         c = fgetc (f);
38196         ungetc ('@', f);
38197         fflush (f);
38198         if (fgetc (f) != c)
38199           { fclose (f); return 7; }
38200         fclose (f);
38201         return 0;
38202
38203  ;
38204  return 0;
38205}
38206_ACEOF
38207if ac_fn_c_try_run "$LINENO"
38208then :
38209  gl_cv_func_fflush_stdin=yes
38210else $as_nop
38211  gl_cv_func_fflush_stdin=no
38212fi
38213rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38214  conftest.$ac_objext conftest.beam conftest.$ac_ext
38215fi
38216
38217     rm conftest.txt
38218
38219fi
38220{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
38221printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
38222  case "$gl_cv_func_fflush_stdin" in
38223    *yes) gl_func_fflush_stdin=1 ;;
38224    *no)  gl_func_fflush_stdin=0 ;;
38225    *)    gl_func_fflush_stdin='(-1)' ;;
38226  esac
38227
38228printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
38229
38230
38231      case "$gl_cv_func_fflush_stdin" in
38232        *yes) ;;
38233        *) REPLACE_FSEEKO=1 ;;
38234      esac
38235
38236  fi
38237
38238  if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
38239
38240
38241
38242
38243
38244
38245
38246
38247  gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext"
38248
38249
38250      ac_fn_c_check_func "$LINENO" "_fseeki64" "ac_cv_func__fseeki64"
38251if test "x$ac_cv_func__fseeki64" = xyes
38252then :
38253  printf "%s\n" "#define HAVE__FSEEKI64 1" >>confdefs.h
38254
38255fi
38256
38257  if test $ac_cv_func__fseeki64 = yes; then
38258    ac_fn_check_decl "$LINENO" "_fseeki64" "ac_cv_have_decl__fseeki64" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
38259if test "x$ac_cv_have_decl__fseeki64" = xyes
38260then :
38261  ac_have_decl=1
38262else $as_nop
38263  ac_have_decl=0
38264fi
38265printf "%s\n" "#define HAVE_DECL__FSEEKI64 $ac_have_decl" >>confdefs.h
38266
38267  fi
38268
38269  fi
38270
38271
38272
38273
38274
38275
38276
38277
38278
38279          GL_GNULIB_FSEEKO=1
38280
38281
38282
38283
38284
38285printf "%s\n" "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h
38286
38287
38288
38289
38290
38291
38292
38293  case "$host_os" in
38294    mingw* | solaris*)
38295                        REPLACE_FSTAT=1
38296      ;;
38297  esac
38298
38299
38300
38301
38302
38303  if test $ac_cv_func_fchdir = no; then
38304    HAVE_FCHDIR=0
38305  fi
38306
38307    if test $HAVE_FCHDIR = 0; then
38308      case "$gl_cv_func_open_directory_works" in
38309        *yes) ;;
38310        *)
38311          REPLACE_FSTAT=1
38312          ;;
38313      esac
38314    fi
38315
38316
38317  if test $REPLACE_FSTAT = 1; then
38318
38319
38320
38321
38322
38323
38324
38325
38326  gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
38327
38328    case "$host_os" in
38329      mingw*)
38330
38331
38332
38333
38334
38335
38336
38337
38338  gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
38339
38340        ;;
38341    esac
38342
38343
38344
38345  :
38346
38347  fi
38348
38349
38350
38351
38352
38353
38354
38355
38356
38357          GL_GNULIB_FSTAT=1
38358
38359
38360
38361
38362
38363printf "%s\n" "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
38364
38365
38366
38367
38368
38369
38370
38371
38372
38373
38374  if test $ac_cv_func_fstatat = no; then
38375    HAVE_FSTATAT=0
38376  else
38377            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
38378printf %s "checking whether fstatat (..., 0) works... " >&6; }
38379if test ${gl_cv_func_fstatat_zero_flag+y}
38380then :
38381  printf %s "(cached) " >&6
38382else $as_nop
38383  if test "$cross_compiling" = yes
38384then :
38385  case "$host_os" in
38386            aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
38387            *)    gl_cv_func_fstatat_zero_flag="guessing yes";;
38388          esac
38389
38390else $as_nop
38391  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38392/* end confdefs.h.  */
38393
38394              #include <fcntl.h>
38395              #include <sys/stat.h>
38396              int
38397              main (void)
38398              {
38399                struct stat a;
38400                return fstatat (AT_FDCWD, ".", &a, 0) != 0;
38401              }
38402
38403_ACEOF
38404if ac_fn_c_try_run "$LINENO"
38405then :
38406  gl_cv_func_fstatat_zero_flag=yes
38407else $as_nop
38408  gl_cv_func_fstatat_zero_flag=no
38409fi
38410rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38411  conftest.$ac_objext conftest.beam conftest.$ac_ext
38412fi
38413
38414
38415fi
38416{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
38417printf "%s\n" "$gl_cv_func_fstatat_zero_flag" >&6; }
38418
38419    case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
38420    *yes+*yes) ;;
38421    *) REPLACE_FSTATAT=1 ;;
38422    esac
38423
38424    case $host_os in
38425      solaris*)
38426        REPLACE_FSTATAT=1 ;;
38427    esac
38428
38429    case $REPLACE_FSTATAT,$gl_cv_func_fstatat_zero_flag in
38430      1,*yes)
38431
38432printf "%s\n" "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
38433
38434         ;;
38435    esac
38436  fi
38437
38438  if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
38439
38440
38441
38442
38443
38444
38445
38446
38447  gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
38448
38449  fi
38450
38451
38452
38453
38454
38455
38456
38457
38458
38459          GL_GNULIB_FSTATAT=1
38460
38461
38462
38463
38464
38465printf "%s\n" "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
38466
38467
38468
38469
38470
38471
38472    if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
38473    REPLACE_FTELL=1
38474  fi
38475
38476  if test $REPLACE_FTELL = 1; then
38477
38478
38479
38480
38481
38482
38483
38484
38485  gl_LIBOBJS="$gl_LIBOBJS ftell.$ac_objext"
38486
38487  fi
38488
38489
38490
38491
38492
38493
38494
38495
38496
38497          GL_GNULIB_FTELL=1
38498
38499
38500
38501
38502
38503printf "%s\n" "#define GNULIB_TEST_FTELL 1" >>confdefs.h
38504
38505
38506
38507
38508
38509
38510
38511
38512
38513
38514
38515
38516  if test $ac_cv_have_decl_ftello = no; then
38517    HAVE_DECL_FTELLO=0
38518  fi
38519
38520  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
38521printf %s "checking for ftello... " >&6; }
38522if test ${gl_cv_func_ftello+y}
38523then :
38524  printf %s "(cached) " >&6
38525else $as_nop
38526
38527      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38528/* end confdefs.h.  */
38529#include <stdio.h>
38530int
38531main (void)
38532{
38533ftello (stdin);
38534  ;
38535  return 0;
38536}
38537_ACEOF
38538if ac_fn_c_try_link "$LINENO"
38539then :
38540  gl_cv_func_ftello=yes
38541else $as_nop
38542  gl_cv_func_ftello=no
38543fi
38544rm -f core conftest.err conftest.$ac_objext conftest.beam \
38545    conftest$ac_exeext conftest.$ac_ext
38546
38547fi
38548{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
38549printf "%s\n" "$gl_cv_func_ftello" >&6; }
38550  if test $gl_cv_func_ftello = no; then
38551    HAVE_FTELLO=0
38552  else
38553    if test $WINDOWS_64_BIT_OFF_T = 1; then
38554      REPLACE_FTELLO=1
38555    fi
38556    if test $gl_cv_var_stdin_large_offset = no; then
38557      REPLACE_FTELLO=1
38558    fi
38559    if test $REPLACE_FTELLO = 0; then
38560
38561      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
38562printf %s "checking whether ftello works... " >&6; }
38563if test ${gl_cv_func_ftello_works+y}
38564then :
38565  printf %s "(cached) " >&6
38566else $as_nop
38567
38568                              case "$host_os" in
38569                      # Guess no on Solaris.
38570            solaris*) gl_cv_func_ftello_works="guessing no" ;;
38571                      # Guess yes on native Windows.
38572            mingw*)   gl_cv_func_ftello_works="guessing yes" ;;
38573                      # Guess yes otherwise.
38574            *)        gl_cv_func_ftello_works="guessing yes" ;;
38575          esac
38576          if test "$cross_compiling" = yes
38577then :
38578  :
38579else $as_nop
38580  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38581/* end confdefs.h.  */
38582
38583#include <stdio.h>
38584#include <stdlib.h>
38585#include <string.h>
38586#define TESTFILE "conftest.tmp"
38587int
38588main (void)
38589{
38590  FILE *fp;
38591
38592  /* Create a file with some contents.  */
38593  fp = fopen (TESTFILE, "w");
38594  if (fp == NULL)
38595    return 70;
38596  if (fwrite ("foogarsh", 1, 8, fp) < 8)
38597    { fclose (fp); return 71; }
38598  if (fclose (fp))
38599    return 72;
38600
38601  /* The file's contents is now "foogarsh".  */
38602
38603  /* Try writing after reading to EOF.  */
38604  fp = fopen (TESTFILE, "r+");
38605  if (fp == NULL)
38606    return 73;
38607  if (fseek (fp, -1, SEEK_END))
38608    { fclose (fp); return 74; }
38609  if (!(getc (fp) == 'h'))
38610    { fclose (fp); return 1; }
38611  if (!(getc (fp) == EOF))
38612    { fclose (fp); return 2; }
38613  if (!(ftell (fp) == 8))
38614    { fclose (fp); return 3; }
38615  if (!(ftell (fp) == 8))
38616    { fclose (fp); return 4; }
38617  if (!(putc ('!', fp) == '!'))
38618    { fclose (fp); return 5; }
38619  if (!(ftell (fp) == 9))
38620    { fclose (fp); return 6; }
38621  if (!(fclose (fp) == 0))
38622    return 7;
38623  fp = fopen (TESTFILE, "r");
38624  if (fp == NULL)
38625    return 75;
38626  {
38627    char buf[10];
38628    if (!(fread (buf, 1, 10, fp) == 9))
38629      { fclose (fp); return 10; }
38630    if (!(memcmp (buf, "foogarsh!", 9) == 0))
38631      { fclose (fp); return 11; }
38632  }
38633  if (!(fclose (fp) == 0))
38634    return 12;
38635
38636  /* The file's contents is now "foogarsh!".  */
38637
38638  return 0;
38639}
38640_ACEOF
38641if ac_fn_c_try_run "$LINENO"
38642then :
38643  gl_cv_func_ftello_works=yes
38644else $as_nop
38645  gl_cv_func_ftello_works=no
38646fi
38647rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38648  conftest.$ac_objext conftest.beam conftest.$ac_ext
38649fi
38650
38651
38652fi
38653{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
38654printf "%s\n" "$gl_cv_func_ftello_works" >&6; }
38655      case "$gl_cv_func_ftello_works" in
38656        *yes) ;;
38657        *)
38658          REPLACE_FTELLO=1
38659
38660printf "%s\n" "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
38661
38662          ;;
38663      esac
38664    fi
38665    if test $REPLACE_FTELLO = 0; then
38666
38667      if test $gl_ftello_broken_after_ungetc = yes; then
38668        REPLACE_FTELLO=1
38669
38670printf "%s\n" "#define FTELLO_BROKEN_AFTER_UNGETC 1" >>confdefs.h
38671
38672      fi
38673    fi
38674  fi
38675
38676  if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
38677
38678
38679
38680
38681
38682
38683
38684
38685  gl_LIBOBJS="$gl_LIBOBJS ftello.$ac_objext"
38686
38687
38688      ac_fn_c_check_func "$LINENO" "_ftelli64" "ac_cv_func__ftelli64"
38689if test "x$ac_cv_func__ftelli64" = xyes
38690then :
38691  printf "%s\n" "#define HAVE__FTELLI64 1" >>confdefs.h
38692
38693fi
38694
38695
38696  fi
38697
38698
38699
38700
38701
38702
38703
38704
38705
38706          GL_GNULIB_FTELLO=1
38707
38708
38709
38710
38711
38712printf "%s\n" "#define GNULIB_TEST_FTELLO 1" >>confdefs.h
38713
38714
38715
38716
38717
38718
38719
38720  if test $ac_cv_func_futimens = no; then
38721    HAVE_FUTIMENS=0
38722  else
38723    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether futimens works" >&5
38724printf %s "checking whether futimens works... " >&6; }
38725if test ${gl_cv_func_futimens_works+y}
38726then :
38727  printf %s "(cached) " >&6
38728else $as_nop
38729  if test "$cross_compiling" = yes
38730then :
38731  case "$host_os" in
38732                           # Guess no on glibc systems.
38733            *-gnu* | gnu*) gl_cv_func_futimens_works="guessing no" ;;
38734                           # Guess no on musl systems.
38735            *-musl*)       gl_cv_func_futimens_works="guessing no" ;;
38736                           # Guess yes otherwise.
38737            *)             gl_cv_func_futimens_works="guessing yes" ;;
38738          esac
38739
38740else $as_nop
38741  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38742/* end confdefs.h.  */
38743
38744#include <fcntl.h>
38745#include <sys/stat.h>
38746#include <unistd.h>
38747#include <errno.h>
38748
38749
38750$gl_mda_defines
38751
38752int
38753main (void)
38754{
38755struct timespec ts[2];
38756      int fd = creat ("conftest.file", 0600);
38757      struct stat st;
38758      if (fd < 0) return 1;
38759      ts[0].tv_sec = 1;
38760      ts[0].tv_nsec = UTIME_OMIT;
38761      ts[1].tv_sec = 1;
38762      ts[1].tv_nsec = UTIME_NOW;
38763      errno = 0;
38764      if (futimens (AT_FDCWD, NULL) == 0) return 2;
38765      if (errno != EBADF) return 3;
38766      if (futimens (fd, ts)) return 4;
38767      sleep (1);
38768      ts[0].tv_nsec = UTIME_NOW;
38769      ts[1].tv_nsec = UTIME_OMIT;
38770      if (futimens (fd, ts)) return 5;
38771      if (fstat (fd, &st)) return 6;
38772      if (st.st_ctime < st.st_atime) return 7;
38773
38774  ;
38775  return 0;
38776}
38777_ACEOF
38778if ac_fn_c_try_run "$LINENO"
38779then :
38780  gl_cv_func_futimens_works=yes
38781else $as_nop
38782  gl_cv_func_futimens_works=no
38783fi
38784rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38785  conftest.$ac_objext conftest.beam conftest.$ac_ext
38786fi
38787
38788      rm -f conftest.file
38789fi
38790{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimens_works" >&5
38791printf "%s\n" "$gl_cv_func_futimens_works" >&6; }
38792    case "$gl_cv_func_futimens_works" in
38793      *yes) ;;
38794      *)
38795        REPLACE_FUTIMENS=1
38796        ;;
38797    esac
38798  fi
38799
38800  if test $HAVE_FUTIMENS = 0 || test $REPLACE_FUTIMENS = 1; then
38801
38802
38803
38804
38805
38806
38807
38808
38809  gl_LIBOBJS="$gl_LIBOBJS futimens.$ac_objext"
38810
38811  fi
38812
38813
38814
38815
38816
38817
38818
38819
38820
38821          GL_GNULIB_FUTIMENS=1
38822
38823
38824
38825
38826
38827printf "%s\n" "#define GNULIB_TEST_FUTIMENS 1" >>confdefs.h
38828
38829
38830
38831
38832      GETADDRINFO_LIB=
38833  gai_saved_LIBS="$LIBS"
38834
38835              { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing getaddrinfo" >&5
38836printf %s "checking for library containing getaddrinfo... " >&6; }
38837if test ${ac_cv_search_getaddrinfo+y}
38838then :
38839  printf %s "(cached) " >&6
38840else $as_nop
38841  ac_func_search_save_LIBS=$LIBS
38842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38843/* end confdefs.h.  */
38844
38845/* Override any GCC internal prototype to avoid an error.
38846   Use char because int might match the return type of a GCC
38847   builtin and then its argument prototype would still apply.  */
38848char getaddrinfo ();
38849int
38850main (void)
38851{
38852return getaddrinfo ();
38853  ;
38854  return 0;
38855}
38856_ACEOF
38857for ac_lib in '' socket network net
38858do
38859  if test -z "$ac_lib"; then
38860    ac_res="none required"
38861  else
38862    ac_res=-l$ac_lib
38863    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
38864  fi
38865  if ac_fn_c_try_link "$LINENO"
38866then :
38867  ac_cv_search_getaddrinfo=$ac_res
38868fi
38869rm -f core conftest.err conftest.$ac_objext conftest.beam \
38870    conftest$ac_exeext
38871  if test ${ac_cv_search_getaddrinfo+y}
38872then :
38873  break
38874fi
38875done
38876if test ${ac_cv_search_getaddrinfo+y}
38877then :
38878
38879else $as_nop
38880  ac_cv_search_getaddrinfo=no
38881fi
38882rm conftest.$ac_ext
38883LIBS=$ac_func_search_save_LIBS
38884fi
38885{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getaddrinfo" >&5
38886printf "%s\n" "$ac_cv_search_getaddrinfo" >&6; }
38887ac_res=$ac_cv_search_getaddrinfo
38888if test "$ac_res" != no
38889then :
38890  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
38891  if test "$ac_cv_search_getaddrinfo" != "none required"; then
38892       GETADDRINFO_LIB="$ac_cv_search_getaddrinfo"
38893     fi
38894fi
38895
38896  LIBS="$gai_saved_LIBS $GETADDRINFO_LIB"
38897
38898  HAVE_GETADDRINFO=1
38899  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
38900printf %s "checking for getaddrinfo... " >&6; }
38901if test ${gl_cv_func_getaddrinfo+y}
38902then :
38903  printf %s "(cached) " >&6
38904else $as_nop
38905
38906    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38907/* end confdefs.h.  */
38908
38909#include <sys/types.h>
38910#ifdef HAVE_SYS_SOCKET_H
38911#include <sys/socket.h>
38912#endif
38913#ifdef HAVE_NETDB_H
38914#include <netdb.h>
38915#endif
38916#include <stddef.h>
38917
38918int
38919main (void)
38920{
38921getaddrinfo("", "", NULL, NULL);
38922  ;
38923  return 0;
38924}
38925_ACEOF
38926if ac_fn_c_try_link "$LINENO"
38927then :
38928  gl_cv_func_getaddrinfo=yes
38929else $as_nop
38930  gl_cv_func_getaddrinfo=no
38931fi
38932rm -f core conftest.err conftest.$ac_objext conftest.beam \
38933    conftest$ac_exeext conftest.$ac_ext
38934fi
38935{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getaddrinfo" >&5
38936printf "%s\n" "$gl_cv_func_getaddrinfo" >&6; }
38937  if test $gl_cv_func_getaddrinfo = no; then
38938    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in ws2tcpip.h and -lws2_32" >&5
38939printf %s "checking for getaddrinfo in ws2tcpip.h and -lws2_32... " >&6; }
38940if test ${gl_cv_w32_getaddrinfo+y}
38941then :
38942  printf %s "(cached) " >&6
38943else $as_nop
38944
38945      gl_cv_w32_getaddrinfo=no
38946      am_save_LIBS="$LIBS"
38947      LIBS="$LIBS -lws2_32"
38948      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38949/* end confdefs.h.  */
38950
38951#ifdef HAVE_WS2TCPIP_H
38952#include <ws2tcpip.h>
38953#endif
38954#include <stddef.h>
38955
38956int
38957main (void)
38958{
38959getaddrinfo(NULL, NULL, NULL, NULL);
38960  ;
38961  return 0;
38962}
38963_ACEOF
38964if ac_fn_c_try_link "$LINENO"
38965then :
38966  gl_cv_w32_getaddrinfo=yes
38967fi
38968rm -f core conftest.err conftest.$ac_objext conftest.beam \
38969    conftest$ac_exeext conftest.$ac_ext
38970      LIBS="$am_save_LIBS"
38971
38972fi
38973{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_w32_getaddrinfo" >&5
38974printf "%s\n" "$gl_cv_w32_getaddrinfo" >&6; }
38975    if test "$gl_cv_w32_getaddrinfo" = "yes"; then
38976      GETADDRINFO_LIB="-lws2_32"
38977      LIBS="$gai_saved_LIBS $GETADDRINFO_LIB"
38978                  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo with POSIX signature" >&5
38979printf %s "checking for getaddrinfo with POSIX signature... " >&6; }
38980if test ${gl_cv_func_getaddrinfo_posix_signature+y}
38981then :
38982  printf %s "(cached) " >&6
38983else $as_nop
38984  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38985/* end confdefs.h.  */
38986
38987#include <sys/types.h>
38988#ifdef HAVE_SYS_SOCKET_H
38989#include <sys/socket.h>
38990#endif
38991#ifdef HAVE_NETDB_H
38992#include <netdb.h>
38993#endif
38994#ifdef HAVE_WS2TCPIP_H
38995#include <ws2tcpip.h>
38996#endif
38997#include <stddef.h>
38998extern
38999#ifdef __cplusplus
39000"C"
39001#endif
39002int getaddrinfo (const char *, const char *, const struct addrinfo *, struct addrinfo **);
39003
39004_ACEOF
39005if ac_fn_c_try_compile "$LINENO"
39006then :
39007  gl_cv_func_getaddrinfo_posix_signature=yes
39008else $as_nop
39009  gl_cv_func_getaddrinfo_posix_signature=no
39010fi
39011rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
39012
39013fi
39014{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getaddrinfo_posix_signature" >&5
39015printf "%s\n" "$gl_cv_func_getaddrinfo_posix_signature" >&6; }
39016      if test $gl_cv_func_getaddrinfo_posix_signature = no; then
39017        REPLACE_GETADDRINFO=1
39018      fi
39019    else
39020      HAVE_GETADDRINFO=0
39021    fi
39022  fi
39023
39024printf "%s\n" "#define HAVE_GETADDRINFO $HAVE_GETADDRINFO" >>confdefs.h
39025
39026
39027  # We can't use AC_REPLACE_FUNCS here because gai_strerror may be an
39028  # inline function declared in ws2tcpip.h, so we need to get that
39029  # header included somehow.
39030  ac_fn_check_decl "$LINENO" "gai_strerror" "ac_cv_have_decl_gai_strerror" "
39031#include <sys/types.h>
39032#ifdef HAVE_SYS_SOCKET_H
39033#include <sys/socket.h>
39034#endif
39035#ifdef HAVE_NETDB_H
39036#include <netdb.h>
39037#endif
39038#ifdef HAVE_WS2TCPIP_H
39039#include <ws2tcpip.h>
39040#endif
39041#include <stddef.h>
39042
39043" "$ac_c_undeclared_builtin_options" "CFLAGS"
39044if test "x$ac_cv_have_decl_gai_strerror" = xyes
39045then :
39046  ac_have_decl=1
39047else $as_nop
39048  ac_have_decl=0
39049fi
39050printf "%s\n" "#define HAVE_DECL_GAI_STRERROR $ac_have_decl" >>confdefs.h
39051
39052  if test $ac_cv_have_decl_gai_strerror = yes; then
39053    ac_fn_check_decl "$LINENO" "gai_strerrorA" "ac_cv_have_decl_gai_strerrorA" "
39054#include <sys/types.h>
39055#ifdef HAVE_SYS_SOCKET_H
39056#include <sys/socket.h>
39057#endif
39058#ifdef HAVE_NETDB_H
39059#include <netdb.h>
39060#endif
39061#ifdef HAVE_WS2TCPIP_H
39062#include <ws2tcpip.h>
39063#endif
39064#include <stddef.h>
39065
39066" "$ac_c_undeclared_builtin_options" "CFLAGS"
39067if test "x$ac_cv_have_decl_gai_strerrorA" = xyes
39068then :
39069  ac_have_decl=1
39070else $as_nop
39071  ac_have_decl=0
39072fi
39073printf "%s\n" "#define HAVE_DECL_GAI_STRERRORA $ac_have_decl" >>confdefs.h
39074
39075        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gai_strerror with POSIX signature" >&5
39076printf %s "checking for gai_strerror with POSIX signature... " >&6; }
39077if test ${gl_cv_func_gai_strerror_posix_signature+y}
39078then :
39079  printf %s "(cached) " >&6
39080else $as_nop
39081
39082      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39083/* end confdefs.h.  */
39084
39085#include <sys/types.h>
39086#ifdef HAVE_SYS_SOCKET_H
39087#include <sys/socket.h>
39088#endif
39089#ifdef HAVE_NETDB_H
39090#include <netdb.h>
39091#endif
39092#ifdef HAVE_WS2TCPIP_H
39093#include <ws2tcpip.h>
39094#endif
39095#include <stddef.h>
39096extern
39097#ifdef __cplusplus
39098"C"
39099#endif
39100const char *gai_strerror(int);
39101_ACEOF
39102if ac_fn_c_try_compile "$LINENO"
39103then :
39104  gl_cv_func_gai_strerror_posix_signature=yes
39105else $as_nop
39106  gl_cv_func_gai_strerror_posix_signature=no
39107fi
39108rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
39109fi
39110{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gai_strerror_posix_signature" >&5
39111printf "%s\n" "$gl_cv_func_gai_strerror_posix_signature" >&6; }
39112    if test $gl_cv_func_gai_strerror_posix_signature = no; then
39113      REPLACE_GAI_STRERROR=1
39114    fi
39115  fi
39116
39117  LIBS="$gai_saved_LIBS"
39118
39119
39120
39121
39122
39123
39124
39125
39126      ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "
39127#include <sys/types.h>
39128#include <sys/socket.h>
39129
39130"
39131if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes
39132then :
39133
39134printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_SA_LEN 1" >>confdefs.h
39135
39136
39137fi
39138
39139
39140
39141
39142  ac_fn_check_decl "$LINENO" "getaddrinfo" "ac_cv_have_decl_getaddrinfo" "
39143  /* sys/types.h is not needed according to POSIX, but the
39144     sys/socket.h in i386-unknown-freebsd4.10 and
39145     powerpc-apple-darwin5.5 required it. */
39146#include <sys/types.h>
39147#ifdef HAVE_SYS_SOCKET_H
39148#include <sys/socket.h>
39149#endif
39150#ifdef HAVE_NETDB_H
39151#include <netdb.h>
39152#endif
39153#ifdef HAVE_WS2TCPIP_H
39154#include <ws2tcpip.h>
39155#endif
39156
39157" "$ac_c_undeclared_builtin_options" "CFLAGS"
39158if test "x$ac_cv_have_decl_getaddrinfo" = xyes
39159then :
39160  ac_have_decl=1
39161else $as_nop
39162  ac_have_decl=0
39163fi
39164printf "%s\n" "#define HAVE_DECL_GETADDRINFO $ac_have_decl" >>confdefs.h
39165ac_fn_check_decl "$LINENO" "freeaddrinfo" "ac_cv_have_decl_freeaddrinfo" "
39166  /* sys/types.h is not needed according to POSIX, but the
39167     sys/socket.h in i386-unknown-freebsd4.10 and
39168     powerpc-apple-darwin5.5 required it. */
39169#include <sys/types.h>
39170#ifdef HAVE_SYS_SOCKET_H
39171#include <sys/socket.h>
39172#endif
39173#ifdef HAVE_NETDB_H
39174#include <netdb.h>
39175#endif
39176#ifdef HAVE_WS2TCPIP_H
39177#include <ws2tcpip.h>
39178#endif
39179
39180" "$ac_c_undeclared_builtin_options" "CFLAGS"
39181if test "x$ac_cv_have_decl_freeaddrinfo" = xyes
39182then :
39183  ac_have_decl=1
39184else $as_nop
39185  ac_have_decl=0
39186fi
39187printf "%s\n" "#define HAVE_DECL_FREEADDRINFO $ac_have_decl" >>confdefs.h
39188ac_fn_check_decl "$LINENO" "getnameinfo" "ac_cv_have_decl_getnameinfo" "
39189  /* sys/types.h is not needed according to POSIX, but the
39190     sys/socket.h in i386-unknown-freebsd4.10 and
39191     powerpc-apple-darwin5.5 required it. */
39192#include <sys/types.h>
39193#ifdef HAVE_SYS_SOCKET_H
39194#include <sys/socket.h>
39195#endif
39196#ifdef HAVE_NETDB_H
39197#include <netdb.h>
39198#endif
39199#ifdef HAVE_WS2TCPIP_H
39200#include <ws2tcpip.h>
39201#endif
39202
39203" "$ac_c_undeclared_builtin_options" "CFLAGS"
39204if test "x$ac_cv_have_decl_getnameinfo" = xyes
39205then :
39206  ac_have_decl=1
39207else $as_nop
39208  ac_have_decl=0
39209fi
39210printf "%s\n" "#define HAVE_DECL_GETNAMEINFO $ac_have_decl" >>confdefs.h
39211
39212  if test $ac_cv_have_decl_getaddrinfo = no; then
39213    HAVE_DECL_GETADDRINFO=0
39214  fi
39215  if test $ac_cv_have_decl_freeaddrinfo = no; then
39216    HAVE_DECL_FREEADDRINFO=0
39217  fi
39218  if test $ac_cv_have_decl_gai_strerror = no; then
39219    HAVE_DECL_GAI_STRERROR=0
39220  fi
39221  if test $ac_cv_have_decl_getnameinfo = no; then
39222    HAVE_DECL_GETNAMEINFO=0
39223  fi
39224
39225  ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "
39226#include <sys/types.h>
39227#ifdef HAVE_SYS_SOCKET_H
39228#include <sys/socket.h>
39229#endif
39230#ifdef HAVE_NETDB_H
39231#include <netdb.h>
39232#endif
39233#ifdef HAVE_WS2TCPIP_H
39234#include <ws2tcpip.h>
39235#endif
39236
39237"
39238if test "x$ac_cv_type_struct_addrinfo" = xyes
39239then :
39240
39241printf "%s\n" "#define HAVE_STRUCT_ADDRINFO 1" >>confdefs.h
39242
39243
39244fi
39245
39246  if test $ac_cv_type_struct_addrinfo = no; then
39247    HAVE_STRUCT_ADDRINFO=0
39248  fi
39249
39250    case " $GETADDRINFO_LIB " in
39251    *" $HOSTENT_LIB "*) ;;
39252    *) GETADDRINFO_LIB="$GETADDRINFO_LIB $HOSTENT_LIB" ;;
39253  esac
39254
39255    case " $GETADDRINFO_LIB " in
39256    *" $SERVENT_LIB "*) ;;
39257    *) GETADDRINFO_LIB="$GETADDRINFO_LIB $SERVENT_LIB" ;;
39258  esac
39259
39260    case " $GETADDRINFO_LIB " in
39261    *" $INET_NTOP_LIB "*) ;;
39262    *) GETADDRINFO_LIB="$GETADDRINFO_LIB $INET_NTOP_LIB" ;;
39263  esac
39264
39265
39266
39267
39268  if test $HAVE_GETADDRINFO = 0 || test $REPLACE_GETADDRINFO = 1; then
39269
39270
39271
39272
39273
39274
39275
39276
39277  gl_LIBOBJS="$gl_LIBOBJS getaddrinfo.$ac_objext"
39278
39279  fi
39280  if test $HAVE_DECL_GAI_STRERROR = 0 || test $REPLACE_GAI_STRERROR = 1; then
39281
39282
39283
39284
39285
39286
39287
39288
39289  gl_LIBOBJS="$gl_LIBOBJS gai_strerror.$ac_objext"
39290
39291  fi
39292
39293
39294
39295
39296
39297
39298
39299
39300
39301          GL_GNULIB_GETADDRINFO=1
39302
39303
39304
39305
39306
39307printf "%s\n" "#define GNULIB_TEST_GETADDRINFO 1" >>confdefs.h
39308
39309
39310
39311
39312
39313
39314
39315
39316  gl_abort_bug=no
39317  case "$host_os" in
39318    mingw*)
39319      gl_cv_func_getcwd_path_max=yes
39320      ;;
39321    *)
39322
39323
39324
39325
39326
39327  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
39328printf %s "checking whether getcwd handles long file names properly... " >&6; }
39329if test ${gl_cv_func_getcwd_path_max+y}
39330then :
39331  printf %s "(cached) " >&6
39332else $as_nop
39333  # Arrange for deletion of the temporary directory this test creates.
39334     ac_clean_files="$ac_clean_files confdir3"
39335          if test "$cross_compiling" = yes
39336then :
39337  # Cross-compilation guesses:
39338        case "$host_os" in
39339          aix*) # On AIX, it has the AIX bug.
39340            gl_cv_func_getcwd_path_max='guessing no, it has the AIX bug' ;;
39341          gnu*) # On Hurd, it is 'yes'.
39342            gl_cv_func_getcwd_path_max='guessing yes' ;;
39343          linux* | kfreebsd*)
39344            # On older Linux+glibc it's 'no, but it is partly working',
39345            # on newer Linux+glibc it's 'yes'.
39346            # On Linux+musl libc, it's 'no, but it is partly working'.
39347            # On kFreeBSD+glibc, it's 'no, but it is partly working'.
39348            gl_cv_func_getcwd_path_max='guessing no, but it is partly working' ;;
39349          *) # If we don't know, obey --enable-cross-guesses.
39350            gl_cv_func_getcwd_path_max="$gl_cross_guess_normal" ;;
39351        esac
39352
39353else $as_nop
39354  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39355/* end confdefs.h.  */
39356
39357#include <errno.h>
39358#include <stdlib.h>
39359#if HAVE_UNISTD_H
39360# include <unistd.h>
39361#else
39362# include <direct.h>
39363#endif
39364#include <string.h>
39365#include <limits.h>
39366#include <sys/stat.h>
39367#include <sys/types.h>
39368#include <fcntl.h>
39369
39370
39371/* Arrange to define PATH_MAX, like "pathmax.h" does. */
39372#if HAVE_UNISTD_H
39373# include <unistd.h>
39374#endif
39375#include <limits.h>
39376#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
39377# include <sys/param.h>
39378#endif
39379#if !defined PATH_MAX && defined MAXPATHLEN
39380# define PATH_MAX MAXPATHLEN
39381#endif
39382#ifdef __hpux
39383# undef PATH_MAX
39384# define PATH_MAX 1024
39385#endif
39386#if defined _WIN32 && ! defined __CYGWIN__
39387# undef PATH_MAX
39388# define PATH_MAX 260
39389#endif
39390
39391
39392#ifndef AT_FDCWD
39393# define AT_FDCWD 0
39394#endif
39395#ifdef ENAMETOOLONG
39396# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
39397#else
39398# define is_ENAMETOOLONG(x) 0
39399#endif
39400
39401/* Use the getcwd function, not any macro.  */
39402#undef getcwd
39403
39404
39405
39406$gl_mda_defines
39407
39408
39409#ifndef S_IRWXU
39410# define S_IRWXU 0700
39411#endif
39412
39413/* The length of this name must be 8.  */
39414#define DIR_NAME "confdir3"
39415#define DIR_NAME_LEN 8
39416#define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
39417
39418/* The length of "../".  */
39419#define DOTDOTSLASH_LEN 3
39420
39421/* Leftover bytes in the buffer, to work around library or OS bugs.  */
39422#define BUF_SLOP 20
39423
39424int
39425main ()
39426{
39427#ifndef PATH_MAX
39428  /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
39429     at least not on a local file system.  And if we were to start worrying
39430     about remote file systems, we'd have to enable the wrapper function
39431     all of the time, just to be safe.  That's not worth the cost.  */
39432  exit (0);
39433#elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
39434        - DIR_NAME_SIZE - BUF_SLOP) \
39435       <= PATH_MAX)
39436  /* FIXME: Assuming there's a system for which this is true,
39437     this should be done in a compile test.  */
39438  exit (0);
39439#else
39440  char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
39441           + DIR_NAME_SIZE + BUF_SLOP];
39442  char *cwd = getcwd (buf, PATH_MAX);
39443  size_t initial_cwd_len;
39444  size_t cwd_len;
39445  int fail = 0;
39446  size_t n_chdirs = 0;
39447
39448  if (cwd == NULL)
39449    exit (10);
39450
39451  cwd_len = initial_cwd_len = strlen (cwd);
39452
39453  while (1)
39454    {
39455      size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
39456      char *c = NULL;
39457
39458      cwd_len += DIR_NAME_SIZE;
39459      /* If mkdir or chdir fails, it could be that this system cannot create
39460         any file with an absolute name longer than PATH_MAX, such as cygwin.
39461         If so, leave fail as 0, because the current working directory can't
39462         be too long for getcwd if it can't even be created.  On Linux with
39463         the 9p file system, mkdir fails with error EINVAL when cwd_len gets
39464         too long; ignore this failure because the getcwd() system call
39465         produces good results whereas the gnulib substitute calls getdents64
39466         which fails with error EPROTO.
39467         For other errors, be pessimistic and consider that as a failure,
39468         too.  */
39469      if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
39470        {
39471          if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
39472            #ifdef __linux__
39473            if (! (errno == EINVAL))
39474            #endif
39475              fail = 20;
39476          break;
39477        }
39478
39479      if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
39480        {
39481          struct stat sb;
39482
39483          c = getcwd (buf, PATH_MAX);
39484          if (!c && errno == ENOENT)
39485            {
39486              fail = 11;
39487              break;
39488            }
39489          if (c)
39490            {
39491              fail = 31;
39492              break;
39493            }
39494          if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
39495            {
39496              fail = 21;
39497              break;
39498            }
39499
39500          /* Our replacement needs to be able to stat() long ../../paths,
39501             so generate a path larger than PATH_MAX to check,
39502             avoiding the replacement if we can't stat().  */
39503          c = getcwd (buf, cwd_len + 1);
39504          if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno))
39505            {
39506              fail = 32;
39507              break;
39508            }
39509        }
39510
39511      if (dotdot_max <= cwd_len - initial_cwd_len)
39512        {
39513          if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
39514            break;
39515          c = getcwd (buf, cwd_len + 1);
39516          if (!c)
39517            {
39518              if (! (errno == ERANGE || errno == ENOENT
39519                     || is_ENAMETOOLONG (errno)))
39520                {
39521                  fail = 22;
39522                  break;
39523                }
39524              if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
39525                {
39526                  fail = 12;
39527                  break;
39528                }
39529            }
39530        }
39531
39532      if (c && strlen (c) != cwd_len)
39533        {
39534          fail = 23;
39535          break;
39536        }
39537      ++n_chdirs;
39538    }
39539
39540  /* Leaving behind such a deep directory is not polite.
39541     So clean up here, right away, even though the driving
39542     shell script would also clean up.  */
39543  {
39544    size_t i;
39545
39546    /* Try rmdir first, in case the chdir failed.  */
39547    rmdir (DIR_NAME);
39548    for (i = 0; i <= n_chdirs; i++)
39549      {
39550        if (chdir ("..") < 0)
39551          break;
39552        if (rmdir (DIR_NAME) != 0)
39553          break;
39554      }
39555  }
39556
39557  exit (fail);
39558#endif
39559}
39560
39561_ACEOF
39562if ac_fn_c_try_run "$LINENO"
39563then :
39564  gl_cv_func_getcwd_path_max=yes
39565else $as_nop
39566  case $? in
39567        10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
39568        31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
39569        32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';;
39570        *) gl_cv_func_getcwd_path_max=no;;
39571        esac
39572fi
39573rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39574  conftest.$ac_objext conftest.beam conftest.$ac_ext
39575fi
39576
39577
39578fi
39579{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
39580printf "%s\n" "$gl_cv_func_getcwd_path_max" >&6; }
39581
39582      case "$gl_cv_func_getcwd_null" in
39583        *yes)
39584
39585
39586
39587
39588
39589
39590      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
39591printf %s "checking for getpagesize... " >&6; }
39592if test ${gl_cv_func_getpagesize+y}
39593then :
39594  printf %s "(cached) " >&6
39595else $as_nop
39596  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39597/* end confdefs.h.  */
39598#include <unistd.h>
39599int
39600main (void)
39601{
39602return getpagesize();
39603  ;
39604  return 0;
39605}
39606
39607_ACEOF
39608if ac_fn_c_try_link "$LINENO"
39609then :
39610  gl_cv_func_getpagesize=yes
39611else $as_nop
39612  gl_cv_func_getpagesize=no
39613fi
39614rm -f core conftest.err conftest.$ac_objext conftest.beam \
39615    conftest$ac_exeext conftest.$ac_ext
39616
39617fi
39618{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getpagesize" >&5
39619printf "%s\n" "$gl_cv_func_getpagesize" >&6; }
39620
39621  if test $gl_cv_func_getpagesize = yes; then
39622
39623printf "%s\n" "#define HAVE_GETPAGESIZE 1" >>confdefs.h
39624
39625  fi
39626
39627  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getcwd succeeds when 4k < cwd_length < 16k" >&5
39628printf %s "checking whether getcwd succeeds when 4k < cwd_length < 16k... " >&6; }
39629if test ${gl_cv_func_getcwd_succeeds_beyond_4k+y}
39630then :
39631  printf %s "(cached) " >&6
39632else $as_nop
39633  # Remove any remnants of a previous test.
39634     rm -rf confdir-14B---
39635     # Arrange for deletion of the temporary directory this test creates.
39636     ac_clean_files="$ac_clean_files confdir-14B---"
39637          if test "$cross_compiling" = yes
39638then :
39639  case "$host_os" in
39640             # Guess no otherwise, even on glibc systems and musl systems.
39641          *) gl_cv_func_getcwd_succeeds_beyond_4k="guessing no"
39642        esac
39643
39644else $as_nop
39645  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39646/* end confdefs.h.  */
39647
39648#include <errno.h>
39649#include <stdlib.h>
39650#if HAVE_UNISTD_H
39651# include <unistd.h>
39652#else /* on Windows with MSVC */
39653# include <direct.h>
39654#endif
39655#include <string.h>
39656#include <sys/stat.h>
39657
39658
39659/* Arrange to define PATH_MAX, like "pathmax.h" does. */
39660#if HAVE_UNISTD_H
39661# include <unistd.h>
39662#endif
39663#include <limits.h>
39664#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
39665# include <sys/param.h>
39666#endif
39667#if !defined PATH_MAX && defined MAXPATHLEN
39668# define PATH_MAX MAXPATHLEN
39669#endif
39670#ifdef __hpux
39671# undef PATH_MAX
39672# define PATH_MAX 1024
39673#endif
39674#if defined _WIN32 && ! defined __CYGWIN__
39675# undef PATH_MAX
39676# define PATH_MAX 260
39677#endif
39678
39679
39680
39681$gl_mda_defines
39682
39683
39684#ifndef S_IRWXU
39685# define S_IRWXU 0700
39686#endif
39687
39688/* FIXME: skip the run-test altogether on systems without getpagesize.  */
39689#if ! HAVE_GETPAGESIZE
39690# define getpagesize() 0
39691#endif
39692
39693/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
39694   the 16kB pagesize on ia64 linux.  Those conditions make the code below
39695   trigger a bug in glibc's getcwd implementation before 2.4.90-10.  */
39696#define TARGET_LEN (5 * 1024)
39697
39698int
39699main ()
39700{
39701  char *cwd;
39702  size_t initial_cwd_len;
39703  int fail = 0;
39704
39705  /* The bug is triggered when PATH_MAX < getpagesize (), so skip
39706     this relatively expensive and invasive test if that's not true.  */
39707#ifdef PATH_MAX
39708  int bug_possible = PATH_MAX < getpagesize ();
39709#else
39710  int bug_possible = 0;
39711#endif
39712  if (! bug_possible)
39713    return 0;
39714
39715  cwd = getcwd (NULL, 0);
39716  if (cwd == NULL)
39717    return 2;
39718
39719  initial_cwd_len = strlen (cwd);
39720  free (cwd);
39721
39722  if (1)
39723    {
39724      static char const dir_name[] = "confdir-14B---";
39725      size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
39726                              / sizeof dir_name);
39727      size_t d;
39728      for (d = 0; d < desired_depth; d++)
39729        {
39730          if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
39731            {
39732              if (! (errno == ERANGE || errno == ENAMETOOLONG
39733                     || errno == ENOENT))
39734                fail = 3; /* Unable to construct deep hierarchy.  */
39735              break;
39736            }
39737        }
39738
39739      /* If libc has the bug in question, this invocation of getcwd
39740         results in a failed assertion.  */
39741      cwd = getcwd (NULL, 0);
39742      if (cwd == NULL)
39743        fail = 4; /* getcwd didn't assert, but it failed for a long name
39744                     where the answer could have been learned.  */
39745      free (cwd);
39746
39747      /* Call rmdir first, in case the above chdir failed.  */
39748      rmdir (dir_name);
39749      while (0 < d--)
39750        {
39751          if (chdir ("..") < 0)
39752            {
39753              fail = 5;
39754              break;
39755            }
39756          rmdir (dir_name);
39757        }
39758    }
39759
39760  return fail;
39761}
39762
39763_ACEOF
39764if ac_fn_c_try_run "$LINENO"
39765then :
39766  gl_cv_func_getcwd_succeeds_beyond_4k=yes
39767else $as_nop
39768                                                          ret=$?
39769        if test $ret -ge 128 || test $ret = 4; then
39770          gl_cv_func_getcwd_succeeds_beyond_4k=no
39771        else
39772          gl_cv_func_getcwd_succeeds_beyond_4k=yes
39773        fi
39774
39775fi
39776rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39777  conftest.$ac_objext conftest.beam conftest.$ac_ext
39778fi
39779
39780
39781fi
39782{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_succeeds_beyond_4k" >&5
39783printf "%s\n" "$gl_cv_func_getcwd_succeeds_beyond_4k" >&6; }
39784  case "$gl_cv_func_getcwd_succeeds_beyond_4k" in
39785    *no)
39786      gl_abort_bug=yes
39787      ;;
39788    *)
39789
39790      ;;
39791  esac
39792
39793          ;;
39794      esac
39795      ;;
39796  esac
39797      case "$gl_cv_func_getcwd_path_max" in
39798    *"no" | *"no, it has the AIX bug") ;;
39799    *)
39800
39801printf "%s\n" "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
39802
39803      ;;
39804  esac
39805  case "$gl_cv_func_getcwd_path_max" in
39806    *"no, but it is partly working")
39807
39808printf "%s\n" "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
39809
39810      ;;
39811    *"yes, but with shorter paths")
39812
39813printf "%s\n" "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h
39814
39815      ;;
39816  esac
39817
39818  if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
39819     || test $gl_cv_func_getcwd_posix_signature != yes \
39820     || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \
39821     || test $gl_abort_bug = yes; then
39822    REPLACE_GETCWD=1
39823  fi
39824
39825  if test $REPLACE_GETCWD = 1; then
39826
39827
39828
39829
39830
39831
39832
39833
39834  gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
39835
39836
39837
39838
39839  :
39840
39841  fi
39842
39843
39844printf "%s\n" "#define GNULIB_GETCWD 1" >>confdefs.h
39845
39846
39847
39848
39849
39850
39851
39852
39853
39854
39855
39856          GL_GNULIB_GETCWD=1
39857
39858
39859
39860
39861
39862printf "%s\n" "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
39863
39864
39865
39866
39867
39868
39869
39870
39871  case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
39872  *yes,yes) ;;
39873  *)
39874        REPLACE_GETCWD=1
39875    ;;
39876  esac
39877
39878  if test $REPLACE_GETCWD = 1; then
39879
39880
39881
39882
39883
39884
39885
39886
39887  gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
39888
39889  fi
39890
39891
39892
39893
39894
39895
39896
39897
39898
39899          GL_GNULIB_GETCWD=1
39900
39901
39902
39903
39904
39905printf "%s\n" "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
39906
39907
39908
39909
39910
39911
39912
39913
39914
39915
39916
39917  if test $ac_cv_func_getdelim = yes; then
39918    HAVE_GETDELIM=1
39919        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5
39920printf %s "checking for working getdelim function... " >&6; }
39921if test ${gl_cv_func_working_getdelim+y}
39922then :
39923  printf %s "(cached) " >&6
39924else $as_nop
39925  echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
39926       if test "$cross_compiling" = yes
39927then :
39928                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39929/* end confdefs.h.  */
39930
39931#include <features.h>
39932#ifdef __GNU_LIBRARY__
39933 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
39934  Lucky GNU user
39935 #endif
39936#endif
39937
39938_ACEOF
39939if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
39940  $EGREP "Lucky GNU user" >/dev/null 2>&1
39941then :
39942  gl_cv_func_working_getdelim="guessing yes"
39943else $as_nop
39944  case "$host_os" in
39945               *-musl*) gl_cv_func_working_getdelim="guessing yes" ;;
39946               *)       gl_cv_func_working_getdelim="$gl_cross_guess_normal" ;;
39947             esac
39948
39949fi
39950rm -rf conftest*
39951
39952
39953else $as_nop
39954  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39955/* end confdefs.h.  */
39956
39957#    include <stdio.h>
39958#    include <stdlib.h>
39959#    include <string.h>
39960    int main ()
39961    {
39962      FILE *in = fopen ("./conftest.data", "r");
39963      if (!in)
39964        return 1;
39965      {
39966        /* Test result for a NULL buffer and a zero size.
39967           Based on a test program from Karl Heuer.  */
39968        char *line = NULL;
39969        size_t siz = 0;
39970        int len = getdelim (&line, &siz, '\n', in);
39971        if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
39972          { free (line); fclose (in); return 2; }
39973        free (line);
39974      }
39975      {
39976        /* Test result for a NULL buffer and a non-zero size.
39977           This crashes on FreeBSD 8.0.  */
39978        char *line = NULL;
39979        size_t siz = (size_t)(~0) / 4;
39980        if (getdelim (&line, &siz, '\n', in) == -1)
39981          { fclose (in); return 3; }
39982        free (line);
39983      }
39984      fclose (in);
39985      return 0;
39986    }
39987
39988_ACEOF
39989if ac_fn_c_try_run "$LINENO"
39990then :
39991  gl_cv_func_working_getdelim=yes
39992else $as_nop
39993  gl_cv_func_working_getdelim=no
39994fi
39995rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39996  conftest.$ac_objext conftest.beam conftest.$ac_ext
39997fi
39998
39999
40000fi
40001{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5
40002printf "%s\n" "$gl_cv_func_working_getdelim" >&6; }
40003    case "$gl_cv_func_working_getdelim" in
40004      *yes) ;;
40005      *) REPLACE_GETDELIM=1 ;;
40006    esac
40007  else
40008    HAVE_GETDELIM=0
40009  fi
40010
40011  if test $ac_cv_have_decl_getdelim = no; then
40012    HAVE_DECL_GETDELIM=0
40013  fi
40014
40015  if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
40016
40017
40018
40019
40020
40021
40022
40023
40024  gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext"
40025
40026
40027  ac_fn_c_check_func "$LINENO" "flockfile" "ac_cv_func_flockfile"
40028if test "x$ac_cv_func_flockfile" = xyes
40029then :
40030  printf "%s\n" "#define HAVE_FLOCKFILE 1" >>confdefs.h
40031
40032fi
40033ac_fn_c_check_func "$LINENO" "funlockfile" "ac_cv_func_funlockfile"
40034if test "x$ac_cv_func_funlockfile" = xyes
40035then :
40036  printf "%s\n" "#define HAVE_FUNLOCKFILE 1" >>confdefs.h
40037
40038fi
40039
40040  ac_fn_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
40041if test "x$ac_cv_have_decl_getc_unlocked" = xyes
40042then :
40043  ac_have_decl=1
40044else $as_nop
40045  ac_have_decl=0
40046fi
40047printf "%s\n" "#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl" >>confdefs.h
40048
40049
40050  fi
40051
40052
40053
40054
40055
40056
40057
40058
40059
40060          GL_GNULIB_GETDELIM=1
40061
40062
40063
40064
40065
40066printf "%s\n" "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h
40067
40068
40069
40070
40071
40072
40073
40074
40075  if test $ac_cv_func_getdtablesize = yes &&
40076     test $ac_cv_have_decl_getdtablesize = yes; then
40077    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
40078printf %s "checking whether getdtablesize works... " >&6; }
40079if test ${gl_cv_func_getdtablesize_works+y}
40080then :
40081  printf %s "(cached) " >&6
40082else $as_nop
40083                                                   case "$host_os" in
40084         vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
40085         *)
40086                                                       if test "$cross_compiling" = yes
40087then :
40088  case "$host_os" in
40089                cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
40090                  gl_cv_func_getdtablesize_works="guessing no" ;;
40091                *) gl_cv_func_getdtablesize_works="guessing yes" ;;
40092              esac
40093
40094else $as_nop
40095  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40096/* end confdefs.h.  */
40097
40098             #include <unistd.h>
40099
40100
40101$gl_mda_defines
40102
40103
40104int
40105main (void)
40106{
40107int size = getdtablesize();
40108                 if (dup2 (0, getdtablesize()) != -1)
40109                   return 1;
40110                 if (size != getdtablesize())
40111                   return 2;
40112
40113  ;
40114  return 0;
40115}
40116_ACEOF
40117if ac_fn_c_try_run "$LINENO"
40118then :
40119  gl_cv_func_getdtablesize_works=yes
40120else $as_nop
40121  gl_cv_func_getdtablesize_works=no
40122fi
40123rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40124  conftest.$ac_objext conftest.beam conftest.$ac_ext
40125fi
40126
40127           ;;
40128       esac
40129
40130fi
40131{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
40132printf "%s\n" "$gl_cv_func_getdtablesize_works" >&6; }
40133    case "$gl_cv_func_getdtablesize_works" in
40134      *yes | "no (limitation)") ;;
40135      *) REPLACE_GETDTABLESIZE=1 ;;
40136    esac
40137  else
40138    HAVE_GETDTABLESIZE=0
40139  fi
40140
40141  if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
40142
40143
40144
40145
40146
40147
40148
40149
40150  gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
40151
40152    :
40153  fi
40154
40155
40156
40157
40158
40159
40160
40161
40162
40163          GL_GNULIB_GETDTABLESIZE=1
40164
40165
40166
40167
40168
40169printf "%s\n" "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
40170
40171
40172
40173
40174
40175
40176
40177
40178        ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
40179if test "x$ac_cv_func_getgroups" = xyes
40180then :
40181
40182fi
40183
40184
40185  # If we don't yet have getgroups, see if it's in -lbsd.
40186  # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
40187  ac_save_LIBS=$LIBS
40188  if test $ac_cv_func_getgroups = no; then
40189    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
40190printf %s "checking for getgroups in -lbsd... " >&6; }
40191if test ${ac_cv_lib_bsd_getgroups+y}
40192then :
40193  printf %s "(cached) " >&6
40194else $as_nop
40195  ac_check_lib_save_LIBS=$LIBS
40196LIBS="-lbsd  $LIBS"
40197cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40198/* end confdefs.h.  */
40199
40200/* Override any GCC internal prototype to avoid an error.
40201   Use char because int might match the return type of a GCC
40202   builtin and then its argument prototype would still apply.  */
40203char getgroups ();
40204int
40205main (void)
40206{
40207return getgroups ();
40208  ;
40209  return 0;
40210}
40211_ACEOF
40212if ac_fn_c_try_link "$LINENO"
40213then :
40214  ac_cv_lib_bsd_getgroups=yes
40215else $as_nop
40216  ac_cv_lib_bsd_getgroups=no
40217fi
40218rm -f core conftest.err conftest.$ac_objext conftest.beam \
40219    conftest$ac_exeext conftest.$ac_ext
40220LIBS=$ac_check_lib_save_LIBS
40221fi
40222{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
40223printf "%s\n" "$ac_cv_lib_bsd_getgroups" >&6; }
40224if test "x$ac_cv_lib_bsd_getgroups" = xyes
40225then :
40226  GETGROUPS_LIB=-lbsd
40227fi
40228
40229  fi
40230
40231  # Run the program to test the functionality of the system-supplied
40232  # getgroups function only if there is such a function.
40233  if test $ac_cv_func_getgroups = yes; then
40234    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
40235printf %s "checking for working getgroups... " >&6; }
40236if test ${ac_cv_func_getgroups_works+y}
40237then :
40238  printf %s "(cached) " >&6
40239else $as_nop
40240  if test "$cross_compiling" = yes
40241then :
40242  case "$host_os" in # ((
40243                           # Guess yes on glibc systems.
40244            *-gnu* | gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
40245                           # Guess yes on musl systems.
40246            *-musl*)       ac_cv_func_getgroups_works="guessing yes" ;;
40247                           # If we don't know, obey --enable-cross-guesses.
40248            *)             ac_cv_func_getgroups_works="$gl_cross_guess_normal" ;;
40249          esac
40250
40251else $as_nop
40252  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40253/* end confdefs.h.  */
40254$ac_includes_default
40255int
40256main (void)
40257{
40258/* On NeXTstep 3.2, getgroups (0, 0) always fails.  */
40259              return getgroups (0, 0) == -1;
40260  ;
40261  return 0;
40262}
40263
40264_ACEOF
40265if ac_fn_c_try_run "$LINENO"
40266then :
40267  ac_cv_func_getgroups_works=yes
40268else $as_nop
40269  ac_cv_func_getgroups_works=no
40270fi
40271rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40272  conftest.$ac_objext conftest.beam conftest.$ac_ext
40273fi
40274
40275
40276fi
40277{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
40278printf "%s\n" "$ac_cv_func_getgroups_works" >&6; }
40279  else
40280    ac_cv_func_getgroups_works=no
40281  fi
40282  case "$ac_cv_func_getgroups_works" in
40283    *yes)
40284
40285printf "%s\n" "#define HAVE_GETGROUPS 1" >>confdefs.h
40286
40287      ;;
40288  esac
40289  LIBS=$ac_save_LIBS
40290
40291  if test $ac_cv_func_getgroups != yes; then
40292    HAVE_GETGROUPS=0
40293  else
40294    if test "$ac_cv_type_getgroups" != gid_t \
40295       || { case "$ac_cv_func_getgroups_works" in
40296              *yes) false;;
40297              *) true;;
40298            esac
40299          }; then
40300      REPLACE_GETGROUPS=1
40301
40302printf "%s\n" "#define GETGROUPS_ZERO_BUG 1" >>confdefs.h
40303
40304    else
40305                  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getgroups handles negative values" >&5
40306printf %s "checking whether getgroups handles negative values... " >&6; }
40307if test ${gl_cv_func_getgroups_works+y}
40308then :
40309  printf %s "(cached) " >&6
40310else $as_nop
40311  if test "$cross_compiling" = yes
40312then :
40313  case "$host_os" in
40314                            # Guess yes on glibc systems.
40315             *-gnu* | gnu*) gl_cv_func_getgroups_works="guessing yes" ;;
40316                            # Guess yes on musl systems.
40317             *-musl*)       gl_cv_func_getgroups_works="guessing yes" ;;
40318                            # If we don't know, obey --enable-cross-guesses.
40319             *)             gl_cv_func_getgroups_works="$gl_cross_guess_normal" ;;
40320           esac
40321
40322else $as_nop
40323  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40324/* end confdefs.h.  */
40325$ac_includes_default
40326int
40327main (void)
40328{
40329int size = getgroups (0, 0);
40330            gid_t *list = malloc (size * sizeof *list);
40331            int result = getgroups (-1, list) != -1;
40332            free (list);
40333            return result;
40334  ;
40335  return 0;
40336}
40337_ACEOF
40338if ac_fn_c_try_run "$LINENO"
40339then :
40340  gl_cv_func_getgroups_works=yes
40341else $as_nop
40342  gl_cv_func_getgroups_works=no
40343fi
40344rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40345  conftest.$ac_objext conftest.beam conftest.$ac_ext
40346fi
40347
40348fi
40349{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getgroups_works" >&5
40350printf "%s\n" "$gl_cv_func_getgroups_works" >&6; }
40351      case "$gl_cv_func_getgroups_works" in
40352        *yes) ;;
40353        *) REPLACE_GETGROUPS=1 ;;
40354      esac
40355    fi
40356  fi
40357  test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS"
40358
40359  if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then
40360
40361
40362
40363
40364
40365
40366
40367
40368  gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext"
40369
40370  fi
40371
40372
40373
40374
40375
40376
40377
40378
40379
40380          GL_GNULIB_GETGROUPS=1
40381
40382
40383
40384
40385
40386printf "%s\n" "#define GNULIB_TEST_GETGROUPS 1" >>confdefs.h
40387
40388
40389
40390
40391
40392
40393
40394
40395
40396
40397  gl_getline_needs_run_time_check=no
40398  ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline"
40399if test "x$ac_cv_func_getline" = xyes
40400then :
40401                   gl_getline_needs_run_time_check=yes
40402else $as_nop
40403  am_cv_func_working_getline=no
40404fi
40405
40406  if test $gl_getline_needs_run_time_check = yes; then
40407    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working getline function" >&5
40408printf %s "checking for working getline function... " >&6; }
40409if test ${am_cv_func_working_getline+y}
40410then :
40411  printf %s "(cached) " >&6
40412else $as_nop
40413  echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
40414       if test "$cross_compiling" = yes
40415then :
40416                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40417/* end confdefs.h.  */
40418
40419#include <features.h>
40420#ifdef __GNU_LIBRARY__
40421 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
40422  Lucky GNU user
40423 #endif
40424#endif
40425
40426_ACEOF
40427if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40428  $EGREP "Lucky GNU user" >/dev/null 2>&1
40429then :
40430  am_cv_func_working_getline="guessing yes"
40431else $as_nop
40432  case "$host_os" in
40433               *-musl*) am_cv_func_working_getline="guessing yes" ;;
40434               *)       am_cv_func_working_getline="$gl_cross_guess_normal" ;;
40435             esac
40436
40437fi
40438rm -rf conftest*
40439
40440
40441else $as_nop
40442  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40443/* end confdefs.h.  */
40444
40445#    include <stdio.h>
40446#    include <stdlib.h>
40447#    include <string.h>
40448    int main ()
40449    {
40450      FILE *in = fopen ("./conftest.data", "r");
40451      if (!in)
40452        return 1;
40453      {
40454        /* Test result for a NULL buffer and a zero size.
40455           Based on a test program from Karl Heuer.  */
40456        char *line = NULL;
40457        size_t siz = 0;
40458        int len = getline (&line, &siz, in);
40459        if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
40460          { free (line); fclose (in); return 2; }
40461        free (line);
40462      }
40463      {
40464        /* Test result for a NULL buffer and a non-zero size.
40465           This crashes on FreeBSD 8.0.  */
40466        char *line = NULL;
40467        size_t siz = (size_t)(~0) / 4;
40468        if (getline (&line, &siz, in) == -1)
40469          { fclose (in); return 3; }
40470        free (line);
40471      }
40472      fclose (in);
40473      return 0;
40474    }
40475
40476_ACEOF
40477if ac_fn_c_try_run "$LINENO"
40478then :
40479  am_cv_func_working_getline=yes
40480else $as_nop
40481  am_cv_func_working_getline=no
40482fi
40483rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40484  conftest.$ac_objext conftest.beam conftest.$ac_ext
40485fi
40486
40487
40488fi
40489{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_working_getline" >&5
40490printf "%s\n" "$am_cv_func_working_getline" >&6; }
40491  fi
40492
40493  if test $ac_cv_have_decl_getline = no; then
40494    HAVE_DECL_GETLINE=0
40495  fi
40496
40497  case "$am_cv_func_working_getline" in
40498    *yes) ;;
40499    *)
40500                        REPLACE_GETLINE=1
40501      ;;
40502  esac
40503
40504  if test $REPLACE_GETLINE = 1; then
40505
40506
40507
40508
40509
40510
40511
40512
40513  gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext"
40514
40515
40516  :
40517
40518  fi
40519
40520
40521
40522
40523
40524
40525
40526
40527
40528          GL_GNULIB_GETLINE=1
40529
40530
40531
40532
40533
40534printf "%s\n" "#define GNULIB_TEST_GETLINE 1" >>confdefs.h
40535
40536
40537
40538
40539
40540
40541
40542
40543
40544
40545
40546
40547    REPLACE_GETOPT=0
40548    if test -n "$gl_replace_getopt"; then
40549      REPLACE_GETOPT=1
40550    fi
40551
40552  if test $REPLACE_GETOPT = 1; then
40553
40554
40555  if test $ac_cv_header_sys_cdefs_h = yes; then
40556    HAVE_SYS_CDEFS_H=1
40557  else
40558    HAVE_SYS_CDEFS_H=0
40559  fi
40560
40561
40562
40563printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h
40564
40565  GETOPT_H=getopt.h
40566  GETOPT_CDEFS_H=getopt-cdefs.h
40567
40568
40569
40570  fi
40571
40572  if test $REPLACE_GETOPT = 1; then
40573
40574
40575
40576
40577
40578
40579
40580
40581  gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
40582
40583
40584
40585
40586
40587
40588
40589
40590
40591  gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
40592
40593
40594
40595
40596
40597
40598
40599  GL_GNULIB_UNISTD_H_GETOPT=1
40600
40601
40602  fi
40603
40604
40605
40606
40607
40608
40609
40610
40611
40612          GL_GNULIB_GETOPT_POSIX=1
40613
40614
40615
40616
40617
40618printf "%s\n" "#define GNULIB_TEST_GETOPT_POSIX 1" >>confdefs.h
40619
40620
40621
40622
40623  if test $HAVE_GETPASS = 0 || test $REPLACE_GETPASS = 1; then
40624
40625
40626
40627
40628
40629
40630
40631
40632  gl_LIBOBJS="$gl_LIBOBJS getpass.$ac_objext"
40633
40634
40635
40636
40637  ac_fn_check_decl "$LINENO" "__fsetlocking" "ac_cv_have_decl___fsetlocking" "#include <stdio.h>
40638      #if HAVE_STDIO_EXT_H
40639       #include <stdio_ext.h>
40640      #endif
40641" "$ac_c_undeclared_builtin_options" "CFLAGS"
40642if test "x$ac_cv_have_decl___fsetlocking" = xyes
40643then :
40644  ac_have_decl=1
40645else $as_nop
40646  ac_have_decl=0
40647fi
40648printf "%s\n" "#define HAVE_DECL___FSETLOCKING $ac_have_decl" >>confdefs.h
40649
40650
40651
40652
40653
40654
40655
40656      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tcgetattr" >&5
40657printf %s "checking for tcgetattr... " >&6; }
40658if test ${gl_cv_func_tcgetattr+y}
40659then :
40660  printf %s "(cached) " >&6
40661else $as_nop
40662  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40663/* end confdefs.h.  */
40664#include <termios.h>
40665            struct termios x;
40666
40667int
40668main (void)
40669{
40670return tcgetattr(0,&x);
40671  ;
40672  return 0;
40673}
40674
40675_ACEOF
40676if ac_fn_c_try_link "$LINENO"
40677then :
40678  gl_cv_func_tcgetattr=yes
40679else $as_nop
40680  gl_cv_func_tcgetattr=no
40681fi
40682rm -f core conftest.err conftest.$ac_objext conftest.beam \
40683    conftest$ac_exeext conftest.$ac_ext
40684
40685fi
40686{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_tcgetattr" >&5
40687printf "%s\n" "$gl_cv_func_tcgetattr" >&6; }
40688  if test $gl_cv_func_tcgetattr = yes; then
40689    HAVE_TCGETATTR=1
40690  else
40691    HAVE_TCGETATTR=0
40692  fi
40693
40694printf "%s\n" "#define HAVE_TCGETATTR $HAVE_TCGETATTR" >>confdefs.h
40695
40696
40697      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tcsetattr" >&5
40698printf %s "checking for tcsetattr... " >&6; }
40699if test ${gl_cv_func_tcsetattr+y}
40700then :
40701  printf %s "(cached) " >&6
40702else $as_nop
40703  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40704/* end confdefs.h.  */
40705#include <termios.h>
40706            struct termios x;
40707
40708int
40709main (void)
40710{
40711return tcsetattr(0,0,&x);
40712  ;
40713  return 0;
40714}
40715
40716_ACEOF
40717if ac_fn_c_try_link "$LINENO"
40718then :
40719  gl_cv_func_tcsetattr=yes
40720else $as_nop
40721  gl_cv_func_tcsetattr=no
40722fi
40723rm -f core conftest.err conftest.$ac_objext conftest.beam \
40724    conftest$ac_exeext conftest.$ac_ext
40725
40726fi
40727{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_tcsetattr" >&5
40728printf "%s\n" "$gl_cv_func_tcsetattr" >&6; }
40729  if test $gl_cv_func_tcsetattr = yes; then
40730    HAVE_TCSETATTR=1
40731  else
40732    HAVE_TCSETATTR=0
40733  fi
40734
40735printf "%s\n" "#define HAVE_TCSETATTR $HAVE_TCSETATTR" >>confdefs.h
40736
40737
40738  fi
40739
40740
40741
40742
40743
40744
40745
40746
40747
40748          GL_GNULIB_GETPASS=1
40749
40750
40751
40752
40753
40754printf "%s\n" "#define GNULIB_TEST_GETPASS 1" >>confdefs.h
40755
40756
40757
40758
40759
40760
40761
40762  if test $ac_cv_func_getpass = yes; then
40763    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getpass without length limitations" >&5
40764printf %s "checking for getpass without length limitations... " >&6; }
40765if test ${gl_cv_func_getpass_good+y}
40766then :
40767  printf %s "(cached) " >&6
40768else $as_nop
40769  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40770/* end confdefs.h.  */
40771
40772#include <features.h>
40773#ifdef __GNU_LIBRARY__
40774 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
40775  Lucky GNU user
40776 #endif
40777#endif
40778
40779_ACEOF
40780if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40781  $EGREP "Lucky GNU user" >/dev/null 2>&1
40782then :
40783  gl_cv_func_getpass_good=yes
40784else $as_nop
40785  gl_cv_func_getpass_good=no
40786fi
40787rm -rf conftest*
40788
40789
40790fi
40791{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getpass_good" >&5
40792printf "%s\n" "$gl_cv_func_getpass_good" >&6; }
40793    if test $gl_cv_func_getpass_good != yes; then
40794      REPLACE_GETPASS=1
40795    fi
40796  fi
40797
40798  if test $HAVE_GETPASS = 0 || test $REPLACE_GETPASS = 1; then
40799
40800
40801
40802
40803
40804
40805
40806
40807  gl_LIBOBJS="$gl_LIBOBJS getpass.$ac_objext"
40808
40809
40810
40811
40812  ac_fn_check_decl "$LINENO" "__fsetlocking" "ac_cv_have_decl___fsetlocking" "#include <stdio.h>
40813      #if HAVE_STDIO_EXT_H
40814       #include <stdio_ext.h>
40815      #endif
40816" "$ac_c_undeclared_builtin_options" "CFLAGS"
40817if test "x$ac_cv_have_decl___fsetlocking" = xyes
40818then :
40819  ac_have_decl=1
40820else $as_nop
40821  ac_have_decl=0
40822fi
40823printf "%s\n" "#define HAVE_DECL___FSETLOCKING $ac_have_decl" >>confdefs.h
40824
40825
40826
40827
40828
40829
40830
40831      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tcgetattr" >&5
40832printf %s "checking for tcgetattr... " >&6; }
40833if test ${gl_cv_func_tcgetattr+y}
40834then :
40835  printf %s "(cached) " >&6
40836else $as_nop
40837  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40838/* end confdefs.h.  */
40839#include <termios.h>
40840            struct termios x;
40841
40842int
40843main (void)
40844{
40845return tcgetattr(0,&x);
40846  ;
40847  return 0;
40848}
40849
40850_ACEOF
40851if ac_fn_c_try_link "$LINENO"
40852then :
40853  gl_cv_func_tcgetattr=yes
40854else $as_nop
40855  gl_cv_func_tcgetattr=no
40856fi
40857rm -f core conftest.err conftest.$ac_objext conftest.beam \
40858    conftest$ac_exeext conftest.$ac_ext
40859
40860fi
40861{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_tcgetattr" >&5
40862printf "%s\n" "$gl_cv_func_tcgetattr" >&6; }
40863  if test $gl_cv_func_tcgetattr = yes; then
40864    HAVE_TCGETATTR=1
40865  else
40866    HAVE_TCGETATTR=0
40867  fi
40868
40869printf "%s\n" "#define HAVE_TCGETATTR $HAVE_TCGETATTR" >>confdefs.h
40870
40871
40872      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tcsetattr" >&5
40873printf %s "checking for tcsetattr... " >&6; }
40874if test ${gl_cv_func_tcsetattr+y}
40875then :
40876  printf %s "(cached) " >&6
40877else $as_nop
40878  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40879/* end confdefs.h.  */
40880#include <termios.h>
40881            struct termios x;
40882
40883int
40884main (void)
40885{
40886return tcsetattr(0,0,&x);
40887  ;
40888  return 0;
40889}
40890
40891_ACEOF
40892if ac_fn_c_try_link "$LINENO"
40893then :
40894  gl_cv_func_tcsetattr=yes
40895else $as_nop
40896  gl_cv_func_tcsetattr=no
40897fi
40898rm -f core conftest.err conftest.$ac_objext conftest.beam \
40899    conftest$ac_exeext conftest.$ac_ext
40900
40901fi
40902{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_tcsetattr" >&5
40903printf "%s\n" "$gl_cv_func_tcsetattr" >&6; }
40904  if test $gl_cv_func_tcsetattr = yes; then
40905    HAVE_TCSETATTR=1
40906  else
40907    HAVE_TCSETATTR=0
40908  fi
40909
40910printf "%s\n" "#define HAVE_TCSETATTR $HAVE_TCSETATTR" >>confdefs.h
40911
40912
40913  fi
40914
40915
40916
40917
40918
40919
40920
40921
40922
40923          GL_GNULIB_GETPASS=1
40924
40925
40926
40927
40928
40929printf "%s\n" "#define GNULIB_TEST_GETPASS 1" >>confdefs.h
40930
40931
40932
40933
40934  if test "$ac_cv_header_winsock2_h" = yes; then
40935
40936
40937
40938
40939
40940
40941
40942
40943  gl_LIBOBJS="$gl_LIBOBJS getpeername.$ac_objext"
40944
40945  fi
40946
40947
40948
40949
40950
40951
40952
40953
40954
40955          GL_GNULIB_GETPEERNAME=1
40956
40957
40958
40959
40960
40961printf "%s\n" "#define GNULIB_TEST_GETPEERNAME 1" >>confdefs.h
40962
40963
40964
40965
40966
40967
40968  ac_found=0
40969  ac_fn_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
40970" "$ac_c_undeclared_builtin_options" "CFLAGS"
40971if test "x$ac_cv_have_decl_program_invocation_name" = xyes
40972then :
40973  ac_have_decl=1
40974else $as_nop
40975  ac_have_decl=0
40976fi
40977printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
40978if test $ac_have_decl = 1
40979then :
40980  ac_found=1
40981fi
40982
40983  ac_fn_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
40984" "$ac_c_undeclared_builtin_options" "CFLAGS"
40985if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes
40986then :
40987  ac_have_decl=1
40988else $as_nop
40989  ac_have_decl=0
40990fi
40991printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl" >>confdefs.h
40992if test $ac_have_decl = 1
40993then :
40994  ac_found=1
40995fi
40996
40997  ac_fn_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
40998" "$ac_c_undeclared_builtin_options" "CFLAGS"
40999if test "x$ac_cv_have_decl___argv" = xyes
41000then :
41001  ac_have_decl=1
41002else $as_nop
41003  ac_have_decl=0
41004fi
41005printf "%s\n" "#define HAVE_DECL___ARGV $ac_have_decl" >>confdefs.h
41006if test $ac_have_decl = 1
41007then :
41008  ac_found=1
41009fi
41010
41011
41012  # Incur the cost of this test only if none of the above worked.
41013  if test $ac_found = 0; then
41014    # On OpenBSD 5.1, using the global __progname variable appears to be
41015    # the only way to implement getprogname.
41016    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
41017printf %s "checking whether __progname is defined in default libraries... " >&6; }
41018if test ${gl_cv_var___progname+y}
41019then :
41020  printf %s "(cached) " >&6
41021else $as_nop
41022
41023        gl_cv_var___progname=
41024        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41025/* end confdefs.h.  */
41026extern char *__progname;
41027int
41028main (void)
41029{
41030return *__progname;
41031
41032  ;
41033  return 0;
41034}
41035_ACEOF
41036if ac_fn_c_try_link "$LINENO"
41037then :
41038  gl_cv_var___progname=yes
41039
41040fi
41041rm -f core conftest.err conftest.$ac_objext conftest.beam \
41042    conftest$ac_exeext conftest.$ac_ext
41043
41044
41045fi
41046{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
41047printf "%s\n" "$gl_cv_var___progname" >&6; }
41048    if test "$gl_cv_var___progname" = yes; then
41049
41050printf "%s\n" "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
41051
41052    fi
41053  fi
41054
41055
41056
41057
41058
41059  if test "$ac_cv_func_getrandom" != yes; then
41060    HAVE_GETRANDOM=0
41061  else
41062        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getrandom is compatible with its GNU+BSD signature" >&5
41063printf %s "checking whether getrandom is compatible with its GNU+BSD signature... " >&6; }
41064if test ${gl_cv_func_getrandom_ok+y}
41065then :
41066  printf %s "(cached) " >&6
41067else $as_nop
41068  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41069/* end confdefs.h.  */
41070/* Additional includes are needed before <sys/random.h> on uClibc
41071                 and Mac OS X.  */
41072              #include <sys/types.h>
41073              #include <stdlib.h>
41074              #include <sys/random.h>
41075              ssize_t getrandom (void *, size_t, unsigned int);
41076
41077int
41078main (void)
41079{
41080
41081  ;
41082  return 0;
41083}
41084
41085_ACEOF
41086if ac_fn_c_try_compile "$LINENO"
41087then :
41088  gl_cv_func_getrandom_ok=yes
41089else $as_nop
41090  gl_cv_func_getrandom_ok=no
41091fi
41092rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
41093
41094fi
41095{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getrandom_ok" >&5
41096printf "%s\n" "$gl_cv_func_getrandom_ok" >&6; }
41097    if test $gl_cv_func_getrandom_ok = no; then
41098      REPLACE_GETRANDOM=1
41099    fi
41100  fi
41101
41102  case "$host_os" in
41103    mingw*)
41104      ac_fn_c_check_header_compile "$LINENO" "bcrypt.h" "ac_cv_header_bcrypt_h" "#include <windows.h>
41105
41106"
41107if test "x$ac_cv_header_bcrypt_h" = xyes
41108then :
41109  printf "%s\n" "#define HAVE_BCRYPT_H 1" >>confdefs.h
41110
41111fi
41112
41113      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the bcrypt library is guaranteed to be present" >&5
41114printf %s "checking whether the bcrypt library is guaranteed to be present... " >&6; }
41115if test ${gl_cv_lib_assume_bcrypt+y}
41116then :
41117  printf %s "(cached) " >&6
41118else $as_nop
41119  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41120/* end confdefs.h.  */
41121#include <windows.h>
41122int
41123main (void)
41124{
41125#if !(_WIN32_WINNT >= _WIN32_WINNT_WIN7)
41126                  cannot assume it
41127                #endif
41128
41129  ;
41130  return 0;
41131}
41132
41133_ACEOF
41134if ac_fn_c_try_compile "$LINENO"
41135then :
41136  gl_cv_lib_assume_bcrypt=yes
41137else $as_nop
41138  gl_cv_lib_assume_bcrypt=no
41139fi
41140rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
41141
41142fi
41143{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_assume_bcrypt" >&5
41144printf "%s\n" "$gl_cv_lib_assume_bcrypt" >&6; }
41145      if test $gl_cv_lib_assume_bcrypt = yes; then
41146
41147printf "%s\n" "#define HAVE_LIB_BCRYPT 1" >>confdefs.h
41148
41149        LIB_GETRANDOM='-lbcrypt'
41150      else
41151        LIB_GETRANDOM='-ladvapi32'
41152      fi
41153      ;;
41154    *)
41155      LIB_GETRANDOM= ;;
41156  esac
41157
41158
41159  if test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1; then
41160
41161
41162
41163
41164
41165
41166
41167
41168  gl_LIBOBJS="$gl_LIBOBJS getrandom.$ac_objext"
41169
41170  fi
41171
41172
41173
41174
41175
41176
41177
41178
41179
41180          GL_GNULIB_GETRANDOM=1
41181
41182
41183
41184
41185
41186printf "%s\n" "#define GNULIB_TEST_GETRANDOM 1" >>confdefs.h
41187
41188
41189
41190
41191  if test "$ac_cv_header_winsock2_h" = yes; then
41192
41193
41194
41195
41196
41197
41198
41199
41200  gl_LIBOBJS="$gl_LIBOBJS getsockname.$ac_objext"
41201
41202  fi
41203
41204
41205
41206
41207
41208
41209
41210
41211
41212          GL_GNULIB_GETSOCKNAME=1
41213
41214
41215
41216
41217
41218printf "%s\n" "#define GNULIB_TEST_GETSOCKNAME 1" >>confdefs.h
41219
41220
41221
41222
41223
41224
41225
41226
41227
41228
41229
41230
41231
41232
41233
41234
41235
41236  gl_gettimeofday_timezone=void
41237  if test $ac_cv_func_gettimeofday != yes; then
41238    HAVE_GETTIMEOFDAY=0
41239  else
41240    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
41241printf %s "checking for gettimeofday with POSIX signature... " >&6; }
41242if test ${gl_cv_func_gettimeofday_posix_signature+y}
41243then :
41244  printf %s "(cached) " >&6
41245else $as_nop
41246  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41247/* end confdefs.h.  */
41248#include <sys/time.h>
41249              struct timeval c;
41250              int gettimeofday (struct timeval *restrict, void *restrict);
41251
41252int
41253main (void)
41254{
41255/* glibc uses struct timezone * rather than the POSIX void *
41256                 if _GNU_SOURCE is defined.  However, since the only portable
41257                 use of gettimeofday uses NULL as the second parameter, and
41258                 since the glibc definition is actually more typesafe, it is
41259                 not worth wrapping this to get a compliant signature.  */
41260              int (*f) (struct timeval *restrict, void *restrict)
41261                = gettimeofday;
41262              int x = f (&c, 0);
41263              return !(x | c.tv_sec | c.tv_usec);
41264
41265  ;
41266  return 0;
41267}
41268_ACEOF
41269if ac_fn_c_try_compile "$LINENO"
41270then :
41271  gl_cv_func_gettimeofday_posix_signature=yes
41272else $as_nop
41273  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41274/* end confdefs.h.  */
41275#include <sys/time.h>
41276int gettimeofday (struct timeval *restrict, struct timezone *restrict);
41277
41278int
41279main (void)
41280{
41281
41282  ;
41283  return 0;
41284}
41285_ACEOF
41286if ac_fn_c_try_compile "$LINENO"
41287then :
41288  gl_cv_func_gettimeofday_posix_signature=almost
41289else $as_nop
41290  gl_cv_func_gettimeofday_posix_signature=no
41291fi
41292rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
41293fi
41294rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
41295fi
41296{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
41297printf "%s\n" "$gl_cv_func_gettimeofday_posix_signature" >&6; }
41298    if test $gl_cv_func_gettimeofday_posix_signature = almost; then
41299      gl_gettimeofday_timezone='struct timezone'
41300    elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
41301      REPLACE_GETTIMEOFDAY=1
41302    fi
41303        if test $REPLACE_STRUCT_TIMEVAL = 1; then
41304      REPLACE_GETTIMEOFDAY=1
41305    fi
41306            case "$host_os" in
41307      mingw*) REPLACE_GETTIMEOFDAY=1 ;;
41308    esac
41309  fi
41310
41311printf "%s\n" "#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone" >>confdefs.h
41312
41313
41314  if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
41315
41316
41317
41318
41319
41320
41321
41322
41323  gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
41324
41325    :
41326  fi
41327
41328
41329
41330
41331
41332
41333
41334
41335
41336          GL_GNULIB_GETTIMEOFDAY=1
41337
41338
41339
41340
41341
41342printf "%s\n" "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
41343
41344
41345
41346  # Autoconf 2.61a.99 and earlier don't support linking a file only
41347  # in VPATH builds.  But since GNUmakefile is for maintainer use
41348  # only, it does not matter if we skip the link with older autoconf.
41349  # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
41350  # builds, so use a shell variable to bypass this.
41351  GNUmakefile=GNUmakefile
41352  ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
41353
41354
41355
41356
41357
41358
41359      ac_fn_c_check_func "$LINENO" "group_member" "ac_cv_func_group_member"
41360if test "x$ac_cv_func_group_member" = xyes
41361then :
41362
41363else $as_nop
41364
41365    HAVE_GROUP_MEMBER=0
41366
41367fi
41368
41369
41370  if test $HAVE_GROUP_MEMBER = 0; then
41371
41372
41373
41374
41375
41376
41377
41378
41379  gl_LIBOBJS="$gl_LIBOBJS group-member.$ac_objext"
41380
41381
41382
41383
41384  fi
41385
41386
41387
41388
41389
41390
41391
41392
41393
41394          GL_GNULIB_GROUP_MEMBER=1
41395
41396
41397
41398
41399
41400printf "%s\n" "#define GNULIB_TEST_GROUP_MEMBER 1" >>confdefs.h
41401
41402
41403
41404
41405  LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL"
41406
41407
41408
41409                  HOSTENT_LIB=
41410  gl_saved_libs="$LIBS"
41411  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
41412printf %s "checking for library containing gethostbyname... " >&6; }
41413if test ${ac_cv_search_gethostbyname+y}
41414then :
41415  printf %s "(cached) " >&6
41416else $as_nop
41417  ac_func_search_save_LIBS=$LIBS
41418cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41419/* end confdefs.h.  */
41420
41421/* Override any GCC internal prototype to avoid an error.
41422   Use char because int might match the return type of a GCC
41423   builtin and then its argument prototype would still apply.  */
41424char gethostbyname ();
41425int
41426main (void)
41427{
41428return gethostbyname ();
41429  ;
41430  return 0;
41431}
41432_ACEOF
41433for ac_lib in '' nsl network net
41434do
41435  if test -z "$ac_lib"; then
41436    ac_res="none required"
41437  else
41438    ac_res=-l$ac_lib
41439    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
41440  fi
41441  if ac_fn_c_try_link "$LINENO"
41442then :
41443  ac_cv_search_gethostbyname=$ac_res
41444fi
41445rm -f core conftest.err conftest.$ac_objext conftest.beam \
41446    conftest$ac_exeext
41447  if test ${ac_cv_search_gethostbyname+y}
41448then :
41449  break
41450fi
41451done
41452if test ${ac_cv_search_gethostbyname+y}
41453then :
41454
41455else $as_nop
41456  ac_cv_search_gethostbyname=no
41457fi
41458rm conftest.$ac_ext
41459LIBS=$ac_func_search_save_LIBS
41460fi
41461{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
41462printf "%s\n" "$ac_cv_search_gethostbyname" >&6; }
41463ac_res=$ac_cv_search_gethostbyname
41464if test "$ac_res" != no
41465then :
41466  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
41467  if test "$ac_cv_search_gethostbyname" != "none required"; then
41468       HOSTENT_LIB="$ac_cv_search_gethostbyname"
41469     fi
41470fi
41471
41472  LIBS="$gl_saved_libs"
41473  if test -z "$HOSTENT_LIB"; then
41474
41475  for ac_func in gethostbyname
41476do :
41477  ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
41478if test "x$ac_cv_func_gethostbyname" = xyes
41479then :
41480  printf "%s\n" "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h
41481
41482else $as_nop
41483
41484      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in winsock2.h and -lws2_32" >&5
41485printf %s "checking for gethostbyname in winsock2.h and -lws2_32... " >&6; }
41486if test ${gl_cv_w32_gethostbyname+y}
41487then :
41488  printf %s "(cached) " >&6
41489else $as_nop
41490  gl_cv_w32_gethostbyname=no
41491         gl_save_LIBS="$LIBS"
41492         LIBS="$LIBS -lws2_32"
41493         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41494/* end confdefs.h.  */
41495
41496#ifdef HAVE_WINSOCK2_H
41497#include <winsock2.h>
41498#endif
41499#include <stddef.h>
41500
41501int
41502main (void)
41503{
41504gethostbyname(NULL);
41505  ;
41506  return 0;
41507}
41508_ACEOF
41509if ac_fn_c_try_link "$LINENO"
41510then :
41511  gl_cv_w32_gethostbyname=yes
41512fi
41513rm -f core conftest.err conftest.$ac_objext conftest.beam \
41514    conftest$ac_exeext conftest.$ac_ext
41515         LIBS="$gl_save_LIBS"
41516
41517fi
41518{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_w32_gethostbyname" >&5
41519printf "%s\n" "$gl_cv_w32_gethostbyname" >&6; }
41520      if test "$gl_cv_w32_gethostbyname" = "yes"; then
41521        HOSTENT_LIB="-lws2_32"
41522      fi
41523
41524fi
41525
41526done
41527  fi
41528
41529
41530
41531
41532
41533
41534
41535
41536
41537
41538
41539
41540          GL_GNULIB_ICONV=1
41541
41542
41543
41544
41545
41546
41547
41548
41549
41550
41551
41552
41553
41554
41555
41556
41557
41558                HAVE_INET_NTOP=1
41559  INET_NTOP_LIB=
41560
41561
41562
41563
41564  if test $ac_cv_header_sys_socket_h != yes; then
41565                    ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
41566if test "x$ac_cv_header_winsock2_h" = xyes
41567then :
41568  printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
41569
41570fi
41571
41572  fi
41573  if test "$ac_cv_header_winsock2_h" = yes; then
41574    HAVE_WINSOCK2_H=1
41575    UNISTD_H_HAVE_WINSOCK2_H=1
41576    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
41577  else
41578    HAVE_WINSOCK2_H=0
41579  fi
41580
41581
41582  if test $HAVE_WINSOCK2_H = 1; then
41583                    REPLACE_INET_NTOP=1
41584    ac_fn_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <ws2tcpip.h>
41585" "$ac_c_undeclared_builtin_options" "CFLAGS"
41586if test "x$ac_cv_have_decl_inet_ntop" = xyes
41587then :
41588  ac_have_decl=1
41589else $as_nop
41590  ac_have_decl=0
41591fi
41592printf "%s\n" "#define HAVE_DECL_INET_NTOP $ac_have_decl" >>confdefs.h
41593
41594    if test $ac_cv_have_decl_inet_ntop = yes; then
41595      INET_NTOP_LIB="-lws2_32"
41596    else
41597      HAVE_DECL_INET_NTOP=0
41598    fi
41599  else
41600    gl_save_LIBS=$LIBS
41601    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
41602printf %s "checking for library containing inet_ntop... " >&6; }
41603if test ${ac_cv_search_inet_ntop+y}
41604then :
41605  printf %s "(cached) " >&6
41606else $as_nop
41607  ac_func_search_save_LIBS=$LIBS
41608cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41609/* end confdefs.h.  */
41610
41611/* Override any GCC internal prototype to avoid an error.
41612   Use char because int might match the return type of a GCC
41613   builtin and then its argument prototype would still apply.  */
41614char inet_ntop ();
41615int
41616main (void)
41617{
41618return inet_ntop ();
41619  ;
41620  return 0;
41621}
41622_ACEOF
41623for ac_lib in '' nsl resolv network
41624do
41625  if test -z "$ac_lib"; then
41626    ac_res="none required"
41627  else
41628    ac_res=-l$ac_lib
41629    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
41630  fi
41631  if ac_fn_c_try_link "$LINENO"
41632then :
41633  ac_cv_search_inet_ntop=$ac_res
41634fi
41635rm -f core conftest.err conftest.$ac_objext conftest.beam \
41636    conftest$ac_exeext
41637  if test ${ac_cv_search_inet_ntop+y}
41638then :
41639  break
41640fi
41641done
41642if test ${ac_cv_search_inet_ntop+y}
41643then :
41644
41645else $as_nop
41646  ac_cv_search_inet_ntop=no
41647fi
41648rm conftest.$ac_ext
41649LIBS=$ac_func_search_save_LIBS
41650fi
41651{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
41652printf "%s\n" "$ac_cv_search_inet_ntop" >&6; }
41653ac_res=$ac_cv_search_inet_ntop
41654if test "$ac_res" != no
41655then :
41656  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
41657
41658else $as_nop
41659  ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
41660if test "x$ac_cv_func_inet_ntop" = xyes
41661then :
41662  printf "%s\n" "#define HAVE_INET_NTOP 1" >>confdefs.h
41663
41664fi
41665
41666       if test $ac_cv_func_inet_ntop = no; then
41667         HAVE_INET_NTOP=0
41668       fi
41669
41670fi
41671
41672    LIBS=$gl_save_LIBS
41673
41674    if test "$ac_cv_search_inet_ntop" != "no" \
41675       && test "$ac_cv_search_inet_ntop" != "none required"; then
41676      INET_NTOP_LIB="$ac_cv_search_inet_ntop"
41677    fi
41678
41679
41680    ac_fn_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <arpa/inet.h>
41681        #if HAVE_NETDB_H
41682        # include <netdb.h>
41683        #endif
41684
41685" "$ac_c_undeclared_builtin_options" "CFLAGS"
41686if test "x$ac_cv_have_decl_inet_ntop" = xyes
41687then :
41688  ac_have_decl=1
41689else $as_nop
41690  ac_have_decl=0
41691fi
41692printf "%s\n" "#define HAVE_DECL_INET_NTOP $ac_have_decl" >>confdefs.h
41693
41694    if test $ac_cv_have_decl_inet_ntop = no; then
41695      HAVE_DECL_INET_NTOP=0
41696    fi
41697  fi
41698
41699
41700  if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then
41701
41702
41703
41704
41705
41706
41707
41708
41709  gl_LIBOBJS="$gl_LIBOBJS inet_ntop.$ac_objext"
41710
41711
41712
41713
41714  fi
41715
41716
41717
41718
41719
41720
41721
41722
41723
41724          GL_GNULIB_INET_NTOP=1
41725
41726
41727
41728
41729
41730
41731  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5
41732printf %s "checking whether the compiler generally respects inline... " >&6; }
41733if test ${gl_cv_c_inline_effective+y}
41734then :
41735  printf %s "(cached) " >&6
41736else $as_nop
41737  if test $ac_cv_c_inline = no; then
41738       gl_cv_c_inline_effective=no
41739     else
41740                                          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41741/* end confdefs.h.  */
41742
41743int
41744main (void)
41745{
41746#ifdef __NO_INLINE__
41747               #error "inline is not effective"
41748             #endif
41749  ;
41750  return 0;
41751}
41752_ACEOF
41753if ac_fn_c_try_compile "$LINENO"
41754then :
41755  gl_cv_c_inline_effective=yes
41756else $as_nop
41757  gl_cv_c_inline_effective=no
41758fi
41759rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
41760     fi
41761
41762fi
41763{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5
41764printf "%s\n" "$gl_cv_c_inline_effective" >&6; }
41765  if test $gl_cv_c_inline_effective = yes; then
41766
41767printf "%s\n" "#define HAVE_INLINE 1" >>confdefs.h
41768
41769  fi
41770
41771
41772
41773
41774
41775
41776
41777
41778
41779
41780
41781  HAVE_IOCTL=1
41782  if test "$ac_cv_header_winsock2_h" = yes; then
41783                HAVE_IOCTL=0
41784  else
41785    ac_fn_c_check_func "$LINENO" "ioctl" "ac_cv_func_ioctl"
41786if test "x$ac_cv_func_ioctl" = xyes
41787then :
41788  printf "%s\n" "#define HAVE_IOCTL 1" >>confdefs.h
41789
41790fi
41791
41792                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ioctl with POSIX signature" >&5
41793printf %s "checking for ioctl with POSIX signature... " >&6; }
41794if test ${gl_cv_func_ioctl_posix_signature+y}
41795then :
41796  printf %s "(cached) " >&6
41797else $as_nop
41798  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41799/* end confdefs.h.  */
41800#include <sys/ioctl.h>
41801              /* On some platforms, ioctl() is declared in <unistd.h>.  */
41802              #include <unistd.h>
41803
41804int
41805main (void)
41806{
41807extern
41808              #ifdef __cplusplus
41809              "C"
41810              #endif
41811              int ioctl (int, int, ...);
41812
41813  ;
41814  return 0;
41815}
41816
41817_ACEOF
41818if ac_fn_c_try_compile "$LINENO"
41819then :
41820  gl_cv_func_ioctl_posix_signature=yes
41821else $as_nop
41822  gl_cv_func_ioctl_posix_signature=no
41823fi
41824rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
41825
41826fi
41827{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ioctl_posix_signature" >&5
41828printf "%s\n" "$gl_cv_func_ioctl_posix_signature" >&6; }
41829    if test $gl_cv_func_ioctl_posix_signature != yes; then
41830      REPLACE_IOCTL=1
41831    fi
41832  fi
41833
41834  if test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1; then
41835
41836
41837
41838
41839
41840
41841
41842
41843  gl_LIBOBJS="$gl_LIBOBJS ioctl.$ac_objext"
41844
41845  fi
41846
41847
41848
41849
41850
41851
41852
41853
41854
41855          GL_GNULIB_IOCTL=1
41856
41857
41858
41859
41860
41861printf "%s\n" "#define GNULIB_TEST_IOCTL 1" >>confdefs.h
41862
41863
41864
41865
41866
41867
41868
41869
41870  if test $ac_cv_func_isblank = no; then
41871    HAVE_ISBLANK=0
41872  fi
41873
41874  if test $HAVE_ISBLANK = 0; then
41875
41876
41877
41878
41879
41880
41881
41882
41883  gl_LIBOBJS="$gl_LIBOBJS isblank.$ac_objext"
41884
41885  fi
41886
41887
41888printf "%s\n" "#define GNULIB_ISBLANK 1" >>confdefs.h
41889
41890
41891
41892
41893
41894
41895
41896
41897
41898
41899
41900          GL_GNULIB_ISBLANK=1
41901
41902
41903
41904
41905
41906
41907
41908
41909
41910  ac_fn_check_decl "$LINENO" "iswblank" "ac_cv_have_decl_iswblank" "
41911    #include <wchar.h>
41912    #include <wctype.h>
41913
41914" "$ac_c_undeclared_builtin_options" "CFLAGS"
41915if test "x$ac_cv_have_decl_iswblank" = xyes
41916then :
41917  ac_have_decl=1
41918else $as_nop
41919  ac_have_decl=0
41920fi
41921printf "%s\n" "#define HAVE_DECL_ISWBLANK $ac_have_decl" >>confdefs.h
41922
41923  if test $ac_cv_func_iswblank = no; then
41924    HAVE_ISWBLANK=0
41925    if test $ac_cv_have_decl_iswblank = yes; then
41926      REPLACE_ISWBLANK=1
41927    fi
41928  fi
41929  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
41930        :
41931  else
41932    if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
41933            :
41934    fi
41935  fi
41936
41937
41938  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
41939    :
41940  else
41941    if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
41942
41943
41944
41945
41946
41947
41948
41949
41950  gl_LIBOBJS="$gl_LIBOBJS iswblank.$ac_objext"
41951
41952    fi
41953  fi
41954
41955
41956
41957
41958
41959
41960
41961
41962
41963          GL_GNULIB_ISWBLANK=1
41964
41965
41966
41967
41968
41969printf "%s\n" "#define GNULIB_TEST_ISWBLANK 1" >>confdefs.h
41970
41971
41972
41973
41974
41975
41976
41977
41978
41979
41980
41981  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
41982        REPLACE_ISWDIGIT="$REPLACE_ISWCNTRL"
41983  else
41984    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswdigit is ISO C compliant" >&5
41985printf %s "checking whether iswdigit is ISO C compliant... " >&6; }
41986if test ${gl_cv_func_iswdigit_works+y}
41987then :
41988  printf %s "(cached) " >&6
41989else $as_nop
41990
41991                     case "$host_os" in
41992         # Guess no on FreeBSD, NetBSD, Solaris, native Windows.
41993         freebsd* | dragonfly* | netbsd* | solaris* | mingw*)
41994           gl_cv_func_iswdigit_works="guessing no" ;;
41995         # Guess yes otherwise.
41996         *) gl_cv_func_iswdigit_works="guessing yes" ;;
41997       esac
41998       if test $LOCALE_FR != none || test $LOCALE_JA != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_ZH_CN != none; then
41999         if test "$cross_compiling" = yes
42000then :
42001  :
42002else $as_nop
42003  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42004/* end confdefs.h.  */
42005
42006#include <locale.h>
42007#include <stdlib.h>
42008#include <string.h>
42009#include <wchar.h>
42010#include <wctype.h>
42011
42012/* Returns the value of iswdigit for the multibyte character s[0..n-1].  */
42013static int
42014for_character (const char *s, size_t n)
42015{
42016  mbstate_t state;
42017  wchar_t wc;
42018  size_t ret;
42019
42020  memset (&state, '\0', sizeof (mbstate_t));
42021  wc = (wchar_t) 0xBADFACE;
42022  ret = mbrtowc (&wc, s, n, &state);
42023  if (ret != n)
42024    abort ();
42025
42026  return iswdigit (wc);
42027}
42028
42029int
42030main (int argc, char *argv[])
42031{
42032  int is;
42033  int result = 0;
42034
42035  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
42036    {
42037      /* This fails on mingw, MSVC 14.  */
42038      /* U+00B2 SUPERSCRIPT TWO */
42039      is = for_character ("\262", 1);
42040      if (!(is == 0))
42041        result |= 1;
42042    }
42043  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
42044    {
42045      /* This fails on NetBSD 8.0.  */
42046      /* U+FF11 FULLWIDTH DIGIT ONE */
42047      is = for_character ("\243\261", 2);
42048      if (!(is == 0))
42049        result |= 2;
42050    }
42051  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
42052    {
42053      /* This fails on FreeBSD 13.0, NetBSD 8.0, MSVC 14.  */
42054      /* U+0663 ARABIC-INDIC DIGIT THREE */
42055      is = for_character ("\331\243", 2);
42056      if (!(is == 0))
42057        result |= 4;
42058      /* This fails on FreeBSD 13.0, NetBSD 8.0, MSVC 14.  */
42059      /* U+FF11 FULLWIDTH DIGIT ONE */
42060      is = for_character ("\357\274\221", 3);
42061      if (!(is == 0))
42062        result |= 8;
42063    }
42064  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
42065    {
42066      /* This fails on NetBSD 8.0, Solaris 10, Solaris 11.4.  */
42067      /* U+FF11 FULLWIDTH DIGIT ONE */
42068      is = for_character ("\243\261", 2);
42069      if (!(is == 0))
42070        result |= 16;
42071    }
42072  return result;
42073}
42074_ACEOF
42075if ac_fn_c_try_run "$LINENO"
42076then :
42077  gl_cv_func_iswdigit_works=yes
42078else $as_nop
42079  gl_cv_func_iswdigit_works=no
42080fi
42081rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42082  conftest.$ac_objext conftest.beam conftest.$ac_ext
42083fi
42084
42085       fi
42086
42087fi
42088{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswdigit_works" >&5
42089printf "%s\n" "$gl_cv_func_iswdigit_works" >&6; }
42090    case "$gl_cv_func_iswdigit_works" in
42091      *yes) ;;
42092      *) REPLACE_ISWDIGIT=1 ;;
42093    esac
42094  fi
42095
42096  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
42097    :
42098  else
42099    if test $REPLACE_ISWDIGIT = 1; then
42100
42101
42102
42103
42104
42105
42106
42107
42108  gl_LIBOBJS="$gl_LIBOBJS iswdigit.$ac_objext"
42109
42110    fi
42111  fi
42112
42113
42114
42115
42116
42117
42118
42119
42120
42121          GL_GNULIB_ISWDIGIT=1
42122
42123
42124
42125
42126
42127printf "%s\n" "#define GNULIB_TEST_ISWDIGIT 1" >>confdefs.h
42128
42129
42130
42131
42132
42133
42134
42135
42136
42137
42138  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
42139        REPLACE_ISWXDIGIT="$REPLACE_ISWCNTRL"
42140  else
42141    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswxdigit is ISO C compliant" >&5
42142printf %s "checking whether iswxdigit is ISO C compliant... " >&6; }
42143if test ${gl_cv_func_iswxdigit_works+y}
42144then :
42145  printf %s "(cached) " >&6
42146else $as_nop
42147
42148                     case "$host_os" in
42149         # Guess no on FreeBSD, NetBSD, Solaris, native Windows.
42150         freebsd* | dragonfly* | netbsd* | solaris* | mingw*)
42151           gl_cv_func_iswxdigit_works="guessing no" ;;
42152         # Guess yes otherwise.
42153         *) gl_cv_func_iswxdigit_works="guessing yes" ;;
42154       esac
42155       if test $LOCALE_JA != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_ZH_CN != none; then
42156         if test "$cross_compiling" = yes
42157then :
42158  :
42159else $as_nop
42160  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42161/* end confdefs.h.  */
42162
42163#include <locale.h>
42164#include <stdlib.h>
42165#include <string.h>
42166#include <wchar.h>
42167#include <wctype.h>
42168
42169/* Returns the value of iswxdigit for the multibyte character s[0..n-1].  */
42170static int
42171for_character (const char *s, size_t n)
42172{
42173  mbstate_t state;
42174  wchar_t wc;
42175  size_t ret;
42176
42177  memset (&state, '\0', sizeof (mbstate_t));
42178  wc = (wchar_t) 0xBADFACE;
42179  ret = mbrtowc (&wc, s, n, &state);
42180  if (ret != n)
42181    abort ();
42182
42183  return iswxdigit (wc);
42184}
42185
42186int
42187main (int argc, char *argv[])
42188{
42189  int is;
42190  int result = 0;
42191
42192  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
42193    {
42194      /* This fails on NetBSD 8.0.  */
42195      /* U+FF21 FULLWIDTH LATIN CAPITAL LETTER A */
42196      is = for_character ("\243\301", 2);
42197      if (!(is == 0))
42198        result |= 1;
42199    }
42200  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
42201    {
42202      /* This fails on FreeBSD 13.0.  */
42203      /* U+0663 ARABIC-INDIC DIGIT THREE */
42204      is = for_character ("\331\243", 2);
42205      if (!(is == 0))
42206        result |= 2;
42207      /* This fails on MSVC 14.  */
42208      /* U+FF21 FULLWIDTH LATIN CAPITAL LETTER A */
42209      is = for_character ("\357\274\241", 3);
42210      if (!(is == 0))
42211        result |= 4;
42212    }
42213  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
42214    {
42215      /* This fails on Solaris 10, Solaris 11.4.  */
42216      /* U+FF11 FULLWIDTH DIGIT ONE */
42217      is = for_character ("\243\261", 2);
42218      if (!(is == 0))
42219        result |= 8;
42220    }
42221  return result;
42222}
42223_ACEOF
42224if ac_fn_c_try_run "$LINENO"
42225then :
42226  gl_cv_func_iswxdigit_works=yes
42227else $as_nop
42228  gl_cv_func_iswxdigit_works=no
42229fi
42230rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42231  conftest.$ac_objext conftest.beam conftest.$ac_ext
42232fi
42233
42234       fi
42235
42236fi
42237{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswxdigit_works" >&5
42238printf "%s\n" "$gl_cv_func_iswxdigit_works" >&6; }
42239    case "$gl_cv_func_iswxdigit_works" in
42240      *yes) ;;
42241      *) REPLACE_ISWXDIGIT=1 ;;
42242    esac
42243  fi
42244
42245  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
42246    :
42247  else
42248    if test $REPLACE_ISWXDIGIT = 1; then
42249
42250
42251
42252
42253
42254
42255
42256
42257  gl_LIBOBJS="$gl_LIBOBJS iswxdigit.$ac_objext"
42258
42259    fi
42260  fi
42261
42262
42263
42264
42265
42266
42267
42268
42269
42270          GL_GNULIB_ISWXDIGIT=1
42271
42272
42273
42274
42275
42276printf "%s\n" "#define GNULIB_TEST_ISWXDIGIT 1" >>confdefs.h
42277
42278
42279
42280
42281
42282
42283
42284
42285
42286
42287
42288  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5
42289printf %s "checking whether the compiler supports the __inline keyword... " >&6; }
42290if test ${gl_cv_c___inline+y}
42291then :
42292  printf %s "(cached) " >&6
42293else $as_nop
42294  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42295/* end confdefs.h.  */
42296typedef int foo_t;
42297           static __inline foo_t foo (void) { return 0; }
42298int
42299main (void)
42300{
42301return foo ();
42302  ;
42303  return 0;
42304}
42305_ACEOF
42306if ac_fn_c_try_compile "$LINENO"
42307then :
42308  gl_cv_c___inline=yes
42309else $as_nop
42310  gl_cv_c___inline=no
42311fi
42312rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
42313fi
42314{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5
42315printf "%s\n" "$gl_cv_c___inline" >&6; }
42316  if test $gl_cv_c___inline = yes; then
42317
42318printf "%s\n" "#define HAVE___INLINE 1" >>confdefs.h
42319
42320  fi
42321
42322
42323
42324
42325  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use the included libunistring" >&5
42326printf %s "checking whether to use the included libunistring... " >&6; }
42327  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_libunistring_use_included" >&5
42328printf "%s\n" "$gl_libunistring_use_included" >&6; }
42329
42330
42331
42332
42333
42334  if test $ac_cv_func_link = no; then
42335    HAVE_LINK=0
42336  else
42337    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether link obeys POSIX" >&5
42338printf %s "checking whether link obeys POSIX... " >&6; }
42339if test ${gl_cv_func_link_works+y}
42340then :
42341  printf %s "(cached) " >&6
42342else $as_nop
42343  touch conftest.a
42344       # Assume that if we have lstat, we can also check symlinks.
42345       if test $ac_cv_func_lstat = yes; then
42346         ln -s conftest.a conftest.lnk
42347       fi
42348       if test "$cross_compiling" = yes
42349then :
42350  case "$host_os" in
42351                             # Guess yes on Linux systems.
42352            linux-* | linux) gl_cv_func_link_works="guessing yes" ;;
42353                             # Guess yes on glibc systems.
42354            *-gnu* | gnu*)   gl_cv_func_link_works="guessing yes" ;;
42355                             # If we don't know, obey --enable-cross-guesses.
42356            *)               gl_cv_func_link_works="$gl_cross_guess_normal" ;;
42357          esac
42358
42359else $as_nop
42360  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42361/* end confdefs.h.  */
42362#include <unistd.h>
42363             #include <stdio.h>
42364
42365int
42366main (void)
42367{
42368int result = 0;
42369             if (!link ("conftest.a", "conftest.b/"))
42370               result |= 1;
42371#if HAVE_LSTAT
42372             if (!link ("conftest.lnk/", "conftest.b"))
42373               result |= 2;
42374             if (rename ("conftest.a", "conftest.b"))
42375               result |= 4;
42376             if (!link ("conftest.b", "conftest.lnk"))
42377               result |= 8;
42378#endif
42379             return result;
42380
42381  ;
42382  return 0;
42383}
42384_ACEOF
42385if ac_fn_c_try_run "$LINENO"
42386then :
42387  gl_cv_func_link_works=yes
42388else $as_nop
42389  gl_cv_func_link_works=no
42390fi
42391rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42392  conftest.$ac_objext conftest.beam conftest.$ac_ext
42393fi
42394
42395       rm -f conftest.a conftest.b conftest.lnk
42396fi
42397{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_link_works" >&5
42398printf "%s\n" "$gl_cv_func_link_works" >&6; }
42399    case "$gl_cv_func_link_works" in
42400      *yes) ;;
42401      *)
42402        REPLACE_LINK=1
42403        ;;
42404    esac
42405  fi
42406
42407  if test $HAVE_LINK = 0 || test $REPLACE_LINK = 1; then
42408
42409
42410
42411
42412
42413
42414
42415
42416  gl_LIBOBJS="$gl_LIBOBJS link.$ac_objext"
42417
42418  fi
42419
42420
42421
42422
42423
42424
42425
42426
42427
42428          GL_GNULIB_LINK=1
42429
42430
42431
42432
42433
42434printf "%s\n" "#define GNULIB_TEST_LINK 1" >>confdefs.h
42435
42436
42437
42438
42439  if test "$ac_cv_header_winsock2_h" = yes; then
42440
42441
42442
42443
42444
42445
42446
42447
42448  gl_LIBOBJS="$gl_LIBOBJS listen.$ac_objext"
42449
42450  fi
42451
42452
42453
42454
42455
42456
42457
42458
42459
42460          GL_GNULIB_LISTEN=1
42461
42462
42463
42464
42465
42466printf "%s\n" "#define GNULIB_TEST_LISTEN 1" >>confdefs.h
42467
42468
42469
42470
42471
42472
42473    LOCALCHARSET_TESTS_ENVIRONMENT=
42474
42475
42476
42477
42478
42479
42480
42481
42482
42483
42484
42485  if test $REPLACE_STRUCT_LCONV = 1; then
42486    REPLACE_LOCALECONV=1
42487  fi
42488
42489  if test $REPLACE_LOCALECONV = 1; then
42490
42491
42492
42493
42494
42495
42496
42497
42498  gl_LIBOBJS="$gl_LIBOBJS localeconv.$ac_objext"
42499
42500
42501  ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
42502"
42503if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes
42504then :
42505
42506printf "%s\n" "#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1" >>confdefs.h
42507
42508
42509fi
42510
42511
42512  fi
42513
42514
42515
42516
42517
42518
42519
42520
42521
42522          GL_GNULIB_LOCALECONV=1
42523
42524
42525
42526
42527
42528printf "%s\n" "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
42529
42530
42531
42532
42533
42534  if test "$gl_threads_api" = posix; then
42535    # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
42536    # pthread_rwlock_* functions.
42537    has_rwlock=false
42538    ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
42539"
42540if test "x$ac_cv_type_pthread_rwlock_t" = xyes
42541then :
42542  has_rwlock=true
42543
42544printf "%s\n" "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
42545
42546fi
42547
42548    if $has_rwlock; then
42549
42550
42551     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5
42552printf %s "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; }
42553if test ${gl_cv_pthread_rwlock_rdlock_prefer_writer+y}
42554then :
42555  printf %s "(cached) " >&6
42556else $as_nop
42557  save_LIBS="$LIBS"
42558     LIBS="$LIBS $LIBMULTITHREAD"
42559     if test "$cross_compiling" = yes
42560then :
42561  case "$host_os" in
42562                         # Guess no on glibc systems.
42563          *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
42564                         # Guess no on musl systems.
42565          *-musl*)       gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
42566                         # Guess no on bionic systems.
42567          *-android*)    gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
42568                         # Guess yes on native Windows with the mingw-w64 winpthreads library.
42569                         # Guess no on native Windows with the gnulib windows-rwlock module.
42570          mingw*)        if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
42571                           gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
42572                         else
42573                           gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no"
42574                         fi
42575                         ;;
42576                         # If we don't know, obey --enable-cross-guesses.
42577          *)             gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;;
42578         esac
42579
42580else $as_nop
42581  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42582/* end confdefs.h.  */
42583
42584#include <errno.h>
42585#include <pthread.h>
42586#include <stdlib.h>
42587#include <unistd.h>
42588
42589#define SUCCEED() exit (0)
42590#define FAILURE() exit (1)
42591#define UNEXPECTED(n) (exit (10 + (n)))
42592
42593/* The main thread creates the waiting writer and the requesting reader threads
42594   in the default way; this guarantees that they have the same priority.
42595   We can reuse the main thread as first reader thread.  */
42596
42597static pthread_rwlock_t lock;
42598static pthread_t reader1;
42599static pthread_t writer;
42600static pthread_t reader2;
42601static pthread_t timer;
42602/* Used to pass control from writer to reader2 and from reader2 to timer,
42603   as in a relay race.
42604   Passing control from one running thread to another running thread
42605   is most likely faster than to create the second thread.  */
42606static pthread_mutex_t baton;
42607
42608static void *
42609timer_func (void *ignored)
42610{
42611  /* Step 13 (can be before or after step 12):
42612     The timer thread takes the baton, then waits a moment to make sure
42613     it can tell whether the second reader thread is blocked at step 12.  */
42614  if (pthread_mutex_lock (&baton))
42615    UNEXPECTED (13);
42616  usleep (100000);
42617  /* By the time we get here, it's clear that the second reader thread is
42618     blocked at step 12.  This is the desired behaviour.  */
42619  SUCCEED ();
42620}
42621
42622static void *
42623reader2_func (void *ignored)
42624{
42625  int err;
42626
42627  /* Step 8 (can be before or after step 7):
42628     The second reader thread takes the baton, then waits a moment to make sure
42629     the writer thread has reached step 7.  */
42630  if (pthread_mutex_lock (&baton))
42631    UNEXPECTED (8);
42632  usleep (100000);
42633  /* Step 9: The second reader thread requests the lock.  */
42634  err = pthread_rwlock_tryrdlock (&lock);
42635  if (err == 0)
42636    FAILURE ();
42637  else if (err != EBUSY)
42638    UNEXPECTED (9);
42639  /* Step 10: Launch a timer, to test whether the next call blocks.  */
42640  if (pthread_create (&timer, NULL, timer_func, NULL))
42641    UNEXPECTED (10);
42642  /* Step 11: Release the baton.  */
42643  if (pthread_mutex_unlock (&baton))
42644    UNEXPECTED (11);
42645  /* Step 12: The second reader thread requests the lock.  */
42646  err = pthread_rwlock_rdlock (&lock);
42647  if (err == 0)
42648    FAILURE ();
42649  else
42650    UNEXPECTED (12);
42651}
42652
42653static void *
42654writer_func (void *ignored)
42655{
42656  /* Step 4: Take the baton, so that the second reader thread does not go ahead
42657     too early.  */
42658  if (pthread_mutex_lock (&baton))
42659    UNEXPECTED (4);
42660  /* Step 5: Create the second reader thread.  */
42661  if (pthread_create (&reader2, NULL, reader2_func, NULL))
42662    UNEXPECTED (5);
42663  /* Step 6: Release the baton.  */
42664  if (pthread_mutex_unlock (&baton))
42665    UNEXPECTED (6);
42666  /* Step 7: The writer thread requests the lock.  */
42667  if (pthread_rwlock_wrlock (&lock))
42668    UNEXPECTED (7);
42669  return NULL;
42670}
42671
42672int
42673main ()
42674{
42675  reader1 = pthread_self ();
42676
42677  /* Step 1: The main thread initializes the lock and the baton.  */
42678  if (pthread_rwlock_init (&lock, NULL))
42679    UNEXPECTED (1);
42680  if (pthread_mutex_init (&baton, NULL))
42681    UNEXPECTED (1);
42682  /* Step 2: The main thread acquires the lock as a reader.  */
42683  if (pthread_rwlock_rdlock (&lock))
42684    UNEXPECTED (2);
42685  /* Step 3: Create the writer thread.  */
42686  if (pthread_create (&writer, NULL, writer_func, NULL))
42687    UNEXPECTED (3);
42688  /* Job done.  Go to sleep.  */
42689  for (;;)
42690    {
42691      sleep (1);
42692    }
42693}
42694
42695_ACEOF
42696if ac_fn_c_try_run "$LINENO"
42697then :
42698  gl_cv_pthread_rwlock_rdlock_prefer_writer=yes
42699else $as_nop
42700  gl_cv_pthread_rwlock_rdlock_prefer_writer=no
42701fi
42702rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42703  conftest.$ac_objext conftest.beam conftest.$ac_ext
42704fi
42705
42706     LIBS="$save_LIBS"
42707
42708fi
42709{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5
42710printf "%s\n" "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; }
42711  case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
42712    *yes)
42713
42714printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
42715
42716      ;;
42717  esac
42718
42719    fi
42720    # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
42721    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42722/* end confdefs.h.  */
42723
42724      #include <pthread.h>
42725int
42726main (void)
42727{
42728
42729#if __FreeBSD__ == 4
42730error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
42731#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
42732       && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
42733error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
42734#else
42735int x = (int)PTHREAD_MUTEX_RECURSIVE;
42736return !x;
42737#endif
42738
42739  ;
42740  return 0;
42741}
42742_ACEOF
42743if ac_fn_c_try_compile "$LINENO"
42744then :
42745
42746printf "%s\n" "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
42747
42748fi
42749rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
42750  fi
42751  :
42752
42753
42754
42755printf "%s\n" "#define GNULIB_LOCK 1" >>confdefs.h
42756
42757
42758
42759
42760
42761
42762
42763
42764  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
42765printf %s "checking whether lseek detects pipes... " >&6; }
42766if test ${gl_cv_func_lseek_pipe+y}
42767then :
42768  printf %s "(cached) " >&6
42769else $as_nop
42770  case "$host_os" in
42771       mingw*)
42772                                                               gl_cv_func_lseek_pipe=no
42773         ;;
42774       *)
42775         if test $cross_compiling = no; then
42776           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42777/* end confdefs.h.  */
42778
42779#include <sys/types.h> /* for off_t */
42780#include <stdio.h> /* for SEEK_CUR */
42781#if HAVE_UNISTD_H
42782# include <unistd.h>
42783#else /* on Windows with MSVC */
42784# include <io.h>
42785#endif
42786
42787
42788$gl_mda_defines
42789
42790int
42791main (void)
42792{
42793
42794  /* Exit with success only if stdin is seekable.  */
42795  return lseek (0, (off_t)0, SEEK_CUR) < 0;
42796
42797  ;
42798  return 0;
42799}
42800_ACEOF
42801if ac_fn_c_try_link "$LINENO"
42802then :
42803  if test -s conftest$ac_exeext \
42804                 && ./conftest$ac_exeext < conftest.$ac_ext \
42805                 && test 1 = "`echo hi \
42806                   | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
42807                gl_cv_func_lseek_pipe=yes
42808              else
42809                gl_cv_func_lseek_pipe=no
42810              fi
42811
42812else $as_nop
42813  gl_cv_func_lseek_pipe=no
42814fi
42815rm -f core conftest.err conftest.$ac_objext conftest.beam \
42816    conftest$ac_exeext conftest.$ac_ext
42817         else
42818           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42819/* end confdefs.h.  */
42820
42821#if defined __BEOS__
42822/* BeOS mistakenly return 0 when trying to seek on pipes.  */
42823  Choke me.
42824#endif
42825_ACEOF
42826if ac_fn_c_try_compile "$LINENO"
42827then :
42828  gl_cv_func_lseek_pipe=yes
42829else $as_nop
42830  gl_cv_func_lseek_pipe=no
42831fi
42832rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
42833         fi
42834         ;;
42835     esac
42836
42837fi
42838{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
42839printf "%s\n" "$gl_cv_func_lseek_pipe" >&6; }
42840  if test $gl_cv_func_lseek_pipe = no; then
42841    REPLACE_LSEEK=1
42842
42843printf "%s\n" "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
42844
42845  fi
42846
42847
42848  if test $WINDOWS_64_BIT_OFF_T = 1; then
42849    REPLACE_LSEEK=1
42850  fi
42851
42852  if test $REPLACE_LSEEK = 1; then
42853
42854
42855
42856
42857
42858
42859
42860
42861  gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext"
42862
42863  fi
42864
42865
42866
42867
42868
42869
42870
42871
42872
42873          GL_GNULIB_LSEEK=1
42874
42875
42876
42877
42878
42879printf "%s\n" "#define GNULIB_TEST_LSEEK 1" >>confdefs.h
42880
42881
42882
42883
42884
42885
42886
42887  if test $ac_cv_func_lstat = yes; then
42888
42889    case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
42890      solaris* | *no)
42891        REPLACE_LSTAT=1
42892        ;;
42893    esac
42894  else
42895    HAVE_LSTAT=0
42896  fi
42897
42898  if test $REPLACE_LSTAT = 1; then
42899
42900
42901
42902
42903
42904
42905
42906
42907  gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
42908
42909    :
42910  fi
42911
42912
42913
42914
42915
42916
42917
42918
42919
42920          GL_GNULIB_LSTAT=1
42921
42922
42923
42924
42925
42926printf "%s\n" "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
42927
42928
42929
42930
42931
42932
42933
42934
42935
42936  if test $REPLACE_MALLOC = 0; then
42937
42938    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc (0) returns nonnull" >&5
42939printf %s "checking whether malloc (0) returns nonnull... " >&6; }
42940if test ${ac_cv_func_malloc_0_nonnull+y}
42941then :
42942  printf %s "(cached) " >&6
42943else $as_nop
42944  if test "$cross_compiling" = yes
42945then :
42946  case "$host_os" in
42947          # Guess yes on platforms where we know the result.
42948          *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
42949          | gnu* | *-musl* | midnightbsd* \
42950          | hpux* | solaris* | cygwin* | mingw* | msys* )
42951            ac_cv_func_malloc_0_nonnull="guessing yes" ;;
42952          # If we don't know, obey --enable-cross-guesses.
42953          *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
42954        esac
42955
42956else $as_nop
42957  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42958/* end confdefs.h.  */
42959#include <stdlib.h>
42960
42961int
42962main (void)
42963{
42964void *p = malloc (0);
42965            int result = !p;
42966            free (p);
42967            return result;
42968  ;
42969  return 0;
42970}
42971
42972_ACEOF
42973if ac_fn_c_try_run "$LINENO"
42974then :
42975  ac_cv_func_malloc_0_nonnull=yes
42976else $as_nop
42977  ac_cv_func_malloc_0_nonnull=no
42978fi
42979rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42980  conftest.$ac_objext conftest.beam conftest.$ac_ext
42981fi
42982
42983
42984fi
42985{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
42986printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
42987  case $ac_cv_func_malloc_0_nonnull in #(
42988  *yes) :
42989     ;; #(
42990  *) :
42991    REPLACE_MALLOC=1 ;;
42992esac
42993
42994  fi
42995
42996  if test $REPLACE_MALLOC = 1; then
42997
42998
42999
43000
43001
43002
43003
43004
43005  gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
43006
43007  fi
43008
43009  if test $REPLACE_MALLOC = 1; then
43010
43011
43012
43013
43014
43015
43016
43017
43018  gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
43019
43020  fi
43021
43022
43023
43024
43025
43026
43027
43028
43029
43030          GL_GNULIB_MALLOC_POSIX=1
43031
43032
43033
43034
43035
43036printf "%s\n" "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
43037
43038
43039
43040
43041
43042
43043
43044
43045
43046
43047
43048  :
43049
43050
43051
43052
43053
43054
43055
43056
43057
43058
43059
43060
43061
43062
43063        if case "$host_os" in
43064       mingw*) true ;;
43065       *) test $ac_cv_func_mbsinit = yes ;;
43066     esac \
43067    && test $ac_cv_func_mbrtowc = yes; then
43068
43069
43070
43071
43072     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
43073printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
43074if test ${gl_cv_func_mbrtowc_incomplete_state+y}
43075then :
43076  printf %s "(cached) " >&6
43077else $as_nop
43078
43079                  case "$host_os" in
43080                     # Guess no on AIX and OSF/1.
43081        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
43082                     # Guess yes otherwise.
43083        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
43084      esac
43085      if test $LOCALE_JA != none; then
43086        if test "$cross_compiling" = yes
43087then :
43088  :
43089else $as_nop
43090  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43091/* end confdefs.h.  */
43092
43093#include <locale.h>
43094#include <string.h>
43095#include <wchar.h>
43096int main ()
43097{
43098  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
43099    {
43100      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
43101      mbstate_t state;
43102      wchar_t wc;
43103
43104      memset (&state, '\0', sizeof (mbstate_t));
43105      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
43106        if (mbsinit (&state))
43107          return 2;
43108    }
43109  return 0;
43110}
43111_ACEOF
43112if ac_fn_c_try_run "$LINENO"
43113then :
43114  gl_cv_func_mbrtowc_incomplete_state=yes
43115else $as_nop
43116  gl_cv_func_mbrtowc_incomplete_state=no
43117fi
43118rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43119  conftest.$ac_objext conftest.beam conftest.$ac_ext
43120fi
43121
43122      else
43123        if test $LOCALE_FR_UTF8 != none; then
43124          if test "$cross_compiling" = yes
43125then :
43126  :
43127else $as_nop
43128  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43129/* end confdefs.h.  */
43130
43131#include <locale.h>
43132#include <string.h>
43133#include <wchar.h>
43134int main ()
43135{
43136  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
43137    {
43138      const char input[] = "B\303\274\303\237er"; /* "Büßer" */
43139      mbstate_t state;
43140      wchar_t wc;
43141
43142      memset (&state, '\0', sizeof (mbstate_t));
43143      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
43144        if (mbsinit (&state))
43145          return 2;
43146    }
43147  return 0;
43148}
43149_ACEOF
43150if ac_fn_c_try_run "$LINENO"
43151then :
43152  gl_cv_func_mbrtowc_incomplete_state=yes
43153else $as_nop
43154  gl_cv_func_mbrtowc_incomplete_state=no
43155fi
43156rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43157  conftest.$ac_objext conftest.beam conftest.$ac_ext
43158fi
43159
43160        fi
43161      fi
43162
43163fi
43164{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
43165printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
43166
43167
43168
43169
43170     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
43171printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
43172if test ${gl_cv_func_mbrtowc_sanitycheck+y}
43173then :
43174  printf %s "(cached) " >&6
43175else $as_nop
43176
43177                  case "$host_os" in
43178                    # Guess no on Solaris 8.
43179        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
43180                    # Guess yes otherwise.
43181        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
43182      esac
43183      if test $LOCALE_ZH_CN != none; then
43184        if test "$cross_compiling" = yes
43185then :
43186  :
43187else $as_nop
43188  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43189/* end confdefs.h.  */
43190
43191#include <locale.h>
43192#include <stdlib.h>
43193#include <string.h>
43194#include <wchar.h>
43195int main ()
43196{
43197  /* This fails on Solaris 8:
43198     mbrtowc returns 2, and sets wc to 0x00F0.
43199     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
43200  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
43201    {
43202      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
43203      mbstate_t state;
43204      wchar_t wc;
43205
43206      memset (&state, '\0', sizeof (mbstate_t));
43207      if (mbrtowc (&wc, input + 3, 6, &state) != 4
43208          && mbtowc (&wc, input + 3, 6) == 4)
43209        return 2;
43210    }
43211  return 0;
43212}
43213_ACEOF
43214if ac_fn_c_try_run "$LINENO"
43215then :
43216  gl_cv_func_mbrtowc_sanitycheck=yes
43217else $as_nop
43218  gl_cv_func_mbrtowc_sanitycheck=no
43219fi
43220rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43221  conftest.$ac_objext conftest.beam conftest.$ac_ext
43222fi
43223
43224      fi
43225
43226fi
43227{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
43228printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
43229
43230    REPLACE_MBSTATE_T=0
43231    case "$gl_cv_func_mbrtowc_incomplete_state" in
43232      *yes) ;;
43233      *) REPLACE_MBSTATE_T=1 ;;
43234    esac
43235    case "$gl_cv_func_mbrtowc_sanitycheck" in
43236      *yes) ;;
43237      *) REPLACE_MBSTATE_T=1 ;;
43238    esac
43239  else
43240    REPLACE_MBSTATE_T=1
43241  fi
43242
43243
43244
43245  if test $ac_cv_func_mbrtowc = no; then
43246    HAVE_MBRTOWC=0
43247    ac_fn_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
43248      #include <wchar.h>
43249
43250" "$ac_c_undeclared_builtin_options" "CFLAGS"
43251if test "x$ac_cv_have_decl_mbrtowc" = xyes
43252then :
43253  ac_have_decl=1
43254else $as_nop
43255  ac_have_decl=0
43256fi
43257printf "%s\n" "#define HAVE_DECL_MBRTOWC $ac_have_decl" >>confdefs.h
43258
43259    if test $ac_cv_have_decl_mbrtowc = yes; then
43260                        REPLACE_MBRTOWC=1
43261    fi
43262  else
43263    if test $REPLACE_MBSTATE_T = 1; then
43264      REPLACE_MBRTOWC=1
43265    else
43266
43267
43268
43269     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
43270printf %s "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
43271if test ${gl_cv_func_mbrtowc_null_arg1+y}
43272then :
43273  printf %s "(cached) " >&6
43274else $as_nop
43275
43276                  case "$host_os" in
43277                  # Guess no on Solaris.
43278        solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
43279                  # Guess yes otherwise.
43280        *)        gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
43281      esac
43282      if test $LOCALE_FR_UTF8 != none; then
43283        if test "$cross_compiling" = yes
43284then :
43285  :
43286else $as_nop
43287  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43288/* end confdefs.h.  */
43289
43290#include <locale.h>
43291#include <stdlib.h>
43292#include <string.h>
43293#include <wchar.h>
43294int main ()
43295{
43296  int result = 0;
43297
43298  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
43299    {
43300      char input[] = "\303\237er";
43301      mbstate_t state;
43302      wchar_t wc;
43303      size_t ret;
43304
43305      memset (&state, '\0', sizeof (mbstate_t));
43306      wc = (wchar_t) 0xBADFACE;
43307      ret = mbrtowc (&wc, input, 5, &state);
43308      if (ret != 2)
43309        result |= 1;
43310      if (!mbsinit (&state))
43311        result |= 2;
43312
43313      memset (&state, '\0', sizeof (mbstate_t));
43314      ret = mbrtowc (NULL, input, 5, &state);
43315      if (ret != 2) /* Solaris 7 fails here: ret is -1.  */
43316        result |= 4;
43317      if (!mbsinit (&state))
43318        result |= 8;
43319    }
43320  return result;
43321}
43322_ACEOF
43323if ac_fn_c_try_run "$LINENO"
43324then :
43325  gl_cv_func_mbrtowc_null_arg1=yes
43326else $as_nop
43327  gl_cv_func_mbrtowc_null_arg1=no
43328fi
43329rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43330  conftest.$ac_objext conftest.beam conftest.$ac_ext
43331fi
43332
43333      fi
43334
43335fi
43336{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
43337printf "%s\n" "$gl_cv_func_mbrtowc_null_arg1" >&6; }
43338
43339
43340
43341
43342     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
43343printf %s "checking whether mbrtowc handles a NULL string argument... " >&6; }
43344if test ${gl_cv_func_mbrtowc_null_arg2+y}
43345then :
43346  printf %s "(cached) " >&6
43347else $as_nop
43348
43349                  case "$host_os" in
43350              # Guess no on OSF/1.
43351        osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
43352              # Guess yes otherwise.
43353        *)    gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
43354      esac
43355      if test $LOCALE_FR_UTF8 != none; then
43356        if test "$cross_compiling" = yes
43357then :
43358  :
43359else $as_nop
43360  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43361/* end confdefs.h.  */
43362
43363#include <locale.h>
43364#include <string.h>
43365#include <wchar.h>
43366int main ()
43367{
43368  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
43369    {
43370      mbstate_t state;
43371      wchar_t wc;
43372      int ret;
43373
43374      memset (&state, '\0', sizeof (mbstate_t));
43375      wc = (wchar_t) 0xBADFACE;
43376      mbrtowc (&wc, NULL, 5, &state);
43377      /* Check that wc was not modified.  */
43378      if (wc != (wchar_t) 0xBADFACE)
43379        return 2;
43380    }
43381  return 0;
43382}
43383_ACEOF
43384if ac_fn_c_try_run "$LINENO"
43385then :
43386  gl_cv_func_mbrtowc_null_arg2=yes
43387else $as_nop
43388  gl_cv_func_mbrtowc_null_arg2=no
43389fi
43390rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43391  conftest.$ac_objext conftest.beam conftest.$ac_ext
43392fi
43393
43394      fi
43395
43396fi
43397{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
43398printf "%s\n" "$gl_cv_func_mbrtowc_null_arg2" >&6; }
43399
43400
43401
43402
43403
43404
43405  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
43406printf %s "checking whether mbrtowc has a correct return value... " >&6; }
43407if test ${gl_cv_func_mbrtowc_retval+y}
43408then :
43409  printf %s "(cached) " >&6
43410else $as_nop
43411
43412                  case "$host_os" in
43413                                   # Guess no on HP-UX, Solaris, native Windows.
43414        hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
43415                                   # Guess yes otherwise.
43416        *)                         gl_cv_func_mbrtowc_retval="guessing yes" ;;
43417      esac
43418      if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
43419         || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
43420        if test "$cross_compiling" = yes
43421then :
43422  :
43423else $as_nop
43424  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43425/* end confdefs.h.  */
43426
43427#include <locale.h>
43428#include <string.h>
43429#include <wchar.h>
43430int main ()
43431{
43432  int result = 0;
43433  int found_some_locale = 0;
43434  /* This fails on Solaris.  */
43435  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
43436    {
43437      char input[] = "B\303\274\303\237er"; /* "Büßer" */
43438      mbstate_t state;
43439      wchar_t wc;
43440
43441      memset (&state, '\0', sizeof (mbstate_t));
43442      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
43443        {
43444          input[1] = '\0';
43445          if (mbrtowc (&wc, input + 2, 5, &state) != 1)
43446            result |= 1;
43447        }
43448      found_some_locale = 1;
43449    }
43450  /* This fails on HP-UX 11.11.  */
43451  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
43452    {
43453      char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
43454      mbstate_t state;
43455      wchar_t wc;
43456
43457      memset (&state, '\0', sizeof (mbstate_t));
43458      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
43459        {
43460          input[1] = '\0';
43461          if (mbrtowc (&wc, input + 2, 5, &state) != 2)
43462            result |= 2;
43463        }
43464      found_some_locale = 1;
43465    }
43466  /* This fails on native Windows.  */
43467  if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
43468    {
43469      char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
43470      mbstate_t state;
43471      wchar_t wc;
43472
43473      memset (&state, '\0', sizeof (mbstate_t));
43474      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
43475        {
43476          input[3] = '\0';
43477          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
43478            result |= 4;
43479        }
43480      found_some_locale = 1;
43481    }
43482  if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
43483    {
43484      char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
43485      mbstate_t state;
43486      wchar_t wc;
43487
43488      memset (&state, '\0', sizeof (mbstate_t));
43489      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
43490        {
43491          input[3] = '\0';
43492          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
43493            result |= 8;
43494        }
43495      found_some_locale = 1;
43496    }
43497  if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
43498    {
43499      char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
43500      mbstate_t state;
43501      wchar_t wc;
43502
43503      memset (&state, '\0', sizeof (mbstate_t));
43504      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
43505        {
43506          input[3] = '\0';
43507          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
43508            result |= 16;
43509        }
43510      found_some_locale = 1;
43511    }
43512  return (found_some_locale ? result : 77);
43513}
43514_ACEOF
43515if ac_fn_c_try_run "$LINENO"
43516then :
43517  gl_cv_func_mbrtowc_retval=yes
43518else $as_nop
43519  if test $? != 77; then
43520             gl_cv_func_mbrtowc_retval=no
43521           fi
43522
43523fi
43524rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43525  conftest.$ac_objext conftest.beam conftest.$ac_ext
43526fi
43527
43528      fi
43529
43530fi
43531{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
43532printf "%s\n" "$gl_cv_func_mbrtowc_retval" >&6; }
43533
43534
43535
43536
43537     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
43538printf %s "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
43539if test ${gl_cv_func_mbrtowc_nul_retval+y}
43540then :
43541  printf %s "(cached) " >&6
43542else $as_nop
43543
43544                  case "$host_os" in
43545                       # Guess no on Solaris 8 and 9.
43546        solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
43547                       # Guess yes otherwise.
43548        *)             gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
43549      esac
43550      if test $LOCALE_ZH_CN != none; then
43551        if test "$cross_compiling" = yes
43552then :
43553  :
43554else $as_nop
43555  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43556/* end confdefs.h.  */
43557
43558#include <locale.h>
43559#include <string.h>
43560#include <wchar.h>
43561int main ()
43562{
43563  /* This fails on Solaris 8 and 9.  */
43564  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
43565    {
43566      mbstate_t state;
43567      wchar_t wc;
43568
43569      memset (&state, '\0', sizeof (mbstate_t));
43570      if (mbrtowc (&wc, "", 1, &state) != 0)
43571        return 2;
43572    }
43573  return 0;
43574}
43575_ACEOF
43576if ac_fn_c_try_run "$LINENO"
43577then :
43578  gl_cv_func_mbrtowc_nul_retval=yes
43579else $as_nop
43580  gl_cv_func_mbrtowc_nul_retval=no
43581fi
43582rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43583  conftest.$ac_objext conftest.beam conftest.$ac_ext
43584fi
43585
43586      fi
43587
43588fi
43589{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
43590printf "%s\n" "$gl_cv_func_mbrtowc_nul_retval" >&6; }
43591
43592
43593
43594     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc stores incomplete characters" >&5
43595printf %s "checking whether mbrtowc stores incomplete characters... " >&6; }
43596if test ${gl_cv_func_mbrtowc_stores_incomplete+y}
43597then :
43598  printf %s "(cached) " >&6
43599else $as_nop
43600
43601               case "$host_os" in
43602               # Guess yes on native Windows.
43603       mingw*) gl_cv_func_mbrtowc_stores_incomplete="guessing yes" ;;
43604       *)      gl_cv_func_mbrtowc_stores_incomplete="guessing no" ;;
43605     esac
43606     case "$host_os" in
43607       mingw*)
43608         if test "$cross_compiling" = yes
43609then :
43610  :
43611else $as_nop
43612  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43613/* end confdefs.h.  */
43614
43615#include <locale.h>
43616#include <string.h>
43617#include <wchar.h>
43618int main ()
43619{
43620  int result = 0;
43621  if (setlocale (LC_ALL, "French_France.65001") != NULL)
43622    {
43623      wchar_t wc = (wchar_t) 0xBADFACE;
43624      mbstate_t state;
43625
43626      memset (&state, '\0', sizeof (mbstate_t));
43627      if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
43628          && wc != (wchar_t) 0xBADFACE)
43629        result |= 1;
43630    }
43631  if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
43632    {
43633      wchar_t wc = (wchar_t) 0xBADFACE;
43634      mbstate_t state;
43635
43636      memset (&state, '\0', sizeof (mbstate_t));
43637      if (mbrtowc (&wc, "\226", 1, &state) == (size_t)(-2)
43638          && wc != (wchar_t) 0xBADFACE)
43639        result |= 2;
43640    }
43641  if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
43642    {
43643      wchar_t wc = (wchar_t) 0xBADFACE;
43644      mbstate_t state;
43645
43646      memset (&state, '\0', sizeof (mbstate_t));
43647      if (mbrtowc (&wc, "\245", 1, &state) == (size_t)(-2)
43648          && wc != (wchar_t) 0xBADFACE)
43649        result |= 4;
43650    }
43651  if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
43652    {
43653      wchar_t wc = (wchar_t) 0xBADFACE;
43654      mbstate_t state;
43655
43656      memset (&state, '\0', sizeof (mbstate_t));
43657      if (mbrtowc (&wc, "\261", 1, &state) == (size_t)(-2)
43658          && wc != (wchar_t) 0xBADFACE)
43659        result |= 8;
43660    }
43661  return result;
43662}
43663_ACEOF
43664if ac_fn_c_try_run "$LINENO"
43665then :
43666  gl_cv_func_mbrtowc_stores_incomplete=no
43667else $as_nop
43668  gl_cv_func_mbrtowc_stores_incomplete=yes
43669fi
43670rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43671  conftest.$ac_objext conftest.beam conftest.$ac_ext
43672fi
43673
43674         ;;
43675       *)
43676
43677         if test $LOCALE_FR_UTF8 != none; then
43678           if test "$cross_compiling" = yes
43679then :
43680  :
43681else $as_nop
43682  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43683/* end confdefs.h.  */
43684
43685#include <locale.h>
43686#include <string.h>
43687#include <wchar.h>
43688int main ()
43689{
43690  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
43691    {
43692      wchar_t wc = (wchar_t) 0xBADFACE;
43693      mbstate_t state;
43694
43695      memset (&state, '\0', sizeof (mbstate_t));
43696      if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
43697          && wc != (wchar_t) 0xBADFACE)
43698        return 1;
43699    }
43700  return 0;
43701}
43702_ACEOF
43703if ac_fn_c_try_run "$LINENO"
43704then :
43705  gl_cv_func_mbrtowc_stores_incomplete=no
43706else $as_nop
43707  gl_cv_func_mbrtowc_stores_incomplete=yes
43708fi
43709rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43710  conftest.$ac_objext conftest.beam conftest.$ac_ext
43711fi
43712
43713         fi
43714         ;;
43715     esac
43716
43717fi
43718{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_stores_incomplete" >&5
43719printf "%s\n" "$gl_cv_func_mbrtowc_stores_incomplete" >&6; }
43720
43721
43722
43723     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
43724printf %s "checking whether mbrtowc works on empty input... " >&6; }
43725if test ${gl_cv_func_mbrtowc_empty_input+y}
43726then :
43727  printf %s "(cached) " >&6
43728else $as_nop
43729
43730                  case "$host_os" in
43731                              # Guess no on AIX and glibc systems.
43732        aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
43733                              # Guess yes on native Windows.
43734        mingw*)               gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
43735        *)                    gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
43736      esac
43737      if test "$cross_compiling" = yes
43738then :
43739  :
43740else $as_nop
43741  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43742/* end confdefs.h.  */
43743
43744           #include <wchar.h>
43745           static wchar_t wc;
43746           static mbstate_t mbs;
43747           int
43748           main (void)
43749           {
43750             return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
43751           }
43752_ACEOF
43753if ac_fn_c_try_run "$LINENO"
43754then :
43755  gl_cv_func_mbrtowc_empty_input=yes
43756else $as_nop
43757  gl_cv_func_mbrtowc_empty_input=no
43758fi
43759rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43760  conftest.$ac_objext conftest.beam conftest.$ac_ext
43761fi
43762
43763
43764fi
43765{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
43766printf "%s\n" "$gl_cv_func_mbrtowc_empty_input" >&6; }
43767
43768
43769     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
43770printf %s "checking whether the C locale is free of encoding errors... " >&6; }
43771if test ${gl_cv_func_mbrtowc_C_locale_sans_EILSEQ+y}
43772then :
43773  printf %s "(cached) " >&6
43774else $as_nop
43775
43776               gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
43777
43778     if test "$cross_compiling" = yes
43779then :
43780  case "$host_os" in
43781                 # Guess yes on native Windows.
43782         mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
43783       esac
43784
43785else $as_nop
43786  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43787/* end confdefs.h.  */
43788#include <limits.h>
43789            #include <locale.h>
43790            #include <wchar.h>
43791
43792int
43793main (void)
43794{
43795
43796            int i;
43797            char *locale = setlocale (LC_ALL, "C");
43798            if (! locale)
43799              return 2;
43800            for (i = CHAR_MIN; i <= CHAR_MAX; i++)
43801              {
43802                char c = i;
43803                wchar_t wc;
43804                mbstate_t mbs = { 0, };
43805                size_t ss = mbrtowc (&wc, &c, 1, &mbs);
43806                if (1 < ss)
43807                  return 3;
43808              }
43809            return 0;
43810
43811  ;
43812  return 0;
43813}
43814_ACEOF
43815if ac_fn_c_try_run "$LINENO"
43816then :
43817  gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes
43818else $as_nop
43819  gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no
43820fi
43821rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43822  conftest.$ac_objext conftest.beam conftest.$ac_ext
43823fi
43824
43825
43826fi
43827{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&5
43828printf "%s\n" "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&6; }
43829
43830      case "$gl_cv_func_mbrtowc_null_arg1" in
43831        *yes) ;;
43832        *)
43833printf "%s\n" "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
43834
43835           REPLACE_MBRTOWC=1
43836           ;;
43837      esac
43838      case "$gl_cv_func_mbrtowc_null_arg2" in
43839        *yes) ;;
43840        *)
43841printf "%s\n" "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
43842
43843           REPLACE_MBRTOWC=1
43844           ;;
43845      esac
43846      case "$gl_cv_func_mbrtowc_retval" in
43847        *yes) ;;
43848        *)
43849printf "%s\n" "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
43850
43851           REPLACE_MBRTOWC=1
43852           ;;
43853      esac
43854      case "$gl_cv_func_mbrtowc_nul_retval" in
43855        *yes) ;;
43856        *)
43857printf "%s\n" "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
43858
43859           REPLACE_MBRTOWC=1
43860           ;;
43861      esac
43862      case "$gl_cv_func_mbrtowc_stores_incomplete" in
43863        *no) ;;
43864        *)
43865printf "%s\n" "#define MBRTOWC_STORES_INCOMPLETE_BUG 1" >>confdefs.h
43866
43867           REPLACE_MBRTOWC=1
43868           ;;
43869      esac
43870      case "$gl_cv_func_mbrtowc_empty_input" in
43871        *yes) ;;
43872        *)
43873printf "%s\n" "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
43874
43875           REPLACE_MBRTOWC=1
43876           ;;
43877      esac
43878      case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
43879        *yes) ;;
43880        *)
43881printf "%s\n" "#define MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
43882
43883           REPLACE_MBRTOWC=1
43884           ;;
43885      esac
43886    fi
43887  fi
43888  if test $REPLACE_MBSTATE_T = 1; then
43889    case "$host_os" in
43890      mingw*) LIB_MBRTOWC= ;;
43891      *)
43892
43893
43894  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
43895printf %s "checking whether imported symbols can be declared weak... " >&6; }
43896if test ${gl_cv_have_weak+y}
43897then :
43898  printf %s "(cached) " >&6
43899else $as_nop
43900  gl_cv_have_weak=no
43901          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43902/* end confdefs.h.  */
43903extern void xyzzy ();
43904#pragma weak xyzzy
43905int
43906main (void)
43907{
43908xyzzy();
43909  ;
43910  return 0;
43911}
43912_ACEOF
43913if ac_fn_c_try_link "$LINENO"
43914then :
43915  gl_cv_have_weak=maybe
43916fi
43917rm -f core conftest.err conftest.$ac_objext conftest.beam \
43918    conftest$ac_exeext conftest.$ac_ext
43919     if test $gl_cv_have_weak = maybe; then
43920                     if test "$cross_compiling" = yes
43921then :
43922                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43923/* end confdefs.h.  */
43924#ifdef __ELF__
43925             Extensible Linking Format
43926             #endif
43927
43928_ACEOF
43929if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
43930  $EGREP "Extensible Linking Format" >/dev/null 2>&1
43931then :
43932  gl_cv_have_weak="guessing yes"
43933else $as_nop
43934  gl_cv_have_weak="guessing no"
43935fi
43936rm -rf conftest*
43937
43938
43939else $as_nop
43940  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43941/* end confdefs.h.  */
43942
43943#include <stdio.h>
43944#pragma weak fputs
43945int main ()
43946{
43947  return (fputs == NULL);
43948}
43949_ACEOF
43950if ac_fn_c_try_run "$LINENO"
43951then :
43952  gl_cv_have_weak=yes
43953else $as_nop
43954  gl_cv_have_weak=no
43955fi
43956rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43957  conftest.$ac_objext conftest.beam conftest.$ac_ext
43958fi
43959
43960     fi
43961          case " $LDFLAGS " in
43962       *" -static "*) gl_cv_have_weak=no ;;
43963     esac
43964                    case "$gl_cv_have_weak" in
43965       *yes)
43966         case "$host_os" in
43967           freebsd* | dragonfly* | midnightbsd*)
43968             : > conftest1.c
43969             $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
43970             cat <<EOF > conftest2.c
43971#include <pthread.h>
43972#pragma weak pthread_mutexattr_gettype
43973int main ()
43974{
43975  return (pthread_mutexattr_gettype != NULL);
43976}
43977EOF
43978             $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
43979               || gl_cv_have_weak=no
43980             rm -f conftest1.c libempty.so conftest2.c conftest
43981             ;;
43982         esac
43983         ;;
43984     esac
43985
43986fi
43987{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
43988printf "%s\n" "$gl_cv_have_weak" >&6; }
43989  case "$gl_cv_have_weak" in
43990    *yes)
43991
43992printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
43993
43994      ;;
43995  esac
43996
43997        case "$gl_cv_have_weak" in
43998          *yes) LIB_MBRTOWC= ;;
43999          *)    LIB_MBRTOWC="$LIBPTHREAD" ;;
44000        esac
44001        ;;
44002    esac
44003  else
44004    LIB_MBRTOWC=
44005  fi
44006
44007
44008  if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
44009
44010
44011
44012
44013
44014
44015
44016
44017  gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
44018
44019    if test $REPLACE_MBSTATE_T = 1; then
44020
44021
44022
44023
44024
44025
44026
44027
44028  gl_LIBOBJS="$gl_LIBOBJS lc-charset-dispatch.$ac_objext"
44029
44030
44031
44032
44033
44034
44035
44036
44037
44038  gl_LIBOBJS="$gl_LIBOBJS mbtowc-lock.$ac_objext"
44039
44040
44041
44042
44043  CFLAG_VISIBILITY=
44044  HAVE_VISIBILITY=0
44045  if test -n "$GCC"; then
44046                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
44047printf %s "checking whether the -Werror option is usable... " >&6; }
44048if test ${gl_cv_cc_vis_werror+y}
44049then :
44050  printf %s "(cached) " >&6
44051else $as_nop
44052  gl_save_CFLAGS="$CFLAGS"
44053       CFLAGS="$CFLAGS -Werror"
44054       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44055/* end confdefs.h.  */
44056
44057int
44058main (void)
44059{
44060
44061  ;
44062  return 0;
44063}
44064_ACEOF
44065if ac_fn_c_try_compile "$LINENO"
44066then :
44067  gl_cv_cc_vis_werror=yes
44068else $as_nop
44069  gl_cv_cc_vis_werror=no
44070fi
44071rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
44072       CFLAGS="$gl_save_CFLAGS"
44073
44074fi
44075{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
44076printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
44077        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
44078printf %s "checking for simple visibility declarations... " >&6; }
44079if test ${gl_cv_cc_visibility+y}
44080then :
44081  printf %s "(cached) " >&6
44082else $as_nop
44083  gl_save_CFLAGS="$CFLAGS"
44084       CFLAGS="$CFLAGS -fvisibility=hidden"
44085                                          if test $gl_cv_cc_vis_werror = yes; then
44086         CFLAGS="$CFLAGS -Werror"
44087       fi
44088       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44089/* end confdefs.h.  */
44090extern __attribute__((__visibility__("hidden"))) int hiddenvar;
44091              extern __attribute__((__visibility__("default"))) int exportedvar;
44092              extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
44093              extern __attribute__((__visibility__("default"))) int exportedfunc (void);
44094              void dummyfunc (void);
44095              int hiddenvar;
44096              int exportedvar;
44097              int hiddenfunc (void) { return 51; }
44098              int exportedfunc (void) { return 1225736919; }
44099              void dummyfunc (void) {}
44100
44101int
44102main (void)
44103{
44104
44105  ;
44106  return 0;
44107}
44108_ACEOF
44109if ac_fn_c_try_compile "$LINENO"
44110then :
44111  gl_cv_cc_visibility=yes
44112else $as_nop
44113  gl_cv_cc_visibility=no
44114fi
44115rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
44116       CFLAGS="$gl_save_CFLAGS"
44117
44118fi
44119{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
44120printf "%s\n" "$gl_cv_cc_visibility" >&6; }
44121    if test $gl_cv_cc_visibility = yes; then
44122      CFLAG_VISIBILITY="-fvisibility=hidden"
44123      HAVE_VISIBILITY=1
44124    fi
44125  fi
44126
44127
44128
44129printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
44130
44131
44132
44133    fi
44134
44135
44136  :
44137
44138  fi
44139
44140
44141
44142
44143
44144
44145
44146
44147
44148          GL_GNULIB_MBRTOWC=1
44149
44150
44151
44152
44153
44154printf "%s\n" "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
44155
44156
44157
44158
44159
44160
44161
44162
44163
44164
44165
44166
44167
44168
44169
44170        if case "$host_os" in
44171       mingw*) true ;;
44172       *) test $ac_cv_func_mbsinit = yes ;;
44173     esac \
44174    && test $ac_cv_func_mbrtowc = yes; then
44175
44176
44177
44178
44179     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
44180printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
44181if test ${gl_cv_func_mbrtowc_incomplete_state+y}
44182then :
44183  printf %s "(cached) " >&6
44184else $as_nop
44185
44186                  case "$host_os" in
44187                     # Guess no on AIX and OSF/1.
44188        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
44189                     # Guess yes otherwise.
44190        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
44191      esac
44192      if test $LOCALE_JA != none; then
44193        if test "$cross_compiling" = yes
44194then :
44195  :
44196else $as_nop
44197  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44198/* end confdefs.h.  */
44199
44200#include <locale.h>
44201#include <string.h>
44202#include <wchar.h>
44203int main ()
44204{
44205  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
44206    {
44207      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
44208      mbstate_t state;
44209      wchar_t wc;
44210
44211      memset (&state, '\0', sizeof (mbstate_t));
44212      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
44213        if (mbsinit (&state))
44214          return 2;
44215    }
44216  return 0;
44217}
44218_ACEOF
44219if ac_fn_c_try_run "$LINENO"
44220then :
44221  gl_cv_func_mbrtowc_incomplete_state=yes
44222else $as_nop
44223  gl_cv_func_mbrtowc_incomplete_state=no
44224fi
44225rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44226  conftest.$ac_objext conftest.beam conftest.$ac_ext
44227fi
44228
44229      else
44230        if test $LOCALE_FR_UTF8 != none; then
44231          if test "$cross_compiling" = yes
44232then :
44233  :
44234else $as_nop
44235  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44236/* end confdefs.h.  */
44237
44238#include <locale.h>
44239#include <string.h>
44240#include <wchar.h>
44241int main ()
44242{
44243  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
44244    {
44245      const char input[] = "B\303\274\303\237er"; /* "Büßer" */
44246      mbstate_t state;
44247      wchar_t wc;
44248
44249      memset (&state, '\0', sizeof (mbstate_t));
44250      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
44251        if (mbsinit (&state))
44252          return 2;
44253    }
44254  return 0;
44255}
44256_ACEOF
44257if ac_fn_c_try_run "$LINENO"
44258then :
44259  gl_cv_func_mbrtowc_incomplete_state=yes
44260else $as_nop
44261  gl_cv_func_mbrtowc_incomplete_state=no
44262fi
44263rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44264  conftest.$ac_objext conftest.beam conftest.$ac_ext
44265fi
44266
44267        fi
44268      fi
44269
44270fi
44271{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
44272printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
44273
44274
44275
44276
44277     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
44278printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
44279if test ${gl_cv_func_mbrtowc_sanitycheck+y}
44280then :
44281  printf %s "(cached) " >&6
44282else $as_nop
44283
44284                  case "$host_os" in
44285                    # Guess no on Solaris 8.
44286        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
44287                    # Guess yes otherwise.
44288        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
44289      esac
44290      if test $LOCALE_ZH_CN != none; then
44291        if test "$cross_compiling" = yes
44292then :
44293  :
44294else $as_nop
44295  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44296/* end confdefs.h.  */
44297
44298#include <locale.h>
44299#include <stdlib.h>
44300#include <string.h>
44301#include <wchar.h>
44302int main ()
44303{
44304  /* This fails on Solaris 8:
44305     mbrtowc returns 2, and sets wc to 0x00F0.
44306     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
44307  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
44308    {
44309      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
44310      mbstate_t state;
44311      wchar_t wc;
44312
44313      memset (&state, '\0', sizeof (mbstate_t));
44314      if (mbrtowc (&wc, input + 3, 6, &state) != 4
44315          && mbtowc (&wc, input + 3, 6) == 4)
44316        return 2;
44317    }
44318  return 0;
44319}
44320_ACEOF
44321if ac_fn_c_try_run "$LINENO"
44322then :
44323  gl_cv_func_mbrtowc_sanitycheck=yes
44324else $as_nop
44325  gl_cv_func_mbrtowc_sanitycheck=no
44326fi
44327rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44328  conftest.$ac_objext conftest.beam conftest.$ac_ext
44329fi
44330
44331      fi
44332
44333fi
44334{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
44335printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
44336
44337    REPLACE_MBSTATE_T=0
44338    case "$gl_cv_func_mbrtowc_incomplete_state" in
44339      *yes) ;;
44340      *) REPLACE_MBSTATE_T=1 ;;
44341    esac
44342    case "$gl_cv_func_mbrtowc_sanitycheck" in
44343      *yes) ;;
44344      *) REPLACE_MBSTATE_T=1 ;;
44345    esac
44346  else
44347    REPLACE_MBSTATE_T=1
44348  fi
44349
44350
44351
44352  if test $ac_cv_func_mbsinit = no; then
44353    HAVE_MBSINIT=0
44354    ac_fn_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
44355      #include <wchar.h>
44356
44357" "$ac_c_undeclared_builtin_options" "CFLAGS"
44358if test "x$ac_cv_have_decl_mbsinit" = xyes
44359then :
44360  ac_have_decl=1
44361else $as_nop
44362  ac_have_decl=0
44363fi
44364printf "%s\n" "#define HAVE_DECL_MBSINIT $ac_have_decl" >>confdefs.h
44365
44366    if test $ac_cv_have_decl_mbsinit = yes; then
44367                        REPLACE_MBSINIT=1
44368    fi
44369  else
44370    if test $REPLACE_MBSTATE_T = 1; then
44371      REPLACE_MBSINIT=1
44372    else
44373                        case "$host_os" in
44374        mingw*) REPLACE_MBSINIT=1 ;;
44375      esac
44376    fi
44377  fi
44378
44379  if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
44380
44381
44382
44383
44384
44385
44386
44387
44388  gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
44389
44390
44391  :
44392
44393  fi
44394
44395
44396
44397
44398
44399
44400
44401
44402
44403          GL_GNULIB_MBSINIT=1
44404
44405
44406
44407
44408
44409printf "%s\n" "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
44410
44411
44412
44413
44414
44415
44416
44417
44418
44419
44420
44421
44422
44423
44424        if case "$host_os" in
44425       mingw*) true ;;
44426       *) test $ac_cv_func_mbsinit = yes ;;
44427     esac \
44428    && test $ac_cv_func_mbrtowc = yes; then
44429
44430
44431
44432
44433     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
44434printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
44435if test ${gl_cv_func_mbrtowc_incomplete_state+y}
44436then :
44437  printf %s "(cached) " >&6
44438else $as_nop
44439
44440                  case "$host_os" in
44441                     # Guess no on AIX and OSF/1.
44442        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
44443                     # Guess yes otherwise.
44444        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
44445      esac
44446      if test $LOCALE_JA != none; then
44447        if test "$cross_compiling" = yes
44448then :
44449  :
44450else $as_nop
44451  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44452/* end confdefs.h.  */
44453
44454#include <locale.h>
44455#include <string.h>
44456#include <wchar.h>
44457int main ()
44458{
44459  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
44460    {
44461      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
44462      mbstate_t state;
44463      wchar_t wc;
44464
44465      memset (&state, '\0', sizeof (mbstate_t));
44466      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
44467        if (mbsinit (&state))
44468          return 2;
44469    }
44470  return 0;
44471}
44472_ACEOF
44473if ac_fn_c_try_run "$LINENO"
44474then :
44475  gl_cv_func_mbrtowc_incomplete_state=yes
44476else $as_nop
44477  gl_cv_func_mbrtowc_incomplete_state=no
44478fi
44479rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44480  conftest.$ac_objext conftest.beam conftest.$ac_ext
44481fi
44482
44483      else
44484        if test $LOCALE_FR_UTF8 != none; then
44485          if test "$cross_compiling" = yes
44486then :
44487  :
44488else $as_nop
44489  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44490/* end confdefs.h.  */
44491
44492#include <locale.h>
44493#include <string.h>
44494#include <wchar.h>
44495int main ()
44496{
44497  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
44498    {
44499      const char input[] = "B\303\274\303\237er"; /* "Büßer" */
44500      mbstate_t state;
44501      wchar_t wc;
44502
44503      memset (&state, '\0', sizeof (mbstate_t));
44504      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
44505        if (mbsinit (&state))
44506          return 2;
44507    }
44508  return 0;
44509}
44510_ACEOF
44511if ac_fn_c_try_run "$LINENO"
44512then :
44513  gl_cv_func_mbrtowc_incomplete_state=yes
44514else $as_nop
44515  gl_cv_func_mbrtowc_incomplete_state=no
44516fi
44517rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44518  conftest.$ac_objext conftest.beam conftest.$ac_ext
44519fi
44520
44521        fi
44522      fi
44523
44524fi
44525{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
44526printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
44527
44528
44529
44530
44531     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
44532printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
44533if test ${gl_cv_func_mbrtowc_sanitycheck+y}
44534then :
44535  printf %s "(cached) " >&6
44536else $as_nop
44537
44538                  case "$host_os" in
44539                    # Guess no on Solaris 8.
44540        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
44541                    # Guess yes otherwise.
44542        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
44543      esac
44544      if test $LOCALE_ZH_CN != none; then
44545        if test "$cross_compiling" = yes
44546then :
44547  :
44548else $as_nop
44549  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44550/* end confdefs.h.  */
44551
44552#include <locale.h>
44553#include <stdlib.h>
44554#include <string.h>
44555#include <wchar.h>
44556int main ()
44557{
44558  /* This fails on Solaris 8:
44559     mbrtowc returns 2, and sets wc to 0x00F0.
44560     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
44561  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
44562    {
44563      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
44564      mbstate_t state;
44565      wchar_t wc;
44566
44567      memset (&state, '\0', sizeof (mbstate_t));
44568      if (mbrtowc (&wc, input + 3, 6, &state) != 4
44569          && mbtowc (&wc, input + 3, 6) == 4)
44570        return 2;
44571    }
44572  return 0;
44573}
44574_ACEOF
44575if ac_fn_c_try_run "$LINENO"
44576then :
44577  gl_cv_func_mbrtowc_sanitycheck=yes
44578else $as_nop
44579  gl_cv_func_mbrtowc_sanitycheck=no
44580fi
44581rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44582  conftest.$ac_objext conftest.beam conftest.$ac_ext
44583fi
44584
44585      fi
44586
44587fi
44588{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
44589printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
44590
44591    REPLACE_MBSTATE_T=0
44592    case "$gl_cv_func_mbrtowc_incomplete_state" in
44593      *yes) ;;
44594      *) REPLACE_MBSTATE_T=1 ;;
44595    esac
44596    case "$gl_cv_func_mbrtowc_sanitycheck" in
44597      *yes) ;;
44598      *) REPLACE_MBSTATE_T=1 ;;
44599    esac
44600  else
44601    REPLACE_MBSTATE_T=1
44602  fi
44603
44604
44605
44606  if test $ac_cv_func_mbsrtowcs = no; then
44607    HAVE_MBSRTOWCS=0
44608    ac_fn_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
44609      #include <wchar.h>
44610
44611" "$ac_c_undeclared_builtin_options" "CFLAGS"
44612if test "x$ac_cv_have_decl_mbsrtowcs" = xyes
44613then :
44614  ac_have_decl=1
44615else $as_nop
44616  ac_have_decl=0
44617fi
44618printf "%s\n" "#define HAVE_DECL_MBSRTOWCS $ac_have_decl" >>confdefs.h
44619
44620    if test $ac_cv_have_decl_mbsrtowcs = yes; then
44621                        REPLACE_MBSRTOWCS=1
44622    fi
44623  else
44624    if test $REPLACE_MBSTATE_T = 1; then
44625      REPLACE_MBSRTOWCS=1
44626    else
44627
44628
44629
44630
44631
44632
44633     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
44634printf %s "checking whether mbsrtowcs works... " >&6; }
44635if test ${gl_cv_func_mbsrtowcs_works+y}
44636then :
44637  printf %s "(cached) " >&6
44638else $as_nop
44639
44640                  case "$host_os" in
44641                                   # Guess no on HP-UX, Solaris, mingw.
44642        hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
44643                                   # Guess yes otherwise.
44644        *)                         gl_cv_func_mbsrtowcs_works="guessing yes" ;;
44645      esac
44646      if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
44647        if test "$cross_compiling" = yes
44648then :
44649  :
44650else $as_nop
44651  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44652/* end confdefs.h.  */
44653
44654#include <locale.h>
44655#include <string.h>
44656#include <wchar.h>
44657int main ()
44658{
44659  int result = 0;
44660  /* Test whether the function supports a NULL destination argument.
44661     This fails on native Windows.  */
44662  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
44663    {
44664      const char input[] = "\337er";
44665      const char *src = input;
44666      mbstate_t state;
44667
44668      memset (&state, '\0', sizeof (mbstate_t));
44669      if (mbsrtowcs (NULL, &src, 1, &state) != 3
44670          || src != input)
44671        result |= 1;
44672    }
44673  /* Test whether the function works when started with a conversion state
44674     in non-initial state.  This fails on HP-UX 11.11 and Solaris 10.  */
44675  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
44676    {
44677      const char input[] = "B\303\274\303\237er";
44678      mbstate_t state;
44679
44680      memset (&state, '\0', sizeof (mbstate_t));
44681      if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
44682        if (!mbsinit (&state))
44683          {
44684            const char *src = input + 2;
44685            if (mbsrtowcs (NULL, &src, 10, &state) != 4)
44686              result |= 2;
44687          }
44688    }
44689  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
44690    {
44691      const char input[] = "<\306\374\313\334\270\354>";
44692      mbstate_t state;
44693
44694      memset (&state, '\0', sizeof (mbstate_t));
44695      if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
44696        if (!mbsinit (&state))
44697          {
44698            const char *src = input + 4;
44699            if (mbsrtowcs (NULL, &src, 10, &state) != 3)
44700              result |= 4;
44701          }
44702    }
44703  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
44704    {
44705      const char input[] = "B\250\271\201\060\211\070er";
44706      mbstate_t state;
44707
44708      memset (&state, '\0', sizeof (mbstate_t));
44709      if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
44710        if (!mbsinit (&state))
44711          {
44712            const char *src = input + 2;
44713            if (mbsrtowcs (NULL, &src, 10, &state) != 4)
44714              result |= 8;
44715          }
44716    }
44717  return result;
44718}
44719_ACEOF
44720if ac_fn_c_try_run "$LINENO"
44721then :
44722  gl_cv_func_mbsrtowcs_works=yes
44723else $as_nop
44724  gl_cv_func_mbsrtowcs_works=no
44725fi
44726rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44727  conftest.$ac_objext conftest.beam conftest.$ac_ext
44728fi
44729
44730      fi
44731
44732fi
44733{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
44734printf "%s\n" "$gl_cv_func_mbsrtowcs_works" >&6; }
44735
44736      case "$gl_cv_func_mbsrtowcs_works" in
44737        *yes) ;;
44738        *) REPLACE_MBSRTOWCS=1 ;;
44739      esac
44740    fi
44741  fi
44742
44743  if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
44744
44745
44746
44747
44748
44749
44750
44751
44752  gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
44753
44754
44755
44756
44757
44758
44759
44760
44761
44762  gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
44763
44764
44765  :
44766
44767  fi
44768
44769
44770
44771
44772
44773
44774
44775
44776
44777          GL_GNULIB_MBSRTOWCS=1
44778
44779
44780
44781
44782
44783printf "%s\n" "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
44784
44785
44786
44787
44788
44789
44790  ac_fn_c_check_func "$LINENO" "mbtowc" "ac_cv_func_mbtowc"
44791if test "x$ac_cv_func_mbtowc" = xyes
44792then :
44793  printf "%s\n" "#define HAVE_MBTOWC 1" >>confdefs.h
44794
44795fi
44796
44797  if test $ac_cv_func_mbtowc = no; then
44798    HAVE_MBTOWC=0
44799  else
44800    if false; then
44801      REPLACE_MBTOWC=1
44802    fi
44803  fi
44804
44805  if test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1; then
44806
44807
44808
44809
44810
44811
44812
44813
44814  gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext"
44815
44816
44817  :
44818
44819  fi
44820
44821
44822
44823
44824
44825
44826
44827
44828
44829          GL_GNULIB_MBTOWC=1
44830
44831
44832
44833
44834
44835printf "%s\n" "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
44836
44837
44838
44839
44840  if test $REPLACE_MEMCHR = 1; then
44841
44842
44843
44844
44845
44846
44847
44848
44849  gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
44850
44851
44852  ac_fn_c_check_header_compile "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
44853if test "x$ac_cv_header_bp_sym_h" = xyes
44854then :
44855  printf "%s\n" "#define HAVE_BP_SYM_H 1" >>confdefs.h
44856
44857fi
44858
44859
44860  fi
44861
44862
44863
44864
44865
44866
44867
44868
44869
44870          GL_GNULIB_MEMCHR=1
44871
44872
44873
44874
44875
44876printf "%s\n" "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
44877
44878
44879
44880
44881
44882
44883
44884
44885
44886  ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
44887if test "x$ac_cv_func_mempcpy" = xyes
44888then :
44889  printf "%s\n" "#define HAVE_MEMPCPY 1" >>confdefs.h
44890
44891fi
44892
44893  if test $ac_cv_func_mempcpy = no; then
44894    HAVE_MEMPCPY=0
44895  fi
44896
44897  if test $HAVE_MEMPCPY = 0; then
44898
44899
44900
44901
44902
44903
44904
44905
44906  gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
44907
44908
44909  :
44910
44911  fi
44912
44913
44914
44915
44916
44917
44918
44919
44920
44921          GL_GNULIB_MEMPCPY=1
44922
44923
44924
44925
44926
44927printf "%s\n" "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
44928
44929
44930
44931
44932
44933
44934
44935
44936  if test $ac_cv_have_decl_memrchr = no; then
44937    HAVE_DECL_MEMRCHR=0
44938  fi
44939
44940  ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
44941if test "x$ac_cv_func_memrchr" = xyes
44942then :
44943  printf "%s\n" "#define HAVE_MEMRCHR 1" >>confdefs.h
44944
44945fi
44946
44947
44948  if test $ac_cv_func_memrchr = no; then
44949
44950
44951
44952
44953
44954
44955
44956
44957  gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
44958
44959    :
44960  fi
44961
44962
44963
44964
44965
44966
44967
44968
44969
44970          GL_GNULIB_MEMRCHR=1
44971
44972
44973
44974
44975
44976printf "%s\n" "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
44977
44978
44979
44980
44981
44982
44983
44984
44985  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
44986printf %s "checking whether mkdir handles trailing slash... " >&6; }
44987if test ${gl_cv_func_mkdir_trailing_slash_works+y}
44988then :
44989  printf %s "(cached) " >&6
44990else $as_nop
44991  rm -rf conftest.dir
44992     if test "$cross_compiling" = yes
44993then :
44994  case "$host_os" in
44995                           # Guess yes on Linux systems.
44996          linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
44997                           # Guess yes on glibc systems.
44998          *-gnu* | gnu*)   gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
44999                           # Guess yes on MSVC, no on mingw.
45000          mingw*)          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45001/* end confdefs.h.  */
45002
45003#ifdef _MSC_VER
45004 Known
45005#endif
45006
45007_ACEOF
45008if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45009  $EGREP "Known" >/dev/null 2>&1
45010then :
45011  gl_cv_func_mkdir_trailing_slash_works="guessing yes"
45012else $as_nop
45013  gl_cv_func_mkdir_trailing_slash_works="guessing no"
45014fi
45015rm -rf conftest*
45016
45017                           ;;
45018                           # If we don't know, obey --enable-cross-guesses.
45019          *)               gl_cv_func_mkdir_trailing_slash_works="$gl_cross_guess_normal" ;;
45020        esac
45021
45022else $as_nop
45023  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45024/* end confdefs.h.  */
45025
45026          #include <sys/types.h>
45027          #include <sys/stat.h>
45028
45029
45030$gl_mda_defines
45031
45032int
45033main (void)
45034{
45035return mkdir ("conftest.dir/", 0700);
45036  ;
45037  return 0;
45038}
45039_ACEOF
45040if ac_fn_c_try_run "$LINENO"
45041then :
45042  gl_cv_func_mkdir_trailing_slash_works=yes
45043else $as_nop
45044  gl_cv_func_mkdir_trailing_slash_works=no
45045fi
45046rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45047  conftest.$ac_objext conftest.beam conftest.$ac_ext
45048fi
45049
45050     rm -rf conftest.dir
45051
45052fi
45053{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
45054printf "%s\n" "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
45055  case "$gl_cv_func_mkdir_trailing_slash_works" in
45056    *yes) ;;
45057    *)
45058      REPLACE_MKDIR=1
45059      ;;
45060  esac
45061
45062  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
45063printf %s "checking whether mkdir handles trailing dot... " >&6; }
45064if test ${gl_cv_func_mkdir_trailing_dot_works+y}
45065then :
45066  printf %s "(cached) " >&6
45067else $as_nop
45068  rm -rf conftest.dir
45069     if test "$cross_compiling" = yes
45070then :
45071  case "$host_os" in
45072                         # Guess yes on glibc systems.
45073          *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
45074                         # Guess yes on musl systems.
45075          *-musl*)       gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
45076                         # Guess no on native Windows.
45077          mingw*)        gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
45078                         # If we don't know, obey --enable-cross-guesses.
45079          *)             gl_cv_func_mkdir_trailing_dot_works="$gl_cross_guess_normal" ;;
45080        esac
45081
45082else $as_nop
45083  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45084/* end confdefs.h.  */
45085
45086          #include <sys/types.h>
45087          #include <sys/stat.h>
45088
45089
45090$gl_mda_defines
45091
45092int
45093main (void)
45094{
45095return !mkdir ("conftest.dir/./", 0700);
45096  ;
45097  return 0;
45098}
45099_ACEOF
45100if ac_fn_c_try_run "$LINENO"
45101then :
45102  gl_cv_func_mkdir_trailing_dot_works=yes
45103else $as_nop
45104  gl_cv_func_mkdir_trailing_dot_works=no
45105fi
45106rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45107  conftest.$ac_objext conftest.beam conftest.$ac_ext
45108fi
45109
45110     rm -rf conftest.dir
45111
45112
45113fi
45114{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
45115printf "%s\n" "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
45116  case "$gl_cv_func_mkdir_trailing_dot_works" in
45117    *yes) ;;
45118    *)
45119      REPLACE_MKDIR=1
45120
45121printf "%s\n" "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
45122
45123      ;;
45124  esac
45125
45126  if test $REPLACE_MKDIR = 1; then
45127
45128
45129
45130
45131
45132
45133
45134
45135  gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
45136
45137  fi
45138
45139
45140
45141
45142
45143
45144
45145
45146
45147          GL_GNULIB_MKDIR=1
45148
45149
45150
45151
45152
45153printf "%s\n" "#define GNULIB_TEST_MKDIR 1" >>confdefs.h
45154
45155
45156
45157
45158
45159
45160
45161
45162
45163  if test $ac_cv_func_mkostemp != yes; then
45164    HAVE_MKOSTEMP=0
45165  fi
45166
45167  if test $HAVE_MKOSTEMP = 0; then
45168
45169
45170
45171
45172
45173
45174
45175
45176  gl_LIBOBJS="$gl_LIBOBJS mkostemp.$ac_objext"
45177
45178
45179
45180  fi
45181
45182
45183printf "%s\n" "#define GNULIB_MKOSTEMP 1" >>confdefs.h
45184
45185
45186
45187
45188
45189
45190
45191
45192
45193
45194
45195          GL_GNULIB_MKOSTEMP=1
45196
45197
45198
45199
45200
45201printf "%s\n" "#define GNULIB_TEST_MKOSTEMP 1" >>confdefs.h
45202
45203
45204
45205
45206
45207
45208
45209  if test $ac_cv_func_mkstemp = yes; then
45210    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mkstemp" >&5
45211printf %s "checking for working mkstemp... " >&6; }
45212if test ${gl_cv_func_working_mkstemp+y}
45213then :
45214  printf %s "(cached) " >&6
45215else $as_nop
45216
45217        mkdir conftest.mkstemp
45218        if test "$cross_compiling" = yes
45219then :
45220  case "$host_os" in
45221                            # Guess yes on glibc systems.
45222             *-gnu* | gnu*) gl_cv_func_working_mkstemp="guessing yes" ;;
45223                            # Guess yes on musl systems.
45224             *-musl*)       gl_cv_func_working_mkstemp="guessing yes" ;;
45225                            # Guess no on native Windows.
45226             mingw*)        gl_cv_func_working_mkstemp="guessing no" ;;
45227                            # If we don't know, obey --enable-cross-guesses.
45228             *)             gl_cv_func_working_mkstemp="$gl_cross_guess_normal" ;;
45229           esac
45230
45231else $as_nop
45232  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45233/* end confdefs.h.  */
45234$ac_includes_default
45235
45236
45237$gl_mda_defines
45238
45239int
45240main (void)
45241{
45242int result = 0;
45243              int i;
45244              off_t large = (off_t) 4294967295u;
45245              if (large < 0)
45246                large = 2147483647;
45247              umask (0);
45248              for (i = 0; i < 70; i++)
45249                {
45250                  char templ[] = "conftest.mkstemp/coXXXXXX";
45251                  int (*mkstemp_function) (char *) = mkstemp;
45252                  int fd = mkstemp_function (templ);
45253                  if (fd < 0)
45254                    result |= 1;
45255                  else
45256                    {
45257                      struct stat st;
45258                      if (lseek (fd, large, SEEK_SET) != large)
45259                        result |= 2;
45260                      if (fstat (fd, &st) < 0)
45261                        result |= 4;
45262                      else if (st.st_mode & 0077)
45263                        result |= 8;
45264                      if (close (fd))
45265                        result |= 16;
45266                    }
45267                }
45268              return result;
45269  ;
45270  return 0;
45271}
45272_ACEOF
45273if ac_fn_c_try_run "$LINENO"
45274then :
45275  gl_cv_func_working_mkstemp=yes
45276else $as_nop
45277  gl_cv_func_working_mkstemp=no
45278fi
45279rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45280  conftest.$ac_objext conftest.beam conftest.$ac_ext
45281fi
45282
45283        rm -rf conftest.mkstemp
45284
45285fi
45286{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mkstemp" >&5
45287printf "%s\n" "$gl_cv_func_working_mkstemp" >&6; }
45288    case "$gl_cv_func_working_mkstemp" in
45289      *yes) ;;
45290      *)
45291        REPLACE_MKSTEMP=1
45292        ;;
45293    esac
45294  else
45295    HAVE_MKSTEMP=0
45296  fi
45297
45298  if test $HAVE_MKSTEMP = 0 || test $REPLACE_MKSTEMP = 1; then
45299
45300
45301
45302
45303
45304
45305
45306
45307  gl_LIBOBJS="$gl_LIBOBJS mkstemp.$ac_objext"
45308
45309
45310
45311  fi
45312
45313
45314
45315
45316
45317
45318
45319
45320
45321          GL_GNULIB_MKSTEMP=1
45322
45323
45324
45325
45326
45327printf "%s\n" "#define GNULIB_TEST_MKSTEMP 1" >>confdefs.h
45328
45329
45330
45331
45332
45333
45334
45335
45336  REPLACE_MKTIME=0
45337  if test "$gl_cv_func_working_mktime" != yes; then
45338    REPLACE_MKTIME=1
45339
45340printf "%s\n" "#define NEED_MKTIME_WORKING 1" >>confdefs.h
45341
45342  fi
45343  case "$host_os" in
45344    mingw*)
45345      REPLACE_MKTIME=1
45346
45347printf "%s\n" "#define NEED_MKTIME_WINDOWS 1" >>confdefs.h
45348
45349      ;;
45350  esac
45351
45352  if test $REPLACE_MKTIME = 1; then
45353
45354
45355
45356
45357
45358
45359
45360
45361  gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
45362
45363    :
45364  fi
45365
45366
45367
45368
45369
45370
45371
45372
45373
45374          GL_GNULIB_MKTIME=1
45375
45376
45377
45378
45379
45380printf "%s\n" "#define GNULIB_TEST_MKTIME 1" >>confdefs.h
45381
45382
45383
45384
45385
45386
45387  WANT_MKTIME_INTERNAL=0
45388    ac_fn_c_check_func "$LINENO" "__mktime_internal" "ac_cv_func___mktime_internal"
45389if test "x$ac_cv_func___mktime_internal" = xyes
45390then :
45391
45392printf "%s\n" "#define mktime_internal __mktime_internal" >>confdefs.h
45393
45394
45395else $as_nop
45396            WANT_MKTIME_INTERNAL=1
45397
45398printf "%s\n" "#define NEED_MKTIME_INTERNAL 1" >>confdefs.h
45399
45400
45401fi
45402
45403
45404  if test $WANT_MKTIME_INTERNAL = 1; then
45405
45406
45407
45408
45409
45410
45411
45412
45413  gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
45414
45415    :
45416  fi
45417
45418  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
45419
45420
45421
45422
45423
45424
45425
45426
45427  gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
45428
45429  fi
45430
45431  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
45432
45433
45434
45435
45436
45437
45438
45439
45440  gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
45441
45442  fi
45443
45444
45445printf "%s\n" "#define GNULIB_MSVC_NOTHROW 1" >>confdefs.h
45446
45447
45448
45449
45450
45451
45452
45453
45454
45455
45456
45457
45458
45459 nanosleep_save_libs=$LIBS
45460
45461 # Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
45462 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
45463 LIB_NANOSLEEP=
45464
45465 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5
45466printf %s "checking for library containing nanosleep... " >&6; }
45467if test ${ac_cv_search_nanosleep+y}
45468then :
45469  printf %s "(cached) " >&6
45470else $as_nop
45471  ac_func_search_save_LIBS=$LIBS
45472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45473/* end confdefs.h.  */
45474
45475/* Override any GCC internal prototype to avoid an error.
45476   Use char because int might match the return type of a GCC
45477   builtin and then its argument prototype would still apply.  */
45478char nanosleep ();
45479int
45480main (void)
45481{
45482return nanosleep ();
45483  ;
45484  return 0;
45485}
45486_ACEOF
45487for ac_lib in '' rt posix4
45488do
45489  if test -z "$ac_lib"; then
45490    ac_res="none required"
45491  else
45492    ac_res=-l$ac_lib
45493    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
45494  fi
45495  if ac_fn_c_try_link "$LINENO"
45496then :
45497  ac_cv_search_nanosleep=$ac_res
45498fi
45499rm -f core conftest.err conftest.$ac_objext conftest.beam \
45500    conftest$ac_exeext
45501  if test ${ac_cv_search_nanosleep+y}
45502then :
45503  break
45504fi
45505done
45506if test ${ac_cv_search_nanosleep+y}
45507then :
45508
45509else $as_nop
45510  ac_cv_search_nanosleep=no
45511fi
45512rm conftest.$ac_ext
45513LIBS=$ac_func_search_save_LIBS
45514fi
45515{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5
45516printf "%s\n" "$ac_cv_search_nanosleep" >&6; }
45517ac_res=$ac_cv_search_nanosleep
45518if test "$ac_res" != no
45519then :
45520  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
45521  test "$ac_cv_search_nanosleep" = "none required" ||
45522                 LIB_NANOSLEEP=$ac_cv_search_nanosleep
45523fi
45524
45525 if test "x$ac_cv_search_nanosleep" != xno; then
45526
45527
45528   if test $APPLE_UNIVERSAL_BUILD = 1; then
45529     # A universal build on Apple Mac OS X platforms.
45530     # The test result would be 'no (mishandles large arguments)' in 64-bit
45531     # mode but 'yes' in 32-bit mode. But we need a configuration result that
45532     # is valid in both modes.
45533     gl_cv_func_nanosleep='no (mishandles large arguments)'
45534   fi
45535
45536   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working nanosleep" >&5
45537printf %s "checking for working nanosleep... " >&6; }
45538if test ${gl_cv_func_nanosleep+y}
45539then :
45540  printf %s "(cached) " >&6
45541else $as_nop
45542
45543     if test "$cross_compiling" = yes
45544then :
45545  case "$host_os" in           linux*) # Guess it halfway works when the kernel is Linux.
45546            gl_cv_func_nanosleep='guessing no (mishandles large arguments)' ;;
45547          mingw*) # Guess no on native Windows.
45548            gl_cv_func_nanosleep='guessing no' ;;
45549          *)      # If we don't know, obey --enable-cross-guesses.
45550            gl_cv_func_nanosleep="$gl_cross_guess_normal" ;;
45551        esac
45552
45553else $as_nop
45554  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45555/* end confdefs.h.  */
45556
45557          #include <errno.h>
45558          #include <limits.h>
45559          #include <signal.h>
45560          #if HAVE_SYS_TIME_H
45561           #include <sys/time.h>
45562          #endif
45563          #include <time.h>
45564          #include <unistd.h>
45565          #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
45566          #define TYPE_MAXIMUM(t) \
45567            ((t) (! TYPE_SIGNED (t) \
45568                  ? (t) -1 \
45569                  : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
45570
45571          #if HAVE_DECL_ALARM
45572          static void
45573          check_for_SIGALRM (int sig)
45574          {
45575            if (sig != SIGALRM)
45576              _exit (1);
45577          }
45578          #endif
45579
45580          int
45581          main ()
45582          {
45583            static struct timespec ts_sleep;
45584            static struct timespec ts_remaining;
45585            /* Test for major problems first.  */
45586            if (! nanosleep)
45587              return 2;
45588            ts_sleep.tv_sec = 0;
45589            ts_sleep.tv_nsec = 1;
45590            #if HAVE_DECL_ALARM
45591            {
45592              static struct sigaction act;
45593              act.sa_handler = check_for_SIGALRM;
45594              sigemptyset (&act.sa_mask);
45595              sigaction (SIGALRM, &act, NULL);
45596              alarm (1);
45597              if (nanosleep (&ts_sleep, NULL) != 0)
45598                return 3;
45599              /* Test for a minor problem: the handling of large arguments.  */
45600              ts_sleep.tv_sec = TYPE_MAXIMUM (time_t);
45601              ts_sleep.tv_nsec = 999999999;
45602              alarm (1);
45603              if (nanosleep (&ts_sleep, &ts_remaining) != -1)
45604                return 4;
45605              if (errno != EINTR)
45606                return 5;
45607              if (ts_remaining.tv_sec <= TYPE_MAXIMUM (time_t) - 10)
45608                return 6;
45609            }
45610            #else /* A simpler test for native Windows.  */
45611            if (nanosleep (&ts_sleep, &ts_remaining) < 0)
45612              return 3;
45613            #endif
45614            return 0;
45615          }
45616_ACEOF
45617if ac_fn_c_try_run "$LINENO"
45618then :
45619  gl_cv_func_nanosleep=yes
45620else $as_nop
45621  case $? in         4|5|6) gl_cv_func_nanosleep='no (mishandles large arguments)';;         *)   gl_cv_func_nanosleep=no;;
45622        esac
45623fi
45624rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45625  conftest.$ac_objext conftest.beam conftest.$ac_ext
45626fi
45627
45628
45629fi
45630{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nanosleep" >&5
45631printf "%s\n" "$gl_cv_func_nanosleep" >&6; }
45632   case "$gl_cv_func_nanosleep" in
45633     *yes)
45634       REPLACE_NANOSLEEP=0
45635       ;;
45636     *)
45637       REPLACE_NANOSLEEP=1
45638       case "$gl_cv_func_nanosleep" in
45639         *"mishandles large arguments"*)
45640
45641printf "%s\n" "#define HAVE_BUG_BIG_NANOSLEEP 1" >>confdefs.h
45642
45643           ;;
45644         *)
45645           # The replacement uses select(). Add $LIBSOCKET to $LIB_NANOSLEEP.
45646           for ac_lib in $LIBSOCKET; do
45647             case " $LIB_NANOSLEEP " in
45648               *" $ac_lib "*) ;;
45649               *) LIB_NANOSLEEP="$LIB_NANOSLEEP $ac_lib";;
45650             esac
45651           done
45652           ;;
45653       esac
45654       ;;
45655   esac
45656 else
45657   HAVE_NANOSLEEP=0
45658 fi
45659 LIBS=$nanosleep_save_libs
45660
45661  if test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1; then
45662
45663
45664
45665
45666
45667
45668
45669
45670  gl_LIBOBJS="$gl_LIBOBJS nanosleep.$ac_objext"
45671
45672
45673
45674  :
45675
45676  fi
45677
45678
45679
45680
45681
45682
45683
45684
45685
45686          GL_GNULIB_NANOSLEEP=1
45687
45688
45689
45690
45691
45692printf "%s\n" "#define GNULIB_TEST_NANOSLEEP 1" >>confdefs.h
45693
45694
45695
45696
45697
45698
45699
45700
45701
45702
45703  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
45704printf %s "checking whether <netinet/in.h> is self-contained... " >&6; }
45705if test ${gl_cv_header_netinet_in_h_selfcontained+y}
45706then :
45707  printf %s "(cached) " >&6
45708else $as_nop
45709
45710      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45711/* end confdefs.h.  */
45712#include <netinet/in.h>
45713int
45714main (void)
45715{
45716
45717  ;
45718  return 0;
45719}
45720_ACEOF
45721if ac_fn_c_try_compile "$LINENO"
45722then :
45723  gl_cv_header_netinet_in_h_selfcontained=yes
45724else $as_nop
45725  gl_cv_header_netinet_in_h_selfcontained=no
45726fi
45727rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
45728
45729fi
45730{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
45731printf "%s\n" "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
45732  if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
45733    NETINET_IN_H=''
45734  else
45735    NETINET_IN_H='netinet/in.h'
45736    ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
45737if test "x$ac_cv_header_netinet_in_h" = xyes
45738then :
45739  printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
45740
45741fi
45742
45743
45744
45745
45746
45747
45748
45749
45750
45751
45752     if test $gl_cv_have_include_next = yes; then
45753       gl_cv_next_netinet_in_h='<'netinet/in.h'>'
45754     else
45755       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5
45756printf %s "checking absolute name of <netinet/in.h>... " >&6; }
45757if test ${gl_cv_next_netinet_in_h+y}
45758then :
45759  printf %s "(cached) " >&6
45760else $as_nop
45761
45762             if test $ac_cv_header_netinet_in_h = yes; then
45763
45764
45765
45766
45767  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45768/* end confdefs.h.  */
45769#include <netinet/in.h>
45770_ACEOF
45771                case "$host_os" in
45772    aix*) gl_absname_cpp="$ac_cpp -C" ;;
45773    *)    gl_absname_cpp="$ac_cpp" ;;
45774  esac
45775
45776  case "$host_os" in
45777    mingw*)
45778                                          gl_dirsep_regex='[/\\]'
45779      ;;
45780    *)
45781      gl_dirsep_regex='\/'
45782      ;;
45783  esac
45784      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
45785  gl_header_literal_regex=`echo 'netinet/in.h' \
45786                           | sed -e "$gl_make_literal_regex_sed"`
45787  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
45788      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
45789      s|^/[^/]|//&|
45790      p
45791      q
45792    }'
45793
45794        gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
45795  sed -n "$gl_absolute_header_sed"`
45796
45797           gl_header=$gl_cv_absolute_netinet_in_h
45798           gl_cv_next_netinet_in_h='"'$gl_header'"'
45799          else
45800               gl_cv_next_netinet_in_h='<'netinet/in.h'>'
45801             fi
45802
45803
45804fi
45805{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5
45806printf "%s\n" "$gl_cv_next_netinet_in_h" >&6; }
45807     fi
45808     NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
45809
45810     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
45811       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
45812       gl_next_as_first_directive='<'netinet/in.h'>'
45813     else
45814       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
45815       gl_next_as_first_directive=$gl_cv_next_netinet_in_h
45816     fi
45817     NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive
45818
45819
45820
45821
45822    if test $ac_cv_header_netinet_in_h = yes; then
45823      HAVE_NETINET_IN_H=1
45824    else
45825      HAVE_NETINET_IN_H=0
45826    fi
45827
45828  fi
45829
45830   if test -n "$NETINET_IN_H"; then
45831  GL_GENERATE_NETINET_IN_H_TRUE=
45832  GL_GENERATE_NETINET_IN_H_FALSE='#'
45833else
45834  GL_GENERATE_NETINET_IN_H_TRUE='#'
45835  GL_GENERATE_NETINET_IN_H_FALSE=
45836fi
45837
45838
45839
45840
45841
45842
45843
45844
45845
45846
45847
45848  if test $ac_cv_func_nl_langinfo = yes; then
45849    # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
45850    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
45851printf %s "checking whether YESEXPR works... " >&6; }
45852if test ${gl_cv_func_nl_langinfo_yesexpr_works+y}
45853then :
45854  printf %s "(cached) " >&6
45855else $as_nop
45856  if test "$cross_compiling" = yes
45857then :
45858
45859         case "$host_os" in
45860                   # Guess no on irix systems.
45861           irix*)  gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
45862                   # Guess yes elsewhere.
45863           *)      gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
45864         esac
45865
45866else $as_nop
45867  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45868/* end confdefs.h.  */
45869#include <langinfo.h>
45870
45871int
45872main (void)
45873{
45874return !*nl_langinfo(YESEXPR);
45875
45876  ;
45877  return 0;
45878}
45879_ACEOF
45880if ac_fn_c_try_run "$LINENO"
45881then :
45882  gl_cv_func_nl_langinfo_yesexpr_works=yes
45883else $as_nop
45884  gl_cv_func_nl_langinfo_yesexpr_works=no
45885fi
45886rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45887  conftest.$ac_objext conftest.beam conftest.$ac_ext
45888fi
45889
45890
45891fi
45892{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
45893printf "%s\n" "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
45894    case $gl_cv_func_nl_langinfo_yesexpr_works in
45895      *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
45896      *)    FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
45897    esac
45898
45899printf "%s\n" "#define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS" >>confdefs.h
45900
45901    # On Solaris 10 and Solaris 11.3, nl_langinfo is not multithread-safe.
45902    case "$host_os" in
45903      solaris*) NL_LANGINFO_MTSAFE=0 ;;
45904      *)        NL_LANGINFO_MTSAFE=1 ;;
45905    esac
45906
45907printf "%s\n" "#define NL_LANGINFO_MTSAFE $NL_LANGINFO_MTSAFE" >>confdefs.h
45908
45909    if test $HAVE_LANGINFO_CODESET = 1 \
45910       && test $HAVE_LANGINFO_T_FMT_AMPM = 1 \
45911       && test $HAVE_LANGINFO_ALTMON = 1 \
45912       && test $HAVE_LANGINFO_ERA = 1 \
45913       && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1 \
45914       && test $NL_LANGINFO_MTSAFE = 1; then
45915      :
45916    else
45917      REPLACE_NL_LANGINFO=1
45918
45919printf "%s\n" "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
45920
45921    fi
45922  else
45923    HAVE_NL_LANGINFO=0
45924  fi
45925  if test $HAVE_NL_LANGINFO = 0 || test $HAVE_LANGINFO_CODESET = 0; then
45926    LIB_NL_LANGINFO="$LIB_SETLOCALE_NULL"
45927  else
45928    LIB_NL_LANGINFO=
45929  fi
45930
45931
45932  if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
45933
45934
45935
45936
45937
45938
45939
45940
45941  gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext"
45942
45943  fi
45944  if test $REPLACE_NL_LANGINFO = 1 && test $NL_LANGINFO_MTSAFE = 0; then
45945
45946
45947
45948
45949
45950
45951
45952
45953  gl_LIBOBJS="$gl_LIBOBJS nl_langinfo-lock.$ac_objext"
45954
45955
45956
45957
45958  CFLAG_VISIBILITY=
45959  HAVE_VISIBILITY=0
45960  if test -n "$GCC"; then
45961                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
45962printf %s "checking whether the -Werror option is usable... " >&6; }
45963if test ${gl_cv_cc_vis_werror+y}
45964then :
45965  printf %s "(cached) " >&6
45966else $as_nop
45967  gl_save_CFLAGS="$CFLAGS"
45968       CFLAGS="$CFLAGS -Werror"
45969       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45970/* end confdefs.h.  */
45971
45972int
45973main (void)
45974{
45975
45976  ;
45977  return 0;
45978}
45979_ACEOF
45980if ac_fn_c_try_compile "$LINENO"
45981then :
45982  gl_cv_cc_vis_werror=yes
45983else $as_nop
45984  gl_cv_cc_vis_werror=no
45985fi
45986rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
45987       CFLAGS="$gl_save_CFLAGS"
45988
45989fi
45990{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
45991printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
45992        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
45993printf %s "checking for simple visibility declarations... " >&6; }
45994if test ${gl_cv_cc_visibility+y}
45995then :
45996  printf %s "(cached) " >&6
45997else $as_nop
45998  gl_save_CFLAGS="$CFLAGS"
45999       CFLAGS="$CFLAGS -fvisibility=hidden"
46000                                          if test $gl_cv_cc_vis_werror = yes; then
46001         CFLAGS="$CFLAGS -Werror"
46002       fi
46003       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46004/* end confdefs.h.  */
46005extern __attribute__((__visibility__("hidden"))) int hiddenvar;
46006              extern __attribute__((__visibility__("default"))) int exportedvar;
46007              extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
46008              extern __attribute__((__visibility__("default"))) int exportedfunc (void);
46009              void dummyfunc (void);
46010              int hiddenvar;
46011              int exportedvar;
46012              int hiddenfunc (void) { return 51; }
46013              int exportedfunc (void) { return 1225736919; }
46014              void dummyfunc (void) {}
46015
46016int
46017main (void)
46018{
46019
46020  ;
46021  return 0;
46022}
46023_ACEOF
46024if ac_fn_c_try_compile "$LINENO"
46025then :
46026  gl_cv_cc_visibility=yes
46027else $as_nop
46028  gl_cv_cc_visibility=no
46029fi
46030rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
46031       CFLAGS="$gl_save_CFLAGS"
46032
46033fi
46034{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
46035printf "%s\n" "$gl_cv_cc_visibility" >&6; }
46036    if test $gl_cv_cc_visibility = yes; then
46037      CFLAG_VISIBILITY="-fvisibility=hidden"
46038      HAVE_VISIBILITY=1
46039    fi
46040  fi
46041
46042
46043
46044printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
46045
46046
46047
46048  fi
46049
46050
46051
46052
46053
46054
46055
46056
46057
46058          GL_GNULIB_NL_LANGINFO=1
46059
46060
46061
46062
46063
46064printf "%s\n" "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
46065
46066
46067
46068
46069
46070
46071  case "$host_os" in
46072    mingw* | pw*)
46073      REPLACE_OPEN=1
46074      ;;
46075    *)
46076
46077      if test "$gl_cv_macro_O_CLOEXEC" != yes; then
46078        REPLACE_OPEN=1
46079      fi
46080
46081
46082  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
46083printf %s "checking whether open recognizes a trailing slash... " >&6; }
46084if test ${gl_cv_func_open_slash+y}
46085then :
46086  printf %s "(cached) " >&6
46087else $as_nop
46088  # Assume that if we have lstat, we can also check symlinks.
46089     if test $ac_cv_func_lstat = yes; then
46090       touch conftest.tmp
46091       ln -s conftest.tmp conftest.lnk
46092     fi
46093     if test "$cross_compiling" = yes
46094then :
46095
46096        case "$host_os" in
46097          freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
46098            gl_cv_func_open_slash="guessing no" ;;
46099          *)
46100            gl_cv_func_open_slash="guessing yes" ;;
46101        esac
46102
46103else $as_nop
46104  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46105/* end confdefs.h.  */
46106
46107#include <fcntl.h>
46108#if HAVE_UNISTD_H
46109# include <unistd.h>
46110#endif
46111
46112
46113$gl_mda_defines
46114
46115int main ()
46116{
46117  int result = 0;
46118#if HAVE_LSTAT
46119  if (open ("conftest.lnk/", O_RDONLY) != -1)
46120    result |= 1;
46121#endif
46122  if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
46123    result |= 2;
46124  return result;
46125}
46126_ACEOF
46127if ac_fn_c_try_run "$LINENO"
46128then :
46129  gl_cv_func_open_slash=yes
46130else $as_nop
46131  gl_cv_func_open_slash=no
46132fi
46133rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46134  conftest.$ac_objext conftest.beam conftest.$ac_ext
46135fi
46136
46137     rm -f conftest.sl conftest.tmp conftest.lnk
46138
46139fi
46140{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
46141printf "%s\n" "$gl_cv_func_open_slash" >&6; }
46142  case "$gl_cv_func_open_slash" in
46143    *no)
46144
46145printf "%s\n" "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
46146
46147      ;;
46148  esac
46149
46150      case "$gl_cv_func_open_slash" in
46151        *no)
46152          REPLACE_OPEN=1
46153          ;;
46154      esac
46155      ;;
46156  esac
46157
46158    if test $REPLACE_OPEN = 0; then
46159
46160
46161
46162  if test $ac_cv_func_fchdir = no; then
46163    HAVE_FCHDIR=0
46164  fi
46165
46166      if test $HAVE_FCHDIR = 0; then
46167        REPLACE_OPEN=1
46168      fi
46169    fi
46170
46171
46172
46173  if test $REPLACE_OPEN = 1; then
46174
46175
46176
46177
46178
46179
46180
46181
46182  gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
46183
46184
46185
46186  :
46187
46188  fi
46189
46190
46191
46192
46193
46194
46195
46196
46197
46198          GL_GNULIB_OPEN=1
46199
46200
46201
46202
46203
46204printf "%s\n" "#define GNULIB_TEST_OPEN 1" >>confdefs.h
46205
46206
46207
46208
46209
46210
46211
46212
46213
46214  case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink+$gl_cv_macro_O_CLOEXEC in
46215  yes+*yes+yes)
46216    ;;
46217  yes+*)
46218    # Solaris 10 lacks O_CLOEXEC.
46219    # Solaris 9 has *at functions, but uniformly mishandles trailing
46220    # slash in all of them.
46221    REPLACE_OPENAT=1
46222    ;;
46223  *)
46224    HAVE_OPENAT=0
46225    ;;
46226  esac
46227
46228  if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
46229
46230
46231
46232
46233
46234
46235
46236
46237  gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
46238
46239
46240
46241  :
46242
46243  fi
46244
46245
46246printf "%s\n" "#define GNULIB_OPENAT 1" >>confdefs.h
46247
46248
46249
46250
46251
46252
46253
46254
46255
46256
46257          GL_GNULIB_OPENAT=1
46258
46259
46260
46261
46262
46263printf "%s\n" "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
46264
46265
46266
46267
46268
46269
46270  ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
46271if test "x$ac_cv_func_opendir" = xyes
46272then :
46273  printf "%s\n" "#define HAVE_OPENDIR 1" >>confdefs.h
46274
46275fi
46276
46277  if test $ac_cv_func_opendir = no; then
46278    HAVE_OPENDIR=0
46279  fi
46280
46281
46282
46283
46284  if test $ac_cv_func_fchdir = no; then
46285    HAVE_FCHDIR=0
46286  fi
46287
46288    if test $HAVE_FCHDIR = 0; then
46289      if test $HAVE_OPENDIR = 1; then
46290        REPLACE_OPENDIR=1
46291      fi
46292    fi
46293
46294      case $host_os,$HAVE_OPENDIR in
46295    os2*,1)
46296      REPLACE_OPENDIR=1;;
46297  esac
46298
46299  if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
46300
46301
46302
46303
46304
46305
46306
46307
46308  gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
46309
46310  fi
46311
46312
46313
46314
46315
46316
46317
46318
46319
46320          GL_GNULIB_OPENDIR=1
46321
46322
46323
46324
46325
46326printf "%s\n" "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
46327
46328
46329
46330
46331
46332
46333
46334
46335
46336
46337  if test $ac_cv_func_pipe != yes; then
46338    HAVE_PIPE=0
46339  fi
46340
46341  if test $HAVE_PIPE = 0; then
46342
46343
46344
46345
46346
46347
46348
46349
46350  gl_LIBOBJS="$gl_LIBOBJS pipe.$ac_objext"
46351
46352  fi
46353
46354
46355
46356
46357
46358
46359
46360
46361
46362          GL_GNULIB_PIPE=1
46363
46364
46365
46366
46367
46368printf "%s\n" "#define GNULIB_TEST_PIPE 1" >>confdefs.h
46369
46370
46371
46372
46373
46374
46375
46376
46377
46378  if test $ac_cv_func_pipe2 != yes; then
46379    HAVE_PIPE2=0
46380  fi
46381
46382
46383
46384
46385
46386
46387
46388
46389
46390
46391          GL_GNULIB_PIPE2=1
46392
46393
46394
46395
46396
46397printf "%s\n" "#define GNULIB_TEST_PIPE2 1" >>confdefs.h
46398
46399
46400
46401
46402
46403printf "%s\n" "#define GNULIB_PIPE2_SAFER 1" >>confdefs.h
46404
46405
46406
46407
46408
46409  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
46410
46411
46412
46413
46414
46415
46416
46417
46418  gl_LIBOBJS="$gl_LIBOBJS spawn.$ac_objext"
46419
46420  fi
46421
46422
46423
46424
46425
46426
46427
46428
46429
46430          GL_GNULIB_POSIX_SPAWN=1
46431
46432
46433
46434
46435
46436printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWN 1" >>confdefs.h
46437
46438
46439
46440
46441
46442
46443  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
46444
46445
46446
46447
46448
46449
46450
46451
46452  gl_LIBOBJS="$gl_LIBOBJS spawni.$ac_objext"
46453
46454
46455  ac_fn_c_check_header_compile "$LINENO" "paths.h" "ac_cv_header_paths_h" "$ac_includes_default"
46456if test "x$ac_cv_header_paths_h" = xyes
46457then :
46458  printf "%s\n" "#define HAVE_PATHS_H 1" >>confdefs.h
46459
46460fi
46461
46462  ac_fn_c_check_func "$LINENO" "confstr" "ac_cv_func_confstr"
46463if test "x$ac_cv_func_confstr" = xyes
46464then :
46465  printf "%s\n" "#define HAVE_CONFSTR 1" >>confdefs.h
46466
46467fi
46468ac_fn_c_check_func "$LINENO" "sched_setparam" "ac_cv_func_sched_setparam"
46469if test "x$ac_cv_func_sched_setparam" = xyes
46470then :
46471  printf "%s\n" "#define HAVE_SCHED_SETPARAM 1" >>confdefs.h
46472
46473fi
46474ac_fn_c_check_func "$LINENO" "sched_setscheduler" "ac_cv_func_sched_setscheduler"
46475if test "x$ac_cv_func_sched_setscheduler" = xyes
46476then :
46477  printf "%s\n" "#define HAVE_SCHED_SETSCHEDULER 1" >>confdefs.h
46478
46479fi
46480ac_fn_c_check_func "$LINENO" "setegid" "ac_cv_func_setegid"
46481if test "x$ac_cv_func_setegid" = xyes
46482then :
46483  printf "%s\n" "#define HAVE_SETEGID 1" >>confdefs.h
46484
46485fi
46486ac_fn_c_check_func "$LINENO" "seteuid" "ac_cv_func_seteuid"
46487if test "x$ac_cv_func_seteuid" = xyes
46488then :
46489  printf "%s\n" "#define HAVE_SETEUID 1" >>confdefs.h
46490
46491fi
46492ac_fn_c_check_func "$LINENO" "vfork" "ac_cv_func_vfork"
46493if test "x$ac_cv_func_vfork" = xyes
46494then :
46495  printf "%s\n" "#define HAVE_VFORK 1" >>confdefs.h
46496
46497fi
46498
46499
46500  fi
46501
46502
46503
46504
46505
46506
46507
46508  if test $ac_cv_func_posix_spawn_file_actions_addchdir = yes; then
46509            REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR=1
46510  else
46511    HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR=0
46512  fi
46513
46514  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1 || test $HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR = 1; then
46515
46516
46517
46518
46519
46520
46521
46522
46523  gl_LIBOBJS="$gl_LIBOBJS spawn_faction_addchdir.$ac_objext"
46524
46525  fi
46526
46527
46528
46529
46530
46531
46532
46533
46534
46535          GL_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR=1
46536
46537
46538
46539
46540
46541printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR 1" >>confdefs.h
46542
46543
46544
46545
46546
46547
46548
46549
46550
46551  if test $REPLACE_POSIX_SPAWN = 1; then
46552    REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1
46553  else
46554            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_addclose works" >&5
46555printf %s "checking whether posix_spawn_file_actions_addclose works... " >&6; }
46556if test ${gl_cv_func_posix_spawn_file_actions_addclose_works+y}
46557then :
46558  printf %s "(cached) " >&6
46559else $as_nop
46560  if test "$cross_compiling" = yes
46561then :
46562  # Guess no on musl libc and Solaris, yes otherwise.
46563          case "$host_os" in
46564            *-musl*)  gl_cv_func_posix_spawn_file_actions_addclose_works="guessing no" ;;
46565            solaris*) gl_cv_func_posix_spawn_file_actions_addclose_works="guessing no" ;;
46566                      # Guess no on native Windows.
46567            mingw*)   gl_cv_func_posix_spawn_file_actions_addclose_works="guessing no" ;;
46568            *)        gl_cv_func_posix_spawn_file_actions_addclose_works="guessing yes" ;;
46569          esac
46570
46571else $as_nop
46572  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46573/* end confdefs.h.  */
46574
46575#include <spawn.h>
46576int main ()
46577{
46578  posix_spawn_file_actions_t actions;
46579  if (posix_spawn_file_actions_init (&actions) != 0)
46580    return 1;
46581  if (posix_spawn_file_actions_addclose (&actions, -5) == 0)
46582    return 2;
46583  return 0;
46584}
46585_ACEOF
46586if ac_fn_c_try_run "$LINENO"
46587then :
46588  gl_cv_func_posix_spawn_file_actions_addclose_works=yes
46589else $as_nop
46590  gl_cv_func_posix_spawn_file_actions_addclose_works=no
46591fi
46592rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46593  conftest.$ac_objext conftest.beam conftest.$ac_ext
46594fi
46595
46596
46597fi
46598{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_addclose_works" >&5
46599printf "%s\n" "$gl_cv_func_posix_spawn_file_actions_addclose_works" >&6; }
46600    case "$gl_cv_func_posix_spawn_file_actions_addclose_works" in
46601      *yes) ;;
46602      *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1 ;;
46603    esac
46604  fi
46605
46606  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = 1; then
46607
46608
46609
46610
46611
46612
46613
46614
46615  gl_LIBOBJS="$gl_LIBOBJS spawn_faction_addclose.$ac_objext"
46616
46617  fi
46618
46619
46620
46621
46622
46623
46624
46625
46626
46627          GL_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1
46628
46629
46630
46631
46632
46633printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE 1" >>confdefs.h
46634
46635
46636
46637
46638
46639
46640
46641
46642
46643  if test $REPLACE_POSIX_SPAWN = 1; then
46644    REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1
46645  else
46646            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_adddup2 works" >&5
46647printf %s "checking whether posix_spawn_file_actions_adddup2 works... " >&6; }
46648if test ${gl_cv_func_posix_spawn_file_actions_adddup2_works+y}
46649then :
46650  printf %s "(cached) " >&6
46651else $as_nop
46652  if test "$cross_compiling" = yes
46653then :
46654  # Guess no on musl libc and Solaris, yes otherwise.
46655          case "$host_os" in
46656            *-musl*)  gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing no";;
46657            solaris*) gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing no";;
46658                      # Guess no on native Windows.
46659            mingw*)   gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing no" ;;
46660            *)        gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing yes";;
46661          esac
46662
46663else $as_nop
46664  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46665/* end confdefs.h.  */
46666
46667#include <spawn.h>
46668int main ()
46669{
46670  posix_spawn_file_actions_t actions;
46671  if (posix_spawn_file_actions_init (&actions) != 0)
46672    return 1;
46673  if (posix_spawn_file_actions_adddup2 (&actions, 10000000, 2) == 0)
46674    return 2;
46675  return 0;
46676}
46677_ACEOF
46678if ac_fn_c_try_run "$LINENO"
46679then :
46680  gl_cv_func_posix_spawn_file_actions_adddup2_works=yes
46681else $as_nop
46682  gl_cv_func_posix_spawn_file_actions_adddup2_works=no
46683fi
46684rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46685  conftest.$ac_objext conftest.beam conftest.$ac_ext
46686fi
46687
46688
46689fi
46690{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_adddup2_works" >&5
46691printf "%s\n" "$gl_cv_func_posix_spawn_file_actions_adddup2_works" >&6; }
46692    case "$gl_cv_func_posix_spawn_file_actions_adddup2_works" in
46693      *yes) ;;
46694      *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1 ;;
46695    esac
46696  fi
46697
46698  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = 1; then
46699
46700
46701
46702
46703
46704
46705
46706
46707  gl_LIBOBJS="$gl_LIBOBJS spawn_faction_adddup2.$ac_objext"
46708
46709  fi
46710
46711
46712
46713
46714
46715
46716
46717
46718
46719          GL_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1
46720
46721
46722
46723
46724
46725printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 1" >>confdefs.h
46726
46727
46728
46729
46730
46731
46732
46733
46734
46735  if test $REPLACE_POSIX_SPAWN = 1; then
46736    REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1
46737  else
46738            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_addopen works" >&5
46739printf %s "checking whether posix_spawn_file_actions_addopen works... " >&6; }
46740if test ${gl_cv_func_posix_spawn_file_actions_addopen_works+y}
46741then :
46742  printf %s "(cached) " >&6
46743else $as_nop
46744  if test "$cross_compiling" = yes
46745then :
46746  # Guess no on musl libc and Solaris, yes otherwise.
46747          case "$host_os" in
46748            *-musl*)  gl_cv_func_posix_spawn_file_actions_addopen_works="guessing no";;
46749            solaris*) gl_cv_func_posix_spawn_file_actions_addopen_works="guessing no";;
46750                      # Guess no on native Windows.
46751            mingw*)   gl_cv_func_posix_spawn_file_actions_addopen_works="guessing no" ;;
46752            *)        gl_cv_func_posix_spawn_file_actions_addopen_works="guessing yes";;
46753          esac
46754
46755else $as_nop
46756  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46757/* end confdefs.h.  */
46758
46759#include <spawn.h>
46760#include <fcntl.h>
46761int main ()
46762{
46763  posix_spawn_file_actions_t actions;
46764  if (posix_spawn_file_actions_init (&actions) != 0)
46765    return 1;
46766  if (posix_spawn_file_actions_addopen (&actions, 10000000, "foo", 0, O_RDONLY)
46767      == 0)
46768    return 2;
46769  return 0;
46770}
46771_ACEOF
46772if ac_fn_c_try_run "$LINENO"
46773then :
46774  gl_cv_func_posix_spawn_file_actions_addopen_works=yes
46775else $as_nop
46776  gl_cv_func_posix_spawn_file_actions_addopen_works=no
46777fi
46778rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46779  conftest.$ac_objext conftest.beam conftest.$ac_ext
46780fi
46781
46782
46783fi
46784{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_addopen_works" >&5
46785printf "%s\n" "$gl_cv_func_posix_spawn_file_actions_addopen_works" >&6; }
46786    case "$gl_cv_func_posix_spawn_file_actions_addopen_works" in
46787      *yes) ;;
46788      *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1 ;;
46789    esac
46790  fi
46791
46792  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = 1; then
46793
46794
46795
46796
46797
46798
46799
46800
46801  gl_LIBOBJS="$gl_LIBOBJS spawn_faction_addopen.$ac_objext"
46802
46803  fi
46804
46805
46806
46807
46808
46809
46810
46811
46812
46813          GL_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1
46814
46815
46816
46817
46818
46819printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN 1" >>confdefs.h
46820
46821
46822
46823
46824
46825
46826  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
46827
46828
46829
46830
46831
46832
46833
46834
46835  gl_LIBOBJS="$gl_LIBOBJS spawn_faction_destroy.$ac_objext"
46836
46837  fi
46838
46839
46840
46841
46842
46843
46844
46845
46846
46847          GL_GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=1
46848
46849
46850
46851
46852
46853printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_DESTROY 1" >>confdefs.h
46854
46855
46856
46857
46858
46859
46860  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
46861
46862
46863
46864
46865
46866
46867
46868
46869  gl_LIBOBJS="$gl_LIBOBJS spawn_faction_init.$ac_objext"
46870
46871  fi
46872
46873
46874
46875
46876
46877
46878
46879
46880
46881          GL_GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=1
46882
46883
46884
46885
46886
46887printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_INIT 1" >>confdefs.h
46888
46889
46890
46891
46892
46893
46894  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
46895
46896
46897
46898
46899
46900
46901
46902
46903  gl_LIBOBJS="$gl_LIBOBJS spawnattr_destroy.$ac_objext"
46904
46905  fi
46906
46907
46908
46909
46910
46911
46912
46913
46914
46915          GL_GNULIB_POSIX_SPAWNATTR_DESTROY=1
46916
46917
46918
46919
46920
46921printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWNATTR_DESTROY 1" >>confdefs.h
46922
46923
46924
46925
46926
46927
46928  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
46929
46930
46931
46932
46933
46934
46935
46936
46937  gl_LIBOBJS="$gl_LIBOBJS spawnattr_init.$ac_objext"
46938
46939  fi
46940
46941
46942
46943
46944
46945
46946
46947
46948
46949          GL_GNULIB_POSIX_SPAWNATTR_INIT=1
46950
46951
46952
46953
46954
46955printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWNATTR_INIT 1" >>confdefs.h
46956
46957
46958
46959
46960
46961
46962  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
46963
46964
46965
46966
46967
46968
46969
46970
46971  gl_LIBOBJS="$gl_LIBOBJS spawnattr_setflags.$ac_objext"
46972
46973  fi
46974
46975
46976
46977
46978
46979
46980
46981
46982
46983          GL_GNULIB_POSIX_SPAWNATTR_SETFLAGS=1
46984
46985
46986
46987
46988
46989printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWNATTR_SETFLAGS 1" >>confdefs.h
46990
46991
46992
46993
46994
46995
46996  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
46997
46998
46999
47000
47001
47002
47003
47004
47005  gl_LIBOBJS="$gl_LIBOBJS spawnattr_setpgroup.$ac_objext"
47006
47007  fi
47008
47009
47010
47011
47012
47013
47014
47015
47016
47017          GL_GNULIB_POSIX_SPAWNATTR_SETPGROUP=1
47018
47019
47020
47021
47022
47023printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWNATTR_SETPGROUP 1" >>confdefs.h
47024
47025
47026
47027
47028
47029
47030  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
47031
47032
47033
47034
47035
47036
47037
47038
47039  gl_LIBOBJS="$gl_LIBOBJS spawnattr_setsigmask.$ac_objext"
47040
47041  fi
47042
47043
47044
47045
47046
47047
47048
47049
47050
47051          GL_GNULIB_POSIX_SPAWNATTR_SETSIGMASK=1
47052
47053
47054
47055
47056
47057printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWNATTR_SETSIGMASK 1" >>confdefs.h
47058
47059
47060
47061
47062
47063
47064  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
47065
47066
47067
47068
47069
47070
47071
47072
47073  gl_LIBOBJS="$gl_LIBOBJS spawnp.$ac_objext"
47074
47075  fi
47076
47077
47078
47079
47080
47081
47082
47083
47084
47085          GL_GNULIB_POSIX_SPAWNP=1
47086
47087
47088
47089
47090
47091printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWNP 1" >>confdefs.h
47092
47093
47094
47095
47096      :
47097
47098
47099
47100  :
47101
47102
47103
47104
47105  ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
47106if test "x$ac_cv_func_raise" = xyes
47107then :
47108  printf "%s\n" "#define HAVE_RAISE 1" >>confdefs.h
47109
47110fi
47111
47112  if test $ac_cv_func_raise = no; then
47113    HAVE_RAISE=0
47114  else
47115
47116
47117      if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
47118        REPLACE_RAISE=1
47119      fi
47120
47121
47122
47123
47124
47125  HAVE_POSIX_SIGNALBLOCKING=0
47126  if test "$gl_cv_type_sigset_t" = yes; then
47127    ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
47128if test "x$ac_cv_func_sigprocmask" = xyes
47129then :
47130  HAVE_POSIX_SIGNALBLOCKING=1
47131fi
47132
47133  fi
47134
47135      if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
47136
47137
47138
47139
47140          if test $gl_cv_header_signal_h_SIGPIPE != yes; then
47141            REPLACE_RAISE=1
47142          fi
47143
47144      fi
47145
47146  fi
47147
47148  if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
47149
47150
47151
47152
47153
47154
47155
47156
47157  gl_LIBOBJS="$gl_LIBOBJS raise.$ac_objext"
47158
47159    :
47160  fi
47161
47162
47163
47164
47165
47166
47167
47168
47169
47170          GL_GNULIB_RAISE=1
47171
47172
47173
47174
47175
47176printf "%s\n" "#define GNULIB_TEST_RAISE 1" >>confdefs.h
47177
47178
47179
47180
47181
47182
47183
47184  ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
47185if test "x$ac_cv_func_rawmemchr" = xyes
47186then :
47187  printf "%s\n" "#define HAVE_RAWMEMCHR 1" >>confdefs.h
47188
47189fi
47190
47191  if test $ac_cv_func_rawmemchr = no; then
47192    HAVE_RAWMEMCHR=0
47193  fi
47194
47195  if test $HAVE_RAWMEMCHR = 0; then
47196
47197
47198
47199
47200
47201
47202
47203
47204  gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
47205
47206    :
47207  fi
47208
47209
47210
47211
47212
47213
47214
47215
47216
47217          GL_GNULIB_RAWMEMCHR=1
47218
47219
47220
47221
47222
47223printf "%s\n" "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
47224
47225
47226
47227
47228
47229
47230  ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
47231if test "x$ac_cv_func_readdir" = xyes
47232then :
47233  printf "%s\n" "#define HAVE_READDIR 1" >>confdefs.h
47234
47235fi
47236
47237  if test $ac_cv_func_readdir = no; then
47238    HAVE_READDIR=0
47239  fi
47240
47241  if test $HAVE_READDIR = 0; then
47242
47243
47244
47245
47246
47247
47248
47249
47250  gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
47251
47252  fi
47253
47254
47255
47256
47257
47258
47259
47260
47261
47262          GL_GNULIB_READDIR=1
47263
47264
47265
47266
47267
47268printf "%s\n" "#define GNULIB_TEST_READDIR 1" >>confdefs.h
47269
47270
47271
47272
47273
47274
47275  if test $ac_cv_func_readlink = no; then
47276    HAVE_READLINK=0
47277  else
47278    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
47279printf %s "checking whether readlink signature is correct... " >&6; }
47280if test ${gl_cv_decl_readlink_works+y}
47281then :
47282  printf %s "(cached) " >&6
47283else $as_nop
47284  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47285/* end confdefs.h.  */
47286#include <unistd.h>
47287      /* Cause compilation failure if original declaration has wrong type.  */
47288      ssize_t readlink (const char *, char *, size_t);
47289int
47290main (void)
47291{
47292
47293  ;
47294  return 0;
47295}
47296_ACEOF
47297if ac_fn_c_try_compile "$LINENO"
47298then :
47299  gl_cv_decl_readlink_works=yes
47300else $as_nop
47301  gl_cv_decl_readlink_works=no
47302fi
47303rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
47304fi
47305{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
47306printf "%s\n" "$gl_cv_decl_readlink_works" >&6; }
47307            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
47308printf %s "checking whether readlink handles trailing slash correctly... " >&6; }
47309if test ${gl_cv_func_readlink_trailing_slash+y}
47310then :
47311  printf %s "(cached) " >&6
47312else $as_nop
47313  # We have readlink, so assume ln -s works.
47314       ln -s conftest.no-such conftest.link
47315       ln -s conftest.link conftest.lnk2
47316       if test "$cross_compiling" = yes
47317then :
47318  case "$host_os" in
47319            # Guess yes on Linux or glibc systems.
47320            linux-* | linux | *-gnu* | gnu*)
47321              gl_cv_func_readlink_trailing_slash="guessing yes" ;;
47322            # Guess no on AIX or HP-UX.
47323            aix* | hpux*)
47324              gl_cv_func_readlink_trailing_slash="guessing no" ;;
47325            # If we don't know, obey --enable-cross-guesses.
47326            *)
47327              gl_cv_func_readlink_trailing_slash="$gl_cross_guess_normal" ;;
47328          esac
47329
47330else $as_nop
47331  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47332/* end confdefs.h.  */
47333#include <unistd.h>
47334
47335int
47336main (void)
47337{
47338char buf[20];
47339      return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
47340  ;
47341  return 0;
47342}
47343_ACEOF
47344if ac_fn_c_try_run "$LINENO"
47345then :
47346  gl_cv_func_readlink_trailing_slash=yes
47347else $as_nop
47348  gl_cv_func_readlink_trailing_slash=no
47349fi
47350rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
47351  conftest.$ac_objext conftest.beam conftest.$ac_ext
47352fi
47353
47354      rm -f conftest.link conftest.lnk2
47355fi
47356{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_trailing_slash" >&5
47357printf "%s\n" "$gl_cv_func_readlink_trailing_slash" >&6; }
47358    case "$gl_cv_func_readlink_trailing_slash" in
47359      *yes)
47360        if test "$gl_cv_decl_readlink_works" != yes; then
47361          REPLACE_READLINK=1
47362        fi
47363        ;;
47364      *)
47365
47366printf "%s\n" "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
47367
47368        REPLACE_READLINK=1
47369        ;;
47370    esac
47371
47372    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink truncates results correctly" >&5
47373printf %s "checking whether readlink truncates results correctly... " >&6; }
47374if test ${gl_cv_func_readlink_truncate+y}
47375then :
47376  printf %s "(cached) " >&6
47377else $as_nop
47378  # We have readlink, so assume ln -s works.
47379       ln -s ab conftest.link
47380       if test "$cross_compiling" = yes
47381then :
47382  case "$host_os" in
47383            # Guess yes on Linux or glibc systems.
47384            linux-* | linux | *-gnu* | gnu*)
47385              gl_cv_func_readlink_truncate="guessing yes" ;;
47386            # Guess no on AIX or HP-UX.
47387            aix* | hpux*)
47388              gl_cv_func_readlink_truncate="guessing no" ;;
47389            # If we don't know, obey --enable-cross-guesses.
47390            *)
47391              gl_cv_func_readlink_truncate="$gl_cross_guess_normal" ;;
47392          esac
47393
47394else $as_nop
47395  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47396/* end confdefs.h.  */
47397#include <unistd.h>
47398
47399int
47400main (void)
47401{
47402char c;
47403      return readlink ("conftest.link", &c, 1) != 1;
47404  ;
47405  return 0;
47406}
47407_ACEOF
47408if ac_fn_c_try_run "$LINENO"
47409then :
47410  gl_cv_func_readlink_truncate=yes
47411else $as_nop
47412  gl_cv_func_readlink_truncate=no
47413fi
47414rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
47415  conftest.$ac_objext conftest.beam conftest.$ac_ext
47416fi
47417
47418      rm -f conftest.link conftest.lnk2
47419fi
47420{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_truncate" >&5
47421printf "%s\n" "$gl_cv_func_readlink_truncate" >&6; }
47422    case $gl_cv_func_readlink_truncate in
47423      *yes)
47424        if test "$gl_cv_decl_readlink_works" != yes; then
47425          REPLACE_READLINK=1
47426        fi
47427        ;;
47428      *)
47429
47430printf "%s\n" "#define READLINK_TRUNCATE_BUG 1" >>confdefs.h
47431
47432        REPLACE_READLINK=1
47433        ;;
47434    esac
47435  fi
47436
47437  if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
47438
47439
47440
47441
47442
47443
47444
47445
47446  gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
47447
47448
47449  :
47450
47451  fi
47452
47453
47454
47455
47456
47457
47458
47459
47460
47461          GL_GNULIB_READLINK=1
47462
47463
47464
47465
47466
47467printf "%s\n" "#define GNULIB_TEST_READLINK 1" >>confdefs.h
47468
47469
47470
47471
47472
47473
47474  if test $REPLACE_REALLOC = 0; then
47475
47476    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether realloc (0, 0) returns nonnull" >&5
47477printf %s "checking whether realloc (0, 0) returns nonnull... " >&6; }
47478if test ${ac_cv_func_realloc_0_nonnull+y}
47479then :
47480  printf %s "(cached) " >&6
47481else $as_nop
47482  if test "$cross_compiling" = yes
47483then :
47484  case "$host_os" in
47485          # Guess yes on platforms where we know the result.
47486          *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
47487          | gnu* | *-musl* | midnightbsd* \
47488          | hpux* | solaris* | cygwin* | mingw* | msys* )
47489            ac_cv_func_realloc_0_nonnull="guessing yes" ;;
47490          # If we don't know, obey --enable-cross-guesses.
47491          *) ac_cv_func_realloc_0_nonnull="$gl_cross_guess_normal" ;;
47492        esac
47493
47494else $as_nop
47495  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47496/* end confdefs.h.  */
47497#include <stdlib.h>
47498
47499int
47500main (void)
47501{
47502void *p = realloc (0, 0);
47503            int result = !p;
47504            free (p);
47505            return result;
47506  ;
47507  return 0;
47508}
47509
47510_ACEOF
47511if ac_fn_c_try_run "$LINENO"
47512then :
47513  ac_cv_func_realloc_0_nonnull=yes
47514else $as_nop
47515  ac_cv_func_realloc_0_nonnull=no
47516fi
47517rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
47518  conftest.$ac_objext conftest.beam conftest.$ac_ext
47519fi
47520
47521
47522fi
47523{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
47524printf "%s\n" "$ac_cv_func_realloc_0_nonnull" >&6; }
47525  case $ac_cv_func_realloc_0_nonnull in #(
47526  *yes) :
47527     ;; #(
47528  *) :
47529    REPLACE_REALLOC=1 ;;
47530esac
47531
47532  fi
47533
47534  if test $REPLACE_REALLOC = 1; then
47535
47536
47537
47538
47539
47540
47541
47542
47543  gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
47544
47545  fi
47546
47547
47548
47549  if test $REPLACE_MALLOC = 1; then
47550    REPLACE_REALLOC=1
47551  fi
47552
47553  if test $REPLACE_REALLOC = 1; then
47554
47555
47556
47557
47558
47559
47560
47561
47562  gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
47563
47564  fi
47565
47566
47567
47568
47569
47570
47571
47572
47573
47574          GL_GNULIB_REALLOC_POSIX=1
47575
47576
47577
47578
47579
47580printf "%s\n" "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
47581
47582
47583
47584
47585
47586
47587
47588
47589  ac_fn_c_check_func "$LINENO" "reallocarray" "ac_cv_func_reallocarray"
47590if test "x$ac_cv_func_reallocarray" = xyes
47591then :
47592  printf "%s\n" "#define HAVE_REALLOCARRAY 1" >>confdefs.h
47593
47594fi
47595
47596  if test "$ac_cv_func_reallocarray" = no; then
47597    HAVE_REALLOCARRAY=0
47598  elif test "$gl_cv_malloc_ptrdiff" = no; then
47599    REPLACE_REALLOCARRAY=1
47600  fi
47601
47602  if test $HAVE_REALLOCARRAY = 0 || test $REPLACE_REALLOCARRAY = 1; then
47603
47604
47605
47606
47607
47608
47609
47610
47611  gl_LIBOBJS="$gl_LIBOBJS reallocarray.$ac_objext"
47612
47613    :
47614  fi
47615
47616
47617printf "%s\n" "#define GNULIB_REALLOCARRAY 1" >>confdefs.h
47618
47619
47620
47621
47622
47623
47624
47625
47626
47627
47628
47629          GL_GNULIB_REALLOCARRAY=1
47630
47631
47632
47633
47634
47635printf "%s\n" "#define GNULIB_TEST_REALLOCARRAY 1" >>confdefs.h
47636
47637
47638
47639
47640  if test "$ac_cv_header_winsock2_h" = yes; then
47641
47642
47643
47644
47645
47646
47647
47648
47649  gl_LIBOBJS="$gl_LIBOBJS recv.$ac_objext"
47650
47651  fi
47652
47653
47654
47655
47656
47657
47658
47659
47660
47661          GL_GNULIB_RECV=1
47662
47663
47664
47665
47666
47667printf "%s\n" "#define GNULIB_TEST_RECV 1" >>confdefs.h
47668
47669
47670
47671
47672
47673# Check whether --with-included-regex was given.
47674if test ${with_included_regex+y}
47675then :
47676  withval=$with_included_regex;
47677fi
47678
47679
47680  case $with_included_regex in #(
47681  yes|no) ac_use_included_regex=$with_included_regex
47682        ;;
47683  '')
47684    # If the system regex support is good enough that it passes the
47685    # following run test, then default to *not* using the included regex.c.
47686    # If cross compiling, assume the test would fail and use the included
47687    # regex.c.
47688
47689
47690    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
47691printf %s "checking for working re_compile_pattern... " >&6; }
47692if test ${gl_cv_func_re_compile_pattern_working+y}
47693then :
47694  printf %s "(cached) " >&6
47695else $as_nop
47696  if test "$cross_compiling" = yes
47697then :
47698  case "$host_os" in
47699                   # Guess no on native Windows.
47700           mingw*) gl_cv_func_re_compile_pattern_working="guessing no" ;;
47701                   # Otherwise obey --enable-cross-guesses.
47702           *)      gl_cv_func_re_compile_pattern_working="$gl_cross_guess_normal" ;;
47703         esac
47704
47705else $as_nop
47706  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47707/* end confdefs.h.  */
47708#include <regex.h>
47709
47710            #include <locale.h>
47711            #include <limits.h>
47712            #include <string.h>
47713
47714            #if defined M_CHECK_ACTION || HAVE_DECL_ALARM
47715            # include <signal.h>
47716            # include <unistd.h>
47717            #endif
47718
47719            #if HAVE_MALLOC_H
47720            # include <malloc.h>
47721            #endif
47722
47723            #ifdef M_CHECK_ACTION
47724            /* Exit with distinguishable exit code.  */
47725            static void sigabrt_no_core (int sig) { raise (SIGTERM); }
47726            #endif
47727
47728int
47729main (void)
47730{
47731int result = 0;
47732            static struct re_pattern_buffer regex;
47733            unsigned char folded_chars[UCHAR_MAX + 1];
47734            int i;
47735            const char *s;
47736            struct re_registers regs;
47737
47738            /* Some builds of glibc go into an infinite loop on this
47739               test.  Use alarm to force death, and mallopt to avoid
47740               malloc recursion in diagnosing the corrupted heap. */
47741#if HAVE_DECL_ALARM
47742            signal (SIGALRM, SIG_DFL);
47743            alarm (2);
47744#endif
47745#ifdef M_CHECK_ACTION
47746            signal (SIGABRT, sigabrt_no_core);
47747            mallopt (M_CHECK_ACTION, 2);
47748#endif
47749
47750            if (setlocale (LC_ALL, "en_US.UTF-8"))
47751              {
47752                {
47753                  /* https://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
47754                     This test needs valgrind to catch the bug on Debian
47755                     GNU/Linux 3.1 x86, but it might catch the bug better
47756                     on other platforms and it shouldn't hurt to try the
47757                     test here.  */
47758                  static char const pat[] = "insert into";
47759                  static char const data[] =
47760                    "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
47761                  re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
47762                                 | RE_ICASE);
47763                  memset (&regex, 0, sizeof regex);
47764                  s = re_compile_pattern (pat, sizeof pat - 1, &regex);
47765                  if (s)
47766                    result |= 1;
47767                  else
47768                    {
47769                      if (re_search (&regex, data, sizeof data - 1,
47770                                     0, sizeof data - 1, &regs)
47771                          != -1)
47772                        result |= 1;
47773                      regfree (&regex);
47774                    }
47775                }
47776
47777                {
47778                  /* This test is from glibc bug 15078.
47779                     The test case is from Andreas Schwab in
47780                     <https://sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
47781                     */
47782                  static char const pat[] = "[^x]x";
47783                  static char const data[] =
47784                    /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
47785                    "\xe1\x80\x80"
47786                    "\xe1\x80\xbb"
47787                    "\xe1\x80\xbd"
47788                    "\xe1\x80\x94"
47789                    "\xe1\x80\xba"
47790                    "\xe1\x80\xaf"
47791                    "\xe1\x80\x95"
47792                    "\xe1\x80\xba"
47793                    "x";
47794                  re_set_syntax (0);
47795                  memset (&regex, 0, sizeof regex);
47796                  s = re_compile_pattern (pat, sizeof pat - 1, &regex);
47797                  if (s)
47798                    result |= 1;
47799                  else
47800                    {
47801                      i = re_search (&regex, data, sizeof data - 1,
47802                                     0, sizeof data - 1, 0);
47803                      if (i != 0 && i != 21)
47804                        result |= 1;
47805                      regfree (&regex);
47806                    }
47807                }
47808
47809                if (! setlocale (LC_ALL, "C"))
47810                  return 1;
47811              }
47812
47813            /* This test is from glibc bug 3957, reported by Andrew Mackey.  */
47814            re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
47815            memset (&regex, 0, sizeof regex);
47816            s = re_compile_pattern ("a[^x]b", 6, &regex);
47817            if (s)
47818              result |= 2;
47819            else
47820              {
47821                /* This should fail, but succeeds for glibc-2.5.  */
47822                if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
47823                  result |= 2;
47824                regfree (&regex);
47825              }
47826
47827            /* This regular expression is from Spencer ere test number 75
47828               in grep-2.3.  */
47829            re_set_syntax (RE_SYNTAX_POSIX_EGREP);
47830            memset (&regex, 0, sizeof regex);
47831            for (i = 0; i <= UCHAR_MAX; i++)
47832              folded_chars[i] = i;
47833            regex.translate = folded_chars;
47834            s = re_compile_pattern ("a[[:]:]]b\n", 11, &regex);
47835            /* This should fail with _Invalid character class name_ error.  */
47836            if (!s)
47837              {
47838                result |= 4;
47839                regfree (&regex);
47840              }
47841
47842            /* Ensure that [b-a] is diagnosed as invalid, when
47843               using RE_NO_EMPTY_RANGES. */
47844            re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
47845            memset (&regex, 0, sizeof regex);
47846            s = re_compile_pattern ("a[b-a]", 6, &regex);
47847            if (s == 0)
47848              {
47849                result |= 8;
47850                regfree (&regex);
47851              }
47852
47853            /* This should succeed, but does not for glibc-2.1.3.  */
47854            memset (&regex, 0, sizeof regex);
47855            s = re_compile_pattern ("{1", 2, &regex);
47856            if (s)
47857              result |= 8;
47858            else
47859              regfree (&regex);
47860
47861            /* The following example is derived from a problem report
47862               against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>.  */
47863            memset (&regex, 0, sizeof regex);
47864            s = re_compile_pattern ("[an\371]*n", 7, &regex);
47865            if (s)
47866              result |= 8;
47867            else
47868              {
47869                /* This should match, but does not for glibc-2.2.1.  */
47870                if (re_match (&regex, "an", 2, 0, &regs) != 2)
47871                  result |= 8;
47872                else
47873                  {
47874                    free (regs.start);
47875                    free (regs.end);
47876                  }
47877                regfree (&regex);
47878              }
47879
47880            memset (&regex, 0, sizeof regex);
47881            s = re_compile_pattern ("x", 1, &regex);
47882            if (s)
47883              result |= 8;
47884            else
47885              {
47886                /* glibc-2.2.93 does not work with a negative RANGE argument.  */
47887                if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
47888                  result |= 8;
47889                else
47890                  {
47891                    free (regs.start);
47892                    free (regs.end);
47893                  }
47894                regfree (&regex);
47895              }
47896
47897            /* The version of regex.c in older versions of gnulib
47898               ignored RE_ICASE.  Detect that problem too.  */
47899            re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
47900            memset (&regex, 0, sizeof regex);
47901            s = re_compile_pattern ("x", 1, &regex);
47902            if (s)
47903              result |= 16;
47904            else
47905              {
47906                if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
47907                  result |= 16;
47908                else
47909                  {
47910                    free (regs.start);
47911                    free (regs.end);
47912                  }
47913                regfree (&regex);
47914              }
47915
47916            /* Catch a bug reported by Vin Shelton in
47917               https://lists.gnu.org/r/bug-coreutils/2007-06/msg00089.html
47918               */
47919            re_set_syntax (RE_SYNTAX_POSIX_BASIC
47920                           & ~RE_CONTEXT_INVALID_DUP
47921                           & ~RE_NO_EMPTY_RANGES);
47922            memset (&regex, 0, sizeof regex);
47923            s = re_compile_pattern ("[[:alnum:]_-]\\\\+\$", 16, &regex);
47924            if (s)
47925              result |= 32;
47926            else
47927              regfree (&regex);
47928
47929            /* REG_STARTEND was added to glibc on 2004-01-15.
47930               Reject older versions.  */
47931            if (! REG_STARTEND)
47932              result |= 64;
47933
47934            /* Matching with the compiled form of this regexp would provoke
47935               an assertion failure prior to glibc-2.28:
47936                 regexec.c:1375: pop_fail_stack: Assertion 'num >= 0' failed
47937               With glibc-2.28, compilation fails and reports the invalid
47938               back reference.  */
47939            re_set_syntax (RE_SYNTAX_POSIX_EGREP);
47940            memset (&regex, 0, sizeof regex);
47941            s = re_compile_pattern ("0|()0|\\\\1|0", 10, &regex);
47942            if (!s)
47943              {
47944                memset (&regs, 0, sizeof regs);
47945                i = re_search (&regex, "x", 1, 0, 1, &regs);
47946                if (i != -1)
47947                  result |= 64;
47948                if (0 <= i)
47949                  {
47950                    free (regs.start);
47951                    free (regs.end);
47952                  }
47953                regfree (&regex);
47954              }
47955            else
47956              {
47957                if (strcmp (s, "Invalid back reference"))
47958                  result |= 64;
47959              }
47960
47961            /* glibc bug 11053.  */
47962            re_set_syntax (RE_SYNTAX_POSIX_BASIC);
47963            memset (&regex, 0, sizeof regex);
47964            static char const pat_sub2[] = "\\\\(a*\\\\)*a*\\\\1";
47965            s = re_compile_pattern (pat_sub2, sizeof pat_sub2 - 1, &regex);
47966            if (s)
47967              result |= 64;
47968            else
47969              {
47970                memset (&regs, 0, sizeof regs);
47971                static char const data[] = "a";
47972                int datalen = sizeof data - 1;
47973                i = re_search (&regex, data, datalen, 0, datalen, &regs);
47974                if (i != 0)
47975                  result |= 64;
47976                else if (regs.num_regs < 2)
47977                  result |= 64;
47978                else if (! (regs.start[0] == 0 && regs.end[0] == 1))
47979                  result |= 64;
47980                else if (! (regs.start[1] == 0 && regs.end[1] == 0))
47981                  result |= 64;
47982                regfree (&regex);
47983                free (regs.start);
47984                free (regs.end);
47985              }
47986
47987#if 0
47988            /* It would be nice to reject hosts whose regoff_t values are too
47989               narrow (including glibc on hosts with 64-bit ptrdiff_t and
47990               32-bit int), but we should wait until glibc implements this
47991               feature.  Otherwise, support for equivalence classes and
47992               multibyte collation symbols would always be broken except
47993               when compiling --without-included-regex.   */
47994            if (sizeof (regoff_t) < sizeof (ptrdiff_t)
47995                || sizeof (regoff_t) < sizeof (ssize_t))
47996              result |= 64;
47997#endif
47998
47999            return result;
48000
48001  ;
48002  return 0;
48003}
48004_ACEOF
48005if ac_fn_c_try_run "$LINENO"
48006then :
48007  gl_cv_func_re_compile_pattern_working=yes
48008else $as_nop
48009  gl_cv_func_re_compile_pattern_working=no
48010fi
48011rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48012  conftest.$ac_objext conftest.beam conftest.$ac_ext
48013fi
48014
48015
48016fi
48017{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
48018printf "%s\n" "$gl_cv_func_re_compile_pattern_working" >&6; }
48019    case "$gl_cv_func_re_compile_pattern_working" in #(
48020      *yes) ac_use_included_regex=no;; #(
48021      *no) ac_use_included_regex=yes;;
48022    esac
48023    ;;
48024  *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
48025    ;;
48026  esac
48027
48028  if test $ac_use_included_regex = yes; then
48029
48030printf "%s\n" "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
48031
48032
48033printf "%s\n" "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
48034
48035
48036printf "%s\n" "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
48037
48038
48039printf "%s\n" "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
48040
48041
48042printf "%s\n" "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
48043
48044
48045printf "%s\n" "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
48046
48047
48048printf "%s\n" "#define re_search rpl_re_search" >>confdefs.h
48049
48050
48051printf "%s\n" "#define re_search_2 rpl_re_search_2" >>confdefs.h
48052
48053
48054printf "%s\n" "#define re_match rpl_re_match" >>confdefs.h
48055
48056
48057printf "%s\n" "#define re_match_2 rpl_re_match_2" >>confdefs.h
48058
48059
48060printf "%s\n" "#define re_set_registers rpl_re_set_registers" >>confdefs.h
48061
48062
48063printf "%s\n" "#define re_comp rpl_re_comp" >>confdefs.h
48064
48065
48066printf "%s\n" "#define re_exec rpl_re_exec" >>confdefs.h
48067
48068
48069printf "%s\n" "#define regcomp rpl_regcomp" >>confdefs.h
48070
48071
48072printf "%s\n" "#define regexec rpl_regexec" >>confdefs.h
48073
48074
48075printf "%s\n" "#define regerror rpl_regerror" >>confdefs.h
48076
48077
48078printf "%s\n" "#define regfree rpl_regfree" >>confdefs.h
48079
48080  fi
48081
48082  if test $ac_use_included_regex = yes; then
48083
48084
48085
48086
48087
48088
48089
48090
48091  gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext"
48092
48093
48094
48095
48096
48097
48098
48099  ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
48100if test "x$ac_cv_header_libintl_h" = xyes
48101then :
48102  printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h
48103
48104fi
48105
48106
48107  ac_fn_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
48108" "$ac_c_undeclared_builtin_options" "CFLAGS"
48109if test "x$ac_cv_have_decl_isblank" = xyes
48110then :
48111  ac_have_decl=1
48112else $as_nop
48113  ac_have_decl=0
48114fi
48115printf "%s\n" "#define HAVE_DECL_ISBLANK $ac_have_decl" >>confdefs.h
48116
48117
48118  fi
48119
48120
48121
48122
48123
48124                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
48125printf %s "checking whether rename honors trailing slash on destination... " >&6; }
48126if test ${gl_cv_func_rename_slash_dst_works+y}
48127then :
48128  printf %s "(cached) " >&6
48129else $as_nop
48130  rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
48131    touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
48132      as_fn_error $? "cannot create temporary files" "$LINENO" 5
48133    # Assume that if we have lstat, we can also check symlinks.
48134    if test $ac_cv_func_lstat = yes; then
48135      ln -s conftest.f conftest.lnk
48136    fi
48137    if test "$cross_compiling" = yes
48138then :
48139        case "$host_os" in
48140                          # Guess yes on Linux systems.
48141         linux-* | linux) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
48142                          # Guess yes on glibc systems.
48143         *-gnu*)          gl_cv_func_rename_slash_dst_works="guessing yes" ;;
48144                          # Guess no on native Windows.
48145         mingw*)          gl_cv_func_rename_slash_dst_works="guessing no" ;;
48146                          # If we don't know, obey --enable-cross-guesses.
48147         *)               gl_cv_func_rename_slash_dst_works="$gl_cross_guess_normal" ;;
48148       esac
48149
48150else $as_nop
48151  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48152/* end confdefs.h.  */
48153
48154#        include <stdio.h>
48155#        include <stdlib.h>
48156
48157int
48158main (void)
48159{
48160int result = 0;
48161           if (rename ("conftest.f1", "conftest.f2/") == 0)
48162             result |= 1;
48163           if (rename ("conftest.d1", "conftest.d2/") != 0)
48164             result |= 2;
48165#if HAVE_LSTAT
48166           if (rename ("conftest.f", "conftest.lnk/") == 0)
48167             result |= 4;
48168#endif
48169           return result;
48170
48171  ;
48172  return 0;
48173}
48174_ACEOF
48175if ac_fn_c_try_run "$LINENO"
48176then :
48177  gl_cv_func_rename_slash_dst_works=yes
48178else $as_nop
48179  gl_cv_func_rename_slash_dst_works=no
48180fi
48181rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48182  conftest.$ac_objext conftest.beam conftest.$ac_ext
48183fi
48184
48185    rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
48186
48187fi
48188{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
48189printf "%s\n" "$gl_cv_func_rename_slash_dst_works" >&6; }
48190  case "$gl_cv_func_rename_slash_dst_works" in
48191    *yes) ;;
48192    *)
48193      REPLACE_RENAME=1
48194
48195printf "%s\n" "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
48196
48197      ;;
48198  esac
48199
48200            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
48201printf %s "checking whether rename honors trailing slash on source... " >&6; }
48202if test ${gl_cv_func_rename_slash_src_works+y}
48203then :
48204  printf %s "(cached) " >&6
48205else $as_nop
48206  rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
48207    touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
48208      as_fn_error $? "cannot create temporary files" "$LINENO" 5
48209    # Assume that if we have lstat, we can also check symlinks.
48210    if test $ac_cv_func_lstat = yes; then
48211      ln -s conftest.f conftest.lnk
48212    fi
48213    if test "$cross_compiling" = yes
48214then :
48215        case "$host_os" in
48216                          # Guess yes on Linux systems.
48217         linux-* | linux) gl_cv_func_rename_slash_src_works="guessing yes" ;;
48218                          # Guess yes on glibc systems.
48219         *-gnu*)          gl_cv_func_rename_slash_src_works="guessing yes" ;;
48220                          # Guess yes on native Windows.
48221         mingw*)          gl_cv_func_rename_slash_src_works="guessing yes" ;;
48222                          # If we don't know, obey --enable-cross-guesses.
48223         *)               gl_cv_func_rename_slash_src_works="$gl_cross_guess_normal" ;;
48224       esac
48225
48226else $as_nop
48227  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48228/* end confdefs.h.  */
48229
48230#        include <stdio.h>
48231#        include <stdlib.h>
48232
48233int
48234main (void)
48235{
48236int result = 0;
48237           if (rename ("conftest.f1/", "conftest.d3") == 0)
48238             result |= 1;
48239           if (rename ("conftest.d1/", "conftest.d2") != 0)
48240             result |= 2;
48241#if HAVE_LSTAT
48242           if (rename ("conftest.lnk/", "conftest.f") == 0)
48243             result |= 4;
48244#endif
48245           return result;
48246
48247  ;
48248  return 0;
48249}
48250_ACEOF
48251if ac_fn_c_try_run "$LINENO"
48252then :
48253  gl_cv_func_rename_slash_src_works=yes
48254else $as_nop
48255  gl_cv_func_rename_slash_src_works=no
48256fi
48257rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48258  conftest.$ac_objext conftest.beam conftest.$ac_ext
48259fi
48260
48261    rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
48262
48263fi
48264{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
48265printf "%s\n" "$gl_cv_func_rename_slash_src_works" >&6; }
48266  case "$gl_cv_func_rename_slash_src_works" in
48267    *yes) ;;
48268    *)
48269      REPLACE_RENAME=1
48270
48271printf "%s\n" "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
48272
48273      ;;
48274  esac
48275
48276
48277  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
48278printf %s "checking whether rename manages hard links correctly... " >&6; }
48279if test ${gl_cv_func_rename_link_works+y}
48280then :
48281  printf %s "(cached) " >&6
48282else $as_nop
48283  if test $ac_cv_func_link = yes; then
48284       if test $cross_compiling != yes; then
48285         rm -rf conftest.f conftest.f1 conftest.f2
48286         if touch conftest.f conftest.f2 && ln conftest.f conftest.f1 &&
48287             set x `ls -i conftest.f conftest.f1` && test "" = ""; then
48288           if test "$cross_compiling" = yes
48289then :
48290                :
48291
48292else $as_nop
48293  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48294/* end confdefs.h.  */
48295
48296#               include <errno.h>
48297#               include <stdio.h>
48298#               include <stdlib.h>
48299#               include <unistd.h>
48300
48301
48302$gl_mda_defines
48303
48304int
48305main (void)
48306{
48307int result = 0;
48308                  if (rename ("conftest.f", "conftest.f1"))
48309                    result |= 1;
48310                  if (unlink ("conftest.f1"))
48311                    result |= 2;
48312
48313                  /* Allow either the POSIX-required behavior, where the
48314                     previous rename kept conftest.f, or the (better) NetBSD
48315                     behavior, where it removed conftest.f.  */
48316                  if (rename ("conftest.f", "conftest.f") != 0
48317                      && errno != ENOENT)
48318                    result |= 4;
48319
48320                  if (rename ("conftest.f1", "conftest.f1") == 0)
48321                    result |= 8;
48322                  if (rename ("conftest.f2", "conftest.f2") != 0)
48323                    result |= 16;
48324                  return result;
48325
48326  ;
48327  return 0;
48328}
48329_ACEOF
48330if ac_fn_c_try_run "$LINENO"
48331then :
48332  gl_cv_func_rename_link_works=yes
48333else $as_nop
48334  gl_cv_func_rename_link_works=no
48335fi
48336rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48337  conftest.$ac_objext conftest.beam conftest.$ac_ext
48338fi
48339
48340         else
48341           gl_cv_func_rename_link_works="guessing no"
48342         fi
48343         rm -rf conftest.f conftest.f1 conftest.f2
48344       else
48345                  case "$host_os" in
48346                            # Guess yes on Linux systems.
48347           linux-* | linux) gl_cv_func_rename_link_works="guessing yes" ;;
48348                            # Guess yes on glibc systems.
48349           *-gnu*)          gl_cv_func_rename_link_works="guessing yes" ;;
48350                            # Guess yes on native Windows.
48351           mingw*)          gl_cv_func_rename_link_works="guessing yes" ;;
48352                            # If we don't know, obey --enable-cross-guesses.
48353           *)               gl_cv_func_rename_link_works="$gl_cross_guess_normal" ;;
48354         esac
48355       fi
48356     else
48357       gl_cv_func_rename_link_works=yes
48358     fi
48359
48360fi
48361{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
48362printf "%s\n" "$gl_cv_func_rename_link_works" >&6; }
48363  case "$gl_cv_func_rename_link_works" in
48364    *yes) ;;
48365    *)
48366      REPLACE_RENAME=1
48367
48368printf "%s\n" "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
48369
48370      ;;
48371  esac
48372
48373          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
48374printf %s "checking whether rename manages existing destinations correctly... " >&6; }
48375if test ${gl_cv_func_rename_dest_works+y}
48376then :
48377  printf %s "(cached) " >&6
48378else $as_nop
48379  rm -rf conftest.f conftest.d1 conftest.d2
48380    touch conftest.f && mkdir conftest.d1 conftest.d2 ||
48381      as_fn_error $? "cannot create temporary files" "$LINENO" 5
48382    if test "$cross_compiling" = yes
48383then :
48384        case "$host_os" in
48385                          # Guess yes on Linux systems.
48386         linux-* | linux) gl_cv_func_rename_dest_works="guessing yes" ;;
48387                          # Guess yes on glibc systems.
48388         *-gnu*)          gl_cv_func_rename_dest_works="guessing yes" ;;
48389                          # Guess no on native Windows.
48390         mingw*)          gl_cv_func_rename_dest_works="guessing no" ;;
48391                          # If we don't know, obey --enable-cross-guesses.
48392         *)               gl_cv_func_rename_dest_works="$gl_cross_guess_normal" ;;
48393       esac
48394
48395else $as_nop
48396  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48397/* end confdefs.h.  */
48398
48399#        include <stdio.h>
48400#        include <stdlib.h>
48401
48402int
48403main (void)
48404{
48405int result = 0;
48406           if (rename ("conftest.d1", "conftest.d2") != 0)
48407             result |= 1;
48408           if (rename ("conftest.d2", "conftest.f") == 0)
48409             result |= 2;
48410           return result;
48411
48412  ;
48413  return 0;
48414}
48415_ACEOF
48416if ac_fn_c_try_run "$LINENO"
48417then :
48418  gl_cv_func_rename_dest_works=yes
48419else $as_nop
48420  gl_cv_func_rename_dest_works=no
48421fi
48422rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48423  conftest.$ac_objext conftest.beam conftest.$ac_ext
48424fi
48425
48426    rm -rf conftest.f conftest.d1 conftest.d2
48427
48428fi
48429{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
48430printf "%s\n" "$gl_cv_func_rename_dest_works" >&6; }
48431  case "$gl_cv_func_rename_dest_works" in
48432    *yes) ;;
48433    *)
48434      REPLACE_RENAME=1
48435
48436printf "%s\n" "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
48437
48438      ;;
48439  esac
48440
48441  if test $REPLACE_RENAME = 1; then
48442
48443
48444
48445
48446
48447
48448
48449
48450  gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
48451
48452  fi
48453
48454
48455
48456
48457
48458
48459
48460
48461
48462          GL_GNULIB_RENAME=1
48463
48464
48465
48466
48467
48468printf "%s\n" "#define GNULIB_TEST_RENAME 1" >>confdefs.h
48469
48470
48471
48472
48473
48474
48475  ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
48476if test "x$ac_cv_func_rewinddir" = xyes
48477then :
48478  printf "%s\n" "#define HAVE_REWINDDIR 1" >>confdefs.h
48479
48480fi
48481
48482  if test $ac_cv_func_rewinddir = no; then
48483    HAVE_REWINDDIR=0
48484  fi
48485
48486  if test $HAVE_REWINDDIR = 0; then
48487
48488
48489
48490
48491
48492
48493
48494
48495  gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
48496
48497  fi
48498
48499
48500
48501
48502
48503
48504
48505
48506
48507          GL_GNULIB_REWINDDIR=1
48508
48509
48510
48511
48512
48513printf "%s\n" "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
48514
48515
48516
48517
48518
48519
48520  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
48521printf %s "checking whether rmdir works... " >&6; }
48522if test ${gl_cv_func_rmdir_works+y}
48523then :
48524  printf %s "(cached) " >&6
48525else $as_nop
48526  mkdir conftest.dir
48527     touch conftest.file
48528     if test "$cross_compiling" = yes
48529then :
48530  case "$host_os" in
48531                           # Guess yes on Linux systems.
48532          linux-* | linux) gl_cv_func_rmdir_works="guessing yes" ;;
48533                           # Guess yes on glibc systems.
48534          *-gnu* | gnu*)   gl_cv_func_rmdir_works="guessing yes" ;;
48535                           # Guess no on native Windows.
48536          mingw*)          gl_cv_func_rmdir_works="guessing no" ;;
48537                           # If we don't know, obey --enable-cross-guesses.
48538          *)               gl_cv_func_rmdir_works="$gl_cross_guess_normal" ;;
48539        esac
48540
48541else $as_nop
48542  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48543/* end confdefs.h.  */
48544#include <stdio.h>
48545           #include <errno.h>
48546           #if HAVE_UNISTD_H
48547           # include <unistd.h>
48548           #else /* on Windows with MSVC */
48549           # include <direct.h>
48550           #endif
48551
48552
48553$gl_mda_defines
48554
48555int
48556main (void)
48557{
48558int result = 0;
48559           if (!rmdir ("conftest.file/"))
48560             result |= 1;
48561           else if (errno != ENOTDIR)
48562             result |= 2;
48563           if (!rmdir ("conftest.dir/./"))
48564             result |= 4;
48565           return result;
48566
48567  ;
48568  return 0;
48569}
48570_ACEOF
48571if ac_fn_c_try_run "$LINENO"
48572then :
48573  gl_cv_func_rmdir_works=yes
48574else $as_nop
48575  gl_cv_func_rmdir_works=no
48576fi
48577rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48578  conftest.$ac_objext conftest.beam conftest.$ac_ext
48579fi
48580
48581     rm -rf conftest.dir conftest.file
48582fi
48583{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
48584printf "%s\n" "$gl_cv_func_rmdir_works" >&6; }
48585  case "$gl_cv_func_rmdir_works" in
48586    *yes) ;;
48587    *)
48588      REPLACE_RMDIR=1
48589      ;;
48590  esac
48591
48592  if test $REPLACE_RMDIR = 1; then
48593
48594
48595
48596
48597
48598
48599
48600
48601  gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
48602
48603  fi
48604
48605
48606
48607
48608
48609
48610
48611
48612
48613          GL_GNULIB_RMDIR=1
48614
48615
48616
48617
48618
48619printf "%s\n" "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
48620
48621
48622
48623
48624
48625
48626
48627
48628
48629
48630
48631
48632
48633
48634
48635
48636
48637
48638  if test $ac_cv_func_secure_getenv = no; then
48639    HAVE_SECURE_GETENV=0
48640  fi
48641
48642  if test $HAVE_SECURE_GETENV = 0; then
48643
48644
48645
48646
48647
48648
48649
48650
48651  gl_LIBOBJS="$gl_LIBOBJS secure_getenv.$ac_objext"
48652
48653
48654  ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
48655if test "x$ac_cv_func___secure_getenv" = xyes
48656then :
48657  printf "%s\n" "#define HAVE___SECURE_GETENV 1" >>confdefs.h
48658
48659fi
48660
48661  if test $ac_cv_func___secure_getenv = no; then
48662    ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
48663if test "x$ac_cv_func_issetugid" = xyes
48664then :
48665  printf "%s\n" "#define HAVE_ISSETUGID 1" >>confdefs.h
48666
48667fi
48668
48669  fi
48670
48671
48672  fi
48673
48674
48675
48676
48677
48678
48679
48680
48681
48682          GL_GNULIB_SECURE_GETENV=1
48683
48684
48685
48686
48687
48688printf "%s\n" "#define GNULIB_TEST_SECURE_GETENV 1" >>confdefs.h
48689
48690
48691
48692
48693
48694
48695
48696  if test "$ac_cv_header_winsock2_h" = yes; then
48697    REPLACE_SELECT=1
48698  else
48699
48700    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
48701printf %s "checking whether select supports a 0 argument... " >&6; }
48702if test ${gl_cv_func_select_supports0+y}
48703then :
48704  printf %s "(cached) " >&6
48705else $as_nop
48706
48707        if test "$cross_compiling" = yes
48708then :
48709
48710           case "$host_os" in
48711                       # Guess no on Interix.
48712             interix*) gl_cv_func_select_supports0="guessing no";;
48713                       # Guess yes otherwise.
48714             *)        gl_cv_func_select_supports0="guessing yes";;
48715           esac
48716
48717else $as_nop
48718  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48719/* end confdefs.h.  */
48720
48721#include <sys/types.h>
48722#include <sys/time.h>
48723#if HAVE_SYS_SELECT_H
48724#include <sys/select.h>
48725#endif
48726int main ()
48727{
48728  struct timeval timeout;
48729  timeout.tv_sec = 0;
48730  timeout.tv_usec = 5;
48731  return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
48732}
48733_ACEOF
48734if ac_fn_c_try_run "$LINENO"
48735then :
48736  gl_cv_func_select_supports0=yes
48737else $as_nop
48738  gl_cv_func_select_supports0=no
48739fi
48740rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48741  conftest.$ac_objext conftest.beam conftest.$ac_ext
48742fi
48743
48744
48745fi
48746{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
48747printf "%s\n" "$gl_cv_func_select_supports0" >&6; }
48748    case "$gl_cv_func_select_supports0" in
48749      *yes) ;;
48750      *) REPLACE_SELECT=1 ;;
48751    esac
48752
48753        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
48754printf %s "checking whether select detects invalid fds... " >&6; }
48755if test ${gl_cv_func_select_detects_ebadf+y}
48756then :
48757  printf %s "(cached) " >&6
48758else $as_nop
48759
48760        if test "$cross_compiling" = yes
48761then :
48762
48763           case "$host_os" in
48764                             # Guess yes on Linux systems.
48765            linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;;
48766                             # Guess yes on glibc systems.
48767            *-gnu* | gnu*)   gl_cv_func_select_detects_ebadf="guessing yes" ;;
48768                             # If we don't know, obey --enable-cross-guesses.
48769            *)               gl_cv_func_select_detects_ebadf="$gl_cross_guess_normal" ;;
48770           esac
48771
48772else $as_nop
48773  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48774/* end confdefs.h.  */
48775
48776#include <sys/types.h>
48777#include <sys/time.h>
48778#if HAVE_SYS_SELECT_H
48779# include <sys/select.h>
48780#endif
48781#include <unistd.h>
48782#include <errno.h>
48783
48784
48785$gl_mda_defines
48786
48787int
48788main (void)
48789{
48790
48791  fd_set set;
48792  dup2(0, 16);
48793  FD_ZERO(&set);
48794  FD_SET(16, &set);
48795  close(16);
48796  struct timeval timeout;
48797  timeout.tv_sec = 0;
48798  timeout.tv_usec = 5;
48799  return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
48800
48801  ;
48802  return 0;
48803}
48804_ACEOF
48805if ac_fn_c_try_run "$LINENO"
48806then :
48807  gl_cv_func_select_detects_ebadf=yes
48808else $as_nop
48809  gl_cv_func_select_detects_ebadf=no
48810fi
48811rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48812  conftest.$ac_objext conftest.beam conftest.$ac_ext
48813fi
48814
48815
48816fi
48817{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
48818printf "%s\n" "$gl_cv_func_select_detects_ebadf" >&6; }
48819    case $gl_cv_func_select_detects_ebadf in
48820      *yes) ;;
48821      *) REPLACE_SELECT=1 ;;
48822    esac
48823  fi
48824
48825    LIB_SELECT="$LIBSOCKET"
48826  if test $REPLACE_SELECT = 1; then
48827    case "$host_os" in
48828      mingw*)
48829                                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48830/* end confdefs.h.  */
48831
48832#define WIN32_LEAN_AND_MEAN
48833#include <windows.h>
48834int
48835main ()
48836{
48837  MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
48838  return 0;
48839}
48840_ACEOF
48841if ac_fn_c_try_link "$LINENO"
48842then :
48843
48844else $as_nop
48845  LIB_SELECT="$LIB_SELECT -luser32"
48846fi
48847rm -f core conftest.err conftest.$ac_objext conftest.beam \
48848    conftest$ac_exeext conftest.$ac_ext
48849        ;;
48850    esac
48851  fi
48852
48853
48854  if test $REPLACE_SELECT = 1; then
48855
48856
48857
48858
48859
48860
48861
48862
48863  gl_LIBOBJS="$gl_LIBOBJS select.$ac_objext"
48864
48865  fi
48866
48867
48868
48869
48870
48871
48872
48873
48874
48875          GL_GNULIB_SELECT=1
48876
48877
48878
48879
48880
48881printf "%s\n" "#define GNULIB_TEST_SELECT 1" >>confdefs.h
48882
48883
48884
48885
48886  if test "$ac_cv_header_winsock2_h" = yes; then
48887
48888
48889
48890
48891
48892
48893
48894
48895  gl_LIBOBJS="$gl_LIBOBJS send.$ac_objext"
48896
48897  fi
48898
48899
48900
48901
48902
48903
48904
48905
48906
48907          GL_GNULIB_SEND=1
48908
48909
48910
48911
48912
48913printf "%s\n" "#define GNULIB_TEST_SEND 1" >>confdefs.h
48914
48915
48916
48917
48918                      SERVENT_LIB=
48919  gl_saved_libs="$LIBS"
48920  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing getservbyname" >&5
48921printf %s "checking for library containing getservbyname... " >&6; }
48922if test ${ac_cv_search_getservbyname+y}
48923then :
48924  printf %s "(cached) " >&6
48925else $as_nop
48926  ac_func_search_save_LIBS=$LIBS
48927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48928/* end confdefs.h.  */
48929
48930/* Override any GCC internal prototype to avoid an error.
48931   Use char because int might match the return type of a GCC
48932   builtin and then its argument prototype would still apply.  */
48933char getservbyname ();
48934int
48935main (void)
48936{
48937return getservbyname ();
48938  ;
48939  return 0;
48940}
48941_ACEOF
48942for ac_lib in '' socket network net
48943do
48944  if test -z "$ac_lib"; then
48945    ac_res="none required"
48946  else
48947    ac_res=-l$ac_lib
48948    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
48949  fi
48950  if ac_fn_c_try_link "$LINENO"
48951then :
48952  ac_cv_search_getservbyname=$ac_res
48953fi
48954rm -f core conftest.err conftest.$ac_objext conftest.beam \
48955    conftest$ac_exeext
48956  if test ${ac_cv_search_getservbyname+y}
48957then :
48958  break
48959fi
48960done
48961if test ${ac_cv_search_getservbyname+y}
48962then :
48963
48964else $as_nop
48965  ac_cv_search_getservbyname=no
48966fi
48967rm conftest.$ac_ext
48968LIBS=$ac_func_search_save_LIBS
48969fi
48970{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getservbyname" >&5
48971printf "%s\n" "$ac_cv_search_getservbyname" >&6; }
48972ac_res=$ac_cv_search_getservbyname
48973if test "$ac_res" != no
48974then :
48975  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
48976  if test "$ac_cv_search_getservbyname" != "none required"; then
48977       SERVENT_LIB="$ac_cv_search_getservbyname"
48978     fi
48979fi
48980
48981  LIBS="$gl_saved_libs"
48982  if test -z "$SERVENT_LIB"; then
48983
48984  for ac_func in getservbyname
48985do :
48986  ac_fn_c_check_func "$LINENO" "getservbyname" "ac_cv_func_getservbyname"
48987if test "x$ac_cv_func_getservbyname" = xyes
48988then :
48989  printf "%s\n" "#define HAVE_GETSERVBYNAME 1" >>confdefs.h
48990
48991else $as_nop
48992
48993      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getservbyname in winsock2.h and -lws2_32" >&5
48994printf %s "checking for getservbyname in winsock2.h and -lws2_32... " >&6; }
48995if test ${gl_cv_w32_getservbyname+y}
48996then :
48997  printf %s "(cached) " >&6
48998else $as_nop
48999  gl_cv_w32_getservbyname=no
49000         gl_save_LIBS="$LIBS"
49001         LIBS="$LIBS -lws2_32"
49002         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49003/* end confdefs.h.  */
49004
49005#ifdef HAVE_WINSOCK2_H
49006#include <winsock2.h>
49007#endif
49008#include <stddef.h>
49009
49010int
49011main (void)
49012{
49013getservbyname(NULL,NULL);
49014  ;
49015  return 0;
49016}
49017_ACEOF
49018if ac_fn_c_try_link "$LINENO"
49019then :
49020  gl_cv_w32_getservbyname=yes
49021fi
49022rm -f core conftest.err conftest.$ac_objext conftest.beam \
49023    conftest$ac_exeext conftest.$ac_ext
49024         LIBS="$gl_save_LIBS"
49025
49026fi
49027{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_w32_getservbyname" >&5
49028printf "%s\n" "$gl_cv_w32_getservbyname" >&6; }
49029      if test "$gl_cv_w32_getservbyname" = "yes"; then
49030        SERVENT_LIB="-lws2_32"
49031      fi
49032
49033fi
49034
49035done
49036  fi
49037
49038
49039
49040
49041
49042
49043
49044  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
49045printf %s "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
49046if test ${gl_cv_func_setlocale_null_all_mtsafe+y}
49047then :
49048  printf %s "(cached) " >&6
49049else $as_nop
49050  case "$host_os" in
49051       # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
49052       *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
49053         gl_cv_func_setlocale_null_all_mtsafe=no ;;
49054       # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
49055       *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
49056         gl_cv_func_setlocale_null_all_mtsafe=yes ;;
49057       # If we don't know, obey --enable-cross-guesses.
49058       *)
49059         gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
49060     esac
49061
49062fi
49063{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
49064printf "%s\n" "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
49065    case "$host_os" in
49066    mingw*) ;;
49067    *)
49068      if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
49069        gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
49070      fi
49071      ;;
49072  esac
49073  case "$gl_cv_func_setlocale_null_all_mtsafe" in
49074    *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
49075    *)    SETLOCALE_NULL_ALL_MTSAFE=0 ;;
49076  esac
49077
49078printf "%s\n" "#define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE" >>confdefs.h
49079
49080
49081    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
49082printf %s "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
49083if test ${gl_cv_func_setlocale_null_one_mtsafe+y}
49084then :
49085  printf %s "(cached) " >&6
49086else $as_nop
49087  case "$host_os" in
49088       # Guess no on OpenBSD, AIX.
49089       openbsd* | aix*)
49090         gl_cv_func_setlocale_null_one_mtsafe=no ;;
49091       # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
49092       *-gnu* | gnu* | *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
49093         gl_cv_func_setlocale_null_one_mtsafe=yes ;;
49094       # If we don't know, obey --enable-cross-guesses.
49095       *)
49096         gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
49097     esac
49098
49099fi
49100{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
49101printf "%s\n" "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
49102    case "$host_os" in
49103    mingw*) ;;
49104    *)
49105      if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
49106        gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
49107      fi
49108      ;;
49109  esac
49110  case "$gl_cv_func_setlocale_null_one_mtsafe" in
49111    *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
49112    *)    SETLOCALE_NULL_ONE_MTSAFE=0 ;;
49113  esac
49114
49115printf "%s\n" "#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE" >>confdefs.h
49116
49117
49118    if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
49119    case "$host_os" in
49120      mingw*) LIB_SETLOCALE_NULL= ;;
49121      *)
49122
49123
49124  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
49125printf %s "checking whether imported symbols can be declared weak... " >&6; }
49126if test ${gl_cv_have_weak+y}
49127then :
49128  printf %s "(cached) " >&6
49129else $as_nop
49130  gl_cv_have_weak=no
49131          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49132/* end confdefs.h.  */
49133extern void xyzzy ();
49134#pragma weak xyzzy
49135int
49136main (void)
49137{
49138xyzzy();
49139  ;
49140  return 0;
49141}
49142_ACEOF
49143if ac_fn_c_try_link "$LINENO"
49144then :
49145  gl_cv_have_weak=maybe
49146fi
49147rm -f core conftest.err conftest.$ac_objext conftest.beam \
49148    conftest$ac_exeext conftest.$ac_ext
49149     if test $gl_cv_have_weak = maybe; then
49150                     if test "$cross_compiling" = yes
49151then :
49152                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49153/* end confdefs.h.  */
49154#ifdef __ELF__
49155             Extensible Linking Format
49156             #endif
49157
49158_ACEOF
49159if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49160  $EGREP "Extensible Linking Format" >/dev/null 2>&1
49161then :
49162  gl_cv_have_weak="guessing yes"
49163else $as_nop
49164  gl_cv_have_weak="guessing no"
49165fi
49166rm -rf conftest*
49167
49168
49169else $as_nop
49170  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49171/* end confdefs.h.  */
49172
49173#include <stdio.h>
49174#pragma weak fputs
49175int main ()
49176{
49177  return (fputs == NULL);
49178}
49179_ACEOF
49180if ac_fn_c_try_run "$LINENO"
49181then :
49182  gl_cv_have_weak=yes
49183else $as_nop
49184  gl_cv_have_weak=no
49185fi
49186rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49187  conftest.$ac_objext conftest.beam conftest.$ac_ext
49188fi
49189
49190     fi
49191          case " $LDFLAGS " in
49192       *" -static "*) gl_cv_have_weak=no ;;
49193     esac
49194                    case "$gl_cv_have_weak" in
49195       *yes)
49196         case "$host_os" in
49197           freebsd* | dragonfly* | midnightbsd*)
49198             : > conftest1.c
49199             $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
49200             cat <<EOF > conftest2.c
49201#include <pthread.h>
49202#pragma weak pthread_mutexattr_gettype
49203int main ()
49204{
49205  return (pthread_mutexattr_gettype != NULL);
49206}
49207EOF
49208             $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
49209               || gl_cv_have_weak=no
49210             rm -f conftest1.c libempty.so conftest2.c conftest
49211             ;;
49212         esac
49213         ;;
49214     esac
49215
49216fi
49217{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
49218printf "%s\n" "$gl_cv_have_weak" >&6; }
49219  case "$gl_cv_have_weak" in
49220    *yes)
49221
49222printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
49223
49224      ;;
49225  esac
49226
49227        case "$gl_cv_have_weak" in
49228          *yes) LIB_SETLOCALE_NULL= ;;
49229          *)    LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
49230        esac
49231        ;;
49232    esac
49233  else
49234    LIB_SETLOCALE_NULL=
49235  fi
49236
49237
49238  if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
49239
49240
49241
49242
49243
49244
49245
49246
49247  gl_LIBOBJS="$gl_LIBOBJS setlocale-lock.$ac_objext"
49248
49249
49250
49251
49252  CFLAG_VISIBILITY=
49253  HAVE_VISIBILITY=0
49254  if test -n "$GCC"; then
49255                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
49256printf %s "checking whether the -Werror option is usable... " >&6; }
49257if test ${gl_cv_cc_vis_werror+y}
49258then :
49259  printf %s "(cached) " >&6
49260else $as_nop
49261  gl_save_CFLAGS="$CFLAGS"
49262       CFLAGS="$CFLAGS -Werror"
49263       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49264/* end confdefs.h.  */
49265
49266int
49267main (void)
49268{
49269
49270  ;
49271  return 0;
49272}
49273_ACEOF
49274if ac_fn_c_try_compile "$LINENO"
49275then :
49276  gl_cv_cc_vis_werror=yes
49277else $as_nop
49278  gl_cv_cc_vis_werror=no
49279fi
49280rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
49281       CFLAGS="$gl_save_CFLAGS"
49282
49283fi
49284{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
49285printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
49286        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
49287printf %s "checking for simple visibility declarations... " >&6; }
49288if test ${gl_cv_cc_visibility+y}
49289then :
49290  printf %s "(cached) " >&6
49291else $as_nop
49292  gl_save_CFLAGS="$CFLAGS"
49293       CFLAGS="$CFLAGS -fvisibility=hidden"
49294                                          if test $gl_cv_cc_vis_werror = yes; then
49295         CFLAGS="$CFLAGS -Werror"
49296       fi
49297       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49298/* end confdefs.h.  */
49299extern __attribute__((__visibility__("hidden"))) int hiddenvar;
49300              extern __attribute__((__visibility__("default"))) int exportedvar;
49301              extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
49302              extern __attribute__((__visibility__("default"))) int exportedfunc (void);
49303              void dummyfunc (void);
49304              int hiddenvar;
49305              int exportedvar;
49306              int hiddenfunc (void) { return 51; }
49307              int exportedfunc (void) { return 1225736919; }
49308              void dummyfunc (void) {}
49309
49310int
49311main (void)
49312{
49313
49314  ;
49315  return 0;
49316}
49317_ACEOF
49318if ac_fn_c_try_compile "$LINENO"
49319then :
49320  gl_cv_cc_visibility=yes
49321else $as_nop
49322  gl_cv_cc_visibility=no
49323fi
49324rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
49325       CFLAGS="$gl_save_CFLAGS"
49326
49327fi
49328{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
49329printf "%s\n" "$gl_cv_cc_visibility" >&6; }
49330    if test $gl_cv_cc_visibility = yes; then
49331      CFLAG_VISIBILITY="-fvisibility=hidden"
49332      HAVE_VISIBILITY=1
49333    fi
49334  fi
49335
49336
49337
49338printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
49339
49340
49341
49342  fi
49343
49344
49345
49346
49347
49348
49349
49350
49351
49352          GL_GNULIB_SETLOCALE_NULL=1
49353
49354
49355
49356
49357
49358printf "%s\n" "#define GNULIB_TEST_SETLOCALE_NULL 1" >>confdefs.h
49359
49360
49361
49362
49363  if test "$ac_cv_header_winsock2_h" = yes; then
49364
49365
49366
49367
49368
49369
49370
49371
49372  gl_LIBOBJS="$gl_LIBOBJS setsockopt.$ac_objext"
49373
49374  fi
49375
49376
49377
49378
49379
49380
49381
49382
49383
49384          GL_GNULIB_SETSOCKOPT=1
49385
49386
49387
49388
49389
49390printf "%s\n" "#define GNULIB_TEST_SETSOCKOPT 1" >>confdefs.h
49391
49392
49393
49394
49395
49396
49397
49398
49399
49400  if test $ac_cv_func_sigaction = yes; then
49401    ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include <signal.h>
49402"
49403if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = xyes
49404then :
49405
49406printf "%s\n" "#define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1" >>confdefs.h
49407
49408
49409fi
49410
49411    if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
49412      HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
49413    fi
49414  else
49415    HAVE_SIGACTION=0
49416  fi
49417
49418  if test $HAVE_SIGACTION = 0; then
49419
49420
49421
49422
49423
49424
49425
49426
49427  gl_LIBOBJS="$gl_LIBOBJS sigaction.$ac_objext"
49428
49429
49430
49431
49432
49433
49434
49435  ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "
49436#include <signal.h>
49437
49438"
49439if test "x$ac_cv_type_siginfo_t" = xyes
49440then :
49441
49442printf "%s\n" "#define HAVE_SIGINFO_T 1" >>confdefs.h
49443
49444
49445fi
49446
49447  if test $ac_cv_type_siginfo_t = no; then
49448    HAVE_SIGINFO_T=0
49449  fi
49450
49451  fi
49452
49453
49454
49455
49456
49457
49458
49459
49460
49461          GL_GNULIB_SIGACTION=1
49462
49463
49464
49465
49466
49467printf "%s\n" "#define GNULIB_TEST_SIGACTION 1" >>confdefs.h
49468
49469
49470
49471
49472
49473
49474
49475
49476
49477
49478
49479
49480
49481
49482printf "%s\n" "#define GNULIB_SIGPIPE 1" >>confdefs.h
49483
49484
49485
49486
49487
49488
49489
49490
49491  GL_GNULIB_SIGNAL_H_SIGPIPE=1
49492
49493
49494
49495
49496
49497
49498
49499
49500
49501  GL_GNULIB_STDIO_H_SIGPIPE=1
49502
49503
49504
49505
49506
49507
49508
49509
49510  GL_GNULIB_UNISTD_H_SIGPIPE=1
49511
49512
49513
49514
49515
49516  HAVE_POSIX_SIGNALBLOCKING=0
49517  if test "$gl_cv_type_sigset_t" = yes; then
49518    ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
49519if test "x$ac_cv_func_sigprocmask" = xyes
49520then :
49521  HAVE_POSIX_SIGNALBLOCKING=1
49522fi
49523
49524  fi
49525
49526  if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
49527
49528
49529
49530
49531
49532
49533
49534
49535  gl_LIBOBJS="$gl_LIBOBJS sigprocmask.$ac_objext"
49536
49537    :
49538  fi
49539
49540
49541
49542
49543
49544
49545
49546
49547
49548          GL_GNULIB_SIGPROCMASK=1
49549
49550
49551
49552
49553
49554printf "%s\n" "#define GNULIB_TEST_SIGPROCMASK 1" >>confdefs.h
49555
49556
49557
49558
49559  ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
49560if test "x$ac_cv_header_stdint_h" = xyes
49561then :
49562  printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
49563
49564fi
49565
49566    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
49567printf %s "checking for SIZE_MAX... " >&6; }
49568if test ${gl_cv_size_max+y}
49569then :
49570  printf %s "(cached) " >&6
49571else $as_nop
49572
49573    gl_cv_size_max=no
49574    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49575/* end confdefs.h.  */
49576
49577#include <limits.h>
49578#if HAVE_STDINT_H
49579#include <stdint.h>
49580#endif
49581#ifdef SIZE_MAX
49582Found it
49583#endif
49584
49585_ACEOF
49586if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49587  $EGREP "Found it" >/dev/null 2>&1
49588then :
49589  gl_cv_size_max=yes
49590fi
49591rm -rf conftest*
49592
49593    if test $gl_cv_size_max != yes; then
49594                        if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1"        "#include <stddef.h>
49595#include <limits.h>"
49596then :
49597
49598else $as_nop
49599  size_t_bits_minus_1=
49600fi
49601
49602      if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint"        "#include <stddef.h>"
49603then :
49604
49605else $as_nop
49606  fits_in_uint=
49607fi
49608
49609      if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
49610        if test $fits_in_uint = 1; then
49611                              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49612/* end confdefs.h.  */
49613#include <stddef.h>
49614                 extern size_t foo;
49615                 extern unsigned long foo;
49616
49617int
49618main (void)
49619{
49620
49621  ;
49622  return 0;
49623}
49624_ACEOF
49625if ac_fn_c_try_compile "$LINENO"
49626then :
49627  fits_in_uint=0
49628fi
49629rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
49630        fi
49631                                if test $fits_in_uint = 1; then
49632          gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
49633        else
49634          gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
49635        fi
49636      else
49637                gl_cv_size_max='((size_t)~(size_t)0)'
49638      fi
49639    fi
49640
49641fi
49642{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
49643printf "%s\n" "$gl_cv_size_max" >&6; }
49644  if test "$gl_cv_size_max" != yes; then
49645
49646printf "%s\n" "#define SIZE_MAX $gl_cv_size_max" >>confdefs.h
49647
49648  fi
49649
49650
49651
49652
49653  gl_cv_func_snprintf_usable=no
49654  ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
49655if test "x$ac_cv_func_snprintf" = xyes
49656then :
49657  printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
49658
49659fi
49660
49661  if test $ac_cv_func_snprintf = yes; then
49662
49663
49664
49665  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
49666printf %s "checking whether snprintf respects a size of 1... " >&6; }
49667if test ${gl_cv_func_snprintf_size1+y}
49668then :
49669  printf %s "(cached) " >&6
49670else $as_nop
49671
49672      if test "$cross_compiling" = yes
49673then :
49674  case "$host_os" in
49675                            # Guess yes on Android.
49676           linux*-android*) gl_cv_func_snprintf_size1="guessing yes" ;;
49677                            # Guess yes on native Windows.
49678           mingw*)          gl_cv_func_snprintf_size1="guessing yes" ;;
49679           *)               gl_cv_func_snprintf_size1="guessing yes" ;;
49680         esac
49681
49682else $as_nop
49683  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49684/* end confdefs.h.  */
49685
49686#include <stdio.h>
49687#if HAVE_SNPRINTF
49688# define my_snprintf snprintf
49689#else
49690# include <stdarg.h>
49691static int my_snprintf (char *buf, int size, const char *format, ...)
49692{
49693  va_list args;
49694  int ret;
49695  va_start (args, format);
49696  ret = vsnprintf (buf, size, format, args);
49697  va_end (args);
49698  return ret;
49699}
49700#endif
49701int main()
49702{
49703  static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
49704  my_snprintf (buf, 1, "%d", 12345);
49705  return buf[1] != 'E';
49706}
49707_ACEOF
49708if ac_fn_c_try_run "$LINENO"
49709then :
49710  gl_cv_func_snprintf_size1=yes
49711else $as_nop
49712  gl_cv_func_snprintf_size1=no
49713fi
49714rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49715  conftest.$ac_objext conftest.beam conftest.$ac_ext
49716fi
49717
49718
49719fi
49720{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
49721printf "%s\n" "$gl_cv_func_snprintf_size1" >&6; }
49722
49723    case "$gl_cv_func_snprintf_size1" in
49724      *yes)
49725
49726        case "$gl_cv_func_snprintf_retval_c99" in
49727          *yes)
49728
49729
49730     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
49731printf %s "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
49732if test ${gl_cv_func_printf_positions+y}
49733then :
49734  printf %s "(cached) " >&6
49735else $as_nop
49736
49737      if test "$cross_compiling" = yes
49738then :
49739
49740         case "$host_os" in
49741           netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
49742                            gl_cv_func_printf_positions="guessing no";;
49743           beos*)           gl_cv_func_printf_positions="guessing no";;
49744                            # Guess yes on Android.
49745           linux*-android*) gl_cv_func_printf_positions="guessing yes";;
49746                            # Guess no on native Windows.
49747           mingw* | pw*)    gl_cv_func_printf_positions="guessing no";;
49748           *)               gl_cv_func_printf_positions="guessing yes";;
49749         esac
49750
49751else $as_nop
49752  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49753/* end confdefs.h.  */
49754
49755#include <stdio.h>
49756#include <string.h>
49757/* The string "%2$d %1$d", with dollar characters protected from the shell's
49758   dollar expansion (possibly an autoconf bug).  */
49759static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
49760static char buf[100];
49761int main ()
49762{
49763  sprintf (buf, format, 33, 55);
49764  return (strcmp (buf, "55 33") != 0);
49765}
49766_ACEOF
49767if ac_fn_c_try_run "$LINENO"
49768then :
49769  gl_cv_func_printf_positions=yes
49770else $as_nop
49771  gl_cv_func_printf_positions=no
49772fi
49773rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49774  conftest.$ac_objext conftest.beam conftest.$ac_ext
49775fi
49776
49777
49778fi
49779{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
49780printf "%s\n" "$gl_cv_func_printf_positions" >&6; }
49781
49782            case "$gl_cv_func_printf_positions" in
49783              *yes)
49784                gl_cv_func_snprintf_usable=yes
49785                ;;
49786            esac
49787            ;;
49788        esac
49789        ;;
49790    esac
49791  fi
49792  if test $gl_cv_func_snprintf_usable = no; then
49793
49794
49795
49796
49797
49798
49799
49800
49801
49802
49803  gl_LIBOBJS="$gl_LIBOBJS snprintf.$ac_objext"
49804
49805  if test $ac_cv_func_snprintf = yes; then
49806    REPLACE_SNPRINTF=1
49807  else
49808
49809    if test $ac_cv_have_decl_snprintf = yes; then
49810                        REPLACE_SNPRINTF=1
49811    fi
49812  fi
49813  :
49814
49815  fi
49816
49817  if test $ac_cv_have_decl_snprintf = no; then
49818    HAVE_DECL_SNPRINTF=0
49819  fi
49820
49821
49822
49823
49824
49825
49826
49827
49828
49829
49830          GL_GNULIB_SNPRINTF=1
49831
49832
49833
49834
49835
49836printf "%s\n" "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h
49837
49838
49839
49840
49841
49842printf "%s\n" "#define GNULIB_SNPRINTF 1" >>confdefs.h
49843
49844
49845
49846  if test "$ac_cv_header_winsock2_h" = yes; then
49847
49848
49849
49850
49851
49852
49853
49854
49855  gl_LIBOBJS="$gl_LIBOBJS socket.$ac_objext"
49856
49857  fi
49858  # When this module is used, sockets may actually occur as file descriptors,
49859  # hence it is worth warning if the modules 'close' and 'ioctl' are not used.
49860
49861
49862
49863
49864
49865
49866
49867
49868
49869
49870
49871  if test "$ac_cv_header_winsock2_h" = yes; then
49872    UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
49873    SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
49874  fi
49875
49876
49877
49878
49879
49880
49881
49882
49883
49884          GL_GNULIB_SOCKET=1
49885
49886
49887
49888
49889
49890printf "%s\n" "#define GNULIB_TEST_SOCKET 1" >>confdefs.h
49891
49892
49893
49894
49895
49896     ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
49897/* <sys/types.h> is not needed according to POSIX, but the
49898   <sys/socket.h> in i386-unknown-freebsd4.10 and
49899   powerpc-apple-darwin5.5 required it. */
49900#include <sys/types.h>
49901#if HAVE_SYS_SOCKET_H
49902# include <sys/socket.h>
49903#elif HAVE_WS2TCPIP_H
49904# include <ws2tcpip.h>
49905#endif
49906
49907"
49908if test "x$ac_cv_type_socklen_t" = xyes
49909then :
49910
49911else $as_nop
49912  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
49913printf %s "checking for socklen_t equivalent... " >&6; }
49914if test ${gl_cv_socklen_t_equiv+y}
49915then :
49916  printf %s "(cached) " >&6
49917else $as_nop
49918  # Systems have either "struct sockaddr *" or
49919         # "void *" as the second argument to getpeername
49920         gl_cv_socklen_t_equiv=
49921         for arg2 in "struct sockaddr" void; do
49922           for t in int size_t "unsigned int" "long int" "unsigned long int"; do
49923             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49924/* end confdefs.h.  */
49925#include <sys/types.h>
49926                   #include <sys/socket.h>
49927
49928                   int getpeername (int, $arg2 *, $t *);
49929int
49930main (void)
49931{
49932$t len;
49933                  getpeername (0, 0, &len);
49934  ;
49935  return 0;
49936}
49937_ACEOF
49938if ac_fn_c_try_compile "$LINENO"
49939then :
49940  gl_cv_socklen_t_equiv="$t"
49941fi
49942rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
49943             test "$gl_cv_socklen_t_equiv" != "" && break
49944           done
49945           test "$gl_cv_socklen_t_equiv" != "" && break
49946         done
49947         if test "$gl_cv_socklen_t_equiv" = ""; then
49948           as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
49949         fi
49950
49951fi
49952{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
49953printf "%s\n" "$gl_cv_socklen_t_equiv" >&6; }
49954
49955printf "%s\n" "#define socklen_t $gl_cv_socklen_t_equiv" >>confdefs.h
49956
49957fi
49958
49959
49960
49961
49962
49963
49964
49965
49966
49967
49968
49969  case "$host_os" in
49970    os2*)
49971
49972
49973
49974
49975
49976
49977
49978
49979  gl_LIBOBJS="$gl_LIBOBJS os2-spawn.$ac_objext"
49980
49981      ;;
49982  esac
49983
49984  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
49985printf %s "checking for ssize_t... " >&6; }
49986if test ${gt_cv_ssize_t+y}
49987then :
49988  printf %s "(cached) " >&6
49989else $as_nop
49990  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49991/* end confdefs.h.  */
49992#include <sys/types.h>
49993int
49994main (void)
49995{
49996int x = sizeof (ssize_t *) + sizeof (ssize_t);
49997            return !x;
49998  ;
49999  return 0;
50000}
50001_ACEOF
50002if ac_fn_c_try_compile "$LINENO"
50003then :
50004  gt_cv_ssize_t=yes
50005else $as_nop
50006  gt_cv_ssize_t=no
50007fi
50008rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
50009fi
50010{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
50011printf "%s\n" "$gt_cv_ssize_t" >&6; }
50012  if test $gt_cv_ssize_t = no; then
50013
50014printf "%s\n" "#define ssize_t int" >>confdefs.h
50015
50016  fi
50017
50018
50019
50020
50021
50022  case "$host_os" in
50023    mingw*)
50024                  REPLACE_STAT=1
50025      ;;
50026    *)
50027                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
50028printf %s "checking whether stat handles trailing slashes on files... " >&6; }
50029if test ${gl_cv_func_stat_file_slash+y}
50030then :
50031  printf %s "(cached) " >&6
50032else $as_nop
50033  touch conftest.tmp
50034         # Assume that if we have lstat, we can also check symlinks.
50035         if test $ac_cv_func_lstat = yes; then
50036           ln -s conftest.tmp conftest.lnk
50037         fi
50038         if test "$cross_compiling" = yes
50039then :
50040  case "$host_os" in
50041                               # Guess yes on Linux systems.
50042              linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;;
50043                               # Guess yes on glibc systems.
50044              *-gnu* | gnu*)   gl_cv_func_stat_file_slash="guessing yes" ;;
50045                               # If we don't know, obey --enable-cross-guesses.
50046              *)               gl_cv_func_stat_file_slash="$gl_cross_guess_normal" ;;
50047            esac
50048
50049else $as_nop
50050  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50051/* end confdefs.h.  */
50052#include <sys/stat.h>
50053
50054int
50055main (void)
50056{
50057int result = 0;
50058               struct stat st;
50059               if (!stat ("conftest.tmp/", &st))
50060                 result |= 1;
50061#if HAVE_LSTAT
50062               if (!stat ("conftest.lnk/", &st))
50063                 result |= 2;
50064#endif
50065               return result;
50066
50067  ;
50068  return 0;
50069}
50070_ACEOF
50071if ac_fn_c_try_run "$LINENO"
50072then :
50073  gl_cv_func_stat_file_slash=yes
50074else $as_nop
50075  gl_cv_func_stat_file_slash=no
50076fi
50077rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50078  conftest.$ac_objext conftest.beam conftest.$ac_ext
50079fi
50080
50081         rm -f conftest.tmp conftest.lnk
50082fi
50083{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
50084printf "%s\n" "$gl_cv_func_stat_file_slash" >&6; }
50085      case $gl_cv_func_stat_file_slash in
50086        *no)
50087          REPLACE_STAT=1
50088
50089printf "%s\n" "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
50090;;
50091      esac
50092      case $host_os in
50093                solaris*)
50094          REPLACE_FSTAT=1 ;;
50095      esac
50096      ;;
50097  esac
50098
50099  if test $REPLACE_STAT = 1; then
50100
50101
50102
50103
50104
50105
50106
50107
50108  gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
50109
50110    case "$host_os" in
50111      mingw*)
50112
50113
50114
50115
50116
50117
50118
50119
50120  gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
50121
50122        ;;
50123    esac
50124
50125
50126
50127  :
50128
50129  fi
50130
50131
50132
50133
50134
50135
50136
50137
50138
50139          GL_GNULIB_STAT=1
50140
50141
50142
50143
50144
50145printf "%s\n" "#define GNULIB_TEST_STAT 1" >>confdefs.h
50146
50147
50148
50149
50150
50151
50152
50153  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>
50154     #include <sys/stat.h>
50155"
50156if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes
50157then :
50158
50159printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1" >>confdefs.h
50160
50161{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
50162printf %s "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
50163if test ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+y}
50164then :
50165  printf %s "(cached) " >&6
50166else $as_nop
50167  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50168/* end confdefs.h.  */
50169
50170            #include <sys/types.h>
50171            #include <sys/stat.h>
50172            #if HAVE_SYS_TIME_H
50173            # include <sys/time.h>
50174            #endif
50175            #include <time.h>
50176            struct timespec ts;
50177            struct stat st;
50178
50179int
50180main (void)
50181{
50182
50183            st.st_atim = ts;
50184
50185  ;
50186  return 0;
50187}
50188_ACEOF
50189if ac_fn_c_try_compile "$LINENO"
50190then :
50191  ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
50192else $as_nop
50193  ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
50194fi
50195rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
50196fi
50197{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
50198printf "%s\n" "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
50199     if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
50200
50201printf "%s\n" "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
50202
50203     fi
50204else $as_nop
50205  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>
50206        #include <sys/stat.h>
50207"
50208if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes
50209then :
50210
50211printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1" >>confdefs.h
50212
50213
50214else $as_nop
50215  ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
50216           #include <sys/stat.h>
50217"
50218if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes
50219then :
50220
50221printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1" >>confdefs.h
50222
50223
50224else $as_nop
50225  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>
50226              #include <sys/stat.h>
50227"
50228if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes
50229then :
50230
50231printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1" >>confdefs.h
50232
50233
50234fi
50235
50236fi
50237
50238fi
50239
50240fi
50241
50242
50243
50244
50245
50246  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>
50247     #include <sys/stat.h>
50248"
50249if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes
50250then :
50251
50252printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1" >>confdefs.h
50253
50254
50255else $as_nop
50256  ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
50257        #include <sys/stat.h>
50258"
50259if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes
50260then :
50261
50262printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1" >>confdefs.h
50263
50264
50265else $as_nop
50266  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>
50267          #include <sys/stat.h>
50268"
50269if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes
50270then :
50271
50272printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1" >>confdefs.h
50273
50274
50275fi
50276
50277fi
50278
50279fi
50280
50281
50282
50283  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
50284printf %s "checking for working stdalign.h... " >&6; }
50285if test ${gl_cv_header_working_stdalign_h+y}
50286then :
50287  printf %s "(cached) " >&6
50288else $as_nop
50289  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50290/* end confdefs.h.  */
50291#include <stdint.h>
50292            #include <stdalign.h>
50293            #include <stddef.h>
50294
50295            /* Test that alignof yields a result consistent with offsetof.
50296               This catches GCC bug 52023
50297               <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.  */
50298            #ifdef __cplusplus
50299               template <class t> struct alignof_helper { char a; t b; };
50300            # define ao(type) offsetof (alignof_helper<type>, b)
50301            #else
50302            # define ao(type) offsetof (struct { char a; type b; }, b)
50303            #endif
50304            char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
50305            char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
50306            char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
50307
50308            /* Test _Alignas only on platforms where gnulib can help.  */
50309            #if \
50310                ((defined __cplusplus && 201103 <= __cplusplus) \
50311                 || (__TINYC__ && defined __attribute__) \
50312                 || (defined __APPLE__ && defined __MACH__ \
50313                     ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
50314                     : __GNUC__) \
50315                 || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
50316                 || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \
50317                 || 1300 <= _MSC_VER)
50318              struct alignas_test { char c; char alignas (8) alignas_8; };
50319              char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
50320                                ? 1 : -1];
50321            #endif
50322
50323int
50324main (void)
50325{
50326
50327  ;
50328  return 0;
50329}
50330_ACEOF
50331if ac_fn_c_try_compile "$LINENO"
50332then :
50333  gl_cv_header_working_stdalign_h=yes
50334else $as_nop
50335  gl_cv_header_working_stdalign_h=no
50336fi
50337rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
50338fi
50339{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
50340printf "%s\n" "$gl_cv_header_working_stdalign_h" >&6; }
50341
50342  if test $gl_cv_header_working_stdalign_h = yes; then
50343    STDALIGN_H=''
50344  else
50345    STDALIGN_H='stdalign.h'
50346  fi
50347
50348
50349   if test -n "$STDALIGN_H"; then
50350  GL_GENERATE_STDALIGN_H_TRUE=
50351  GL_GENERATE_STDALIGN_H_FALSE='#'
50352else
50353  GL_GENERATE_STDALIGN_H_TRUE='#'
50354  GL_GENERATE_STDALIGN_H_FALSE=
50355fi
50356
50357
50358
50359
50360
50361
50362          if test "$ac_cv_header_stdbool_h" = yes; then
50363    case "$host_os" in
50364      solaris*)
50365        if test -z "$GCC"; then
50366          STDBOOL_H='stdbool.h'
50367        else
50368          STDBOOL_H=''
50369        fi
50370        ;;
50371      *)
50372        STDBOOL_H=''
50373        ;;
50374    esac
50375  else
50376    STDBOOL_H='stdbool.h'
50377  fi
50378
50379   if test -n "$STDBOOL_H"; then
50380  GL_GENERATE_STDBOOL_H_TRUE=
50381  GL_GENERATE_STDBOOL_H_FALSE='#'
50382else
50383  GL_GENERATE_STDBOOL_H_TRUE='#'
50384  GL_GENERATE_STDBOOL_H_FALSE=
50385fi
50386
50387
50388  if test "$ac_cv_type__Bool" = yes; then
50389    HAVE__BOOL=1
50390  else
50391    HAVE__BOOL=0
50392  fi
50393
50394
50395
50396
50397
50398
50399
50400
50401
50402
50403
50404
50405
50406
50407
50408
50409
50410
50411
50412
50413
50414
50415
50416
50417          GL_GNULIB_FSCANF=1
50418
50419
50420
50421
50422
50423printf "%s\n" "#define GNULIB_TEST_FSCANF 1" >>confdefs.h
50424
50425
50426
50427
50428
50429printf "%s\n" "#define GNULIB_FSCANF 1" >>confdefs.h
50430
50431
50432
50433
50434
50435
50436
50437
50438
50439
50440
50441          GL_GNULIB_SCANF=1
50442
50443
50444
50445
50446
50447printf "%s\n" "#define GNULIB_TEST_SCANF 1" >>confdefs.h
50448
50449
50450
50451
50452
50453printf "%s\n" "#define GNULIB_SCANF 1" >>confdefs.h
50454
50455
50456
50457
50458
50459
50460
50461
50462
50463
50464
50465          GL_GNULIB_FGETC=1
50466
50467
50468
50469
50470
50471printf "%s\n" "#define GNULIB_TEST_FGETC 1" >>confdefs.h
50472
50473
50474
50475
50476
50477
50478
50479
50480
50481
50482
50483
50484          GL_GNULIB_GETC=1
50485
50486
50487
50488
50489
50490printf "%s\n" "#define GNULIB_TEST_GETC 1" >>confdefs.h
50491
50492
50493
50494
50495
50496
50497
50498
50499
50500
50501
50502
50503          GL_GNULIB_GETCHAR=1
50504
50505
50506
50507
50508
50509printf "%s\n" "#define GNULIB_TEST_GETCHAR 1" >>confdefs.h
50510
50511
50512
50513
50514
50515
50516
50517
50518
50519
50520
50521
50522          GL_GNULIB_FGETS=1
50523
50524
50525
50526
50527
50528printf "%s\n" "#define GNULIB_TEST_FGETS 1" >>confdefs.h
50529
50530
50531
50532
50533
50534
50535
50536
50537
50538
50539
50540
50541          GL_GNULIB_FREAD=1
50542
50543
50544
50545
50546
50547printf "%s\n" "#define GNULIB_TEST_FREAD 1" >>confdefs.h
50548
50549
50550
50551
50552
50553
50554
50555
50556
50557
50558
50559
50560          GL_GNULIB_FPRINTF=1
50561
50562
50563
50564
50565
50566printf "%s\n" "#define GNULIB_TEST_FPRINTF 1" >>confdefs.h
50567
50568
50569
50570
50571
50572
50573
50574
50575
50576
50577
50578
50579          GL_GNULIB_PRINTF=1
50580
50581
50582
50583
50584
50585printf "%s\n" "#define GNULIB_TEST_PRINTF 1" >>confdefs.h
50586
50587
50588
50589
50590
50591
50592
50593
50594
50595
50596
50597
50598          GL_GNULIB_VFPRINTF=1
50599
50600
50601
50602
50603
50604printf "%s\n" "#define GNULIB_TEST_VFPRINTF 1" >>confdefs.h
50605
50606
50607
50608
50609
50610
50611
50612
50613
50614
50615
50616
50617          GL_GNULIB_VPRINTF=1
50618
50619
50620
50621
50622
50623printf "%s\n" "#define GNULIB_TEST_VPRINTF 1" >>confdefs.h
50624
50625
50626
50627
50628
50629
50630
50631
50632
50633
50634
50635
50636          GL_GNULIB_FPUTC=1
50637
50638
50639
50640
50641
50642printf "%s\n" "#define GNULIB_TEST_FPUTC 1" >>confdefs.h
50643
50644
50645
50646
50647
50648
50649
50650
50651
50652
50653
50654
50655          GL_GNULIB_PUTC=1
50656
50657
50658
50659
50660
50661printf "%s\n" "#define GNULIB_TEST_PUTC 1" >>confdefs.h
50662
50663
50664
50665
50666
50667
50668
50669
50670
50671
50672
50673
50674          GL_GNULIB_PUTCHAR=1
50675
50676
50677
50678
50679
50680printf "%s\n" "#define GNULIB_TEST_PUTCHAR 1" >>confdefs.h
50681
50682
50683
50684
50685
50686
50687
50688
50689
50690
50691
50692
50693          GL_GNULIB_FPUTS=1
50694
50695
50696
50697
50698
50699printf "%s\n" "#define GNULIB_TEST_FPUTS 1" >>confdefs.h
50700
50701
50702
50703
50704
50705
50706
50707
50708
50709
50710
50711
50712          GL_GNULIB_PUTS=1
50713
50714
50715
50716
50717
50718printf "%s\n" "#define GNULIB_TEST_PUTS 1" >>confdefs.h
50719
50720
50721
50722
50723
50724
50725
50726
50727
50728
50729
50730
50731          GL_GNULIB_FWRITE=1
50732
50733
50734
50735
50736
50737printf "%s\n" "#define GNULIB_TEST_FWRITE 1" >>confdefs.h
50738
50739
50740
50741
50742
50743
50744
50745
50746
50747
50748
50749
50750
50751
50752
50753  ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
50754if test "x$ac_cv_func_stpcpy" = xyes
50755then :
50756  printf "%s\n" "#define HAVE_STPCPY 1" >>confdefs.h
50757
50758fi
50759
50760  if test $ac_cv_func_stpcpy = no; then
50761    HAVE_STPCPY=0
50762  fi
50763
50764  if test $HAVE_STPCPY = 0; then
50765
50766
50767
50768
50769
50770
50771
50772
50773  gl_LIBOBJS="$gl_LIBOBJS stpcpy.$ac_objext"
50774
50775
50776  :
50777
50778  fi
50779
50780
50781
50782
50783
50784
50785
50786
50787
50788          GL_GNULIB_STPCPY=1
50789
50790
50791
50792
50793
50794printf "%s\n" "#define GNULIB_TEST_STPCPY 1" >>confdefs.h
50795
50796
50797
50798
50799
50800
50801  ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
50802if test "x$ac_cv_func_strcasecmp" = xyes
50803then :
50804  printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h
50805
50806fi
50807
50808  if test $ac_cv_func_strcasecmp = no; then
50809    HAVE_STRCASECMP=0
50810  fi
50811
50812
50813
50814  ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
50815if test "x$ac_cv_func_strncasecmp" = xyes
50816then :
50817  printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h
50818
50819fi
50820
50821  if test $ac_cv_func_strncasecmp = yes; then
50822    HAVE_STRNCASECMP=1
50823  else
50824    HAVE_STRNCASECMP=0
50825  fi
50826  ac_fn_check_decl "$LINENO" "strncasecmp" "ac_cv_have_decl_strncasecmp" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
50827if test "x$ac_cv_have_decl_strncasecmp" = xyes
50828then :
50829  ac_have_decl=1
50830else $as_nop
50831  ac_have_decl=0
50832fi
50833printf "%s\n" "#define HAVE_DECL_STRNCASECMP $ac_have_decl" >>confdefs.h
50834
50835  if test $ac_cv_have_decl_strncasecmp = no; then
50836    HAVE_DECL_STRNCASECMP=0
50837  fi
50838
50839
50840  if test $HAVE_STRCASECMP = 0; then
50841
50842
50843
50844
50845
50846
50847
50848
50849  gl_LIBOBJS="$gl_LIBOBJS strcasecmp.$ac_objext"
50850
50851
50852  :
50853
50854  fi
50855  if test $HAVE_STRNCASECMP = 0; then
50856
50857
50858
50859
50860
50861
50862
50863
50864  gl_LIBOBJS="$gl_LIBOBJS strncasecmp.$ac_objext"
50865
50866
50867  :
50868
50869  fi
50870
50871
50872
50873
50874  ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
50875if test "x$ac_cv_func_strchrnul" = xyes
50876then :
50877  printf "%s\n" "#define HAVE_STRCHRNUL 1" >>confdefs.h
50878
50879fi
50880
50881  if test $ac_cv_func_strchrnul = no; then
50882    HAVE_STRCHRNUL=0
50883  else
50884    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
50885printf %s "checking whether strchrnul works... " >&6; }
50886if test ${gl_cv_func_strchrnul_works+y}
50887then :
50888  printf %s "(cached) " >&6
50889else $as_nop
50890  if test "$cross_compiling" = yes
50891then :
50892           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50893/* end confdefs.h.  */
50894
50895#if defined __CYGWIN__
50896 #include <cygwin/version.h>
50897 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
50898  Lucky user
50899 #endif
50900#else
50901  Lucky user
50902#endif
50903
50904_ACEOF
50905if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
50906  $EGREP "Lucky user" >/dev/null 2>&1
50907then :
50908  gl_cv_func_strchrnul_works="guessing yes"
50909else $as_nop
50910  gl_cv_func_strchrnul_works="guessing no"
50911fi
50912rm -rf conftest*
50913
50914
50915else $as_nop
50916  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50917/* end confdefs.h.  */
50918
50919#include <string.h> /* for strchrnul */
50920
50921int
50922main (void)
50923{
50924const char *buf = "a";
50925      return strchrnul (buf, 'b') != buf + 1;
50926
50927  ;
50928  return 0;
50929}
50930_ACEOF
50931if ac_fn_c_try_run "$LINENO"
50932then :
50933  gl_cv_func_strchrnul_works=yes
50934else $as_nop
50935  gl_cv_func_strchrnul_works=no
50936fi
50937rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50938  conftest.$ac_objext conftest.beam conftest.$ac_ext
50939fi
50940
50941
50942fi
50943{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
50944printf "%s\n" "$gl_cv_func_strchrnul_works" >&6; }
50945    case "$gl_cv_func_strchrnul_works" in
50946      *yes) ;;
50947      *) REPLACE_STRCHRNUL=1 ;;
50948    esac
50949  fi
50950
50951  if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
50952
50953
50954
50955
50956
50957
50958
50959
50960  gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
50961
50962    :
50963  fi
50964
50965
50966
50967
50968
50969
50970
50971
50972
50973          GL_GNULIB_STRCHRNUL=1
50974
50975
50976
50977
50978
50979printf "%s\n" "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
50980
50981
50982
50983
50984
50985
50986  if test $gl_cv_func_malloc_posix != yes; then
50987    REPLACE_STRDUP=1
50988  fi
50989
50990  if test $ac_cv_have_decl_strdup = no; then
50991    HAVE_DECL_STRDUP=0
50992  fi
50993
50994  if test $REPLACE_STRDUP = 1; then
50995
50996
50997
50998
50999
51000
51001
51002
51003  gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
51004
51005    :
51006  fi
51007
51008
51009
51010
51011
51012
51013
51014
51015
51016          GL_GNULIB_STRDUP=1
51017
51018
51019
51020
51021
51022printf "%s\n" "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
51023
51024
51025
51026
51027
51028
51029
51030
51031
51032
51033  if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
51034    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
51035printf %s "checking for working strerror function... " >&6; }
51036if test ${gl_cv_func_working_strerror+y}
51037then :
51038  printf %s "(cached) " >&6
51039else $as_nop
51040  if test "$cross_compiling" = yes
51041then :
51042  case "$host_os" in
51043                          # Guess yes on glibc systems.
51044           *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
51045                          # Guess yes on musl systems.
51046           *-musl*)       gl_cv_func_working_strerror="guessing yes" ;;
51047                          # If we don't know, obey --enable-cross-guesses.
51048           *)             gl_cv_func_working_strerror="$gl_cross_guess_normal" ;;
51049         esac
51050
51051else $as_nop
51052  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51053/* end confdefs.h.  */
51054#include <string.h>
51055
51056int
51057main (void)
51058{
51059if (!*strerror (-2)) return 1;
51060  ;
51061  return 0;
51062}
51063_ACEOF
51064if ac_fn_c_try_run "$LINENO"
51065then :
51066  gl_cv_func_working_strerror=yes
51067else $as_nop
51068  gl_cv_func_working_strerror=no
51069fi
51070rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
51071  conftest.$ac_objext conftest.beam conftest.$ac_ext
51072fi
51073
51074
51075fi
51076{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
51077printf "%s\n" "$gl_cv_func_working_strerror" >&6; }
51078    case "$gl_cv_func_working_strerror" in
51079      *yes) ;;
51080      *)
51081                        REPLACE_STRERROR=1
51082        ;;
51083    esac
51084
51085                  case "$gl_cv_func_strerror_r_works" in
51086        *no) REPLACE_STRERROR=1 ;;
51087      esac
51088
51089  else
51090            REPLACE_STRERROR=1
51091  fi
51092
51093  if test $REPLACE_STRERROR = 1; then
51094
51095
51096
51097
51098
51099
51100
51101
51102  gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
51103
51104  fi
51105
51106
51107printf "%s\n" "#define GNULIB_STRERROR 1" >>confdefs.h
51108
51109
51110
51111
51112
51113
51114
51115
51116
51117
51118
51119          GL_GNULIB_STRERROR=1
51120
51121
51122
51123
51124
51125printf "%s\n" "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
51126
51127
51128
51129
51130
51131  if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
51132
51133
51134
51135
51136
51137
51138
51139
51140  gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
51141
51142
51143
51144
51145
51146  if test $ac_cv_header_sys_socket_h != yes; then
51147                    ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
51148if test "x$ac_cv_header_winsock2_h" = xyes
51149then :
51150  printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
51151
51152fi
51153
51154  fi
51155  if test "$ac_cv_header_winsock2_h" = yes; then
51156    HAVE_WINSOCK2_H=1
51157    UNISTD_H_HAVE_WINSOCK2_H=1
51158    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
51159  else
51160    HAVE_WINSOCK2_H=0
51161  fi
51162
51163
51164  fi
51165
51166
51167
51168
51169
51170
51171
51172  if test $ac_cv_have_decl_strerror_r = no; then
51173    HAVE_DECL_STRERROR_R=0
51174  fi
51175
51176  if test $ac_cv_func_strerror_r = yes; then
51177    if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
51178      if test $gl_cv_func_strerror_r_posix_signature = yes; then
51179        case "$gl_cv_func_strerror_r_works" in
51180                    *no) REPLACE_STRERROR_R=1 ;;
51181        esac
51182      else
51183                REPLACE_STRERROR_R=1
51184      fi
51185    else
51186                  REPLACE_STRERROR_R=1
51187    fi
51188  fi
51189
51190  if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
51191
51192
51193
51194
51195
51196
51197
51198
51199  gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext"
51200
51201
51202
51203
51204
51205
51206  fi
51207
51208
51209
51210
51211
51212
51213
51214
51215
51216          GL_GNULIB_STRERROR_R=1
51217
51218
51219
51220
51221
51222printf "%s\n" "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
51223
51224
51225
51226
51227
51228printf "%s\n" "#define GNULIB_STRERROR_R_POSIX 1" >>confdefs.h
51229
51230
51231
51232
51233
51234
51235
51236
51237
51238
51239
51240
51241
51242
51243
51244
51245
51246
51247
51248
51249  if test $ac_cv_have_decl_strndup = no; then
51250    HAVE_DECL_STRNDUP=0
51251  fi
51252
51253  if test $ac_cv_func_strndup = yes; then
51254    HAVE_STRNDUP=1
51255    # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
51256    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5
51257printf %s "checking for working strndup... " >&6; }
51258if test ${gl_cv_func_strndup_works+y}
51259then :
51260  printf %s "(cached) " >&6
51261else $as_nop
51262  if test "$cross_compiling" = yes
51263then :
51264
51265          case $host_os in
51266            aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";;
51267            *)               gl_cv_func_strndup_works="guessing yes";;
51268          esac
51269
51270else $as_nop
51271  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51272/* end confdefs.h.  */
51273
51274         #include <string.h>
51275                           #include <stdlib.h>
51276int
51277main (void)
51278{
51279
51280#if !HAVE_DECL_STRNDUP
51281  extern
51282  #ifdef __cplusplus
51283  "C"
51284  #endif
51285  char *strndup (const char *, size_t);
51286#endif
51287  int result;
51288  char *s;
51289  s = strndup ("some longer string", 15);
51290  free (s);
51291  s = strndup ("shorter string", 13);
51292  result = s[13] != '\0';
51293  free (s);
51294  return result;
51295  ;
51296  return 0;
51297}
51298_ACEOF
51299if ac_fn_c_try_run "$LINENO"
51300then :
51301  gl_cv_func_strndup_works=yes
51302else $as_nop
51303  gl_cv_func_strndup_works=no
51304fi
51305rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
51306  conftest.$ac_objext conftest.beam conftest.$ac_ext
51307fi
51308
51309fi
51310{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5
51311printf "%s\n" "$gl_cv_func_strndup_works" >&6; }
51312    case $gl_cv_func_strndup_works in
51313      *no) REPLACE_STRNDUP=1 ;;
51314    esac
51315  else
51316    HAVE_STRNDUP=0
51317  fi
51318
51319  if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
51320
51321
51322
51323
51324
51325
51326
51327
51328  gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext"
51329
51330  fi
51331
51332
51333
51334
51335
51336
51337
51338
51339
51340          GL_GNULIB_STRNDUP=1
51341
51342
51343
51344
51345
51346printf "%s\n" "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h
51347
51348
51349
51350
51351
51352
51353
51354
51355
51356  if test $ac_cv_have_decl_strnlen = no; then
51357    HAVE_DECL_STRNLEN=0
51358  else
51359
51360         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
51361printf %s "checking for working strnlen... " >&6; }
51362if test ${ac_cv_func_strnlen_working+y}
51363then :
51364  printf %s "(cached) " >&6
51365else $as_nop
51366  if test "$cross_compiling" = yes
51367then :
51368  # Guess no on AIX systems, yes otherwise.
51369		case "$host_os" in
51370		  aix*) ac_cv_func_strnlen_working=no;;
51371		  *)    ac_cv_func_strnlen_working=yes;;
51372		esac
51373else $as_nop
51374  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51375/* end confdefs.h.  */
51376$ac_includes_default
51377int
51378main (void)
51379{
51380
51381#define S "foobar"
51382#define S_LEN (sizeof S - 1)
51383
51384  /* At least one implementation is buggy: that of AIX 4.3 would
51385     give strnlen (S, 1) == 3.  */
51386
51387  int i;
51388  for (i = 0; i < S_LEN + 1; ++i)
51389    {
51390      int expected = i <= S_LEN ? i : S_LEN;
51391      if (strnlen (S, i) != expected)
51392	return 1;
51393    }
51394  return 0;
51395
51396  ;
51397  return 0;
51398}
51399_ACEOF
51400if ac_fn_c_try_run "$LINENO"
51401then :
51402  ac_cv_func_strnlen_working=yes
51403else $as_nop
51404  ac_cv_func_strnlen_working=no
51405fi
51406rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
51407  conftest.$ac_objext conftest.beam conftest.$ac_ext
51408fi
51409
51410fi
51411{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
51412printf "%s\n" "$ac_cv_func_strnlen_working" >&6; }
51413test $ac_cv_func_strnlen_working = no && :
51414
51415
51416    if test $ac_cv_func_strnlen_working = no; then
51417      REPLACE_STRNLEN=1
51418    fi
51419  fi
51420
51421  if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
51422
51423
51424
51425
51426
51427
51428
51429
51430  gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
51431
51432    :
51433  fi
51434
51435
51436
51437
51438
51439
51440
51441
51442
51443          GL_GNULIB_STRNLEN=1
51444
51445
51446
51447
51448
51449printf "%s\n" "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
51450
51451
51452
51453
51454
51455  ac_fn_c_check_func "$LINENO" "strpbrk" "ac_cv_func_strpbrk"
51456if test "x$ac_cv_func_strpbrk" = xyes
51457then :
51458  printf "%s\n" "#define HAVE_STRPBRK 1" >>confdefs.h
51459
51460fi
51461
51462  if test $ac_cv_func_strpbrk = no; then
51463    HAVE_STRPBRK=0
51464  fi
51465
51466  if test $HAVE_STRPBRK = 0; then
51467
51468
51469
51470
51471
51472
51473
51474
51475  gl_LIBOBJS="$gl_LIBOBJS strpbrk.$ac_objext"
51476
51477    :
51478  fi
51479
51480
51481
51482
51483
51484
51485
51486
51487
51488          GL_GNULIB_STRPBRK=1
51489
51490
51491
51492
51493
51494printf "%s\n" "#define GNULIB_TEST_STRPBRK 1" >>confdefs.h
51495
51496
51497
51498
51499
51500
51501
51502  if test $ac_cv_func_strptime != yes; then
51503    HAVE_STRPTIME=0
51504  fi
51505
51506  if test $HAVE_STRPTIME = 0; then
51507
51508
51509
51510
51511
51512
51513
51514
51515  gl_LIBOBJS="$gl_LIBOBJS strptime.$ac_objext"
51516
51517
51518
51519  :
51520
51521  fi
51522
51523
51524
51525
51526
51527
51528
51529
51530
51531          GL_GNULIB_STRPTIME=1
51532
51533
51534
51535
51536
51537printf "%s\n" "#define GNULIB_TEST_STRPTIME 1" >>confdefs.h
51538
51539
51540
51541
51542
51543
51544
51545     ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
51546if test "x$ac_cv_func_strtok_r" = xyes
51547then :
51548  printf "%s\n" "#define HAVE_STRTOK_R 1" >>confdefs.h
51549
51550fi
51551
51552  if test $ac_cv_func_strtok_r = yes; then
51553    HAVE_STRTOK_R=1
51554                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strtok_r works" >&5
51555printf %s "checking whether strtok_r works... " >&6; }
51556if test ${gl_cv_func_strtok_r_works+y}
51557then :
51558  printf %s "(cached) " >&6
51559else $as_nop
51560  if test "$cross_compiling" = yes
51561then :
51562  case "$host_os" in
51563                           # Guess no on glibc systems.
51564            *-gnu* | gnu*) gl_cv_func_strtok_r_works="guessing no" ;;
51565                           # Guess yes on native Windows.
51566            mingw*)        gl_cv_func_strtok_r_works="guessing yes" ;;
51567            *)             gl_cv_func_strtok_r_works="guessing yes" ;;
51568          esac
51569
51570else $as_nop
51571  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51572/* end confdefs.h.  */
51573
51574              #ifndef __OPTIMIZE__
51575              # define __OPTIMIZE__ 1
51576              #endif
51577              #undef __OPTIMIZE_SIZE__
51578              #undef __NO_INLINE__
51579              #include <stdlib.h>
51580              #include <string.h>
51581
51582int
51583main (void)
51584{
51585static const char dummy[] = "\177\01a";
51586              char delimiters[] = "xxxxxxxx";
51587              char *save_ptr = (char *) dummy;
51588              strtok_r (delimiters, "x", &save_ptr);
51589              strtok_r (NULL, "x", &save_ptr);
51590              return 0;
51591
51592  ;
51593  return 0;
51594}
51595
51596_ACEOF
51597if ac_fn_c_try_run "$LINENO"
51598then :
51599  gl_cv_func_strtok_r_works=yes
51600else $as_nop
51601  gl_cv_func_strtok_r_works=no
51602fi
51603rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
51604  conftest.$ac_objext conftest.beam conftest.$ac_ext
51605fi
51606
51607
51608fi
51609{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtok_r_works" >&5
51610printf "%s\n" "$gl_cv_func_strtok_r_works" >&6; }
51611    case "$gl_cv_func_strtok_r_works" in
51612      *no)
51613                                UNDEFINE_STRTOK_R=1
51614        ;;
51615    esac
51616  else
51617    HAVE_STRTOK_R=0
51618  fi
51619
51620  if test $ac_cv_have_decl_strtok_r = no; then
51621    HAVE_DECL_STRTOK_R=0
51622  fi
51623
51624  if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
51625
51626
51627
51628
51629
51630
51631
51632
51633  gl_LIBOBJS="$gl_LIBOBJS strtok_r.$ac_objext"
51634
51635
51636  :
51637
51638  fi
51639
51640
51641
51642
51643
51644
51645
51646
51647
51648          GL_GNULIB_STRTOK_R=1
51649
51650
51651
51652
51653
51654printf "%s\n" "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h
51655
51656
51657
51658
51659
51660
51661  ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
51662if test "x$ac_cv_func_strtol" = xyes
51663then :
51664  printf "%s\n" "#define HAVE_STRTOL 1" >>confdefs.h
51665
51666fi
51667
51668  if test $ac_cv_func_strtol = yes; then
51669    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strtol works" >&5
51670printf %s "checking whether strtol works... " >&6; }
51671if test ${gl_cv_func_strtol_works+y}
51672then :
51673  printf %s "(cached) " >&6
51674else $as_nop
51675  if test "$cross_compiling" = yes
51676then :
51677  case "$host_os" in
51678                    # Guess no on native Windows.
51679            mingw*) gl_cv_func_strtol_works="guessing no" ;;
51680            *)      gl_cv_func_strtol_works="$gl_cross_guess_normal" ;;
51681          esac
51682
51683else $as_nop
51684  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51685/* end confdefs.h.  */
51686#include <stdlib.h>
51687int
51688main (void)
51689{
51690int result = 0;
51691              char *term;
51692              /* This test fails on Minix and native Windows.  */
51693              {
51694                const char input[] = "0x";
51695                (void) strtol (input, &term, 16);
51696                if (term != input + 1)
51697                  result |= 1;
51698              }
51699              return result;
51700
51701  ;
51702  return 0;
51703}
51704
51705_ACEOF
51706if ac_fn_c_try_run "$LINENO"
51707then :
51708  gl_cv_func_strtol_works=yes
51709else $as_nop
51710  gl_cv_func_strtol_works=no
51711fi
51712rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
51713  conftest.$ac_objext conftest.beam conftest.$ac_ext
51714fi
51715
51716
51717fi
51718{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtol_works" >&5
51719printf "%s\n" "$gl_cv_func_strtol_works" >&6; }
51720    case "$gl_cv_func_strtol_works" in
51721      *yes) ;;
51722      *)    REPLACE_STRTOL=1 ;;
51723    esac
51724  else
51725    HAVE_STRTOL=0
51726  fi
51727
51728  if test $HAVE_STRTOL = 0 || test $REPLACE_STRTOL = 1; then
51729
51730
51731
51732
51733
51734
51735
51736
51737  gl_LIBOBJS="$gl_LIBOBJS strtol.$ac_objext"
51738
51739  fi
51740
51741
51742
51743
51744
51745
51746
51747
51748
51749          GL_GNULIB_STRTOL=1
51750
51751
51752
51753
51754
51755printf "%s\n" "#define GNULIB_TEST_STRTOL 1" >>confdefs.h
51756
51757
51758
51759
51760
51761
51762  ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
51763if test "x$ac_cv_func_strtoll" = xyes
51764then :
51765  printf "%s\n" "#define HAVE_STRTOLL 1" >>confdefs.h
51766
51767fi
51768
51769  if test $ac_cv_func_strtoll = yes; then
51770    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strtoll works" >&5
51771printf %s "checking whether strtoll works... " >&6; }
51772if test ${gl_cv_func_strtoll_works+y}
51773then :
51774  printf %s "(cached) " >&6
51775else $as_nop
51776  if test "$cross_compiling" = yes
51777then :
51778  case "$host_os" in
51779                    # Guess no on native Windows.
51780            mingw*) gl_cv_func_strtoll_works="guessing no" ;;
51781            *)      gl_cv_func_strtoll_works="$gl_cross_guess_normal" ;;
51782          esac
51783
51784else $as_nop
51785  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51786/* end confdefs.h.  */
51787#include <stdlib.h>
51788int
51789main (void)
51790{
51791int result = 0;
51792              char *term;
51793              /* This test fails on Minix and native Windows.  */
51794              {
51795                const char input[] = "0x";
51796                (void) strtoll (input, &term, 16);
51797                if (term != input + 1)
51798                  result |= 1;
51799              }
51800              return result;
51801
51802  ;
51803  return 0;
51804}
51805
51806_ACEOF
51807if ac_fn_c_try_run "$LINENO"
51808then :
51809  gl_cv_func_strtoll_works=yes
51810else $as_nop
51811  gl_cv_func_strtoll_works=no
51812fi
51813rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
51814  conftest.$ac_objext conftest.beam conftest.$ac_ext
51815fi
51816
51817
51818fi
51819{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoll_works" >&5
51820printf "%s\n" "$gl_cv_func_strtoll_works" >&6; }
51821    case "$gl_cv_func_strtoll_works" in
51822      *yes) ;;
51823      *)    REPLACE_STRTOLL=1 ;;
51824    esac
51825  else
51826    HAVE_STRTOLL=0
51827  fi
51828
51829  if test $HAVE_STRTOLL = 0 || test $REPLACE_STRTOLL = 1; then
51830
51831
51832
51833
51834
51835
51836
51837
51838  gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext"
51839
51840
51841  :
51842
51843  fi
51844
51845
51846
51847
51848
51849
51850
51851
51852
51853          GL_GNULIB_STRTOLL=1
51854
51855
51856
51857
51858
51859printf "%s\n" "#define GNULIB_TEST_STRTOLL 1" >>confdefs.h
51860
51861
51862
51863
51864
51865
51866        if test $ac_cv_func_symlink = no; then
51867    HAVE_SYMLINK=0
51868  else
51869    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
51870printf %s "checking whether symlink handles trailing slash correctly... " >&6; }
51871if test ${gl_cv_func_symlink_works+y}
51872then :
51873  printf %s "(cached) " >&6
51874else $as_nop
51875  if test "$cross_compiling" = yes
51876then :
51877  case "$host_os" in
51878                             # Guess yes on Linux systems.
51879            linux-* | linux) gl_cv_func_symlink_works="guessing yes" ;;
51880                             # Guess yes on glibc systems.
51881            *-gnu* | gnu*)   gl_cv_func_symlink_works="guessing yes" ;;
51882                             # If we don't know, obey --enable-cross-guesses.
51883            *)               gl_cv_func_symlink_works="$gl_cross_guess_normal" ;;
51884          esac
51885
51886else $as_nop
51887  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51888/* end confdefs.h.  */
51889#include <unistd.h>
51890
51891int
51892main (void)
51893{
51894int result = 0;
51895             if (!symlink ("a", "conftest.link/"))
51896               result |= 1;
51897             if (symlink ("conftest.f", "conftest.lnk2"))
51898               result |= 2;
51899             else if (!symlink ("a", "conftest.lnk2/"))
51900               result |= 4;
51901             return result;
51902
51903  ;
51904  return 0;
51905}
51906_ACEOF
51907if ac_fn_c_try_run "$LINENO"
51908then :
51909  gl_cv_func_symlink_works=yes
51910else $as_nop
51911  gl_cv_func_symlink_works=no
51912fi
51913rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
51914  conftest.$ac_objext conftest.beam conftest.$ac_ext
51915fi
51916
51917      rm -f conftest.f conftest.link conftest.lnk2
51918fi
51919{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
51920printf "%s\n" "$gl_cv_func_symlink_works" >&6; }
51921    case "$gl_cv_func_symlink_works" in
51922      *yes) ;;
51923      *)
51924        REPLACE_SYMLINK=1
51925        ;;
51926    esac
51927  fi
51928
51929  if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
51930
51931
51932
51933
51934
51935
51936
51937
51938  gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext"
51939
51940  fi
51941
51942
51943
51944
51945
51946
51947
51948
51949
51950          GL_GNULIB_SYMLINK=1
51951
51952
51953
51954
51955
51956printf "%s\n" "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
51957
51958
51959
51960
51961
51962
51963
51964
51965
51966
51967
51968
51969
51970
51971
51972
51973
51974
51975
51976
51977
51978
51979
51980
51981
51982
51983
51984
51985
51986
51987
51988
51989
51990
51991
51992
51993
51994
51995
51996
51997
51998
51999
52000
52001
52002
52003
52004
52005
52006
52007
52008
52009
52010
52011
52012
52013
52014
52015
52016
52017
52018
52019
52020
52021
52022
52023
52024
52025
52026
52027
52028
52029
52030
52031
52032  :
52033
52034
52035
52036
52037printf "%s\n" "#define GNULIB_TEMPNAME 1" >>confdefs.h
52038
52039
52040  ac_fn_c_check_header_compile "$LINENO" "sys/single_threaded.h" "ac_cv_header_sys_single_threaded_h" "$ac_includes_default"
52041if test "x$ac_cv_header_sys_single_threaded_h" = xyes
52042then :
52043  printf "%s\n" "#define HAVE_SYS_SINGLE_THREADED_H 1" >>confdefs.h
52044
52045fi
52046
52047
52048
52049
52050
52051
52052
52053
52054
52055
52056
52057
52058
52059
52060      ac_fn_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "/* mingw's <time.h> provides the functions asctime_r, ctime_r,
52061         gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
52062         been included before.  */
52063      #if defined __MINGW32__
52064      # include <unistd.h>
52065      #endif
52066      #include <time.h>
52067
52068" "$ac_c_undeclared_builtin_options" "CFLAGS"
52069if test "x$ac_cv_have_decl_localtime_r" = xyes
52070then :
52071  ac_have_decl=1
52072else $as_nop
52073  ac_have_decl=0
52074fi
52075printf "%s\n" "#define HAVE_DECL_LOCALTIME_R $ac_have_decl" >>confdefs.h
52076
52077  if test $ac_cv_have_decl_localtime_r = no; then
52078    HAVE_DECL_LOCALTIME_R=0
52079  fi
52080
52081
52082  if test $ac_cv_func_localtime_r = yes; then
52083    HAVE_LOCALTIME_R=1
52084    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
52085printf %s "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
52086if test ${gl_cv_time_r_posix+y}
52087then :
52088  printf %s "(cached) " >&6
52089else $as_nop
52090  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52091/* end confdefs.h.  */
52092/* mingw's <time.h> provides the functions asctime_r, ctime_r,
52093                 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
52094                 been included before.  */
52095              #if defined __MINGW32__
52096              # include <unistd.h>
52097              #endif
52098              #include <time.h>
52099
52100int
52101main (void)
52102{
52103/* We don't need to append 'restrict's to the argument types,
52104                 even though the POSIX signature has the 'restrict's,
52105                 since C99 says they can't affect type compatibility.  */
52106              struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
52107              if (ptr) return 0;
52108              /* Check the return type is a pointer.
52109                 On HP-UX 10 it is 'int'.  */
52110              *localtime_r (0, 0);
52111  ;
52112  return 0;
52113}
52114
52115_ACEOF
52116if ac_fn_c_try_compile "$LINENO"
52117then :
52118  gl_cv_time_r_posix=yes
52119else $as_nop
52120  gl_cv_time_r_posix=no
52121fi
52122rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
52123
52124fi
52125{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
52126printf "%s\n" "$gl_cv_time_r_posix" >&6; }
52127    if test $gl_cv_time_r_posix = yes; then
52128      REPLACE_LOCALTIME_R=0
52129    else
52130      REPLACE_LOCALTIME_R=1
52131    fi
52132  else
52133    HAVE_LOCALTIME_R=0
52134                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether localtime_r exists as an inline function" >&5
52135printf %s "checking whether localtime_r exists as an inline function... " >&6; }
52136if test ${gl_cv_func_localtime_r_inline+y}
52137then :
52138  printf %s "(cached) " >&6
52139else $as_nop
52140  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52141/* end confdefs.h.  */
52142/* mingw's <time.h> provides the functions asctime_r, ctime_r,
52143                 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
52144                 been included before.  */
52145              #if defined __MINGW32__
52146              # include <unistd.h>
52147              #endif
52148              #include <time.h>
52149
52150int
52151main (void)
52152{
52153time_t a;
52154              struct tm r;
52155              localtime_r (&a, &r);
52156
52157  ;
52158  return 0;
52159}
52160
52161_ACEOF
52162if ac_fn_c_try_link "$LINENO"
52163then :
52164  gl_cv_func_localtime_r_inline=yes
52165else $as_nop
52166  gl_cv_func_localtime_r_inline=no
52167fi
52168rm -f core conftest.err conftest.$ac_objext conftest.beam \
52169    conftest$ac_exeext conftest.$ac_ext
52170
52171fi
52172{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localtime_r_inline" >&5
52173printf "%s\n" "$gl_cv_func_localtime_r_inline" >&6; }
52174    if test $gl_cv_func_localtime_r_inline = yes; then
52175      REPLACE_LOCALTIME_R=1
52176    fi
52177  fi
52178
52179  if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
52180
52181
52182
52183
52184
52185
52186
52187
52188  gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
52189
52190
52191  :
52192
52193  fi
52194
52195
52196
52197
52198
52199
52200
52201
52202
52203          GL_GNULIB_TIME_R=1
52204
52205
52206
52207
52208
52209printf "%s\n" "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
52210
52211
52212
52213
52214
52215
52216  REPLACE_TIMEGM=0
52217
52218  if test $ac_cv_func_timegm = yes; then
52219    if test "$gl_cv_func_working_mktime" != yes; then
52220      # Assume that timegm is buggy if mktime is.
52221      REPLACE_TIMEGM=1
52222    fi
52223  else
52224    HAVE_TIMEGM=0
52225  fi
52226
52227  if test $HAVE_TIMEGM = 0 || test $REPLACE_TIMEGM = 1; then
52228
52229
52230
52231
52232
52233
52234
52235
52236  gl_LIBOBJS="$gl_LIBOBJS timegm.$ac_objext"
52237
52238
52239  :
52240
52241  fi
52242
52243
52244
52245
52246
52247
52248
52249
52250
52251          GL_GNULIB_TIMEGM=1
52252
52253
52254
52255
52256
52257printf "%s\n" "#define GNULIB_TEST_TIMEGM 1" >>confdefs.h
52258
52259
52260
52261  :
52262  :
52263
52264
52265      if  { test "$HAVE_LIBUNISTRING" != yes \
52266    || {
52267
52268
52269
52270            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
52271            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
52272                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
52273                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
52274                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 11
52275                         }
52276                    }
52277               }
52278
52279
52280
52281
52282       }
52283  }; then
52284    LIBUNISTRING_UNICASE_H='unicase.h'
52285  else
52286    LIBUNISTRING_UNICASE_H=
52287  fi
52288
52289
52290
52291
52292
52293       if  { test "$HAVE_LIBUNISTRING" != yes \
52294    || {
52295
52296
52297
52298            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
52299            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
52300                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
52301                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
52302                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 1
52303                         }
52304                    }
52305               }
52306
52307
52308
52309
52310       }
52311  }; then
52312  LIBUNISTRING_COMPILE_UNICASE_EMPTY_PREFIX_CONTEXT_TRUE=
52313  LIBUNISTRING_COMPILE_UNICASE_EMPTY_PREFIX_CONTEXT_FALSE='#'
52314else
52315  LIBUNISTRING_COMPILE_UNICASE_EMPTY_PREFIX_CONTEXT_TRUE='#'
52316  LIBUNISTRING_COMPILE_UNICASE_EMPTY_PREFIX_CONTEXT_FALSE=
52317fi
52318
52319
52320
52321
52322       if  { test "$HAVE_LIBUNISTRING" != yes \
52323    || {
52324
52325
52326
52327            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
52328            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
52329                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
52330                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
52331                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 1
52332                         }
52333                    }
52334               }
52335
52336
52337
52338
52339       }
52340  }; then
52341  LIBUNISTRING_COMPILE_UNICASE_EMPTY_SUFFIX_CONTEXT_TRUE=
52342  LIBUNISTRING_COMPILE_UNICASE_EMPTY_SUFFIX_CONTEXT_FALSE='#'
52343else
52344  LIBUNISTRING_COMPILE_UNICASE_EMPTY_SUFFIX_CONTEXT_TRUE='#'
52345  LIBUNISTRING_COMPILE_UNICASE_EMPTY_SUFFIX_CONTEXT_FALSE=
52346fi
52347
52348
52349
52350
52351
52352       if  { test "$HAVE_LIBUNISTRING" != yes \
52353    || {
52354
52355
52356
52357            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
52358            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
52359                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
52360                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
52361                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 8
52362                         }
52363                    }
52364               }
52365
52366
52367
52368
52369       }
52370  }; then
52371  LIBUNISTRING_COMPILE_UNICASE_TOLOWER_TRUE=
52372  LIBUNISTRING_COMPILE_UNICASE_TOLOWER_FALSE='#'
52373else
52374  LIBUNISTRING_COMPILE_UNICASE_TOLOWER_TRUE='#'
52375  LIBUNISTRING_COMPILE_UNICASE_TOLOWER_FALSE=
52376fi
52377
52378
52379
52380
52381       if  { test "$HAVE_LIBUNISTRING" != yes \
52382    || {
52383
52384
52385
52386            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
52387            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
52388                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
52389                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
52390                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 8
52391                         }
52392                    }
52393               }
52394
52395
52396
52397
52398       }
52399  }; then
52400  LIBUNISTRING_COMPILE_UNICASE_U8_TOLOWER_TRUE=
52401  LIBUNISTRING_COMPILE_UNICASE_U8_TOLOWER_FALSE='#'
52402else
52403  LIBUNISTRING_COMPILE_UNICASE_U8_TOLOWER_TRUE='#'
52404  LIBUNISTRING_COMPILE_UNICASE_U8_TOLOWER_FALSE=
52405fi
52406
52407
52408
52409
52410      if  { test "$HAVE_LIBUNISTRING" != yes \
52411    || {
52412
52413
52414
52415            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
52416            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
52417                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
52418                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
52419                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 8
52420                         }
52421                    }
52422               }
52423
52424
52425
52426
52427       }
52428  }; then
52429    LIBUNISTRING_UNICTYPE_H='unictype.h'
52430  else
52431    LIBUNISTRING_UNICTYPE_H=
52432  fi
52433
52434
52435
52436
52437       if  { test "$HAVE_LIBUNISTRING" != yes \
52438    || {
52439
52440
52441
52442            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
52443            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
52444                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
52445                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
52446                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 8
52447                         }
52448                    }
52449               }
52450
52451
52452
52453
52454       }
52455  }; then
52456  LIBUNISTRING_COMPILE_UNICTYPE_COMBINING_CLASS_TRUE=
52457  LIBUNISTRING_COMPILE_UNICTYPE_COMBINING_CLASS_FALSE='#'
52458else
52459  LIBUNISTRING_COMPILE_UNICTYPE_COMBINING_CLASS_TRUE='#'
52460  LIBUNISTRING_COMPILE_UNICTYPE_COMBINING_CLASS_FALSE=
52461fi
52462
52463
52464
52465
52466
52467       if  { test "$HAVE_LIBUNISTRING" != yes \
52468    || {
52469
52470
52471
52472            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
52473            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
52474                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
52475                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
52476                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 8
52477                         }
52478                    }
52479               }
52480
52481
52482
52483
52484       }
52485  }; then
52486  LIBUNISTRING_COMPILE_UNICTYPE_PROPERTY_SOFT_DOTTED_TRUE=
52487  LIBUNISTRING_COMPILE_UNICTYPE_PROPERTY_SOFT_DOTTED_FALSE='#'
52488else
52489  LIBUNISTRING_COMPILE_UNICTYPE_PROPERTY_SOFT_DOTTED_TRUE='#'
52490  LIBUNISTRING_COMPILE_UNICTYPE_PROPERTY_SOFT_DOTTED_FALSE=
52491fi
52492
52493
52494
52495
52496      if  { test "$HAVE_LIBUNISTRING" != yes \
52497    || {
52498
52499
52500
52501            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
52502            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
52503                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
52504                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
52505                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 11
52506                         }
52507                    }
52508               }
52509
52510
52511
52512
52513       }
52514  }; then
52515    LIBUNISTRING_UNINORM_H='uninorm.h'
52516  else
52517    LIBUNISTRING_UNINORM_H=
52518  fi
52519
52520
52521
52522
52523printf "%s\n" "#define GNULIB_TEST_UNINORM_U8_NORMALIZE 1" >>confdefs.h
52524
52525
52526
52527
52528       if  { test "$HAVE_LIBUNISTRING" != yes \
52529    || {
52530
52531
52532
52533            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
52534            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
52535                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
52536                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
52537                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 8
52538                         }
52539                    }
52540               }
52541
52542
52543
52544
52545       }
52546  }; then
52547  LIBUNISTRING_COMPILE_UNINORM_U8_NORMALIZE_TRUE=
52548  LIBUNISTRING_COMPILE_UNINORM_U8_NORMALIZE_FALSE='#'
52549else
52550  LIBUNISTRING_COMPILE_UNINORM_U8_NORMALIZE_TRUE='#'
52551  LIBUNISTRING_COMPILE_UNINORM_U8_NORMALIZE_FALSE=
52552fi
52553
52554
52555
52556
52557
52558
52559
52560
52561
52562
52563
52564
52565
52566      if  { test "$HAVE_LIBUNISTRING" != yes \
52567    || {
52568
52569
52570
52571            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
52572            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
52573                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
52574                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
52575                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 11
52576                         }
52577                    }
52578               }
52579
52580
52581
52582
52583       }
52584  }; then
52585    LIBUNISTRING_UNISTR_H='unistr.h'
52586  else
52587    LIBUNISTRING_UNISTR_H=
52588  fi
52589
52590
52591
52592
52593       if  { test "$HAVE_LIBUNISTRING" != yes \
52594    || {
52595
52596
52597
52598            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
52599            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
52600                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
52601                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
52602                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
52603                         }
52604                    }
52605               }
52606
52607
52608
52609
52610       }
52611  }; then
52612  LIBUNISTRING_COMPILE_UNISTR_U8_CPY_TRUE=
52613  LIBUNISTRING_COMPILE_UNISTR_U8_CPY_FALSE='#'
52614else
52615  LIBUNISTRING_COMPILE_UNISTR_U8_CPY_TRUE='#'
52616  LIBUNISTRING_COMPILE_UNISTR_U8_CPY_FALSE=
52617fi
52618
52619
52620
52621
52622printf "%s\n" "#define GNULIB_UNISTR_U8_MBTOUC_UNSAFE 1" >>confdefs.h
52623
52624
52625
52626
52627       if  { test "$HAVE_LIBUNISTRING" != yes \
52628    || {
52629
52630
52631
52632            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
52633            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
52634                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
52635                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
52636                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
52637                         }
52638                    }
52639               }
52640
52641
52642
52643
52644       }
52645  }; then
52646  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_UNSAFE_TRUE=
52647  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_UNSAFE_FALSE='#'
52648else
52649  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_UNSAFE_TRUE='#'
52650  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_UNSAFE_FALSE=
52651fi
52652
52653
52654
52655
52656       if  { test "$HAVE_LIBUNISTRING" != yes \
52657    || {
52658
52659
52660
52661            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
52662            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
52663                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
52664                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
52665                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
52666                         }
52667                    }
52668               }
52669
52670
52671
52672
52673       }
52674  }; then
52675  LIBUNISTRING_COMPILE_UNISTR_U8_STRLEN_TRUE=
52676  LIBUNISTRING_COMPILE_UNISTR_U8_STRLEN_FALSE='#'
52677else
52678  LIBUNISTRING_COMPILE_UNISTR_U8_STRLEN_TRUE='#'
52679  LIBUNISTRING_COMPILE_UNISTR_U8_STRLEN_FALSE=
52680fi
52681
52682
52683
52684
52685printf "%s\n" "#define GNULIB_UNISTR_U8_UCTOMB 1" >>confdefs.h
52686
52687
52688
52689
52690       if  { test "$HAVE_LIBUNISTRING" != yes \
52691    || {
52692
52693
52694
52695            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
52696            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
52697                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
52698                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
52699                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
52700                         }
52701                    }
52702               }
52703
52704
52705
52706
52707       }
52708  }; then
52709  LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE=
52710  LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE='#'
52711else
52712  LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE='#'
52713  LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE=
52714fi
52715
52716
52717
52718
52719      if  { test "$HAVE_LIBUNISTRING" != yes \
52720    || {
52721
52722
52723
52724            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
52725            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
52726                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
52727                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
52728                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 11
52729                         }
52730                    }
52731               }
52732
52733
52734
52735
52736       }
52737  }; then
52738    LIBUNISTRING_UNITYPES_H='unitypes.h'
52739  else
52740    LIBUNISTRING_UNITYPES_H=
52741  fi
52742
52743
52744
52745
52746
52747      if  { test "$HAVE_LIBUNISTRING" != yes \
52748    || {
52749
52750
52751
52752            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
52753            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
52754                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
52755                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
52756                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 11
52757                         }
52758                    }
52759               }
52760
52761
52762
52763
52764       }
52765  }; then
52766    LIBUNISTRING_UNIWIDTH_H='uniwidth.h'
52767  else
52768    LIBUNISTRING_UNIWIDTH_H=
52769  fi
52770
52771
52772
52773
52774       if  { test "$HAVE_LIBUNISTRING" != yes \
52775    || {
52776
52777
52778
52779            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
52780            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
52781                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
52782                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
52783                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 8
52784                         }
52785                    }
52786               }
52787
52788
52789
52790
52791       }
52792  }; then
52793  LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE=
52794  LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#'
52795else
52796  LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#'
52797  LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE=
52798fi
52799
52800
52801
52802
52803
52804
52805
52806    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5
52807printf %s "checking whether unlink honors trailing slashes... " >&6; }
52808if test ${gl_cv_func_unlink_honors_slashes+y}
52809then :
52810  printf %s "(cached) " >&6
52811else $as_nop
52812  touch conftest.file
52813     # Assume that if we have lstat, we can also check symlinks.
52814     if test $ac_cv_func_lstat = yes; then
52815       ln -s conftest.file conftest.lnk
52816     fi
52817     if test "$cross_compiling" = yes
52818then :
52819  case "$host_os" in
52820                          # Guess yes on Linux systems.
52821         linux-* | linux) gl_cv_func_unlink_honors_slashes="guessing yes" ;;
52822                          # Guess yes on glibc systems.
52823         *-gnu*)          gl_cv_func_unlink_honors_slashes="guessing yes" ;;
52824                          # Guess no on native Windows.
52825         mingw*)          gl_cv_func_unlink_honors_slashes="guessing no" ;;
52826                          # If we don't know, obey --enable-cross-guesses.
52827         *)               gl_cv_func_unlink_honors_slashes="$gl_cross_guess_normal" ;;
52828       esac
52829
52830else $as_nop
52831  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52832/* end confdefs.h.  */
52833#if HAVE_UNISTD_H
52834           # include <unistd.h>
52835           #else /* on Windows with MSVC */
52836           # include <io.h>
52837           #endif
52838           #include <errno.h>
52839
52840
52841$gl_mda_defines
52842
52843int
52844main (void)
52845{
52846int result = 0;
52847           if (!unlink ("conftest.file/"))
52848             result |= 1;
52849           else if (errno != ENOTDIR)
52850             result |= 2;
52851#if HAVE_LSTAT
52852           if (!unlink ("conftest.lnk/"))
52853             result |= 4;
52854           else if (errno != ENOTDIR)
52855             result |= 8;
52856#endif
52857           return result;
52858
52859  ;
52860  return 0;
52861}
52862_ACEOF
52863if ac_fn_c_try_run "$LINENO"
52864then :
52865  gl_cv_func_unlink_honors_slashes=yes
52866else $as_nop
52867  gl_cv_func_unlink_honors_slashes=no
52868fi
52869rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
52870  conftest.$ac_objext conftest.beam conftest.$ac_ext
52871fi
52872
52873     rm -f conftest.file conftest.lnk
52874fi
52875{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_honors_slashes" >&5
52876printf "%s\n" "$gl_cv_func_unlink_honors_slashes" >&6; }
52877  case "$gl_cv_func_unlink_honors_slashes" in
52878    *no)
52879      REPLACE_UNLINK=1
52880      ;;
52881  esac
52882
52883      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether unlink of a parent directory fails as it should" >&5
52884printf %s "checking whether unlink of a parent directory fails as it should... " >&6; }
52885if test ${gl_cv_func_unlink_parent_fails+y}
52886then :
52887  printf %s "(cached) " >&6
52888else $as_nop
52889  case "$host_os" in
52890       darwin*)
52891                                                      if {
52892              # Use the mktemp program if available. If not available, hide the error
52893              # message.
52894              tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` &&
52895              test -n "$tmp" && test -d "$tmp"
52896            } ||
52897            {
52898              # Use a simple mkdir command. It is guaranteed to fail if the directory
52899              # already exists.  $RANDOM is bash specific and expands to empty in shells
52900              # other than bash, ksh and zsh.  Its use does not increase security;
52901              # rather, it minimizes the probability of failure in a very cluttered /tmp
52902              # directory.
52903              tmp=/tmp/gt$$-$RANDOM
52904              (umask 077 && mkdir "$tmp")
52905            }; then
52906           mkdir "$tmp/subdir"
52907           GL_SUBDIR_FOR_UNLINK="$tmp/subdir"
52908           export GL_SUBDIR_FOR_UNLINK
52909           if test "$cross_compiling" = yes
52910then :
52911  # If we don't know, obey --enable-cross-guesses.
52912              gl_cv_func_unlink_parent_fails="$gl_cross_guess_normal"
52913
52914else $as_nop
52915  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52916/* end confdefs.h.  */
52917
52918                #include <stdlib.h>
52919                #if HAVE_UNISTD_H
52920                # include <unistd.h>
52921                #else /* on Windows with MSVC */
52922                # include <direct.h>
52923                # include <io.h>
52924                #endif
52925
52926
52927$gl_mda_defines
52928
52929                int main ()
52930                {
52931                  int result = 0;
52932                  if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0)
52933                    result |= 1;
52934                  else if (unlink ("..") == 0)
52935                    result |= 2;
52936                  return result;
52937                }
52938
52939_ACEOF
52940if ac_fn_c_try_run "$LINENO"
52941then :
52942  gl_cv_func_unlink_parent_fails=yes
52943else $as_nop
52944  gl_cv_func_unlink_parent_fails=no
52945fi
52946rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
52947  conftest.$ac_objext conftest.beam conftest.$ac_ext
52948fi
52949
52950           unset GL_SUBDIR_FOR_UNLINK
52951           rm -rf "$tmp"
52952         else
52953           gl_cv_func_unlink_parent_fails="guessing no"
52954         fi
52955         ;;
52956       *)
52957         gl_cv_func_unlink_parent_fails="guessing yes"
52958         ;;
52959     esac
52960
52961fi
52962{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_parent_fails" >&5
52963printf "%s\n" "$gl_cv_func_unlink_parent_fails" >&6; }
52964  case "$gl_cv_func_unlink_parent_fails" in
52965    *no)
52966      REPLACE_UNLINK=1
52967
52968printf "%s\n" "#define UNLINK_PARENT_BUG 1" >>confdefs.h
52969
52970      ;;
52971  esac
52972
52973  if test $REPLACE_UNLINK = 1; then
52974
52975
52976
52977
52978
52979
52980
52981
52982  gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext"
52983
52984  fi
52985
52986
52987
52988
52989
52990
52991
52992
52993
52994          GL_GNULIB_UNLINK=1
52995
52996
52997
52998
52999
53000printf "%s\n" "#define GNULIB_TEST_UNLINK 1" >>confdefs.h
53001
53002
53003
53004
53005printf "%s\n" "#define GNULIB_STDIO_SINGLE_THREAD 1" >>confdefs.h
53006
53007
53008printf "%s\n" "#define USE_UNLOCKED_IO GNULIB_STDIO_SINGLE_THREAD" >>confdefs.h
53009
53010
53011
53012
53013
53014
53015
53016
53017
53018
53019
53020
53021
53022
53023
53024
53025
53026
53027
53028
53029
53030
53031  case "$host_os" in
53032    mingw*)
53033                                    REPLACE_UTIME=1
53034      ;;
53035    *)
53036      ac_fn_c_check_func "$LINENO" "utime" "ac_cv_func_utime"
53037if test "x$ac_cv_func_utime" = xyes
53038then :
53039  printf "%s\n" "#define HAVE_UTIME 1" >>confdefs.h
53040
53041fi
53042
53043      if test $ac_cv_func_utime = no; then
53044        HAVE_UTIME=0
53045      else
53046                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether utime handles trailing slashes on files" >&5
53047printf %s "checking whether utime handles trailing slashes on files... " >&6; }
53048if test ${gl_cv_func_utime_file_slash+y}
53049then :
53050  printf %s "(cached) " >&6
53051else $as_nop
53052  touch conftest.tmp
53053           # Assume that if we have lstat, we can also check symlinks.
53054           if test $ac_cv_func_lstat = yes; then
53055             ln -s conftest.tmp conftest.lnk
53056           fi
53057           if test "$cross_compiling" = yes
53058then :
53059  case "$host_os" in
53060                                 # Guess yes on Linux systems.
53061                linux-* | linux) gl_cv_func_utime_file_slash="guessing yes" ;;
53062                                 # Guess yes on glibc systems.
53063                *-gnu* | gnu*)   gl_cv_func_utime_file_slash="guessing yes" ;;
53064                                 # Guess no on macOS.
53065                darwin*)         gl_cv_func_utime_file_slash="guessing no" ;;
53066                                 # If we don't know, obey --enable-cross-guesses.
53067                *)               gl_cv_func_utime_file_slash="$gl_cross_guess_normal" ;;
53068              esac
53069
53070else $as_nop
53071  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53072/* end confdefs.h.  */
53073#include <stddef.h>
53074                 #include <utime.h>
53075
53076int
53077main (void)
53078{
53079int result = 0;
53080                 if (!utime ("conftest.tmp/", NULL))
53081                   result |= 1;
53082                 #if HAVE_LSTAT
53083                 if (!utime ("conftest.lnk/", NULL))
53084                   result |= 2;
53085                 #endif
53086                 return result;
53087
53088  ;
53089  return 0;
53090}
53091_ACEOF
53092if ac_fn_c_try_run "$LINENO"
53093then :
53094  gl_cv_func_utime_file_slash=yes
53095else $as_nop
53096  gl_cv_func_utime_file_slash=no
53097fi
53098rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
53099  conftest.$ac_objext conftest.beam conftest.$ac_ext
53100fi
53101
53102           rm -f conftest.tmp conftest.lnk
53103
53104fi
53105{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_utime_file_slash" >&5
53106printf "%s\n" "$gl_cv_func_utime_file_slash" >&6; }
53107        case $gl_cv_func_stat_file_slash in
53108          *no)
53109            REPLACE_UTIME=1
53110
53111printf "%s\n" "#define REPLACE_FUNC_UTIME_FILE 1" >>confdefs.h
53112
53113            ;;
53114        esac
53115      fi
53116      ;;
53117  esac
53118
53119  if test $HAVE_UTIME = 0 || test $REPLACE_UTIME = 1; then
53120
53121
53122
53123
53124
53125
53126
53127
53128  gl_LIBOBJS="$gl_LIBOBJS utime.$ac_objext"
53129
53130    :
53131  fi
53132
53133
53134
53135
53136
53137
53138
53139
53140
53141          GL_GNULIB_UTIME=1
53142
53143
53144
53145
53146
53147printf "%s\n" "#define GNULIB_TEST_UTIME 1" >>confdefs.h
53148
53149
53150
53151
53152
53153
53154
53155
53156
53157
53158
53159
53160
53161
53162  if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
53163                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
53164printf %s "checking whether futimesat handles NULL file... " >&6; }
53165if test ${gl_cv_func_futimesat_works+y}
53166then :
53167  printf %s "(cached) " >&6
53168else $as_nop
53169  touch conftest.file
53170       if test "$cross_compiling" = yes
53171then :
53172  case "$host_os" in
53173                            # Guess yes on Linux systems.
53174           linux-* | linux) gl_cv_func_futimesat_works="guessing yes" ;;
53175                            # Guess yes on glibc systems.
53176           *-gnu*)          gl_cv_func_futimesat_works="guessing yes" ;;
53177                            # If we don't know, obey --enable-cross-guesses.
53178           *)               gl_cv_func_futimesat_works="$gl_cross_guess_normal" ;;
53179         esac
53180
53181else $as_nop
53182  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53183/* end confdefs.h.  */
53184
53185#include <stddef.h>
53186#include <sys/times.h>
53187#include <fcntl.h>
53188
53189
53190$gl_mda_defines
53191
53192int
53193main (void)
53194{
53195int fd = open ("conftest.file", O_RDWR);
53196          if (fd < 0) return 1;
53197          if (futimesat (fd, NULL, NULL)) return 2;
53198
53199  ;
53200  return 0;
53201}
53202_ACEOF
53203if ac_fn_c_try_run "$LINENO"
53204then :
53205  gl_cv_func_futimesat_works=yes
53206else $as_nop
53207  gl_cv_func_futimesat_works=no
53208fi
53209rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
53210  conftest.$ac_objext conftest.beam conftest.$ac_ext
53211fi
53212
53213      rm -f conftest.file
53214fi
53215{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
53216printf "%s\n" "$gl_cv_func_futimesat_works" >&6; }
53217    case "$gl_cv_func_futimesat_works" in
53218      *yes) ;;
53219      *)
53220
53221printf "%s\n" "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
53222
53223        ;;
53224    esac
53225  fi
53226
53227
53228
53229
53230  if test $ac_cv_func_vasnprintf = no; then
53231
53232
53233
53234
53235
53236
53237
53238
53239
53240
53241  gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
53242
53243
53244
53245
53246
53247
53248
53249
53250
53251  gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
53252
53253
53254
53255
53256
53257
53258
53259
53260
53261  gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
53262
53263
53264
53265
53266
53267
53268
53269
53270
53271  gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
53272
53273  if test $ac_cv_func_vasnprintf = yes; then
53274
53275printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
53276
53277  fi
53278
53279
53280
53281
53282
53283
53284
53285
53286
53287  ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
53288if test "x$ac_cv_type_ptrdiff_t" = xyes
53289then :
53290
53291else $as_nop
53292
53293printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
53294
53295
53296fi
53297
53298
53299
53300
53301
53302
53303
53304  fi
53305
53306
53307  ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
53308if test "x$ac_cv_func_vasprintf" = xyes
53309then :
53310  printf "%s\n" "#define HAVE_VASPRINTF 1" >>confdefs.h
53311
53312fi
53313
53314  if test $ac_cv_func_vasprintf = no; then
53315
53316
53317
53318
53319
53320
53321
53322
53323
53324  gl_LIBOBJS="$gl_LIBOBJS vasprintf.$ac_objext"
53325
53326
53327
53328
53329
53330
53331
53332
53333
53334  gl_LIBOBJS="$gl_LIBOBJS asprintf.$ac_objext"
53335
53336
53337  if test $ac_cv_func_vasprintf = yes; then
53338    REPLACE_VASPRINTF=1
53339  else
53340    HAVE_VASPRINTF=0
53341  fi
53342
53343
53344
53345
53346
53347
53348
53349
53350  fi
53351
53352
53353
53354
53355
53356
53357
53358
53359
53360
53361          GL_GNULIB_VASPRINTF=1
53362
53363
53364
53365
53366
53367printf "%s\n" "#define GNULIB_TEST_VASPRINTF 1" >>confdefs.h
53368
53369
53370
53371
53372
53373  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=asprintf:2:c-format"
53374
53375
53376
53377  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=vasprintf:2:c-format"
53378
53379
53380
53381  gl_cv_func_vsnprintf_usable=no
53382  ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
53383if test "x$ac_cv_func_vsnprintf" = xyes
53384then :
53385  printf "%s\n" "#define HAVE_VSNPRINTF 1" >>confdefs.h
53386
53387fi
53388
53389  if test $ac_cv_func_vsnprintf = yes; then
53390
53391
53392
53393  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
53394printf %s "checking whether snprintf respects a size of 1... " >&6; }
53395if test ${gl_cv_func_snprintf_size1+y}
53396then :
53397  printf %s "(cached) " >&6
53398else $as_nop
53399
53400      if test "$cross_compiling" = yes
53401then :
53402  case "$host_os" in
53403                            # Guess yes on Android.
53404           linux*-android*) gl_cv_func_snprintf_size1="guessing yes" ;;
53405                            # Guess yes on native Windows.
53406           mingw*)          gl_cv_func_snprintf_size1="guessing yes" ;;
53407           *)               gl_cv_func_snprintf_size1="guessing yes" ;;
53408         esac
53409
53410else $as_nop
53411  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53412/* end confdefs.h.  */
53413
53414#include <stdio.h>
53415#if HAVE_SNPRINTF
53416# define my_snprintf snprintf
53417#else
53418# include <stdarg.h>
53419static int my_snprintf (char *buf, int size, const char *format, ...)
53420{
53421  va_list args;
53422  int ret;
53423  va_start (args, format);
53424  ret = vsnprintf (buf, size, format, args);
53425  va_end (args);
53426  return ret;
53427}
53428#endif
53429int main()
53430{
53431  static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
53432  my_snprintf (buf, 1, "%d", 12345);
53433  return buf[1] != 'E';
53434}
53435_ACEOF
53436if ac_fn_c_try_run "$LINENO"
53437then :
53438  gl_cv_func_snprintf_size1=yes
53439else $as_nop
53440  gl_cv_func_snprintf_size1=no
53441fi
53442rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
53443  conftest.$ac_objext conftest.beam conftest.$ac_ext
53444fi
53445
53446
53447fi
53448{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
53449printf "%s\n" "$gl_cv_func_snprintf_size1" >&6; }
53450
53451    case "$gl_cv_func_snprintf_size1" in
53452      *yes)
53453
53454        case "$gl_cv_func_snprintf_retval_c99" in
53455          *yes)
53456
53457
53458     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
53459printf %s "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
53460if test ${gl_cv_func_printf_positions+y}
53461then :
53462  printf %s "(cached) " >&6
53463else $as_nop
53464
53465      if test "$cross_compiling" = yes
53466then :
53467
53468         case "$host_os" in
53469           netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
53470                            gl_cv_func_printf_positions="guessing no";;
53471           beos*)           gl_cv_func_printf_positions="guessing no";;
53472                            # Guess yes on Android.
53473           linux*-android*) gl_cv_func_printf_positions="guessing yes";;
53474                            # Guess no on native Windows.
53475           mingw* | pw*)    gl_cv_func_printf_positions="guessing no";;
53476           *)               gl_cv_func_printf_positions="guessing yes";;
53477         esac
53478
53479else $as_nop
53480  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53481/* end confdefs.h.  */
53482
53483#include <stdio.h>
53484#include <string.h>
53485/* The string "%2$d %1$d", with dollar characters protected from the shell's
53486   dollar expansion (possibly an autoconf bug).  */
53487static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
53488static char buf[100];
53489int main ()
53490{
53491  sprintf (buf, format, 33, 55);
53492  return (strcmp (buf, "55 33") != 0);
53493}
53494_ACEOF
53495if ac_fn_c_try_run "$LINENO"
53496then :
53497  gl_cv_func_printf_positions=yes
53498else $as_nop
53499  gl_cv_func_printf_positions=no
53500fi
53501rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
53502  conftest.$ac_objext conftest.beam conftest.$ac_ext
53503fi
53504
53505
53506fi
53507{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
53508printf "%s\n" "$gl_cv_func_printf_positions" >&6; }
53509
53510            case "$gl_cv_func_printf_positions" in
53511              *yes)
53512                gl_cv_func_vsnprintf_usable=yes
53513                ;;
53514            esac
53515            ;;
53516        esac
53517        ;;
53518    esac
53519  fi
53520  if test $gl_cv_func_vsnprintf_usable = no; then
53521
53522
53523
53524
53525
53526
53527
53528
53529
53530
53531  gl_LIBOBJS="$gl_LIBOBJS vsnprintf.$ac_objext"
53532
53533  if test $ac_cv_func_vsnprintf = yes; then
53534    REPLACE_VSNPRINTF=1
53535  else
53536
53537    if test $ac_cv_have_decl_vsnprintf = yes; then
53538                        REPLACE_VSNPRINTF=1
53539    fi
53540  fi
53541  :
53542
53543  fi
53544
53545  if test $ac_cv_have_decl_vsnprintf = no; then
53546    HAVE_DECL_VSNPRINTF=0
53547  fi
53548
53549
53550
53551
53552
53553
53554
53555
53556
53557
53558          GL_GNULIB_VSNPRINTF=1
53559
53560
53561
53562
53563
53564printf "%s\n" "#define GNULIB_TEST_VSNPRINTF 1" >>confdefs.h
53565
53566
53567
53568
53569
53570  ac_fn_c_check_func "$LINENO" "waitid" "ac_cv_func_waitid"
53571if test "x$ac_cv_func_waitid" = xyes
53572then :
53573  printf "%s\n" "#define HAVE_WAITID 1" >>confdefs.h
53574
53575fi
53576
53577
53578
53579
53580  HAVE_WAITPID=1
53581  case $host_os in
53582    mingw*) HAVE_WAITPID=0 ;;
53583  esac
53584
53585  if test $HAVE_WAITPID = 0; then
53586
53587
53588
53589
53590
53591
53592
53593
53594  gl_LIBOBJS="$gl_LIBOBJS waitpid.$ac_objext"
53595
53596  fi
53597
53598
53599
53600
53601
53602
53603
53604
53605
53606          GL_GNULIB_WAITPID=1
53607
53608
53609
53610
53611
53612printf "%s\n" "#define GNULIB_TEST_WAITPID 1" >>confdefs.h
53613
53614
53615
53616
53617
53618
53619
53620
53621
53622
53623
53624
53625
53626
53627
53628
53629
53630
53631
53632
53633        if case "$host_os" in
53634       mingw*) true ;;
53635       *) test $ac_cv_func_mbsinit = yes ;;
53636     esac \
53637    && test $ac_cv_func_mbrtowc = yes; then
53638
53639
53640
53641
53642     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
53643printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
53644if test ${gl_cv_func_mbrtowc_incomplete_state+y}
53645then :
53646  printf %s "(cached) " >&6
53647else $as_nop
53648
53649                  case "$host_os" in
53650                     # Guess no on AIX and OSF/1.
53651        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
53652                     # Guess yes otherwise.
53653        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
53654      esac
53655      if test $LOCALE_JA != none; then
53656        if test "$cross_compiling" = yes
53657then :
53658  :
53659else $as_nop
53660  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53661/* end confdefs.h.  */
53662
53663#include <locale.h>
53664#include <string.h>
53665#include <wchar.h>
53666int main ()
53667{
53668  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
53669    {
53670      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
53671      mbstate_t state;
53672      wchar_t wc;
53673
53674      memset (&state, '\0', sizeof (mbstate_t));
53675      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
53676        if (mbsinit (&state))
53677          return 2;
53678    }
53679  return 0;
53680}
53681_ACEOF
53682if ac_fn_c_try_run "$LINENO"
53683then :
53684  gl_cv_func_mbrtowc_incomplete_state=yes
53685else $as_nop
53686  gl_cv_func_mbrtowc_incomplete_state=no
53687fi
53688rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
53689  conftest.$ac_objext conftest.beam conftest.$ac_ext
53690fi
53691
53692      else
53693        if test $LOCALE_FR_UTF8 != none; then
53694          if test "$cross_compiling" = yes
53695then :
53696  :
53697else $as_nop
53698  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53699/* end confdefs.h.  */
53700
53701#include <locale.h>
53702#include <string.h>
53703#include <wchar.h>
53704int main ()
53705{
53706  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
53707    {
53708      const char input[] = "B\303\274\303\237er"; /* "Büßer" */
53709      mbstate_t state;
53710      wchar_t wc;
53711
53712      memset (&state, '\0', sizeof (mbstate_t));
53713      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
53714        if (mbsinit (&state))
53715          return 2;
53716    }
53717  return 0;
53718}
53719_ACEOF
53720if ac_fn_c_try_run "$LINENO"
53721then :
53722  gl_cv_func_mbrtowc_incomplete_state=yes
53723else $as_nop
53724  gl_cv_func_mbrtowc_incomplete_state=no
53725fi
53726rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
53727  conftest.$ac_objext conftest.beam conftest.$ac_ext
53728fi
53729
53730        fi
53731      fi
53732
53733fi
53734{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
53735printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
53736
53737
53738
53739
53740     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
53741printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
53742if test ${gl_cv_func_mbrtowc_sanitycheck+y}
53743then :
53744  printf %s "(cached) " >&6
53745else $as_nop
53746
53747                  case "$host_os" in
53748                    # Guess no on Solaris 8.
53749        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
53750                    # Guess yes otherwise.
53751        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
53752      esac
53753      if test $LOCALE_ZH_CN != none; then
53754        if test "$cross_compiling" = yes
53755then :
53756  :
53757else $as_nop
53758  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53759/* end confdefs.h.  */
53760
53761#include <locale.h>
53762#include <stdlib.h>
53763#include <string.h>
53764#include <wchar.h>
53765int main ()
53766{
53767  /* This fails on Solaris 8:
53768     mbrtowc returns 2, and sets wc to 0x00F0.
53769     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
53770  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
53771    {
53772      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
53773      mbstate_t state;
53774      wchar_t wc;
53775
53776      memset (&state, '\0', sizeof (mbstate_t));
53777      if (mbrtowc (&wc, input + 3, 6, &state) != 4
53778          && mbtowc (&wc, input + 3, 6) == 4)
53779        return 2;
53780    }
53781  return 0;
53782}
53783_ACEOF
53784if ac_fn_c_try_run "$LINENO"
53785then :
53786  gl_cv_func_mbrtowc_sanitycheck=yes
53787else $as_nop
53788  gl_cv_func_mbrtowc_sanitycheck=no
53789fi
53790rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
53791  conftest.$ac_objext conftest.beam conftest.$ac_ext
53792fi
53793
53794      fi
53795
53796fi
53797{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
53798printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
53799
53800    REPLACE_MBSTATE_T=0
53801    case "$gl_cv_func_mbrtowc_incomplete_state" in
53802      *yes) ;;
53803      *) REPLACE_MBSTATE_T=1 ;;
53804    esac
53805    case "$gl_cv_func_mbrtowc_sanitycheck" in
53806      *yes) ;;
53807      *) REPLACE_MBSTATE_T=1 ;;
53808    esac
53809  else
53810    REPLACE_MBSTATE_T=1
53811  fi
53812
53813
53814
53815  if test $ac_cv_func_wcrtomb = no; then
53816    HAVE_WCRTOMB=0
53817    ac_fn_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" "
53818      #include <wchar.h>
53819
53820" "$ac_c_undeclared_builtin_options" "CFLAGS"
53821if test "x$ac_cv_have_decl_wcrtomb" = xyes
53822then :
53823  ac_have_decl=1
53824else $as_nop
53825  ac_have_decl=0
53826fi
53827printf "%s\n" "#define HAVE_DECL_WCRTOMB $ac_have_decl" >>confdefs.h
53828
53829    if test $ac_cv_have_decl_wcrtomb = yes; then
53830                        REPLACE_WCRTOMB=1
53831    fi
53832  else
53833                        if test $REPLACE_WCRTOMB = 0; then
53834
53835
53836
53837
53838
53839             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb works in the C locale" >&5
53840printf %s "checking whether wcrtomb works in the C locale... " >&6; }
53841if test ${gl_cv_func_wcrtomb_works+y}
53842then :
53843  printf %s "(cached) " >&6
53844else $as_nop
53845  if test "$cross_compiling" = yes
53846then :
53847  case "$host_os" in
53848                               # Guess no on Android.
53849              linux*-android*) gl_cv_func_wcrtomb_works="guessing no";;
53850                               # Guess yes otherwise.
53851              *)               gl_cv_func_wcrtomb_works="guessing yes";;
53852            esac
53853
53854else $as_nop
53855  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53856/* end confdefs.h.  */
53857
53858#include <string.h>
53859#include <stdlib.h>
53860#include <wchar.h>
53861int main ()
53862{
53863  mbstate_t state;
53864  char out[64];
53865  int count;
53866  memset (&state, 0, sizeof (state));
53867  out[0] = 'x';
53868  count = wcrtomb (out, L'a', &state);
53869  return !(count == 1 && out[0] == 'a');
53870}
53871_ACEOF
53872if ac_fn_c_try_run "$LINENO"
53873then :
53874  gl_cv_func_wcrtomb_works=yes
53875else $as_nop
53876  gl_cv_func_wcrtomb_works=no
53877fi
53878rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
53879  conftest.$ac_objext conftest.beam conftest.$ac_ext
53880fi
53881
53882
53883fi
53884{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_works" >&5
53885printf "%s\n" "$gl_cv_func_wcrtomb_works" >&6; }
53886      case "$gl_cv_func_wcrtomb_works" in
53887        *yes) ;;
53888        *)
53889printf "%s\n" "#define WCRTOMB_C_LOCALE_BUG 1" >>confdefs.h
53890
53891           REPLACE_WCRTOMB=1 ;;
53892      esac
53893    fi
53894    if test $REPLACE_WCRTOMB = 0; then
53895      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
53896printf %s "checking whether wcrtomb return value is correct... " >&6; }
53897if test ${gl_cv_func_wcrtomb_retval+y}
53898then :
53899  printf %s "(cached) " >&6
53900else $as_nop
53901
53902                              case "$host_os" in
53903            # Guess no on AIX 4, OSF/1, Solaris, native Windows.
53904            aix4* | osf* | solaris* | mingw*) gl_cv_func_wcrtomb_retval="guessing no" ;;
53905            # Guess yes otherwise.
53906            *)                                gl_cv_func_wcrtomb_retval="guessing yes" ;;
53907          esac
53908          if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
53909            if test "$cross_compiling" = yes
53910then :
53911  :
53912else $as_nop
53913  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53914/* end confdefs.h.  */
53915
53916#include <locale.h>
53917#include <string.h>
53918#include <wchar.h>
53919#include <stdlib.h>
53920int main ()
53921{
53922  int result = 0;
53923  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
53924    {
53925      if (wcrtomb (NULL, 0, NULL) != 1)
53926        result |= 1;
53927    }
53928  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
53929    {
53930      if (wcrtomb (NULL, 0, NULL) != 1)
53931        result |= 2;
53932      {
53933        wchar_t wc = (wchar_t) 0xBADFACE;
53934        if (mbtowc (&wc, "\303\274", 2) == 2)
53935          if (wcrtomb (NULL, wc, NULL) != 1)
53936            result |= 2;
53937      }
53938    }
53939  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
53940    {
53941      if (wcrtomb (NULL, 0, NULL) != 1)
53942        result |= 4;
53943    }
53944  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
53945    {
53946      if (wcrtomb (NULL, 0, NULL) != 1)
53947        result |= 8;
53948    }
53949  return result;
53950}
53951_ACEOF
53952if ac_fn_c_try_run "$LINENO"
53953then :
53954  gl_cv_func_wcrtomb_retval=yes
53955else $as_nop
53956  gl_cv_func_wcrtomb_retval=no
53957fi
53958rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
53959  conftest.$ac_objext conftest.beam conftest.$ac_ext
53960fi
53961
53962          fi
53963
53964fi
53965{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
53966printf "%s\n" "$gl_cv_func_wcrtomb_retval" >&6; }
53967      case "$gl_cv_func_wcrtomb_retval" in
53968        *yes) ;;
53969        *)
53970printf "%s\n" "#define WCRTOMB_RETVAL_BUG 1" >>confdefs.h
53971
53972           REPLACE_WCRTOMB=1 ;;
53973      esac
53974    fi
53975  fi
53976
53977  if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
53978
53979
53980
53981
53982
53983
53984
53985
53986  gl_LIBOBJS="$gl_LIBOBJS wcrtomb.$ac_objext"
53987
53988
53989  :
53990
53991  fi
53992
53993
53994
53995
53996
53997
53998
53999
54000
54001          GL_GNULIB_WCRTOMB=1
54002
54003
54004
54005
54006
54007printf "%s\n" "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
54008
54009
54010
54011
54012
54013
54014
54015
54016
54017
54018
54019
54020
54021
54022
54023
54024
54025
54026
54027
54028  ac_fn_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" "
54029    #include <wchar.h>
54030
54031" "$ac_c_undeclared_builtin_options" "CFLAGS"
54032if test "x$ac_cv_have_decl_wcwidth" = xyes
54033then :
54034  ac_have_decl=1
54035else $as_nop
54036  ac_have_decl=0
54037fi
54038printf "%s\n" "#define HAVE_DECL_WCWIDTH $ac_have_decl" >>confdefs.h
54039
54040  if test $ac_cv_have_decl_wcwidth != yes; then
54041    HAVE_DECL_WCWIDTH=0
54042  fi
54043
54044  if test $ac_cv_func_wcwidth != yes; then
54045    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcwidth is a macro" >&5
54046printf %s "checking whether wcwidth is a macro... " >&6; }
54047if test ${gl_cv_func_wcwidth_macro+y}
54048then :
54049  printf %s "(cached) " >&6
54050else $as_nop
54051  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54052/* end confdefs.h.  */
54053
54054#include <wchar.h>
54055#ifdef wcwidth
54056 wchar_header_defines_wcwidth
54057#endif
54058_ACEOF
54059if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
54060  $EGREP "wchar_header_defines_wcwidth" >/dev/null 2>&1
54061then :
54062  gl_cv_func_wcwidth_macro=yes
54063else $as_nop
54064  gl_cv_func_wcwidth_macro=no
54065fi
54066rm -rf conftest*
54067
54068
54069fi
54070{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_macro" >&5
54071printf "%s\n" "$gl_cv_func_wcwidth_macro" >&6; }
54072  fi
54073
54074  if test $ac_cv_func_wcwidth = yes || test $gl_cv_func_wcwidth_macro = yes; then
54075    HAVE_WCWIDTH=1
54076                                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
54077printf %s "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
54078if test ${gl_cv_func_wcwidth_works+y}
54079then :
54080  printf %s "(cached) " >&6
54081else $as_nop
54082
54083        if test "$cross_compiling" = yes
54084then :
54085
54086           case "$host_os" in
54087                            # Guess yes on glibc systems.
54088             *-gnu* | gnu*) gl_cv_func_wcwidth_works="guessing yes";;
54089                            # Guess yes on musl systems.
54090             *-musl*)       gl_cv_func_wcwidth_works="guessing yes";;
54091                            # Guess yes on AIX 7 systems.
54092             aix[7-9]*)     gl_cv_func_wcwidth_works="guessing yes";;
54093             *)             gl_cv_func_wcwidth_works="$gl_cross_guess_normal";;
54094           esac
54095
54096else $as_nop
54097  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54098/* end confdefs.h.  */
54099
54100#include <locale.h>
54101#include <wchar.h>
54102#if !HAVE_DECL_WCWIDTH
54103extern
54104# ifdef __cplusplus
54105"C"
54106# endif
54107int wcwidth (int);
54108#endif
54109int main ()
54110{
54111  int result = 0;
54112  if (setlocale (LC_ALL, "en_US.UTF-8") != NULL)
54113    {
54114      if (wcwidth (0x0301) > 0)
54115        result |= 1;
54116      if (wcwidth (0x05B0) > 0)
54117        result |= 2;
54118      if (wcwidth (0x200B) > 0)
54119        result |= 4;
54120      if (wcwidth (0xFF1A) == 0)
54121        result |= 8;
54122      if (wcwidth (0x2202) > 1)
54123        result |= 16;
54124    }
54125  return result;
54126}
54127_ACEOF
54128if ac_fn_c_try_run "$LINENO"
54129then :
54130  gl_cv_func_wcwidth_works=yes
54131else $as_nop
54132  gl_cv_func_wcwidth_works=no
54133fi
54134rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
54135  conftest.$ac_objext conftest.beam conftest.$ac_ext
54136fi
54137
54138
54139fi
54140{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5
54141printf "%s\n" "$gl_cv_func_wcwidth_works" >&6; }
54142    case "$gl_cv_func_wcwidth_works" in
54143      *yes) ;;
54144      *no) REPLACE_WCWIDTH=1 ;;
54145    esac
54146  else
54147    HAVE_WCWIDTH=0
54148  fi
54149
54150  if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then
54151
54152
54153
54154
54155
54156
54157
54158
54159  gl_LIBOBJS="$gl_LIBOBJS wcwidth.$ac_objext"
54160
54161
54162
54163  :
54164
54165  fi
54166
54167
54168
54169
54170
54171
54172
54173
54174
54175          GL_GNULIB_WCWIDTH=1
54176
54177
54178
54179
54180
54181printf "%s\n" "#define GNULIB_TEST_WCWIDTH 1" >>confdefs.h
54182
54183
54184
54185
54186  case "$host_os" in
54187    mingw*)
54188
54189
54190
54191
54192
54193
54194
54195
54196  gl_LIBOBJS="$gl_LIBOBJS windows-mutex.$ac_objext"
54197
54198      ;;
54199  esac
54200
54201  case "$host_os" in
54202    mingw*)
54203
54204
54205
54206
54207
54208
54209
54210
54211  gl_LIBOBJS="$gl_LIBOBJS windows-once.$ac_objext"
54212
54213      ;;
54214  esac
54215
54216  case "$host_os" in
54217    mingw*)
54218
54219
54220
54221
54222
54223
54224
54225
54226  gl_LIBOBJS="$gl_LIBOBJS windows-recmutex.$ac_objext"
54227
54228      ;;
54229  esac
54230
54231  case "$host_os" in
54232    mingw*)
54233
54234
54235
54236
54237
54238
54239
54240
54241  gl_LIBOBJS="$gl_LIBOBJS windows-rwlock.$ac_objext"
54242
54243      ;;
54244  esac
54245
54246  case "$host_os" in
54247    mingw*)
54248
54249
54250
54251
54252
54253
54254
54255
54256  gl_LIBOBJS="$gl_LIBOBJS windows-spawn.$ac_objext"
54257
54258      ;;
54259  esac
54260
54261
54262      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wmemchr" >&5
54263printf %s "checking for wmemchr... " >&6; }
54264if test ${gl_cv_func_wmemchr+y}
54265then :
54266  printf %s "(cached) " >&6
54267else $as_nop
54268  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54269/* end confdefs.h.  */
54270#include <wchar.h>
54271
54272int
54273main (void)
54274{
54275return ! wmemchr ((const wchar_t *) 0, (wchar_t) ' ', 0);
54276  ;
54277  return 0;
54278}
54279
54280_ACEOF
54281if ac_fn_c_try_link "$LINENO"
54282then :
54283  gl_cv_func_wmemchr=yes
54284else $as_nop
54285  gl_cv_func_wmemchr=no
54286fi
54287rm -f core conftest.err conftest.$ac_objext conftest.beam \
54288    conftest$ac_exeext conftest.$ac_ext
54289
54290fi
54291{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wmemchr" >&5
54292printf "%s\n" "$gl_cv_func_wmemchr" >&6; }
54293  if test $gl_cv_func_wmemchr = no; then
54294    HAVE_WMEMCHR=0
54295  fi
54296
54297  if test $HAVE_WMEMCHR = 0; then
54298
54299
54300
54301
54302
54303
54304
54305
54306  gl_LIBOBJS="$gl_LIBOBJS wmemchr.$ac_objext"
54307
54308  fi
54309
54310
54311
54312
54313
54314
54315
54316
54317
54318          GL_GNULIB_WMEMCHR=1
54319
54320
54321
54322
54323
54324printf "%s\n" "#define GNULIB_TEST_WMEMCHR 1" >>confdefs.h
54325
54326
54327
54328
54329
54330
54331
54332
54333
54334
54335
54336  if test $ac_cv_func_wmempcpy = no; then
54337    HAVE_WMEMPCPY=0
54338  fi
54339
54340  if test $HAVE_WMEMPCPY = 0; then
54341
54342
54343
54344
54345
54346
54347
54348
54349  gl_LIBOBJS="$gl_LIBOBJS wmempcpy.$ac_objext"
54350
54351  fi
54352
54353
54354
54355
54356
54357
54358
54359
54360
54361          GL_GNULIB_WMEMPCPY=1
54362
54363
54364
54365
54366
54367printf "%s\n" "#define GNULIB_TEST_WMEMPCPY 1" >>confdefs.h
54368
54369
54370
54371
54372
54373
54374
54375    if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
54376      REPLACE_WRITE=1
54377    fi
54378
54379
54380
54381
54382
54383    if test $gl_cv_header_signal_h_SIGPIPE != yes; then
54384      REPLACE_WRITE=1
54385    fi
54386
54387
54388
54389  if test $REPLACE_WRITE = 1; then
54390
54391
54392
54393
54394
54395
54396
54397
54398  gl_LIBOBJS="$gl_LIBOBJS write.$ac_objext"
54399
54400    :
54401  fi
54402
54403
54404
54405
54406
54407
54408
54409
54410
54411          GL_GNULIB_WRITE=1
54412
54413
54414
54415
54416
54417printf "%s\n" "#define GNULIB_TEST_WRITE 1" >>confdefs.h
54418
54419
54420
54421  :
54422
54423
54424printf "%s\n" "#define GNULIB_XALLOC 1" >>confdefs.h
54425
54426
54427
54428
54429printf "%s\n" "#define GNULIB_XALLOC_DIE 1" >>confdefs.h
54430
54431
54432
54433
54434  ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
54435if test "x$ac_cv_header_stdint_h" = xyes
54436then :
54437  printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
54438
54439fi
54440
54441
54442
54443
54444  :
54445
54446
54447  # End of code from modules
54448
54449
54450
54451
54452
54453
54454
54455
54456
54457
54458
54459  gltests_libdeps=
54460  gltests_ltlibdeps=
54461
54462
54463
54464
54465
54466
54467
54468
54469
54470
54471
54472
54473  gl_source_base='lib/tests'
54474  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
54475
54476  gl_module_indicator_condition=$gltests_WITNESS
54477
54478
54479
54480
54481
54482
54483
54484
54485
54486
54487
54488  LIBGNU_LIBDEPS="$gl_libdeps"
54489
54490  LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
54491
54492
54493
54494
54495
54496
54497
54498
54499
54500
54501
54502
54503
54504
54505
54506
54507
54508	# allow to override gcov location
54509
54510# Check whether --with-gcov was given.
54511if test ${with_gcov+y}
54512then :
54513  withval=$with_gcov; _AX_CODE_COVERAGE_GCOV_PROG_WITH=$with_gcov
54514else $as_nop
54515  _AX_CODE_COVERAGE_GCOV_PROG_WITH=gcov
54516fi
54517
54518
54519	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build with code coverage support" >&5
54520printf %s "checking whether to build with code coverage support... " >&6; }
54521	# Check whether --enable-code-coverage was given.
54522if test ${enable_code_coverage+y}
54523then :
54524  enableval=$enable_code_coverage;
54525else $as_nop
54526  enable_code_coverage=no
54527fi
54528
54529
54530	 if test "x$enable_code_coverage" = xyes; then
54531  CODE_COVERAGE_ENABLED_TRUE=
54532  CODE_COVERAGE_ENABLED_FALSE='#'
54533else
54534  CODE_COVERAGE_ENABLED_TRUE='#'
54535  CODE_COVERAGE_ENABLED_FALSE=
54536fi
54537
54538	CODE_COVERAGE_ENABLED=$enable_code_coverage
54539
54540	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_code_coverage" >&5
54541printf "%s\n" "$enable_code_coverage" >&6; }
54542
54543	if  test "x$enable_code_coverage" = xyes
54544then :
54545
54546
54547	  for ac_prog in gawk mawk nawk awk
54548do
54549  # Extract the first word of "$ac_prog", so it can be a program name with args.
54550set dummy $ac_prog; ac_word=$2
54551{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
54552printf %s "checking for $ac_word... " >&6; }
54553if test ${ac_cv_prog_AWK+y}
54554then :
54555  printf %s "(cached) " >&6
54556else $as_nop
54557  if test -n "$AWK"; then
54558  ac_cv_prog_AWK="$AWK" # Let the user override the test.
54559else
54560as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
54561for as_dir in $PATH
54562do
54563  IFS=$as_save_IFS
54564  case $as_dir in #(((
54565    '') as_dir=./ ;;
54566    */) ;;
54567    *) as_dir=$as_dir/ ;;
54568  esac
54569    for ac_exec_ext in '' $ac_executable_extensions; do
54570  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
54571    ac_cv_prog_AWK="$ac_prog"
54572    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
54573    break 2
54574  fi
54575done
54576  done
54577IFS=$as_save_IFS
54578
54579fi
54580fi
54581AWK=$ac_cv_prog_AWK
54582if test -n "$AWK"; then
54583  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
54584printf "%s\n" "$AWK" >&6; }
54585else
54586  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
54587printf "%s\n" "no" >&6; }
54588fi
54589
54590
54591  test -n "$AWK" && break
54592done
54593
54594  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5
54595printf %s "checking for GNU make... " >&6; }
54596if test ${_cv_gnu_make_command+y}
54597then :
54598  printf %s "(cached) " >&6
54599else $as_nop
54600      _cv_gnu_make_command="" ;
54601    for a in "$MAKE" make gmake gnumake ; do
54602      if test -z "$a" ; then continue ; fi ;
54603      if "$a" --version 2> /dev/null | grep GNU 2>&1 > /dev/null ; then
54604        _cv_gnu_make_command=$a ;
54605        AX_CHECK_GNU_MAKE_HEADLINE=$("$a" --version 2> /dev/null | grep "GNU Make")
54606        ax_check_gnu_make_version=$(echo ${AX_CHECK_GNU_MAKE_HEADLINE} | ${AWK} -F " " '{ print $(NF); }')
54607        break ;
54608      fi
54609    done ;
54610fi
54611{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $_cv_gnu_make_command" >&5
54612printf "%s\n" "$_cv_gnu_make_command" >&6; }
54613  if test "x$_cv_gnu_make_command" = x""
54614then :
54615  ifGNUmake="#"
54616else $as_nop
54617  ifGNUmake=""
54618fi
54619  if test "x$_cv_gnu_make_command" = x""
54620then :
54621  ifnGNUmake=""
54622else $as_nop
54623  ifnGNUmake="#"
54624fi
54625  if test "x$_cv_gnu_make_command" = x""
54626then :
54627  { ax_cv_gnu_make_command=; unset ax_cv_gnu_make_command;}
54628else $as_nop
54629  ax_cv_gnu_make_command=${_cv_gnu_make_command}
54630fi
54631  if test "x$_cv_gnu_make_command" = x""
54632then :
54633  as_fn_error $? "not using GNU make that is needed for coverage" "$LINENO" 5
54634fi
54635
54636
54637
54638
54639	# check for gcov
54640	if test -n "$ac_tool_prefix"; then
54641  # Extract the first word of "${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH", so it can be a program name with args.
54642set dummy ${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH; ac_word=$2
54643{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
54644printf %s "checking for $ac_word... " >&6; }
54645if test ${ac_cv_prog_GCOV+y}
54646then :
54647  printf %s "(cached) " >&6
54648else $as_nop
54649  if test -n "$GCOV"; then
54650  ac_cv_prog_GCOV="$GCOV" # Let the user override the test.
54651else
54652as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
54653for as_dir in $PATH
54654do
54655  IFS=$as_save_IFS
54656  case $as_dir in #(((
54657    '') as_dir=./ ;;
54658    */) ;;
54659    *) as_dir=$as_dir/ ;;
54660  esac
54661    for ac_exec_ext in '' $ac_executable_extensions; do
54662  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
54663    ac_cv_prog_GCOV="${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH"
54664    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
54665    break 2
54666  fi
54667done
54668  done
54669IFS=$as_save_IFS
54670
54671fi
54672fi
54673GCOV=$ac_cv_prog_GCOV
54674if test -n "$GCOV"; then
54675  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
54676printf "%s\n" "$GCOV" >&6; }
54677else
54678  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
54679printf "%s\n" "no" >&6; }
54680fi
54681
54682
54683fi
54684if test -z "$ac_cv_prog_GCOV"; then
54685  ac_ct_GCOV=$GCOV
54686  # Extract the first word of "$_AX_CODE_COVERAGE_GCOV_PROG_WITH", so it can be a program name with args.
54687set dummy $_AX_CODE_COVERAGE_GCOV_PROG_WITH; ac_word=$2
54688{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
54689printf %s "checking for $ac_word... " >&6; }
54690if test ${ac_cv_prog_ac_ct_GCOV+y}
54691then :
54692  printf %s "(cached) " >&6
54693else $as_nop
54694  if test -n "$ac_ct_GCOV"; then
54695  ac_cv_prog_ac_ct_GCOV="$ac_ct_GCOV" # Let the user override the test.
54696else
54697as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
54698for as_dir in $PATH
54699do
54700  IFS=$as_save_IFS
54701  case $as_dir in #(((
54702    '') as_dir=./ ;;
54703    */) ;;
54704    *) as_dir=$as_dir/ ;;
54705  esac
54706    for ac_exec_ext in '' $ac_executable_extensions; do
54707  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
54708    ac_cv_prog_ac_ct_GCOV="$_AX_CODE_COVERAGE_GCOV_PROG_WITH"
54709    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
54710    break 2
54711  fi
54712done
54713  done
54714IFS=$as_save_IFS
54715
54716fi
54717fi
54718ac_ct_GCOV=$ac_cv_prog_ac_ct_GCOV
54719if test -n "$ac_ct_GCOV"; then
54720  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GCOV" >&5
54721printf "%s\n" "$ac_ct_GCOV" >&6; }
54722else
54723  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
54724printf "%s\n" "no" >&6; }
54725fi
54726
54727  if test "x$ac_ct_GCOV" = x; then
54728    GCOV=":"
54729  else
54730    case $cross_compiling:$ac_tool_warned in
54731yes:)
54732{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
54733printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
54734ac_tool_warned=yes ;;
54735esac
54736    GCOV=$ac_ct_GCOV
54737  fi
54738else
54739  GCOV="$ac_cv_prog_GCOV"
54740fi
54741
54742	if test "X$GCOV" = "X:"
54743then :
54744  as_fn_error $? "gcov is needed to do coverage" "$LINENO" 5
54745fi
54746
54747
54748		if  test "$GCC" = "no"
54749then :
54750
54751		as_fn_error $? "not compiling with gcc, which is required for gcov code coverage" "$LINENO" 5
54752
54753fi
54754
54755	# Extract the first word of "lcov", so it can be a program name with args.
54756set dummy lcov; ac_word=$2
54757{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
54758printf %s "checking for $ac_word... " >&6; }
54759if test ${ac_cv_prog_LCOV+y}
54760then :
54761  printf %s "(cached) " >&6
54762else $as_nop
54763  if test -n "$LCOV"; then
54764  ac_cv_prog_LCOV="$LCOV" # Let the user override the test.
54765else
54766as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
54767for as_dir in $PATH
54768do
54769  IFS=$as_save_IFS
54770  case $as_dir in #(((
54771    '') as_dir=./ ;;
54772    */) ;;
54773    *) as_dir=$as_dir/ ;;
54774  esac
54775    for ac_exec_ext in '' $ac_executable_extensions; do
54776  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
54777    ac_cv_prog_LCOV="lcov"
54778    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
54779    break 2
54780  fi
54781done
54782  done
54783IFS=$as_save_IFS
54784
54785fi
54786fi
54787LCOV=$ac_cv_prog_LCOV
54788if test -n "$LCOV"; then
54789  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
54790printf "%s\n" "$LCOV" >&6; }
54791else
54792  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
54793printf "%s\n" "no" >&6; }
54794fi
54795
54796
54797	# Extract the first word of "genhtml", so it can be a program name with args.
54798set dummy genhtml; ac_word=$2
54799{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
54800printf %s "checking for $ac_word... " >&6; }
54801if test ${ac_cv_prog_GENHTML+y}
54802then :
54803  printf %s "(cached) " >&6
54804else $as_nop
54805  if test -n "$GENHTML"; then
54806  ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test.
54807else
54808as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
54809for as_dir in $PATH
54810do
54811  IFS=$as_save_IFS
54812  case $as_dir in #(((
54813    '') as_dir=./ ;;
54814    */) ;;
54815    *) as_dir=$as_dir/ ;;
54816  esac
54817    for ac_exec_ext in '' $ac_executable_extensions; do
54818  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
54819    ac_cv_prog_GENHTML="genhtml"
54820    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
54821    break 2
54822  fi
54823done
54824  done
54825IFS=$as_save_IFS
54826
54827fi
54828fi
54829GENHTML=$ac_cv_prog_GENHTML
54830if test -n "$GENHTML"; then
54831  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
54832printf "%s\n" "$GENHTML" >&6; }
54833else
54834  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
54835printf "%s\n" "no" >&6; }
54836fi
54837
54838
54839
54840	if  test x"$LCOV" = x
54841then :
54842
54843		as_fn_error $? "To enable code coverage reporting you must have lcov installed" "$LINENO" 5
54844
54845fi
54846
54847	if  test x"$GENHTML" = x
54848then :
54849
54850		as_fn_error $? "Could not find genhtml from the lcov package" "$LINENO" 5
54851
54852fi
54853
54854			CODE_COVERAGE_CPPFLAGS="-DNDEBUG"
54855	CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
54856	CODE_COVERAGE_CXXFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
54857	CODE_COVERAGE_LIBS="-lgcov"
54858
54859
54860
54861
54862
54863
54864
54865fi
54866
54867
54868
54869
54870
54871
54872
54873
54874
54875
54876
54877
54878
54879
54880
54881{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
54882printf %s "checking for working mmap... " >&6; }
54883if test ${ac_cv_func_mmap_fixed_mapped+y}
54884then :
54885  printf %s "(cached) " >&6
54886else $as_nop
54887  if test "$cross_compiling" = yes
54888then :
54889  case "$host_os" in # ((
54890			  # Guess yes on platforms where we know the result.
54891		  linux*) ac_cv_func_mmap_fixed_mapped=yes ;;
54892			  # If we don't know, assume the worst.
54893		  *)      ac_cv_func_mmap_fixed_mapped=no ;;
54894		esac
54895else $as_nop
54896  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54897/* end confdefs.h.  */
54898$ac_includes_default
54899/* malloc might have been renamed as rpl_malloc. */
54900#undef malloc
54901
54902/* Thanks to Mike Haertel and Jim Avera for this test.
54903   Here is a matrix of mmap possibilities:
54904	mmap private not fixed
54905	mmap private fixed at somewhere currently unmapped
54906	mmap private fixed at somewhere already mapped
54907	mmap shared not fixed
54908	mmap shared fixed at somewhere currently unmapped
54909	mmap shared fixed at somewhere already mapped
54910   For private mappings, we should verify that changes cannot be read()
54911   back from the file, nor mmap's back from the file at a different
54912   address.  (There have been systems where private was not correctly
54913   implemented like the infamous i386 svr4.0, and systems where the
54914   VM page cache was not coherent with the file system buffer cache
54915   like early versions of FreeBSD and possibly contemporary NetBSD.)
54916   For shared mappings, we should conversely verify that changes get
54917   propagated back to all the places they're supposed to be.
54918
54919   Grep wants private fixed already mapped.
54920   The main things grep needs to know about mmap are:
54921   * does it exist and is it safe to write into the mmap'd area
54922   * how to use it (BSD variants)  */
54923
54924#include <fcntl.h>
54925#include <sys/mman.h>
54926
54927/* This mess was copied from the GNU getpagesize.h.  */
54928#ifndef HAVE_GETPAGESIZE
54929# ifdef _SC_PAGESIZE
54930#  define getpagesize() sysconf(_SC_PAGESIZE)
54931# else /* no _SC_PAGESIZE */
54932#  ifdef HAVE_SYS_PARAM_H
54933#   include <sys/param.h>
54934#   ifdef EXEC_PAGESIZE
54935#    define getpagesize() EXEC_PAGESIZE
54936#   else /* no EXEC_PAGESIZE */
54937#    ifdef NBPG
54938#     define getpagesize() NBPG * CLSIZE
54939#     ifndef CLSIZE
54940#      define CLSIZE 1
54941#     endif /* no CLSIZE */
54942#    else /* no NBPG */
54943#     ifdef NBPC
54944#      define getpagesize() NBPC
54945#     else /* no NBPC */
54946#      ifdef PAGESIZE
54947#       define getpagesize() PAGESIZE
54948#      endif /* PAGESIZE */
54949#     endif /* no NBPC */
54950#    endif /* no NBPG */
54951#   endif /* no EXEC_PAGESIZE */
54952#  else /* no HAVE_SYS_PARAM_H */
54953#   define getpagesize() 8192	/* punt totally */
54954#  endif /* no HAVE_SYS_PARAM_H */
54955# endif /* no _SC_PAGESIZE */
54956
54957#endif /* no HAVE_GETPAGESIZE */
54958
54959int
54960main (void)
54961{
54962  char *data, *data2, *data3;
54963  const char *cdata2;
54964  int i, pagesize;
54965  int fd, fd2;
54966
54967  pagesize = getpagesize ();
54968
54969  /* First, make a file with some known garbage in it. */
54970  data = (char *) malloc (pagesize);
54971  if (!data)
54972    return 1;
54973  for (i = 0; i < pagesize; ++i)
54974    *(data + i) = rand ();
54975  umask (0);
54976  fd = creat ("conftest.mmap", 0600);
54977  if (fd < 0)
54978    return 2;
54979  if (write (fd, data, pagesize) != pagesize)
54980    return 3;
54981  close (fd);
54982
54983  /* Next, check that the tail of a page is zero-filled.  File must have
54984     non-zero length, otherwise we risk SIGBUS for entire page.  */
54985  fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
54986  if (fd2 < 0)
54987    return 4;
54988  cdata2 = "";
54989  if (write (fd2, cdata2, 1) != 1)
54990    return 5;
54991  data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
54992  if (data2 == MAP_FAILED)
54993    return 6;
54994  for (i = 0; i < pagesize; ++i)
54995    if (*(data2 + i))
54996      return 7;
54997  close (fd2);
54998  if (munmap (data2, pagesize))
54999    return 8;
55000
55001  /* Next, try to mmap the file at a fixed address which already has
55002     something else allocated at it.  If we can, also make sure that
55003     we see the same garbage.  */
55004  fd = open ("conftest.mmap", O_RDWR);
55005  if (fd < 0)
55006    return 9;
55007  if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
55008		     MAP_PRIVATE | MAP_FIXED, fd, 0L))
55009    return 10;
55010  for (i = 0; i < pagesize; ++i)
55011    if (*(data + i) != *(data2 + i))
55012      return 11;
55013
55014  /* Finally, make sure that changes to the mapped area do not
55015     percolate back to the file as seen by read().  (This is a bug on
55016     some variants of i386 svr4.0.)  */
55017  for (i = 0; i < pagesize; ++i)
55018    *(data2 + i) = *(data2 + i) + 1;
55019  data3 = (char *) malloc (pagesize);
55020  if (!data3)
55021    return 12;
55022  if (read (fd, data3, pagesize) != pagesize)
55023    return 13;
55024  for (i = 0; i < pagesize; ++i)
55025    if (*(data + i) != *(data3 + i))
55026      return 14;
55027  close (fd);
55028  free (data);
55029  free (data3);
55030  return 0;
55031}
55032_ACEOF
55033if ac_fn_c_try_run "$LINENO"
55034then :
55035  ac_cv_func_mmap_fixed_mapped=yes
55036else $as_nop
55037  ac_cv_func_mmap_fixed_mapped=no
55038fi
55039rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
55040  conftest.$ac_objext conftest.beam conftest.$ac_ext
55041fi
55042
55043fi
55044{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
55045printf "%s\n" "$ac_cv_func_mmap_fixed_mapped" >&6; }
55046if test $ac_cv_func_mmap_fixed_mapped = yes; then
55047
55048printf "%s\n" "#define HAVE_MMAP 1" >>confdefs.h
55049
55050fi
55051rm -f conftest.mmap conftest.txt
55052
55053{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
55054printf %s "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
55055if test ${ac_cv_sys_largefile_source+y}
55056then :
55057  printf %s "(cached) " >&6
55058else $as_nop
55059  while :; do
55060  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55061/* end confdefs.h.  */
55062#include <sys/types.h> /* for off_t */
55063     #include <stdio.h>
55064int
55065main (void)
55066{
55067int (*fp) (FILE *, off_t, int) = fseeko;
55068     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
55069  ;
55070  return 0;
55071}
55072_ACEOF
55073if ac_fn_c_try_link "$LINENO"
55074then :
55075  ac_cv_sys_largefile_source=no; break
55076fi
55077rm -f core conftest.err conftest.$ac_objext conftest.beam \
55078    conftest$ac_exeext conftest.$ac_ext
55079  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55080/* end confdefs.h.  */
55081#undef _LARGEFILE_SOURCE
55082#define _LARGEFILE_SOURCE 1
55083#include <sys/types.h> /* for off_t */
55084     #include <stdio.h>
55085int
55086main (void)
55087{
55088int (*fp) (FILE *, off_t, int) = fseeko;
55089     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
55090  ;
55091  return 0;
55092}
55093_ACEOF
55094if ac_fn_c_try_link "$LINENO"
55095then :
55096  ac_cv_sys_largefile_source=1; break
55097fi
55098rm -f core conftest.err conftest.$ac_objext conftest.beam \
55099    conftest$ac_exeext conftest.$ac_ext
55100  ac_cv_sys_largefile_source=unknown
55101  break
55102done
55103fi
55104{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
55105printf "%s\n" "$ac_cv_sys_largefile_source" >&6; }
55106case $ac_cv_sys_largefile_source in #(
55107  no | unknown) ;;
55108  *)
55109printf "%s\n" "#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source" >>confdefs.h
55110;;
55111esac
55112rm -rf conftest*
55113
55114# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
55115# in glibc 2.1.3, but that breaks too many other things.
55116# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
55117if test $ac_cv_sys_largefile_source != unknown; then
55118
55119printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
55120
55121fi
55122
55123ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
55124if test "x$ac_cv_func_strptime" = xyes
55125then :
55126  printf "%s\n" "#define HAVE_STRPTIME 1" >>confdefs.h
55127
55128fi
55129ac_fn_c_check_func "$LINENO" "timegm" "ac_cv_func_timegm"
55130if test "x$ac_cv_func_timegm" = xyes
55131then :
55132  printf "%s\n" "#define HAVE_TIMEGM 1" >>confdefs.h
55133
55134fi
55135ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
55136if test "x$ac_cv_func_vsnprintf" = xyes
55137then :
55138  printf "%s\n" "#define HAVE_VSNPRINTF 1" >>confdefs.h
55139
55140fi
55141ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
55142if test "x$ac_cv_func_vasprintf" = xyes
55143then :
55144  printf "%s\n" "#define HAVE_VASPRINTF 1" >>confdefs.h
55145
55146fi
55147ac_fn_c_check_func "$LINENO" "drand48" "ac_cv_func_drand48"
55148if test "x$ac_cv_func_drand48" = xyes
55149then :
55150  printf "%s\n" "#define HAVE_DRAND48 1" >>confdefs.h
55151
55152fi
55153ac_fn_c_check_func "$LINENO" "pathconf" "ac_cv_func_pathconf"
55154if test "x$ac_cv_func_pathconf" = xyes
55155then :
55156  printf "%s\n" "#define HAVE_PATHCONF 1" >>confdefs.h
55157
55158fi
55159
55160ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
55161if test "x$ac_cv_func_strtoll" = xyes
55162then :
55163  printf "%s\n" "#define HAVE_STRTOLL 1" >>confdefs.h
55164
55165fi
55166ac_fn_c_check_func "$LINENO" "usleep" "ac_cv_func_usleep"
55167if test "x$ac_cv_func_usleep" = xyes
55168then :
55169  printf "%s\n" "#define HAVE_USLEEP 1" >>confdefs.h
55170
55171fi
55172ac_fn_c_check_func "$LINENO" "ftello" "ac_cv_func_ftello"
55173if test "x$ac_cv_func_ftello" = xyes
55174then :
55175  printf "%s\n" "#define HAVE_FTELLO 1" >>confdefs.h
55176
55177fi
55178ac_fn_c_check_func "$LINENO" "sigblock" "ac_cv_func_sigblock"
55179if test "x$ac_cv_func_sigblock" = xyes
55180then :
55181  printf "%s\n" "#define HAVE_SIGBLOCK 1" >>confdefs.h
55182
55183fi
55184ac_fn_c_check_func "$LINENO" "sigsetjmp" "ac_cv_func_sigsetjmp"
55185if test "x$ac_cv_func_sigsetjmp" = xyes
55186then :
55187  printf "%s\n" "#define HAVE_SIGSETJMP 1" >>confdefs.h
55188
55189fi
55190ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
55191if test "x$ac_cv_func_memrchr" = xyes
55192then :
55193  printf "%s\n" "#define HAVE_MEMRCHR 1" >>confdefs.h
55194
55195fi
55196ac_fn_c_check_func "$LINENO" "wcwidth" "ac_cv_func_wcwidth"
55197if test "x$ac_cv_func_wcwidth" = xyes
55198then :
55199  printf "%s\n" "#define HAVE_WCWIDTH 1" >>confdefs.h
55200
55201fi
55202ac_fn_c_check_func "$LINENO" "mbtowc" "ac_cv_func_mbtowc"
55203if test "x$ac_cv_func_mbtowc" = xyes
55204then :
55205  printf "%s\n" "#define HAVE_MBTOWC 1" >>confdefs.h
55206
55207fi
55208
55209ac_fn_c_check_func "$LINENO" "sleep" "ac_cv_func_sleep"
55210if test "x$ac_cv_func_sleep" = xyes
55211then :
55212  printf "%s\n" "#define HAVE_SLEEP 1" >>confdefs.h
55213
55214fi
55215ac_fn_c_check_func "$LINENO" "symlink" "ac_cv_func_symlink"
55216if test "x$ac_cv_func_symlink" = xyes
55217then :
55218  printf "%s\n" "#define HAVE_SYMLINK 1" >>confdefs.h
55219
55220fi
55221ac_fn_c_check_func "$LINENO" "utime" "ac_cv_func_utime"
55222if test "x$ac_cv_func_utime" = xyes
55223then :
55224  printf "%s\n" "#define HAVE_UTIME 1" >>confdefs.h
55225
55226fi
55227ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
55228if test "x$ac_cv_func_strlcpy" = xyes
55229then :
55230  printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h
55231
55232fi
55233ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
55234if test "x$ac_cv_func_random" = xyes
55235then :
55236  printf "%s\n" "#define HAVE_RANDOM 1" >>confdefs.h
55237
55238fi
55239ac_fn_c_check_func "$LINENO" "fmemopen" "ac_cv_func_fmemopen"
55240if test "x$ac_cv_func_fmemopen" = xyes
55241then :
55242  printf "%s\n" "#define HAVE_FMEMOPEN 1" >>confdefs.h
55243
55244fi
55245
55246
55247if test x"$ENABLE_OPIE" = xyes; then
55248  case " $LIBOBJS " in
55249  *" ftp-opie.$ac_objext "* ) ;;
55250  *) LIBOBJS="$LIBOBJS ftp-opie.$ac_objext"
55251 ;;
55252esac
55253
55254fi
55255
55256
55257printf "%s\n" "#define HAVE_STRDUP 1" >>confdefs.h
55258
55259
55260printf "%s\n" "#define HAVE_ISATTY 1" >>confdefs.h
55261
55262
55263case $host_os in
55264  *mingw32* )
55265    LIBS+=' -lws2_32'
55266    case " $LIBOBJS " in
55267  *" mswindows.$ac_objext "* ) ;;
55268  *) LIBOBJS="$LIBOBJS mswindows.$ac_objext"
55269 ;;
55270esac
55271
55272    ;;
55273esac
55274
55275# enable all possible compiler warnings in WARN_FLAGS
55276#
55277# to enable by default: create a file '.manywarnings'
55278# enable explicitly : ./configure --enable-manywarnings
55279# disable explicitly: ./configure --disable-manywarnings
55280sanitizer_flags="$WARN_CFLAGS"
55281
55282  #
55283  # check if manywarnings is requested
55284  #
55285  # Check whether --enable-manywarnings was given.
55286if test ${enable_manywarnings+y}
55287then :
55288  enableval=$enable_manywarnings; case $enableval in
55289       yes|no) ;;
55290       *) as_fn_error $? "Bad value $enableval for --enable-manywarnings option" "$LINENO" 5 ;;
55291     esac
55292       wget_manywarnings=$enableval
55293
55294else $as_nop
55295
55296      test -f .manywarnings && wget_manywarnings=yes || wget_manywarnings=no
55297
55298
55299fi
55300
55301
55302  WARN_CFLAGS=""
55303
55304  if test "$wget_manywarnings" = yes; then
55305    # AC_PROG_CC sets $GCC to 'yes' if compiler is gcc
55306    # AC_REQUIRE([AC_PROG_CC])
55307
55308    case $CC in
55309      *gcc*) CCNAME="gcc";;
55310      *clang*) CCNAME="clang";;
55311    esac
55312
55313    if test "$CCNAME" = "gcc"; then
55314      test -n "C" && wget_LANGUAGE=C || wget_LANGUAGE=C
55315
55316      # add -Wall -Wextra to reduce number of warn flags
55317
55318  ret=$CFLAGS
55319  words=" $CFLAGS "
55320  for word in "-Wall -Wextra -Wformat=2"; do
55321    if test "${words#*" $word "}" = "$words"; then ret="$ret $word"; fi
55322  done
55323  wget_WARN_CFLAGS=$ret
55324
55325
55326      # collect all disabled warn flags in $WARN_CFLAGS
55327      wget_WARN_CFLAGS=$wget_WARN_CFLAGS" "$($CC $wget_WARN_CFLAGS -Q --help=warning,$wget_LANGUAGE|\
55328        awk '{ if (($2 == "[disabled]" || $2 == "")\
55329          && $1!~/=/ && $1~/^-W/ && $1!~/</ && $1!="-Wall") print $1 }')
55330
55331      GCC_VERSION=$($CC -dumpversion | cut -f1 -d.)
55332      if test $GCC_VERSION -ge 6; then
55333        wget_WARN_CFLAGS=$wget_WARN_CFLAGS" -Warray-bounds=2 -Wnormalized=nfc -Wshift-overflow=2 -Wunused-const-variable=2"
55334      fi
55335      if test $GCC_VERSION -ge 7; then
55336        wget_WARN_CFLAGS=$wget_WARN_CFLAGS" -Wformat-overflow=2 -Wformat-truncation=1 -Wstringop-overflow=2"
55337      fi
55338
55339    elif test "$CCNAME" = "clang"; then
55340      # set all warn flags on
55341
55342  ret=$CFLAGS
55343  words=" $CFLAGS "
55344  for word in "-Weverything"; do
55345    if test "${words#*" $word "}" = "$words"; then ret="$ret $word"; fi
55346  done
55347  wget_WARN_CFLAGS=$ret
55348
55349    fi
55350
55351    WARN_CFLAGS=$wget_WARN_CFLAGS
55352  fi
55353
55354WARN_CFLAGS="$WARN_CFLAGS $sanitizer_flags"
55355
55356if test -n "$WARN_CFLAGS"; then
55357  if test "$CCNAME" = "gcc"; then
55358    # Set up list of unwanted warnings
55359    nw=
55360    nw="$nw -Wsystem-headers"       # System headers may trigger lot's of useless warnings
55361    nw="$nw -Wvla"                  # This project is C99
55362    nw="$nw -Wstack-protector"
55363    nw="$nw -Wmissing-field-initializer"
55364    nw="$nw -Wtraditional"
55365    nw="$nw -Wtraditional-conversion"
55366    nw="$nw -Wc++-compat"
55367    nw="$nw -Wcast-qual"
55368    nw="$nw -Wconversion"
55369    nw="$nw -Wsign-conversion"
55370    nw="$nw -Wunsuffixed-float-constants"
55371    nw="$nw -Wdeclaration-after-statement" # C89 only, messing up gcc < 5
55372    nw="$nw -Wcast-function-type" # gcc 8, very noisy
55373    nw="$nw -Wabi" # gcc 8, very noisy
55374    nw="$nw -Wunused-macros" # triggers in auto-generated lex css parser, #pragma doesn't work, conflicts with -Werror
55375	nw="$nw -Wchkp" # Deprecated option
55376    if test "$cross_compiling" = yes; then
55377      nw="$nw -Wformat"
55378    fi
55379
55380    # remove unwanted warn flags
55381
55382  ret=
55383  words=" $nw "
55384  for word in $WARN_CFLAGS; do
55385     if test "${words#*" $word "}" = "$words"; then ret="$ret $word"; fi
55386  done
55387  WARN_CFLAGS=$ret
55388
55389
55390    WARN_CFLAGS="$WARN_CFLAGS -Wno-undef -Wno-float-equal"
55391
55392    # add more flags as you like
55393    if test $GCC_VERSION -ge 5; then
55394      WARN_CFLAGS="$WARN_CFLAGS -fdiagnostics-color=always"
55395    fi
55396    if test "$cross_compiling" = yes; then
55397      WARN_CFLAGS="$WARN_CFLAGS -Wno-format"
55398    fi
55399    if test $GCC_VERSION -ge 8; then
55400      WARN_CFLAGS="$WARN_CFLAGS -Wno-cast-function-type"
55401    fi
55402    # WARN_CFLAGS="$WARN_CFLAGS -Werror"
55403
55404    # We use a slightly smaller set of warning options for lib/.
55405    # Remove the following and save the result in GNULIB_WARN_CFLAGS.
55406    # Removing is not enough if these switches are implicitly set by other
55407    #  flags like -Wall or -Wextra. We have to explicitly unset them
55408    #  with -Wno-....
55409    nw=
55410    nw="$nw -Wpedantic"
55411    nw="$nw -Wsign-compare"
55412    nw="$nw -Wunused-parameter"
55413    nw="$nw -Wswitch-default"
55414    nw="$nw -Wformat-nonliteral"
55415    nw="$nw -Wsuggest-attribute=pure"
55416    nw="$nw -Wunsafe-loop-optimizations"
55417    nw="$nw -Wundef"
55418    nw="$nw -Wswitch-enum"
55419    nw="$nw -Wbad-function-cast"
55420    nw="$nw -Wredundant-decls"
55421    nw="$nw -Werror"
55422
55423  ret=
55424  words=" $nw "
55425  for word in $WARN_CFLAGS; do
55426     if test "${words#*" $word "}" = "$words"; then ret="$ret $word"; fi
55427  done
55428  GNULIB_WARN_CFLAGS=$ret
55429
55430
55431  ret=
55432  words=" -Werror "
55433  for word in $CFLAGS; do
55434     if test "${words#*" $word "}" = "$words"; then ret="$ret $word"; fi
55435  done
55436  CFLAGS=$ret
55437
55438
55439    # disable options implicitly set by other options
55440    GNULIB_WARN_CFLAGS="-Wno-error $GNULIB_WARN_CFLAGS"
55441    GNULIB_WARN_CFLAGS="$GNULIB_WARN_CFLAGS -Wno-sign-compare -Wno-unused-parameter -Wno-alloca"
55442    GNULIB_WARN_CFLAGS="$GNULIB_WARN_CFLAGS -Wno-float-conversion -Wno-cast-function-type"
55443    if test "$cross_compiling" = yes; then
55444      GNULIB_WARN_CFLAGS="$GNULIB_WARN_CFLAGS -Wno-incompatible-pointer-types"
55445    fi
55446
55447  elif test "$CCNAME" = "clang"; then
55448    # setup flags for this project
55449    WARN_CFLAGS="$WARN_CFLAGS -Wno-system-headers -Wno-vla -Wno-cast-qual -Wno-padded"
55450    WARN_CFLAGS="$WARN_CFLAGS -Wno-reserved-id-macro -Wno-sign-conversion  -Wno-disabled-macro-expansion"
55451    WARN_CFLAGS="$WARN_CFLAGS -Wno-documentation -Wno-documentation-unknown-command"
55452    WARN_CFLAGS="$WARN_CFLAGS -Wno-covered-switch-default -Wno-unused-macros"
55453    WARN_CFLAGS="$WARN_CFLAGS -Wno-missing-field-initializers"
55454
55455    # remove all flags from WARN_FLAGS that are already in CFLAGS
55456    # wget_WORD_REMOVE([WARN_CFLAGS], [$WARN_CFLAGS], [$CFLAGS])
55457
55458
55459  ret=
55460  words=" -Werror "
55461  for word in $CFLAGS; do
55462     if test "${words#*" $word "}" = "$words"; then ret="$ret $word"; fi
55463  done
55464  CFLAGS=$ret
55465
55466
55467    # disable verbose options
55468    GNULIB_WARN_CFLAGS="-Wno-error $GNULIB_WARN_CFLAGS"
55469    GNULIB_WARN_CFLAGS="$WARN_CFLAGS -Wno-sign-compare -Wno-unused-parameter -Wno-undef -Wno-format-nonliteral"
55470    GNULIB_WARN_CFLAGS="$GNULIB_WARN_CFLAGS -Wno-conversion -Wno-disabled-macro-expansion -Wno-c++98-compat"
55471    GNULIB_WARN_CFLAGS="$GNULIB_WARN_CFLAGS -Wno-gnu-statement-expression -Wno-shorten-64-to-32 -Wno-switch-enum"
55472    GNULIB_WARN_CFLAGS="$GNULIB_WARN_CFLAGS -Wno-unused-macros -Wno-missing-field-initializers"
55473    GNULIB_WARN_CFLAGS="$GNULIB_WARN_CFLAGS -Wno-gnu-zero-variadic-macro-arguments -Wno-conditional-uninitialized"
55474    GNULIB_WARN_CFLAGS="$GNULIB_WARN_CFLAGS -Wno-comma -Wno-assign-enum -Wno-unreachable-code -Wno-error"
55475    GNULIB_WARN_CFLAGS="$GNULIB_WARN_CFLAGS -Wno-missing-field-initializers"
55476
55477    # remove all flags from GNULIB_WARN_FLAGS that are already in CFLAGS
55478    # wget_WORD_REMOVE([GNULIB_WARN_CFLAGS], [$GNULIB_WARN_CFLAGS], [$CFLAGS])
55479  fi
55480
55481
55482
55483fi
55484
55485
55486
55487
55488
55489
55490
55491
55492
55493
55494if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
55495	if test -n "$ac_tool_prefix"; then
55496  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
55497set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
55498{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
55499printf %s "checking for $ac_word... " >&6; }
55500if test ${ac_cv_path_PKG_CONFIG+y}
55501then :
55502  printf %s "(cached) " >&6
55503else $as_nop
55504  case $PKG_CONFIG in
55505  [\\/]* | ?:[\\/]*)
55506  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
55507  ;;
55508  *)
55509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55510for as_dir in $PATH
55511do
55512  IFS=$as_save_IFS
55513  case $as_dir in #(((
55514    '') as_dir=./ ;;
55515    */) ;;
55516    *) as_dir=$as_dir/ ;;
55517  esac
55518    for ac_exec_ext in '' $ac_executable_extensions; do
55519  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
55520    ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
55521    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
55522    break 2
55523  fi
55524done
55525  done
55526IFS=$as_save_IFS
55527
55528  ;;
55529esac
55530fi
55531PKG_CONFIG=$ac_cv_path_PKG_CONFIG
55532if test -n "$PKG_CONFIG"; then
55533  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
55534printf "%s\n" "$PKG_CONFIG" >&6; }
55535else
55536  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
55537printf "%s\n" "no" >&6; }
55538fi
55539
55540
55541fi
55542if test -z "$ac_cv_path_PKG_CONFIG"; then
55543  ac_pt_PKG_CONFIG=$PKG_CONFIG
55544  # Extract the first word of "pkg-config", so it can be a program name with args.
55545set dummy pkg-config; ac_word=$2
55546{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
55547printf %s "checking for $ac_word... " >&6; }
55548if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
55549then :
55550  printf %s "(cached) " >&6
55551else $as_nop
55552  case $ac_pt_PKG_CONFIG in
55553  [\\/]* | ?:[\\/]*)
55554  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
55555  ;;
55556  *)
55557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55558for as_dir in $PATH
55559do
55560  IFS=$as_save_IFS
55561  case $as_dir in #(((
55562    '') as_dir=./ ;;
55563    */) ;;
55564    *) as_dir=$as_dir/ ;;
55565  esac
55566    for ac_exec_ext in '' $ac_executable_extensions; do
55567  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
55568    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
55569    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
55570    break 2
55571  fi
55572done
55573  done
55574IFS=$as_save_IFS
55575
55576  ;;
55577esac
55578fi
55579ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
55580if test -n "$ac_pt_PKG_CONFIG"; then
55581  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
55582printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
55583else
55584  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
55585printf "%s\n" "no" >&6; }
55586fi
55587
55588  if test "x$ac_pt_PKG_CONFIG" = x; then
55589    PKG_CONFIG=""
55590  else
55591    case $cross_compiling:$ac_tool_warned in
55592yes:)
55593{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
55594printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
55595ac_tool_warned=yes ;;
55596esac
55597    PKG_CONFIG=$ac_pt_PKG_CONFIG
55598  fi
55599else
55600  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
55601fi
55602
55603fi
55604if test -n "$PKG_CONFIG"; then
55605	_pkg_min_version=0.9.0
55606	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
55607printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; }
55608	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
55609		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55610printf "%s\n" "yes" >&6; }
55611	else
55612		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
55613printf "%s\n" "no" >&6; }
55614		PKG_CONFIG=""
55615	fi
55616fi
55617
55618if test "x$with_libpsl" != xno
55619then :
55620
55621
55622pkg_failed=no
55623{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LIBPSL" >&5
55624printf %s "checking for LIBPSL... " >&6; }
55625
55626if test -n "$LIBPSL_CFLAGS"; then
55627    pkg_cv_LIBPSL_CFLAGS="$LIBPSL_CFLAGS"
55628 elif test -n "$PKG_CONFIG"; then
55629    if test -n "$PKG_CONFIG" && \
55630    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpsl\""; } >&5
55631  ($PKG_CONFIG --exists --print-errors "libpsl") 2>&5
55632  ac_status=$?
55633  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55634  test $ac_status = 0; }; then
55635  pkg_cv_LIBPSL_CFLAGS=`$PKG_CONFIG --cflags "libpsl" 2>/dev/null`
55636		      test "x$?" != "x0" && pkg_failed=yes
55637else
55638  pkg_failed=yes
55639fi
55640 else
55641    pkg_failed=untried
55642fi
55643if test -n "$LIBPSL_LIBS"; then
55644    pkg_cv_LIBPSL_LIBS="$LIBPSL_LIBS"
55645 elif test -n "$PKG_CONFIG"; then
55646    if test -n "$PKG_CONFIG" && \
55647    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpsl\""; } >&5
55648  ($PKG_CONFIG --exists --print-errors "libpsl") 2>&5
55649  ac_status=$?
55650  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55651  test $ac_status = 0; }; then
55652  pkg_cv_LIBPSL_LIBS=`$PKG_CONFIG --libs "libpsl" 2>/dev/null`
55653		      test "x$?" != "x0" && pkg_failed=yes
55654else
55655  pkg_failed=yes
55656fi
55657 else
55658    pkg_failed=untried
55659fi
55660
55661
55662
55663if test $pkg_failed = yes; then
55664   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
55665printf "%s\n" "no" >&6; }
55666
55667if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
55668        _pkg_short_errors_supported=yes
55669else
55670        _pkg_short_errors_supported=no
55671fi
55672        if test $_pkg_short_errors_supported = yes; then
55673	        LIBPSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libpsl" 2>&1`
55674        else
55675	        LIBPSL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libpsl" 2>&1`
55676        fi
55677	# Put the nasty error message in config.log where it belongs
55678	echo "$LIBPSL_PKG_ERRORS" >&5
55679
55680
55681    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing psl_builtin" >&5
55682printf %s "checking for library containing psl_builtin... " >&6; }
55683if test ${ac_cv_search_psl_builtin+y}
55684then :
55685  printf %s "(cached) " >&6
55686else $as_nop
55687  ac_func_search_save_LIBS=$LIBS
55688cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55689/* end confdefs.h.  */
55690
55691/* Override any GCC internal prototype to avoid an error.
55692   Use char because int might match the return type of a GCC
55693   builtin and then its argument prototype would still apply.  */
55694char psl_builtin ();
55695int
55696main (void)
55697{
55698return psl_builtin ();
55699  ;
55700  return 0;
55701}
55702_ACEOF
55703for ac_lib in '' psl
55704do
55705  if test -z "$ac_lib"; then
55706    ac_res="none required"
55707  else
55708    ac_res=-l$ac_lib
55709    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
55710  fi
55711  if ac_fn_c_try_link "$LINENO"
55712then :
55713  ac_cv_search_psl_builtin=$ac_res
55714fi
55715rm -f core conftest.err conftest.$ac_objext conftest.beam \
55716    conftest$ac_exeext
55717  if test ${ac_cv_search_psl_builtin+y}
55718then :
55719  break
55720fi
55721done
55722if test ${ac_cv_search_psl_builtin+y}
55723then :
55724
55725else $as_nop
55726  ac_cv_search_psl_builtin=no
55727fi
55728rm conftest.$ac_ext
55729LIBS=$ac_func_search_save_LIBS
55730fi
55731{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_psl_builtin" >&5
55732printf "%s\n" "$ac_cv_search_psl_builtin" >&6; }
55733ac_res=$ac_cv_search_psl_builtin
55734if test "$ac_res" != no
55735then :
55736  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
55737  with_libpsl=yes;
55738printf "%s\n" "#define HAVE_LIBPSL 1" >>confdefs.h
55739
55740else $as_nop
55741  with_libpsl=no;  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** libpsl was not found. Fallback to builtin cookie checking." >&5
55742printf "%s\n" "$as_me: WARNING: *** libpsl was not found. Fallback to builtin cookie checking." >&2;}
55743fi
55744
55745
55746elif test $pkg_failed = untried; then
55747     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
55748printf "%s\n" "no" >&6; }
55749
55750    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing psl_builtin" >&5
55751printf %s "checking for library containing psl_builtin... " >&6; }
55752if test ${ac_cv_search_psl_builtin+y}
55753then :
55754  printf %s "(cached) " >&6
55755else $as_nop
55756  ac_func_search_save_LIBS=$LIBS
55757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55758/* end confdefs.h.  */
55759
55760/* Override any GCC internal prototype to avoid an error.
55761   Use char because int might match the return type of a GCC
55762   builtin and then its argument prototype would still apply.  */
55763char psl_builtin ();
55764int
55765main (void)
55766{
55767return psl_builtin ();
55768  ;
55769  return 0;
55770}
55771_ACEOF
55772for ac_lib in '' psl
55773do
55774  if test -z "$ac_lib"; then
55775    ac_res="none required"
55776  else
55777    ac_res=-l$ac_lib
55778    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
55779  fi
55780  if ac_fn_c_try_link "$LINENO"
55781then :
55782  ac_cv_search_psl_builtin=$ac_res
55783fi
55784rm -f core conftest.err conftest.$ac_objext conftest.beam \
55785    conftest$ac_exeext
55786  if test ${ac_cv_search_psl_builtin+y}
55787then :
55788  break
55789fi
55790done
55791if test ${ac_cv_search_psl_builtin+y}
55792then :
55793
55794else $as_nop
55795  ac_cv_search_psl_builtin=no
55796fi
55797rm conftest.$ac_ext
55798LIBS=$ac_func_search_save_LIBS
55799fi
55800{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_psl_builtin" >&5
55801printf "%s\n" "$ac_cv_search_psl_builtin" >&6; }
55802ac_res=$ac_cv_search_psl_builtin
55803if test "$ac_res" != no
55804then :
55805  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
55806  with_libpsl=yes;
55807printf "%s\n" "#define HAVE_LIBPSL 1" >>confdefs.h
55808
55809else $as_nop
55810  with_libpsl=no;  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** libpsl was not found. Fallback to builtin cookie checking." >&5
55811printf "%s\n" "$as_me: WARNING: *** libpsl was not found. Fallback to builtin cookie checking." >&2;}
55812fi
55813
55814
55815else
55816	LIBPSL_CFLAGS=$pkg_cv_LIBPSL_CFLAGS
55817	LIBPSL_LIBS=$pkg_cv_LIBPSL_LIBS
55818        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55819printf "%s\n" "yes" >&6; }
55820
55821    with_libpsl=yes
55822    # correct $LIBPSL_LIBS (in libpsl <= 0.6.0)
55823    if test "x$LIBPSL_LIBS" = "x-llibpsl "
55824then :
55825  LIBPSL_LIBS="-lpsl"
55826fi
55827    LIBS="$LIBPSL_LIBS $LIBS"
55828    CFLAGS="$LIBPSL_CFLAGS $CFLAGS"
55829
55830printf "%s\n" "#define HAVE_LIBPSL 1" >>confdefs.h
55831
55832
55833fi
55834
55835fi
55836
55837if test x"$with_libpsl" = xyes
55838then :
55839
55840  ac_fn_c_check_func "$LINENO" "psl_latest" "ac_cv_func_psl_latest"
55841if test "x$ac_cv_func_psl_latest" = xyes
55842then :
55843  printf "%s\n" "#define HAVE_PSL_LATEST 1" >>confdefs.h
55844
55845fi
55846
55847
55848fi
55849
55850if test x"$with_zlib" != xno
55851then :
55852
55853  with_zlib=yes
55854
55855pkg_failed=no
55856{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ZLIB" >&5
55857printf %s "checking for ZLIB... " >&6; }
55858
55859if test -n "$ZLIB_CFLAGS"; then
55860    pkg_cv_ZLIB_CFLAGS="$ZLIB_CFLAGS"
55861 elif test -n "$PKG_CONFIG"; then
55862    if test -n "$PKG_CONFIG" && \
55863    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib\""; } >&5
55864  ($PKG_CONFIG --exists --print-errors "zlib") 2>&5
55865  ac_status=$?
55866  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55867  test $ac_status = 0; }; then
55868  pkg_cv_ZLIB_CFLAGS=`$PKG_CONFIG --cflags "zlib" 2>/dev/null`
55869		      test "x$?" != "x0" && pkg_failed=yes
55870else
55871  pkg_failed=yes
55872fi
55873 else
55874    pkg_failed=untried
55875fi
55876if test -n "$ZLIB_LIBS"; then
55877    pkg_cv_ZLIB_LIBS="$ZLIB_LIBS"
55878 elif test -n "$PKG_CONFIG"; then
55879    if test -n "$PKG_CONFIG" && \
55880    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib\""; } >&5
55881  ($PKG_CONFIG --exists --print-errors "zlib") 2>&5
55882  ac_status=$?
55883  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55884  test $ac_status = 0; }; then
55885  pkg_cv_ZLIB_LIBS=`$PKG_CONFIG --libs "zlib" 2>/dev/null`
55886		      test "x$?" != "x0" && pkg_failed=yes
55887else
55888  pkg_failed=yes
55889fi
55890 else
55891    pkg_failed=untried
55892fi
55893
55894
55895
55896if test $pkg_failed = yes; then
55897   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
55898printf "%s\n" "no" >&6; }
55899
55900if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
55901        _pkg_short_errors_supported=yes
55902else
55903        _pkg_short_errors_supported=no
55904fi
55905        if test $_pkg_short_errors_supported = yes; then
55906	        ZLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "zlib" 2>&1`
55907        else
55908	        ZLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "zlib" 2>&1`
55909        fi
55910	# Put the nasty error message in config.log where it belongs
55911	echo "$ZLIB_PKG_ERRORS" >&5
55912
55913
55914    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
55915printf %s "checking for compress in -lz... " >&6; }
55916if test ${ac_cv_lib_z_compress+y}
55917then :
55918  printf %s "(cached) " >&6
55919else $as_nop
55920  ac_check_lib_save_LIBS=$LIBS
55921LIBS="-lz  $LIBS"
55922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55923/* end confdefs.h.  */
55924
55925/* Override any GCC internal prototype to avoid an error.
55926   Use char because int might match the return type of a GCC
55927   builtin and then its argument prototype would still apply.  */
55928char compress ();
55929int
55930main (void)
55931{
55932return compress ();
55933  ;
55934  return 0;
55935}
55936_ACEOF
55937if ac_fn_c_try_link "$LINENO"
55938then :
55939  ac_cv_lib_z_compress=yes
55940else $as_nop
55941  ac_cv_lib_z_compress=no
55942fi
55943rm -f core conftest.err conftest.$ac_objext conftest.beam \
55944    conftest$ac_exeext conftest.$ac_ext
55945LIBS=$ac_check_lib_save_LIBS
55946fi
55947{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
55948printf "%s\n" "$ac_cv_lib_z_compress" >&6; }
55949if test "x$ac_cv_lib_z_compress" = xyes
55950then :
55951  printf "%s\n" "#define HAVE_LIBZ 1" >>confdefs.h
55952
55953  LIBS="-lz $LIBS"
55954
55955fi
55956
55957
55958elif test $pkg_failed = untried; then
55959     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
55960printf "%s\n" "no" >&6; }
55961
55962    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
55963printf %s "checking for compress in -lz... " >&6; }
55964if test ${ac_cv_lib_z_compress+y}
55965then :
55966  printf %s "(cached) " >&6
55967else $as_nop
55968  ac_check_lib_save_LIBS=$LIBS
55969LIBS="-lz  $LIBS"
55970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55971/* end confdefs.h.  */
55972
55973/* Override any GCC internal prototype to avoid an error.
55974   Use char because int might match the return type of a GCC
55975   builtin and then its argument prototype would still apply.  */
55976char compress ();
55977int
55978main (void)
55979{
55980return compress ();
55981  ;
55982  return 0;
55983}
55984_ACEOF
55985if ac_fn_c_try_link "$LINENO"
55986then :
55987  ac_cv_lib_z_compress=yes
55988else $as_nop
55989  ac_cv_lib_z_compress=no
55990fi
55991rm -f core conftest.err conftest.$ac_objext conftest.beam \
55992    conftest$ac_exeext conftest.$ac_ext
55993LIBS=$ac_check_lib_save_LIBS
55994fi
55995{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
55996printf "%s\n" "$ac_cv_lib_z_compress" >&6; }
55997if test "x$ac_cv_lib_z_compress" = xyes
55998then :
55999  printf "%s\n" "#define HAVE_LIBZ 1" >>confdefs.h
56000
56001  LIBS="-lz $LIBS"
56002
56003fi
56004
56005
56006else
56007	ZLIB_CFLAGS=$pkg_cv_ZLIB_CFLAGS
56008	ZLIB_LIBS=$pkg_cv_ZLIB_LIBS
56009        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56010printf "%s\n" "yes" >&6; }
56011
56012    LIBS="$ZLIB_LIBS $LIBS"
56013    CFLAGS="$ZLIB_CFLAGS $CFLAGS"
56014
56015printf "%s\n" "#define HAVE_LIBZ 1" >>confdefs.h
56016
56017
56018fi
56019
56020fi
56021
56022if test x"$with_ssl" = xopenssl
56023then :
56024
56025  if test x"$with_libssl_prefix" = x; then
56026
56027pkg_failed=no
56028{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OPENSSL" >&5
56029printf %s "checking for OPENSSL... " >&6; }
56030
56031if test -n "$OPENSSL_CFLAGS"; then
56032    pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS"
56033 elif test -n "$PKG_CONFIG"; then
56034    if test -n "$PKG_CONFIG" && \
56035    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5
56036  ($PKG_CONFIG --exists --print-errors "openssl") 2>&5
56037  ac_status=$?
56038  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
56039  test $ac_status = 0; }; then
56040  pkg_cv_OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl" 2>/dev/null`
56041		      test "x$?" != "x0" && pkg_failed=yes
56042else
56043  pkg_failed=yes
56044fi
56045 else
56046    pkg_failed=untried
56047fi
56048if test -n "$OPENSSL_LIBS"; then
56049    pkg_cv_OPENSSL_LIBS="$OPENSSL_LIBS"
56050 elif test -n "$PKG_CONFIG"; then
56051    if test -n "$PKG_CONFIG" && \
56052    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5
56053  ($PKG_CONFIG --exists --print-errors "openssl") 2>&5
56054  ac_status=$?
56055  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
56056  test $ac_status = 0; }; then
56057  pkg_cv_OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl" 2>/dev/null`
56058		      test "x$?" != "x0" && pkg_failed=yes
56059else
56060  pkg_failed=yes
56061fi
56062 else
56063    pkg_failed=untried
56064fi
56065
56066
56067
56068if test $pkg_failed = yes; then
56069   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
56070printf "%s\n" "no" >&6; }
56071
56072if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
56073        _pkg_short_errors_supported=yes
56074else
56075        _pkg_short_errors_supported=no
56076fi
56077        if test $_pkg_short_errors_supported = yes; then
56078	        OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "openssl" 2>&1`
56079        else
56080	        OPENSSL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "openssl" 2>&1`
56081        fi
56082	# Put the nasty error message in config.log where it belongs
56083	echo "$OPENSSL_PKG_ERRORS" >&5
56084
56085	as_fn_error $? "Package requirements (openssl) were not met:
56086
56087$OPENSSL_PKG_ERRORS
56088
56089Consider adjusting the PKG_CONFIG_PATH environment variable if you
56090installed software in a non-standard prefix.
56091
56092Alternatively, you may set the environment variables OPENSSL_CFLAGS
56093and OPENSSL_LIBS to avoid the need to call pkg-config.
56094See the pkg-config man page for more details." "$LINENO" 5
56095elif test $pkg_failed = untried; then
56096     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
56097printf "%s\n" "no" >&6; }
56098	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
56099printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
56100as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
56101is in your PATH or set the PKG_CONFIG environment variable to the full
56102path to pkg-config.
56103
56104Alternatively, you may set the environment variables OPENSSL_CFLAGS
56105and OPENSSL_LIBS to avoid the need to call pkg-config.
56106See the pkg-config man page for more details.
56107
56108To get pkg-config, see <http://pkg-config.freedesktop.org/>.
56109See \`config.log' for more details" "$LINENO" 5; }
56110else
56111	OPENSSL_CFLAGS=$pkg_cv_OPENSSL_CFLAGS
56112	OPENSSL_LIBS=$pkg_cv_OPENSSL_LIBS
56113        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56114printf "%s\n" "yes" >&6; }
56115
56116      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: compiling in support for SSL via OpenSSL" >&5
56117printf "%s\n" "$as_me: compiling in support for SSL via OpenSSL" >&6;}
56118      case " $LIBOBJS " in
56119  *" openssl.$ac_objext "* ) ;;
56120  *) LIBOBJS="$LIBOBJS openssl.$ac_objext"
56121 ;;
56122esac
56123
56124      LIBS="$OPENSSL_LIBS $LIBS"
56125      CFLAGS="$OPENSSL_CFLAGS -DHAVE_LIBSSL $CFLAGS"
56126      LIBSSL=" " # ntlm check below wants this
56127      ac_fn_c_check_func "$LINENO" "RAND_egd" "ac_cv_func_RAND_egd"
56128if test "x$ac_cv_func_RAND_egd" = xyes
56129then :
56130  printf "%s\n" "#define HAVE_RAND_EGD 1" >>confdefs.h
56131
56132fi
56133
56134
56135printf "%s\n" "#define HAVE_LIBSSL 1" >>confdefs.h
56136
56137      ssl_found=yes
56138
56139fi
56140  fi
56141  if test x"$ssl_found" != xyes; then
56142                    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
56143printf %s "checking for dlopen in -ldl... " >&6; }
56144if test ${ac_cv_lib_dl_dlopen+y}
56145then :
56146  printf %s "(cached) " >&6
56147else $as_nop
56148  ac_check_lib_save_LIBS=$LIBS
56149LIBS="-ldl  $LIBS"
56150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56151/* end confdefs.h.  */
56152
56153/* Override any GCC internal prototype to avoid an error.
56154   Use char because int might match the return type of a GCC
56155   builtin and then its argument prototype would still apply.  */
56156char dlopen ();
56157int
56158main (void)
56159{
56160return dlopen ();
56161  ;
56162  return 0;
56163}
56164_ACEOF
56165if ac_fn_c_try_link "$LINENO"
56166then :
56167  ac_cv_lib_dl_dlopen=yes
56168else $as_nop
56169  ac_cv_lib_dl_dlopen=no
56170fi
56171rm -f core conftest.err conftest.$ac_objext conftest.beam \
56172    conftest$ac_exeext conftest.$ac_ext
56173LIBS=$ac_check_lib_save_LIBS
56174fi
56175{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
56176printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
56177if test "x$ac_cv_lib_dl_dlopen" = xyes
56178then :
56179  printf "%s\n" "#define HAVE_LIBDL 1" >>confdefs.h
56180
56181  LIBS="-ldl $LIBS"
56182
56183else $as_nop
56184
56185      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldl" >&5
56186printf %s "checking for shl_load in -ldl... " >&6; }
56187if test ${ac_cv_lib_dl_shl_load+y}
56188then :
56189  printf %s "(cached) " >&6
56190else $as_nop
56191  ac_check_lib_save_LIBS=$LIBS
56192LIBS="-ldl  $LIBS"
56193cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56194/* end confdefs.h.  */
56195
56196/* Override any GCC internal prototype to avoid an error.
56197   Use char because int might match the return type of a GCC
56198   builtin and then its argument prototype would still apply.  */
56199char shl_load ();
56200int
56201main (void)
56202{
56203return shl_load ();
56204  ;
56205  return 0;
56206}
56207_ACEOF
56208if ac_fn_c_try_link "$LINENO"
56209then :
56210  ac_cv_lib_dl_shl_load=yes
56211else $as_nop
56212  ac_cv_lib_dl_shl_load=no
56213fi
56214rm -f core conftest.err conftest.$ac_objext conftest.beam \
56215    conftest$ac_exeext conftest.$ac_ext
56216LIBS=$ac_check_lib_save_LIBS
56217fi
56218{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_shl_load" >&5
56219printf "%s\n" "$ac_cv_lib_dl_shl_load" >&6; }
56220if test "x$ac_cv_lib_dl_shl_load" = xyes
56221then :
56222  printf "%s\n" "#define HAVE_LIBDL 1" >>confdefs.h
56223
56224  LIBS="-ldl $LIBS"
56225
56226fi
56227
56228
56229fi
56230
56231
56232    ssl_found=no
56233    case $host_os in
56234      *mingw32* )
56235
56236        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_init in -leay32" >&5
56237printf %s "checking for EVP_MD_CTX_init in -leay32... " >&6; }
56238if test ${ac_cv_lib_eay32_EVP_MD_CTX_init+y}
56239then :
56240  printf %s "(cached) " >&6
56241else $as_nop
56242  ac_check_lib_save_LIBS=$LIBS
56243LIBS="-leay32  $LIBS"
56244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56245/* end confdefs.h.  */
56246
56247/* Override any GCC internal prototype to avoid an error.
56248   Use char because int might match the return type of a GCC
56249   builtin and then its argument prototype would still apply.  */
56250char EVP_MD_CTX_init ();
56251int
56252main (void)
56253{
56254return EVP_MD_CTX_init ();
56255  ;
56256  return 0;
56257}
56258_ACEOF
56259if ac_fn_c_try_link "$LINENO"
56260then :
56261  ac_cv_lib_eay32_EVP_MD_CTX_init=yes
56262else $as_nop
56263  ac_cv_lib_eay32_EVP_MD_CTX_init=no
56264fi
56265rm -f core conftest.err conftest.$ac_objext conftest.beam \
56266    conftest$ac_exeext conftest.$ac_ext
56267LIBS=$ac_check_lib_save_LIBS
56268fi
56269{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_eay32_EVP_MD_CTX_init" >&5
56270printf "%s\n" "$ac_cv_lib_eay32_EVP_MD_CTX_init" >&6; }
56271if test "x$ac_cv_lib_eay32_EVP_MD_CTX_init" = xyes
56272then :
56273  printf "%s\n" "#define HAVE_LIBEAY32 1" >>confdefs.h
56274
56275  LIBS="-leay32 $LIBS"
56276
56277fi
56278
56279        if test x"$ac_cv_lib_eay32_EVP_MD_CTX_init" != xno
56280        then
56281          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SSL_connect in -lssl32" >&5
56282printf %s "checking for SSL_connect in -lssl32... " >&6; }
56283if test ${ac_cv_lib_ssl32_SSL_connect+y}
56284then :
56285  printf %s "(cached) " >&6
56286else $as_nop
56287  ac_check_lib_save_LIBS=$LIBS
56288LIBS="-lssl32  $LIBS"
56289cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56290/* end confdefs.h.  */
56291
56292/* Override any GCC internal prototype to avoid an error.
56293   Use char because int might match the return type of a GCC
56294   builtin and then its argument prototype would still apply.  */
56295char SSL_connect ();
56296int
56297main (void)
56298{
56299return SSL_connect ();
56300  ;
56301  return 0;
56302}
56303_ACEOF
56304if ac_fn_c_try_link "$LINENO"
56305then :
56306  ac_cv_lib_ssl32_SSL_connect=yes
56307else $as_nop
56308  ac_cv_lib_ssl32_SSL_connect=no
56309fi
56310rm -f core conftest.err conftest.$ac_objext conftest.beam \
56311    conftest$ac_exeext conftest.$ac_ext
56312LIBS=$ac_check_lib_save_LIBS
56313fi
56314{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl32_SSL_connect" >&5
56315printf "%s\n" "$ac_cv_lib_ssl32_SSL_connect" >&6; }
56316if test "x$ac_cv_lib_ssl32_SSL_connect" = xyes
56317then :
56318
56319            ssl_found=yes
56320            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Enabling support for SSL via OpenSSL (shared)" >&5
56321printf "%s\n" "$as_me: Enabling support for SSL via OpenSSL (shared)" >&6;}
56322            case " $LIBOBJS " in
56323  *" openssl.$ac_objext "* ) ;;
56324  *) LIBOBJS="$LIBOBJS openssl.$ac_objext"
56325 ;;
56326esac
56327
56328            LIBS="${LIBS} -lssl32"
56329
56330printf "%s\n" "#define HAVE_LIBSSL32 1" >>confdefs.h
56331
56332
56333else $as_nop
56334  as_fn_error $? "openssl not found: shared lib eay32 found but ssl32 not found" "$LINENO" 5
56335fi
56336
56337
56338        else
56339          LIBS+=' -lgdi32'
56340                  fi
56341              ;;
56342    esac
56343
56344    if test x$ssl_found != xyes
56345then :
56346
56347
56348
56349
56350
56351
56352
56353
56354
56355
56356
56357
56358
56359    use_additional=yes
56360
56361  acl_save_prefix="$prefix"
56362  prefix="$acl_final_prefix"
56363  acl_save_exec_prefix="$exec_prefix"
56364  exec_prefix="$acl_final_exec_prefix"
56365
56366    eval additional_includedir=\"$includedir\"
56367    eval additional_libdir=\"$libdir\"
56368    eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
56369    eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
56370
56371  exec_prefix="$acl_save_exec_prefix"
56372  prefix="$acl_save_prefix"
56373
56374
56375# Check whether --with-libssl-prefix was given.
56376if test ${with_libssl_prefix+y}
56377then :
56378  withval=$with_libssl_prefix;
56379    if test "X$withval" = "Xno"; then
56380      use_additional=no
56381    else
56382      if test "X$withval" = "X"; then
56383
56384  acl_save_prefix="$prefix"
56385  prefix="$acl_final_prefix"
56386  acl_save_exec_prefix="$exec_prefix"
56387  exec_prefix="$acl_final_exec_prefix"
56388
56389          eval additional_includedir=\"$includedir\"
56390          eval additional_libdir=\"$libdir\"
56391          eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
56392          eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
56393
56394  exec_prefix="$acl_save_exec_prefix"
56395  prefix="$acl_save_prefix"
56396
56397      else
56398        additional_includedir="$withval/include"
56399        additional_libdir="$withval/$acl_libdirstem"
56400        additional_libdir2="$withval/$acl_libdirstem2"
56401        additional_libdir3="$withval/$acl_libdirstem3"
56402      fi
56403    fi
56404
56405fi
56406
56407  if test "X$additional_libdir2" = "X$additional_libdir"; then
56408    additional_libdir2=
56409  fi
56410  if test "X$additional_libdir3" = "X$additional_libdir"; then
56411    additional_libdir3=
56412  fi
56413      LIBSSL=
56414  LTLIBSSL=
56415  INCSSL=
56416  LIBSSL_PREFIX=
56417      HAVE_LIBSSL=
56418  rpathdirs=
56419  ltrpathdirs=
56420  names_already_handled=
56421  names_next_round='ssl crypto'
56422  while test -n "$names_next_round"; do
56423    names_this_round="$names_next_round"
56424    names_next_round=
56425    for name in $names_this_round; do
56426      already_handled=
56427      for n in $names_already_handled; do
56428        if test "$n" = "$name"; then
56429          already_handled=yes
56430          break
56431        fi
56432      done
56433      if test -z "$already_handled"; then
56434        names_already_handled="$names_already_handled $name"
56435                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
56436        eval value=\"\$HAVE_LIB$uppername\"
56437        if test -n "$value"; then
56438          if test "$value" = yes; then
56439            eval value=\"\$LIB$uppername\"
56440            test -z "$value" || LIBSSL="${LIBSSL}${LIBSSL:+ }$value"
56441            eval value=\"\$LTLIB$uppername\"
56442            test -z "$value" || LTLIBSSL="${LTLIBSSL}${LTLIBSSL:+ }$value"
56443          else
56444                                    :
56445          fi
56446        else
56447                              found_dir=
56448          found_la=
56449          found_so=
56450          found_a=
56451          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
56452          if test -n "$acl_shlibext"; then
56453            shrext=".$acl_shlibext"             # typically: shrext=.so
56454          else
56455            shrext=
56456          fi
56457          if test $use_additional = yes; then
56458            for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
56459              if test "X$found_dir" = "X"; then
56460                eval dir=\$$additional_libdir_variable
56461                if test -n "$dir"; then
56462                                                      if test -n "$acl_shlibext"; then
56463                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
56464                      found_dir="$dir"
56465                      found_so="$dir/$libname$shrext"
56466                    else
56467                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
56468                        ver=`(cd "$dir" && \
56469                              for f in "$libname$shrext".*; do echo "$f"; done \
56470                              | sed -e "s,^$libname$shrext\\\\.,," \
56471                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
56472                              | sed 1q ) 2>/dev/null`
56473                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
56474                          found_dir="$dir"
56475                          found_so="$dir/$libname$shrext.$ver"
56476                        fi
56477                      else
56478                        eval library_names=\"$acl_library_names_spec\"
56479                        for f in $library_names; do
56480                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
56481                            found_dir="$dir"
56482                            found_so="$dir/$f"
56483                            break
56484                          fi
56485                        done
56486                      fi
56487                    fi
56488                  fi
56489                                    if test "X$found_dir" = "X"; then
56490                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
56491                      found_dir="$dir"
56492                      found_a="$dir/$libname.$acl_libext"
56493                    fi
56494                  fi
56495                  if test "X$found_dir" != "X"; then
56496                    if test -f "$dir/$libname.la"; then
56497                      found_la="$dir/$libname.la"
56498                    fi
56499                  fi
56500                fi
56501              fi
56502            done
56503          fi
56504          if test "X$found_dir" = "X"; then
56505            for x in $LDFLAGS $LTLIBSSL; do
56506
56507  acl_save_prefix="$prefix"
56508  prefix="$acl_final_prefix"
56509  acl_save_exec_prefix="$exec_prefix"
56510  exec_prefix="$acl_final_exec_prefix"
56511  eval x=\"$x\"
56512  exec_prefix="$acl_save_exec_prefix"
56513  prefix="$acl_save_prefix"
56514
56515              case "$x" in
56516                -L*)
56517                  dir=`echo "X$x" | sed -e 's/^X-L//'`
56518                                    if test -n "$acl_shlibext"; then
56519                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
56520                      found_dir="$dir"
56521                      found_so="$dir/$libname$shrext"
56522                    else
56523                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
56524                        ver=`(cd "$dir" && \
56525                              for f in "$libname$shrext".*; do echo "$f"; done \
56526                              | sed -e "s,^$libname$shrext\\\\.,," \
56527                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
56528                              | sed 1q ) 2>/dev/null`
56529                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
56530                          found_dir="$dir"
56531                          found_so="$dir/$libname$shrext.$ver"
56532                        fi
56533                      else
56534                        eval library_names=\"$acl_library_names_spec\"
56535                        for f in $library_names; do
56536                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
56537                            found_dir="$dir"
56538                            found_so="$dir/$f"
56539                            break
56540                          fi
56541                        done
56542                      fi
56543                    fi
56544                  fi
56545                                    if test "X$found_dir" = "X"; then
56546                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
56547                      found_dir="$dir"
56548                      found_a="$dir/$libname.$acl_libext"
56549                    fi
56550                  fi
56551                  if test "X$found_dir" != "X"; then
56552                    if test -f "$dir/$libname.la"; then
56553                      found_la="$dir/$libname.la"
56554                    fi
56555                  fi
56556                  ;;
56557              esac
56558              if test "X$found_dir" != "X"; then
56559                break
56560              fi
56561            done
56562          fi
56563          if test "X$found_dir" != "X"; then
56564                        LTLIBSSL="${LTLIBSSL}${LTLIBSSL:+ }-L$found_dir -l$name"
56565            if test "X$found_so" != "X"; then
56566                                                        if test "$enable_rpath" = no \
56567                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
56568                 || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
56569                 || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
56570                                LIBSSL="${LIBSSL}${LIBSSL:+ }$found_so"
56571              else
56572                                                                                haveit=
56573                for x in $ltrpathdirs; do
56574                  if test "X$x" = "X$found_dir"; then
56575                    haveit=yes
56576                    break
56577                  fi
56578                done
56579                if test -z "$haveit"; then
56580                  ltrpathdirs="$ltrpathdirs $found_dir"
56581                fi
56582                                if test "$acl_hardcode_direct" = yes; then
56583                                                      LIBSSL="${LIBSSL}${LIBSSL:+ }$found_so"
56584                else
56585                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
56586                                                            LIBSSL="${LIBSSL}${LIBSSL:+ }$found_so"
56587                                                            haveit=
56588                    for x in $rpathdirs; do
56589                      if test "X$x" = "X$found_dir"; then
56590                        haveit=yes
56591                        break
56592                      fi
56593                    done
56594                    if test -z "$haveit"; then
56595                      rpathdirs="$rpathdirs $found_dir"
56596                    fi
56597                  else
56598                                                                                haveit=
56599                    for x in $LDFLAGS $LIBSSL; do
56600
56601  acl_save_prefix="$prefix"
56602  prefix="$acl_final_prefix"
56603  acl_save_exec_prefix="$exec_prefix"
56604  exec_prefix="$acl_final_exec_prefix"
56605  eval x=\"$x\"
56606  exec_prefix="$acl_save_exec_prefix"
56607  prefix="$acl_save_prefix"
56608
56609                      if test "X$x" = "X-L$found_dir"; then
56610                        haveit=yes
56611                        break
56612                      fi
56613                    done
56614                    if test -z "$haveit"; then
56615                      LIBSSL="${LIBSSL}${LIBSSL:+ }-L$found_dir"
56616                    fi
56617                    if test "$acl_hardcode_minus_L" != no; then
56618                                                                                        LIBSSL="${LIBSSL}${LIBSSL:+ }$found_so"
56619                    else
56620                                                                                                                                                                                LIBSSL="${LIBSSL}${LIBSSL:+ }-l$name"
56621                    fi
56622                  fi
56623                fi
56624              fi
56625            else
56626              if test "X$found_a" != "X"; then
56627                                LIBSSL="${LIBSSL}${LIBSSL:+ }$found_a"
56628              else
56629                                                LIBSSL="${LIBSSL}${LIBSSL:+ }-L$found_dir -l$name"
56630              fi
56631            fi
56632                        additional_includedir=
56633            case "$found_dir" in
56634              */$acl_libdirstem | */$acl_libdirstem/)
56635                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
56636                if test "$name" = 'ssl'; then
56637                  LIBSSL_PREFIX="$basedir"
56638                fi
56639                additional_includedir="$basedir/include"
56640                ;;
56641              */$acl_libdirstem2 | */$acl_libdirstem2/)
56642                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
56643                if test "$name" = 'ssl'; then
56644                  LIBSSL_PREFIX="$basedir"
56645                fi
56646                additional_includedir="$basedir/include"
56647                ;;
56648              */$acl_libdirstem3 | */$acl_libdirstem3/)
56649                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
56650                if test "$name" = 'ssl'; then
56651                  LIBSSL_PREFIX="$basedir"
56652                fi
56653                additional_includedir="$basedir/include"
56654                ;;
56655            esac
56656            if test "X$additional_includedir" != "X"; then
56657                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
56658                haveit=
56659                if test "X$additional_includedir" = "X/usr/local/include"; then
56660                  if test -n "$GCC"; then
56661                    case $host_os in
56662                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
56663                    esac
56664                  fi
56665                fi
56666                if test -z "$haveit"; then
56667                  for x in $CPPFLAGS $INCSSL; do
56668
56669  acl_save_prefix="$prefix"
56670  prefix="$acl_final_prefix"
56671  acl_save_exec_prefix="$exec_prefix"
56672  exec_prefix="$acl_final_exec_prefix"
56673  eval x=\"$x\"
56674  exec_prefix="$acl_save_exec_prefix"
56675  prefix="$acl_save_prefix"
56676
56677                    if test "X$x" = "X-I$additional_includedir"; then
56678                      haveit=yes
56679                      break
56680                    fi
56681                  done
56682                  if test -z "$haveit"; then
56683                    if test -d "$additional_includedir"; then
56684                                            INCSSL="${INCSSL}${INCSSL:+ }-I$additional_includedir"
56685                    fi
56686                  fi
56687                fi
56688              fi
56689            fi
56690                        if test -n "$found_la"; then
56691                                                        save_libdir="$libdir"
56692              case "$found_la" in
56693                */* | *\\*) . "$found_la" ;;
56694                *) . "./$found_la" ;;
56695              esac
56696              libdir="$save_libdir"
56697                            for dep in $dependency_libs; do
56698                case "$dep" in
56699                  -L*)
56700                    dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
56701                                                                                                                                                                if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
56702                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
56703                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
56704                      haveit=
56705                      if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
56706                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
56707                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
56708                        if test -n "$GCC"; then
56709                          case $host_os in
56710                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
56711                          esac
56712                        fi
56713                      fi
56714                      if test -z "$haveit"; then
56715                        haveit=
56716                        for x in $LDFLAGS $LIBSSL; do
56717
56718  acl_save_prefix="$prefix"
56719  prefix="$acl_final_prefix"
56720  acl_save_exec_prefix="$exec_prefix"
56721  exec_prefix="$acl_final_exec_prefix"
56722  eval x=\"$x\"
56723  exec_prefix="$acl_save_exec_prefix"
56724  prefix="$acl_save_prefix"
56725
56726                          if test "X$x" = "X-L$dependency_libdir"; then
56727                            haveit=yes
56728                            break
56729                          fi
56730                        done
56731                        if test -z "$haveit"; then
56732                          if test -d "$dependency_libdir"; then
56733                                                        LIBSSL="${LIBSSL}${LIBSSL:+ }-L$dependency_libdir"
56734                          fi
56735                        fi
56736                        haveit=
56737                        for x in $LDFLAGS $LTLIBSSL; do
56738
56739  acl_save_prefix="$prefix"
56740  prefix="$acl_final_prefix"
56741  acl_save_exec_prefix="$exec_prefix"
56742  exec_prefix="$acl_final_exec_prefix"
56743  eval x=\"$x\"
56744  exec_prefix="$acl_save_exec_prefix"
56745  prefix="$acl_save_prefix"
56746
56747                          if test "X$x" = "X-L$dependency_libdir"; then
56748                            haveit=yes
56749                            break
56750                          fi
56751                        done
56752                        if test -z "$haveit"; then
56753                          if test -d "$dependency_libdir"; then
56754                                                        LTLIBSSL="${LTLIBSSL}${LTLIBSSL:+ }-L$dependency_libdir"
56755                          fi
56756                        fi
56757                      fi
56758                    fi
56759                    ;;
56760                  -R*)
56761                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
56762                    if test "$enable_rpath" != no; then
56763                                                                  haveit=
56764                      for x in $rpathdirs; do
56765                        if test "X$x" = "X$dir"; then
56766                          haveit=yes
56767                          break
56768                        fi
56769                      done
56770                      if test -z "$haveit"; then
56771                        rpathdirs="$rpathdirs $dir"
56772                      fi
56773                                                                  haveit=
56774                      for x in $ltrpathdirs; do
56775                        if test "X$x" = "X$dir"; then
56776                          haveit=yes
56777                          break
56778                        fi
56779                      done
56780                      if test -z "$haveit"; then
56781                        ltrpathdirs="$ltrpathdirs $dir"
56782                      fi
56783                    fi
56784                    ;;
56785                  -l*)
56786                                                                                                                                                                dep=`echo "X$dep" | sed -e 's/^X-l//'`
56787                    if test "X$dep" != Xc \
56788                       || case $host_os in
56789                            linux* | gnu* | k*bsd*-gnu) false ;;
56790                            *)                          true ;;
56791                          esac; then
56792                      names_next_round="$names_next_round $dep"
56793                    fi
56794                    ;;
56795                  *.la)
56796                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
56797                    ;;
56798                  *)
56799                                        LIBSSL="${LIBSSL}${LIBSSL:+ }$dep"
56800                    LTLIBSSL="${LTLIBSSL}${LTLIBSSL:+ }$dep"
56801                    ;;
56802                esac
56803              done
56804            fi
56805          else
56806                                                            LIBSSL="${LIBSSL}${LIBSSL:+ }-l$name"
56807            LTLIBSSL="${LTLIBSSL}${LTLIBSSL:+ }-l$name"
56808          fi
56809        fi
56810      fi
56811    done
56812  done
56813  if test "X$rpathdirs" != "X"; then
56814    if test -n "$acl_hardcode_libdir_separator"; then
56815                        alldirs=
56816      for found_dir in $rpathdirs; do
56817        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
56818      done
56819            acl_save_libdir="$libdir"
56820      libdir="$alldirs"
56821      eval flag=\"$acl_hardcode_libdir_flag_spec\"
56822      libdir="$acl_save_libdir"
56823      LIBSSL="${LIBSSL}${LIBSSL:+ }$flag"
56824    else
56825            for found_dir in $rpathdirs; do
56826        acl_save_libdir="$libdir"
56827        libdir="$found_dir"
56828        eval flag=\"$acl_hardcode_libdir_flag_spec\"
56829        libdir="$acl_save_libdir"
56830        LIBSSL="${LIBSSL}${LIBSSL:+ }$flag"
56831      done
56832    fi
56833  fi
56834  if test "X$ltrpathdirs" != "X"; then
56835            for found_dir in $ltrpathdirs; do
56836      LTLIBSSL="${LTLIBSSL}${LTLIBSSL:+ }-R$found_dir"
56837    done
56838  fi
56839
56840
56841
56842
56843
56844
56845        ac_save_CPPFLAGS="$CPPFLAGS"
56846
56847  for element in $INCSSL; do
56848    haveit=
56849    for x in $CPPFLAGS; do
56850
56851  acl_save_prefix="$prefix"
56852  prefix="$acl_final_prefix"
56853  acl_save_exec_prefix="$exec_prefix"
56854  exec_prefix="$acl_final_exec_prefix"
56855  eval x=\"$x\"
56856  exec_prefix="$acl_save_exec_prefix"
56857  prefix="$acl_save_prefix"
56858
56859      if test "X$x" = "X$element"; then
56860        haveit=yes
56861        break
56862      fi
56863    done
56864    if test -z "$haveit"; then
56865      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
56866    fi
56867  done
56868
56869
56870  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libssl" >&5
56871printf %s "checking for libssl... " >&6; }
56872if test ${ac_cv_libssl+y}
56873then :
56874  printf %s "(cached) " >&6
56875else $as_nop
56876
56877    ac_save_LIBS="$LIBS"
56878                                case " $LIBSSL" in
56879      *" -l"*) LIBS="$LIBS $LIBSSL" ;;
56880      *)       LIBS="$LIBSSL $LIBS" ;;
56881    esac
56882    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56883/* end confdefs.h.  */
56884
56885#include <openssl/ssl.h>
56886#include <openssl/x509.h>
56887#include <openssl/err.h>
56888#include <openssl/rand.h>
56889#include <openssl/des.h>
56890#include <openssl/md4.h>
56891#include <openssl/md5.h>
56892
56893int
56894main (void)
56895{
56896SSL_library_init ()
56897  ;
56898  return 0;
56899}
56900_ACEOF
56901if ac_fn_c_try_link "$LINENO"
56902then :
56903  ac_cv_libssl=yes
56904else $as_nop
56905  ac_cv_libssl='no'
56906fi
56907rm -f core conftest.err conftest.$ac_objext conftest.beam \
56908    conftest$ac_exeext conftest.$ac_ext
56909    LIBS="$ac_save_LIBS"
56910
56911fi
56912{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libssl" >&5
56913printf "%s\n" "$ac_cv_libssl" >&6; }
56914  if test "$ac_cv_libssl" = yes; then
56915    HAVE_LIBSSL=yes
56916
56917printf "%s\n" "#define HAVE_LIBSSL 1" >>confdefs.h
56918
56919    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libssl" >&5
56920printf %s "checking how to link with libssl... " >&6; }
56921    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBSSL" >&5
56922printf "%s\n" "$LIBSSL" >&6; }
56923  else
56924    HAVE_LIBSSL=no
56925            CPPFLAGS="$ac_save_CPPFLAGS"
56926    LIBSSL=
56927    LTLIBSSL=
56928    LIBSSL_PREFIX=
56929  fi
56930
56931
56932
56933
56934
56935
56936
56937      if test x"$LIBSSL" != x
56938      then
56939        ssl_found=yes
56940        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: compiling in support for SSL via OpenSSL" >&5
56941printf "%s\n" "$as_me: compiling in support for SSL via OpenSSL" >&6;}
56942        case " $LIBOBJS " in
56943  *" openssl.$ac_objext "* ) ;;
56944  *) LIBOBJS="$LIBOBJS openssl.$ac_objext"
56945 ;;
56946esac
56947
56948        LIBS="$LIBSSL $LIBS"
56949        ac_fn_c_check_func "$LINENO" "RAND_egd" "ac_cv_func_RAND_egd"
56950if test "x$ac_cv_func_RAND_egd" = xyes
56951then :
56952  printf "%s\n" "#define HAVE_RAND_EGD 1" >>confdefs.h
56953
56954fi
56955
56956      elif test x"$with_ssl" != x
56957      then
56958        as_fn_error $? "--with-ssl=openssl was given, but SSL is not available." "$LINENO" 5
56959      fi
56960
56961fi
56962  fi
56963
56964else $as_nop
56965
56966  # --with-ssl is not openssl: check if it's no
56967  if test x"$with_ssl" != xno
56968then :
56969
56970        with_ssl=gnutls
56971
56972        if test x"$with_libgnutls_prefix" = x; then
56973
56974pkg_failed=no
56975{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNUTLS" >&5
56976printf %s "checking for GNUTLS... " >&6; }
56977
56978if test -n "$GNUTLS_CFLAGS"; then
56979    pkg_cv_GNUTLS_CFLAGS="$GNUTLS_CFLAGS"
56980 elif test -n "$PKG_CONFIG"; then
56981    if test -n "$PKG_CONFIG" && \
56982    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnutls\""; } >&5
56983  ($PKG_CONFIG --exists --print-errors "gnutls") 2>&5
56984  ac_status=$?
56985  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
56986  test $ac_status = 0; }; then
56987  pkg_cv_GNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls" 2>/dev/null`
56988		      test "x$?" != "x0" && pkg_failed=yes
56989else
56990  pkg_failed=yes
56991fi
56992 else
56993    pkg_failed=untried
56994fi
56995if test -n "$GNUTLS_LIBS"; then
56996    pkg_cv_GNUTLS_LIBS="$GNUTLS_LIBS"
56997 elif test -n "$PKG_CONFIG"; then
56998    if test -n "$PKG_CONFIG" && \
56999    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnutls\""; } >&5
57000  ($PKG_CONFIG --exists --print-errors "gnutls") 2>&5
57001  ac_status=$?
57002  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57003  test $ac_status = 0; }; then
57004  pkg_cv_GNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls" 2>/dev/null`
57005		      test "x$?" != "x0" && pkg_failed=yes
57006else
57007  pkg_failed=yes
57008fi
57009 else
57010    pkg_failed=untried
57011fi
57012
57013
57014
57015if test $pkg_failed = yes; then
57016   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
57017printf "%s\n" "no" >&6; }
57018
57019if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57020        _pkg_short_errors_supported=yes
57021else
57022        _pkg_short_errors_supported=no
57023fi
57024        if test $_pkg_short_errors_supported = yes; then
57025	        GNUTLS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gnutls" 2>&1`
57026        else
57027	        GNUTLS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gnutls" 2>&1`
57028        fi
57029	# Put the nasty error message in config.log where it belongs
57030	echo "$GNUTLS_PKG_ERRORS" >&5
57031
57032	as_fn_error $? "Package requirements (gnutls) were not met:
57033
57034$GNUTLS_PKG_ERRORS
57035
57036Consider adjusting the PKG_CONFIG_PATH environment variable if you
57037installed software in a non-standard prefix.
57038
57039Alternatively, you may set the environment variables GNUTLS_CFLAGS
57040and GNUTLS_LIBS to avoid the need to call pkg-config.
57041See the pkg-config man page for more details." "$LINENO" 5
57042elif test $pkg_failed = untried; then
57043     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
57044printf "%s\n" "no" >&6; }
57045	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
57046printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
57047as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
57048is in your PATH or set the PKG_CONFIG environment variable to the full
57049path to pkg-config.
57050
57051Alternatively, you may set the environment variables GNUTLS_CFLAGS
57052and GNUTLS_LIBS to avoid the need to call pkg-config.
57053See the pkg-config man page for more details.
57054
57055To get pkg-config, see <http://pkg-config.freedesktop.org/>.
57056See \`config.log' for more details" "$LINENO" 5; }
57057else
57058	GNUTLS_CFLAGS=$pkg_cv_GNUTLS_CFLAGS
57059	GNUTLS_LIBS=$pkg_cv_GNUTLS_LIBS
57060        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57061printf "%s\n" "yes" >&6; }
57062
57063        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: compiling in support for SSL via GnuTLS" >&5
57064printf "%s\n" "$as_me: compiling in support for SSL via GnuTLS" >&6;}
57065        case " $LIBOBJS " in
57066  *" gnutls.$ac_objext "* ) ;;
57067  *) LIBOBJS="$LIBOBJS gnutls.$ac_objext"
57068 ;;
57069esac
57070
57071        LIBS="$GNUTLS_LIBS $LIBS"
57072        CFLAGS="$GNUTLS_CFLAGS -DHAVE_LIBGNUTLS $CFLAGS"
57073
57074printf "%s\n" "#define HAVE_LIBGNUTLS 1" >>confdefs.h
57075
57076        ssl_found=yes
57077
57078fi
57079    fi
57080    if test x"$ssl_found" != xyes; then
57081
57082
57083
57084
57085
57086
57087
57088
57089
57090
57091
57092
57093    use_additional=yes
57094
57095  acl_save_prefix="$prefix"
57096  prefix="$acl_final_prefix"
57097  acl_save_exec_prefix="$exec_prefix"
57098  exec_prefix="$acl_final_exec_prefix"
57099
57100    eval additional_includedir=\"$includedir\"
57101    eval additional_libdir=\"$libdir\"
57102    eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
57103    eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
57104
57105  exec_prefix="$acl_save_exec_prefix"
57106  prefix="$acl_save_prefix"
57107
57108
57109# Check whether --with-libgnutls-prefix was given.
57110if test ${with_libgnutls_prefix+y}
57111then :
57112  withval=$with_libgnutls_prefix;
57113    if test "X$withval" = "Xno"; then
57114      use_additional=no
57115    else
57116      if test "X$withval" = "X"; then
57117
57118  acl_save_prefix="$prefix"
57119  prefix="$acl_final_prefix"
57120  acl_save_exec_prefix="$exec_prefix"
57121  exec_prefix="$acl_final_exec_prefix"
57122
57123          eval additional_includedir=\"$includedir\"
57124          eval additional_libdir=\"$libdir\"
57125          eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
57126          eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
57127
57128  exec_prefix="$acl_save_exec_prefix"
57129  prefix="$acl_save_prefix"
57130
57131      else
57132        additional_includedir="$withval/include"
57133        additional_libdir="$withval/$acl_libdirstem"
57134        additional_libdir2="$withval/$acl_libdirstem2"
57135        additional_libdir3="$withval/$acl_libdirstem3"
57136      fi
57137    fi
57138
57139fi
57140
57141  if test "X$additional_libdir2" = "X$additional_libdir"; then
57142    additional_libdir2=
57143  fi
57144  if test "X$additional_libdir3" = "X$additional_libdir"; then
57145    additional_libdir3=
57146  fi
57147      LIBGNUTLS=
57148  LTLIBGNUTLS=
57149  INCGNUTLS=
57150  LIBGNUTLS_PREFIX=
57151      HAVE_LIBGNUTLS=
57152  rpathdirs=
57153  ltrpathdirs=
57154  names_already_handled=
57155  names_next_round='gnutls '
57156  while test -n "$names_next_round"; do
57157    names_this_round="$names_next_round"
57158    names_next_round=
57159    for name in $names_this_round; do
57160      already_handled=
57161      for n in $names_already_handled; do
57162        if test "$n" = "$name"; then
57163          already_handled=yes
57164          break
57165        fi
57166      done
57167      if test -z "$already_handled"; then
57168        names_already_handled="$names_already_handled $name"
57169                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
57170        eval value=\"\$HAVE_LIB$uppername\"
57171        if test -n "$value"; then
57172          if test "$value" = yes; then
57173            eval value=\"\$LIB$uppername\"
57174            test -z "$value" || LIBGNUTLS="${LIBGNUTLS}${LIBGNUTLS:+ }$value"
57175            eval value=\"\$LTLIB$uppername\"
57176            test -z "$value" || LTLIBGNUTLS="${LTLIBGNUTLS}${LTLIBGNUTLS:+ }$value"
57177          else
57178                                    :
57179          fi
57180        else
57181                              found_dir=
57182          found_la=
57183          found_so=
57184          found_a=
57185          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
57186          if test -n "$acl_shlibext"; then
57187            shrext=".$acl_shlibext"             # typically: shrext=.so
57188          else
57189            shrext=
57190          fi
57191          if test $use_additional = yes; then
57192            for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
57193              if test "X$found_dir" = "X"; then
57194                eval dir=\$$additional_libdir_variable
57195                if test -n "$dir"; then
57196                                                      if test -n "$acl_shlibext"; then
57197                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
57198                      found_dir="$dir"
57199                      found_so="$dir/$libname$shrext"
57200                    else
57201                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
57202                        ver=`(cd "$dir" && \
57203                              for f in "$libname$shrext".*; do echo "$f"; done \
57204                              | sed -e "s,^$libname$shrext\\\\.,," \
57205                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
57206                              | sed 1q ) 2>/dev/null`
57207                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
57208                          found_dir="$dir"
57209                          found_so="$dir/$libname$shrext.$ver"
57210                        fi
57211                      else
57212                        eval library_names=\"$acl_library_names_spec\"
57213                        for f in $library_names; do
57214                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
57215                            found_dir="$dir"
57216                            found_so="$dir/$f"
57217                            break
57218                          fi
57219                        done
57220                      fi
57221                    fi
57222                  fi
57223                                    if test "X$found_dir" = "X"; then
57224                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
57225                      found_dir="$dir"
57226                      found_a="$dir/$libname.$acl_libext"
57227                    fi
57228                  fi
57229                  if test "X$found_dir" != "X"; then
57230                    if test -f "$dir/$libname.la"; then
57231                      found_la="$dir/$libname.la"
57232                    fi
57233                  fi
57234                fi
57235              fi
57236            done
57237          fi
57238          if test "X$found_dir" = "X"; then
57239            for x in $LDFLAGS $LTLIBGNUTLS; do
57240
57241  acl_save_prefix="$prefix"
57242  prefix="$acl_final_prefix"
57243  acl_save_exec_prefix="$exec_prefix"
57244  exec_prefix="$acl_final_exec_prefix"
57245  eval x=\"$x\"
57246  exec_prefix="$acl_save_exec_prefix"
57247  prefix="$acl_save_prefix"
57248
57249              case "$x" in
57250                -L*)
57251                  dir=`echo "X$x" | sed -e 's/^X-L//'`
57252                                    if test -n "$acl_shlibext"; then
57253                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
57254                      found_dir="$dir"
57255                      found_so="$dir/$libname$shrext"
57256                    else
57257                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
57258                        ver=`(cd "$dir" && \
57259                              for f in "$libname$shrext".*; do echo "$f"; done \
57260                              | sed -e "s,^$libname$shrext\\\\.,," \
57261                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
57262                              | sed 1q ) 2>/dev/null`
57263                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
57264                          found_dir="$dir"
57265                          found_so="$dir/$libname$shrext.$ver"
57266                        fi
57267                      else
57268                        eval library_names=\"$acl_library_names_spec\"
57269                        for f in $library_names; do
57270                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
57271                            found_dir="$dir"
57272                            found_so="$dir/$f"
57273                            break
57274                          fi
57275                        done
57276                      fi
57277                    fi
57278                  fi
57279                                    if test "X$found_dir" = "X"; then
57280                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
57281                      found_dir="$dir"
57282                      found_a="$dir/$libname.$acl_libext"
57283                    fi
57284                  fi
57285                  if test "X$found_dir" != "X"; then
57286                    if test -f "$dir/$libname.la"; then
57287                      found_la="$dir/$libname.la"
57288                    fi
57289                  fi
57290                  ;;
57291              esac
57292              if test "X$found_dir" != "X"; then
57293                break
57294              fi
57295            done
57296          fi
57297          if test "X$found_dir" != "X"; then
57298                        LTLIBGNUTLS="${LTLIBGNUTLS}${LTLIBGNUTLS:+ }-L$found_dir -l$name"
57299            if test "X$found_so" != "X"; then
57300                                                        if test "$enable_rpath" = no \
57301                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
57302                 || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
57303                 || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
57304                                LIBGNUTLS="${LIBGNUTLS}${LIBGNUTLS:+ }$found_so"
57305              else
57306                                                                                haveit=
57307                for x in $ltrpathdirs; do
57308                  if test "X$x" = "X$found_dir"; then
57309                    haveit=yes
57310                    break
57311                  fi
57312                done
57313                if test -z "$haveit"; then
57314                  ltrpathdirs="$ltrpathdirs $found_dir"
57315                fi
57316                                if test "$acl_hardcode_direct" = yes; then
57317                                                      LIBGNUTLS="${LIBGNUTLS}${LIBGNUTLS:+ }$found_so"
57318                else
57319                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
57320                                                            LIBGNUTLS="${LIBGNUTLS}${LIBGNUTLS:+ }$found_so"
57321                                                            haveit=
57322                    for x in $rpathdirs; do
57323                      if test "X$x" = "X$found_dir"; then
57324                        haveit=yes
57325                        break
57326                      fi
57327                    done
57328                    if test -z "$haveit"; then
57329                      rpathdirs="$rpathdirs $found_dir"
57330                    fi
57331                  else
57332                                                                                haveit=
57333                    for x in $LDFLAGS $LIBGNUTLS; do
57334
57335  acl_save_prefix="$prefix"
57336  prefix="$acl_final_prefix"
57337  acl_save_exec_prefix="$exec_prefix"
57338  exec_prefix="$acl_final_exec_prefix"
57339  eval x=\"$x\"
57340  exec_prefix="$acl_save_exec_prefix"
57341  prefix="$acl_save_prefix"
57342
57343                      if test "X$x" = "X-L$found_dir"; then
57344                        haveit=yes
57345                        break
57346                      fi
57347                    done
57348                    if test -z "$haveit"; then
57349                      LIBGNUTLS="${LIBGNUTLS}${LIBGNUTLS:+ }-L$found_dir"
57350                    fi
57351                    if test "$acl_hardcode_minus_L" != no; then
57352                                                                                        LIBGNUTLS="${LIBGNUTLS}${LIBGNUTLS:+ }$found_so"
57353                    else
57354                                                                                                                                                                                LIBGNUTLS="${LIBGNUTLS}${LIBGNUTLS:+ }-l$name"
57355                    fi
57356                  fi
57357                fi
57358              fi
57359            else
57360              if test "X$found_a" != "X"; then
57361                                LIBGNUTLS="${LIBGNUTLS}${LIBGNUTLS:+ }$found_a"
57362              else
57363                                                LIBGNUTLS="${LIBGNUTLS}${LIBGNUTLS:+ }-L$found_dir -l$name"
57364              fi
57365            fi
57366                        additional_includedir=
57367            case "$found_dir" in
57368              */$acl_libdirstem | */$acl_libdirstem/)
57369                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
57370                if test "$name" = 'gnutls'; then
57371                  LIBGNUTLS_PREFIX="$basedir"
57372                fi
57373                additional_includedir="$basedir/include"
57374                ;;
57375              */$acl_libdirstem2 | */$acl_libdirstem2/)
57376                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
57377                if test "$name" = 'gnutls'; then
57378                  LIBGNUTLS_PREFIX="$basedir"
57379                fi
57380                additional_includedir="$basedir/include"
57381                ;;
57382              */$acl_libdirstem3 | */$acl_libdirstem3/)
57383                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
57384                if test "$name" = 'gnutls'; then
57385                  LIBGNUTLS_PREFIX="$basedir"
57386                fi
57387                additional_includedir="$basedir/include"
57388                ;;
57389            esac
57390            if test "X$additional_includedir" != "X"; then
57391                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
57392                haveit=
57393                if test "X$additional_includedir" = "X/usr/local/include"; then
57394                  if test -n "$GCC"; then
57395                    case $host_os in
57396                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
57397                    esac
57398                  fi
57399                fi
57400                if test -z "$haveit"; then
57401                  for x in $CPPFLAGS $INCGNUTLS; do
57402
57403  acl_save_prefix="$prefix"
57404  prefix="$acl_final_prefix"
57405  acl_save_exec_prefix="$exec_prefix"
57406  exec_prefix="$acl_final_exec_prefix"
57407  eval x=\"$x\"
57408  exec_prefix="$acl_save_exec_prefix"
57409  prefix="$acl_save_prefix"
57410
57411                    if test "X$x" = "X-I$additional_includedir"; then
57412                      haveit=yes
57413                      break
57414                    fi
57415                  done
57416                  if test -z "$haveit"; then
57417                    if test -d "$additional_includedir"; then
57418                                            INCGNUTLS="${INCGNUTLS}${INCGNUTLS:+ }-I$additional_includedir"
57419                    fi
57420                  fi
57421                fi
57422              fi
57423            fi
57424                        if test -n "$found_la"; then
57425                                                        save_libdir="$libdir"
57426              case "$found_la" in
57427                */* | *\\*) . "$found_la" ;;
57428                *) . "./$found_la" ;;
57429              esac
57430              libdir="$save_libdir"
57431                            for dep in $dependency_libs; do
57432                case "$dep" in
57433                  -L*)
57434                    dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
57435                                                                                                                                                                if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
57436                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
57437                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
57438                      haveit=
57439                      if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
57440                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
57441                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
57442                        if test -n "$GCC"; then
57443                          case $host_os in
57444                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
57445                          esac
57446                        fi
57447                      fi
57448                      if test -z "$haveit"; then
57449                        haveit=
57450                        for x in $LDFLAGS $LIBGNUTLS; do
57451
57452  acl_save_prefix="$prefix"
57453  prefix="$acl_final_prefix"
57454  acl_save_exec_prefix="$exec_prefix"
57455  exec_prefix="$acl_final_exec_prefix"
57456  eval x=\"$x\"
57457  exec_prefix="$acl_save_exec_prefix"
57458  prefix="$acl_save_prefix"
57459
57460                          if test "X$x" = "X-L$dependency_libdir"; then
57461                            haveit=yes
57462                            break
57463                          fi
57464                        done
57465                        if test -z "$haveit"; then
57466                          if test -d "$dependency_libdir"; then
57467                                                        LIBGNUTLS="${LIBGNUTLS}${LIBGNUTLS:+ }-L$dependency_libdir"
57468                          fi
57469                        fi
57470                        haveit=
57471                        for x in $LDFLAGS $LTLIBGNUTLS; do
57472
57473  acl_save_prefix="$prefix"
57474  prefix="$acl_final_prefix"
57475  acl_save_exec_prefix="$exec_prefix"
57476  exec_prefix="$acl_final_exec_prefix"
57477  eval x=\"$x\"
57478  exec_prefix="$acl_save_exec_prefix"
57479  prefix="$acl_save_prefix"
57480
57481                          if test "X$x" = "X-L$dependency_libdir"; then
57482                            haveit=yes
57483                            break
57484                          fi
57485                        done
57486                        if test -z "$haveit"; then
57487                          if test -d "$dependency_libdir"; then
57488                                                        LTLIBGNUTLS="${LTLIBGNUTLS}${LTLIBGNUTLS:+ }-L$dependency_libdir"
57489                          fi
57490                        fi
57491                      fi
57492                    fi
57493                    ;;
57494                  -R*)
57495                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
57496                    if test "$enable_rpath" != no; then
57497                                                                  haveit=
57498                      for x in $rpathdirs; do
57499                        if test "X$x" = "X$dir"; then
57500                          haveit=yes
57501                          break
57502                        fi
57503                      done
57504                      if test -z "$haveit"; then
57505                        rpathdirs="$rpathdirs $dir"
57506                      fi
57507                                                                  haveit=
57508                      for x in $ltrpathdirs; do
57509                        if test "X$x" = "X$dir"; then
57510                          haveit=yes
57511                          break
57512                        fi
57513                      done
57514                      if test -z "$haveit"; then
57515                        ltrpathdirs="$ltrpathdirs $dir"
57516                      fi
57517                    fi
57518                    ;;
57519                  -l*)
57520                                                                                                                                                                dep=`echo "X$dep" | sed -e 's/^X-l//'`
57521                    if test "X$dep" != Xc \
57522                       || case $host_os in
57523                            linux* | gnu* | k*bsd*-gnu) false ;;
57524                            *)                          true ;;
57525                          esac; then
57526                      names_next_round="$names_next_round $dep"
57527                    fi
57528                    ;;
57529                  *.la)
57530                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
57531                    ;;
57532                  *)
57533                                        LIBGNUTLS="${LIBGNUTLS}${LIBGNUTLS:+ }$dep"
57534                    LTLIBGNUTLS="${LTLIBGNUTLS}${LTLIBGNUTLS:+ }$dep"
57535                    ;;
57536                esac
57537              done
57538            fi
57539          else
57540                                                            LIBGNUTLS="${LIBGNUTLS}${LIBGNUTLS:+ }-l$name"
57541            LTLIBGNUTLS="${LTLIBGNUTLS}${LTLIBGNUTLS:+ }-l$name"
57542          fi
57543        fi
57544      fi
57545    done
57546  done
57547  if test "X$rpathdirs" != "X"; then
57548    if test -n "$acl_hardcode_libdir_separator"; then
57549                        alldirs=
57550      for found_dir in $rpathdirs; do
57551        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
57552      done
57553            acl_save_libdir="$libdir"
57554      libdir="$alldirs"
57555      eval flag=\"$acl_hardcode_libdir_flag_spec\"
57556      libdir="$acl_save_libdir"
57557      LIBGNUTLS="${LIBGNUTLS}${LIBGNUTLS:+ }$flag"
57558    else
57559            for found_dir in $rpathdirs; do
57560        acl_save_libdir="$libdir"
57561        libdir="$found_dir"
57562        eval flag=\"$acl_hardcode_libdir_flag_spec\"
57563        libdir="$acl_save_libdir"
57564        LIBGNUTLS="${LIBGNUTLS}${LIBGNUTLS:+ }$flag"
57565      done
57566    fi
57567  fi
57568  if test "X$ltrpathdirs" != "X"; then
57569            for found_dir in $ltrpathdirs; do
57570      LTLIBGNUTLS="${LTLIBGNUTLS}${LTLIBGNUTLS:+ }-R$found_dir"
57571    done
57572  fi
57573
57574
57575
57576
57577
57578
57579        ac_save_CPPFLAGS="$CPPFLAGS"
57580
57581  for element in $INCGNUTLS; do
57582    haveit=
57583    for x in $CPPFLAGS; do
57584
57585  acl_save_prefix="$prefix"
57586  prefix="$acl_final_prefix"
57587  acl_save_exec_prefix="$exec_prefix"
57588  exec_prefix="$acl_final_exec_prefix"
57589  eval x=\"$x\"
57590  exec_prefix="$acl_save_exec_prefix"
57591  prefix="$acl_save_prefix"
57592
57593      if test "X$x" = "X$element"; then
57594        haveit=yes
57595        break
57596      fi
57597    done
57598    if test -z "$haveit"; then
57599      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
57600    fi
57601  done
57602
57603
57604  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libgnutls" >&5
57605printf %s "checking for libgnutls... " >&6; }
57606if test ${ac_cv_libgnutls+y}
57607then :
57608  printf %s "(cached) " >&6
57609else $as_nop
57610
57611    ac_save_LIBS="$LIBS"
57612                                case " $LIBGNUTLS" in
57613      *" -l"*) LIBS="$LIBS $LIBGNUTLS" ;;
57614      *)       LIBS="$LIBGNUTLS $LIBS" ;;
57615    esac
57616    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57617/* end confdefs.h.  */
57618
57619#include <gnutls/gnutls.h>
57620
57621int
57622main (void)
57623{
57624gnutls_global_init()
57625  ;
57626  return 0;
57627}
57628_ACEOF
57629if ac_fn_c_try_link "$LINENO"
57630then :
57631  ac_cv_libgnutls=yes
57632else $as_nop
57633  ac_cv_libgnutls='no'
57634fi
57635rm -f core conftest.err conftest.$ac_objext conftest.beam \
57636    conftest$ac_exeext conftest.$ac_ext
57637    LIBS="$ac_save_LIBS"
57638
57639fi
57640{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libgnutls" >&5
57641printf "%s\n" "$ac_cv_libgnutls" >&6; }
57642  if test "$ac_cv_libgnutls" = yes; then
57643    HAVE_LIBGNUTLS=yes
57644
57645printf "%s\n" "#define HAVE_LIBGNUTLS 1" >>confdefs.h
57646
57647    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libgnutls" >&5
57648printf %s "checking how to link with libgnutls... " >&6; }
57649    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBGNUTLS" >&5
57650printf "%s\n" "$LIBGNUTLS" >&6; }
57651  else
57652    HAVE_LIBGNUTLS=no
57653            CPPFLAGS="$ac_save_CPPFLAGS"
57654    LIBGNUTLS=
57655    LTLIBGNUTLS=
57656    LIBGNUTLS_PREFIX=
57657  fi
57658
57659
57660
57661
57662
57663
57664
57665      if test x"$LIBGNUTLS" != x
57666      then
57667        ssl_found=yes
57668        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: compiling in support for SSL via GnuTLS" >&5
57669printf "%s\n" "$as_me: compiling in support for SSL via GnuTLS" >&6;}
57670        case " $LIBOBJS " in
57671  *" gnutls.$ac_objext "* ) ;;
57672  *) LIBOBJS="$LIBOBJS gnutls.$ac_objext"
57673 ;;
57674esac
57675
57676        LIBS="$LIBGNUTLS $LIBS"
57677      else
57678        as_fn_error $? "GnuTLS has not been found. Use --with-ssl=openssl if you explicitly want OpenSSL." "$LINENO" 5
57679      fi
57680    fi
57681
57682    ac_fn_c_check_func "$LINENO" "gnutls_priority_set_direct" "ac_cv_func_gnutls_priority_set_direct"
57683if test "x$ac_cv_func_gnutls_priority_set_direct" = xyes
57684then :
57685  printf "%s\n" "#define HAVE_GNUTLS_PRIORITY_SET_DIRECT 1" >>confdefs.h
57686
57687fi
57688
57689
57690fi # endif: --with-ssl != no?
57691
57692fi # endif: --with-ssl == openssl?
57693
57694if test x"$LIBSSL" != x || test "$ac_cv_lib_ssl32_SSL_connect" = yes
57695then
57696  if test x"$ENABLE_NTLM" != xno
57697  then
57698    ENABLE_NTLM=yes
57699
57700printf "%s\n" "#define ENABLE_NTLM 1" >>confdefs.h
57701
57702    case " $LIBOBJS " in
57703  *" http-ntlm.$ac_objext "* ) ;;
57704  *) LIBOBJS="$LIBOBJS http-ntlm.$ac_objext"
57705 ;;
57706esac
57707
57708  fi
57709else
57710  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nettle_md4_init in -lnettle" >&5
57711printf %s "checking for nettle_md4_init in -lnettle... " >&6; }
57712if test ${ac_cv_lib_nettle_nettle_md4_init+y}
57713then :
57714  printf %s "(cached) " >&6
57715else $as_nop
57716  ac_check_lib_save_LIBS=$LIBS
57717LIBS="-lnettle  $LIBS"
57718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57719/* end confdefs.h.  */
57720
57721/* Override any GCC internal prototype to avoid an error.
57722   Use char because int might match the return type of a GCC
57723   builtin and then its argument prototype would still apply.  */
57724char nettle_md4_init ();
57725int
57726main (void)
57727{
57728return nettle_md4_init ();
57729  ;
57730  return 0;
57731}
57732_ACEOF
57733if ac_fn_c_try_link "$LINENO"
57734then :
57735  ac_cv_lib_nettle_nettle_md4_init=yes
57736else $as_nop
57737  ac_cv_lib_nettle_nettle_md4_init=no
57738fi
57739rm -f core conftest.err conftest.$ac_objext conftest.beam \
57740    conftest$ac_exeext conftest.$ac_ext
57741LIBS=$ac_check_lib_save_LIBS
57742fi
57743{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nettle_nettle_md4_init" >&5
57744printf "%s\n" "$ac_cv_lib_nettle_nettle_md4_init" >&6; }
57745if test "x$ac_cv_lib_nettle_nettle_md4_init" = xyes
57746then :
57747  HAVE_NETTLE=yes
57748else $as_nop
57749  HAVE_NETTLE=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** libnettle was not found. You will not be able to use NTLM" >&5
57750printf "%s\n" "$as_me: WARNING: *** libnettle was not found. You will not be able to use NTLM" >&2;}
57751fi
57752
57753
57754  if test x"$HAVE_NETTLE" = xyes
57755  then
57756    NETTLE_LIBS="-lnettle"
57757
57758
57759printf "%s\n" "#define HAVE_NETTLE 1" >>confdefs.h
57760
57761    if test x"$ENABLE_NTLM" != xno
57762    then
57763      ENABLE_NTLM=yes
57764
57765printf "%s\n" "#define ENABLE_NTLM 1" >>confdefs.h
57766
57767      case " $LIBOBJS " in
57768  *" http-ntlm.$ac_objext "* ) ;;
57769  *) LIBOBJS="$LIBOBJS http-ntlm.$ac_objext"
57770 ;;
57771esac
57772
57773      LIBS="$NETTLE_LIBS $LIBS"
57774    fi
57775  else
57776            if test x"$ENABLE_NTLM" = xyes
57777    then
57778      as_fn_error $? "NTLM authorization requested and SSL not enabled; aborting" "$LINENO" 5
57779    fi
57780  fi
57781fi
57782
57783
57784
57785# Check whether --enable-ipv6 was given.
57786if test ${enable_ipv6+y}
57787then :
57788  enableval=$enable_ipv6; case "${enable_ipv6}" in
57789    no)
57790      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: disabling IPv6 at user request" >&5
57791printf "%s\n" "$as_me: disabling IPv6 at user request" >&6;}
57792            ipv6=no
57793      ;;
57794    yes)
57795            ipv6=yes
57796      force_ipv6=yes
57797      ;;
57798    auto)
57799            ipv6=yes
57800      ;;
57801    *)
57802      as_fn_error $? "Invalid --enable-ipv6 argument '$enable_ipv6'" "$LINENO" 5
57803      ;;
57804    esac
57805
57806else $as_nop
57807
57808        ipv6=yes
57809
57810
57811fi
57812
57813
57814if test "X$ipv6" = "Xyes"; then
57815
57816  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for INET6 protocol support" >&5
57817printf %s "checking for INET6 protocol support... " >&6; }
57818if test ${wget_cv_proto_inet6+y}
57819then :
57820  printf %s "(cached) " >&6
57821else $as_nop
57822
57823    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57824/* end confdefs.h.  */
57825
57826#include <sys/types.h>
57827#ifdef HAVE_SYS_SOCKET_H
57828#include <sys/socket.h>
57829#endif
57830#ifdef HAVE_NETINET_IN_H
57831#include <netinet/in.h>
57832#endif
57833#ifdef HAVE_WINSOCK2_H
57834#include <winsock2.h>
57835#endif
57836#ifdef HAVE_WS2TCPIP_H
57837#include <ws2tcpip.h>
57838#endif
57839#ifndef PF_INET6
57840#error Missing PF_INET6
57841#endif
57842#ifndef AF_INET6
57843#error Missing AF_INET6
57844#endif
57845
57846_ACEOF
57847if ac_fn_c_try_cpp "$LINENO"
57848then :
57849
57850      wget_cv_proto_inet6=yes
57851
57852else $as_nop
57853
57854      wget_cv_proto_inet6=no
57855
57856fi
57857rm -f conftest.err conftest.i conftest.$ac_ext
57858
57859fi
57860{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $wget_cv_proto_inet6" >&5
57861printf "%s\n" "$wget_cv_proto_inet6" >&6; }
57862
57863  if test "X$wget_cv_proto_inet6" = "Xyes"; then :
57864
57865  else :
57866
57867    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Disabling IPv6 support: your system does not support the PF_INET6 protocol family" >&5
57868printf "%s\n" "$as_me: Disabling IPv6 support: your system does not support the PF_INET6 protocol family" >&6;}
57869    ipv6=no
57870
57871  fi
57872
57873fi
57874
57875if test "X$ipv6" = "Xyes"; then
57876
57877  wget_have_sockaddr_in6=
57878  ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "
57879#include <sys/types.h>
57880#ifdef HAVE_SYS_SOCKET_H
57881#include <sys/socket.h>
57882#endif
57883#ifdef HAVE_NETINET_IN_H
57884#include <netinet/in.h>
57885#endif
57886#ifdef HAVE_WINSOCK2_H
57887#include <winsock2.h>
57888#endif
57889#ifdef HAVE_WS2TCPIP_H
57890#include <ws2tcpip.h>
57891#endif
57892
57893"
57894if test "x$ac_cv_type_struct_sockaddr_in6" = xyes
57895then :
57896
57897printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_IN6 1" >>confdefs.h
57898
57899
57900    wget_have_sockaddr_in6=yes
57901
57902else $as_nop
57903
57904    wget_have_sockaddr_in6=no
57905
57906fi
57907
57908
57909  if test "X$wget_have_sockaddr_in6" = "Xyes"; then :
57910
57911  else :
57912
57913    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Disabling IPv6 support: your system does not support 'struct sockaddr_in6'" >&5
57914printf "%s\n" "$as_me: Disabling IPv6 support: your system does not support 'struct sockaddr_in6'" >&6;}
57915    ipv6=no
57916
57917  fi
57918
57919  if test "X$ipv6" = "Xyes"; then
57920
57921  ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
57922#include <sys/types.h>
57923#ifdef HAVE_SYS_SOCKET_H
57924#include <sys/socket.h>
57925#endif
57926#ifdef HAVE_WINSOCK2_H
57927#include <winsock2.h>
57928#endif
57929
57930"
57931if test "x$ac_cv_type_struct_sockaddr_storage" = xyes
57932then :
57933
57934printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
57935
57936
57937fi
57938
57939
57940
57941
57942
57943  wget_member_sin6_scope_id=
57944  if test "X$wget_have_sockaddr_in6" = "Xyes"; then
57945    ac_fn_c_check_member "$LINENO" "struct sockaddr_in6" "sin6_scope_id" "ac_cv_member_struct_sockaddr_in6_sin6_scope_id" "
57946#include <sys/types.h>
57947#ifdef HAVE_SYS_SOCKET_H
57948#include <sys/socket.h>
57949#endif
57950#ifdef HAVE_NETINET_IN_H
57951#include <netinet/in.h>
57952#endif
57953#ifdef HAVE_WINSOCK2_H
57954#include <winsock2.h>
57955#endif
57956#ifdef HAVE_WS2TCPIP_H
57957#include <ws2tcpip.h>
57958#endif
57959
57960"
57961if test "x$ac_cv_member_struct_sockaddr_in6_sin6_scope_id" = xyes
57962then :
57963
57964      wget_member_sin6_scope_id=yes
57965
57966else $as_nop
57967
57968      wget_member_sin6_scope_id=no
57969
57970fi
57971
57972  fi
57973
57974  if test "X$wget_member_sin6_scope_id" = "Xyes"; then
57975
57976printf "%s\n" "#define HAVE_SOCKADDR_IN6_SCOPE_ID 1" >>confdefs.h
57977
57978
57979  else :
57980
57981  fi
57982
57983  fi
57984fi
57985
57986if test "X$ipv6" = "Xyes"; then
57987
57988printf "%s\n" "#define ENABLE_IPV6 1" >>confdefs.h
57989
57990  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Enabling support for IPv6." >&5
57991printf "%s\n" "$as_me: Enabling support for IPv6." >&6;}
57992elif test "x$force_ipv6" = "xyes"; then
57993  as_fn_error $? "IPv6 support requested but not found; aborting" "$LINENO" 5
57994fi
57995
57996
57997for ac_prog in makeinfo
57998do
57999  # Extract the first word of "$ac_prog", so it can be a program name with args.
58000set dummy $ac_prog; ac_word=$2
58001{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
58002printf %s "checking for $ac_word... " >&6; }
58003if test ${ac_cv_prog_MAKEINFO+y}
58004then :
58005  printf %s "(cached) " >&6
58006else $as_nop
58007  if test -n "$MAKEINFO"; then
58008  ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
58009else
58010as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58011for as_dir in $PATH
58012do
58013  IFS=$as_save_IFS
58014  case $as_dir in #(((
58015    '') as_dir=./ ;;
58016    */) ;;
58017    *) as_dir=$as_dir/ ;;
58018  esac
58019    for ac_exec_ext in '' $ac_executable_extensions; do
58020  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
58021    ac_cv_prog_MAKEINFO="$ac_prog"
58022    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
58023    break 2
58024  fi
58025done
58026  done
58027IFS=$as_save_IFS
58028
58029fi
58030fi
58031MAKEINFO=$ac_cv_prog_MAKEINFO
58032if test -n "$MAKEINFO"; then
58033  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
58034printf "%s\n" "$MAKEINFO" >&6; }
58035else
58036  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
58037printf "%s\n" "no" >&6; }
58038fi
58039
58040
58041  test -n "$MAKEINFO" && break
58042done
58043test -n "$MAKEINFO" || MAKEINFO="true"
58044
58045
58046
58047for ac_prog in perl5 perl
58048do
58049  # Extract the first word of "$ac_prog", so it can be a program name with args.
58050set dummy $ac_prog; ac_word=$2
58051{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
58052printf %s "checking for $ac_word... " >&6; }
58053if test ${ac_cv_path_PERL+y}
58054then :
58055  printf %s "(cached) " >&6
58056else $as_nop
58057  case $PERL in
58058  [\\/]* | ?:[\\/]*)
58059  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
58060  ;;
58061  *)
58062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58063for as_dir in $PATH
58064do
58065  IFS=$as_save_IFS
58066  case $as_dir in #(((
58067    '') as_dir=./ ;;
58068    */) ;;
58069    *) as_dir=$as_dir/ ;;
58070  esac
58071    for ac_exec_ext in '' $ac_executable_extensions; do
58072  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
58073    ac_cv_path_PERL="$as_dir$ac_word$ac_exec_ext"
58074    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
58075    break 2
58076  fi
58077done
58078  done
58079IFS=$as_save_IFS
58080
58081  ;;
58082esac
58083fi
58084PERL=$ac_cv_path_PERL
58085if test -n "$PERL"; then
58086  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
58087printf "%s\n" "$PERL" >&6; }
58088else
58089  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
58090printf "%s\n" "no" >&6; }
58091fi
58092
58093
58094  test -n "$PERL" && break
58095done
58096test -n "$PERL" || PERL="no"
58097
58098# Extract the first word of "pod2man", so it can be a program name with args.
58099set dummy pod2man; ac_word=$2
58100{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
58101printf %s "checking for $ac_word... " >&6; }
58102if test ${ac_cv_path_POD2MAN+y}
58103then :
58104  printf %s "(cached) " >&6
58105else $as_nop
58106  case $POD2MAN in
58107  [\\/]* | ?:[\\/]*)
58108  ac_cv_path_POD2MAN="$POD2MAN" # Let the user override the test with a path.
58109  ;;
58110  *)
58111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58112for as_dir in $PATH
58113do
58114  IFS=$as_save_IFS
58115  case $as_dir in #(((
58116    '') as_dir=./ ;;
58117    */) ;;
58118    *) as_dir=$as_dir/ ;;
58119  esac
58120    for ac_exec_ext in '' $ac_executable_extensions; do
58121  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
58122    ac_cv_path_POD2MAN="$as_dir$ac_word$ac_exec_ext"
58123    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
58124    break 2
58125  fi
58126done
58127  done
58128IFS=$as_save_IFS
58129
58130  test -z "$ac_cv_path_POD2MAN" && ac_cv_path_POD2MAN="no"
58131  ;;
58132esac
58133fi
58134POD2MAN=$ac_cv_path_POD2MAN
58135if test -n "$POD2MAN"; then
58136  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $POD2MAN" >&5
58137printf "%s\n" "$POD2MAN" >&6; }
58138else
58139  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
58140printf "%s\n" "no" >&6; }
58141fi
58142
58143
58144
58145if test "x${POD2MAN}" = xno; then
58146  COMMENT_IF_NO_POD2MAN="# "
58147else
58148  COMMENT_IF_NO_POD2MAN=
58149fi
58150
58151
58152
58153
58154# Check whether --enable-iri was given.
58155if test ${enable_iri+y}
58156then :
58157  enableval=$enable_iri; case "${enable_iri}" in
58158    no)
58159            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: disabling IRIs at user request" >&5
58160printf "%s\n" "$as_me: disabling IRIs at user request" >&6;}
58161      iri=no
58162      ;;
58163    yes)
58164            iri=yes
58165      force_iri=yes
58166      ;;
58167    auto)
58168            iri=yes
58169      ;;
58170    *)
58171      as_fn_error $? "Invalid --enable-iri argument '$enable_iri'" "$LINENO" 5
58172      ;;
58173    esac
58174
58175else $as_nop
58176
58177        iri=yes
58178
58179
58180fi
58181
58182
58183if test "X$iri" != "Xno"
58184then :
58185
58186  if test "X$am_cv_func_iconv" != "Xyes"; then
58187    iri=no
58188    if test "X$force_iri" = "Xyes"; then
58189      as_fn_error $? "Libiconv is required for IRIs support" "$LINENO" 5
58190    else
58191      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: disabling IRIs because libiconv wasn't found" >&5
58192printf "%s\n" "$as_me: disabling IRIs because libiconv wasn't found" >&6;}
58193    fi
58194  fi
58195
58196fi
58197
58198
58199# Check whether --with-libidn was given.
58200if test ${with_libidn+y}
58201then :
58202  withval=$with_libidn; libidn=$withval
58203else $as_nop
58204  libidn=""
58205fi
58206
58207if test "X$iri" != "Xno"; then
58208  if test "x$with_libidn2" != xno
58209then :
58210
58211    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing idn2_lookup_u8" >&5
58212printf %s "checking for library containing idn2_lookup_u8... " >&6; }
58213if test ${ac_cv_search_idn2_lookup_u8+y}
58214then :
58215  printf %s "(cached) " >&6
58216else $as_nop
58217  ac_func_search_save_LIBS=$LIBS
58218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58219/* end confdefs.h.  */
58220
58221/* Override any GCC internal prototype to avoid an error.
58222   Use char because int might match the return type of a GCC
58223   builtin and then its argument prototype would still apply.  */
58224char idn2_lookup_u8 ();
58225int
58226main (void)
58227{
58228return idn2_lookup_u8 ();
58229  ;
58230  return 0;
58231}
58232_ACEOF
58233for ac_lib in '' idn2
58234do
58235  if test -z "$ac_lib"; then
58236    ac_res="none required"
58237  else
58238    ac_res=-l$ac_lib
58239    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
58240  fi
58241  if ac_fn_c_try_link "$LINENO"
58242then :
58243  ac_cv_search_idn2_lookup_u8=$ac_res
58244fi
58245rm -f core conftest.err conftest.$ac_objext conftest.beam \
58246    conftest$ac_exeext
58247  if test ${ac_cv_search_idn2_lookup_u8+y}
58248then :
58249  break
58250fi
58251done
58252if test ${ac_cv_search_idn2_lookup_u8+y}
58253then :
58254
58255else $as_nop
58256  ac_cv_search_idn2_lookup_u8=no
58257fi
58258rm conftest.$ac_ext
58259LIBS=$ac_func_search_save_LIBS
58260fi
58261{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_idn2_lookup_u8" >&5
58262printf "%s\n" "$ac_cv_search_idn2_lookup_u8" >&6; }
58263ac_res=$ac_cv_search_idn2_lookup_u8
58264if test "$ac_res" != no
58265then :
58266  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
58267  with_libidn2=yes;
58268printf "%s\n" "#define ENABLE_IRI 1" >>confdefs.h
58269
58270else $as_nop
58271  with_libidn2=no; iri=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** LIBIDN2 was not found. You will not be able to use IDN2008 support" >&5
58272printf "%s\n" "$as_me: WARNING: *** LIBIDN2 was not found. You will not be able to use IDN2008 support" >&2;}
58273fi
58274
58275
58276#    AS_IF([test "x$with_libidn2" = xyes], [
58277#      AC_SEARCH_LIBS(u8_tolower, unistring,
58278#        [AC_DEFINE([ENABLE_IRI], 1, [Define if IRI support is enabled.])],
58279#        [iri=no; AC_MSG_WARN(*** LIBUNISTRING was not found. You will not be able to use IDN2008 support)])
58280#    ])
58281
58282fi
58283fi
58284
58285
58286
58287# Check whether --with-libuuid was given.
58288if test ${with_libuuid+y}
58289then :
58290  withval=$with_libuuid;
58291fi
58292
58293
58294if test "x$with_libuuid" = xyes
58295then :
58296
58297  # libuuid was explicitly requested
58298
58299pkg_failed=no
58300{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for UUID" >&5
58301printf %s "checking for UUID... " >&6; }
58302
58303if test -n "$UUID_CFLAGS"; then
58304    pkg_cv_UUID_CFLAGS="$UUID_CFLAGS"
58305 elif test -n "$PKG_CONFIG"; then
58306    if test -n "$PKG_CONFIG" && \
58307    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"uuid\""; } >&5
58308  ($PKG_CONFIG --exists --print-errors "uuid") 2>&5
58309  ac_status=$?
58310  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58311  test $ac_status = 0; }; then
58312  pkg_cv_UUID_CFLAGS=`$PKG_CONFIG --cflags "uuid" 2>/dev/null`
58313		      test "x$?" != "x0" && pkg_failed=yes
58314else
58315  pkg_failed=yes
58316fi
58317 else
58318    pkg_failed=untried
58319fi
58320if test -n "$UUID_LIBS"; then
58321    pkg_cv_UUID_LIBS="$UUID_LIBS"
58322 elif test -n "$PKG_CONFIG"; then
58323    if test -n "$PKG_CONFIG" && \
58324    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"uuid\""; } >&5
58325  ($PKG_CONFIG --exists --print-errors "uuid") 2>&5
58326  ac_status=$?
58327  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58328  test $ac_status = 0; }; then
58329  pkg_cv_UUID_LIBS=`$PKG_CONFIG --libs "uuid" 2>/dev/null`
58330		      test "x$?" != "x0" && pkg_failed=yes
58331else
58332  pkg_failed=yes
58333fi
58334 else
58335    pkg_failed=untried
58336fi
58337
58338
58339
58340if test $pkg_failed = yes; then
58341   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
58342printf "%s\n" "no" >&6; }
58343
58344if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58345        _pkg_short_errors_supported=yes
58346else
58347        _pkg_short_errors_supported=no
58348fi
58349        if test $_pkg_short_errors_supported = yes; then
58350	        UUID_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "uuid" 2>&1`
58351        else
58352	        UUID_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "uuid" 2>&1`
58353        fi
58354	# Put the nasty error message in config.log where it belongs
58355	echo "$UUID_PKG_ERRORS" >&5
58356
58357
58358    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_generate" >&5
58359printf %s "checking for library containing uuid_generate... " >&6; }
58360if test ${ac_cv_search_uuid_generate+y}
58361then :
58362  printf %s "(cached) " >&6
58363else $as_nop
58364  ac_func_search_save_LIBS=$LIBS
58365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58366/* end confdefs.h.  */
58367
58368/* Override any GCC internal prototype to avoid an error.
58369   Use char because int might match the return type of a GCC
58370   builtin and then its argument prototype would still apply.  */
58371char uuid_generate ();
58372int
58373main (void)
58374{
58375return uuid_generate ();
58376  ;
58377  return 0;
58378}
58379_ACEOF
58380for ac_lib in '' uuid
58381do
58382  if test -z "$ac_lib"; then
58383    ac_res="none required"
58384  else
58385    ac_res=-l$ac_lib
58386    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
58387  fi
58388  if ac_fn_c_try_link "$LINENO"
58389then :
58390  ac_cv_search_uuid_generate=$ac_res
58391fi
58392rm -f core conftest.err conftest.$ac_objext conftest.beam \
58393    conftest$ac_exeext
58394  if test ${ac_cv_search_uuid_generate+y}
58395then :
58396  break
58397fi
58398done
58399if test ${ac_cv_search_uuid_generate+y}
58400then :
58401
58402else $as_nop
58403  ac_cv_search_uuid_generate=no
58404fi
58405rm conftest.$ac_ext
58406LIBS=$ac_func_search_save_LIBS
58407fi
58408{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_generate" >&5
58409printf "%s\n" "$ac_cv_search_uuid_generate" >&6; }
58410ac_res=$ac_cv_search_uuid_generate
58411if test "$ac_res" != no
58412then :
58413  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
58414  uuid_mode=1
58415else $as_nop
58416  as_fn_error $? "*** libuuid was explicitly requested but wasn't found." "$LINENO" 5
58417fi
58418
58419
58420elif test $pkg_failed = untried; then
58421     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
58422printf "%s\n" "no" >&6; }
58423
58424    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_generate" >&5
58425printf %s "checking for library containing uuid_generate... " >&6; }
58426if test ${ac_cv_search_uuid_generate+y}
58427then :
58428  printf %s "(cached) " >&6
58429else $as_nop
58430  ac_func_search_save_LIBS=$LIBS
58431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58432/* end confdefs.h.  */
58433
58434/* Override any GCC internal prototype to avoid an error.
58435   Use char because int might match the return type of a GCC
58436   builtin and then its argument prototype would still apply.  */
58437char uuid_generate ();
58438int
58439main (void)
58440{
58441return uuid_generate ();
58442  ;
58443  return 0;
58444}
58445_ACEOF
58446for ac_lib in '' uuid
58447do
58448  if test -z "$ac_lib"; then
58449    ac_res="none required"
58450  else
58451    ac_res=-l$ac_lib
58452    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
58453  fi
58454  if ac_fn_c_try_link "$LINENO"
58455then :
58456  ac_cv_search_uuid_generate=$ac_res
58457fi
58458rm -f core conftest.err conftest.$ac_objext conftest.beam \
58459    conftest$ac_exeext
58460  if test ${ac_cv_search_uuid_generate+y}
58461then :
58462  break
58463fi
58464done
58465if test ${ac_cv_search_uuid_generate+y}
58466then :
58467
58468else $as_nop
58469  ac_cv_search_uuid_generate=no
58470fi
58471rm conftest.$ac_ext
58472LIBS=$ac_func_search_save_LIBS
58473fi
58474{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_generate" >&5
58475printf "%s\n" "$ac_cv_search_uuid_generate" >&6; }
58476ac_res=$ac_cv_search_uuid_generate
58477if test "$ac_res" != no
58478then :
58479  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
58480  uuid_mode=1
58481else $as_nop
58482  as_fn_error $? "*** libuuid was explicitly requested but wasn't found." "$LINENO" 5
58483fi
58484
58485
58486else
58487	UUID_CFLAGS=$pkg_cv_UUID_CFLAGS
58488	UUID_LIBS=$pkg_cv_UUID_LIBS
58489        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58490printf "%s\n" "yes" >&6; }
58491
58492    LIBS="$UUID_LIBS $LIBS"
58493    CFLAGS="$UUID_CFLAGS $CFLAGS"
58494    uuid_mode=1
58495
58496fi
58497
58498elif test "x$with_libuuid" = xno
58499then :
58500
58501  # libuuid was explicitly *not* requested
58502  ac_fn_c_check_header_compile "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
58503if test "x$ac_cv_header_uuid_h" = xyes
58504then :
58505  ac_fn_c_check_func "$LINENO" "uuid_create" "ac_cv_func_uuid_create"
58506if test "x$ac_cv_func_uuid_create" = xyes
58507then :
58508  uuid_mode=2
58509fi
58510
58511fi
58512
58513
58514else $as_nop
58515
58516  # default:
58517  ac_fn_c_check_header_compile "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
58518if test "x$ac_cv_header_uuid_h" = xyes
58519then :
58520
58521    ac_fn_c_check_func "$LINENO" "uuid_create" "ac_cv_func_uuid_create"
58522if test "x$ac_cv_func_uuid_create" = xyes
58523then :
58524  uuid_mode=2
58525fi
58526
58527
58528else $as_nop
58529
58530    ac_fn_c_check_header_compile "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
58531if test "x$ac_cv_header_uuid_uuid_h" = xyes
58532then :
58533  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_generate" >&5
58534printf %s "checking for library containing uuid_generate... " >&6; }
58535if test ${ac_cv_search_uuid_generate+y}
58536then :
58537  printf %s "(cached) " >&6
58538else $as_nop
58539  ac_func_search_save_LIBS=$LIBS
58540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58541/* end confdefs.h.  */
58542
58543/* Override any GCC internal prototype to avoid an error.
58544   Use char because int might match the return type of a GCC
58545   builtin and then its argument prototype would still apply.  */
58546char uuid_generate ();
58547int
58548main (void)
58549{
58550return uuid_generate ();
58551  ;
58552  return 0;
58553}
58554_ACEOF
58555for ac_lib in '' uuid
58556do
58557  if test -z "$ac_lib"; then
58558    ac_res="none required"
58559  else
58560    ac_res=-l$ac_lib
58561    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
58562  fi
58563  if ac_fn_c_try_link "$LINENO"
58564then :
58565  ac_cv_search_uuid_generate=$ac_res
58566fi
58567rm -f core conftest.err conftest.$ac_objext conftest.beam \
58568    conftest$ac_exeext
58569  if test ${ac_cv_search_uuid_generate+y}
58570then :
58571  break
58572fi
58573done
58574if test ${ac_cv_search_uuid_generate+y}
58575then :
58576
58577else $as_nop
58578  ac_cv_search_uuid_generate=no
58579fi
58580rm conftest.$ac_ext
58581LIBS=$ac_func_search_save_LIBS
58582fi
58583{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_generate" >&5
58584printf "%s\n" "$ac_cv_search_uuid_generate" >&6; }
58585ac_res=$ac_cv_search_uuid_generate
58586if test "$ac_res" != no
58587then :
58588  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
58589  uuid_mode=1
58590fi
58591
58592fi
58593
58594
58595fi
58596
58597
58598fi
58599
58600if test "x$uuid_mode" = x1
58601then :
58602
58603
58604printf "%s\n" "#define HAVE_LIBUUID 1" >>confdefs.h
58605
58606
58607elif test "x$uuid_mode" = x2
58608then :
58609
58610
58611printf "%s\n" "#define HAVE_UUID_CREATE 1" >>confdefs.h
58612
58613
58614fi
58615
58616
58617# Check whether --enable-pcre2 was given.
58618if test ${enable_pcre2+y}
58619then :
58620  enableval=$enable_pcre2;
58621fi
58622
58623# Check whether --enable-pcre was given.
58624if test ${enable_pcre+y}
58625then :
58626  enableval=$enable_pcre;
58627fi
58628
58629
58630if test "X$enable_pcre2" != "Xno"
58631then :
58632
58633  enable_pcre2=no
58634
58635pkg_failed=no
58636{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PCRE2" >&5
58637printf %s "checking for PCRE2... " >&6; }
58638
58639if test -n "$PCRE2_CFLAGS"; then
58640    pkg_cv_PCRE2_CFLAGS="$PCRE2_CFLAGS"
58641 elif test -n "$PKG_CONFIG"; then
58642    if test -n "$PKG_CONFIG" && \
58643    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcre2-8\""; } >&5
58644  ($PKG_CONFIG --exists --print-errors "libpcre2-8") 2>&5
58645  ac_status=$?
58646  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58647  test $ac_status = 0; }; then
58648  pkg_cv_PCRE2_CFLAGS=`$PKG_CONFIG --cflags "libpcre2-8" 2>/dev/null`
58649		      test "x$?" != "x0" && pkg_failed=yes
58650else
58651  pkg_failed=yes
58652fi
58653 else
58654    pkg_failed=untried
58655fi
58656if test -n "$PCRE2_LIBS"; then
58657    pkg_cv_PCRE2_LIBS="$PCRE2_LIBS"
58658 elif test -n "$PKG_CONFIG"; then
58659    if test -n "$PKG_CONFIG" && \
58660    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcre2-8\""; } >&5
58661  ($PKG_CONFIG --exists --print-errors "libpcre2-8") 2>&5
58662  ac_status=$?
58663  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58664  test $ac_status = 0; }; then
58665  pkg_cv_PCRE2_LIBS=`$PKG_CONFIG --libs "libpcre2-8" 2>/dev/null`
58666		      test "x$?" != "x0" && pkg_failed=yes
58667else
58668  pkg_failed=yes
58669fi
58670 else
58671    pkg_failed=untried
58672fi
58673
58674
58675
58676if test $pkg_failed = yes; then
58677   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
58678printf "%s\n" "no" >&6; }
58679
58680if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58681        _pkg_short_errors_supported=yes
58682else
58683        _pkg_short_errors_supported=no
58684fi
58685        if test $_pkg_short_errors_supported = yes; then
58686	        PCRE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libpcre2-8" 2>&1`
58687        else
58688	        PCRE2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libpcre2-8" 2>&1`
58689        fi
58690	# Put the nasty error message in config.log where it belongs
58691	echo "$PCRE2_PKG_ERRORS" >&5
58692
58693
58694    ac_fn_c_check_header_compile "$LINENO" "pcre2.h" "ac_cv_header_pcre2_h" "$ac_includes_default"
58695if test "x$ac_cv_header_pcre2_h" = xyes
58696then :
58697
58698      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pcre2_compile_8 in -lpcre2-8" >&5
58699printf %s "checking for pcre2_compile_8 in -lpcre2-8... " >&6; }
58700if test ${ac_cv_lib_pcre2_8_pcre2_compile_8+y}
58701then :
58702  printf %s "(cached) " >&6
58703else $as_nop
58704  ac_check_lib_save_LIBS=$LIBS
58705LIBS="-lpcre2-8  $LIBS"
58706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58707/* end confdefs.h.  */
58708
58709/* Override any GCC internal prototype to avoid an error.
58710   Use char because int might match the return type of a GCC
58711   builtin and then its argument prototype would still apply.  */
58712char pcre2_compile_8 ();
58713int
58714main (void)
58715{
58716return pcre2_compile_8 ();
58717  ;
58718  return 0;
58719}
58720_ACEOF
58721if ac_fn_c_try_link "$LINENO"
58722then :
58723  ac_cv_lib_pcre2_8_pcre2_compile_8=yes
58724else $as_nop
58725  ac_cv_lib_pcre2_8_pcre2_compile_8=no
58726fi
58727rm -f core conftest.err conftest.$ac_objext conftest.beam \
58728    conftest$ac_exeext conftest.$ac_ext
58729LIBS=$ac_check_lib_save_LIBS
58730fi
58731{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcre2_8_pcre2_compile_8" >&5
58732printf "%s\n" "$ac_cv_lib_pcre2_8_pcre2_compile_8" >&6; }
58733if test "x$ac_cv_lib_pcre2_8_pcre2_compile_8" = xyes
58734then :
58735
58736        LIBS="${LIBS} -lpcre2-8"
58737
58738printf "%s\n" "#define HAVE_LIBPCRE2 1" >>confdefs.h
58739
58740        enable_pcre2=yes
58741
58742fi
58743
58744
58745fi
58746
58747
58748elif test $pkg_failed = untried; then
58749     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
58750printf "%s\n" "no" >&6; }
58751
58752    ac_fn_c_check_header_compile "$LINENO" "pcre2.h" "ac_cv_header_pcre2_h" "$ac_includes_default"
58753if test "x$ac_cv_header_pcre2_h" = xyes
58754then :
58755
58756      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pcre2_compile_8 in -lpcre2-8" >&5
58757printf %s "checking for pcre2_compile_8 in -lpcre2-8... " >&6; }
58758if test ${ac_cv_lib_pcre2_8_pcre2_compile_8+y}
58759then :
58760  printf %s "(cached) " >&6
58761else $as_nop
58762  ac_check_lib_save_LIBS=$LIBS
58763LIBS="-lpcre2-8  $LIBS"
58764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58765/* end confdefs.h.  */
58766
58767/* Override any GCC internal prototype to avoid an error.
58768   Use char because int might match the return type of a GCC
58769   builtin and then its argument prototype would still apply.  */
58770char pcre2_compile_8 ();
58771int
58772main (void)
58773{
58774return pcre2_compile_8 ();
58775  ;
58776  return 0;
58777}
58778_ACEOF
58779if ac_fn_c_try_link "$LINENO"
58780then :
58781  ac_cv_lib_pcre2_8_pcre2_compile_8=yes
58782else $as_nop
58783  ac_cv_lib_pcre2_8_pcre2_compile_8=no
58784fi
58785rm -f core conftest.err conftest.$ac_objext conftest.beam \
58786    conftest$ac_exeext conftest.$ac_ext
58787LIBS=$ac_check_lib_save_LIBS
58788fi
58789{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcre2_8_pcre2_compile_8" >&5
58790printf "%s\n" "$ac_cv_lib_pcre2_8_pcre2_compile_8" >&6; }
58791if test "x$ac_cv_lib_pcre2_8_pcre2_compile_8" = xyes
58792then :
58793
58794        LIBS="${LIBS} -lpcre2-8"
58795
58796printf "%s\n" "#define HAVE_LIBPCRE2 1" >>confdefs.h
58797
58798        enable_pcre2=yes
58799
58800fi
58801
58802
58803fi
58804
58805
58806else
58807	PCRE2_CFLAGS=$pkg_cv_PCRE2_CFLAGS
58808	PCRE2_LIBS=$pkg_cv_PCRE2_LIBS
58809        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58810printf "%s\n" "yes" >&6; }
58811
58812    CFLAGS="$PCRE2_CFLAGS $CFLAGS"
58813    LIBS="$PCRE2_LIBS $LIBS"
58814
58815printf "%s\n" "#define HAVE_LIBPCRE2 1" >>confdefs.h
58816
58817    enable_pcre2=yes
58818
58819fi
58820
58821fi
58822
58823if test "X$enable_pcre" != "Xno" && test "X$enable_pcre2" != "Xyes"
58824then :
58825
58826
58827pkg_failed=no
58828{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PCRE" >&5
58829printf %s "checking for PCRE... " >&6; }
58830
58831if test -n "$PCRE_CFLAGS"; then
58832    pkg_cv_PCRE_CFLAGS="$PCRE_CFLAGS"
58833 elif test -n "$PKG_CONFIG"; then
58834    if test -n "$PKG_CONFIG" && \
58835    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcre\""; } >&5
58836  ($PKG_CONFIG --exists --print-errors "libpcre") 2>&5
58837  ac_status=$?
58838  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58839  test $ac_status = 0; }; then
58840  pkg_cv_PCRE_CFLAGS=`$PKG_CONFIG --cflags "libpcre" 2>/dev/null`
58841		      test "x$?" != "x0" && pkg_failed=yes
58842else
58843  pkg_failed=yes
58844fi
58845 else
58846    pkg_failed=untried
58847fi
58848if test -n "$PCRE_LIBS"; then
58849    pkg_cv_PCRE_LIBS="$PCRE_LIBS"
58850 elif test -n "$PKG_CONFIG"; then
58851    if test -n "$PKG_CONFIG" && \
58852    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcre\""; } >&5
58853  ($PKG_CONFIG --exists --print-errors "libpcre") 2>&5
58854  ac_status=$?
58855  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58856  test $ac_status = 0; }; then
58857  pkg_cv_PCRE_LIBS=`$PKG_CONFIG --libs "libpcre" 2>/dev/null`
58858		      test "x$?" != "x0" && pkg_failed=yes
58859else
58860  pkg_failed=yes
58861fi
58862 else
58863    pkg_failed=untried
58864fi
58865
58866
58867
58868if test $pkg_failed = yes; then
58869   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
58870printf "%s\n" "no" >&6; }
58871
58872if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58873        _pkg_short_errors_supported=yes
58874else
58875        _pkg_short_errors_supported=no
58876fi
58877        if test $_pkg_short_errors_supported = yes; then
58878	        PCRE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libpcre" 2>&1`
58879        else
58880	        PCRE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libpcre" 2>&1`
58881        fi
58882	# Put the nasty error message in config.log where it belongs
58883	echo "$PCRE_PKG_ERRORS" >&5
58884
58885
58886    ac_fn_c_check_header_compile "$LINENO" "pcre.h" "ac_cv_header_pcre_h" "$ac_includes_default"
58887if test "x$ac_cv_header_pcre_h" = xyes
58888then :
58889
58890      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pcre_compile in -lpcre" >&5
58891printf %s "checking for pcre_compile in -lpcre... " >&6; }
58892if test ${ac_cv_lib_pcre_pcre_compile+y}
58893then :
58894  printf %s "(cached) " >&6
58895else $as_nop
58896  ac_check_lib_save_LIBS=$LIBS
58897LIBS="-lpcre  $LIBS"
58898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58899/* end confdefs.h.  */
58900
58901/* Override any GCC internal prototype to avoid an error.
58902   Use char because int might match the return type of a GCC
58903   builtin and then its argument prototype would still apply.  */
58904char pcre_compile ();
58905int
58906main (void)
58907{
58908return pcre_compile ();
58909  ;
58910  return 0;
58911}
58912_ACEOF
58913if ac_fn_c_try_link "$LINENO"
58914then :
58915  ac_cv_lib_pcre_pcre_compile=yes
58916else $as_nop
58917  ac_cv_lib_pcre_pcre_compile=no
58918fi
58919rm -f core conftest.err conftest.$ac_objext conftest.beam \
58920    conftest$ac_exeext conftest.$ac_ext
58921LIBS=$ac_check_lib_save_LIBS
58922fi
58923{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcre_pcre_compile" >&5
58924printf "%s\n" "$ac_cv_lib_pcre_pcre_compile" >&6; }
58925if test "x$ac_cv_lib_pcre_pcre_compile" = xyes
58926then :
58927
58928        LIBS="${LIBS} -lpcre"
58929
58930printf "%s\n" "#define HAVE_LIBPCRE 1" >>confdefs.h
58931
58932
58933fi
58934
58935
58936fi
58937
58938
58939elif test $pkg_failed = untried; then
58940     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
58941printf "%s\n" "no" >&6; }
58942
58943    ac_fn_c_check_header_compile "$LINENO" "pcre.h" "ac_cv_header_pcre_h" "$ac_includes_default"
58944if test "x$ac_cv_header_pcre_h" = xyes
58945then :
58946
58947      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pcre_compile in -lpcre" >&5
58948printf %s "checking for pcre_compile in -lpcre... " >&6; }
58949if test ${ac_cv_lib_pcre_pcre_compile+y}
58950then :
58951  printf %s "(cached) " >&6
58952else $as_nop
58953  ac_check_lib_save_LIBS=$LIBS
58954LIBS="-lpcre  $LIBS"
58955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58956/* end confdefs.h.  */
58957
58958/* Override any GCC internal prototype to avoid an error.
58959   Use char because int might match the return type of a GCC
58960   builtin and then its argument prototype would still apply.  */
58961char pcre_compile ();
58962int
58963main (void)
58964{
58965return pcre_compile ();
58966  ;
58967  return 0;
58968}
58969_ACEOF
58970if ac_fn_c_try_link "$LINENO"
58971then :
58972  ac_cv_lib_pcre_pcre_compile=yes
58973else $as_nop
58974  ac_cv_lib_pcre_pcre_compile=no
58975fi
58976rm -f core conftest.err conftest.$ac_objext conftest.beam \
58977    conftest$ac_exeext conftest.$ac_ext
58978LIBS=$ac_check_lib_save_LIBS
58979fi
58980{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcre_pcre_compile" >&5
58981printf "%s\n" "$ac_cv_lib_pcre_pcre_compile" >&6; }
58982if test "x$ac_cv_lib_pcre_pcre_compile" = xyes
58983then :
58984
58985        LIBS="${LIBS} -lpcre"
58986
58987printf "%s\n" "#define HAVE_LIBPCRE 1" >>confdefs.h
58988
58989
58990fi
58991
58992
58993fi
58994
58995
58996else
58997	PCRE_CFLAGS=$pkg_cv_PCRE_CFLAGS
58998	PCRE_LIBS=$pkg_cv_PCRE_LIBS
58999        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59000printf "%s\n" "yes" >&6; }
59001
59002    CFLAGS="$PCRE_CFLAGS $CFLAGS"
59003    ac_fn_c_check_header_compile "$LINENO" "pcre.h" "ac_cv_header_pcre_h" "$ac_includes_default"
59004if test "x$ac_cv_header_pcre_h" = xyes
59005then :
59006
59007      LIBS="$PCRE_LIBS $LIBS"
59008
59009printf "%s\n" "#define HAVE_LIBPCRE 1" >>confdefs.h
59010
59011      enable_pcre=yes
59012
59013fi
59014
59015
59016fi
59017
59018fi
59019
59020if test "X$enable_pcre2" = Xyes
59021then :
59022  PCRE_INFO="yes, via libpcre2"
59023elif test "X$enable_pcre" = Xyes
59024then :
59025  PCRE_INFO="yes, via libpcre"
59026else $as_nop
59027  PCRE_INFO=no
59028fi
59029
59030
59031if test "X$with_cares" = "Xyes"
59032then :
59033
59034
59035pkg_failed=no
59036{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CARES" >&5
59037printf %s "checking for CARES... " >&6; }
59038
59039if test -n "$CARES_CFLAGS"; then
59040    pkg_cv_CARES_CFLAGS="$CARES_CFLAGS"
59041 elif test -n "$PKG_CONFIG"; then
59042    if test -n "$PKG_CONFIG" && \
59043    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcares\""; } >&5
59044  ($PKG_CONFIG --exists --print-errors "libcares") 2>&5
59045  ac_status=$?
59046  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59047  test $ac_status = 0; }; then
59048  pkg_cv_CARES_CFLAGS=`$PKG_CONFIG --cflags "libcares" 2>/dev/null`
59049		      test "x$?" != "x0" && pkg_failed=yes
59050else
59051  pkg_failed=yes
59052fi
59053 else
59054    pkg_failed=untried
59055fi
59056if test -n "$CARES_LIBS"; then
59057    pkg_cv_CARES_LIBS="$CARES_LIBS"
59058 elif test -n "$PKG_CONFIG"; then
59059    if test -n "$PKG_CONFIG" && \
59060    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcares\""; } >&5
59061  ($PKG_CONFIG --exists --print-errors "libcares") 2>&5
59062  ac_status=$?
59063  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59064  test $ac_status = 0; }; then
59065  pkg_cv_CARES_LIBS=`$PKG_CONFIG --libs "libcares" 2>/dev/null`
59066		      test "x$?" != "x0" && pkg_failed=yes
59067else
59068  pkg_failed=yes
59069fi
59070 else
59071    pkg_failed=untried
59072fi
59073
59074
59075
59076if test $pkg_failed = yes; then
59077   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
59078printf "%s\n" "no" >&6; }
59079
59080if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
59081        _pkg_short_errors_supported=yes
59082else
59083        _pkg_short_errors_supported=no
59084fi
59085        if test $_pkg_short_errors_supported = yes; then
59086	        CARES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcares" 2>&1`
59087        else
59088	        CARES_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcares" 2>&1`
59089        fi
59090	# Put the nasty error message in config.log where it belongs
59091	echo "$CARES_PKG_ERRORS" >&5
59092
59093
59094    ac_fn_c_check_header_compile "$LINENO" "ares.h" "ac_cv_header_ares_h" "$ac_includes_default"
59095if test "x$ac_cv_header_ares_h" = xyes
59096then :
59097
59098      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ares_set_local_ip4 in -lcares" >&5
59099printf %s "checking for ares_set_local_ip4 in -lcares... " >&6; }
59100if test ${ac_cv_lib_cares_ares_set_local_ip4+y}
59101then :
59102  printf %s "(cached) " >&6
59103else $as_nop
59104  ac_check_lib_save_LIBS=$LIBS
59105LIBS="-lcares  $LIBS"
59106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59107/* end confdefs.h.  */
59108
59109/* Override any GCC internal prototype to avoid an error.
59110   Use char because int might match the return type of a GCC
59111   builtin and then its argument prototype would still apply.  */
59112char ares_set_local_ip4 ();
59113int
59114main (void)
59115{
59116return ares_set_local_ip4 ();
59117  ;
59118  return 0;
59119}
59120_ACEOF
59121if ac_fn_c_try_link "$LINENO"
59122then :
59123  ac_cv_lib_cares_ares_set_local_ip4=yes
59124else $as_nop
59125  ac_cv_lib_cares_ares_set_local_ip4=no
59126fi
59127rm -f core conftest.err conftest.$ac_objext conftest.beam \
59128    conftest$ac_exeext conftest.$ac_ext
59129LIBS=$ac_check_lib_save_LIBS
59130fi
59131{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cares_ares_set_local_ip4" >&5
59132printf "%s\n" "$ac_cv_lib_cares_ares_set_local_ip4" >&6; }
59133if test "x$ac_cv_lib_cares_ares_set_local_ip4" = xyes
59134then :
59135
59136        LIBS="-lcares ${LIBS}"
59137
59138printf "%s\n" "#define HAVE_LIBCARES 1" >>confdefs.h
59139
59140        RESOLVER_INFO="libcares, --bind-dns-address and --dns-servers available"
59141
59142fi
59143
59144
59145fi
59146
59147
59148elif test $pkg_failed = untried; then
59149     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
59150printf "%s\n" "no" >&6; }
59151
59152    ac_fn_c_check_header_compile "$LINENO" "ares.h" "ac_cv_header_ares_h" "$ac_includes_default"
59153if test "x$ac_cv_header_ares_h" = xyes
59154then :
59155
59156      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ares_set_local_ip4 in -lcares" >&5
59157printf %s "checking for ares_set_local_ip4 in -lcares... " >&6; }
59158if test ${ac_cv_lib_cares_ares_set_local_ip4+y}
59159then :
59160  printf %s "(cached) " >&6
59161else $as_nop
59162  ac_check_lib_save_LIBS=$LIBS
59163LIBS="-lcares  $LIBS"
59164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59165/* end confdefs.h.  */
59166
59167/* Override any GCC internal prototype to avoid an error.
59168   Use char because int might match the return type of a GCC
59169   builtin and then its argument prototype would still apply.  */
59170char ares_set_local_ip4 ();
59171int
59172main (void)
59173{
59174return ares_set_local_ip4 ();
59175  ;
59176  return 0;
59177}
59178_ACEOF
59179if ac_fn_c_try_link "$LINENO"
59180then :
59181  ac_cv_lib_cares_ares_set_local_ip4=yes
59182else $as_nop
59183  ac_cv_lib_cares_ares_set_local_ip4=no
59184fi
59185rm -f core conftest.err conftest.$ac_objext conftest.beam \
59186    conftest$ac_exeext conftest.$ac_ext
59187LIBS=$ac_check_lib_save_LIBS
59188fi
59189{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cares_ares_set_local_ip4" >&5
59190printf "%s\n" "$ac_cv_lib_cares_ares_set_local_ip4" >&6; }
59191if test "x$ac_cv_lib_cares_ares_set_local_ip4" = xyes
59192then :
59193
59194        LIBS="-lcares ${LIBS}"
59195
59196printf "%s\n" "#define HAVE_LIBCARES 1" >>confdefs.h
59197
59198        RESOLVER_INFO="libcares, --bind-dns-address and --dns-servers available"
59199
59200fi
59201
59202
59203fi
59204
59205
59206else
59207	CARES_CFLAGS=$pkg_cv_CARES_CFLAGS
59208	CARES_LIBS=$pkg_cv_CARES_LIBS
59209        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59210printf "%s\n" "yes" >&6; }
59211
59212    CFLAGS="$CARES_CFLAGS $CFLAGS"
59213    ac_fn_c_check_header_compile "$LINENO" "ares.h" "ac_cv_header_ares_h" "$ac_includes_default"
59214if test "x$ac_cv_header_ares_h" = xyes
59215then :
59216
59217      LIBS="$CARES_LIBS $LIBS"
59218
59219printf "%s\n" "#define HAVE_LIBCARES 1" >>confdefs.h
59220
59221      RESOLVER_INFO="libcares, --bind-dns-address and --dns-servers available"
59222
59223fi
59224
59225
59226fi
59227
59228else $as_nop
59229
59230  RESOLVER_INFO="libc, --bind-dns-address and --dns-servers not available"
59231
59232fi
59233
59234
59235# Check whether --with-gpgme-prefix was given.
59236if test ${with_gpgme_prefix+y}
59237then :
59238  withval=$with_gpgme_prefix; gpgme_config_prefix="$withval"
59239else $as_nop
59240  gpgme_config_prefix=""
59241fi
59242
59243  if test x"${GPGME_CONFIG}" = x ; then
59244     if test x"${gpgme_config_prefix}" != x ; then
59245        GPGME_CONFIG="${gpgme_config_prefix}/bin/gpgme-config"
59246     else
59247       case "${SYSROOT}" in
59248         /*)
59249           if test -x "${SYSROOT}/bin/gpgme-config" ; then
59250             GPGME_CONFIG="${SYSROOT}/bin/gpgme-config"
59251           fi
59252           ;;
59253         '')
59254           ;;
59255          *)
59256           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring \$SYSROOT as it is not an absolute path." >&5
59257printf "%s\n" "$as_me: WARNING: Ignoring \$SYSROOT as it is not an absolute path." >&2;}
59258           ;;
59259       esac
59260     fi
59261  fi
59262
59263  use_gpgrt_config=""
59264  if test x"${GPGME_CONFIG}" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then
59265    if $GPGRT_CONFIG gpgme --exists; then
59266      GPGME_CONFIG="$GPGRT_CONFIG gpgme"
59267      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Use gpgrt-config as gpgme-config" >&5
59268printf "%s\n" "$as_me: Use gpgrt-config as gpgme-config" >&6;}
59269      use_gpgrt_config=yes
59270    fi
59271  fi
59272  if test -z "$use_gpgrt_config"; then
59273    # Extract the first word of "gpgme-config", so it can be a program name with args.
59274set dummy gpgme-config; ac_word=$2
59275{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59276printf %s "checking for $ac_word... " >&6; }
59277if test ${ac_cv_path_GPGME_CONFIG+y}
59278then :
59279  printf %s "(cached) " >&6
59280else $as_nop
59281  case $GPGME_CONFIG in
59282  [\\/]* | ?:[\\/]*)
59283  ac_cv_path_GPGME_CONFIG="$GPGME_CONFIG" # Let the user override the test with a path.
59284  ;;
59285  *)
59286  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59287for as_dir in $PATH
59288do
59289  IFS=$as_save_IFS
59290  case $as_dir in #(((
59291    '') as_dir=./ ;;
59292    */) ;;
59293    *) as_dir=$as_dir/ ;;
59294  esac
59295    for ac_exec_ext in '' $ac_executable_extensions; do
59296  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
59297    ac_cv_path_GPGME_CONFIG="$as_dir$ac_word$ac_exec_ext"
59298    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
59299    break 2
59300  fi
59301done
59302  done
59303IFS=$as_save_IFS
59304
59305  test -z "$ac_cv_path_GPGME_CONFIG" && ac_cv_path_GPGME_CONFIG="no"
59306  ;;
59307esac
59308fi
59309GPGME_CONFIG=$ac_cv_path_GPGME_CONFIG
59310if test -n "$GPGME_CONFIG"; then
59311  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GPGME_CONFIG" >&5
59312printf "%s\n" "$GPGME_CONFIG" >&6; }
59313else
59314  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
59315printf "%s\n" "no" >&6; }
59316fi
59317
59318
59319  fi
59320
59321  if test "$GPGME_CONFIG" != "no" ; then
59322    if test -z "$use_gpgrt_config"; then
59323      gpgme_version=`$GPGME_CONFIG --version`
59324    else
59325      gpgme_version=`$GPGME_CONFIG --modversion`
59326    fi
59327  fi
59328  gpgme_version_major=`echo $gpgme_version | \
59329               sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1/'`
59330  gpgme_version_minor=`echo $gpgme_version | \
59331               sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\2/'`
59332  gpgme_version_micro=`echo $gpgme_version | \
59333               sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\3/'`
59334
59335if test x"$with_metalink" != xno
59336then :
59337
59338
59339pkg_failed=no
59340{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for METALINK" >&5
59341printf %s "checking for METALINK... " >&6; }
59342
59343if test -n "$METALINK_CFLAGS"; then
59344    pkg_cv_METALINK_CFLAGS="$METALINK_CFLAGS"
59345 elif test -n "$PKG_CONFIG"; then
59346    if test -n "$PKG_CONFIG" && \
59347    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libmetalink\""; } >&5
59348  ($PKG_CONFIG --exists --print-errors "libmetalink") 2>&5
59349  ac_status=$?
59350  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59351  test $ac_status = 0; }; then
59352  pkg_cv_METALINK_CFLAGS=`$PKG_CONFIG --cflags "libmetalink" 2>/dev/null`
59353		      test "x$?" != "x0" && pkg_failed=yes
59354else
59355  pkg_failed=yes
59356fi
59357 else
59358    pkg_failed=untried
59359fi
59360if test -n "$METALINK_LIBS"; then
59361    pkg_cv_METALINK_LIBS="$METALINK_LIBS"
59362 elif test -n "$PKG_CONFIG"; then
59363    if test -n "$PKG_CONFIG" && \
59364    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libmetalink\""; } >&5
59365  ($PKG_CONFIG --exists --print-errors "libmetalink") 2>&5
59366  ac_status=$?
59367  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59368  test $ac_status = 0; }; then
59369  pkg_cv_METALINK_LIBS=`$PKG_CONFIG --libs "libmetalink" 2>/dev/null`
59370		      test "x$?" != "x0" && pkg_failed=yes
59371else
59372  pkg_failed=yes
59373fi
59374 else
59375    pkg_failed=untried
59376fi
59377
59378
59379
59380if test $pkg_failed = yes; then
59381   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
59382printf "%s\n" "no" >&6; }
59383
59384if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
59385        _pkg_short_errors_supported=yes
59386else
59387        _pkg_short_errors_supported=no
59388fi
59389        if test $_pkg_short_errors_supported = yes; then
59390	        METALINK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libmetalink" 2>&1`
59391        else
59392	        METALINK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libmetalink" 2>&1`
59393        fi
59394	# Put the nasty error message in config.log where it belongs
59395	echo "$METALINK_PKG_ERRORS" >&5
59396
59397
59398      with_metalink=no
59399
59400elif test $pkg_failed = untried; then
59401     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
59402printf "%s\n" "no" >&6; }
59403
59404      with_metalink=no
59405
59406else
59407	METALINK_CFLAGS=$pkg_cv_METALINK_CFLAGS
59408	METALINK_LIBS=$pkg_cv_METALINK_LIBS
59409        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59410printf "%s\n" "yes" >&6; }
59411
59412      LIBS="$METALINK_LIBS $LIBS"
59413      CFLAGS="$METALINK_CFLAGS $CFLAGS"
59414
59415printf "%s\n" "#define HAVE_METALINK 1" >>confdefs.h
59416
59417      with_metalink=yes
59418
59419fi
59420
59421  have_gpg=no
59422  if test x"$with_metalink" = xyes
59423then :
59424
59425
59426         tmp=1:0.4.2
59427  if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
59428     req_gpgme_api=`echo "$tmp"     | sed 's/\(.*\):\(.*\)/\1/'`
59429     min_gpgme_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'`
59430  else
59431     req_gpgme_api=0
59432     min_gpgme_version="$tmp"
59433  fi
59434
59435  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GPGME - version >= $min_gpgme_version" >&5
59436printf %s "checking for GPGME - version >= $min_gpgme_version... " >&6; }
59437  ok=no
59438  if test "$GPGME_CONFIG" != "no" ; then
59439    req_major=`echo $min_gpgme_version | \
59440               sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
59441    req_minor=`echo $min_gpgme_version | \
59442               sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
59443    req_micro=`echo $min_gpgme_version | \
59444               sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
59445    if test "$gpgme_version_major" -gt "$req_major"; then
59446        ok=yes
59447    else
59448        if test "$gpgme_version_major" -eq "$req_major"; then
59449            if test "$gpgme_version_minor" -gt "$req_minor"; then
59450               ok=yes
59451            else
59452               if test "$gpgme_version_minor" -eq "$req_minor"; then
59453                   if test "$gpgme_version_micro" -ge "$req_micro"; then
59454                     ok=yes
59455                   fi
59456               fi
59457            fi
59458        fi
59459    fi
59460  fi
59461  if test $ok = yes; then
59462     # If we have a recent GPGME, we should also check that the
59463     # API is compatible.
59464     if test "$req_gpgme_api" -gt 0 ; then
59465        if test -z "$use_gpgrt_config"; then
59466          tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
59467        else
59468          tmp=`$GPGME_CONFIG --variable=api_version 2>/dev/null || echo 0`
59469        fi
59470        if test "$tmp" -gt 0 ; then
59471           if test "$req_gpgme_api" -ne "$tmp" ; then
59472             ok=no
59473           fi
59474        fi
59475     fi
59476  fi
59477  if test $ok = yes; then
59478    GPGME_CFLAGS=`$GPGME_CONFIG --cflags`
59479    GPGME_LIBS=`$GPGME_CONFIG --libs`
59480    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59481printf "%s\n" "yes" >&6; }
59482
59483        # Put libgpgme to the end of the library list since it introduces a -L linker flags.
59484        # That -L might break the build if there are two different version of
59485        # a library (e.g. GnuTLS) in /usr/local and in the system directory.
59486        LIBS="$LIBS $GPGME_LIBS"
59487        CFLAGS="$GPGME_CFLAGS $CFLAGS"
59488
59489printf "%s\n" "#define HAVE_GPGME 1" >>confdefs.h
59490
59491        have_gpg=yes
59492
59493
59494    if test -z "$use_gpgrt_config"; then
59495      gpgme_config_host=`$GPGME_CONFIG --host 2>/dev/null || echo none`
59496    else
59497      gpgme_config_host=`$GPGME_CONFIG --variable=host 2>/dev/null || echo none`
59498    fi
59499    if test x"$gpgme_config_host" != xnone ; then
59500      if test x"$gpgme_config_host" != x"$host" ; then
59501  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING:
59502***
59503*** The config script \"$GPGME_CONFIG\" was
59504*** built for $gpgme_config_host and thus may not match the
59505*** used host $host.
59506*** You may want to use the configure option --with-gpgme-prefix
59507*** to specify a matching config script or use \$SYSROOT.
59508***" >&5
59509printf "%s\n" "$as_me: WARNING:
59510***
59511*** The config script \"$GPGME_CONFIG\" was
59512*** built for $gpgme_config_host and thus may not match the
59513*** used host $host.
59514*** You may want to use the configure option --with-gpgme-prefix
59515*** to specify a matching config script or use \$SYSROOT.
59516***" >&2;}
59517        gpg_config_script_warn="$gpg_config_script_warn gpgme"
59518      fi
59519    fi
59520
59521  else
59522    GPGME_CFLAGS=""
59523    GPGME_LIBS=""
59524    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
59525printf "%s\n" "no" >&6; }
59526    :
59527  fi
59528
59529
59530
59531
59532
59533fi
59534
59535fi
59536
59537
59538# Check whether --enable-xattr was given.
59539if test ${enable_xattr+y}
59540then :
59541  enableval=$enable_xattr; ENABLE_XATTR=$enableval
59542else $as_nop
59543  ENABLE_XATTR=yes
59544fi
59545
59546
59547case "$host_os" in
59548  *linux* | *darwin*) xattr_syscalls="fsetxattr" ;;
59549  freebsd*)           xattr_syscalls="extattr_set_fd" ;;
59550  *)  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Disabling Extended Attribute support: your system is not known to support extended attributes." >&5
59551printf "%s\n" "$as_me: Disabling Extended Attribute support: your system is not known to support extended attributes." >&6;}
59552      ENABLE_XATTR=no
59553esac
59554
59555if test "X${ENABLE_XATTR}" = "Xyes"; then
59556
59557  for ac_func in $xattr_syscalls
59558do :
59559  as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
59560ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
59561if eval test \"x\$"$as_ac_var"\" = x"yes"
59562then :
59563  cat >>confdefs.h <<_ACEOF
59564#define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
59565_ACEOF
59566
59567else $as_nop
59568
59569    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Disabling Extended Attribute support: your system does not support $xattr_syscalls" >&5
59570printf "%s\n" "$as_me: Disabling Extended Attribute support: your system does not support $xattr_syscalls" >&6;}
59571    ENABLE_XATTR=no
59572
59573fi
59574
59575done
59576fi
59577
59578test "X${ENABLE_XATTR}" = "Xyes" &&
59579printf "%s\n" "#define ENABLE_XATTR 1" >>confdefs.h
59580
59581
59582 if test "X$iri" != "Xno"; then
59583  IRI_IS_ENABLED_TRUE=
59584  IRI_IS_ENABLED_FALSE='#'
59585else
59586  IRI_IS_ENABLED_TRUE='#'
59587  IRI_IS_ENABLED_FALSE=
59588fi
59589
59590 if test "X$with_ssl" != "Xno"; then
59591  WITH_SSL_TRUE=
59592  WITH_SSL_FALSE='#'
59593else
59594  WITH_SSL_TRUE='#'
59595  WITH_SSL_FALSE=
59596fi
59597
59598 if test "X$with_metalink" != "Xno"; then
59599  METALINK_IS_ENABLED_TRUE=
59600  METALINK_IS_ENABLED_FALSE='#'
59601else
59602  METALINK_IS_ENABLED_TRUE='#'
59603  METALINK_IS_ENABLED_FALSE=
59604fi
59605
59606 if test "X$ENABLE_XATTR" != "Xno"; then
59607  WITH_XATTR_TRUE=
59608  WITH_XATTR_FALSE='#'
59609else
59610  WITH_XATTR_TRUE='#'
59611  WITH_XATTR_FALSE=
59612fi
59613
59614 if test "X$ENABLE_NTLM" = "Xyes"; then
59615  WITH_NTLM_TRUE=
59616  WITH_NTLM_FALSE='#'
59617else
59618  WITH_NTLM_TRUE='#'
59619  WITH_NTLM_FALSE=
59620fi
59621
59622
59623ac_config_files="$ac_config_files Makefile src/Makefile doc/Makefile util/Makefile po/Makefile.in gnulib_po/Makefile.in tests/Makefile fuzz/Makefile lib/Makefile testenv/Makefile tests/certs/interca.conf tests/certs/rootca.conf"
59624
59625ac_config_headers="$ac_config_headers src/config.h"
59626
59627cat >confcache <<\_ACEOF
59628# This file is a shell script that caches the results of configure
59629# tests run on this system so they can be shared between configure
59630# scripts and configure runs, see configure's option --config-cache.
59631# It is not useful on other systems.  If it contains results you don't
59632# want to keep, you may remove or edit it.
59633#
59634# config.status only pays attention to the cache file if you give it
59635# the --recheck option to rerun configure.
59636#
59637# `ac_cv_env_foo' variables (set or unset) will be overridden when
59638# loading this file, other *unset* `ac_cv_foo' will be assigned the
59639# following values.
59640
59641_ACEOF
59642
59643# The following way of writing the cache mishandles newlines in values,
59644# but we know of no workaround that is simple, portable, and efficient.
59645# So, we kill variables containing newlines.
59646# Ultrix sh set writes to stderr and can't be redirected directly,
59647# and sets the high bit in the cache file unless we assign to the vars.
59648(
59649  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
59650    eval ac_val=\$$ac_var
59651    case $ac_val in #(
59652    *${as_nl}*)
59653      case $ac_var in #(
59654      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
59655printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
59656      esac
59657      case $ac_var in #(
59658      _ | IFS | as_nl) ;; #(
59659      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
59660      *) { eval $ac_var=; unset $ac_var;} ;;
59661      esac ;;
59662    esac
59663  done
59664
59665  (set) 2>&1 |
59666    case $as_nl`(ac_space=' '; set) 2>&1` in #(
59667    *${as_nl}ac_space=\ *)
59668      # `set' does not quote correctly, so add quotes: double-quote
59669      # substitution turns \\\\ into \\, and sed turns \\ into \.
59670      sed -n \
59671	"s/'/'\\\\''/g;
59672	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
59673      ;; #(
59674    *)
59675      # `set' quotes correctly as required by POSIX, so do not add quotes.
59676      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
59677      ;;
59678    esac |
59679    sort
59680) |
59681  sed '
59682     /^ac_cv_env_/b end
59683     t clear
59684     :clear
59685     s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
59686     t end
59687     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
59688     :end' >>confcache
59689if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
59690  if test -w "$cache_file"; then
59691    if test "x$cache_file" != "x/dev/null"; then
59692      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
59693printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
59694      if test ! -f "$cache_file" || test -h "$cache_file"; then
59695	cat confcache >"$cache_file"
59696      else
59697        case $cache_file in #(
59698        */* | ?:*)
59699	  mv -f confcache "$cache_file"$$ &&
59700	  mv -f "$cache_file"$$ "$cache_file" ;; #(
59701        *)
59702	  mv -f confcache "$cache_file" ;;
59703	esac
59704      fi
59705    fi
59706  else
59707    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
59708printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
59709  fi
59710fi
59711rm -f confcache
59712
59713test "x$prefix" = xNONE && prefix=$ac_default_prefix
59714# Let make expand exec_prefix.
59715test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
59716
59717DEFS=-DHAVE_CONFIG_H
59718
59719ac_libobjs=
59720ac_ltlibobjs=
59721U=
59722for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
59723  # 1. Remove the extension, and $U if already installed.
59724  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
59725  ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
59726  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
59727  #    will be set to the directory where LIBOBJS objects are built.
59728  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
59729  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
59730done
59731LIBOBJS=$ac_libobjs
59732
59733LTLIBOBJS=$ac_ltlibobjs
59734
59735
59736{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
59737printf %s "checking that generated files are newer than configure... " >&6; }
59738   if test -n "$am_sleep_pid"; then
59739     # Hide warnings about reused PIDs.
59740     wait $am_sleep_pid 2>/dev/null
59741   fi
59742   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
59743printf "%s\n" "done" >&6; }
59744 if test -n "$EXEEXT"; then
59745  am__EXEEXT_TRUE=
59746  am__EXEEXT_FALSE='#'
59747else
59748  am__EXEEXT_TRUE='#'
59749  am__EXEEXT_FALSE=
59750fi
59751
59752if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
59753  as_fn_error $? "conditional \"AMDEP\" was never defined.
59754Usually this means the macro was only invoked conditionally." "$LINENO" 5
59755fi
59756if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
59757  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
59758Usually this means the macro was only invoked conditionally." "$LINENO" 5
59759fi
59760if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
59761  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
59762Usually this means the macro was only invoked conditionally." "$LINENO" 5
59763fi
59764if test -z "${FUZZING_TRUE}" && test -z "${FUZZING_FALSE}"; then
59765  as_fn_error $? "conditional \"FUZZING\" was never defined.
59766Usually this means the macro was only invoked conditionally." "$LINENO" 5
59767fi
59768if test -z "${HAVE_PYTHON3_TRUE}" && test -z "${HAVE_PYTHON3_FALSE}"; then
59769  as_fn_error $? "conditional \"HAVE_PYTHON3\" was never defined.
59770Usually this means the macro was only invoked conditionally." "$LINENO" 5
59771fi
59772if test -z "${GL_GENERATE_ICONV_H_TRUE}" && test -z "${GL_GENERATE_ICONV_H_FALSE}"; then
59773  as_fn_error $? "conditional \"GL_GENERATE_ICONV_H\" was never defined.
59774Usually this means the macro was only invoked conditionally." "$LINENO" 5
59775fi
59776if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
59777  as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
59778Usually this means the macro was only invoked conditionally." "$LINENO" 5
59779fi
59780if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
59781  as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
59782Usually this means the macro was only invoked conditionally." "$LINENO" 5
59783fi
59784if test -z "${GL_GENERATE_BYTESWAP_H_TRUE}" && test -z "${GL_GENERATE_BYTESWAP_H_FALSE}"; then
59785  as_fn_error $? "conditional \"GL_GENERATE_BYTESWAP_H\" was never defined.
59786Usually this means the macro was only invoked conditionally." "$LINENO" 5
59787fi
59788
59789if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
59790  as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
59791Usually this means the macro was only invoked conditionally." "$LINENO" 5
59792fi
59793if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
59794  as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
59795Usually this means the macro was only invoked conditionally." "$LINENO" 5
59796fi
59797if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
59798  as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
59799Usually this means the macro was only invoked conditionally." "$LINENO" 5
59800fi
59801if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
59802  as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
59803Usually this means the macro was only invoked conditionally." "$LINENO" 5
59804fi
59805if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
59806  as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
59807Usually this means the macro was only invoked conditionally." "$LINENO" 5
59808fi
59809if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
59810  as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
59811Usually this means the macro was only invoked conditionally." "$LINENO" 5
59812fi
59813if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
59814  as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
59815Usually this means the macro was only invoked conditionally." "$LINENO" 5
59816fi
59817if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
59818  as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
59819Usually this means the macro was only invoked conditionally." "$LINENO" 5
59820fi
59821CONFIG_INCLUDE=src/config.h
59822
59823if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
59824  as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined.
59825Usually this means the macro was only invoked conditionally." "$LINENO" 5
59826fi
59827if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
59828  as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
59829Usually this means the macro was only invoked conditionally." "$LINENO" 5
59830fi
59831if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
59832  as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
59833Usually this means the macro was only invoked conditionally." "$LINENO" 5
59834fi
59835if test -z "${LIBUNISTRING_COMPILE_UNICASE_EMPTY_PREFIX_CONTEXT_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNICASE_EMPTY_PREFIX_CONTEXT_FALSE}"; then
59836  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNICASE_EMPTY_PREFIX_CONTEXT\" was never defined.
59837Usually this means the macro was only invoked conditionally." "$LINENO" 5
59838fi
59839if test -z "${LIBUNISTRING_COMPILE_UNICASE_EMPTY_SUFFIX_CONTEXT_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNICASE_EMPTY_SUFFIX_CONTEXT_FALSE}"; then
59840  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNICASE_EMPTY_SUFFIX_CONTEXT\" was never defined.
59841Usually this means the macro was only invoked conditionally." "$LINENO" 5
59842fi
59843if test -z "${LIBUNISTRING_COMPILE_UNICASE_TOLOWER_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNICASE_TOLOWER_FALSE}"; then
59844  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNICASE_TOLOWER\" was never defined.
59845Usually this means the macro was only invoked conditionally." "$LINENO" 5
59846fi
59847if test -z "${LIBUNISTRING_COMPILE_UNICASE_U8_TOLOWER_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNICASE_U8_TOLOWER_FALSE}"; then
59848  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNICASE_U8_TOLOWER\" was never defined.
59849Usually this means the macro was only invoked conditionally." "$LINENO" 5
59850fi
59851if test -z "${LIBUNISTRING_COMPILE_UNICTYPE_COMBINING_CLASS_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNICTYPE_COMBINING_CLASS_FALSE}"; then
59852  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNICTYPE_COMBINING_CLASS\" was never defined.
59853Usually this means the macro was only invoked conditionally." "$LINENO" 5
59854fi
59855if test -z "${LIBUNISTRING_COMPILE_UNICTYPE_PROPERTY_SOFT_DOTTED_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNICTYPE_PROPERTY_SOFT_DOTTED_FALSE}"; then
59856  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNICTYPE_PROPERTY_SOFT_DOTTED\" was never defined.
59857Usually this means the macro was only invoked conditionally." "$LINENO" 5
59858fi
59859if test -z "${LIBUNISTRING_COMPILE_UNINORM_U8_NORMALIZE_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNINORM_U8_NORMALIZE_FALSE}"; then
59860  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNINORM_U8_NORMALIZE\" was never defined.
59861Usually this means the macro was only invoked conditionally." "$LINENO" 5
59862fi
59863if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_CPY_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_CPY_FALSE}"; then
59864  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_CPY\" was never defined.
59865Usually this means the macro was only invoked conditionally." "$LINENO" 5
59866fi
59867if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_UNSAFE_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_UNSAFE_FALSE}"; then
59868  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_UNSAFE\" was never defined.
59869Usually this means the macro was only invoked conditionally." "$LINENO" 5
59870fi
59871if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_STRLEN_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_STRLEN_FALSE}"; then
59872  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_STRLEN\" was never defined.
59873Usually this means the macro was only invoked conditionally." "$LINENO" 5
59874fi
59875if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE}"; then
59876  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB\" was never defined.
59877Usually this means the macro was only invoked conditionally." "$LINENO" 5
59878fi
59879if test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE}"; then
59880  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH\" was never defined.
59881Usually this means the macro was only invoked conditionally." "$LINENO" 5
59882fi
59883
59884
59885    gl_libobjs=
59886    gl_ltlibobjs=
59887    if test -n "$gl_LIBOBJS"; then
59888      # Remove the extension.
59889      sed_drop_objext='s/\.o$//;s/\.obj$//'
59890      for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
59891        gl_libobjs="$gl_libobjs $i.$ac_objext"
59892        gl_ltlibobjs="$gl_ltlibobjs $i.lo"
59893      done
59894    fi
59895    gl_LIBOBJS=$gl_libobjs
59896
59897    gl_LTLIBOBJS=$gl_ltlibobjs
59898
59899
59900
59901    gltests_libobjs=
59902    gltests_ltlibobjs=
59903    if test -n "$gltests_LIBOBJS"; then
59904      # Remove the extension.
59905      sed_drop_objext='s/\.o$//;s/\.obj$//'
59906      for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
59907        gltests_libobjs="$gltests_libobjs $i.$ac_objext"
59908        gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
59909      done
59910    fi
59911    gltests_LIBOBJS=$gltests_libobjs
59912
59913    gltests_LTLIBOBJS=$gltests_ltlibobjs
59914
59915
59916if test -z "${CODE_COVERAGE_ENABLED_TRUE}" && test -z "${CODE_COVERAGE_ENABLED_FALSE}"; then
59917  as_fn_error $? "conditional \"CODE_COVERAGE_ENABLED\" was never defined.
59918Usually this means the macro was only invoked conditionally." "$LINENO" 5
59919fi
59920if test -z "${IRI_IS_ENABLED_TRUE}" && test -z "${IRI_IS_ENABLED_FALSE}"; then
59921  as_fn_error $? "conditional \"IRI_IS_ENABLED\" was never defined.
59922Usually this means the macro was only invoked conditionally." "$LINENO" 5
59923fi
59924if test -z "${WITH_SSL_TRUE}" && test -z "${WITH_SSL_FALSE}"; then
59925  as_fn_error $? "conditional \"WITH_SSL\" was never defined.
59926Usually this means the macro was only invoked conditionally." "$LINENO" 5
59927fi
59928if test -z "${METALINK_IS_ENABLED_TRUE}" && test -z "${METALINK_IS_ENABLED_FALSE}"; then
59929  as_fn_error $? "conditional \"METALINK_IS_ENABLED\" was never defined.
59930Usually this means the macro was only invoked conditionally." "$LINENO" 5
59931fi
59932if test -z "${WITH_XATTR_TRUE}" && test -z "${WITH_XATTR_FALSE}"; then
59933  as_fn_error $? "conditional \"WITH_XATTR\" was never defined.
59934Usually this means the macro was only invoked conditionally." "$LINENO" 5
59935fi
59936if test -z "${WITH_NTLM_TRUE}" && test -z "${WITH_NTLM_FALSE}"; then
59937  as_fn_error $? "conditional \"WITH_NTLM\" was never defined.
59938Usually this means the macro was only invoked conditionally." "$LINENO" 5
59939fi
59940
59941: "${CONFIG_STATUS=./config.status}"
59942ac_write_fail=0
59943ac_clean_files_save=$ac_clean_files
59944ac_clean_files="$ac_clean_files $CONFIG_STATUS"
59945{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
59946printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
59947as_write_fail=0
59948cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
59949#! $SHELL
59950# Generated by $as_me.
59951# Run this file to recreate the current configuration.
59952# Compiler output produced by configure, useful for debugging
59953# configure, is in config.log if it exists.
59954
59955debug=false
59956ac_cs_recheck=false
59957ac_cs_silent=false
59958
59959SHELL=\${CONFIG_SHELL-$SHELL}
59960export SHELL
59961_ASEOF
59962cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
59963## -------------------- ##
59964## M4sh Initialization. ##
59965## -------------------- ##
59966
59967# Be more Bourne compatible
59968DUALCASE=1; export DUALCASE # for MKS sh
59969as_nop=:
59970if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
59971then :
59972  emulate sh
59973  NULLCMD=:
59974  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
59975  # is contrary to our usage.  Disable this feature.
59976  alias -g '${1+"$@"}'='"$@"'
59977  setopt NO_GLOB_SUBST
59978else $as_nop
59979  case `(set -o) 2>/dev/null` in #(
59980  *posix*) :
59981    set -o posix ;; #(
59982  *) :
59983     ;;
59984esac
59985fi
59986
59987
59988
59989# Reset variables that may have inherited troublesome values from
59990# the environment.
59991
59992# IFS needs to be set, to space, tab, and newline, in precisely that order.
59993# (If _AS_PATH_WALK were called with IFS unset, it would have the
59994# side effect of setting IFS to empty, thus disabling word splitting.)
59995# Quoting is to prevent editors from complaining about space-tab.
59996as_nl='
59997'
59998export as_nl
59999IFS=" ""	$as_nl"
60000
60001PS1='$ '
60002PS2='> '
60003PS4='+ '
60004
60005# Ensure predictable behavior from utilities with locale-dependent output.
60006LC_ALL=C
60007export LC_ALL
60008LANGUAGE=C
60009export LANGUAGE
60010
60011# We cannot yet rely on "unset" to work, but we need these variables
60012# to be unset--not just set to an empty or harmless value--now, to
60013# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
60014# also avoids known problems related to "unset" and subshell syntax
60015# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
60016for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
60017do eval test \${$as_var+y} \
60018  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
60019done
60020
60021# Ensure that fds 0, 1, and 2 are open.
60022if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
60023if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
60024if (exec 3>&2)            ; then :; else exec 2>/dev/null; fi
60025
60026# The user is always right.
60027if ${PATH_SEPARATOR+false} :; then
60028  PATH_SEPARATOR=:
60029  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
60030    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
60031      PATH_SEPARATOR=';'
60032  }
60033fi
60034
60035
60036# Find who we are.  Look in the path if we contain no directory separator.
60037as_myself=
60038case $0 in #((
60039  *[\\/]* ) as_myself=$0 ;;
60040  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60041for as_dir in $PATH
60042do
60043  IFS=$as_save_IFS
60044  case $as_dir in #(((
60045    '') as_dir=./ ;;
60046    */) ;;
60047    *) as_dir=$as_dir/ ;;
60048  esac
60049    test -r "$as_dir$0" && as_myself=$as_dir$0 && break
60050  done
60051IFS=$as_save_IFS
60052
60053     ;;
60054esac
60055# We did not find ourselves, most probably we were run as `sh COMMAND'
60056# in which case we are not to be found in the path.
60057if test "x$as_myself" = x; then
60058  as_myself=$0
60059fi
60060if test ! -f "$as_myself"; then
60061  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
60062  exit 1
60063fi
60064
60065
60066
60067# as_fn_error STATUS ERROR [LINENO LOG_FD]
60068# ----------------------------------------
60069# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
60070# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
60071# script with STATUS, using 1 if that was 0.
60072as_fn_error ()
60073{
60074  as_status=$1; test $as_status -eq 0 && as_status=1
60075  if test "$4"; then
60076    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
60077    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
60078  fi
60079  printf "%s\n" "$as_me: error: $2" >&2
60080  as_fn_exit $as_status
60081} # as_fn_error
60082
60083
60084
60085# as_fn_set_status STATUS
60086# -----------------------
60087# Set $? to STATUS, without forking.
60088as_fn_set_status ()
60089{
60090  return $1
60091} # as_fn_set_status
60092
60093# as_fn_exit STATUS
60094# -----------------
60095# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
60096as_fn_exit ()
60097{
60098  set +e
60099  as_fn_set_status $1
60100  exit $1
60101} # as_fn_exit
60102
60103# as_fn_unset VAR
60104# ---------------
60105# Portably unset VAR.
60106as_fn_unset ()
60107{
60108  { eval $1=; unset $1;}
60109}
60110as_unset=as_fn_unset
60111
60112# as_fn_append VAR VALUE
60113# ----------------------
60114# Append the text in VALUE to the end of the definition contained in VAR. Take
60115# advantage of any shell optimizations that allow amortized linear growth over
60116# repeated appends, instead of the typical quadratic growth present in naive
60117# implementations.
60118if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
60119then :
60120  eval 'as_fn_append ()
60121  {
60122    eval $1+=\$2
60123  }'
60124else $as_nop
60125  as_fn_append ()
60126  {
60127    eval $1=\$$1\$2
60128  }
60129fi # as_fn_append
60130
60131# as_fn_arith ARG...
60132# ------------------
60133# Perform arithmetic evaluation on the ARGs, and store the result in the
60134# global $as_val. Take advantage of shells that can avoid forks. The arguments
60135# must be portable across $(()) and expr.
60136if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
60137then :
60138  eval 'as_fn_arith ()
60139  {
60140    as_val=$(( $* ))
60141  }'
60142else $as_nop
60143  as_fn_arith ()
60144  {
60145    as_val=`expr "$@" || test $? -eq 1`
60146  }
60147fi # as_fn_arith
60148
60149
60150if expr a : '\(a\)' >/dev/null 2>&1 &&
60151   test "X`expr 00001 : '.*\(...\)'`" = X001; then
60152  as_expr=expr
60153else
60154  as_expr=false
60155fi
60156
60157if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
60158  as_basename=basename
60159else
60160  as_basename=false
60161fi
60162
60163if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
60164  as_dirname=dirname
60165else
60166  as_dirname=false
60167fi
60168
60169as_me=`$as_basename -- "$0" ||
60170$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
60171	 X"$0" : 'X\(//\)$' \| \
60172	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
60173printf "%s\n" X/"$0" |
60174    sed '/^.*\/\([^/][^/]*\)\/*$/{
60175	    s//\1/
60176	    q
60177	  }
60178	  /^X\/\(\/\/\)$/{
60179	    s//\1/
60180	    q
60181	  }
60182	  /^X\/\(\/\).*/{
60183	    s//\1/
60184	    q
60185	  }
60186	  s/.*/./; q'`
60187
60188# Avoid depending upon Character Ranges.
60189as_cr_letters='abcdefghijklmnopqrstuvwxyz'
60190as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
60191as_cr_Letters=$as_cr_letters$as_cr_LETTERS
60192as_cr_digits='0123456789'
60193as_cr_alnum=$as_cr_Letters$as_cr_digits
60194
60195
60196# Determine whether it's possible to make 'echo' print without a newline.
60197# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
60198# for compatibility with existing Makefiles.
60199ECHO_C= ECHO_N= ECHO_T=
60200case `echo -n x` in #(((((
60201-n*)
60202  case `echo 'xy\c'` in
60203  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
60204  xy)  ECHO_C='\c';;
60205  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
60206       ECHO_T='	';;
60207  esac;;
60208*)
60209  ECHO_N='-n';;
60210esac
60211
60212# For backward compatibility with old third-party macros, we provide
60213# the shell variables $as_echo and $as_echo_n.  New code should use
60214# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
60215as_echo='printf %s\n'
60216as_echo_n='printf %s'
60217
60218rm -f conf$$ conf$$.exe conf$$.file
60219if test -d conf$$.dir; then
60220  rm -f conf$$.dir/conf$$.file
60221else
60222  rm -f conf$$.dir
60223  mkdir conf$$.dir 2>/dev/null
60224fi
60225if (echo >conf$$.file) 2>/dev/null; then
60226  if ln -s conf$$.file conf$$ 2>/dev/null; then
60227    as_ln_s='ln -s'
60228    # ... but there are two gotchas:
60229    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
60230    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
60231    # In both cases, we have to default to `cp -pR'.
60232    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
60233      as_ln_s='cp -pR'
60234  elif ln conf$$.file conf$$ 2>/dev/null; then
60235    as_ln_s=ln
60236  else
60237    as_ln_s='cp -pR'
60238  fi
60239else
60240  as_ln_s='cp -pR'
60241fi
60242rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
60243rmdir conf$$.dir 2>/dev/null
60244
60245
60246# as_fn_mkdir_p
60247# -------------
60248# Create "$as_dir" as a directory, including parents if necessary.
60249as_fn_mkdir_p ()
60250{
60251
60252  case $as_dir in #(
60253  -*) as_dir=./$as_dir;;
60254  esac
60255  test -d "$as_dir" || eval $as_mkdir_p || {
60256    as_dirs=
60257    while :; do
60258      case $as_dir in #(
60259      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
60260      *) as_qdir=$as_dir;;
60261      esac
60262      as_dirs="'$as_qdir' $as_dirs"
60263      as_dir=`$as_dirname -- "$as_dir" ||
60264$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
60265	 X"$as_dir" : 'X\(//\)[^/]' \| \
60266	 X"$as_dir" : 'X\(//\)$' \| \
60267	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
60268printf "%s\n" X"$as_dir" |
60269    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
60270	    s//\1/
60271	    q
60272	  }
60273	  /^X\(\/\/\)[^/].*/{
60274	    s//\1/
60275	    q
60276	  }
60277	  /^X\(\/\/\)$/{
60278	    s//\1/
60279	    q
60280	  }
60281	  /^X\(\/\).*/{
60282	    s//\1/
60283	    q
60284	  }
60285	  s/.*/./; q'`
60286      test -d "$as_dir" && break
60287    done
60288    test -z "$as_dirs" || eval "mkdir $as_dirs"
60289  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
60290
60291
60292} # as_fn_mkdir_p
60293if mkdir -p . 2>/dev/null; then
60294  as_mkdir_p='mkdir -p "$as_dir"'
60295else
60296  test -d ./-p && rmdir ./-p
60297  as_mkdir_p=false
60298fi
60299
60300
60301# as_fn_executable_p FILE
60302# -----------------------
60303# Test if FILE is an executable regular file.
60304as_fn_executable_p ()
60305{
60306  test -f "$1" && test -x "$1"
60307} # as_fn_executable_p
60308as_test_x='test -x'
60309as_executable_p=as_fn_executable_p
60310
60311# Sed expression to map a string onto a valid CPP name.
60312as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
60313
60314# Sed expression to map a string onto a valid variable name.
60315as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
60316
60317
60318exec 6>&1
60319## ----------------------------------- ##
60320## Main body of $CONFIG_STATUS script. ##
60321## ----------------------------------- ##
60322_ASEOF
60323test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
60324
60325cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
60326# Save the log message, to keep $0 and so on meaningful, and to
60327# report actual input values of CONFIG_FILES etc. instead of their
60328# values after options handling.
60329ac_log="
60330This file was extended by wget $as_me 1.21.2, which was
60331generated by GNU Autoconf 2.71.  Invocation command line was
60332
60333  CONFIG_FILES    = $CONFIG_FILES
60334  CONFIG_HEADERS  = $CONFIG_HEADERS
60335  CONFIG_LINKS    = $CONFIG_LINKS
60336  CONFIG_COMMANDS = $CONFIG_COMMANDS
60337  $ $0 $@
60338
60339on `(hostname || uname -n) 2>/dev/null | sed 1q`
60340"
60341
60342_ACEOF
60343
60344case $ac_config_files in *"
60345"*) set x $ac_config_files; shift; ac_config_files=$*;;
60346esac
60347
60348case $ac_config_headers in *"
60349"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
60350esac
60351
60352
60353cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
60354# Files that config.status was made for.
60355config_files="$ac_config_files"
60356config_headers="$ac_config_headers"
60357config_links="$ac_config_links"
60358config_commands="$ac_config_commands"
60359
60360_ACEOF
60361
60362cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
60363ac_cs_usage="\
60364\`$as_me' instantiates files and other configuration actions
60365from templates according to the current configuration.  Unless the files
60366and actions are specified as TAGs, all are instantiated by default.
60367
60368Usage: $0 [OPTION]... [TAG]...
60369
60370  -h, --help       print this help, then exit
60371  -V, --version    print version number and configuration settings, then exit
60372      --config     print configuration, then exit
60373  -q, --quiet, --silent
60374                   do not print progress messages
60375  -d, --debug      don't remove temporary files
60376      --recheck    update $as_me by reconfiguring in the same conditions
60377      --file=FILE[:TEMPLATE]
60378                   instantiate the configuration file FILE
60379      --header=FILE[:TEMPLATE]
60380                   instantiate the configuration header FILE
60381
60382Configuration files:
60383$config_files
60384
60385Configuration headers:
60386$config_headers
60387
60388Configuration links:
60389$config_links
60390
60391Configuration commands:
60392$config_commands
60393
60394Report bugs to <bug-wget@gnu.org>."
60395
60396_ACEOF
60397ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
60398ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
60399cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
60400ac_cs_config='$ac_cs_config_escaped'
60401ac_cs_version="\\
60402wget config.status 1.21.2
60403configured by $0, generated by GNU Autoconf 2.71,
60404  with options \\"\$ac_cs_config\\"
60405
60406Copyright (C) 2021 Free Software Foundation, Inc.
60407This config.status script is free software; the Free Software Foundation
60408gives unlimited permission to copy, distribute and modify it."
60409
60410ac_pwd='$ac_pwd'
60411srcdir='$srcdir'
60412INSTALL='$INSTALL'
60413MKDIR_P='$MKDIR_P'
60414AWK='$AWK'
60415test -n "\$AWK" || AWK=awk
60416_ACEOF
60417
60418cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
60419# The default lists apply if the user does not specify any file.
60420ac_need_defaults=:
60421while test $# != 0
60422do
60423  case $1 in
60424  --*=?*)
60425    ac_option=`expr "X$1" : 'X\([^=]*\)='`
60426    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
60427    ac_shift=:
60428    ;;
60429  --*=)
60430    ac_option=`expr "X$1" : 'X\([^=]*\)='`
60431    ac_optarg=
60432    ac_shift=:
60433    ;;
60434  *)
60435    ac_option=$1
60436    ac_optarg=$2
60437    ac_shift=shift
60438    ;;
60439  esac
60440
60441  case $ac_option in
60442  # Handling of the options.
60443  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
60444    ac_cs_recheck=: ;;
60445  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
60446    printf "%s\n" "$ac_cs_version"; exit ;;
60447  --config | --confi | --conf | --con | --co | --c )
60448    printf "%s\n" "$ac_cs_config"; exit ;;
60449  --debug | --debu | --deb | --de | --d | -d )
60450    debug=: ;;
60451  --file | --fil | --fi | --f )
60452    $ac_shift
60453    case $ac_optarg in
60454    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
60455    '') as_fn_error $? "missing file argument" ;;
60456    esac
60457    as_fn_append CONFIG_FILES " '$ac_optarg'"
60458    ac_need_defaults=false;;
60459  --header | --heade | --head | --hea )
60460    $ac_shift
60461    case $ac_optarg in
60462    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
60463    esac
60464    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
60465    ac_need_defaults=false;;
60466  --he | --h)
60467    # Conflict between --help and --header
60468    as_fn_error $? "ambiguous option: \`$1'
60469Try \`$0 --help' for more information.";;
60470  --help | --hel | -h )
60471    printf "%s\n" "$ac_cs_usage"; exit ;;
60472  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
60473  | -silent | --silent | --silen | --sile | --sil | --si | --s)
60474    ac_cs_silent=: ;;
60475
60476  # This is an error.
60477  -*) as_fn_error $? "unrecognized option: \`$1'
60478Try \`$0 --help' for more information." ;;
60479
60480  *) as_fn_append ac_config_targets " $1"
60481     ac_need_defaults=false ;;
60482
60483  esac
60484  shift
60485done
60486
60487ac_configure_extra_args=
60488
60489if $ac_cs_silent; then
60490  exec 6>/dev/null
60491  ac_configure_extra_args="$ac_configure_extra_args --silent"
60492fi
60493
60494_ACEOF
60495cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
60496if \$ac_cs_recheck; then
60497  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
60498  shift
60499  \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
60500  CONFIG_SHELL='$SHELL'
60501  export CONFIG_SHELL
60502  exec "\$@"
60503fi
60504
60505_ACEOF
60506cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
60507exec 5>>config.log
60508{
60509  echo
60510  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
60511## Running $as_me. ##
60512_ASBOX
60513  printf "%s\n" "$ac_log"
60514} >&5
60515
60516_ACEOF
60517cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
60518#
60519# INIT-COMMANDS
60520#
60521AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
60522# Capture the value of obsolete ALL_LINGUAS because we need it to compute
60523    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
60524    # from automake < 1.5.
60525    eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
60526    # Capture the value of LINGUAS because we need it to compute CATALOGS.
60527    LINGUAS="${LINGUAS-%UNSET%}"
60528
60529GNUmakefile=$GNUmakefile
60530
60531_ACEOF
60532
60533cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
60534
60535# Handling of arguments.
60536for ac_config_target in $ac_config_targets
60537do
60538  case $ac_config_target in
60539    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
60540    "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
60541    "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
60542    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
60543    "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
60544    "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
60545    "util/Makefile") CONFIG_FILES="$CONFIG_FILES util/Makefile" ;;
60546    "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
60547    "gnulib_po/Makefile.in") CONFIG_FILES="$CONFIG_FILES gnulib_po/Makefile.in" ;;
60548    "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
60549    "fuzz/Makefile") CONFIG_FILES="$CONFIG_FILES fuzz/Makefile" ;;
60550    "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
60551    "testenv/Makefile") CONFIG_FILES="$CONFIG_FILES testenv/Makefile" ;;
60552    "tests/certs/interca.conf") CONFIG_FILES="$CONFIG_FILES tests/certs/interca.conf" ;;
60553    "tests/certs/rootca.conf") CONFIG_FILES="$CONFIG_FILES tests/certs/rootca.conf" ;;
60554    "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;;
60555
60556  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
60557  esac
60558done
60559
60560
60561# If the user did not use the arguments to specify the items to instantiate,
60562# then the envvar interface is used.  Set only those that are not.
60563# We use the long form for the default assignment because of an extremely
60564# bizarre bug on SunOS 4.1.3.
60565if $ac_need_defaults; then
60566  test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
60567  test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
60568  test ${CONFIG_LINKS+y} || CONFIG_LINKS=$config_links
60569  test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
60570fi
60571
60572# Have a temporary directory for convenience.  Make it in the build tree
60573# simply because there is no reason against having it here, and in addition,
60574# creating and moving files from /tmp can sometimes cause problems.
60575# Hook for its removal unless debugging.
60576# Note that there is a small window in which the directory will not be cleaned:
60577# after its creation but before its name has been assigned to `$tmp'.
60578$debug ||
60579{
60580  tmp= ac_tmp=
60581  trap 'exit_status=$?
60582  : "${ac_tmp:=$tmp}"
60583  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
60584' 0
60585  trap 'as_fn_exit 1' 1 2 13 15
60586}
60587# Create a (secure) tmp directory for tmp files.
60588
60589{
60590  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
60591  test -d "$tmp"
60592}  ||
60593{
60594  tmp=./conf$$-$RANDOM
60595  (umask 077 && mkdir "$tmp")
60596} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
60597ac_tmp=$tmp
60598
60599# Set up the scripts for CONFIG_FILES section.
60600# No need to generate them if there are no CONFIG_FILES.
60601# This happens for instance with `./config.status config.h'.
60602if test -n "$CONFIG_FILES"; then
60603
60604
60605ac_cr=`echo X | tr X '\015'`
60606# On cygwin, bash can eat \r inside `` if the user requested igncr.
60607# But we know of no other shell where ac_cr would be empty at this
60608# point, so we can use a bashism as a fallback.
60609if test "x$ac_cr" = x; then
60610  eval ac_cr=\$\'\\r\'
60611fi
60612ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
60613if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
60614  ac_cs_awk_cr='\\r'
60615else
60616  ac_cs_awk_cr=$ac_cr
60617fi
60618
60619echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
60620_ACEOF
60621
60622
60623{
60624  echo "cat >conf$$subs.awk <<_ACEOF" &&
60625  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
60626  echo "_ACEOF"
60627} >conf$$subs.sh ||
60628  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
60629ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
60630ac_delim='%!_!# '
60631for ac_last_try in false false false false false :; do
60632  . ./conf$$subs.sh ||
60633    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
60634
60635  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
60636  if test $ac_delim_n = $ac_delim_num; then
60637    break
60638  elif $ac_last_try; then
60639    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
60640  else
60641    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
60642  fi
60643done
60644rm -f conf$$subs.sh
60645
60646cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
60647cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
60648_ACEOF
60649sed -n '
60650h
60651s/^/S["/; s/!.*/"]=/
60652p
60653g
60654s/^[^!]*!//
60655:repl
60656t repl
60657s/'"$ac_delim"'$//
60658t delim
60659:nl
60660h
60661s/\(.\{148\}\)..*/\1/
60662t more1
60663s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
60664p
60665n
60666b repl
60667:more1
60668s/["\\]/\\&/g; s/^/"/; s/$/"\\/
60669p
60670g
60671s/.\{148\}//
60672t nl
60673:delim
60674h
60675s/\(.\{148\}\)..*/\1/
60676t more2
60677s/["\\]/\\&/g; s/^/"/; s/$/"/
60678p
60679b
60680:more2
60681s/["\\]/\\&/g; s/^/"/; s/$/"\\/
60682p
60683g
60684s/.\{148\}//
60685t delim
60686' <conf$$subs.awk | sed '
60687/^[^""]/{
60688  N
60689  s/\n//
60690}
60691' >>$CONFIG_STATUS || ac_write_fail=1
60692rm -f conf$$subs.awk
60693cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
60694_ACAWK
60695cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
60696  for (key in S) S_is_set[key] = 1
60697  FS = ""
60698
60699}
60700{
60701  line = $ 0
60702  nfields = split(line, field, "@")
60703  substed = 0
60704  len = length(field[1])
60705  for (i = 2; i < nfields; i++) {
60706    key = field[i]
60707    keylen = length(key)
60708    if (S_is_set[key]) {
60709      value = S[key]
60710      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
60711      len += length(value) + length(field[++i])
60712      substed = 1
60713    } else
60714      len += 1 + keylen
60715  }
60716
60717  print line
60718}
60719
60720_ACAWK
60721_ACEOF
60722cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
60723if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
60724  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
60725else
60726  cat
60727fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
60728  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
60729_ACEOF
60730
60731# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
60732# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
60733# trailing colons and then remove the whole line if VPATH becomes empty
60734# (actually we leave an empty line to preserve line numbers).
60735if test "x$srcdir" = x.; then
60736  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
60737h
60738s///
60739s/^/:/
60740s/[	 ]*$/:/
60741s/:\$(srcdir):/:/g
60742s/:\${srcdir}:/:/g
60743s/:@srcdir@:/:/g
60744s/^:*//
60745s/:*$//
60746x
60747s/\(=[	 ]*\).*/\1/
60748G
60749s/\n//
60750s/^[^=]*=[	 ]*$//
60751}'
60752fi
60753
60754cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
60755fi # test -n "$CONFIG_FILES"
60756
60757# Set up the scripts for CONFIG_HEADERS section.
60758# No need to generate them if there are no CONFIG_HEADERS.
60759# This happens for instance with `./config.status Makefile'.
60760if test -n "$CONFIG_HEADERS"; then
60761cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
60762BEGIN {
60763_ACEOF
60764
60765# Transform confdefs.h into an awk script `defines.awk', embedded as
60766# here-document in config.status, that substitutes the proper values into
60767# config.h.in to produce config.h.
60768
60769# Create a delimiter string that does not exist in confdefs.h, to ease
60770# handling of long lines.
60771ac_delim='%!_!# '
60772for ac_last_try in false false :; do
60773  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
60774  if test -z "$ac_tt"; then
60775    break
60776  elif $ac_last_try; then
60777    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
60778  else
60779    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
60780  fi
60781done
60782
60783# For the awk script, D is an array of macro values keyed by name,
60784# likewise P contains macro parameters if any.  Preserve backslash
60785# newline sequences.
60786
60787ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
60788sed -n '
60789s/.\{148\}/&'"$ac_delim"'/g
60790t rset
60791:rset
60792s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
60793t def
60794d
60795:def
60796s/\\$//
60797t bsnl
60798s/["\\]/\\&/g
60799s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
60800D["\1"]=" \3"/p
60801s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
60802d
60803:bsnl
60804s/["\\]/\\&/g
60805s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
60806D["\1"]=" \3\\\\\\n"\\/p
60807t cont
60808s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
60809t cont
60810d
60811:cont
60812n
60813s/.\{148\}/&'"$ac_delim"'/g
60814t clear
60815:clear
60816s/\\$//
60817t bsnlc
60818s/["\\]/\\&/g; s/^/"/; s/$/"/p
60819d
60820:bsnlc
60821s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
60822b cont
60823' <confdefs.h | sed '
60824s/'"$ac_delim"'/"\\\
60825"/g' >>$CONFIG_STATUS || ac_write_fail=1
60826
60827cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
60828  for (key in D) D_is_set[key] = 1
60829  FS = ""
60830}
60831/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
60832  line = \$ 0
60833  split(line, arg, " ")
60834  if (arg[1] == "#") {
60835    defundef = arg[2]
60836    mac1 = arg[3]
60837  } else {
60838    defundef = substr(arg[1], 2)
60839    mac1 = arg[2]
60840  }
60841  split(mac1, mac2, "(") #)
60842  macro = mac2[1]
60843  prefix = substr(line, 1, index(line, defundef) - 1)
60844  if (D_is_set[macro]) {
60845    # Preserve the white space surrounding the "#".
60846    print prefix "define", macro P[macro] D[macro]
60847    next
60848  } else {
60849    # Replace #undef with comments.  This is necessary, for example,
60850    # in the case of _POSIX_SOURCE, which is predefined and required
60851    # on some systems where configure will not decide to define it.
60852    if (defundef == "undef") {
60853      print "/*", prefix defundef, macro, "*/"
60854      next
60855    }
60856  }
60857}
60858{ print }
60859_ACAWK
60860_ACEOF
60861cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
60862  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
60863fi # test -n "$CONFIG_HEADERS"
60864
60865
60866eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
60867shift
60868for ac_tag
60869do
60870  case $ac_tag in
60871  :[FHLC]) ac_mode=$ac_tag; continue;;
60872  esac
60873  case $ac_mode$ac_tag in
60874  :[FHL]*:*);;
60875  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
60876  :[FH]-) ac_tag=-:-;;
60877  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
60878  esac
60879  ac_save_IFS=$IFS
60880  IFS=:
60881  set x $ac_tag
60882  IFS=$ac_save_IFS
60883  shift
60884  ac_file=$1
60885  shift
60886
60887  case $ac_mode in
60888  :L) ac_source=$1;;
60889  :[FH])
60890    ac_file_inputs=
60891    for ac_f
60892    do
60893      case $ac_f in
60894      -) ac_f="$ac_tmp/stdin";;
60895      *) # Look for the file first in the build tree, then in the source tree
60896	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
60897	 # because $ac_f cannot contain `:'.
60898	 test -f "$ac_f" ||
60899	   case $ac_f in
60900	   [\\/$]*) false;;
60901	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
60902	   esac ||
60903	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
60904      esac
60905      case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
60906      as_fn_append ac_file_inputs " '$ac_f'"
60907    done
60908
60909    # Let's still pretend it is `configure' which instantiates (i.e., don't
60910    # use $as_me), people would be surprised to read:
60911    #    /* config.h.  Generated by config.status.  */
60912    configure_input='Generated from '`
60913	  printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
60914	`' by configure.'
60915    if test x"$ac_file" != x-; then
60916      configure_input="$ac_file.  $configure_input"
60917      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
60918printf "%s\n" "$as_me: creating $ac_file" >&6;}
60919    fi
60920    # Neutralize special characters interpreted by sed in replacement strings.
60921    case $configure_input in #(
60922    *\&* | *\|* | *\\* )
60923       ac_sed_conf_input=`printf "%s\n" "$configure_input" |
60924       sed 's/[\\\\&|]/\\\\&/g'`;; #(
60925    *) ac_sed_conf_input=$configure_input;;
60926    esac
60927
60928    case $ac_tag in
60929    *:-:* | *:-) cat >"$ac_tmp/stdin" \
60930      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
60931    esac
60932    ;;
60933  esac
60934
60935  ac_dir=`$as_dirname -- "$ac_file" ||
60936$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
60937	 X"$ac_file" : 'X\(//\)[^/]' \| \
60938	 X"$ac_file" : 'X\(//\)$' \| \
60939	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
60940printf "%s\n" X"$ac_file" |
60941    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
60942	    s//\1/
60943	    q
60944	  }
60945	  /^X\(\/\/\)[^/].*/{
60946	    s//\1/
60947	    q
60948	  }
60949	  /^X\(\/\/\)$/{
60950	    s//\1/
60951	    q
60952	  }
60953	  /^X\(\/\).*/{
60954	    s//\1/
60955	    q
60956	  }
60957	  s/.*/./; q'`
60958  as_dir="$ac_dir"; as_fn_mkdir_p
60959  ac_builddir=.
60960
60961case "$ac_dir" in
60962.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
60963*)
60964  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
60965  # A ".." for each directory in $ac_dir_suffix.
60966  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
60967  case $ac_top_builddir_sub in
60968  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
60969  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
60970  esac ;;
60971esac
60972ac_abs_top_builddir=$ac_pwd
60973ac_abs_builddir=$ac_pwd$ac_dir_suffix
60974# for backward compatibility:
60975ac_top_builddir=$ac_top_build_prefix
60976
60977case $srcdir in
60978  .)  # We are building in place.
60979    ac_srcdir=.
60980    ac_top_srcdir=$ac_top_builddir_sub
60981    ac_abs_top_srcdir=$ac_pwd ;;
60982  [\\/]* | ?:[\\/]* )  # Absolute name.
60983    ac_srcdir=$srcdir$ac_dir_suffix;
60984    ac_top_srcdir=$srcdir
60985    ac_abs_top_srcdir=$srcdir ;;
60986  *) # Relative name.
60987    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
60988    ac_top_srcdir=$ac_top_build_prefix$srcdir
60989    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
60990esac
60991ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
60992
60993
60994  case $ac_mode in
60995  :F)
60996  #
60997  # CONFIG_FILE
60998  #
60999
61000  case $INSTALL in
61001  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
61002  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
61003  esac
61004  ac_MKDIR_P=$MKDIR_P
61005  case $MKDIR_P in
61006  [\\/$]* | ?:[\\/]* ) ;;
61007  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
61008  esac
61009_ACEOF
61010
61011cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61012# If the template does not know about datarootdir, expand it.
61013# FIXME: This hack should be removed a few years after 2.60.
61014ac_datarootdir_hack=; ac_datarootdir_seen=
61015ac_sed_dataroot='
61016/datarootdir/ {
61017  p
61018  q
61019}
61020/@datadir@/p
61021/@docdir@/p
61022/@infodir@/p
61023/@localedir@/p
61024/@mandir@/p'
61025case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
61026*datarootdir*) ac_datarootdir_seen=yes;;
61027*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
61028  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
61029printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
61030_ACEOF
61031cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61032  ac_datarootdir_hack='
61033  s&@datadir@&$datadir&g
61034  s&@docdir@&$docdir&g
61035  s&@infodir@&$infodir&g
61036  s&@localedir@&$localedir&g
61037  s&@mandir@&$mandir&g
61038  s&\\\${datarootdir}&$datarootdir&g' ;;
61039esac
61040_ACEOF
61041
61042# Neutralize VPATH when `$srcdir' = `.'.
61043# Shell code in configure.ac might set extrasub.
61044# FIXME: do we really want to maintain this feature?
61045cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61046ac_sed_extra="$ac_vpsub
61047$extrasub
61048_ACEOF
61049cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61050:t
61051/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
61052s|@configure_input@|$ac_sed_conf_input|;t t
61053s&@top_builddir@&$ac_top_builddir_sub&;t t
61054s&@top_build_prefix@&$ac_top_build_prefix&;t t
61055s&@srcdir@&$ac_srcdir&;t t
61056s&@abs_srcdir@&$ac_abs_srcdir&;t t
61057s&@top_srcdir@&$ac_top_srcdir&;t t
61058s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
61059s&@builddir@&$ac_builddir&;t t
61060s&@abs_builddir@&$ac_abs_builddir&;t t
61061s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
61062s&@INSTALL@&$ac_INSTALL&;t t
61063s&@MKDIR_P@&$ac_MKDIR_P&;t t
61064$ac_datarootdir_hack
61065"
61066eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
61067  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
61068
61069test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
61070  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
61071  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
61072      "$ac_tmp/out"`; test -z "$ac_out"; } &&
61073  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
61074which seems to be undefined.  Please make sure it is defined" >&5
61075printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
61076which seems to be undefined.  Please make sure it is defined" >&2;}
61077
61078  rm -f "$ac_tmp/stdin"
61079  case $ac_file in
61080  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
61081  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
61082  esac \
61083  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
61084 ;;
61085  :H)
61086  #
61087  # CONFIG_HEADER
61088  #
61089  if test x"$ac_file" != x-; then
61090    {
61091      printf "%s\n" "/* $configure_input  */" >&1 \
61092      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
61093    } >"$ac_tmp/config.h" \
61094      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
61095    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
61096      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
61097printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
61098    else
61099      rm -f "$ac_file"
61100      mv "$ac_tmp/config.h" "$ac_file" \
61101	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
61102    fi
61103  else
61104    printf "%s\n" "/* $configure_input  */" >&1 \
61105      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
61106      || as_fn_error $? "could not create -" "$LINENO" 5
61107  fi
61108# Compute "$ac_file"'s index in $config_headers.
61109_am_arg="$ac_file"
61110_am_stamp_count=1
61111for _am_header in $config_headers :; do
61112  case $_am_header in
61113    $_am_arg | $_am_arg:* )
61114      break ;;
61115    * )
61116      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
61117  esac
61118done
61119echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
61120$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
61121	 X"$_am_arg" : 'X\(//\)[^/]' \| \
61122	 X"$_am_arg" : 'X\(//\)$' \| \
61123	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
61124printf "%s\n" X"$_am_arg" |
61125    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
61126	    s//\1/
61127	    q
61128	  }
61129	  /^X\(\/\/\)[^/].*/{
61130	    s//\1/
61131	    q
61132	  }
61133	  /^X\(\/\/\)$/{
61134	    s//\1/
61135	    q
61136	  }
61137	  /^X\(\/\).*/{
61138	    s//\1/
61139	    q
61140	  }
61141	  s/.*/./; q'`/stamp-h$_am_stamp_count
61142 ;;
61143  :L)
61144  #
61145  # CONFIG_LINK
61146  #
61147
61148  if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
61149    :
61150  else
61151    # Prefer the file from the source tree if names are identical.
61152    if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
61153      ac_source=$srcdir/$ac_source
61154    fi
61155
61156    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
61157printf "%s\n" "$as_me: linking $ac_source to $ac_file" >&6;}
61158
61159    if test ! -r "$ac_source"; then
61160      as_fn_error $? "$ac_source: file not found" "$LINENO" 5
61161    fi
61162    rm -f "$ac_file"
61163
61164    # Try a relative symlink, then a hard link, then a copy.
61165    case $ac_source in
61166    [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
61167	*) ac_rel_source=$ac_top_build_prefix$ac_source ;;
61168    esac
61169    ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
61170      ln "$ac_source" "$ac_file" 2>/dev/null ||
61171      cp -p "$ac_source" "$ac_file" ||
61172      as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
61173  fi
61174 ;;
61175  :C)  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
61176printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
61177 ;;
61178  esac
61179
61180
61181  case $ac_file$ac_mode in
61182    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
61183  # Older Autoconf quotes --file arguments for eval, but not when files
61184  # are listed without --file.  Let's play safe and only enable the eval
61185  # if we detect the quoting.
61186  # TODO: see whether this extra hack can be removed once we start
61187  # requiring Autoconf 2.70 or later.
61188  case $CONFIG_FILES in #(
61189  *\'*) :
61190    eval set x "$CONFIG_FILES" ;; #(
61191  *) :
61192    set x $CONFIG_FILES ;; #(
61193  *) :
61194     ;;
61195esac
61196  shift
61197  # Used to flag and report bootstrapping failures.
61198  am_rc=0
61199  for am_mf
61200  do
61201    # Strip MF so we end up with the name of the file.
61202    am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
61203    # Check whether this is an Automake generated Makefile which includes
61204    # dependency-tracking related rules and includes.
61205    # Grep'ing the whole file directly is not great: AIX grep has a line
61206    # limit of 2048, but all sed's we know have understand at least 4000.
61207    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
61208      || continue
61209    am_dirpart=`$as_dirname -- "$am_mf" ||
61210$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
61211	 X"$am_mf" : 'X\(//\)[^/]' \| \
61212	 X"$am_mf" : 'X\(//\)$' \| \
61213	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
61214printf "%s\n" X"$am_mf" |
61215    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
61216	    s//\1/
61217	    q
61218	  }
61219	  /^X\(\/\/\)[^/].*/{
61220	    s//\1/
61221	    q
61222	  }
61223	  /^X\(\/\/\)$/{
61224	    s//\1/
61225	    q
61226	  }
61227	  /^X\(\/\).*/{
61228	    s//\1/
61229	    q
61230	  }
61231	  s/.*/./; q'`
61232    am_filepart=`$as_basename -- "$am_mf" ||
61233$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
61234	 X"$am_mf" : 'X\(//\)$' \| \
61235	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
61236printf "%s\n" X/"$am_mf" |
61237    sed '/^.*\/\([^/][^/]*\)\/*$/{
61238	    s//\1/
61239	    q
61240	  }
61241	  /^X\/\(\/\/\)$/{
61242	    s//\1/
61243	    q
61244	  }
61245	  /^X\/\(\/\).*/{
61246	    s//\1/
61247	    q
61248	  }
61249	  s/.*/./; q'`
61250    { echo "$as_me:$LINENO: cd "$am_dirpart" \
61251      && sed -e '/# am--include-marker/d' "$am_filepart" \
61252        | $MAKE -f - am--depfiles" >&5
61253   (cd "$am_dirpart" \
61254      && sed -e '/# am--include-marker/d' "$am_filepart" \
61255        | $MAKE -f - am--depfiles) >&5 2>&5
61256   ac_status=$?
61257   echo "$as_me:$LINENO: \$? = $ac_status" >&5
61258   (exit $ac_status); } || am_rc=$?
61259  done
61260  if test $am_rc -ne 0; then
61261    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
61262printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
61263as_fn_error $? "Something went wrong bootstrapping makefile fragments
61264    for automatic dependency tracking.  If GNU make was not used, consider
61265    re-running the configure script with MAKE=\"gmake\" (or whatever is
61266    necessary).  You can also try re-running configure with the
61267    '--disable-dependency-tracking' option to at least be able to build
61268    the package (albeit without support for automatic dependency tracking).
61269See \`config.log' for more details" "$LINENO" 5; }
61270  fi
61271  { am_dirpart=; unset am_dirpart;}
61272  { am_filepart=; unset am_filepart;}
61273  { am_mf=; unset am_mf;}
61274  { am_rc=; unset am_rc;}
61275  rm -f conftest-deps.mk
61276}
61277 ;;
61278    "po-directories":C)
61279    for ac_file in $CONFIG_FILES; do
61280      # Support "outfile[:infile[:infile...]]"
61281      case "$ac_file" in
61282        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
61283      esac
61284      # PO directories have a Makefile.in generated from Makefile.in.in.
61285      case "$ac_file" in */Makefile.in)
61286        # Adjust a relative srcdir.
61287        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
61288        ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
61289        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
61290        # In autoconf-2.13 it is called $ac_given_srcdir.
61291        # In autoconf-2.50 it is called $srcdir.
61292        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
61293        case "$ac_given_srcdir" in
61294          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
61295          /*) top_srcdir="$ac_given_srcdir" ;;
61296          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
61297        esac
61298        # Treat a directory as a PO directory if and only if it has a
61299        # POTFILES.in file. This allows packages to have multiple PO
61300        # directories under different names or in different locations.
61301        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
61302          rm -f "$ac_dir/POTFILES"
61303          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
61304          gt_tab=`printf '\t'`
61305          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"
61306          POMAKEFILEDEPS="POTFILES.in"
61307          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
61308          # on $ac_dir but don't depend on user-specified configuration
61309          # parameters.
61310          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
61311            # The LINGUAS file contains the set of available languages.
61312            if test -n "$OBSOLETE_ALL_LINGUAS"; then
61313              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
61314            fi
61315            ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
61316            # Hide the ALL_LINGUAS assignment from automake < 1.5.
61317            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
61318            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
61319          else
61320            # The set of available languages was given in configure.in.
61321            # Hide the ALL_LINGUAS assignment from automake < 1.5.
61322            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
61323          fi
61324          # Compute POFILES
61325          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
61326          # Compute UPDATEPOFILES
61327          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
61328          # Compute DUMMYPOFILES
61329          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
61330          # Compute GMOFILES
61331          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
61332          case "$ac_given_srcdir" in
61333            .) srcdirpre= ;;
61334            *) srcdirpre='$(srcdir)/' ;;
61335          esac
61336          POFILES=
61337          UPDATEPOFILES=
61338          DUMMYPOFILES=
61339          GMOFILES=
61340          for lang in $ALL_LINGUAS; do
61341            POFILES="$POFILES $srcdirpre$lang.po"
61342            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
61343            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
61344            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
61345          done
61346          # CATALOGS depends on both $ac_dir and the user's LINGUAS
61347          # environment variable.
61348          INST_LINGUAS=
61349          if test -n "$ALL_LINGUAS"; then
61350            for presentlang in $ALL_LINGUAS; do
61351              useit=no
61352              if test "%UNSET%" != "$LINGUAS"; then
61353                desiredlanguages="$LINGUAS"
61354              else
61355                desiredlanguages="$ALL_LINGUAS"
61356              fi
61357              for desiredlang in $desiredlanguages; do
61358                # Use the presentlang catalog if desiredlang is
61359                #   a. equal to presentlang, or
61360                #   b. a variant of presentlang (because in this case,
61361                #      presentlang can be used as a fallback for messages
61362                #      which are not translated in the desiredlang catalog).
61363                case "$desiredlang" in
61364                  "$presentlang"*) useit=yes;;
61365                esac
61366              done
61367              if test $useit = yes; then
61368                INST_LINGUAS="$INST_LINGUAS $presentlang"
61369              fi
61370            done
61371          fi
61372          CATALOGS=
61373          if test -n "$INST_LINGUAS"; then
61374            for lang in $INST_LINGUAS; do
61375              CATALOGS="$CATALOGS $lang.gmo"
61376            done
61377          fi
61378          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
61379          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"
61380          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
61381            if test -f "$f"; then
61382              case "$f" in
61383                *.orig | *.bak | *~) ;;
61384                *) cat "$f" >> "$ac_dir/Makefile" ;;
61385              esac
61386            fi
61387          done
61388        fi
61389        ;;
61390      esac
61391    done ;;
61392
61393  esac
61394done # for ac_tag
61395
61396
61397as_fn_exit 0
61398_ACEOF
61399ac_clean_files=$ac_clean_files_save
61400
61401test $ac_write_fail = 0 ||
61402  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
61403
61404
61405# configure is writing to config.log, and then calls config.status.
61406# config.status does its own redirection, appending to config.log.
61407# Unfortunately, on DOS this fails, as config.log is still kept open
61408# by configure, so config.status won't be able to write to it; its
61409# output is simply discarded.  So we exec the FD to /dev/null,
61410# effectively closing config.log, so it can be properly (re)opened and
61411# appended to by config.status.  When coming back to configure, we
61412# need to make the FD available again.
61413if test "$no_create" != yes; then
61414  ac_cs_success=:
61415  ac_config_status_args=
61416  test "$silent" = yes &&
61417    ac_config_status_args="$ac_config_status_args --quiet"
61418  exec 5>/dev/null
61419  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
61420  exec 5>>config.log
61421  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
61422  # would make configure fail if this is the last instruction.
61423  $ac_cs_success || as_fn_exit 1
61424fi
61425if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
61426  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
61427printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
61428fi
61429
61430
61431{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Summary of build options:
61432
61433  Version:           $PACKAGE_VERSION
61434  Host OS:           $host_os
61435  Install prefix:    $prefix
61436  Compiler:          $CC
61437  CFlags:            $CFLAGS $CPPFLAGS $WARN_CFLAGS
61438  LDFlags:           $LDFLAGS
61439  Libs:              $LIBS
61440  SSL:               $with_ssl
61441  Zlib:              $with_zlib
61442  PSL:               $with_libpsl
61443  PCRE:              $PCRE_INFO
61444  Digest:            $ENABLE_DIGEST
61445  NTLM:              $ENABLE_NTLM
61446  OPIE:              $ENABLE_OPIE
61447  POSIX xattr:       $ENABLE_XATTR
61448  Debugging:         $ENABLE_DEBUG
61449  Assertions:        $ENABLE_ASSERTION
61450  Valgrind:          $VALGRIND_INFO
61451  Metalink:          $with_metalink
61452  Resolver:          $RESOLVER_INFO
61453  GPGME:             $have_gpg
61454  IRI:               $iri
61455  Fuzzing build:     $enable_fuzzing, $LIB_FUZZING_ENGINE
61456" >&5
61457printf "%s\n" "$as_me: Summary of build options:
61458
61459  Version:           $PACKAGE_VERSION
61460  Host OS:           $host_os
61461  Install prefix:    $prefix
61462  Compiler:          $CC
61463  CFlags:            $CFLAGS $CPPFLAGS $WARN_CFLAGS
61464  LDFlags:           $LDFLAGS
61465  Libs:              $LIBS
61466  SSL:               $with_ssl
61467  Zlib:              $with_zlib
61468  PSL:               $with_libpsl
61469  PCRE:              $PCRE_INFO
61470  Digest:            $ENABLE_DIGEST
61471  NTLM:              $ENABLE_NTLM
61472  OPIE:              $ENABLE_OPIE
61473  POSIX xattr:       $ENABLE_XATTR
61474  Debugging:         $ENABLE_DEBUG
61475  Assertions:        $ENABLE_ASSERTION
61476  Valgrind:          $VALGRIND_INFO
61477  Metalink:          $with_metalink
61478  Resolver:          $RESOLVER_INFO
61479  GPGME:             $have_gpg
61480  IRI:               $iri
61481  Fuzzing build:     $enable_fuzzing, $LIB_FUZZING_ENGINE
61482" >&6;}
61483
61484